liwen 7 months ago
parent
commit
3a3e718e2a
  1. 2
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.java
  2. 2
      hzims-service/operational/src/main/resources/db/2.0.3.sql
  3. 4
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java
  4. 44
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java

2
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/mapper/TaskMapper.java

@ -28,7 +28,9 @@ public interface TaskMapper extends UserDataScopeBaseMapper<TaskEntity> {
*/ */
List<TaskVo> getListPage(@Param("page") IPage<TaskVo> page, @Param("task") TaskListQuery task); List<TaskVo> getListPage(@Param("page") IPage<TaskVo> page, @Param("task") TaskListQuery task);
@UserDataAuth
List<TaskVo> getAllPageList(@Param("page") IPage<TaskVo> page, @Param("task") TaskDTO taskDTO); List<TaskVo> getAllPageList(@Param("page") IPage<TaskVo> page, @Param("task") TaskDTO taskDTO);
List<TaskVo> getAllExportList(@Param("task") TaskDTO taskDTO); List<TaskVo> getAllExportList(@Param("task") TaskDTO taskDTO);
List<TaskVo> mainQueryPage(@Param("page") IPage<TaskVo> page, @Param("task") TaskListQuery task); List<TaskVo> mainQueryPage(@Param("page") IPage<TaskVo> page, @Param("task") TaskListQuery task);

2
hzims-service/operational/src/main/resources/db/2.0.3.sql

@ -22,7 +22,7 @@ update hzims_oper_maintenance_plan t1,(
) t2 set t1.`EM_NAME` = t2.`EM_NAME` WHERE t1.`ID` = t2.`ID` and t1.`EM_NAME` is null; ) t2 set t1.`EM_NAME` = t2.`EM_NAME` WHERE t1.`ID` = t2.`ID` and t1.`EM_NAME` is null;
-- 更新日常维护任务设备名称 -- 更新日常维护任务设备名称
update hzims_oper_maintenance_task t1,( update hzims_oper_maintenance_task t1,(
select ml.`id`,ml.`EM_CODE`,GROUP_CONCAT(ei.`NAME`) EM_NAME from hzims_oper_maintenance_task ml,prod_hzims_equipment.hzims_em_info ei where ml.`IS_DELETED` = 0 and ei.`IS_DELETED` = 0 and FIND_IN_SET(ei.`NUMBER`,ml.`EM_CODE`) group by ml.`id`,ml.`EM_CODE` select ml.`id`,ml.`EM_CODE`,GROUP_CONCAT(ei.`NAME`) EM_NAME from hzims_oper_maintenance_task ml,equipment.hzims_em_info ei where ml.`IS_DELETED` = 0 and ei.`IS_DELETED` = 0 and FIND_IN_SET(ei.`NUMBER`,ml.`EM_CODE`) group by ml.`id`,ml.`EM_CODE`
) t2 set t1.`EM_NAME` = t2.`EM_NAME` WHERE t1.`ID` = t2.`ID` and t1.`EM_NAME` is null; ) t2 set t1.`EM_NAME` = t2.`EM_NAME` WHERE t1.`ID` = t2.`ID` and t1.`EM_NAME` is null;
-- 更新日常维护计划周期字段值 -- 更新日常维护计划周期字段值
update `hzims_oper_maintenance_plan` mp,`hzims_oper_maintenance_library` ml update `hzims_oper_maintenance_plan` mp,`hzims_oper_maintenance_library` ml

4
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java

