算法模块删除不必要的代码,有备份,如果存疑就联系我
This commit is contained in:
@@ -249,6 +249,9 @@ public class QuitRunningDeviceServiceImpl extends ServiceImpl<QuitRunningDeviceM
|
||||
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
||||
QuitRunningDeviceVO quitRunningDeviceVO = this.getVOById(businessId);
|
||||
if(Objects.isNull(quitRunningDeviceVO)){
|
||||
return null;
|
||||
}
|
||||
bpmInstanceInfo.setHistoryInstanceId(quitRunningDeviceVO.getHistoryInstanceId());
|
||||
String sign = quitRunningDeviceVO.getGdName()
|
||||
.concat(StrPool.SLASH)
|
||||
|
||||
@@ -245,6 +245,9 @@ public class SupervisionDevMainReportPOServiceImpl extends ServiceImpl<Supervisi
|
||||
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
||||
SupervisionDevMainReportVO supervisionDevMainReportVO = this.querySurveyDetail(businessId);
|
||||
if(Objects.isNull(supervisionDevMainReportVO)){
|
||||
return null;
|
||||
}
|
||||
bpmInstanceInfo.setHistoryInstanceId(supervisionDevMainReportVO.getHistoryInstanceId());
|
||||
String sign = supervisionDevMainReportVO.getOrgName()
|
||||
.concat(StrPool.SLASH)
|
||||
|
||||
@@ -324,7 +324,7 @@ public class SupervisionTempLineDebugPOServiceImpl extends ServiceImpl<Supervisi
|
||||
.concat(supervisionTempLineDebugVO.getLineName());
|
||||
bpmInstanceInfo.setInstanceSign(sign);
|
||||
}
|
||||
return bpmInstanceInfo;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -216,7 +216,7 @@ public class SupervisionTempLineReportServiceImpl extends ServiceImpl<Supervisio
|
||||
.concat(supervisionTempLineReportVO.getLineName());
|
||||
bpmInstanceInfo.setInstanceSign(sign);
|
||||
}
|
||||
return bpmInstanceInfo;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -359,7 +359,7 @@ public class SupervisionTempLineRunTestServiceImpl extends ServiceImpl<Supervisi
|
||||
.concat(supervisionTempLineRunTestVO.getLineName());
|
||||
bpmInstanceInfo.setInstanceSign(sign);
|
||||
}
|
||||
return bpmInstanceInfo;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -91,14 +91,13 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
||||
private SupervisionUserComplaintPOService supervisionUserComplaintService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 不创建工作流,只是创建一个告警单,需要待用户反馈后才会进入流程
|
||||
*/
|
||||
@Override
|
||||
public String createLeaflet(String name, String deptId, String code, String id, Integer problemType, Integer leaflet, String issueDetail, String reformAdvice, String filePath) {
|
||||
WarningLeaflet one = this.lambdaQuery().eq(WarningLeaflet::getProblemId, id).one();
|
||||
if(Objects.isNull(one)){
|
||||
if (Objects.isNull(one)) {
|
||||
WarningLeaflet warningLeaflet = new WarningLeaflet();
|
||||
warningLeaflet.setLeafletName(name);
|
||||
warningLeaflet.setDeptId(deptId);
|
||||
@@ -115,7 +114,7 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
||||
warningLeaflet.setFilePath(filePath);
|
||||
this.baseMapper.insert(warningLeaflet);
|
||||
return warningLeaflet.getId();
|
||||
}else {
|
||||
} else {
|
||||
//新增字段整改意见
|
||||
one.setReformAdvice(reformAdvice);
|
||||
one.setDealState(DealStateEnum.UNSOLVED.getCode());
|
||||
@@ -130,7 +129,7 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
||||
@Override
|
||||
public Page<WarningLeafletVO> warningPageData(WarningLeafletParam.WarningLeafletQueryParam warningLeafletQueryParam) {
|
||||
QueryWrapper<WarningLeafletVO> warningLeafletVOQueryWrapper = new QueryWrapper<>();
|
||||
if (Objects.nonNull(warningLeafletQueryParam)&& StringUtils.equals(warningLeafletQueryParam.getDealState(),"1")) {
|
||||
if (Objects.nonNull(warningLeafletQueryParam) && StringUtils.equals(warningLeafletQueryParam.getDealState(), "1")) {
|
||||
//添加上时间范围
|
||||
warningLeafletVOQueryWrapper.between("supervision_warning_leaflet.Create_Time",
|
||||
DateUtil.beginOfDay(DateUtil.parse(warningLeafletQueryParam.getSearchBeginTime())),
|
||||
@@ -143,7 +142,7 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
||||
warningLeafletVOQueryWrapper.in("supervision_warning_leaflet.dept_id", deptIds);
|
||||
}
|
||||
warningLeafletVOQueryWrapper
|
||||
.eq(StringUtils.equals(warningLeafletQueryParam.getDealState(),"0"),"supervision_temp_line_run_test_warning.deal_state",0)
|
||||
.eq(StringUtils.equals(warningLeafletQueryParam.getDealState(), "0"), "supervision_temp_line_run_test_warning.deal_state", 0)
|
||||
.eq("supervision_warning_leaflet.state", DataStateEnum.ENABLE.getCode())
|
||||
.eq("supervision_warning_leaflet.leaflet_type", LeafletTypeEnum.WARNING.getCode())
|
||||
.orderByDesc("supervision_warning_leaflet.Update_Time");
|
||||
@@ -263,12 +262,12 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
||||
this.lambdaUpdate().set(WarningLeaflet::getStatus, status).eq(WarningLeaflet::getId, businessKey).update();
|
||||
WarningLeaflet one = this.lambdaQuery().eq(WarningLeaflet::getId, businessKey).one();
|
||||
//如果审核通过且problem_type不是在线监测的(1:技术监督管理;2:在线监测超标问题;3:用户投诉;4:现场测试超标),将对应能质量问题改成已解决,所有的预告警单改成已解决
|
||||
if(status==2&&one.getProblemType()!=2){
|
||||
if (status == 2 && one.getProblemType() != 2) {
|
||||
//多次的预告警单是删除
|
||||
this.lambdaUpdate().set(WarningLeaflet::getDealState, DealStateEnum.RESOLVED.getCode())
|
||||
.eq(WarningLeaflet::getId, businessKey)
|
||||
.eq(WarningLeaflet::getProblemId,one.getProblemId()).update();
|
||||
updatePowerProblem(one.getProblemType(),one.getProblemId());
|
||||
.eq(WarningLeaflet::getProblemId, one.getProblemId()).update();
|
||||
updatePowerProblem(one.getProblemType(), one.getProblemId());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,18 +275,18 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
||||
switch (problemType) {
|
||||
//技术监督计划
|
||||
case 1:
|
||||
surveyTestService.lambdaUpdate().set(SurveyTest::getDealState, DealStateEnum.RESOLVED.getCode())
|
||||
.eq(SurveyTest::getId,problemId).update();
|
||||
surveyTestService.lambdaUpdate().set(SurveyTest::getDealState, DealStateEnum.RESOLVED.getCode())
|
||||
.eq(SurveyTest::getId, problemId).update();
|
||||
break;
|
||||
//用户投诉问题
|
||||
case 3:
|
||||
supervisionUserComplaintService.lambdaUpdate().set(SupervisionUserComplaintPO::getDealState, DealStateEnum.RESOLVED.getCode())
|
||||
.eq(SupervisionUserComplaintPO::getId,problemId).update();
|
||||
.eq(SupervisionUserComplaintPO::getId, problemId).update();
|
||||
break;
|
||||
//试运行监测点问题
|
||||
//试运行监测点问题
|
||||
case 4:
|
||||
lineRunTestWarningService.lambdaUpdate().set(TempLineRunTestWarning::getDealState, DealStateEnum.RESOLVED.getCode())
|
||||
.eq(TempLineRunTestWarning::getId,problemId).update();
|
||||
.eq(TempLineRunTestWarning::getId, problemId).update();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -312,8 +311,9 @@ public class WarningLeafletServiceImpl extends ServiceImpl<WarningLeafletMapper,
|
||||
.concat(warningLeafletVO.getLeafletName())
|
||||
.concat(type);
|
||||
bpmInstanceInfo.setInstanceSign(sign);
|
||||
return bpmInstanceInfo;
|
||||
}
|
||||
return bpmInstanceInfo;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -73,7 +73,7 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
||||
private ISurveyTestService surveyTestService;
|
||||
|
||||
@Resource
|
||||
private DicDataFeignClient dicDataFeignClient;
|
||||
private DicDataFeignClient dicDataFeignClient;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -81,7 +81,7 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
||||
QueryWrapper<SurveyPlanVO> surveyPlanVOQueryWrapper = new QueryWrapper<>();
|
||||
if (Objects.nonNull(surveyPlanQueryParam)) {
|
||||
//添加上时间范围
|
||||
surveyPlanVOQueryWrapper.and(x->x.between("supervision_survey_plan.plan_start_time",
|
||||
surveyPlanVOQueryWrapper.and(x -> x.between("supervision_survey_plan.plan_start_time",
|
||||
DateUtil.beginOfDay(DateUtil.parse(surveyPlanQueryParam.getSearchBeginTime())),
|
||||
DateUtil.endOfDay(DateUtil.parse(surveyPlanQueryParam.getSearchEndTime()))).or().isNull("supervision_survey_plan.plan_start_time"));
|
||||
//根据工程名称模糊搜索
|
||||
@@ -94,14 +94,14 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
||||
surveyPlanVOQueryWrapper.in("supervision_survey_plan.dept_id", deptIds);
|
||||
}
|
||||
surveyPlanVOQueryWrapper
|
||||
.and(CollUtil.isNotEmpty(InstanceUtil.filterTaskStatus()),w -> w.in("supervision_survey_plan.status", InstanceUtil.filterTaskStatus())
|
||||
.and(CollUtil.isNotEmpty(InstanceUtil.filterTaskStatus()), w -> w.in("supervision_survey_plan.status", InstanceUtil.filterTaskStatus())
|
||||
.or()
|
||||
.eq("supervision_survey_plan.create_by", RequestUtil.getUserIndex())
|
||||
);
|
||||
if (Objects.nonNull(surveyPlanQueryParam.getStatus())) {
|
||||
surveyPlanVOQueryWrapper.in("supervision_survey_plan.status", surveyPlanQueryParam.getStatus());
|
||||
}
|
||||
surveyPlanVOQueryWrapper.eq(StringUtils.isNotBlank(surveyPlanQueryParam.getSupvType()),"supervision_survey_plan.supv_type",surveyPlanQueryParam.getSupvType());
|
||||
surveyPlanVOQueryWrapper.eq(StringUtils.isNotBlank(surveyPlanQueryParam.getSupvType()), "supervision_survey_plan.supv_type", surveyPlanQueryParam.getSupvType());
|
||||
}
|
||||
surveyPlanVOQueryWrapper.eq("supervision_survey_plan.state", DataStateEnum.ENABLE.getCode())
|
||||
.orderByDesc("supervision_survey_plan.Update_Time");
|
||||
@@ -119,8 +119,8 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
||||
String substation = record.getSubstation();
|
||||
//保存草稿时未选择电站判断
|
||||
|
||||
if(StringUtils.isNotEmpty(substation)){
|
||||
String[] subIds = substation.split(StrPool.COMMA);
|
||||
if (StringUtils.isNotEmpty(substation)) {
|
||||
String[] subIds = substation.split(StrPool.COMMA);
|
||||
|
||||
for (String subId : subIds) {
|
||||
String name = lineFeignClient.getSubstationInfo(subId).getData().getName();
|
||||
@@ -145,10 +145,10 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
||||
SurveyPlan surveyPlan = new SurveyPlan();
|
||||
BeanUtils.copyProperties(surveyPlanParam, surveyPlan);
|
||||
//设置状态
|
||||
if(Objects.equals(surveyPlanParam.getSaveOrCheckflag(),"1")){
|
||||
if (Objects.equals(surveyPlanParam.getSaveOrCheckflag(), "1")) {
|
||||
surveyPlan.setStatus(BpmTaskStatusEnum.WAIT.getStatus());
|
||||
|
||||
}else {
|
||||
} else {
|
||||
surveyPlan.setStatus(BpmTaskStatusEnum.RUNNING.getStatus());
|
||||
|
||||
}
|
||||
@@ -157,7 +157,7 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
||||
surveyPlan = this.baseMapper.selectById(surveyPlan.getId());
|
||||
|
||||
// 发起 BPM 流程
|
||||
if(Objects.equals(surveyPlanParam.getSaveOrCheckflag(),"2")){
|
||||
if (Objects.equals(surveyPlanParam.getSaveOrCheckflag(), "2")) {
|
||||
Map<String, Object> processInstanceVariables = new HashMap<>(16);
|
||||
BpmProcessInstanceCreateReqDTO bpmProcessInstanceCreateReqDTO = new BpmProcessInstanceCreateReqDTO();
|
||||
bpmProcessInstanceCreateReqDTO.setProcessDefinitionKey(SupervisionKeyEnum.SURVEY_PLAN.getKey());
|
||||
@@ -228,7 +228,7 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
||||
if (surveyPlan.getCustomSubstationFlag() == 0) {
|
||||
String substation = surveyPlan.getSubstation();
|
||||
//保存草稿时未选择电站判断
|
||||
if(StringUtils.isNotEmpty(substation)){
|
||||
if (StringUtils.isNotEmpty(substation)) {
|
||||
String[] subIds = substation.split(StrPool.COMMA);
|
||||
for (String subId : subIds) {
|
||||
SurveyTest surveyTest = new SurveyTest();
|
||||
@@ -262,14 +262,17 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
||||
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
||||
SurveyPlanVO surveyPlanVO = this.getVOById(businessId);
|
||||
if (Objects.isNull(surveyPlanVO)) {
|
||||
return null;
|
||||
}
|
||||
bpmInstanceInfo.setHistoryInstanceId(surveyPlanVO.getHistoryInstanceId());
|
||||
DictData data = dicDataFeignClient.getDicDataById(surveyPlanVO.getSupvType()).getData();
|
||||
String name = "未知监督类型";
|
||||
if(Objects.nonNull(data)){
|
||||
if (Objects.nonNull(data)) {
|
||||
name = data.getName();
|
||||
}
|
||||
String sign = name.concat("->")
|
||||
.concat(surveyPlanVO.getSupvObjectName());
|
||||
.concat(surveyPlanVO.getSupvObjectName());
|
||||
bpmInstanceInfo.setInstanceSign(sign);
|
||||
return bpmInstanceInfo;
|
||||
}
|
||||
@@ -285,7 +288,7 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
||||
.select(SurveyPlan::getProcessInstanceId);
|
||||
List<SurveyPlan> surveyPlanList = this.baseMapper.selectList(lambdaQueryWrapper);
|
||||
List<String> result = surveyPlanList.stream().map(SurveyPlan::getProcessInstanceId).collect(Collectors.toList());
|
||||
if(CollectionUtil.isNotEmpty(result)){
|
||||
if (CollectionUtil.isNotEmpty(result)) {
|
||||
rejectInstanceIds.addAll(result);
|
||||
}
|
||||
return rejectInstanceIds;
|
||||
@@ -305,11 +308,11 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
||||
//系统内变电站信息
|
||||
String substation = surveyPlanVO.getSubstation();
|
||||
//保存草稿时未选择电站判断
|
||||
if(StringUtils.isNotEmpty(substation)) {
|
||||
if (StringUtils.isNotEmpty(substation)) {
|
||||
String[] subIds = substation.split(StrPool.COMMA);
|
||||
for (String subId : subIds) {
|
||||
PollutionSubstationDTO data = lineFeignClient.getSubstationInfo(subId).getData();
|
||||
if(ObjectUtil.isNotNull(data)){
|
||||
if (ObjectUtil.isNotNull(data)) {
|
||||
SurveySubstation surveySubstation = new SurveySubstation();
|
||||
surveySubstation.setDataSource(0);
|
||||
surveySubstation.setSubstationName(data.getName());
|
||||
@@ -332,7 +335,7 @@ public class SurveyPlanServiceImpl extends ServiceImpl<SurveyPlanMapper, SurveyP
|
||||
@Override
|
||||
public Boolean deleteSurveyPlan(List<String> supervisionId) {
|
||||
List<SurveyPlan> surveyPlans = this.listByIds(supervisionId);
|
||||
if(CollUtil.isEmpty(surveyPlans)){
|
||||
if (CollUtil.isEmpty(surveyPlans)) {
|
||||
throw new BusinessException(SupervisionResponseEnum.EXISTENCE_OR_NOT);
|
||||
}
|
||||
//判断是否有权限操作
|
||||
|
||||
@@ -316,7 +316,7 @@ public class SurveyTestServiceImpl extends ServiceImpl<SurveyTestMapper, SurveyT
|
||||
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
||||
SurveyTestVO surveyTestVO = this.getVOById(businessId);
|
||||
if(Objects.isNull(surveyTestVO)){
|
||||
return bpmInstanceInfo;
|
||||
return null;
|
||||
}
|
||||
bpmInstanceInfo.setHistoryInstanceId(surveyTestVO.getHistoryInstanceId());
|
||||
DictData data = dicDataFeignClient.getDicDataById(surveyTestVO.getSupvType()).getData();
|
||||
|
||||
@@ -51,6 +51,7 @@ public class UserReportDeleteServiceImpl extends ServiceImpl<UserReportPOMapper,
|
||||
private final SupervisionTempLineReportService lineReportService;
|
||||
private final SupervisionTempLineDebugPOService lineDebugService;
|
||||
private final ISupervisionTempLineRunTestService lineRunTestService;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateProcessStatus(String businessId, Integer status) {
|
||||
@@ -80,7 +81,7 @@ public class UserReportDeleteServiceImpl extends ServiceImpl<UserReportPOMapper,
|
||||
List<SupervisionTempLineReport> lineList = lineReportService.list(new LambdaQueryWrapper<SupervisionTempLineReport>()
|
||||
.eq(SupervisionTempLineReport::getState, 0)
|
||||
.eq(SupervisionTempLineReport::getUserId, businessId));
|
||||
if(CollUtil.isNotEmpty(lineList)){
|
||||
if (CollUtil.isNotEmpty(lineList)) {
|
||||
List<String> lineIds = lineList.stream().map(SupervisionTempLineReport::getId).collect(Collectors.toList());
|
||||
//删除监测点绑定信息
|
||||
lineReportService.update(new LambdaUpdateWrapper<SupervisionTempLineReport>()
|
||||
@@ -105,11 +106,12 @@ public class UserReportDeleteServiceImpl extends ServiceImpl<UserReportPOMapper,
|
||||
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
||||
UserReportPO byId = this.getById(businessId);
|
||||
if(Objects.nonNull(byId)){
|
||||
if (Objects.nonNull(byId)) {
|
||||
bpmInstanceInfo.setHistoryInstanceId(byId.getHistoryInstanceId());
|
||||
bpmInstanceInfo.setInstanceSign(byId.getProjectName()+"信息删除");
|
||||
bpmInstanceInfo.setInstanceSign(byId.getProjectName() + "信息删除");
|
||||
return bpmInstanceInfo;
|
||||
}
|
||||
return bpmInstanceInfo;
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -156,7 +158,7 @@ public class UserReportDeleteServiceImpl extends ServiceImpl<UserReportPOMapper,
|
||||
UserReportPO po = this.getById(userReportParam.getId());
|
||||
if (ObjUtil.isNull(po)) {
|
||||
throw new BusinessException("当前信息不存在,请确认信息是否存在");
|
||||
}else{
|
||||
} else {
|
||||
if (Objects.equals(po.getStatus(), BpmTaskStatusEnum.APPROVE.getStatus())) {
|
||||
throw new BusinessException("当前流程以完成审批,无法重新发起");
|
||||
}
|
||||
|
||||
@@ -191,8 +191,9 @@ public class UserReportNormalServiceImpl extends ServiceImpl<UserReportNormalMap
|
||||
if (Objects.nonNull(userReportGoNet)) {
|
||||
bpmInstanceInfo.setHistoryInstanceId(userReportGoNet.getHistoryInstanceId());
|
||||
bpmInstanceInfo.setInstanceSign(userReportGoNet.getProjectName());
|
||||
return bpmInstanceInfo;
|
||||
}
|
||||
return bpmInstanceInfo;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -413,6 +413,9 @@ public class UserReportPOServiceImpl extends ServiceImpl<UserReportPOMapper, Use
|
||||
public BpmInstanceInfo getInstanceInfo(String businessId) {
|
||||
BpmInstanceInfo bpmInstanceInfo = new BpmInstanceInfo();
|
||||
UserReportPO userReportPO = this.getById(businessId);
|
||||
if(Objects.isNull(userReportPO)){
|
||||
return null;
|
||||
}
|
||||
bpmInstanceInfo.setHistoryInstanceId(userReportPO.getHistoryInstanceId());
|
||||
bpmInstanceInfo.setInstanceSign(userReportPO.getProjectName());
|
||||
return bpmInstanceInfo;
|
||||
|
||||
@@ -79,7 +79,7 @@ public class UserReportRenewalServiceImpl extends ServiceImpl<UserReportRenewalM
|
||||
bpmInstanceInfo.setInstanceSign(userReportPO.getUserReportMessageJson().getProjectName()+"信息更新");
|
||||
return bpmInstanceInfo;
|
||||
}
|
||||
return new BpmInstanceInfo();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user