Browse Source

修改安全器bug

zhongwei
段飞宇 2 years ago
parent
commit
f0492e5018
  1. 3
      hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IMessageClient.java
  2. 32
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/entity/WorkTicketInfoEntity.java
  3. 7
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/template/abstracts/TemplateAbstractService.java
  4. 1
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/template/serviceimpl/MaintenanceTempleServiceImpl.java
  5. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/response/ProcessWorkFlowResponse.java
  6. 32
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/TicketProcessController.java
  7. 1
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/entity/WorkTicketFinish.java
  8. 14
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/flowprocess/constant/TicketProcessConstant.java
  9. 31
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/flowprocess/service/TicketProcessService.java
  10. 154
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/flowprocess/serviceimpl/oneserviceImpl/OneMakeProcessServiceImpl.java
  11. 126
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/flowprocess/serviceimpl/oneserviceImpl/OnePrincipalProcessServiceImpl.java
  12. 124
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/flowprocess/serviceimpl/oneserviceImpl/OneReceptionProcessServiceImpl.java
  13. 127
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/flowprocess/serviceimpl/oneserviceImpl/OneSafetyProcessServiceImpl.java
  14. 125
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/flowprocess/serviceimpl/oneserviceImpl/OneSignProcessServiceImpl.java
  15. 6
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/IWorkTicketFinishService.java
  16. 8
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/TicketProcessService.java
  17. 489
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java
  18. 17
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/WorkTicketFinishServiceImpl.java
  19. 31
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/process/FristWorkTicketVo.java
  20. 18
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/process/WorkTicketVo.java
  21. 7
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketContentService.java
  22. 8
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketDelayService.java
  23. 11
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketInfoService.java
  24. 7
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketOperateTimeService.java
  25. 8
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketPrincipalChangeService.java
  26. 7
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketSafetyMeasureService.java
  27. 16
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketContentServiceImpl.java
  28. 16
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketDelayServiceImpl.java
  29. 166
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java
  30. 16
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketOperateTimeServiceImpl.java
  31. 16
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketPrincipalChangeServiceImpl.java
  32. 16
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketSafetyMeasureServiceImpl.java
  33. 59
      hzims-service/ticket/src/main/resources/file/新工作票.bpmn20.xml
  34. BIN
      hzims-service/ticket/src/main/resources/template/新电气第一种工作票模板.xlsx

3
hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IMessageClient.java

