Browse Source

修复:流程判断逻辑

zhongwei
ty 4 months ago
parent
commit
2199b22525
  1. 5
      hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmHandleFlowServiceImpl.java
  2. 2
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/consumer/StandardWorkTicketConsumer.java
  3. 2
      hzims-service/hzims-middle/src/main/resources/db/3.0.0.sql
  4. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/AccessPlanV4ServiceImpl.java
  5. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/AccessTaskV4ServiceImpl.java
  6. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/DefectCheckServiceImpl.java
  7. 10
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/feign/DutyRecClient.java
  8. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyMainMapper.xml
  9. 2
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/risk/service/impl/HazardTaskServiceImpl.java

5
hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/show/service/impl/AlarmHandleFlowServiceImpl.java

@ -2,6 +2,7 @@ package com.hnac.hzims.alarm.show.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference; import com.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hnac.hzims.alarm.config.constants.AlarmHandleConstant; import com.hnac.hzims.alarm.config.constants.AlarmHandleConstant;
import com.hnac.hzims.alarm.config.entity.AlarmHandleEntity; import com.hnac.hzims.alarm.config.entity.AlarmHandleEntity;
@ -64,7 +65,7 @@ public class AlarmHandleFlowServiceImpl extends ServiceImpl<AlarmHandleFlowMappe
} }
taskId = alarmHandleFlowEntity.getId(); taskId = alarmHandleFlowEntity.getId();
alarmHandleFlowEntity.setIsNormal(true); alarmHandleFlowEntity.setIsNormal(true);
if(700==processWorkFlowResponse.getCode()){ if(ObjectUtils.isNotEmpty(processWorkFlowResponse.getCode())&&700==processWorkFlowResponse.getCode()){
alarmHandleFlowEntity.setIsNormal(false); alarmHandleFlowEntity.setIsNormal(false);
alarmHandleFlowEntity.setRemark(JSONObject.toJSONString(processWorkFlowResponse.getVariables())); alarmHandleFlowEntity.setRemark(JSONObject.toJSONString(processWorkFlowResponse.getVariables()));
} }
@ -121,7 +122,7 @@ public class AlarmHandleFlowServiceImpl extends ServiceImpl<AlarmHandleFlowMappe
} }
this.updateById(alarmHandleFlowEntity); this.updateById(alarmHandleFlowEntity);
//推送消息中心相关消息 //推送消息中心相关消息
if(700!=processWorkFlowResponse.getCode()) { if(ObjectUtils.isEmpty(processWorkFlowResponse.getCode())||700!=processWorkFlowResponse.getCode()) {
sendMessage(processWorkFlowResponse, alarmHandleFlowEntity, taskId); sendMessage(processWorkFlowResponse, alarmHandleFlowEntity, taskId);
} }
log.info("告警消息转换结束" + processWorkFlowResponse); log.info("告警消息转换结束" + processWorkFlowResponse);

2
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/consumer/StandardWorkTicketConsumer.java

