Browse Source

fit: 信访投诉、案件核查下发

fit: 数据大屏接口
main
wxc 1 year ago
parent
commit
63e8fa64e4
  1. 6
      src/main/java/com/biutag/supervision/constants/enums/DistributionStateEnum.java
  2. 14
      src/main/java/com/biutag/supervision/controller/data/DataCaseVerifController.java
  3. 14
      src/main/java/com/biutag/supervision/controller/data/DataPetitionComplaintController.java
  4. 45
      src/main/java/com/biutag/supervision/controller/datav/DataVController.java
  5. 37
      src/main/java/com/biutag/supervision/pojo/dto/DataCaseVerifDistribute.java
  6. 10
      src/main/java/com/biutag/supervision/pojo/dto/DataCaseVerifImportDto.java
  7. 37
      src/main/java/com/biutag/supervision/pojo/dto/DataDataPetitionComplainDistribute.java
  8. 16
      src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintImportDto.java
  9. 2
      src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java
  10. 9
      src/main/java/com/biutag/supervision/pojo/entity/DataCaseVerif.java
  11. 11
      src/main/java/com/biutag/supervision/pojo/entity/DataPetitionComplaint.java
  12. 1
      src/main/java/com/biutag/supervision/pojo/model/ModelClueModel.java
  13. 15
      src/main/java/com/biutag/supervision/pojo/param/DataCaseVerifQueryParam.java
  14. 59
      src/main/java/com/biutag/supervision/service/DataCaseVerifService.java
  15. 52
      src/main/java/com/biutag/supervision/service/DataPetitionComplaintService.java
  16. 4
      src/main/java/com/biutag/supervision/service/ModelClueService.java
  17. 6
      src/main/java/com/biutag/supervision/service/NegativeService.java

6
src/main/java/com/biutag/supervision/constants/enums/ModelDistributionStateEnum.java → src/main/java/com/biutag/supervision/constants/enums/DistributionStateEnum.java