@ -20,8 +20,7 @@ import javax.annotation.Resource;
* @author hx
*/
@FeignClient(
value = MessageConstants.APP_NAME,
fallback = MessageClientFallback.class
value = MessageConstants.APP_NAME
)
public interface IMessageClient {
String API_PREFIX = "/feign/message";

32
hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/entity/WorkTicketInfoEntity.java

@ -386,8 +386,40 @@ public class WorkTicketInfoEntity extends TenantEntity implements Serializable {
private LocalDateTime confirmDateTime;
/**
* 签发人审核时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime issuerReviewDateTime;
/**
* 签发人签发是否通过
*/
@ApiModelProperty("签发人签发是否通过")
private Boolean signFlag;
/**
* 运行人员是否通过
*/
@ApiModelProperty("运行人员是否通过")
private Boolean recieveFlag;
/**
* 工作确认是否通过 delay 工作票延期 transfe 工作票转移 true 通过
*/
@ApiModelProperty("工作确认是否通过 (delay 工作票延期 transfe 工作票转移 true 通过 )")
private String flag;
}

7
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/template/abstracts/TemplateAbstractService.java

@ -5,6 +5,8 @@ import com.hnac.hzims.message.fegin.IMessageClient;
import com.hnac.hzims.safeproduct.template.service.TemplateService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.tool.api.R;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.Resource;
@ -41,7 +43,10 @@ public abstract class TemplateAbstractService implements TemplateService {
*/
private void saveData(PlanMsgRecordDto list) {
log.info("正在保存推送的数据");
messageClient.planSendMessage(list);
R<PlanMsgRecordDto> planMsgRecordDtoR = messageClient.planSendMessage(list);
if (planMsgRecordDtoR.isSuccess()) {
throw new ServiceException(planMsgRecordDtoR.getMsg());
}
}

1
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/template/serviceimpl/MaintenanceTempleServiceImpl.java

@ -41,6 +41,7 @@ public class MaintenanceTempleServiceImpl extends TemplateAbstractService {
// planMsgRecord.setContent(JSON.toJSONString(map));
planMsgRecord.setSmsParam(JSON.toJSONString(map));
planMsgRecord.setResourceCode("aliyun-safeTool-push");
planMsgRecord.setContent(JSON.toJSONString(map));
return planMsgRecord;
}

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/response/ProcessWorkFlowResponse.java

@ -48,6 +48,6 @@ public class ProcessWorkFlowResponse implements Serializable {
/**票据表单**/
private String variables;
private Object variables;
}

32
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/TicketProcessController.java

@ -1,18 +1,24 @@
package com.hnac.hzims.ticket.twoTicket.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.ticket.twoTicket.service.TicketProcessService;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.api.R;
import org.springblade.flow.core.entity.BladeFlow;
import org.springblade.flow.core.feign.IFlowClient;
import org.springblade.flow.core.vo.ComleteTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 工作票
@ -29,8 +35,10 @@ import org.springframework.web.bind.annotation.RestController;
public class TicketProcessController {
@Autowired
private TicketProcessService ticketProcessService;
private final TicketProcessService ticketProcessService;
/**
@ -45,5 +53,17 @@ public class TicketProcessController {
}
/**
* 预览
* @param ticketType
* @param ticketId
*/
@GetMapping("/preview")
@ApiOperation(value = "预览")
@ApiOperationSupport(order = 11)
public void preview(@RequestParam @ApiParam("票据类型") String ticketType, @RequestParam @ApiParam("票据ID") Long ticketId) {
ticketProcessService.preview(ticketType,ticketId);
}
}

1
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/entity/WorkTicketFinish.java

@ -144,3 +144,4 @@ public class WorkTicketFinish implements Serializable {
}

14
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/flowprocess/constant/TicketProcessConstant.java

@ -0,0 +1,14 @@
package com.hnac.hzims.ticket.twoTicket.flowprocess.constant;
/**
* 开票常量类
*
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/4/8 10:53
*/
public class TicketProcessConstant {
public final static String WORKTICKET = "workTicket";
}

31
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/flowprocess/service/TicketProcessService.java

@ -0,0 +1,31 @@
package com.hnac.hzims.ticket.twoTicket.flowprocess.service;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.twoTicket.enums.FlowWorkTicketConstants;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/5/5 8:21
*/
public interface TicketProcessService {
/**
* 判断状态
* @param processDefinitionKey
* @param enumByStatus
* @return
*/
Boolean isStatus(String processDefinitionKey, FlowWorkTicketConstants enumByStatus);
/**
* 执行业务
* @param response
* @param workTicketVo
*/
void execute(ProcessWorkFlowResponse response, WorkTicketVo workTicketVo);
}

154
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/flowprocess/serviceimpl/oneserviceImpl/OneMakeProcessServiceImpl.java

@ -0,0 +1,154 @@
package com.hnac.hzims.ticket.twoTicket.flowprocess.serviceimpl.oneserviceImpl;
import com.hnac.hzims.operational.access.entity.OperAccessTaskEntity;
import com.hnac.hzims.operational.access.feign.IOperAccessTaskClient;
import com.hnac.hzims.operational.feign.IAccessTaskClient;
import com.hnac.hzims.operational.maintenance.dto.OperMaintenanceTaskDTO;
import com.hnac.hzims.operational.maintenance.feign.ITaskClient;
import com.hnac.hzims.operational.station.feign.IStationClient;
import com.hnac.hzims.ticket.constants.TicketConstants;
import com.hnac.hzims.ticket.processflow.strategy.core.ProcessIdWorker;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.twoTicket.enums.FlowWorkTicketConstants;
import com.hnac.hzims.ticket.twoTicket.flowprocess.service.TicketProcessService;
import com.hnac.hzims.ticket.twoTicket.service.IFirstWorkTicketService;
import com.hnac.hzims.ticket.twoTicket.service.IWorkTicketFinishService;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketContentService;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketInfoService;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketPrincipalChangeService;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketSafetyMeasureService;
import com.hnac.hzims.ticket.workTicket.service.impl.WorkTicketDelayServiceImpl;
import com.hnac.hzims.ticket.workTicket.service.impl.WorkTicketOperateTimeServiceImpl;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.utils.Func;
import org.springblade.flow.core.feign.IFlowClient;
import org.springblade.system.user.feign.IUserClient;
import org.springframework.stereotype.Service;
import static com.hnac.hzims.ticket.twoTicket.enums.FlowWorkTicketConstants.START;
import static com.hnac.hzims.ticket.twoTicket.flowprocess.constant.TicketProcessConstant.WORKTICKET;
/**
* 开票
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/5/5 8:36
*/
@Service
@Slf4j
@RequiredArgsConstructor
public class OneMakeProcessServiceImpl implements TicketProcessService {
private final IFlowClient flowClient;
private final IWorkTicketInfoService workTicketInfoService;
private final ProcessIdWorker processIdWorker;
private final IFirstWorkTicketService firstWorkTicketService;
private final IWorkTicketSafetyMeasureService workTicketSafetyMeasureService;
private final IWorkTicketContentService contentService;
private final IUserClient userClient;
private final IOperAccessTaskClient operAccessTaskClient;
private final ITaskClient taskClient;
private final IAccessTaskClient accessTaskClient;
private String newFirstWorkTicketFlowKey = "workTicket";
private final IStationClient stationClient;
private final WorkTicketOperateTimeServiceImpl workTicketOperateTimeServiceImpl;
private final IWorkTicketFinishService workTicketFinishService;
private final WorkTicketDelayServiceImpl workTicketDelayService;
private final IWorkTicketPrincipalChangeService workTicketPrincipalChangeService;
/**
* 判断状态
* @param processDefinitionKey
* @param enumByStatus
* @return
*/
@Override
public Boolean isStatus(String processDefinitionKey, FlowWorkTicketConstants enumByStatus) {
if (WORKTICKET.equals(processDefinitionKey) && START.equals(enumByStatus)){
log.info("执行开票业务成功,正准备处理开票业务逻辑~~~~");
return true;
}
log.error("执行开票业务出错~~~");
return false;
}
/**
* 执行业务
* @param response
* @param workTicketVo
*/
@Override
public void execute(ProcessWorkFlowResponse response, WorkTicketVo workTicketVo) {
WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket();
workTicket.setProcessInstanceId(response.getProcessInstanceId());
workTicket.setFlowStatus(FlowWorkTicketConstants.SIGN.getStatus());
workTicket.setFlowDescription(FlowWorkTicketConstants.SIGN.getDescription());
//保存工作流实例ID
workTicketInfoService.updateById(workTicket);
//处理来源任务
this.returnTicket(workTicketVo);
}
/**
* 处理来源任务
*
* @param workTicketVo
*/
private void returnTicket(WorkTicketVo workTicketVo) {
WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket();
if (TicketConstants.TaskTypeEnum.JXRW.getType().equals(workTicket.getTaskType())) {
OperAccessTaskEntity taskEntity = new OperAccessTaskEntity();
taskEntity.setId(workTicket.getTaskId());
taskEntity.setTicketId(workTicket.getId());
operAccessTaskClient.updateById(taskEntity);
}
if (TicketConstants.TaskTypeEnum.RCWH.getType().equals(workTicket.getTaskType())) {
OperMaintenanceTaskDTO dto = new OperMaintenanceTaskDTO();
dto.setId(workTicket.getTaskId());
dto.setTicketId(workTicket.getId());
taskClient.doUpdateTaskById(dto);
}
//消缺流程进行
if ((TicketConstants.TaskTypeEnum.JXRW.getType().equals(workTicket.getTaskType()) || TicketConstants.TaskTypeEnum.JXJH.getType().equals(workTicket.getTaskType())) && Func.isNotEmpty(workTicket.getTaskId())) {
accessTaskClient.billing(workTicket.getTaskId());
}
}
}

126
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/flowprocess/serviceimpl/oneserviceImpl/OnePrincipalProcessServiceImpl.java

@ -0,0 +1,126 @@
package com.hnac.hzims.ticket.twoTicket.flowprocess.serviceimpl.oneserviceImpl;
import com.hnac.hzims.operational.access.feign.IOperAccessTaskClient;
import com.hnac.hzims.operational.feign.IAccessTaskClient;
import com.hnac.hzims.operational.maintenance.feign.ITaskClient;
import com.hnac.hzims.operational.station.feign.IStationClient;
import com.hnac.hzims.ticket.processflow.strategy.core.ProcessIdWorker;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.twoTicket.enums.FlowWorkTicketConstants;
import com.hnac.hzims.ticket.twoTicket.flowprocess.service.TicketProcessService;
import com.hnac.hzims.ticket.twoTicket.service.IFirstWorkTicketService;
import com.hnac.hzims.ticket.twoTicket.service.IWorkTicketFinishService;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketContentService;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketInfoService;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketPrincipalChangeService;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketSafetyMeasureService;
import com.hnac.hzims.ticket.workTicket.service.impl.WorkTicketDelayServiceImpl;
import com.hnac.hzims.ticket.workTicket.service.impl.WorkTicketOperateTimeServiceImpl;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.flow.core.feign.IFlowClient;
import org.springblade.system.user.feign.IUserClient;
import org.springframework.stereotype.Service;
import static com.hnac.hzims.ticket.twoTicket.enums.FlowWorkTicketConstants.*;
import static com.hnac.hzims.ticket.twoTicket.flowprocess.constant.TicketProcessConstant.WORKTICKET;
/**
* 工作负责人确认安全措施
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/5/5 8:36
*/
@Service
@Slf4j
@RequiredArgsConstructor
public class OnePrincipalProcessServiceImpl implements TicketProcessService {
private final IFlowClient flowClient;
private final IWorkTicketInfoService workTicketInfoService;
private final ProcessIdWorker processIdWorker;
private final IFirstWorkTicketService firstWorkTicketService;
private final IWorkTicketSafetyMeasureService workTicketSafetyMeasureService;
private final IWorkTicketContentService contentService;
private final IUserClient userClient;
private final IOperAccessTaskClient operAccessTaskClient;
private final ITaskClient taskClient;
private final IAccessTaskClient accessTaskClient;
private String newFirstWorkTicketFlowKey = "workTicket";
private final IStationClient stationClient;
private final WorkTicketOperateTimeServiceImpl workTicketOperateTimeServiceImpl;
private final IWorkTicketFinishService workTicketFinishService;
private final WorkTicketDelayServiceImpl workTicketDelayService;
private final IWorkTicketPrincipalChangeService workTicketPrincipalChangeService;
/**
* 判断状态
* @param processDefinitionKey
* @param enumByStatus
* @return
*/
@Override
public Boolean isStatus(String processDefinitionKey, FlowWorkTicketConstants enumByStatus) {
if (WORKTICKET.equals(processDefinitionKey) && PRINCIPAL_CONFIRM_MEASURE.equals(enumByStatus)){
log.info("执行运行人员布置安全措施业务成功,正准备处理签发人签发业务逻辑~~~~");
return true;
}
log.error("执行运行人员布置安全措施业务出错~~~");
return false;
}
/**
* 执行业务
* @param response
* @param workTicketVo
*/
@Override
public void execute(ProcessWorkFlowResponse response, WorkTicketVo workTicketVo) {
WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket();
//负责人确认时间
//workTicket.setConfirmDateTime(workTicketVo.getWorkTicket().getConfirmDateTime());
workTicket.setFlowStatus(PRINCIPAL_CONFIRM_MEASURE.getStatus());
workTicket.setFlowDescription(PRINCIPAL_CONFIRM_MEASURE.getDescription());
//更新状态值
workTicketInfoService.updateById(workTicket);
}
}

124
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/flowprocess/serviceimpl/oneserviceImpl/OneReceptionProcessServiceImpl.java

@ -0,0 +1,124 @@
package com.hnac.hzims.ticket.twoTicket.flowprocess.serviceimpl.oneserviceImpl;
import com.hnac.hzims.operational.access.feign.IOperAccessTaskClient;
import com.hnac.hzims.operational.feign.IAccessTaskClient;
import com.hnac.hzims.operational.maintenance.feign.ITaskClient;
import com.hnac.hzims.operational.station.feign.IStationClient;
import com.hnac.hzims.ticket.processflow.strategy.core.ProcessIdWorker;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.twoTicket.enums.FlowWorkTicketConstants;
import com.hnac.hzims.ticket.twoTicket.flowprocess.service.TicketProcessService;
import com.hnac.hzims.ticket.twoTicket.service.IFirstWorkTicketService;
import com.hnac.hzims.ticket.twoTicket.service.IWorkTicketFinishService;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketContentService;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketInfoService;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketPrincipalChangeService;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketSafetyMeasureService;
import com.hnac.hzims.ticket.workTicket.service.impl.WorkTicketDelayServiceImpl;
import com.hnac.hzims.ticket.workTicket.service.impl.WorkTicketOperateTimeServiceImpl;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.flow.core.feign.IFlowClient;
import org.springblade.system.user.feign.IUserClient;
import org.springframework.stereotype.Service;
import static com.hnac.hzims.ticket.twoTicket.enums.FlowWorkTicketConstants.RECEIVE;
import static com.hnac.hzims.ticket.twoTicket.enums.FlowWorkTicketConstants.START;
import static com.hnac.hzims.ticket.twoTicket.flowprocess.constant.TicketProcessConstant.WORKTICKET;
/**
* 运功人接收
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/5/5 8:36
*/
@Service
@Slf4j
@RequiredArgsConstructor
public class OneReceptionProcessServiceImpl implements TicketProcessService {
private final IFlowClient flowClient;
private final IWorkTicketInfoService workTicketInfoService;
private final ProcessIdWorker processIdWorker;
private final IFirstWorkTicketService firstWorkTicketService;
private final IWorkTicketSafetyMeasureService workTicketSafetyMeasureService;
private final IWorkTicketContentService contentService;
private final IUserClient userClient;
private final IOperAccessTaskClient operAccessTaskClient;
private final ITaskClient taskClient;
private final IAccessTaskClient accessTaskClient;
private String newFirstWorkTicketFlowKey = "workTicket";
private final IStationClient stationClient;
private final WorkTicketOperateTimeServiceImpl workTicketOperateTimeServiceImpl;
private final IWorkTicketFinishService workTicketFinishService;
private final WorkTicketDelayServiceImpl workTicketDelayService;
private final IWorkTicketPrincipalChangeService workTicketPrincipalChangeService;
/**
* 判断状态
* @param processDefinitionKey
* @param enumByStatus
* @return
*/
@Override
public Boolean isStatus(String processDefinitionKey, FlowWorkTicketConstants enumByStatus) {
if (WORKTICKET.equals(processDefinitionKey) && RECEIVE.equals(enumByStatus)){
log.info("执行签发人签发业务成功,正准备处理签发人签发业务逻辑~~~~");
return true;
}
log.error("执行签发人签发业务出错~~~");
return false;
}
/**
* 执行业务
* @param response
* @param workTicketVo
*/
@Override
public void execute(ProcessWorkFlowResponse response, WorkTicketVo workTicketVo) {
WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket();
workTicket.setFlowStatus(FlowWorkTicketConstants.FIX_UP.getStatus());
workTicket.setFlowDescription(FlowWorkTicketConstants.FIX_UP.getDescription());
//更新状态值
workTicketInfoService.updateById(workTicket);
}
}

127
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/flowprocess/serviceimpl/oneserviceImpl/OneSafetyProcessServiceImpl.java

@ -0,0 +1,127 @@
package com.hnac.hzims.ticket.twoTicket.flowprocess.serviceimpl.oneserviceImpl;
import com.hnac.hzims.operational.access.feign.IOperAccessTaskClient;
import com.hnac.hzims.operational.feign.IAccessTaskClient;
import com.hnac.hzims.operational.maintenance.feign.ITaskClient;
import com.hnac.hzims.operational.station.feign.IStationClient;
import com.hnac.hzims.ticket.processflow.strategy.core.ProcessIdWorker;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.twoTicket.enums.FlowWorkTicketConstants;
import com.hnac.hzims.ticket.twoTicket.flowprocess.service.TicketProcessService;
import com.hnac.hzims.ticket.twoTicket.service.IFirstWorkTicketService;
import com.hnac.hzims.ticket.twoTicket.service.IWorkTicketFinishService;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketContentService;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketInfoService;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketPrincipalChangeService;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketSafetyMeasureService;
import com.hnac.hzims.ticket.workTicket.service.impl.WorkTicketDelayServiceImpl;
import com.hnac.hzims.ticket.workTicket.service.impl.WorkTicketOperateTimeServiceImpl;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.flow.core.feign.IFlowClient;
import org.springblade.system.user.feign.IUserClient;
import org.springframework.stereotype.Service;
import static com.hnac.hzims.ticket.twoTicket.enums.FlowWorkTicketConstants.FIX_UP;
import static com.hnac.hzims.ticket.twoTicket.enums.FlowWorkTicketConstants.START;
import static com.hnac.hzims.ticket.twoTicket.flowprocess.constant.TicketProcessConstant.WORKTICKET;
/**
* 运行人员布置安全措施
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/5/5 8:36
*/
@Service
@Slf4j
@RequiredArgsConstructor
public class OneSafetyProcessServiceImpl implements TicketProcessService {
private final IFlowClient flowClient;
private final IWorkTicketInfoService workTicketInfoService;
private final ProcessIdWorker processIdWorker;
private final IFirstWorkTicketService firstWorkTicketService;
private final IWorkTicketSafetyMeasureService workTicketSafetyMeasureService;
private final IWorkTicketContentService contentService;
private final IUserClient userClient;
private final IOperAccessTaskClient operAccessTaskClient;
private final ITaskClient taskClient;
private final IAccessTaskClient accessTaskClient;
private String newFirstWorkTicketFlowKey = "workTicket";
private final IStationClient stationClient;
private final WorkTicketOperateTimeServiceImpl workTicketOperateTimeServiceImpl;
private final IWorkTicketFinishService workTicketFinishService;
private final WorkTicketDelayServiceImpl workTicketDelayService;
private final IWorkTicketPrincipalChangeService workTicketPrincipalChangeService;
/**
* 判断状态
* @param processDefinitionKey
* @param enumByStatus
* @return
*/
@Override
public Boolean isStatus(String processDefinitionKey, FlowWorkTicketConstants enumByStatus) {
if (WORKTICKET.equals(processDefinitionKey) && FIX_UP.equals(enumByStatus)){
log.info("执行运行人员布置安全措施业务成功,正准备处理签发人签发业务逻辑~~~~");
return true;
}
log.error("执行运行人员布置安全措施业务出错~~~");
return false;
}
/**
* 执行业务
* @param response
* @param workTicketVo
*/
@Override
public void execute(ProcessWorkFlowResponse response, WorkTicketVo workTicketVo) {
WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket();
//值班负责人
workTicket.setWatchPrincipal(workTicketVo.getWorkTicket().getPrincipal());
workTicket.setWatchPrincipalEndTime(workTicketVo.getWorkTicket().getWatchPrincipalEndTime());
workTicket.setFlowStatus(FlowWorkTicketConstants.PRINCIPAL_CONFIRM_MEASURE.getStatus());
workTicket.setFlowDescription(FlowWorkTicketConstants.PRINCIPAL_CONFIRM_MEASURE.getDescription());
//更新状态值
workTicketInfoService.updateById(workTicket);
}
}

125
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/flowprocess/serviceimpl/oneserviceImpl/OneSignProcessServiceImpl.java

@ -0,0 +1,125 @@
package com.hnac.hzims.ticket.twoTicket.flowprocess.serviceimpl.oneserviceImpl;
import com.hnac.hzims.operational.access.feign.IOperAccessTaskClient;
import com.hnac.hzims.operational.feign.IAccessTaskClient;
import com.hnac.hzims.operational.maintenance.feign.ITaskClient;
import com.hnac.hzims.operational.station.feign.IStationClient;
import com.hnac.hzims.ticket.processflow.strategy.core.ProcessIdWorker;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.twoTicket.enums.FlowWorkTicketConstants;
import com.hnac.hzims.ticket.twoTicket.flowprocess.service.TicketProcessService;
import com.hnac.hzims.ticket.twoTicket.service.IFirstWorkTicketService;
import com.hnac.hzims.ticket.twoTicket.service.IWorkTicketFinishService;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketContentService;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketInfoService;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketPrincipalChangeService;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketSafetyMeasureService;
import com.hnac.hzims.ticket.workTicket.service.impl.WorkTicketDelayServiceImpl;
import com.hnac.hzims.ticket.workTicket.service.impl.WorkTicketOperateTimeServiceImpl;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.flow.core.feign.IFlowClient;
import org.springblade.system.user.feign.IUserClient;
import org.springframework.stereotype.Service;
import static com.hnac.hzims.ticket.twoTicket.enums.FlowWorkTicketConstants.SIGN;
import static com.hnac.hzims.ticket.twoTicket.enums.FlowWorkTicketConstants.START;
import static com.hnac.hzims.ticket.twoTicket.flowprocess.constant.TicketProcessConstant.WORKTICKET;
/**
* 签发人签发
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/5/5 8:36
*/
@Service
@Slf4j
@RequiredArgsConstructor
public class OneSignProcessServiceImpl implements TicketProcessService {
private final IFlowClient flowClient;
private final IWorkTicketInfoService workTicketInfoService;
private final ProcessIdWorker processIdWorker;
private final IFirstWorkTicketService firstWorkTicketService;
private final IWorkTicketSafetyMeasureService workTicketSafetyMeasureService;
private final IWorkTicketContentService contentService;
private final IUserClient userClient;
private final IOperAccessTaskClient operAccessTaskClient;
private final ITaskClient taskClient;
private final IAccessTaskClient accessTaskClient;
private String newFirstWorkTicketFlowKey = "workTicket";
private final IStationClient stationClient;
private final WorkTicketOperateTimeServiceImpl workTicketOperateTimeServiceImpl;
private final IWorkTicketFinishService workTicketFinishService;
private final WorkTicketDelayServiceImpl workTicketDelayService;
private final IWorkTicketPrincipalChangeService workTicketPrincipalChangeService;
/**
* 判断状态
* @param processDefinitionKey
* @param enumByStatus
* @return
*/
@Override
public Boolean isStatus(String processDefinitionKey, FlowWorkTicketConstants enumByStatus) {
if (WORKTICKET.equals(processDefinitionKey) && SIGN.equals(enumByStatus)){
log.info("执行签发人签发业务成功,正准备处理签发人签发业务逻辑~~~~");
return true;
}
log.error("执行签发人签发业务出错~~~");
return false;
}
/**
* 执行业务
* @param response
* @param workTicketVo
*/
@Override
public void execute(ProcessWorkFlowResponse response, WorkTicketVo workTicketVo) {
WorkTicketInfoEntity workTicketInfoEntity = workTicketVo.getWorkTicket();
//更新状态值
workTicketInfoEntity.setFlowStatus(FlowWorkTicketConstants.RECEIVE.getStatus());
workTicketInfoEntity.setFlowDescription(FlowWorkTicketConstants.RECEIVE.getDescription());
workTicketInfoEntity.setSignerDateTime(workTicketVo.getWorkTicket().getSignerDateTime());
workTicketInfoService.updateById(workTicketInfoEntity);
}
}

6
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/IWorkTicketFinishService.java

@ -13,4 +13,10 @@ import com.hnac.hzims.ticket.twoTicket.entity.WorkTicketFinish;
*/
public interface IWorkTicketFinishService extends IService<WorkTicketFinish> {
/**
* 工作结束
* @param ticketId
* @return
*/
WorkTicketFinish selectByTicketId(Long ticketId);
}

8
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/TicketProcessService.java

@ -23,4 +23,12 @@ public interface TicketProcessService {
* @param response
*/
void findPending(ProcessWorkFlowResponse response);
/**
* 预览
* @param ticketType
* @param ticketId
*/
void preview(String ticketType, Long ticketId);
}

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

@ -1,9 +1,11 @@
package com.hnac.hzims.ticket.twoTicket.service.impl;
import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hnac.hzims.common.logs.utils.StringUtils;
import com.hnac.hzims.operational.access.entity.OperAccessTaskEntity;
import com.hnac.hzims.operational.access.feign.IOperAccessTaskClient;
@ -21,34 +23,44 @@ import com.hnac.hzims.ticket.twoTicket.enums.FlowWorkTicketConstants;
import com.hnac.hzims.ticket.twoTicket.service.IFirstWorkTicketService;
import com.hnac.hzims.ticket.twoTicket.service.IWorkTicketFinishService;
import com.hnac.hzims.ticket.twoTicket.service.TicketProcessService;
import com.hnac.hzims.ticket.twoTicket.vo.process.FristWorkTicketVo;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
import com.hnac.hzims.ticket.workTicket.dto.WorkTicketContentDto;
import com.hnac.hzims.ticket.workTicket.dto.WorkTicketSafetyMeasureDto;
import com.hnac.hzims.ticket.utils.ExcelUtil;
import com.hnac.hzims.ticket.utils.PdfUtils;
import com.hnac.hzims.ticket.workTicket.entity.*;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketContentService;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketInfoService;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketPrincipalChangeService;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketSafetyMeasureService;
import com.hnac.hzims.ticket.workTicket.service.*;
import com.hnac.hzims.ticket.workTicket.service.impl.WorkTicketDelayServiceImpl;
import com.hnac.hzims.ticket.workTicket.service.impl.WorkTicketOperateTimeServiceImpl;
import com.hnac.hzims.ticket.workTicket.vo.WorkTicketSafetyMeasureVO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.Workbook;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.CollectionUtil;
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.feign.IFlowClient;
import org.springblade.system.user.cache.UserCache;
import org.springblade.system.user.entity.User;
import org.springblade.system.user.feign.IUserClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletResponse;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.*;
import java.util.stream.Collectors;
/**
* 开票处理流程实现类
*
@ -109,6 +121,21 @@ public class TicketProcessServiceImpl implements TicketProcessService {
private final IWorkTicketPrincipalChangeService workTicketPrincipalChangeService;
private final List<TicketProcessService> processService;
private final IWorkTicketOperateTimeService workTicketOperateTimeService;
private final IWorkTicketInfoService ticketInfoService;
@Value("${hzims.ticket.path.pdf.savePath}")
private String pdfSavePath;
@Value("${hzims.ticket.path.xlsx.savePath}")
private String xlsSavePath;
/**
* 启动开票流程
*
@ -132,27 +159,34 @@ public class TicketProcessServiceImpl implements TicketProcessService {
throw new ServiceException("根据条件获取唯一站点暂无数据");
}
log.info("前端查的站点编号 :{}",workTicketVo.getWorkTicket().getSignage());
log.info("后端查寻的站点编码 :{}",station.getSignage());
log.info("前端查的站点编号 :{}", workTicketVo.getWorkTicket().getSignage());
log.info("后端查寻的站点编码 :{}", station.getSignage());
if (!workTicketVo.getWorkTicket().getSignage().equals(station.getSignage())) {
throw new ServiceException("获取唯一站点不一致");
throw new ServiceException("站点标识-两票编码不能为空");
}
String signage =
station.getSignage().length() == 2 ?
station.getSignage() : station.getSignage().substring(0, 2);
//获取站点编号
String signage = station.getSignage();
if (StringUtils.isBlank(signage) || signage.length() < 2) {
throw new ServiceException("站点标识-两票编码不能为空");
}
signage = signage.length() == 2 ? station.getSignage() : station.getSignage().substring(0, 2);
workTicketVo.getWorkTicket().setSignage(signage);
workTicketVo.getWorkTicket().setSignageCode(station.getCode());
//2. 获取编码
String code = processIdWorker.getTicketByCode(workTicketVo.getWorkTicket().getSignage(), workTicketVo.getWorkTicket().getType(), workTicketVo.getWorkTicket().getMakeDateTime());
String code = processIdWorker.getTicketByCode(workTicketVo.getWorkTicket().getSignage(),
workTicketVo.getWorkTicket().getType(), LocalDateTime.now());
workTicketVo.getWorkTicket().setCode(code);
//3 .保存工作对象
//2 .保存工作对象
this.saveWorkTicketInfo(workTicketVo.getWorkTicket());
//4. 保存安全措施
//3. 保存安全措施
log.info("获取报存安全措施:{}", workTicketVo.getSafetyMeasuresList());
this.saveSafetyMeasures(workTicketVo.getSafetyMeasuresList(), workTicketVo.getWorkTicket());
//5. 保存工作任务
//4. 保存工作任务
this.saveWorkTicketContentDto(workTicketVo.getWorkTicketContentDtoList(), workTicketVo.getWorkTicket());
//6. 开启动作流
//5. 开启动作流
this.dealProcess(newFirstWorkTicketFlowKey, workTicketVo);
}
@ -163,69 +197,207 @@ public class TicketProcessServiceImpl implements TicketProcessService {
*/
@Override
public void findPending(ProcessWorkFlowResponse response) {
log.info("获取待处理的数据 {}", response);
log.info("获取businessKey: {}", response.getBusinessKey());
log.info("获取taskId: {}", response.getTaskId());
log.info("获取下一个审批人是: {}", response.getNextStepOperator());
if (StringUtils.isNull(response.getTaskId())) {
log.info("工作流结束~~~");
return;
}
//json转换表单
String formData = response.getVariables();
WorkTicketVo workTicketVo = JSON.parseObject(formData, WorkTicketVo.class);
String formData = JSON.toJSONString(response.getVariables());
log.info("获取表单的数据:{}", formData);
FristWorkTicketVo fristWorkFlowResponse = null;
try {
fristWorkFlowResponse = JSONObject.parseObject(formData, FristWorkTicketVo.class);
} catch (Exception e) {
e.printStackTrace();
}
if (ObjectUtils.isEmpty(fristWorkFlowResponse)) {
log.error("获取表单的数据解析的数据为null");
return;
}
//获取表单数据
WorkTicketVo workTicketVo = fristWorkFlowResponse.getWorkTicketVo();
WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket();
//2.流程处理
Integer flowStatus = workTicket.getFlowStatus();
FlowWorkTicketConstants enumByStatus = FlowWorkTicketConstants.getEnumByStatus(flowStatus);
switch (enumByStatus) {
String businessKey = response.getBusinessKey();
WorkTicketInfoEntity workTicketInfo = firstWorkTicketService.getById(businessKey);
if (ObjectUtils.isEmpty(workTicketInfo) || ObjectUtils.isEmpty(workTicket.getId())) {
log.error("获取工作票的数据为不存在");
return;
}
//更新工作票
if (workTicket.getId() == null) {
workTicket.setId(workTicketInfo.getId());
}
//工作流ID
if (StringUtils.isEmpty(workTicketInfo.getProcessInstanceId())) {
workTicket.setProcessInstanceId(response.getProcessInstanceId());
}
workTicketInfoService.updateById(workTicket);
//更新安全措施
List<WorkTicketSafetyMeasureEntity> safetyMeasuresList = workTicketVo.getSafetyMeasuresList();
if (CollectionUtils.isNotEmpty(safetyMeasuresList)) {
log.info("获取安全措施的数据:{}", safetyMeasuresList);
safetyMeasuresList.forEach(item -> {
if (ObjectUtils.isEmpty(item.getId())) {
LambdaQueryWrapper<WorkTicketSafetyMeasureEntity> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(WorkTicketSafetyMeasureEntity::getTicketId, workTicketInfo.getId());
workTicketSafetyMeasureService.update(item, queryWrapper);
} else {
workTicketSafetyMeasureService.updateById(item);
}
});
}
//工作票工作任务组
List<WorkTicketContentEntity> workTicketContentDtoList = workTicketVo.getWorkTicketContentDtoList();
if (CollectionUtils.isNotEmpty(workTicketContentDtoList)) {
log.info("获取工作票工作任务组:{}", workTicketContentDtoList);
workTicketContentDtoList.forEach(item -> {
if (ObjectUtils.isEmpty(item.getId())) {
LambdaQueryWrapper<WorkTicketContentEntity> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(WorkTicketContentEntity::getTicketId, workTicketInfo.getId());
contentService.update(item, queryWrapper);
} else {
contentService.updateById(item);
}
});
}
// 工作票延期
WorkTicketDelayEntity workTicketDelay = workTicketVo.getWorkTicketDelay();
if (ObjectUtils.isNotEmpty(workTicketDelay) && ObjectUtils.isNotEmpty(workTicketDelay.getCreateUser())) {
log.info("获取工作票延期:{}", workTicketDelay);
try {
workTicketDelay.setCreateDept(workTicket.getCreateDept());
workTicketDelay.setTicketId(workTicketInfo.getId());
workTicketDelay.setTenantId(workTicketInfo.getTenantId());
if (ObjectUtils.isEmpty(workTicketDelay.getId())) {
workTicketDelayService.save(workTicketDelay);
} else {
workTicketDelayService.updateById(workTicketDelay);
}
} catch (Exception e) {
e.printStackTrace();
}
}
//工作结束
WorkTicketFinish workTicketFinish = workTicketVo.getWorkTicketFinish();
if (ObjectUtils.isNotEmpty(workTicketFinish) && ObjectUtils.isNotEmpty(workTicketFinish.getPrincipal())) {
log.info("获取工作结束:{}", workTicketFinish);
if (ObjectUtils.isEmpty(workTicketFinish.getId())) {
workTicketDelay.setTicketId(workTicketInfo.getId());
//workTicketDelay.setInitialTime(LocalDateTime.now());
workTicketFinishService.save(workTicketFinish);
} else {
workTicketDelay.setInitialTime(LocalDateTime.now());
workTicketFinishService.updateById(workTicketFinish);
}
}
//工作开始时间和结束时间
List<WorkTicketOperateTimeEntity> workTicketOperateTimeEntities = workTicketVo.getWorkTicketOperateTimeEntities();
if (CollectionUtils.isNotEmpty(workTicketOperateTimeEntities)) {
log.info("工作开始时间和结束时间:{}", workTicketFinish);
workTicketOperateTimeService.saveBatch(workTicketOperateTimeEntities);
}
//工作票负责人变更
WorkTicketPrincipalChangeEntity workTicketPrincipalChange = workTicketVo.getWorkTicketPrincipalChange();
if (ObjectUtils.isNotEmpty(workTicketPrincipalChange) && workTicketPrincipalChange.getInitialPrincipal() != null) {
log.info("工作票负责人变更: {}", workTicketPrincipalChange);
//原来的负责人
User user = UserCache.getUser(workTicketPrincipalChange.getInitialPrincipal());
//新的负责人
User newUser = UserCache.getUser(workTicketPrincipalChange.getChangePrincipal());
workTicketPrincipalChange.setCreateDept(workTicket.getCreateDept());
workTicketPrincipalChange.setTicketId(workTicketInfo.getId());
workTicketPrincipalChange.setTenantId(workTicketInfo.getTenantId());
if (workTicketPrincipalChange.getId() == null) {
workTicketPrincipalChangeService.save(workTicketPrincipalChange);
} else {
workTicketPrincipalChangeService.updateById(workTicketPrincipalChange);
}
log.info("工作负责人变更 原来的负责人 {},变更为 {}", user.getName(), newUser.getName());
workTicket.setPrincipal(workTicketPrincipalChange.getChangePrincipal());
workTicket.setPrincipalName(newUser.getName());
//更新工作票
workTicketInfoService.updateById(workTicket);
}
// WorkTicketInfoEntity workTicketInfo = firstWorkTicketService.getById(workTicket.getId());
// Integer flowStatus = workTicketInfo.getFlowStatus();
// FlowWorkTicketConstants enumByStatus = FlowWorkTicketConstants.getEnumByStatus(flowStatus);
// ProcessService dbProcessService = processService.stream().filter(item -> item.isStatus(response.getProcessDefinitionKey(),
// enumByStatus)).findFirst().orElse(null);
// dbProcessService.execute(response,workTicketVo);
//
// switch (enumByStatus) {
// case START:
// //开票
// make(response, workTicketVo);
// break;
case SIGN:
//签发人签发
//工作票签发人默认执行
sign(response, workTicketVo);
break;
case RECEIVE:
//运功人接收
reception(response, workTicketVo);
break;
case FIX_UP:
// 运行人员布置安全措施
safety(response, workTicketVo);
break;
case PRINCIPAL_CONFIRM_MEASURE:
//工作负责人确认安全措施
principal(response, workTicketVo);
break;
case LICENCE:
//许可人许可
license(response, workTicketVo);
break;
case PRINCIPAL_CONFIRM_CONTENT:
//工作负责人确认工作内容执行
principalConfirmContent(response, workTicketVo);
break;
case PRINCIPAL_CONFIRM_END:
//工作负责人确认工作票结束
principalConfirmEnd(response, workTicketVo);
break;
case LICENSE_CONFIRM_END:
//许可人确认工作票结束
licenseConfirmEnd(response, workTicketVo);
break;
case PROCESS_POSTPONE:
//工作票延期
processPostpone(response, workTicketVo);
break;
case PROCESS_COURSE:
//工作票转移
processCourse(response,workTicketVo);
break;
case SIGN_CONFIRM_DELAY:
//签发人审核
signConfirmDelay(response,workTicketVo);
break;
}
// case SIGN:
// //签发人签发
// //工作票签发人默认执行
// sign(response, workTicketVo);
// break;
// case RECEIVE:
// //运功人接收
// reception(response, workTicketVo);
// break;
// case FIX_UP:
// // 运行人员布置安全措施
// safety(response, workTicketVo);
// break;
// case PRINCIPAL_CONFIRM_MEASURE:
// //工作负责人确认安全措施
// principal(response, workTicketVo);
// break;
// case LICENCE:
// //许可人许可
// license(response, workTicketVo);
// break;
// case PRINCIPAL_CONFIRM_CONTENT:
// //工作负责人确认工作内容执行
// principalConfirmContent(response, workTicketVo);
// break;
// case PRINCIPAL_CONFIRM_END:
// //工作负责人确认工作票结束
// principalConfirmEnd(response, workTicketVo);
// break;
// case LICENSE_CONFIRM_END:
// //许可人确认工作票结束
// licenseConfirmEnd(response, workTicketVo);
// break;
// case PROCESS_POSTPONE:
// //工作票延期
// processPostpone(response, workTicketVo);
// break;
// case PROCESS_COURSE:
// //工作票转移
// processCourse(response, workTicketVo);
// break;
// case SIGN_CONFIRM_DELAY:
// //签发人审核
// signConfirmDelay(response, workTicketVo);
// break;
// }
}
/**
* 签发人审核
*
* @param response
* @param workTicketVo
*/
@ -236,12 +408,12 @@ public class TicketProcessServiceImpl implements TicketProcessService {
workTicketInfoService.updateById(workTicket);
}
/**
* 工作票转移
*
* @param response
* @param workTicketVo
*/
@ -341,7 +513,7 @@ public class TicketProcessServiceImpl implements TicketProcessService {
* @param workTicketVo
*/
private void license(ProcessWorkFlowResponse response, WorkTicketVo workTicketVo) {
List<WorkTicketSafetyMeasureDto> safetyMeasuresList = workTicketVo.getSafetyMeasuresList();
List<WorkTicketSafetyMeasureEntity> safetyMeasuresList = workTicketVo.getSafetyMeasuresList();
if (CollectionUtils.isEmpty(safetyMeasuresList)) {
log.error("没有安全措施数据");
return;
@ -349,7 +521,7 @@ public class TicketProcessServiceImpl implements TicketProcessService {
//更新安全措施的状态
List<WorkTicketSafetyMeasureEntity> workTicketSafetyMeasureEntities = new ArrayList<>();
for (WorkTicketSafetyMeasureDto workTicketSafetyMeasureDto : safetyMeasuresList) {
for (WorkTicketSafetyMeasureEntity workTicketSafetyMeasureDto : safetyMeasuresList) {
WorkTicketSafetyMeasureEntity workTicketSafetyMeasureEntity = BeanUtil.copyProperties(workTicketSafetyMeasureDto, WorkTicketSafetyMeasureEntity.class);
workTicketSafetyMeasureEntities.add(workTicketSafetyMeasureEntity);
}
@ -373,8 +545,8 @@ public class TicketProcessServiceImpl implements TicketProcessService {
//负责人确认时间
//workTicket.setConfirmDateTime(workTicketVo.getWorkTicket().getConfirmDateTime());
workTicket.setFlowStatus(FlowWorkTicketConstants.PRINCIPAL_CONFIRM_MEASURE.getStatus());
workTicket.setFlowDescription(FlowWorkTicketConstants.PRINCIPAL_CONFIRM_MEASURE.getDescription());
workTicket.setFlowStatus(FlowWorkTicketConstants.LICENCE.getStatus());
workTicket.setFlowDescription(FlowWorkTicketConstants.LICENCE.getDescription());
//更新状态值
workTicketInfoService.updateById(workTicket);
}
@ -391,8 +563,6 @@ public class TicketProcessServiceImpl implements TicketProcessService {
//值班负责人
workTicket.setWatchPrincipal(workTicketVo.getWorkTicket().getPrincipal());
workTicket.setWatchPrincipalEndTime(workTicketVo.getWorkTicket().getWatchPrincipalEndTime());
workTicket.setFlowStatus(FlowWorkTicketConstants.PRINCIPAL_CONFIRM_MEASURE.getStatus());
workTicket.setFlowDescription(FlowWorkTicketConstants.PRINCIPAL_CONFIRM_MEASURE.getDescription());
//更新状态值
@ -420,9 +590,9 @@ public class TicketProcessServiceImpl implements TicketProcessService {
*/
//@Transactional(rollbackFor = Exception.class)
public void sign(ProcessWorkFlowResponse response, WorkTicketVo workTicketVo) {
WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket();
WorkTicketInfoEntity workTicketInfoEntity = workTicketVo.getWorkTicket();
//更新状态值
WorkTicketInfoEntity workTicketInfoEntity = new WorkTicketInfoEntity();
workTicketInfoEntity.setStatus(FlowWorkTicketConstants.RECEIVE.getStatus());
workTicketInfoEntity.setFlowStatus(FlowWorkTicketConstants.RECEIVE.getStatus());
workTicketInfoEntity.setFlowDescription(FlowWorkTicketConstants.RECEIVE.getDescription());
workTicketInfoEntity.setSignerDateTime(workTicketVo.getWorkTicket().getSignerDateTime());
@ -436,10 +606,11 @@ public class TicketProcessServiceImpl implements TicketProcessService {
private void make(ProcessWorkFlowResponse response, WorkTicketVo workTicketVo) {
WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket();
workTicket.setProcessInstanceId(response.getProcessInstanceId());
workTicket.setStatus(FlowWorkTicketConstants.SIGN.getStatus());
workTicket.setFlowStatus(FlowWorkTicketConstants.SIGN.getStatus());
workTicket.setFlowDescription(FlowWorkTicketConstants.SIGN.getDescription());
//保存工作流实例ID
workTicketInfoService.update(Wrappers.<WorkTicketInfoEntity>lambdaUpdate().
set(WorkTicketInfoEntity::getProcessInstanceId, response.getProcessInstanceId()).
set(WorkTicketInfoEntity::getFlowStatus, FlowWorkTicketConstants.SIGN.getStatus()).set(WorkTicketInfoEntity::getFlowDescription, FlowWorkTicketConstants.SIGN.getDescription()).eq(WorkTicketInfoEntity::getId, workTicket.getId()));
workTicketInfoService.updateById(workTicket);
//处理来源任务
this.returnTicket(workTicketVo);
}
@ -477,41 +648,31 @@ public class TicketProcessServiceImpl implements TicketProcessService {
* @param newFirstWorkTicketFlowKey
* @param workTicketVo
*/
private void
dealProcess(String newFirstWorkTicketFlowKey, WorkTicketVo workTicketVo) {
private void dealProcess(String newFirstWorkTicketFlowKey, WorkTicketVo workTicketVo) {
//若为线下工作票 则无需开启工作流
Integer status = WorkTicketConstants.FirstWorkTicketStatusEnum.SIGN.getStatus();
if (status.intValue() != workTicketVo.getWorkTicket().getStatus().intValue()) {
if (status.intValue() != workTicketVo.getWorkTicket().getFlowStatus().intValue()) {
return;
}
log.info("租户Id:{}",AuthUtil.getTenantId());
log.info("用户部门Id: {}",AuthUtil.getUser().getDeptId());
log.info("用户Id: {}",AuthUtil.getUserId());
log.info("租户Id:{}", AuthUtil.getTenantId());
log.info("用户部门Id: {}", AuthUtil.getUser().getDeptId());
log.info("用户Id: {}", AuthUtil.getUserId());
//获取签发人角色下的人员
R<List<User>> listR = userClient.relationUserListByRoleAlias(AuthUtil.getTenantId(), Long.parseLong(AuthUtil.getUser().getDeptId()), TicketConstants.SIGNER_ROLE);
if (!listR.isSuccess() || CollectionUtil.isEmpty(listR.getData())) {
throw new ServiceException("工作票签发人角色下未查询到相关人员");
}
log.info("获取签发人角色下的人员: {}",listR.getData());
log.info("获取签发人角色下的人员: {}", listR.getData());
Map<String, Object> params = new HashMap<>(4);
params.put("workTicketVo",workTicketVo);
params.put("workTicketVo", workTicketVo);
//已开启流程
workTicketVo.setIsState(true);
log.info("获取表单的数据: {}", workTicketVo);
R<BladeFlow> processInstanceContainNameByKey = flowClient.startProcessInstanceContainNameByKey(newFirstWorkTicketFlowKey, String.valueOf(workTicketVo.getWorkTicket().getId()), workTicketVo.getWorkTicket().getWorkContent(), params);
if (!processInstanceContainNameByKey.isSuccess() && processInstanceContainNameByKey.getData() == null) {
throw new ServiceException("启动流程失败...");
}
//获取BladeFlow 数据库
BladeFlow bladeFlow = processInstanceContainNameByKey.getData();
log.info("获取工作流新的数据: {}",bladeFlow);
WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket();
workTicket.setProcessInstanceId(bladeFlow.getProcessInstanceId());
workTicket.setFlowStatus(FlowWorkTicketConstants.SIGN.getStatus());
workTicket.setFlowDescription(FlowWorkTicketConstants.SIGN.getDescription());
//保存工作流实例ID
firstWorkTicketService.updateById(workTicket);
workTicketVo.setWorkTicket(workTicket);
//处理来源任务
this.returnTicket(workTicketVo);
}
@ -521,15 +682,14 @@ public class TicketProcessServiceImpl implements TicketProcessService {
* @param workTicketContentDtoList
* @param workTicketInfoEntity
*/
private void saveWorkTicketContentDto(List<WorkTicketContentDto> workTicketContentDtoList, WorkTicketInfoEntity workTicketInfoEntity) {
private void saveWorkTicketContentDto(List<WorkTicketContentEntity> workTicketContentDtoList, WorkTicketInfoEntity workTicketInfoEntity) {
if (CollectionUtils.isEmpty(workTicketContentDtoList)) {
return;
}
List<WorkTicketContentEntity> contentEntities = workTicketContentDtoList.stream().map(contentDto -> {
WorkTicketContentEntity contentEntity = BeanUtil.copy(contentDto, WorkTicketContentEntity.class);
contentEntity.setTicketId(workTicketInfoEntity.getId());
contentEntity.setCreateDept(workTicketInfoEntity.getCreateDept());
return contentEntity;
contentDto.setTicketId(workTicketInfoEntity.getId());
contentDto.setCreateDept(workTicketInfoEntity.getCreateDept());
return contentDto;
}).collect(Collectors.toList());
boolean savedBatch = contentService.saveBatch(contentEntities);
if (!savedBatch) {
@ -545,16 +705,16 @@ public class TicketProcessServiceImpl implements TicketProcessService {
* @param safetyMeasuresList
* @param workTicketInfoEntity
*/
private void saveSafetyMeasures(List<WorkTicketSafetyMeasureDto> safetyMeasuresList, WorkTicketInfoEntity workTicketInfoEntity) {
private void saveSafetyMeasures(List<WorkTicketSafetyMeasureEntity> safetyMeasuresList, WorkTicketInfoEntity workTicketInfoEntity) {
if (CollectionUtil.isEmpty(safetyMeasuresList)) {
return;
}
log.info("获取安全措施的数据:{}", safetyMeasuresList);
List<WorkTicketSafetyMeasureEntity> measureEntityList = safetyMeasuresList.stream().map(measure -> {
WorkTicketSafetyMeasureEntity measureEntity = BeanUtil.copy(measure, WorkTicketSafetyMeasureEntity.class);
measureEntity.setTicketId(workTicketInfoEntity.getId());
measureEntity.setCreateDept(workTicketInfoEntity.getCreateDept());
measureEntity.setCreateUser(workTicketInfoEntity.getCreateUser());
return measureEntity;
measure.setTicketId(workTicketInfoEntity.getId());
measure.setCreateDept(workTicketInfoEntity.getCreateDept());
measure.setCreateUser(workTicketInfoEntity.getCreateUser());
return measure;
}).collect(Collectors.toList());
boolean savedBatch = workTicketSafetyMeasureService.saveBatch(measureEntityList);
if (!savedBatch) {
@ -630,4 +790,109 @@ public class TicketProcessServiceImpl implements TicketProcessService {
return stringJoiner.toString();
}
/**
* 预览
*
* @param ticketType
* @param ticketId
*/
@Override
public void preview(String ticketType, Long ticketId) {
WorkTicketVo workTicketVo = ticketInfoService.selectDetailsById(ticketId);
//将查询的数据转换为map
Map<String, Object> workTicketInfoMap = this.convertMap(workTicketVo);
String fileName = TicketConstants.WordFileNameEnum.getFileNameByType(ticketType) + PdfUtils.XLSX_SUFFIX;
log.info("工作票模板为:{}", fileName);
TemplateExportParams templateExportParams = new TemplateExportParams("template/" + fileName, true);
Workbook workbook = null;
try {
workbook = ExcelUtil.getWorkbook(templateExportParams, workTicketInfoMap);
} catch (Exception e) {
e.printStackTrace();
}
//上传xlsx至服务器
try {
ExcelUtil.upload(workbook, xlsSavePath, workTicketVo.getWorkTicket().getWorkContent() + PdfUtils.XLSX_SUFFIX);
} catch (Exception e) {
e.printStackTrace();
}
//将xlsx文件转换为pdf并保存
String pdfFileName = workTicketVo.getWorkTicket().getWorkContent() + PdfUtils.PDF_SUFFIX;
String xlsFileName = workTicketVo.getWorkTicket().getWorkContent() + PdfUtils.XLSX_SUFFIX;
PdfUtils.convertPdf(xlsSavePath, xlsFileName, pdfSavePath, pdfFileName);
String savePath = pdfSavePath + pdfFileName;
// 设置response参数,可以打开下载页面
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletResponse response = servletRequestAttributes.getResponse();
PdfUtils.readPdf(response, savePath);
}
//封装map 转换 excel导出
private Map<String, Object> convertMap(WorkTicketVo workTicketVo) {
Map<String, Object> result = new HashMap<>();
WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket();
//1. 工作对象
Map<String, Object> workTicketInfoMap = PdfUtils.objectToMap(workTicket);
result.putAll(workTicketInfoMap);
//2. 安全措施
List<WorkTicketSafetyMeasureEntity> safetyMeasuresList = workTicketVo.getSafetyMeasuresList();
if (CollectionUtils.isNotEmpty(safetyMeasuresList)) {
Map<String, List<WorkTicketSafetyMeasureEntity>> measureMap = safetyMeasuresList.stream()
.collect(Collectors.groupingBy(WorkTicketSafetyMeasureEntity::getType));
Arrays.stream(WorkTicketConstants.WorkTicketMeasureTypeEnum.class.getEnumConstants()).forEach(measureEnum -> {
if (CollectionUtil.isNotEmpty(measureMap.get(measureEnum.getType()))) {
List<Map<String, Object>> mapList = measureMap.get(measureEnum.getType()).stream().map(measureVO -> {
Map<String, Object> map = PdfUtils.objectToMap(measureVO);
map.put("safetyMeasure", ObjectUtil.isNotEmpty(map.get("measure")) ? map.get("measure") : null);
String status = TicketConstants.SafetyMeasureStatusEnum.FINISH.getStatus().equals(measureVO.getStatus()) ? TicketConstants.SafetyMeasureStatusEnum.FINISH.getDescribe() : " ";
map.put("status", status);
return map;
}).collect(Collectors.toList());
workTicketInfoMap.put(measureEnum.getConvertAttributes(), mapList);
} else {
workTicketInfoMap.put(measureEnum.getConvertAttributes(), new ArrayList<Map<String, String>>(1));
}
});
}
//3. 工作票工作任务组
List<WorkTicketContentEntity> workTicketContentDtoList = workTicketVo.getWorkTicketContentDtoList();
if (CollectionUtils.isNotEmpty(workTicketContentDtoList)) {
result.put("workTicketContentDtoList", workTicketContentDtoList);
}
//4. 工作票延期
WorkTicketDelayEntity workTicketDelay = workTicketVo.getWorkTicketDelay();
if (ObjectUtils.isNotEmpty(workTicketDelay)) {
result.putAll(PdfUtils.objectToMap(workTicketDelay));
}
//5. 工作结束
WorkTicketFinish workTicketFinish = workTicketVo.getWorkTicketFinish();
if (ObjectUtils.isNotEmpty(workTicketFinish)) {
result.putAll(PdfUtils.objectToMap(workTicketFinish));
}
//5. 工作票负责人变更
WorkTicketPrincipalChangeEntity workTicketPrincipalChange = workTicketVo.getWorkTicketPrincipalChange();
if (ObjectUtils.isNotEmpty(workTicketPrincipalChange)) {
result.putAll(PdfUtils.objectToMap(workTicketPrincipalChange));
}
return result;
}
/**
* 对象转map
*/
private static <T> Map<String, Object> parseObjectMap(T target, Class clas) {
return JSONObject.parseObject(JSONObject.toJSONString(target), Map.class);
}
}

17
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/WorkTicketFinishServiceImpl.java

@ -1,11 +1,15 @@
package com.hnac.hzims.ticket.twoTicket.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnac.hzims.ticket.twoTicket.entity.WorkTicketFinish;
import com.hnac.hzims.ticket.twoTicket.mapper.WorkTicketFinishMapper;
import com.hnac.hzims.ticket.twoTicket.service.IWorkTicketFinishService;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketDelayEntity;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 工作结束 服务实现类
@ -17,4 +21,17 @@ import org.springframework.stereotype.Service;
@Service
public class WorkTicketFinishServiceImpl extends ServiceImpl<WorkTicketFinishMapper, WorkTicketFinish> implements IWorkTicketFinishService {
/**
* 工作结束
*
* @param ticketId
* @return
*/
@Override
public WorkTicketFinish selectByTicketId(Long ticketId) {
LambdaQueryWrapper<WorkTicketFinish> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(WorkTicketFinish::getTicketId,ticketId);
return this.getOne(queryWrapper);
}
}

31
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/process/FristWorkTicketVo.java

@ -0,0 +1,31 @@
package com.hnac.hzims.ticket.twoTicket.vo.process;
import lombok.Data;
import java.io.Serializable;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/5/4 15:17
*/
@Data
public class FristWorkTicketVo implements Serializable {
/**
* 签发人签发是否同意
*/
private boolean signFlag;
private String flag;
private boolean pass;
/**
* 工作表单
*/
private WorkTicketVo workTicketVo;
}

18
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/process/WorkTicketVo.java

@ -1,13 +1,7 @@
package com.hnac.hzims.ticket.twoTicket.vo.process;
import com.hnac.hzims.ticket.twoTicket.entity.WorkTicketFinish;
import com.hnac.hzims.ticket.workTicket.dto.WorkTicketContentDto;
import com.hnac.hzims.ticket.workTicket.dto.WorkTicketSafetyMeasureDto;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketDelayEntity;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketOperateTimeEntity;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketPrincipalChangeEntity;
import com.hnac.hzims.ticket.workTicket.service.impl.WorkTicketPrincipalChangeServiceImpl;
import com.hnac.hzims.ticket.workTicket.entity.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -36,14 +30,15 @@ public class WorkTicketVo {
* 安全措施
*/
@ApiModelProperty("安全措施数组")
private List<WorkTicketSafetyMeasureDto> safetyMeasuresList;
private List<WorkTicketSafetyMeasureEntity> safetyMeasuresList;
/**
* 工作票工作任务组
*
*/
@ApiModelProperty("工作票工作任务组")
private List<WorkTicketContentDto> workTicketContentDtoList;
private List<WorkTicketContentEntity> workTicketContentDtoList;
/**
@ -73,5 +68,10 @@ public class WorkTicketVo {
private WorkTicketPrincipalChangeEntity workTicketPrincipalChange;
/**
* 开启流程
*/
private Boolean isState = true;
}

7
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketContentService.java

@ -15,4 +15,11 @@ public interface IWorkTicketContentService extends BaseService<WorkTicketContent
* @return
*/
List<WorkTicketContentEntity> list(WorkTicketContentEntity req);
/**
* 获取工作票工作任务组
* @param ticketId
* @return
*/
List<WorkTicketContentEntity> selectByTicketId(Long ticketId);
}

8
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketDelayService.java

@ -1,6 +1,7 @@
package com.hnac.hzims.ticket.workTicket.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.ticket.twoTicket.entity.WorkTicketFinish;
import com.hnac.hzims.ticket.workTicket.dto.WorkTicketDelayDto;
import com.hnac.hzims.ticket.workTicket.dto.WorkTicketInfoDto;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketDelayEntity;
@ -54,4 +55,11 @@ public interface IWorkTicketDelayService extends BaseService<WorkTicketDelayEnti
*/
R updateAndConfirmFlow(WorkTicketInfoDto infoDto, WorkTicketDelayDto delayDto, ComleteTask comleteTask);
/**
* 工作票延期
* @param ticketId
* @return
*/
WorkTicketDelayEntity selectByTicketId(Long ticketId);
}

11
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketInfoService.java

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hnac.hzims.ticket.areamonthly.vo.AreaMonthlyVo;
import com.hnac.hzims.ticket.areamonthly.vo.StandardTicketWithAreaVo;
import com.hnac.hzims.ticket.areamonthly.vo.StandardWorkVo;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
import com.hnac.hzims.ticket.workTicket.dto.TicketAccessTaskDto;
import com.hnac.hzims.ticket.workTicket.dto.WorkTicketInfoDto;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity;
@ -144,4 +145,14 @@ public interface IWorkTicketInfoService extends BaseService<WorkTicketInfoEntity
* @param id
*/
void updateFlowStatusById(Integer status, String description, Long id);
/**
* 获取工作详情
*
* @param ticketId
* @return
*/
WorkTicketVo selectDetailsById(Long ticketId);
}

7
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketOperateTimeService.java

@ -33,4 +33,11 @@ public interface IWorkTicketOperateTimeService extends BaseService<WorkTicketOpe
* @return
*/
List<WorkTicketOperateTimeVO> list(WorkTicketOperateTimeDto req);
/**
* 工作开始时间和结束时间
* @param ticketId
* @return
*/
List<WorkTicketOperateTimeEntity> selectByTicketId(Long ticketId);
}

8
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketPrincipalChangeService.java

@ -42,4 +42,12 @@ public interface IWorkTicketPrincipalChangeService extends BaseService<WorkTicke
* @return
*/
R changePrincipal(WorkTicketInfoDto infoDto, WorkTicketPrincipalChangeDto changeDto);
/**
* 工作票负责人变更
* @param ticketId
* @return
*/
WorkTicketPrincipalChangeEntity selectByTicketId(Long ticketId);
}

7
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketSafetyMeasureService.java

@ -55,4 +55,11 @@ public interface IWorkTicketSafetyMeasureService extends BaseService<WorkTicketS
*/
R executeOfflineMeasure(List<WorkTicketSafetyMeasureEntity> measureList);
/**
* 根据工作票编号对应安全措施数组
* @param ticketId
* @return
*/
List<WorkTicketSafetyMeasureEntity> selectByTicketId(Long ticketId);
}

16
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketContentServiceImpl.java

@ -1,7 +1,9 @@
package com.hnac.hzims.ticket.workTicket.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hnac.hzims.common.utils.Condition;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketContentEntity;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketSafetyMeasureEntity;
import com.hnac.hzims.ticket.workTicket.mapper.WorkTicketContentMapper;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketContentService;
import lombok.extern.slf4j.Slf4j;
@ -21,4 +23,18 @@ public class WorkTicketContentServiceImpl extends BaseServiceImpl<WorkTicketCont
public List<WorkTicketContentEntity> list(WorkTicketContentEntity req) {
return this.list(Condition.getQueryWrapper(new WorkTicketContentEntity(),req));
}
/**
* 获取工作票工作任务组
*
* @param ticketId
* @return
*/
@Override
public List<WorkTicketContentEntity> selectByTicketId(Long ticketId) {
LambdaQueryWrapper<WorkTicketContentEntity> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(WorkTicketContentEntity::getTicketId,ticketId);
List<WorkTicketContentEntity> entities = this.list(queryWrapper);
return entities;
}
}

16
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketDelayServiceImpl.java

@ -9,8 +9,10 @@ import com.hnac.hzims.operational.maintenance.dto.OperMaintenanceTaskDTO;
import com.hnac.hzims.operational.maintenance.dto.TaskFlowDTO;
import com.hnac.hzims.operational.maintenance.feign.ITaskClient;
import com.hnac.hzims.ticket.constants.TicketConstants;
import com.hnac.hzims.ticket.twoTicket.entity.WorkTicketFinish;
import com.hnac.hzims.ticket.workTicket.dto.WorkTicketDelayDto;
import com.hnac.hzims.ticket.workTicket.dto.WorkTicketInfoDto;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketContentEntity;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketDelayEntity;
import com.hnac.hzims.ticket.workTicket.mapper.WorkTicketDelayMapper;
import com.hnac.hzims.ticket.workTicket.mapper.WorkTicketInfoMapper;
@ -110,6 +112,20 @@ public class WorkTicketDelayServiceImpl extends BaseServiceImpl<WorkTicketDelayM
}
/**
* 工作票延期
*
* @param ticketId
* @return
*/
@Override
public WorkTicketDelayEntity selectByTicketId(Long ticketId) {
LambdaQueryWrapper<WorkTicketDelayEntity> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(WorkTicketDelayEntity::getTicketId,ticketId);
List<WorkTicketDelayEntity> entities = this.list(queryWrapper);
return entities.get(0);
}
/**
* 更新任务延期时间状态
* @param infoDto
*/

166
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java

@ -7,6 +7,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Lists;
@ -22,12 +24,13 @@ import com.hnac.hzims.ticket.areamonthly.vo.StandardTicketWithAreaVo;
import com.hnac.hzims.ticket.areamonthly.vo.StandardWorkVo;
import com.hnac.hzims.ticket.aspect.AroundFlow;
import com.hnac.hzims.ticket.constants.TicketConstants;
import com.hnac.hzims.ticket.twoTicket.entity.WorkTicketFinish;
import com.hnac.hzims.ticket.twoTicket.enums.FlowWorkTicketConstants;
import com.hnac.hzims.ticket.twoTicket.service.impl.WorkTicketFinishServiceImpl;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
import com.hnac.hzims.ticket.utils.ExcelUtil;
import com.hnac.hzims.ticket.workTicket.dto.*;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketDelayEntity;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketFlowEntity;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity;
import com.hnac.hzims.ticket.workTicket.entity.*;
import com.hnac.hzims.ticket.workTicket.mapper.WorkDelayNoScopeMapper;
import com.hnac.hzims.ticket.workTicket.mapper.WorkTicketInfoMapper;
import com.hnac.hzims.ticket.workTicket.service.*;
@ -98,6 +101,8 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
private final IOperAccessTaskClient operAccessTaskClient;
private final ITaskClient taskClient;
private final TicketInfoEvaluateService ticketInfoEvaluateService;
private final IWorkTicketContentService workTicketContentService;
private final WorkTicketFinishServiceImpl workTicketFinishService;
/** 生成两票编号锁 **/
private Lock lock = new ReentrantLock();
@ -136,9 +141,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
}
/**开启工作流**/
BladeFlow bladeFlow = this.startProcessInstance(firstWorkTicketFlowKey, req);
this.update(Wrappers.<WorkTicketInfoEntity>lambdaUpdate()
.set(WorkTicketInfoEntity::getProcessInstanceId, bladeFlow.getProcessInstanceId())
.eq(WorkTicketInfoEntity::getId, req.getId()));
this.update(Wrappers.<WorkTicketInfoEntity>lambdaUpdate().set(WorkTicketInfoEntity::getProcessInstanceId, bladeFlow.getProcessInstanceId()).eq(WorkTicketInfoEntity::getId, req.getId()));
//将票据ID会传至计划/任务内
returnTicket(req);
return R.success("保存成功");
@ -158,22 +161,10 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
WorkTicketDelayEntity delayEntity = (WorkTicketDelayEntity) completeTask.getVariables().get("delay");
delayService.save(delayEntity);
//更新负责人确认执行情况流程 填充信息
WorkTicketFlowEntity workTicketFlowEntity = workTicketFlowService.getOne(Wrappers.<WorkTicketFlowEntity>lambdaQuery()
.eq(WorkTicketFlowEntity::getTicketId, ticketId)
.eq(WorkTicketFlowEntity::getFlowCode, TicketConstants.FirstWorkTicketFlowStatusEnum.CONFIRM_WORK_FINISH.getStatus())
.orderByDesc(WorkTicketFlowEntity::getCreateTime)
.last("limit 1;")
);
workTicketFlowService.update(Wrappers.<WorkTicketFlowEntity>lambdaUpdate()
.set(WorkTicketFlowEntity::getExecutor, AuthUtil.getUserId().toString())
.set(WorkTicketFlowEntity::getExecuteTime, LocalDateTime.now())
.eq(WorkTicketFlowEntity::getId, workTicketFlowEntity.getId())
);
WorkTicketFlowEntity workTicketFlowEntity = workTicketFlowService.getOne(Wrappers.<WorkTicketFlowEntity>lambdaQuery().eq(WorkTicketFlowEntity::getTicketId, ticketId).eq(WorkTicketFlowEntity::getFlowCode, TicketConstants.FirstWorkTicketFlowStatusEnum.CONFIRM_WORK_FINISH.getStatus()).orderByDesc(WorkTicketFlowEntity::getCreateTime).last("limit 1;"));
workTicketFlowService.update(Wrappers.<WorkTicketFlowEntity>lambdaUpdate().set(WorkTicketFlowEntity::getExecutor, AuthUtil.getUserId().toString()).set(WorkTicketFlowEntity::getExecuteTime, LocalDateTime.now()).eq(WorkTicketFlowEntity::getId, workTicketFlowEntity.getId()));
//更新工作票状态
this.update(Wrappers.<WorkTicketInfoEntity>lambdaUpdate()
.set(WorkTicketInfoEntity::getStatus, status)
.eq(WorkTicketInfoEntity::getId, ticketId)
);
this.update(Wrappers.<WorkTicketInfoEntity>lambdaUpdate().set(WorkTicketInfoEntity::getStatus, status).eq(WorkTicketInfoEntity::getId, ticketId));
//创建延期流程
WorkTicketInfoEntity infoEntity = this.getById(ticketId);
WorkTicketFlowEntity currentFlowEntity = new WorkTicketFlowEntity();
@ -266,9 +257,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
return R.fail(400, "删除失败!未查询到相关记录");
}
boolean flag = this.update(Wrappers.<WorkTicketInfoEntity>lambdaUpdate()
.set(WorkTicketInfoEntity::getStatus, TicketConstants.FirstWorkTicketFlowStatusEnum.TERMINATION.getStatus())
.eq(WorkTicketInfoEntity::getId, id));
boolean flag = this.update(Wrappers.<WorkTicketInfoEntity>lambdaUpdate().set(WorkTicketInfoEntity::getStatus, TicketConstants.FirstWorkTicketFlowStatusEnum.TERMINATION.getStatus()).eq(WorkTicketInfoEntity::getId, id));
/**线下单独删除**/
if (TicketConstants.FirstWorkTicketFlowStatusEnum.OFFLINE.getStatus().equals(entity.getStatus())) {
@ -305,8 +294,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
}
//安全措施
if (CollectionUtil.isNotEmpty(workTicketInfoVO.getWorkTicketSafetyMeasureVOList())) {
Map<String, List<WorkTicketSafetyMeasureVO>> measureMap = workTicketInfoVO.getWorkTicketSafetyMeasureVOList().stream()
.collect(Collectors.groupingBy(WorkTicketSafetyMeasureVO::getType));
Map<String, List<WorkTicketSafetyMeasureVO>> measureMap = workTicketInfoVO.getWorkTicketSafetyMeasureVOList().stream().collect(Collectors.groupingBy(WorkTicketSafetyMeasureVO::getType));
if (ObjectUtil.isNotEmpty(measureMap.get(TicketConstants.MEASURE_TYPE_ONE))) {
workTicketInfoMap.put("matterLibraryListOne", measureMap.get(TicketConstants.MEASURE_TYPE_ONE).stream().map(measure -> {
Map<String, Object> map = PdfUtils.objectToMap(measure);
@ -346,8 +334,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
//获取工作票工作流处理信息
List<WorkTicketFlowVO> workTicketFlowVOList = workTicketInfoVO.getWorkTicketFlowVOList();
//签发
List<WorkTicketFlowVO> signFlow = workTicketFlowVOList.stream()
.filter(f -> TicketConstants.FirstWorkTicketFlowStatusEnum.LICENSE.getStatus().equals(Integer.parseInt(f.getFlowCode()))).collect(Collectors.toList());
List<WorkTicketFlowVO> signFlow = workTicketFlowVOList.stream().filter(f -> TicketConstants.FirstWorkTicketFlowStatusEnum.LICENSE.getStatus().equals(Integer.parseInt(f.getFlowCode()))).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(signFlow)) {
workTicketInfoMap.put("signer", signFlow.get(0).getCreateUserName());
workTicketInfoMap.put("signTime", DateUtil.format(signFlow.get(0).getCreateTime(), TicketConstants.TICKET_DATE_PATTERN));
@ -365,8 +352,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
}
/**负责人收到工作票**/
List<WorkTicketFlowVO> receiveFlow = workTicketFlowVOList.stream()
.filter(f -> TicketConstants.FirstWorkTicketFlowStatusEnum.CONFIRM_MEASURE_PRINCIPAL.getStatus().equals(Integer.parseInt(f.getFlowCode()))).collect(Collectors.toList());
List<WorkTicketFlowVO> receiveFlow = workTicketFlowVOList.stream().filter(f -> TicketConstants.FirstWorkTicketFlowStatusEnum.CONFIRM_MEASURE_PRINCIPAL.getStatus().equals(Integer.parseInt(f.getFlowCode()))).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(receiveFlow)) {
workTicketInfoMap.put("receivePrincipal", receiveFlow.get(0).getCreateUserName());
workTicketInfoMap.put("receiveTime", DateUtil.format(receiveFlow.get(0).getCreateTime(), TicketConstants.TICKET_DATE_PATTERN));
@ -377,8 +363,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
workTicketInfoMap.put("principalConfirm", "");
}
/**负责人确认安全事项**/
List<WorkTicketFlowVO> confirmFlow = workTicketFlowVOList.stream()
.filter(f -> TicketConstants.FirstWorkTicketFlowStatusEnum.CONFIRM_MEASURE_MEMBERS.getStatus().equals(Integer.parseInt(f.getFlowCode()))).collect(Collectors.toList());
List<WorkTicketFlowVO> confirmFlow = workTicketFlowVOList.stream().filter(f -> TicketConstants.FirstWorkTicketFlowStatusEnum.CONFIRM_MEASURE_MEMBERS.getStatus().equals(Integer.parseInt(f.getFlowCode()))).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(confirmFlow)) {
workTicketInfoMap.put("confirmPrincipal", confirmFlow.get(0).getCreateUserName());
workTicketInfoMap.put("confirmTime", DateUtil.format(confirmFlow.get(0).getCreateTime(), TicketConstants.TICKET_DATE_PATTERN));
@ -387,8 +372,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
workTicketInfoMap.put("confirmTime", "");
}
/**工作结束**/
List<WorkTicketFlowVO> finishFlow = workTicketFlowVOList.stream()
.filter(f -> TicketConstants.FirstWorkTicketFlowStatusEnum.END.getStatus().equals(Integer.parseInt(f.getFlowCode()))).collect(Collectors.toList());
List<WorkTicketFlowVO> finishFlow = workTicketFlowVOList.stream().filter(f -> TicketConstants.FirstWorkTicketFlowStatusEnum.END.getStatus().equals(Integer.parseInt(f.getFlowCode()))).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(finishFlow)) {
workTicketInfoMap.put("finisher", finishFlow.get(0).getCreateUserName());
workTicketInfoMap.put("finishTime", DateUtil.format(finishFlow.get(0).getCreateTime(), TicketConstants.TICKET_DATE_PATTERN));
@ -399,8 +383,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
workTicketInfoMap.put("principalFinish", "");
}
/**工作终结**/
List<WorkTicketFlowVO> endFlow = workTicketFlowVOList.stream()
.filter(f -> TicketConstants.FirstWorkTicketFlowStatusEnum.FINISH.getStatus().intValue() == Integer.parseInt(f.getFlowCode())).collect(Collectors.toList());
List<WorkTicketFlowVO> endFlow = workTicketFlowVOList.stream().filter(f -> TicketConstants.FirstWorkTicketFlowStatusEnum.FINISH.getStatus().intValue() == Integer.parseInt(f.getFlowCode())).collect(Collectors.toList());
if (CollectionUtil.isNotEmpty(endFlow)) {
workTicketInfoMap.put("endLicensor", endFlow.get(0).getCreateUserName());
workTicketInfoMap.put("endTime", DateUtil.format(endFlow.get(0).getCreateTime(), TicketConstants.TICKET_DATE_PATTERN));
@ -431,8 +414,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
List<WorkTicketMembersChangeVO> membersChangeList = workTicketInfoVO.getWorkTicketMembersChangeVOList();
if (CollectionUtil.isNotEmpty(membersChangeList)) {
/**工作成员变更详情**/
String membersChangeSituation = membersChangeList.stream().map(mc ->
DateUtil.format(mc.getCreateTime(), TicketConstants.TICKET_DATE_PATTERN).concat(":").concat(mc.getChangeMembersName())).collect(Collectors.joining(";"));
String membersChangeSituation = membersChangeList.stream().map(mc -> DateUtil.format(mc.getCreateTime(), TicketConstants.TICKET_DATE_PATTERN).concat(":").concat(mc.getChangeMembersName())).collect(Collectors.joining(";"));
workTicketInfoMap.put("membersChangeSituation", membersChangeSituation);
workTicketInfoMap.put("memberChangePrincipal", membersChangeList.get(0).getCreateUserName());
} else {
@ -539,13 +521,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
}
//更新状态
boolean flag = this.update(Wrappers.<WorkTicketInfoEntity>lambdaUpdate()
.set(WorkTicketInfoEntity::getStatus, req.getStatus())
.set(WorkTicketInfoEntity::getPrincipal, req.getPrincipal())
.set(WorkTicketInfoEntity::getLicensor, req.getLicensor())
.set(WorkTicketInfoEntity::getLicenseTime, req.getLicenseTime())
.set(WorkTicketInfoEntity::getLicenseEndTime, req.getLicenseEndTime())
.eq(WorkTicketInfoEntity::getId, req.getId()));
boolean flag = this.update(Wrappers.<WorkTicketInfoEntity>lambdaUpdate().set(WorkTicketInfoEntity::getStatus, req.getStatus()).set(WorkTicketInfoEntity::getPrincipal, req.getPrincipal()).set(WorkTicketInfoEntity::getLicensor, req.getLicensor()).set(WorkTicketInfoEntity::getLicenseTime, req.getLicenseTime()).set(WorkTicketInfoEntity::getLicenseEndTime, req.getLicenseEndTime()).eq(WorkTicketInfoEntity::getId, req.getId()));
//新增流程信息
WorkTicketFlowEntity workTicketFlowEntity = new WorkTicketFlowEntity();
@ -732,13 +708,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
if (!userId.contains(AuthUtil.getUserId())) {
throw new ServiceException("当前操作人没有许可人角色,无法执行该操作");
}
update(Wrappers.<WorkTicketInfoEntity>lambdaUpdate()
.set(WorkTicketInfoEntity::getStatus, TicketConstants.FirstWorkTicketFlowStatusEnum.OFFLINE_LICENSE.getStatus())
.set(WorkTicketInfoEntity::getLicensor, AuthUtil.getUserId())
.set(WorkTicketInfoEntity::getLicenseTime, LocalDateTime.now())
.set(WorkTicketInfoEntity::getLicenseEndTime, req.getLicenseEndTime())
.eq(WorkTicketInfoEntity::getId, ticketId)
);
update(Wrappers.<WorkTicketInfoEntity>lambdaUpdate().set(WorkTicketInfoEntity::getStatus, TicketConstants.FirstWorkTicketFlowStatusEnum.OFFLINE_LICENSE.getStatus()).set(WorkTicketInfoEntity::getLicensor, AuthUtil.getUserId()).set(WorkTicketInfoEntity::getLicenseTime, LocalDateTime.now()).set(WorkTicketInfoEntity::getLicenseEndTime, req.getLicenseEndTime()).eq(WorkTicketInfoEntity::getId, ticketId));
return R.success("操作成功");
}
@ -752,10 +722,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
public R finishOfflineTicket(TicketAccessTaskDto ticketAccessTaskDto) {
//更新工作票
WorkTicketInfoDto infoDto = ticketAccessTaskDto.getWorkTicketInfoDto();
update(Wrappers.<WorkTicketInfoEntity>lambdaUpdate()
.set(WorkTicketInfoEntity::getStatus, TicketConstants.FirstWorkTicketFlowStatusEnum.OFFLINE_END.getStatus())
.eq(WorkTicketInfoEntity::getId, infoDto.getId())
);
update(Wrappers.<WorkTicketInfoEntity>lambdaUpdate().set(WorkTicketInfoEntity::getStatus, TicketConstants.FirstWorkTicketFlowStatusEnum.OFFLINE_END.getStatus()).eq(WorkTicketInfoEntity::getId, infoDto.getId()));
//获取工作票实体类
WorkTicketInfoEntity infoEntity = getById(infoDto.getId());
//根据任务类型执行任务
@ -876,41 +843,34 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
* @return
*/
@Override
public BladePage<StandardWorkVo> workTicketListByMonthAndArea(Page<WorkTicketInfoEntity> pageEntity,
StandardTicketWithAreaVo areaVo) {
public BladePage<StandardWorkVo> workTicketListByMonthAndArea(Page<WorkTicketInfoEntity> pageEntity, StandardTicketWithAreaVo areaVo) {
//1.查询
QueryWrapper<WorkTicketInfoEntity> queryWrapper = new QueryWrapper<>();
//开票来源
queryWrapper.eq(Func.isNotEmpty(areaVo.getTaskType()), "sti.task_type",
areaVo.getTaskType());
queryWrapper.eq(Func.isNotEmpty(areaVo.getTaskType()), "sti.task_type", areaVo.getTaskType());
//编号
queryWrapper.like(Func.isNotEmpty(areaVo.getCode()), "sti.code", areaVo.getCode());
//状态
queryWrapper.eq(Func.isNotEmpty(areaVo.getStatus()), "sti.status",
areaVo.getStatus());
queryWrapper.eq(Func.isNotEmpty(areaVo.getStatus()), "sti.status", areaVo.getStatus());
//开始时间
queryWrapper.lt(Func.isNotEmpty(areaVo.getStartTime()), "sti.create_time",
areaVo.getStartTime());
queryWrapper.lt(Func.isNotEmpty(areaVo.getStartTime()), "sti.create_time", areaVo.getStartTime());
//结束时间
queryWrapper.le(Func.isNotEmpty(areaVo.getEndTime()), "sti.create_time",
areaVo.getEndTime());
queryWrapper.le(Func.isNotEmpty(areaVo.getEndTime()), "sti.create_time", areaVo.getEndTime());
queryWrapper.eq("sti.create_dept", areaVo.getAreaId());
queryWrapper.eq(areaVo.getYearMonth() != null, "date_format(sti.create_time,'%Y-%m')",
areaVo.getYearMonth());
queryWrapper.eq(areaVo.getYearMonth() != null, "date_format(sti.create_time,'%Y-%m')", areaVo.getYearMonth());
//如果为1为合格
// queryWrapper.eq("tie.status",1);
Page<WorkTicketInfoEntity> workTicketInfoEntityPage = baseMapper.selectPages(pageEntity, queryWrapper);
//数据转换
List<StandardWorkVo> standardWorkList = new ArrayList<>();
if (CollectionUtil.isNotEmpty(workTicketInfoEntityPage.getRecords())) {
standardWorkList = workTicketInfoEntityPage.getRecords()
.stream().map(workTicketInfoEntity -> {
standardWorkList = workTicketInfoEntityPage.getRecords().stream().map(workTicketInfoEntity -> {
StandardWorkVo standardWorkVo = new StandardWorkVo();
BeanUtils.copyProperties(workTicketInfoEntity, standardWorkVo);
return standardWorkVo;
@ -936,8 +896,7 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
private boolean isTicketPercentById(WorkTicketInfoEntity item) {
LambdaQueryWrapper<TicketInfoEvaluateEntity> ticketInfoEvaluateEntityLambdaQueryWrapper = new LambdaQueryWrapper<>();
ticketInfoEvaluateEntityLambdaQueryWrapper.eq(TicketInfoEvaluateEntity::getTicketId, item.getId());
ticketInfoEvaluateEntityLambdaQueryWrapper.eq(TicketInfoEvaluateEntity::getStatus,
TicketConstants.TicketQualifiedEnum.Qualified.getCode());
ticketInfoEvaluateEntityLambdaQueryWrapper.eq(TicketInfoEvaluateEntity::getStatus, TicketConstants.TicketQualifiedEnum.Qualified.getCode());
// 查询合格评价
int count = ticketInfoEvaluateService.count(ticketInfoEvaluateEntityLambdaQueryWrapper);
return count > 0;
@ -956,6 +915,67 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
LambdaUpdateWrapper<WorkTicketInfoEntity> queryWrapper = new LambdaUpdateWrapper<>();
queryWrapper.set(WorkTicketInfoEntity::getFlowStatus, status);
queryWrapper.set(WorkTicketInfoEntity::getFlowDescription, description);
queryWrapper.eq(WorkTicketInfoEntity::getId,id);
queryWrapper.eq(WorkTicketInfoEntity::getId, id);
}
/**
* 获取工作详情
*
* @param ticketId
* @return
*/
@Override
public WorkTicketVo selectDetailsById(Long ticketId) {
WorkTicketVo workTicketVo = new WorkTicketVo();
//1. 获取工作票详情数据
WorkTicketInfoEntity workTicketInfo = this.getById(ticketId);
if (ObjectUtils.isEmpty(workTicketInfo)) {
throw new ServiceException("未查询到ticketId对应的信息");
}
workTicketVo.setWorkTicket(workTicketInfo);
//2. 安全措施数组
List<WorkTicketSafetyMeasureEntity> workTicketSafetyMeasureEntity = workTicketSafetyMeasureService.selectByTicketId(ticketId);
if (CollectionUtils.isNotEmpty(workTicketSafetyMeasureEntity)) {
workTicketVo.setSafetyMeasuresList(workTicketSafetyMeasureEntity);
}
//3. 工作票工作任务组
List<WorkTicketContentEntity> workTicketContentEntities = workTicketContentService.selectByTicketId(ticketId);
if (CollectionUtils.isNotEmpty(workTicketContentEntities)) {
workTicketVo.setWorkTicketContentDtoList(workTicketContentEntities);
}
//4. 工作票延期
WorkTicketDelayEntity workTicketDelayEntity = delayService.selectByTicketId(ticketId);
if (ObjectUtils.isNotEmpty(workTicketDelayEntity)) {
workTicketVo.setWorkTicketDelay(workTicketDelayEntity);
}
//5.工作结束
WorkTicketFinish workTicketFinish = workTicketFinishService.selectByTicketId(ticketId);
if (ObjectUtils.isNotEmpty(workTicketFinish)) {
workTicketVo.setWorkTicketFinish(workTicketFinish);
}
//6.工作开始时间和结束时间
List<WorkTicketOperateTimeEntity> workTicketOperateTimeEntities =
workTicketOperateTimeService.selectByTicketId(ticketId);
if (CollectionUtils.isNotEmpty(workTicketOperateTimeEntities)) {
workTicketVo.setWorkTicketOperateTimeEntities(workTicketOperateTimeEntities);
}
//7. 工作票负责人变更
WorkTicketPrincipalChangeEntity workTicketPrincipalChangeEntity =
workTicketPrincipalChangeService.selectByTicketId(ticketId);
if (ObjectUtils.isNotEmpty(workTicketPrincipalChangeEntity)) {
workTicketVo.setWorkTicketPrincipalChange(workTicketPrincipalChangeEntity);
}
return workTicketVo;
}
}

16
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketOperateTimeServiceImpl.java

@ -3,6 +3,7 @@ package com.hnac.hzims.ticket.workTicket.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.ticket.workTicket.dto.WorkTicketOperateTimeDto;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketDelayEntity;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketOperateTimeEntity;
import com.hnac.hzims.ticket.workTicket.mapper.WorkTicketOperateTimeMapper;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketOperateTimeService;
@ -59,4 +60,19 @@ public class WorkTicketOperateTimeServiceImpl extends BaseServiceImpl<WorkTicket
}
return queryWrapper;
}
/**
* 工作开始时间和结束时间
*
* @param ticketId
* @return
*/
@Override
public List<WorkTicketOperateTimeEntity> selectByTicketId(Long ticketId) {
LambdaQueryWrapper<WorkTicketOperateTimeEntity> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(WorkTicketOperateTimeEntity::getTicketId,ticketId);
List<WorkTicketOperateTimeEntity> entities = this.list(queryWrapper);
return entities;
}
}

16
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketPrincipalChangeServiceImpl.java

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.ticket.constants.TicketConstants;
import com.hnac.hzims.ticket.twoTicket.entity.WorkTicketFinish;
import com.hnac.hzims.ticket.workTicket.dto.WorkTicketInfoDto;
import com.hnac.hzims.ticket.workTicket.dto.WorkTicketPrincipalChangeDto;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity;
@ -84,4 +85,19 @@ public class WorkTicketPrincipalChangeServiceImpl extends BaseServiceImpl<WorkTi
}
return queryWrapper;
}
/**
* 工作票负责人变更
*
* @param ticketId
* @return
*/
@Override
public WorkTicketPrincipalChangeEntity selectByTicketId(Long ticketId) {
LambdaQueryWrapper<WorkTicketPrincipalChangeEntity> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(WorkTicketPrincipalChangeEntity::getTicketId,ticketId);
List<WorkTicketPrincipalChangeEntity> workTicketPrincipalChangeEntities = this.list(queryWrapper);
return workTicketPrincipalChangeEntities.get(workTicketPrincipalChangeEntities.size() - 1);
}
}

16
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketSafetyMeasureServiceImpl.java

@ -1,6 +1,7 @@
package com.hnac.hzims.ticket.workTicket.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@ -207,4 +208,19 @@ public class WorkTicketSafetyMeasureServiceImpl extends BaseServiceImpl<WorkTick
}
return queryWrapper;
}
/**
* 根据工作票编号对应安全措施数组
*
* @param ticketId
* @return
*/
@Override
public List<WorkTicketSafetyMeasureEntity> selectByTicketId(Long ticketId) {
LambdaQueryWrapper<WorkTicketSafetyMeasureEntity> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(WorkTicketSafetyMeasureEntity::getTicketId,ticketId);
List<WorkTicketSafetyMeasureEntity> entities = this.list(queryWrapper);
return entities;
}
}

59
hzims-service/ticket/src/main/resources/file/新工作票.bpmn20.xml

@ -2,18 +2,16 @@
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:flowable="http://flowable.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.flowable.org/processdef" exporter="Flowable Open Source Modeler" exporterVersion="6.7.1">
<process id="workTicket" name="新工作票" isExecutable="true">
<startEvent id="startEvent1" name="工作负责人开票" flowable:formFieldValidation="true"></startEvent>
<userTask id="sid-5E7013A9-385A-4EE4-91B6-FD5328D05E2A" name="签发人签发" flowable:candidateGroups="${signer}" flowable:formFieldValidation="true">
<userTask id="sid-5E7013A9-385A-4EE4-91B6-FD5328D05E2A" name="签发人签发" flowable:candidateGroups="1455733196406894594" flowable:formFieldValidation="true">
<extensionElements>
<flowable:executionListener event="start" class="org.springblade.flow.engine.listener.DynamicTaskUserListener"></flowable:executionListener>
<flowable:taskListener event="create" class="org.springblade.flow.engine.listener.DynamicTaskUserListener"></flowable:taskListener>
</extensionElements>
</userTask>
<sequenceFlow id="sid-9139C410-EEF1-426B-80DE-CE61E405D476" sourceRef="startEvent1" targetRef="sid-5E7013A9-385A-4EE4-91B6-FD5328D05E2A"></sequenceFlow>
<exclusiveGateway id="sid-AE1F1B34-40E2-49A0-AF63-D7F46152C68B"></exclusiveGateway>
<sequenceFlow id="sid-4B0EAA53-D3FE-4EF0-97D2-9F849E47C2DC" sourceRef="sid-5E7013A9-385A-4EE4-91B6-FD5328D05E2A" targetRef="sid-AE1F1B34-40E2-49A0-AF63-D7F46152C68B"></sequenceFlow>
<endEvent id="sid-F6E6B8A6-D73D-4DF5-99A1-609660DCC4F8"></endEvent>
<userTask id="sid-355DB6EC-7D54-4537-B80F-C26CD716ADA1" name="运行人员接收" flowable:candidateGroups="${operatingCrew}" flowable:formFieldValidation="true">
<userTask id="sid-355DB6EC-7D54-4537-B80F-C26CD716ADA1" name="运行人员接收" flowable:candidateGroups="1425655583937208322" flowable:formFieldValidation="true">
<extensionElements>
<flowable:executionListener event="start" class="org.springblade.flow.engine.listener.DynamicTaskUserListener"></flowable:executionListener>
<flowable:taskListener event="create" class="org.springblade.flow.engine.listener.DynamicTaskUserListener"></flowable:taskListener>
</extensionElements>
</userTask>
@ -43,45 +41,48 @@
</userTask>
<userTask id="sid-72E8C993-D426-476F-BF7F-F7EC3B783022" name="许可人确认结束" flowable:candidateGroups="${licensor}" flowable:formFieldValidation="true">
<extensionElements>
<flowable:executionListener event="start" class="org.springblade.flow.engine.listener.DynamicTaskUserListener"></flowable:executionListener>
<flowable:taskListener event="create" class="org.springblade.flow.engine.listener.DynamicTaskUserListener"></flowable:taskListener>
</extensionElements>
</userTask>
<sequenceFlow id="sid-7CA973D4-40DF-49AB-9822-959508274656" sourceRef="sid-308606FE-820A-4A23-AF2A-4B1E9BBD267C" targetRef="sid-72E8C993-D426-476F-BF7F-F7EC3B783022"></sequenceFlow>
<endEvent id="sid-F5C6B054-72BA-4531-BF1E-BF9757B2AFDD" name="结束"></endEvent>
<sequenceFlow id="sid-44567028-AC19-441E-ACB1-A3CFAADF1DDD" sourceRef="sid-72E8C993-D426-476F-BF7F-F7EC3B783022" targetRef="sid-F5C6B054-72BA-4531-BF1E-BF9757B2AFDD"></sequenceFlow>
<sequenceFlow id="sid-9DC6746E-6FCC-4006-B68A-98F280A5263D" sourceRef="sid-5476EB52-438F-4C74-94FB-88A6EA6625EA" targetRef="sid-FBFCD5F6-FD6E-46C7-882C-EB53C8ADD2EA"></sequenceFlow>
<userTask id="sid-DABC1AF3-EB78-4913-8BFE-EA44C887B418" name="签发人审核" flowable:candidateGroups="${signer}" flowable:formFieldValidation="true">
<userTask id="sid-DABC1AF3-EB78-4913-8BFE-EA44C887B418" name="签发人审核" flowable:candidateGroups="1455733196406894594" flowable:formFieldValidation="true">
<extensionElements>
<flowable:executionListener event="start" class="org.springblade.flow.engine.listener.DynamicTaskUserListener"></flowable:executionListener>
<flowable:taskListener event="create" class="org.springblade.flow.engine.listener.DynamicTaskUserListener"></flowable:taskListener>
</extensionElements>
</userTask>
<userTask id="sid-48995D69-1E09-4ED2-8C81-5D1A6D015FA5" name="许可人许可" flowable:candidateGroups="${licensor}" flowable:formFieldValidation="true">
<userTask id="sid-48995D69-1E09-4ED2-8C81-5D1A6D015FA5" name="许可人许可" flowable:candidateGroups="1455733292607451138" flowable:formFieldValidation="true">
<extensionElements>
<flowable:executionListener event="start" class="org.springblade.flow.engine.listener.DynamicTaskUserListener"></flowable:executionListener>
<flowable:taskListener event="create" class="org.springblade.flow.engine.listener.DynamicTaskUserListener"></flowable:taskListener>
</extensionElements>
</userTask>
<sequenceFlow id="sid-01DEF90D-6E6D-4E1C-9DB2-BCF57F997914" name="作废" sourceRef="sid-21B346B8-4672-429C-95D7-FDAC0F364136" targetRef="sid-F6E6B8A6-D73D-4DF5-99A1-609660DCC4F8">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${recieveFlag==false}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-2551F3F7-0B18-46ED-A0FA-F1521C3F44E7" name="通过" sourceRef="sid-21B346B8-4672-429C-95D7-FDAC0F364136" targetRef="sid-F35C4A79-53AF-40B8-AFBD-AF7283CC5708">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${recieveFlag==true}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-03099AE3-D7AD-40EB-9D5E-F148124C2B06" sourceRef="sid-0CB1456A-D85C-4473-A032-FAEF62EFBF22" targetRef="sid-48995D69-1E09-4ED2-8C81-5D1A6D015FA5"></sequenceFlow>
<sequenceFlow id="sid-58A4E292-9777-4D8D-8494-0ABFA1BFD3A6" sourceRef="sid-48995D69-1E09-4ED2-8C81-5D1A6D015FA5" targetRef="sid-5476EB52-438F-4C74-94FB-88A6EA6625EA"></sequenceFlow>
<sequenceFlow id="sid-3299B7B1-1FB5-4F4B-A440-A6DE86D93530" sourceRef="sid-DABC1AF3-EB78-4913-8BFE-EA44C887B418" targetRef="sid-48995D69-1E09-4ED2-8C81-5D1A6D015FA5"></sequenceFlow>
<sequenceFlow id="sid-C0864800-3575-4EA5-BDB2-53CB0064185D" name="通过间断" sourceRef="sid-FBFCD5F6-FD6E-46C7-882C-EB53C8ADD2EA" targetRef="sid-308606FE-820A-4A23-AF2A-4B1E9BBD267C">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${flag==true}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-4B0EAA53-D3FE-4EF0-97D2-9F849E47C2DC" sourceRef="sid-5E7013A9-385A-4EE4-91B6-FD5328D05E2A" targetRef="sid-AE1F1B34-40E2-49A0-AF63-D7F46152C68B"></sequenceFlow>
<sequenceFlow id="sid-4219D0D3-DDBC-49E1-B40C-1B54C33B5B46" name="作废" sourceRef="sid-AE1F1B34-40E2-49A0-AF63-D7F46152C68B" targetRef="sid-F6E6B8A6-D73D-4DF5-99A1-609660DCC4F8">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${signFlag==false}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-68BB74A5-8B6B-41CE-A158-66C6E9233012" name="通过" sourceRef="sid-AE1F1B34-40E2-49A0-AF63-D7F46152C68B" targetRef="sid-355DB6EC-7D54-4537-B80F-C26CD716ADA1">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${signFlag==true}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-C0864800-3575-4EA5-BDB2-53CB0064185D" name="通过间断" sourceRef="sid-FBFCD5F6-FD6E-46C7-882C-EB53C8ADD2EA" targetRef="sid-308606FE-820A-4A23-AF2A-4B1E9BBD267C">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${flag==true}]]></conditionExpression>
<sequenceFlow id="sid-2551F3F7-0B18-46ED-A0FA-F1521C3F44E7" name="通过" sourceRef="sid-21B346B8-4672-429C-95D7-FDAC0F364136" targetRef="sid-F35C4A79-53AF-40B8-AFBD-AF7283CC5708">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${recieveFlag==true}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-FB7BF0B3-5189-437F-B29D-B87E22A81460" name="工作票转移" sourceRef="sid-FBFCD5F6-FD6E-46C7-882C-EB53C8ADD2EA" targetRef="sid-DABC1AF3-EB78-4913-8BFE-EA44C887B418">
<sequenceFlow id="sid-3BAE05DE-BF27-49CE-BA94-F50A6671DC66" name="工作票延期" sourceRef="sid-FBFCD5F6-FD6E-46C7-882C-EB53C8ADD2EA" targetRef="sid-48995D69-1E09-4ED2-8C81-5D1A6D015FA5">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${flag==delay}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-3BAE05DE-BF27-49CE-BA94-F50A6671DC66" sourceRef="sid-FBFCD5F6-FD6E-46C7-882C-EB53C8ADD2EA" targetRef="sid-48995D69-1E09-4ED2-8C81-5D1A6D015FA5"></sequenceFlow>
<sequenceFlow id="sid-FB7BF0B3-5189-437F-B29D-B87E22A81460" name="工作票转移" sourceRef="sid-FBFCD5F6-FD6E-46C7-882C-EB53C8ADD2EA" targetRef="sid-DABC1AF3-EB78-4913-8BFE-EA44C887B418">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${flag==transfe}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="sid-9DC6746E-6FCC-4006-B68A-98F280A5263D" sourceRef="sid-5476EB52-438F-4C74-94FB-88A6EA6625EA" targetRef="sid-FBFCD5F6-FD6E-46C7-882C-EB53C8ADD2EA"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_workTicket">
<bpmndi:BPMNPlane bpmnElement="workTicket" id="BPMNPlane_workTicket">
@ -104,10 +105,10 @@
<omgdc:Bounds height="40.0" width="40.0" x="640.0" y="158.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-F35C4A79-53AF-40B8-AFBD-AF7283CC5708" id="BPMNShape_sid-F35C4A79-53AF-40B8-AFBD-AF7283CC5708">
<omgdc:Bounds height="80.0" width="100.0" x="794.9999763071544" y="138.0"></omgdc:Bounds>
<omgdc:Bounds height="80.0" width="100.0" x="780.0" y="135.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-0CB1456A-D85C-4473-A032-FAEF62EFBF22" id="BPMNShape_sid-0CB1456A-D85C-4473-A032-FAEF62EFBF22">
<omgdc:Bounds height="80.0" width="100.0" x="960.0" y="138.0"></omgdc:Bounds>
<omgdc:Bounds height="80.0" width="100.0" x="960.0" y="135.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="sid-5476EB52-438F-4C74-94FB-88A6EA6625EA" id="BPMNShape_sid-5476EB52-438F-4C74-94FB-88A6EA6625EA">
<omgdc:Bounds height="80.0" width="100.0" x="795.0" y="270.0"></omgdc:Bounds>
@ -134,9 +135,9 @@
<omgdi:waypoint x="660.0" y="310.0"></omgdi:waypoint>
<omgdi:waypoint x="549.9499999998765" y="310.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-3BAE05DE-BF27-49CE-BA94-F50A6671DC66" id="BPMNEdge_sid-3BAE05DE-BF27-49CE-BA94-F50A6671DC66" flowable:sourceDockerX="20.5" flowable:sourceDockerY="20.5" flowable:targetDockerX="50.0" flowable:targetDockerY="40.0">
<omgdi:waypoint x="680.5" y="290.5"></omgdi:waypoint>
<omgdi:waypoint x="680.5" y="241.0"></omgdi:waypoint>
<bpmndi:BPMNEdge bpmnElement="sid-3BAE05DE-BF27-49CE-BA94-F50A6671DC66" id="BPMNEdge_sid-3BAE05DE-BF27-49CE-BA94-F50A6671DC66" flowable:sourceDockerX="20.0" flowable:sourceDockerY="20.0" flowable:targetDockerX="50.0" flowable:targetDockerY="40.0">
<omgdi:waypoint x="680.0" y="290.0"></omgdi:waypoint>
<omgdi:waypoint x="680.0" y="241.0"></omgdi:waypoint>
<omgdi:waypoint x="1010.0" y="241.0"></omgdi:waypoint>
<omgdi:waypoint x="1010.0" y="270.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
@ -158,7 +159,7 @@
<omgdi:waypoint x="1010.0" y="349.95000000000005"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-03099AE3-D7AD-40EB-9D5E-F148124C2B06" id="BPMNEdge_sid-03099AE3-D7AD-40EB-9D5E-F148124C2B06" flowable:sourceDockerX="50.0" flowable:sourceDockerY="40.0" flowable:targetDockerX="50.0" flowable:targetDockerY="40.0">
<omgdi:waypoint x="1010.0" y="217.95000000000002"></omgdi:waypoint>
<omgdi:waypoint x="1010.0" y="214.95000000000002"></omgdi:waypoint>
<omgdi:waypoint x="1010.0" y="270.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-01DEF90D-6E6D-4E1C-9DB2-BCF57F997914" id="BPMNEdge_sid-01DEF90D-6E6D-4E1C-9DB2-BCF57F997914" flowable:sourceDockerX="20.0" flowable:sourceDockerY="20.0" flowable:targetDockerX="14.0" flowable:targetDockerY="14.0">
@ -167,8 +168,10 @@
<omgdi:waypoint x="423.9499212085268" y="74.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-2551F3F7-0B18-46ED-A0FA-F1521C3F44E7" id="BPMNEdge_sid-2551F3F7-0B18-46ED-A0FA-F1521C3F44E7" flowable:sourceDockerX="20.0" flowable:sourceDockerY="20.0" flowable:targetDockerX="50.0" flowable:targetDockerY="40.0">
<omgdi:waypoint x="679.9446110203799" y="178.0"></omgdi:waypoint>
<omgdi:waypoint x="794.9999763071544" y="178.0"></omgdi:waypoint>
<omgdi:waypoint x="679.9357703280889" y="178.0"></omgdi:waypoint>
<omgdi:waypoint x="730.0" y="178.0"></omgdi:waypoint>
<omgdi:waypoint x="730.0" y="175.0"></omgdi:waypoint>
<omgdi:waypoint x="780.0" y="175.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-4B0EAA53-D3FE-4EF0-97D2-9F849E47C2DC" id="BPMNEdge_sid-4B0EAA53-D3FE-4EF0-97D2-9F849E47C2DC" flowable:sourceDockerX="50.0" flowable:sourceDockerY="40.0" flowable:targetDockerX="20.0" flowable:targetDockerY="20.0">
<omgdi:waypoint x="324.95000000000005" y="178.0"></omgdi:waypoint>
@ -191,8 +194,8 @@
<omgdi:waypoint x="640.0" y="178.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-8FA8740A-093B-4756-B489-299A6FFD6C95" id="BPMNEdge_sid-8FA8740A-093B-4756-B489-299A6FFD6C95" flowable:sourceDockerX="50.0" flowable:sourceDockerY="40.0" flowable:targetDockerX="50.0" flowable:targetDockerY="40.0">
<omgdi:waypoint x="894.9499763070487" y="178.0"></omgdi:waypoint>
<omgdi:waypoint x="959.9999999999795" y="178.0"></omgdi:waypoint>
<omgdi:waypoint x="879.9499999999431" y="175.0"></omgdi:waypoint>
<omgdi:waypoint x="959.9999999999723" y="175.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="sid-68BB74A5-8B6B-41CE-A158-66C6E9233012" id="BPMNEdge_sid-68BB74A5-8B6B-41CE-A158-66C6E9233012" flowable:sourceDockerX="20.0" flowable:sourceDockerY="20.0" flowable:targetDockerX="50.0" flowable:targetDockerY="40.0">
<omgdi:waypoint x="429.9426165803081" y="178.0"></omgdi:waypoint>

BIN
hzims-service/ticket/src/main/resources/template/新电气第一种工作票模板.xlsx

Binary file not shown.
Loading…
Cancel
Save