@ -48,7 +48,7 @@ public class StandardWorkTicketConsumer implements IQueueConsume {
Assert.isTrue(Func.isNotEmpty(response),() -> { Assert.isTrue(Func.isNotEmpty(response),() -> {
throw new ServiceException("消息转换失败,消息内容为:" + message); throw new ServiceException("消息转换失败,消息内容为:" + message);
}); });
if (700==response.getCode()){ if (ObjectUtils.isNotEmpty(response.getCode())&&700==response.getCode()){
ticketServiceList.get(0).pushFailMessage(Long.valueOf(response.getTaskId()),response.getBusinessKey(), ticketServiceList.get(0).pushFailMessage(Long.valueOf(response.getTaskId()),response.getBusinessKey(),
response.getUserId(), response.getTaskName(),response.getResult(),response.getDeptId()); response.getUserId(), response.getTaskName(),response.getResult(),response.getDeptId());
} }

2
hzims-service/hzims-middle/src/main/resources/db/3.0.0.sql

@ -1 +1,3 @@
INSERT INTO `process_dict`(`dict_code`, `dict_sort`, `dict_key`, `dict_value`, `dict_label`, `dict_type`, `is_default`, `status`, `create_dept`, `create_time`, `update_time`, `remark`) VALUES (15, 15, 'OperationTicketOffline', 'OperationTicketOffline', '线下操作票', '线下操作票', 'Y', 0, NULL, '2023-07-25 18:35:01', '2024-05-24 11:22:14', '线下操作票流程'); INSERT INTO `process_dict`(`dict_code`, `dict_sort`, `dict_key`, `dict_value`, `dict_label`, `dict_type`, `is_default`, `status`, `create_dept`, `create_time`, `update_time`, `remark`) VALUES (15, 15, 'OperationTicketOffline', 'OperationTicketOffline', '线下操作票', '线下操作票', 'Y', 0, NULL, '2023-07-25 18:35:01', '2024-05-24 11:22:14', '线下操作票流程');
ALTER TABLE `hzims_workflow_operation_log`
MODIFY COLUMN `fault_log` text CHARACTER SET utf8 NULL COMMENT '错误日志' AFTER `is_operation_log`;

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/AccessPlanV4ServiceImpl.java

@ -288,7 +288,7 @@ public class AccessPlanV4ServiceImpl implements AccessPlanV4Service, StartProces
// 流程阶段执行人员名称 // 流程阶段执行人员名称
entity.setNextStepOperator(processWorkFlowResponse.getNextStepOperator()); entity.setNextStepOperator(processWorkFlowResponse.getNextStepOperator());
entity.setIsNormal(true); entity.setIsNormal(true);
if(700==processWorkFlowResponse.getCode()){ if(ObjectUtils.isNotEmpty(processWorkFlowResponse.getCode())&&700==processWorkFlowResponse.getCode()){
entity.setIsNormal(false); entity.setIsNormal(false);
entity.setRemark(JSONObject.toJSONString(processWorkFlowResponse.getVariables())); entity.setRemark(JSONObject.toJSONString(processWorkFlowResponse.getVariables()));
} }
@ -316,7 +316,7 @@ public class AccessPlanV4ServiceImpl implements AccessPlanV4Service, StartProces
this.planService.updateById(entity); this.planService.updateById(entity);
this.saveAccessMaterial(entity); this.saveAccessMaterial(entity);
this.saveAccessContent(entity); this.saveAccessContent(entity);
if(700!=processWorkFlowResponse.getCode()){ if(ObjectUtils.isEmpty(processWorkFlowResponse.getCode())||700!=processWorkFlowResponse.getCode()){
this.sendMessage(entity,processWorkFlowResponse.getUserId(),content); this.sendMessage(entity,processWorkFlowResponse.getUserId(),content);
} }

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/service/impl/AccessTaskV4ServiceImpl.java

@ -236,7 +236,7 @@ public class AccessTaskV4ServiceImpl implements AccessTaskV4Service, StartProces
Map<String, Object> variables = (Map<String, Object>) processWorkFlowResponse.getVariables(); Map<String, Object> variables = (Map<String, Object>) processWorkFlowResponse.getVariables();
AccessTaskV4DTO entity = JSONObject.parseObject(JSONObject.toJSONString(variables), new TypeReference<AccessTaskV4DTO>(){}); AccessTaskV4DTO entity = JSONObject.parseObject(JSONObject.toJSONString(variables), new TypeReference<AccessTaskV4DTO>(){});
entity.setIsNormal(true); entity.setIsNormal(true);
if(700==processWorkFlowResponse.getCode()){ if(ObjectUtils.isNotEmpty(processWorkFlowResponse.getCode())&&700==processWorkFlowResponse.getCode()){
entity.setIsNormal(false); entity.setIsNormal(false);
entity.setRemark(JSONObject.toJSONString(processWorkFlowResponse.getVariables())); entity.setRemark(JSONObject.toJSONString(processWorkFlowResponse.getVariables()));
} }
@ -266,7 +266,7 @@ public class AccessTaskV4ServiceImpl implements AccessTaskV4Service, StartProces
String content = "您有一条检修任务待处理/审核,检修任务名称:".concat(entity.getName()) String content = "您有一条检修任务待处理/审核,检修任务名称:".concat(entity.getName())
.concat(",当前环节:") .concat(",当前环节:")
.concat(processWorkFlowResponse.getTaskName()); .concat(processWorkFlowResponse.getTaskName());
if(700!=processWorkFlowResponse.getCode()){ if(ObjectUtils.isEmpty(processWorkFlowResponse.getCode())||700!=processWorkFlowResponse.getCode()){
this.sendMessage(entity,processWorkFlowResponse.getUserId(),content); this.sendMessage(entity,processWorkFlowResponse.getUserId(),content);
} }
return true; return true;

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/DefectCheckServiceImpl.java

@ -378,7 +378,7 @@ public class DefectCheckServiceImpl extends ServiceImpl<OperPhenomenonMapper, Op
} }
//流程找不到下一个审批人处理 //流程找不到下一个审批人处理
if(700==processWorkFlowResponse.getCode()){ if(ObjectUtils.isNotEmpty(processWorkFlowResponse.getCode())&&700==processWorkFlowResponse.getCode()){
operPhenomenonEntity.setIsNormal(false); operPhenomenonEntity.setIsNormal(false);
operPhenomenonEntity.setRemark(JSONObject.toJSONString(processWorkFlowResponse.getVariables())); operPhenomenonEntity.setRemark(JSONObject.toJSONString(processWorkFlowResponse.getVariables()));
}else { }else {

10
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/feign/DutyRecClient.java

@ -2,21 +2,19 @@ package com.hnac.hzims.operational.duty.feign;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse; import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse;
import com.hnac.hzims.operational.duty.dto.ChangeShiftsReqDTO; import com.hnac.hzims.operational.duty.dto.ChangeShiftsReqDTO;
import com.hnac.hzims.operational.duty.dto.ChangeShiftsRspDTO; import com.hnac.hzims.operational.duty.dto.ChangeShiftsRspDTO;
import com.hnac.hzims.operational.duty.dto.ImsDutyRecDTO; import com.hnac.hzims.operational.duty.dto.ImsDutyRecDTO;
import com.hnac.hzims.operational.duty.service.IImsDutyRecService; import com.hnac.hzims.operational.duty.service.IImsDutyRecService;
import com.hnac.hzims.operational.duty.vo.ImsDutyRecVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.ObjectUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@ -42,7 +40,7 @@ public class DutyRecClient implements IDutyRecClient {
}); });
recDTO.setDealChain(processWorkFlowResponse.getTaskName()); recDTO.setDealChain(processWorkFlowResponse.getTaskName());
recDTO.setIsNormal(true); recDTO.setIsNormal(true);
if(700==processWorkFlowResponse.getCode()){ if(ObjectUtils.isNotEmpty(processWorkFlowResponse.getCode())&&700==processWorkFlowResponse.getCode()){
recDTO.setIsNormal(false); recDTO.setIsNormal(false);
recDTO.setRemark(JSONObject.toJSONString(processWorkFlowResponse.getVariables())); recDTO.setRemark(JSONObject.toJSONString(processWorkFlowResponse.getVariables()));
} }

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/mapper/ImsDutyMainMapper.xml