@ -8,12 +8,14 @@ import lombok.Getter;
* @date 2024/10/17
*/
@AllArgsConstructor
public enum ModelDistributionStateEnum {
public enum DistributionStateEnum {
// 未分发
UNDISTRIBUTED("0"),
// 已分发
DISTRIBUTED("1");
DISTRIBUTED("1"),
// 已处置
HANDLED("2");
@Getter
private String value;

14
src/main/java/com/biutag/supervision/controller/data/DataCaseVerifController.java

@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.supervision.constants.enums.DepartLevelEnum;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.dto.DataCaseVerifDistribute;
import com.biutag.supervision.pojo.dto.DataCaseVerifImportDto;
import com.biutag.supervision.pojo.entity.DataCaseVerif;
import com.biutag.supervision.pojo.entity.SupDepart;
@ -61,14 +62,14 @@ public class DataCaseVerifController {
@Override
public void invoke(DataCaseVerifImportDto data, AnalysisContext analysisContext) {
String secondDepartId = secondDeparts.stream()
.filter(item -> item.getShortName().equals(data.getComplainedSecondDepartName())).findFirst()
.filter(item -> item.getShortName().equals(data.getInvolveSecondDepartName())).findFirst()
.map(SupDepart::getId).orElse("");
data.setComplainedSecondDepartId(secondDepartId);
data.setInvolveSecondDepartName(secondDepartId);
if (StrUtil.isNotBlank(secondDepartId)) {
String complainedThirdDepartId = departService.list(new LambdaQueryWrapper<SupDepart>().eq(SupDepart::getPid, secondDepartId)
.like(SupDepart::getShortName, data.getComplainedThirdDepartName()))
.like(SupDepart::getShortName, data.getInvolveThirdDepartName()))
.stream().findFirst().map(SupDepart::getId).orElse("");
data.setComplainedThirdDepartId(complainedThirdDepartId);
data.setInvolveThirdDepartName(complainedThirdDepartId);
}
Set<ConstraintViolation<DataCaseVerifImportDto>> validate = validator.validate(data);
if (!validate.isEmpty()) {
@ -110,4 +111,9 @@ public class DataCaseVerifController {
return Result.success(dataCaseVerifService.removeById(id));
}
@PostMapping("distribute")
public Result<Boolean> distribute(@RequestBody DataCaseVerifDistribute dataDistribute) {
return Result.success(dataCaseVerifService.distribution(dataDistribute));
}
}

14
src/main/java/com/biutag/supervision/controller/data/DataPetitionComplaintController.java

@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.supervision.constants.enums.DepartLevelEnum;
import com.biutag.supervision.constants.enums.InitialPetition;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.dto.DataDataPetitionComplainDistribute;
import com.biutag.supervision.pojo.dto.DataPetitionComplaintAddDto;
import com.biutag.supervision.pojo.dto.DataPetitionComplaintImportDto;
import com.biutag.supervision.pojo.entity.DataPetitionComplaint;
@ -83,14 +84,14 @@ public class DataPetitionComplaintController {
data.setInitialPetition(InitialPetition.getValue(data.getInitialPetition()));
String secondDepartId = secondDeparts.stream()
.filter(item -> item.getShortName().equals(data.getComplainedSecondDepartName())).findFirst()
.filter(item -> item.getShortName().equals(data.getInvolveSecondDepartName())).findFirst()
.map(SupDepart::getId).orElse("");
data.setComplainedSecondDepartId(secondDepartId);
data.setInvolveSecondDepartName(secondDepartId);
if (StrUtil.isNotBlank(secondDepartId)) {
String complainedThirdDepartId = departService.list(new LambdaQueryWrapper<SupDepart>().eq(SupDepart::getPid, secondDepartId)
.like(SupDepart::getShortName, data.getComplainedThirdDepartName()))
.like(SupDepart::getShortName, data.getInvolveThirdDepartName()))
.stream().findFirst().map(SupDepart::getId).orElse("");
data.setComplainedThirdDepartId(complainedThirdDepartId);
data.setInvolveThirdDepartName(complainedThirdDepartId);
}
Set<ConstraintViolation<DataPetitionComplaintImportDto>> validate = validator.validate(data);
if (!validate.isEmpty()) {
@ -125,4 +126,9 @@ public class DataPetitionComplaintController {
return Result.success(dataPetitionComplaintService.removeById(id));
}
@PostMapping("distribute")
public Result<Boolean> distribute(@RequestBody DataDataPetitionComplainDistribute dataDistribute) {
return Result.success(dataPetitionComplaintService.distribution(dataDistribute));
}
}

45
src/main/java/com/biutag/supervision/controller/datav/DataVController.java

@ -0,0 +1,45 @@
package com.biutag.supervision.controller.datav;
import com.alibaba.fastjson.JSONObject;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.service.DataCaseVerifService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
/**
* @author wxc
* @date 2024/10/24
*/
@RequestMapping("datav")
@RequiredArgsConstructor
@RestController
public class DataVController {
private final DataCaseVerifService dataCaseVerifService;
@GetMapping("caseVerif")
public Result<JSONObject> caseVerif(Date beginTime, Date endTime) {
long total = dataCaseVerifService.count();
long confirmed = 0;
JSONObject overview = new JSONObject()
// 案件总数(起)
.fluentPut("total", total)
// 查实案件数
.fluentPut("confirmed", "")
// 查处问题(个)
.fluentPut("investigateAndPunish", 0)
// 问责人次
.fluentPut("wzrc", 0)
// 问责单位数
.fluentPut("wzdws", 0)
// 查实率
.fluentPut("confirmedRate", confirmed / total * 100 + "%");
JSONObject data = new JSONObject().fluentPut("overview", overview);
return Result.success(data);
}
}

37
src/main/java/com/biutag/supervision/pojo/dto/DataCaseVerifDistribute.java

@ -0,0 +1,37 @@
package com.biutag.supervision.pojo.dto;
import com.biutag.supervision.pojo.entity.DataCaseVerif;
import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
import java.util.ArrayList;
import java.util.List;
/**
* @author wxc
* @date 2024/10/24
*/
@Setter
@Getter
public class DataCaseVerifDistribute {
List<DataCaseVerif> data = new ArrayList<>();
// 办理时限
@NotBlank
private String timeLimit;
// 最大签收时长(天)
private Integer maxSignDuration;
// 最大办理时长(天)
private Integer maxHandleDuration;
// 最大延期时长(天)
private Integer maxExtensionDuration;
// 审批流程
@NotBlank
private String approvalFlow;
}

10
src/main/java/com/biutag/supervision/pojo/dto/DataCaseVerifImportDto.java

@ -50,16 +50,18 @@ public class DataCaseVerifImportDto {
// 被投诉机构
@ExcelProperty({"问题基本信息", "涉及单位(二级机构)"})
private String complainedSecondDepartName;
private String involveSecondDepartName;
// 被投诉机构
@ExcelProperty({"问题基本信息", "涉及单位(三级机构)"})
private String complainedThirdDepartName;
private String involveThirdDepartName;
@NotBlank(message = "涉及二级机构为空或与系统未匹配上")
private String complainedSecondDepartId;
private String involveSecondDepartId;
private String involveThirdDepartId;
private String complainedThirdDepartId;
// 具体内容
@ExcelProperty({"问题基本信息", "具体内容"})
@NotBlank(message = "具体内容为空")

37
src/main/java/com/biutag/supervision/pojo/dto/DataDataPetitionComplainDistribute.java

@ -0,0 +1,37 @@
package com.biutag.supervision.pojo.dto;
import com.biutag.supervision.pojo.entity.DataPetitionComplaint;
import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
import java.util.ArrayList;
import java.util.List;
/**
* @author wxc
* @date 2024/10/24
*/
@Setter
@Getter
public class DataDataPetitionComplainDistribute {
List<DataPetitionComplaint> data = new ArrayList<>();
// 办理时限
@NotBlank
private String timeLimit;
// 最大签收时长(天)
private Integer maxSignDuration;
// 最大办理时长(天)
private Integer maxHandleDuration;
// 最大延期时长(天)
private Integer maxExtensionDuration;
// 审批流程
@NotBlank
private String approvalFlow;
}

16
src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintImportDto.java

@ -64,20 +64,18 @@ public class DataPetitionComplaintImportDto {
@ExcelProperty({"信访基本信息", "业务类别"})
private String businessTypeName;
// 被投诉机构
@ExcelProperty({"信访基本信息", "被投诉二级机构"})
private String complainedSecondDepartName;
@NotBlank(message = "被投诉二级机构为空或与系统未匹配上")
private String complainedSecondDepartId;
private String involveSecondDepartName;
//
// 被投诉机构
@ExcelProperty({"信访基本信息", "被投诉所队"})
private String complainedThirdDepartName;
private String involveThirdDepartName;
private String complainedThirdDepartId;
@NotBlank(message = "涉及二级机构为空或与系统未匹配上")
private String involveSecondDepartId;
private String complainedDepartId;
private String involveThirdDepartId;
// 具体内容
@ExcelProperty({"信访基本信息", "具体内容"})

2
src/main/java/com/biutag/supervision/pojo/dto/NegativeDto.java

@ -18,6 +18,8 @@ public class NegativeDto {
private String id;
private String originId;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm")
private LocalDateTime happenTime;

9
src/main/java/com/biutag/supervision/pojo/entity/DataCaseVerif.java

@ -18,12 +18,12 @@ public class DataCaseVerif {
// 问题发现时间
@TableField("discovery_time")
@JsonFormat(pattern = "YYYY-MM-dd HH:mm")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm")
private LocalDateTime discoveryTime;
// 问题发生时间
@TableField("happen_time")
@JsonFormat(pattern = "YYYY-MM-dd HH:mm")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm")
private LocalDateTime happenTime;
// 问题来源
@ -54,6 +54,8 @@ public class DataCaseVerif {
@TableField("involve_depart_name")
private String involveDepartName;
private String involveDepartId;
// 事情简述
@TableField("thing_desc")
private String thingDesc;
@ -62,4 +64,7 @@ public class DataCaseVerif {
@TableField("create_time")
private LocalDateTime createTime;
// 分发状态
private String distributionState;
}

11
src/main/java/com/biutag/supervision/pojo/entity/DataPetitionComplaint.java

@ -62,14 +62,6 @@ public class DataPetitionComplaint {
@TableField("police_type_name")
private String policeTypeName;
// 被投诉机构ID
@TableField("complained_depart_id")
private String complainedDepartId;
// 被投诉机构
@TableField("complained_depart_name")
private String complainedDepartName;
// 具体内容
@TableField("thing_desc")
private String thingDesc;
@ -92,4 +84,7 @@ public class DataPetitionComplaint {
// 来源
private String problemSourcesCode;
// 分发状态
private String distributionState;
}

1
src/main/java/com/biutag/supervision/pojo/model/ModelClueModel.java

@ -33,7 +33,6 @@ public class ModelClueModel {
// 涉及人员警号
private String involvePoliceEmpNo;
// 预警内容
private String thingDesc;

15
src/main/java/com/biutag/supervision/pojo/param/DataCaseVerifQueryParam.java

@ -1,8 +1,23 @@
package com.biutag.supervision.pojo.param;
import lombok.Getter;
import lombok.Setter;
/**
* @author wxc
* @date 2024/10/15
*/
@Setter
@Getter
public class DataCaseVerifQueryParam extends BasePage {
private String originId;
private String responderKey;
private String responderValue;
private String thingDesc;
private String distributionState;
}

59
src/main/java/com/biutag/supervision/service/DataCaseVerifService.java

@ -1,28 +1,39 @@
package com.biutag.supervision.service;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.biutag.supervision.constants.enums.DataUpdateMethodEnum;
import com.biutag.supervision.constants.enums.DistributionStateEnum;
import com.biutag.supervision.constants.enums.HostLevelEnums;
import com.biutag.supervision.constants.enums.ProblemSourcesEnum;
import com.biutag.supervision.mapper.DataCaseVerifMapper;
import com.biutag.supervision.pojo.dto.DataCaseVerifImportDto;
import com.biutag.supervision.pojo.dto.DataPetitionComplaintAddDto;
import com.biutag.supervision.pojo.dto.DataPetitionComplaintImportDto;
import com.biutag.supervision.pojo.dto.DataCaseVerifDistribute;
import com.biutag.supervision.pojo.dto.NegativeDto;
import com.biutag.supervision.pojo.entity.DataCaseVerif;
import com.biutag.supervision.pojo.entity.DataPetitionComplaint;
import com.biutag.supervision.pojo.param.DataCaseVerifQueryParam;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.List;
@RequiredArgsConstructor
@Service
public class DataCaseVerifService extends ServiceImpl<DataCaseVerifMapper, DataCaseVerif> {
private final NegativeService negativeService;
public Page<DataCaseVerif> page(DataCaseVerifQueryParam queryParam) {
LambdaQueryWrapper<DataCaseVerif> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.orderByDesc(DataCaseVerif::getCreateTime);
queryWrapper.like(StrUtil.isNotBlank(queryParam.getOriginId()), DataCaseVerif::getOriginId, queryParam.getOriginId())
.like(StrUtil.isNotBlank(queryParam.getThingDesc()), DataCaseVerif::getThingDesc, queryParam.getThingDesc())
.eq(StrUtil.isNotBlank(queryParam.getDistributionState()), DataCaseVerif::getDistributionState, queryParam.getDistributionState())
.orderByDesc(DataCaseVerif::getCreateTime);
return page(Page.of(queryParam.getCurrent(), queryParam.getSize()), queryWrapper);
}
@ -39,9 +50,49 @@ public class DataCaseVerifService extends ServiceImpl<DataCaseVerifMapper, DataC
DataCaseVerif data = new DataCaseVerif();
BeanUtils.copyProperties(dto, data);
data.setCreateTime(now);
if (StrUtil.isBlank(dto.getInvolveThirdDepartId())) {
data.setInvolveDepartId(dto.getInvolveSecondDepartId());
data.setInvolveDepartName(dto.getInvolveSecondDepartName());
} else {
data.setInvolveDepartId(dto.getInvolveThirdDepartId());
data.setInvolveDepartName(dto.getInvolveThirdDepartName());
}
data.setDistributionState(DistributionStateEnum.UNDISTRIBUTED.getValue());
saveOrUpdate(data);
}
return true;
}
public boolean distribution(DataCaseVerifDistribute dataDistribute) {
dataDistribute.getData().forEach(item -> {
NegativeDto negativeDto = new NegativeDto();
negativeDto.setOriginId(item.getOriginId());
negativeDto.setHappenTime(item.getHappenTime());
negativeDto.setDiscoveryTime(item.getDiscoveryTime());
negativeDto.setProblemSourcesCode(ProblemSourcesEnum.A12389.getValue());
negativeDto.setProblemSources(ProblemSourcesEnum.A12389.getLabel());
// negativeDto.setBusinessTypeCode(BusinessTypeEnum.ABWW);
// negativeDto.setBusinessTypeName();
negativeDto.setResponderName(item.getResponderName());
negativeDto.setContactPhone(item.getResponderPhone());
negativeDto.setThingDesc(item.getThingDesc());
negativeDto.setInvolveDepartId(item.getInvolveDepartId());
negativeDto.setInvolveDepartName(item.getInvolveDepartName());
negativeDto.setHostLevel(HostLevelEnums.SECOND.getValue());
negativeDto.setApprovalFlow(dataDistribute.getApprovalFlow());
negativeDto.setDepartId(item.getInvolveDepartId());
negativeDto.setDepartName(item.getInvolveDepartName());
negativeDto.setTimeLimit(dataDistribute.getTimeLimit());
negativeDto.setMaxSignDuration(dataDistribute.getMaxSignDuration());
negativeDto.setMaxHandleDuration(dataDistribute.getMaxHandleDuration());
negativeDto.setMaxExtensionDuration(dataDistribute.getMaxExtensionDuration());
negativeDto.setCaseNumber(item.getOriginId());
negativeService.save(negativeDto);
update(new LambdaUpdateWrapper<DataCaseVerif>().eq(DataCaseVerif::getOriginId, item.getOriginId())
.set(DataCaseVerif::getDistributionState, DistributionStateEnum.DISTRIBUTED.getValue()));
});
return true;
}
}

52
src/main/java/com/biutag/supervision/service/DataPetitionComplaintService.java

@ -3,23 +3,29 @@ package com.biutag.supervision.service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.biutag.supervision.constants.enums.DataUpdateMethodEnum;
import com.biutag.supervision.constants.enums.DistributionStateEnum;
import com.biutag.supervision.constants.enums.HostLevelEnums;
import com.biutag.supervision.constants.enums.ProblemSourcesEnum;
import com.biutag.supervision.mapper.DataPetitionComplaintMapper;
import com.biutag.supervision.pojo.dto.DataPetitionComplaintAddDto;
import com.biutag.supervision.pojo.dto.DataPetitionComplaintDto;
import com.biutag.supervision.pojo.dto.DataPetitionComplaintImportDto;
import com.biutag.supervision.pojo.dto.*;
import com.biutag.supervision.pojo.entity.DataPetitionComplaint;
import com.biutag.supervision.pojo.param.DataPetitionComplaintQueryParam;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
@RequiredArgsConstructor
@Service
public class DataPetitionComplaintService extends ServiceImpl<DataPetitionComplaintMapper, DataPetitionComplaint> {
private final NegativeService negativeService;
public Page<DataPetitionComplaint> page(DataPetitionComplaintQueryParam queryParam) {
LambdaQueryWrapper<DataPetitionComplaint> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(DataPetitionComplaint::getProblemSourcesCode, queryParam.getProblemSourcesCode())
@ -61,12 +67,52 @@ public class DataPetitionComplaintService extends ServiceImpl<DataPetitionCompla
}
DataPetitionComplaint data = new DataPetitionComplaint();
BeanUtils.copyProperties(dto, data);
data.setCreateTime(now);
data.setUpdateTime(now);
data.setProblemSourcesCode(body.getProblemSourcesCode());
if (StrUtil.isBlank(dto.getInvolveThirdDepartId())) {
data.setInvolveDepartId(dto.getInvolveSecondDepartId());
data.setInvolveDepartName(dto.getInvolveSecondDepartName());
} else {
data.setInvolveDepartId(dto.getInvolveThirdDepartId());
data.setInvolveDepartName(dto.getInvolveThirdDepartName());
}
data.setDistributionState(DistributionStateEnum.UNDISTRIBUTED.getValue());
saveOrUpdate(data);
}
return true;
}
public boolean distribution(DataDataPetitionComplainDistribute dataDistribute) {
dataDistribute.getData().forEach(item -> {
NegativeDto negativeDto = new NegativeDto();
negativeDto.setOriginId(item.getOriginId());
negativeDto.setDiscoveryTime(item.getDiscoveryTime());
negativeDto.setProblemSourcesCode(item.getProblemSourcesCode());
negativeDto.setProblemSources(ProblemSourcesEnum.get(item.getProblemSourcesCode()).getLabel());
// negativeDto.setBusinessTypeCode(BusinessTypeEnum.ABWW);
// negativeDto.setBusinessTypeName();
negativeDto.setResponderName(item.getResponderName());
negativeDto.setContactPhone(item.getResponderPhone());
negativeDto.setThingDesc(item.getThingDesc());
negativeDto.setInvolveDepartId(item.getInvolveDepartId());
negativeDto.setInvolveDepartName(item.getInvolveDepartName());
negativeDto.setHostLevel(HostLevelEnums.SECOND.getValue());
negativeDto.setApprovalFlow(dataDistribute.getApprovalFlow());
negativeDto.setDepartId(item.getInvolveDepartId());
negativeDto.setDepartName(item.getInvolveDepartName());
negativeDto.setTimeLimit(dataDistribute.getTimeLimit());
negativeDto.setMaxSignDuration(dataDistribute.getMaxSignDuration());
negativeDto.setMaxHandleDuration(dataDistribute.getMaxHandleDuration());
negativeDto.setMaxExtensionDuration(dataDistribute.getMaxExtensionDuration());
negativeDto.setCaseNumber(item.getOriginId());
negativeService.save(negativeDto);
update(new LambdaUpdateWrapper<DataPetitionComplaint>().eq(DataPetitionComplaint::getOriginId, item.getOriginId())
.set(DataPetitionComplaint::getDistributionState, DistributionStateEnum.DISTRIBUTED.getValue()));
});
return true;
}
}

4
src/main/java/com/biutag/supervision/service/ModelClueService.java

@ -72,7 +72,7 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
}
public List<ModelClue> listByUnDistributed(Integer modelId) {
return list(new LambdaQueryWrapper<ModelClue>().eq(ModelClue::getModelId, modelId).eq(ModelClue::getDistributionState, ModelDistributionStateEnum.UNDISTRIBUTED.getValue()));
return list(new LambdaQueryWrapper<ModelClue>().eq(ModelClue::getModelId, modelId).eq(ModelClue::getDistributionState, DistributionStateEnum.UNDISTRIBUTED.getValue()));
}
public boolean distribution(ModelClueTaskDistribute taskDistribute) {
@ -143,7 +143,7 @@ public class ModelClueService extends ServiceImpl<ModelClueMapper, ModelClue> {
negativeService.save(negative);
item.setDistributionState(ModelDistributionStateEnum.DISTRIBUTED.getValue());
item.setDistributionState(DistributionStateEnum.DISTRIBUTED.getValue());
item.setUpdateTime(LocalDateTime.now());
item.setNegativeId(negative.getId());
updateById(item);

6
src/main/java/com/biutag/supervision/service/NegativeService.java

@ -131,8 +131,10 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
public boolean save(NegativeDto negativeDto) {
Negative negative = new Negative();
BeanUtil.copyProperties(negativeDto, negative);
String originId = generateOriginId(negativeDto.getProblemSourcesCode(), negativeDto.getBusinessTypeCode());
negative.setOriginId(originId);
if (StrUtil.isBlank(negativeDto.getOriginId())) {
String originId = generateOriginId(negativeDto.getProblemSourcesCode(), negativeDto.getBusinessTypeCode());
negative.setOriginId(originId);
}
LocalDateTime now = LocalDateTime.now();
negative.setId(IdUtil.getSnowflakeNextIdStr())
.setProcessingStatus(ProcessingStatusEnum.signing.name())

Loading…
Cancel
Save