@ -373,7 +373,9 @@ public class FirstWorkTicketServiceImpl extends BaseServiceImpl<WorkTicketInfoMa
params.put("isStart",workTicketInfoEntity.getIsStart() ? "☑" : "□"); params.put("isStart",workTicketInfoEntity.getIsStart() ? "☑" : "□");
// 许可人许可环节 // 许可人许可环节
if(ObjectUtil.isNotEmpty(workTicketInfoEntity.getLicenseTime())) { if(ObjectUtil.isNotEmpty(workTicketInfoEntity.getLicenseTime())) {
params.put("licensorName",Optional.ofNullable(workTicketInfoEntity.getLicensor()).map(UserCache::getUser).map(User::getName).orElse(null)); String licensorName = StringUtil.isNotBlank(workTicketInfoEntity.getLicensorName()) && Func.isNotEmpty(workTicketInfoEntity.getLicensorName()) ?
workTicketInfoEntity.getLicensorName() : Optional.ofNullable(workTicketInfoEntity.getLicensor()).map(UserCache::getUser).map(User::getName).orElse(null);
params.put("licensorName",licensorName);
params.put("principalName1",params.get("principalName")); params.put("principalName1",params.get("principalName"));
} }
WorkTicketFinish finish = workTicketFinishService.selectByTicketId(ticketId); WorkTicketFinish finish = workTicketFinishService.selectByTicketId(ticketId);

44
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java

@ -50,9 +50,7 @@ import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.log.logger.BladeLogger; import org.springblade.core.log.logger.BladeLogger;
import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.*;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.flow.core.entity.BladeFlow; import org.springblade.flow.core.entity.BladeFlow;
import org.springblade.flow.core.feign.IFlowClient; import org.springblade.flow.core.feign.IFlowClient;
import org.springblade.system.feign.ISysClient; import org.springblade.system.feign.ISysClient;
@ -529,7 +527,7 @@ public class TicketProcessServiceImpl implements TicketProcessService {
return true; return true;
} }
workTicket.setProcessInstanceId(response.getProcessInstanceId()); workTicket.setProcessInstanceId(response.getProcessInstanceId());
this.saveWorkTicket(workTicket,response); this.fillCurrentFlowName(workTicket,response);
firstWorkTicketService.updateById(workTicket); firstWorkTicketService.updateById(workTicket);
List<WorkTicketSafetyMeasureEntity> safetyMeasuresList = workTicketVo.getSafetyMeasuresList(); List<WorkTicketSafetyMeasureEntity> safetyMeasuresList = workTicketVo.getSafetyMeasuresList();
if(CollectionUtil.isNotEmpty(safetyMeasuresList)) { if(CollectionUtil.isNotEmpty(safetyMeasuresList)) {
@ -643,7 +641,43 @@ public class TicketProcessServiceImpl implements TicketProcessService {
} }
} }
/**
* 填充工作票当前流程环节名称
* @param workTicket 工作票
* @param response redis订阅消息
* @return 当前流程环节名称
*/
private void fillCurrentFlowName(WorkTicketInfoEntity workTicket, ProcessWorkFlowResponse response) {
String taskId = response.getTaskId();
Object variablesObj = response.getVariables();
JSONObject variable = JSONObject.parseObject(JSON.toJSONString(variablesObj));
Boolean signFlag = Func.isNotEmpty(variable.getBoolean("signFlag")) ? variable.getBoolean("signFlag") : true;
Boolean receiveFlag = Func.isNotEmpty(variable.getBoolean("recieveFlag")) ? variable.getBoolean("recieveFlag") : true;
if(StringUtil.isNotBlank(taskId)) {
workTicket.setFlowUserId(response.getUserId());
workTicket.setNextStepOperator(response.getNextStepOperator());
String flowDescription = "审批中,当前环节是".concat(response.getTaskName()).concat(",待").concat(response.getNextStepOperator()).concat("审批");
workTicket.setFlowDescription(flowDescription);
workTicket.setFlowTaskId(taskId);
workTicket.setFlowTaskName(response.getTaskName());
}
else if(!signFlag || !receiveFlag ) {
// 作废
workTicket.setFlowDescription("作废");
workTicket.setFlowTaskName("作废");
workTicket.setNextStepOperator(null);
workTicket.setStepOperator(null);
}
else {
// 结束
workTicket.setFlowDescription("结束");
workTicket.setFlowTaskName("结束");
workTicket.setNextStepOperator(null);
workTicket.setStepOperator(null);
workTicket.setFlowStatus(999);
workTicket.setImplementStatus("3");
}
}
/** /**
* 获取描述信息 * 获取描述信息
* *

Loading…
Cancel
Save