@ -220,7 +220,7 @@
LEFT JOIN hz_ims_duty_class_type DCT LEFT JOIN hz_ims_duty_class_type DCT
ON DC.CLASS_TYPE_ID = DCT.`ID` ON DC.CLASS_TYPE_ID = DCT.`ID`
where DM.is_deleted = 0 where DM.is_deleted = 0
<if test="id != null and id != ''"> <if test="preDutyId != null and preDutyId != ''">
and DM.PRE_DUTY_ID = #{preDutyId} and DM.PRE_DUTY_ID = #{preDutyId}
</if> </if>
limit 1 limit 1

2
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/risk/service/impl/HazardTaskServiceImpl.java

@ -233,7 +233,7 @@ public class HazardTaskServiceImpl extends ServiceImpl<HazardTaskMapper, HazardT
} }
entity.setIsNormal(true); entity.setIsNormal(true);
//流程找不到下一个审批人处理 //流程找不到下一个审批人处理
if(700==processWorkFlowResponse.getCode()){ if(ObjectUtils.isNotEmpty(processWorkFlowResponse.getCode())&&700==processWorkFlowResponse.getCode()){
entity.setIsNormal(false); entity.setIsNormal(false);
entity.setRemark(JSONObject.toJSONString(processWorkFlowResponse.getVariables())); entity.setRemark(JSONObject.toJSONString(processWorkFlowResponse.getVariables()));
} }

Loading…
Cancel
Save