Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
yang_shj 1 year ago
parent
commit
409444e1eb
  1. 32
      hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/constant/TicketProcessConstant.java
  2. 43
      hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/fegin/ProcessDictFeignService.java
  3. 43
      hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/fegin/fallback/ProcessDictFeignServiceFallback.java
  4. 2
      hzims-biz-common/src/main/java/com/hnac/hzims/common/to/process/ProcessWorkFlowResponse.java
  5. 12
      hzims-service-api/hzims-operational-api/pom.xml
  6. 42
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/entity/OperMaintenanceTaskEntity.java
  7. 30
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/feign/MaintenanceFeignClient.java
  8. 19
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/feign/fallback/MaintenanceFeignClientFallback.java
  9. 2
      hzims-service-api/ticket-api/pom.xml
  10. 27
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/ticketprocess/fallback/OperationTicketFeignClientFallback.java
  11. 27
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/ticketprocess/fallback/TicketProcessFeignClientFallback.java
  12. 34
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/ticketprocess/feign/OperationTicketFeignClient.java
  13. 33
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/ticketprocess/feign/TicketProcessFeignClient.java
  14. 14
      hzims-service/hzims-middle/pom.xml
  15. 2
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/CodeGenerator.java
  16. 12
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/consumer/StandardWorkTicketConsumer.java
  17. 44
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/controller/ProcessDictController.java
  18. 17
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/controller/ProcessTypeController.java
  19. 2
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/controller/WorkflowOperationLogController.java
  20. 2
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/entity/ProcessDict.java
  21. 2
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/entity/ProcessType.java
  22. 16
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/entity/WorkflowOperationLog.java
  23. 4
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/mapper/ProcessDictMapper.java
  24. 4
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/mapper/ProcessTypeMapper.java
  25. 4
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/mapper/WorkflowOperationLogMapper.java
  26. 2
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/properties/TicketProperties.java
  27. 2
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/properties/WorkTicketProperties.java
  28. 4
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/service/ProcessDictService.java
  29. 4
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/service/ProcessTypeService.java
  30. 4
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/service/WorkflowOperationLogService.java
  31. 12
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/service/impl/ProcessDictServiceImpl.java
  32. 8
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/service/impl/ProcessTypeServiceImpl.java
  33. 8
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/service/impl/WorkflowOperationLogServiceImpl.java
  34. 8
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/abstracts/ProcessAbstractService.java
  35. 2
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/core/ProcessIdWorker.java
  36. 2
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/entity/WorkflowQueue.java
  37. 6
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/service/ProcessService.java
  38. 25
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/MachineryTicketProcessServiceImpl.java
  39. 66
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/MaintenanceProcessServiceImpl.java
  40. 30
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/OneTicketProcessServiceImpl.java
  41. 31
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/OperationTicketProcessServiceImpl.java
  42. 2
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/controller/SysLogController.java
  43. 3
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.java
  44. 2
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/SysLogService.java
  45. 3
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/SysLogServiceImpl.java
  46. 2
      hzims-service/operational/pom.xml
  47. 66
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/controller/MaintenanceController.java
  48. 30
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/MaintenanceService.java
  49. 343
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/MaintenanceServiceImpl.java
  50. 222
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/vo/OperMaintenanceTaskEntityVo.java
  51. 23
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/util/StringObjUtils.java
  52. 2
      hzims-service/ticket/pom.xml
  53. 28
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/constant/TicketProcessConstant.java
  54. 3
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/redisConsume/WorkTicketMsgConsume.java
  55. 19
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/OperationTicketController.java
  56. 78
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardWorkTicketController.java
  57. 4
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/OperationTicketService.java
  58. 28
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java
  59. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/utils/OperationWordHelper.java
  60. 30
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/TicketProcessController.java
  61. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/TicketProcessService.java
  62. 29
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java
  63. 41
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/operation/StandardTicketInfoVo.java
  64. BIN
      hzims-service/ticket/src/main/resources/template/secondary/工作票安全措施附页.docx
  65. BIN
      hzims-service/ticket/src/main/resources/template/secondary/有限空间监测记录单.docx
  66. BIN
      hzims-service/ticket/src/main/resources/template/secondary/每日开工和收工时间附页.docx
  67. BIN
      hzims-service/ticket/src/main/resources/template/水力机械工作票模版.docx
  68. BIN
      hzims-service/ticket/src/main/resources/template/电气第二种工作票模版.docx

32
hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/constant/TicketProcessConstant.java

@ -0,0 +1,32 @@
package com.hnac.hzims.common.logs.constant;
/**
* 开票常量类
*
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/4/8 10:53
*/
public class TicketProcessConstant {
/**
* 第一种工作票的key
*/
public static final String FIRST_TICKET_KEY = "networking";
/**
* 操作票
*/
public static final String OPERATION_TICKET_KEY = "moreActionBankDirect";
/**
* 水力机械工作票
*/
public static final String MACHINERY_TICKET_KEY = "machinery";
/**
* 日常维护
*/
public static final String MAINTENANCE_KEY = "maintenance";
}

43
hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/fegin/ProcessDictFeignService.java

@ -0,0 +1,43 @@
package com.hnac.hzims.common.logs.fegin;
import com.hnac.hzims.common.logs.fegin.fallback.ProcessDictFeignServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.time.LocalDateTime;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/6/15 15:16
*/
@Repository
@FeignClient(value = "hzims-middle", fallback = ProcessDictFeignServiceFallback.class)
public interface ProcessDictFeignService {
/**
* 获取工作票工作票唯一ID
*
* @param staff
* @param typeInstrument
* @param createTime
* @return
*/
@GetMapping("/process-dict/getTicketByCode")
public String getTicketByCode(@RequestParam("staff") String staff,
@RequestParam("typeInstrument") String typeInstrument,
@RequestParam("createTime") LocalDateTime createTime);
/**
* 根据工作流key获取工作流value
*
* @param dictKey
* @return
*/
@GetMapping("/process-dict/selectDictValueByKey")
public String selectDictValueByKey(@RequestParam("dictKey") String dictKey);
}

43
hzims-biz-common/src/main/java/com/hnac/hzims/common/logs/fegin/fallback/ProcessDictFeignServiceFallback.java

@ -0,0 +1,43 @@
package com.hnac.hzims.common.logs.fegin.fallback;
import com.hnac.hzims.common.logs.fegin.ProcessDictFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/6/15 15:17
*/
@Slf4j
@Service
public class ProcessDictFeignServiceFallback implements ProcessDictFeignService {
/**
* 获取工作票工作票唯一ID
*
* @param staff
* @param typeInstrument
* @param createTime
* @return
*/
@Override
public String getTicketByCode(String staff, String typeInstrument, LocalDateTime createTime) {
log.error("获取工作票工作票唯一ID 熔断措施");
return null;
}
/**
* 根据工作流key获取工作流value
*
* @param dictKey
* @return
*/
@Override
public String selectDictValueByKey(String dictKey) {
log.error("根据工作流key获取工作流value 熔断措施");
return null;
}
}

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/response/ProcessWorkFlowResponse.java → hzims-biz-common/src/main/java/com/hnac/hzims/common/to/process/ProcessWorkFlowResponse.java

@ -1,4 +1,4 @@
package com.hnac.hzims.ticket.response;
package com.hnac.hzims.common.to.process;
import lombok.Data;
import lombok.EqualsAndHashCode;

12
hzims-service-api/hzims-operational-api/pom.xml

@ -57,6 +57,18 @@
<groupId>org.springblade</groupId>
<artifactId>blade-system-api</artifactId>
</dependency>
<dependency>
<groupId>com.hnac.hzims</groupId>
<artifactId>hzims-model</artifactId>
<version>4.0.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.hnac.hzims</groupId>
<artifactId>hzims-biz-common</artifactId>
</dependency>
</dependencies>
</project>

42
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/entity/OperMaintenanceTaskEntity.java

@ -149,4 +149,46 @@ public class OperMaintenanceTaskEntity extends TenantEntity {
@ApiModelProperty(value = "消息推送模板ID")
@JsonSerialize(nullsUsing = NullSerializer.class)
private Long messageTemplateId;
/**
* 流程状态'
*/
@ApiModelProperty("流程状态")
private Integer flowStatus;
/**
* 流程描述
*/
@ApiModelProperty("流程描述")
private String flowDescription;
/**
* 下一个审批人
*/
@ApiModelProperty("下一个审批人")
private String nextStepOperator;
/**
* 用户Id
*/
@ApiModelProperty("用户Id")
private String flowUserId;
/**
* 当前任务名
*/
@ApiModelProperty("当前任务名")
private String flowTaskName;
/**
* 当前任务名
*/
@ApiModelProperty("当前任务名")
private String flowTaskId;
}

30
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/feign/MaintenanceFeignClient.java

@ -0,0 +1,30 @@
package com.hnac.hzims.operational.maintenance.feign;
import com.hnac.hzims.common.to.process.ProcessWorkFlowResponse;
import com.hnac.hzims.operational.OperationalConstants;
import com.hnac.hzims.operational.maintenance.feign.fallback.MaintenanceFeignClientFallback;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/6/14 15:12
*/
@FeignClient(
value = OperationalConstants.APP_NAME,
fallback = MaintenanceFeignClientFallback.class
)
@Repository
public interface MaintenanceFeignClient {
@PostMapping("/maintenance/findPending")
@ApiOperation(value = "日常维护待处理")
public Boolean findPending(@RequestBody ProcessWorkFlowResponse response);
}

19
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/feign/fallback/MaintenanceFeignClientFallback.java

@ -0,0 +1,19 @@
package com.hnac.hzims.operational.maintenance.feign.fallback;
import com.hnac.hzims.common.to.process.ProcessWorkFlowResponse;
import com.hnac.hzims.operational.maintenance.feign.MaintenanceFeignClient;
import org.springframework.stereotype.Component;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/6/14 15:13
*/
@Component
public class MaintenanceFeignClientFallback implements MaintenanceFeignClient {
@Override
public Boolean findPending(ProcessWorkFlowResponse response) {
throw new IllegalArgumentException("日常维护流程出现异常呢");
}
}

2
hzims-service-api/ticket-api/pom.xml

@ -21,5 +21,5 @@
<groupId>com.hnac.hzims</groupId>
<artifactId>hzims-operational-api</artifactId>
</dependency>
</dependencies>
</dependencies>
</project>

27
hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/ticketprocess/fallback/OperationTicketFeignClientFallback.java

@ -0,0 +1,27 @@
package com.hnac.hzims.ticket.ticketprocess.fallback;
import com.hnac.hzims.common.to.process.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.ticketprocess.feign.OperationTicketFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/6/15 11:41
*/
@Slf4j
@Component
public class OperationTicketFeignClientFallback implements OperationTicketFeignClient {
/**
* 操作票待处理
*
* @param response
*/
@Override
public Boolean findPending(ProcessWorkFlowResponse response) {
log.error("操作票流程出现异常呢");
return false;
}
}

27
hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/ticketprocess/fallback/TicketProcessFeignClientFallback.java

@ -0,0 +1,27 @@
package com.hnac.hzims.ticket.ticketprocess.fallback;
import com.hnac.hzims.common.to.process.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.ticketprocess.feign.TicketProcessFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/6/15 11:44
*/
@Slf4j
@Component
public class TicketProcessFeignClientFallback implements TicketProcessFeignClient {
/**
* 工作票待处理
*
* @param response
*/
@Override
public Boolean findPending(ProcessWorkFlowResponse response) {
log.error("工作票出现异常呢");
return false;
}
}

34
hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/ticketprocess/feign/OperationTicketFeignClient.java

@ -0,0 +1,34 @@
package com.hnac.hzims.ticket.ticketprocess.feign;
import com.hnac.hzims.common.to.process.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.constants.TicketConstants;
import com.hnac.hzims.ticket.ticketprocess.fallback.OperationTicketFeignClientFallback;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/6/15 11:39
*/
@FeignClient(
value = TicketConstants.APP_NAME,
fallback = OperationTicketFeignClientFallback.class
)
public interface OperationTicketFeignClient {
/**
* 操作票待处理
* @param response
*/
@PostMapping("/operation-ticket/findPending")
@ApiOperation(value = "操作票待处理")
public Boolean findPending(@RequestBody ProcessWorkFlowResponse response);
}

33
hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/ticketprocess/feign/TicketProcessFeignClient.java

@ -0,0 +1,33 @@
package com.hnac.hzims.ticket.ticketprocess.feign;
import com.hnac.hzims.common.to.process.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.constants.TicketConstants;
import com.hnac.hzims.ticket.ticketprocess.fallback.TicketProcessFeignClientFallback;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/6/15 11:35
*/
@FeignClient(
value = TicketConstants.APP_NAME,
fallback = TicketProcessFeignClientFallback.class
)
public interface TicketProcessFeignClient {
/**
* 工作票待处理
*
* @param response
*/
@PostMapping("/ticket-process/findPending")
@ApiOperation(value = "工作票待处理")
public Boolean findPending(@RequestBody ProcessWorkFlowResponse response);
}

14
hzims-service/hzims-middle/pom.xml

@ -66,6 +66,20 @@
<artifactId>swagger-bootstrap-ui</artifactId>
<version>${swagger-bootstrap-ui.version}</version>
</dependency>
<dependency>
<groupId>com.hnac.hzims</groupId>
<artifactId>hzims-operational-api</artifactId>
</dependency>
<dependency>
<groupId>com.hnac.hzims</groupId>
<artifactId>hzims-model</artifactId>
<version>4.0.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.hnac.hzims</groupId>
<artifactId>ticket-api</artifactId>
</dependency>
</dependencies>

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/CodeGenerator.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/CodeGenerator.java

@ -1,4 +1,4 @@
// package com.hnac.hzims.ticket.processflow;
package com.hnac.hzims.middle.processflow;// package com.hnac.hzims.ticket.processflow;
//
// import com.baomidou.mybatisplus.generator.AutoGenerator;
// import com.baomidou.mybatisplus.generator.InjectionConfig;

12
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/consumer/StandardWorkTicketConsumer.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/consumer/StandardWorkTicketConsumer.java

@ -1,12 +1,12 @@
package com.hnac.hzims.ticket.processflow.consumer;
package com.hnac.hzims.middle.processflow.consumer;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.hnac.hzims.ticket.processflow.entity.WorkflowOperationLog;
import com.hnac.hzims.ticket.processflow.service.WorkflowOperationLogService;
import com.hnac.hzims.ticket.processflow.strategy.entity.WorkflowQueue;
import com.hnac.hzims.ticket.processflow.strategy.service.ProcessService;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse;
import com.hnac.hzims.middle.processflow.entity.WorkflowOperationLog;
import com.hnac.hzims.middle.processflow.service.WorkflowOperationLogService;
import com.hnac.hzims.middle.processflow.strategy.entity.WorkflowQueue;
import com.hnac.hzims.middle.processflow.strategy.service.ProcessService;
import com.hnac.hzims.common.to.process.ProcessWorkFlowResponse;
import lombok.extern.slf4j.Slf4j;
import org.springblade.queue.annotation.RedisQueue;
import org.springblade.queue.consume.IQueueConsume;

44
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/controller/ProcessDictController.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/controller/ProcessDictController.java

@ -1,13 +1,18 @@
package com.hnac.hzims.ticket.processflow.controller;
package com.hnac.hzims.middle.processflow.controller;
import com.hnac.hzims.ticket.processflow.entity.ProcessDict;
import com.hnac.hzims.ticket.processflow.service.ProcessDictService;
import groovy.util.logging.Slf4j;
import com.hnac.hzims.middle.processflow.entity.ProcessDict;
import com.hnac.hzims.middle.processflow.service.ProcessDictService;
import com.hnac.hzims.middle.processflow.strategy.core.ProcessIdWorker;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.time.LocalDateTime;
/**
* @Author WL
* @Version v1.0
@ -25,10 +30,11 @@ public class ProcessDictController {
private final ProcessDictService processDictService;
private final ProcessIdWorker processIdWorker;
@GetMapping("/test")
public void test(){
public void test() {
// ProcessDict processDict = new ProcessDict();
// processDict.setDictKey("networking");
// processDict.setDictSort(0);
@ -51,4 +57,32 @@ public class ProcessDictController {
}
/**
* 获取工作票工作票唯一ID
*
* @param staff
* @param typeInstrument
* @param createTime
* @return
*/
@GetMapping("/getTicketByCode")
public String getTicketByCode(@RequestParam("staff") String staff,
@RequestParam("typeInstrument") String typeInstrument,
@RequestParam("createTime") LocalDateTime createTime) {
return processIdWorker.getTicketByCode(staff, typeInstrument, createTime);
}
/**
* 根据工作流key获取工作流value
*
* @param dictKey
* @return
*/
@GetMapping("/selectDictValueByKey")
public String selectDictValueByKey(@RequestParam("dictKey") String dictKey) {
return processDictService.selectDictValueByKey(dictKey);
}
}

17
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/controller/ProcessTypeController.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/controller/ProcessTypeController.java

@ -1,17 +1,17 @@
package com.hnac.hzims.ticket.processflow.controller;
package com.hnac.hzims.middle.processflow.controller;
import com.alibaba.fastjson.JSON;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.ticket.processflow.entity.ProcessType;
import com.hnac.hzims.ticket.processflow.properties.TicketProperties;
import com.hnac.hzims.ticket.processflow.properties.WorkTicketProperties;
import com.hnac.hzims.ticket.processflow.service.ProcessTypeService;
import com.hnac.hzims.ticket.processflow.strategy.entity.WorkflowQueue;
import com.hnac.hzims.ticket.processflow.strategy.service.ProcessService;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse;
import com.hnac.hzims.middle.processflow.entity.ProcessType;
import com.hnac.hzims.middle.processflow.properties.TicketProperties;
import com.hnac.hzims.middle.processflow.properties.WorkTicketProperties;
import com.hnac.hzims.middle.processflow.service.ProcessTypeService;
import com.hnac.hzims.middle.processflow.strategy.entity.WorkflowQueue;
import com.hnac.hzims.middle.processflow.strategy.service.ProcessService;
import com.hnac.hzims.common.to.process.ProcessWorkFlowResponse;
import lombok.RequiredArgsConstructor;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.jackson.JsonUtil;
@ -22,7 +22,6 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.stream.Collectors;

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/controller/WorkflowOperationLogController.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/controller/WorkflowOperationLogController.java

@ -1,4 +1,4 @@
package com.hnac.hzims.ticket.processflow.controller;
package com.hnac.hzims.middle.processflow.controller;
import org.springframework.web.bind.annotation.RequestMapping;

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/entity/ProcessDict.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/entity/ProcessDict.java

@ -1,4 +1,4 @@
package com.hnac.hzims.ticket.processflow.entity;
package com.hnac.hzims.middle.processflow.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/entity/ProcessType.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/entity/ProcessType.java

@ -1,4 +1,4 @@
package com.hnac.hzims.ticket.processflow.entity;
package com.hnac.hzims.middle.processflow.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;

16
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/entity/WorkflowOperationLog.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/entity/WorkflowOperationLog.java

@ -1,4 +1,4 @@
package com.hnac.hzims.ticket.processflow.entity;
package com.hnac.hzims.middle.processflow.entity;
import com.baomidou.mybatisplus.annotation.*;
@ -60,8 +60,18 @@ public class WorkflowOperationLog implements Serializable {
/**
* 表单
*/
@TableField("form_data")
private String formData;
@TableField("variables")
private String variables;
/**
* 用户Id
*/
@TableField("variables")
private String userId;
/**
* 创建时间

4
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/mapper/ProcessDictMapper.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/mapper/ProcessDictMapper.java

@ -1,6 +1,6 @@
package com.hnac.hzims.ticket.processflow.mapper;
package com.hnac.hzims.middle.processflow.mapper;
import com.hnac.hzims.ticket.processflow.entity.ProcessDict;
import com.hnac.hzims.middle.processflow.entity.ProcessDict;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
/**

4
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/mapper/ProcessTypeMapper.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/mapper/ProcessTypeMapper.java

@ -1,7 +1,7 @@
package com.hnac.hzims.ticket.processflow.mapper;
package com.hnac.hzims.middle.processflow.mapper;
import com.hnac.hzims.ticket.processflow.entity.ProcessType;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.middle.processflow.entity.ProcessType;
/**
* <p>

4
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/mapper/WorkflowOperationLogMapper.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/mapper/WorkflowOperationLogMapper.java

@ -1,7 +1,7 @@
package com.hnac.hzims.ticket.processflow.mapper;
package com.hnac.hzims.middle.processflow.mapper;
import com.hnac.hzims.ticket.processflow.entity.WorkflowOperationLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.middle.processflow.entity.WorkflowOperationLog;
/**
* <p>

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/properties/TicketProperties.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/properties/TicketProperties.java

@ -1,4 +1,4 @@
package com.hnac.hzims.ticket.processflow.properties;
package com.hnac.hzims.middle.processflow.properties;
import lombok.Data;

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/properties/WorkTicketProperties.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/properties/WorkTicketProperties.java

@ -1,4 +1,4 @@
package com.hnac.hzims.ticket.processflow.properties;
package com.hnac.hzims.middle.processflow.properties;
import lombok.Data;
import lombok.Getter;

4
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/service/ProcessDictService.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/service/ProcessDictService.java

@ -1,7 +1,7 @@
package com.hnac.hzims.ticket.processflow.service;
package com.hnac.hzims.middle.processflow.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hnac.hzims.ticket.processflow.entity.ProcessDict;
import com.hnac.hzims.middle.processflow.entity.ProcessDict;
/**
* @Author WL

4
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/service/ProcessTypeService.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/service/ProcessTypeService.java

@ -1,7 +1,7 @@
package com.hnac.hzims.ticket.processflow.service;
package com.hnac.hzims.middle.processflow.service;
import com.hnac.hzims.ticket.processflow.entity.ProcessType;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hnac.hzims.middle.processflow.entity.ProcessType;
/**
* <p>

4
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/service/WorkflowOperationLogService.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/service/WorkflowOperationLogService.java

@ -1,7 +1,7 @@
package com.hnac.hzims.ticket.processflow.service;
package com.hnac.hzims.middle.processflow.service;
import com.hnac.hzims.ticket.processflow.entity.WorkflowOperationLog;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hnac.hzims.middle.processflow.entity.WorkflowOperationLog;
/**
* <p>

12
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/service/impl/ProcessDictServiceImpl.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/service/impl/ProcessDictServiceImpl.java

@ -1,12 +1,12 @@
package com.hnac.hzims.ticket.processflow.service.impl;
package com.hnac.hzims.middle.processflow.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnac.hzims.ticket.processflow.entity.ProcessDict;
import com.hnac.hzims.ticket.processflow.mapper.ProcessDictMapper;
import com.hnac.hzims.ticket.processflow.service.ProcessDictService;
import groovy.util.logging.Slf4j;
import com.hnac.hzims.middle.processflow.entity.ProcessDict;
import com.hnac.hzims.middle.processflow.mapper.ProcessDictMapper;
import com.hnac.hzims.middle.processflow.service.ProcessDictService;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
@ -18,7 +18,7 @@ import org.springframework.stereotype.Service;
*/
@Slf4j
@Service
public class ProcessDictServiceImpl extends ServiceImpl<ProcessDictMapper, ProcessDict> implements ProcessDictService {
public class ProcessDictServiceImpl extends ServiceImpl<ProcessDictMapper, ProcessDict> implements ProcessDictService {
/**
* 根据字典key查询字典value
*

8
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/service/impl/ProcessTypeServiceImpl.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/service/impl/ProcessTypeServiceImpl.java

@ -1,8 +1,8 @@
package com.hnac.hzims.ticket.processflow.service.impl;
package com.hnac.hzims.middle.processflow.service.impl;
import com.hnac.hzims.ticket.processflow.entity.ProcessType;
import com.hnac.hzims.ticket.processflow.mapper.ProcessTypeMapper;
import com.hnac.hzims.ticket.processflow.service.ProcessTypeService;
import com.hnac.hzims.middle.processflow.entity.ProcessType;
import com.hnac.hzims.middle.processflow.mapper.ProcessTypeMapper;
import com.hnac.hzims.middle.processflow.service.ProcessTypeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

8
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/service/impl/WorkflowOperationLogServiceImpl.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/service/impl/WorkflowOperationLogServiceImpl.java

@ -1,9 +1,9 @@
package com.hnac.hzims.ticket.processflow.service.impl;
package com.hnac.hzims.middle.processflow.service.impl;
import com.hnac.hzims.ticket.processflow.entity.WorkflowOperationLog;
import com.hnac.hzims.ticket.processflow.mapper.WorkflowOperationLogMapper;
import com.hnac.hzims.ticket.processflow.service.WorkflowOperationLogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnac.hzims.middle.processflow.entity.WorkflowOperationLog;
import com.hnac.hzims.middle.processflow.mapper.WorkflowOperationLogMapper;
import com.hnac.hzims.middle.processflow.service.WorkflowOperationLogService;
import org.springframework.stereotype.Service;
/**

8
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/abstracts/ProcessAbstractService.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/abstracts/ProcessAbstractService.java

@ -1,8 +1,8 @@
package com.hnac.hzims.ticket.processflow.strategy.abstracts;
package com.hnac.hzims.middle.processflow.strategy.abstracts;
import com.hnac.hzims.ticket.processflow.entity.ProcessType;
import com.hnac.hzims.ticket.processflow.service.ProcessTypeService;
import com.hnac.hzims.ticket.processflow.strategy.service.ProcessService;
import com.hnac.hzims.middle.processflow.entity.ProcessType;
import com.hnac.hzims.middle.processflow.service.ProcessTypeService;
import com.hnac.hzims.middle.processflow.strategy.service.ProcessService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/core/ProcessIdWorker.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/core/ProcessIdWorker.java

@ -1,4 +1,4 @@
package com.hnac.hzims.ticket.processflow.strategy.core;
package com.hnac.hzims.middle.processflow.strategy.core;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/entity/WorkflowQueue.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/entity/WorkflowQueue.java

@ -1,4 +1,4 @@
package com.hnac.hzims.ticket.processflow.strategy.entity;
package com.hnac.hzims.middle.processflow.strategy.entity;
import lombok.Data;
import lombok.experimental.Accessors;

6
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/service/ProcessService.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/service/ProcessService.java

@ -1,7 +1,7 @@
package com.hnac.hzims.ticket.processflow.strategy.service;
package com.hnac.hzims.middle.processflow.strategy.service;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.processflow.strategy.entity.WorkflowQueue;
import com.hnac.hzims.middle.processflow.strategy.entity.WorkflowQueue;
import com.hnac.hzims.common.to.process.ProcessWorkFlowResponse;
/**
* @Author dfy

25
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/serviceimpl/MachineryTicketProcessServiceImpl.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/MachineryTicketProcessServiceImpl.java

@ -1,16 +1,17 @@
package com.hnac.hzims.ticket.processflow.strategy.serviceimpl;
package com.hnac.hzims.middle.processflow.strategy.serviceimpl;
import com.hnac.hzims.ticket.processflow.service.ProcessDictService;
import com.hnac.hzims.ticket.processflow.strategy.abstracts.ProcessAbstractService;
import com.hnac.hzims.ticket.processflow.strategy.entity.WorkflowQueue;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.twoTicket.service.TicketProcessService;
import com.hnac.hzims.middle.processflow.service.ProcessDictService;
import com.hnac.hzims.middle.processflow.strategy.abstracts.ProcessAbstractService;
import com.hnac.hzims.middle.processflow.strategy.entity.WorkflowQueue;
import com.hnac.hzims.ticket.ticketprocess.feign.OperationTicketFeignClient;
import com.hnac.hzims.common.to.process.ProcessWorkFlowResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.log.exception.ServiceException;
import org.springframework.stereotype.Service;
import static com.hnac.hzims.ticket.processflow.constant.TicketProcessConstant.FIRST_TICKET_KEY;
import static com.hnac.hzims.ticket.processflow.constant.TicketProcessConstant.MACHINERY_TICKET_KEY;
import static com.hnac.hzims.common.logs.constant.TicketProcessConstant.MACHINERY_TICKET_KEY;
/**
* 水力机械工作票实现类
@ -27,7 +28,7 @@ public class MachineryTicketProcessServiceImpl extends ProcessAbstractService {
private final TicketProcessService ticketProcessService;
private final OperationTicketFeignClient ticketProcessService;
@ -64,6 +65,10 @@ public class MachineryTicketProcessServiceImpl extends ProcessAbstractService {
*/
@Override
public void calculate(ProcessWorkFlowResponse response) {
ticketProcessService.findPending(response);
Boolean pending = ticketProcessService.findPending(response);
if (!pending) {
throw new ServiceException("水力机械工作票流程出现异常呢");
}
}
}

66
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/MaintenanceProcessServiceImpl.java

@ -0,0 +1,66 @@
package com.hnac.hzims.middle.processflow.strategy.serviceimpl;
import com.hnac.hzims.middle.processflow.service.ProcessDictService;
import com.hnac.hzims.middle.processflow.strategy.abstracts.ProcessAbstractService;
import com.hnac.hzims.middle.processflow.strategy.entity.WorkflowQueue;
import com.hnac.hzims.operational.maintenance.feign.MaintenanceFeignClient;
import com.hnac.hzims.common.to.process.ProcessWorkFlowResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.log.exception.ServiceException;
import org.springframework.stereotype.Service;
import static com.hnac.hzims.common.logs.constant.TicketProcessConstant.MAINTENANCE_KEY;
/**
* 日常维护实现类
*
* @Author dfy
* @Version v1.0
* @Serial 1.0
* @Date 2023/3/28 8:47
*/
@Slf4j
@Service
@RequiredArgsConstructor
public class MaintenanceProcessServiceImpl extends ProcessAbstractService {
private final MaintenanceFeignClient maintenanceFeignClient;
private final ProcessDictService processDictService;
/**
* 设置执行那种实现类
*
* @param flowQueue
* @return
*/
@Override
public Boolean isWorkflowProcess(WorkflowQueue flowQueue) {
log.info("是否执日常维护流程环节操作~~~~,流程ticket: {}", flowQueue);
String dictValue = processDictService.selectDictValueByKey(MAINTENANCE_KEY);
if (dictValue.equals(flowQueue.getProcessDefinitionKey())) {
log.info("已执行日常维护流程环节操作~~~~");
return true;
}
log.error("未是否执行日常维护流程环节操作,请联系管理员~~~~");
return false;
}
/**
* 日常维护业务方法
*
* @param response
*/
@Override
public void calculate(ProcessWorkFlowResponse response) {
Boolean pending = maintenanceFeignClient.findPending(response);
if (!pending) {
throw new ServiceException("日常维护业务流程出错呢");
}
}
}

30
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/serviceimpl/OneTicketProcessServiceImpl.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/OneTicketProcessServiceImpl.java

@ -1,19 +1,21 @@
package com.hnac.hzims.ticket.processflow.strategy.serviceimpl;
import com.hnac.hzims.ticket.processflow.constant.TicketProcessConstant;
import com.hnac.hzims.ticket.processflow.service.ProcessDictService;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.processflow.strategy.abstracts.ProcessAbstractService;
import com.hnac.hzims.ticket.processflow.strategy.entity.WorkflowQueue;
import com.hnac.hzims.ticket.twoTicket.service.TicketProcessService;
package com.hnac.hzims.middle.processflow.strategy.serviceimpl;
import com.hnac.hzims.middle.processflow.service.ProcessDictService;
import com.hnac.hzims.middle.processflow.strategy.abstracts.ProcessAbstractService;
import com.hnac.hzims.middle.processflow.strategy.entity.WorkflowQueue;
import com.hnac.hzims.ticket.ticketprocess.feign.TicketProcessFeignClient;
import com.hnac.hzims.common.to.process.ProcessWorkFlowResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.log.exception.ServiceException;
import org.springframework.stereotype.Service;
import static com.hnac.hzims.ticket.processflow.constant.TicketProcessConstant.FIRST_TICKET_KEY;
import static com.hnac.hzims.common.logs.constant.TicketProcessConstant.FIRST_TICKET_KEY;
/**
* 工作票流程实现类
* 工作票流程实现类
*
* @Author dfy
* @Version v1.0
@ -27,7 +29,7 @@ public class OneTicketProcessServiceImpl extends ProcessAbstractService {
private final TicketProcessService ticketProcessService;
private final TicketProcessFeignClient ticketProcessService;
@ -64,6 +66,10 @@ public class OneTicketProcessServiceImpl extends ProcessAbstractService {
*/
@Override
public void calculate(ProcessWorkFlowResponse response) {
ticketProcessService.findPending(response);
Boolean pending = ticketProcessService.findPending(response);
if (!pending) {
throw new ServiceException("工作票流程出现异常呢");
}
}
}

31
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/serviceimpl/OperationTicketProcessServiceImpl.java → hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/processflow/strategy/serviceimpl/OperationTicketProcessServiceImpl.java

@ -1,19 +1,20 @@
package com.hnac.hzims.ticket.processflow.strategy.serviceimpl;
package com.hnac.hzims.middle.processflow.strategy.serviceimpl;
import com.hnac.hzims.ticket.processflow.service.ProcessDictService;
import com.hnac.hzims.ticket.processflow.strategy.abstracts.ProcessAbstractService;
import com.hnac.hzims.ticket.processflow.strategy.entity.WorkflowQueue;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.standardTicket.service.OperationTicketService;
import com.hnac.hzims.ticket.twoTicket.service.TicketProcessService;
import com.hnac.hzims.middle.processflow.service.ProcessDictService;
import com.hnac.hzims.middle.processflow.strategy.abstracts.ProcessAbstractService;
import com.hnac.hzims.middle.processflow.strategy.entity.WorkflowQueue;
import com.hnac.hzims.ticket.ticketprocess.feign.TicketProcessFeignClient;
import com.hnac.hzims.common.to.process.ProcessWorkFlowResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.log.exception.ServiceException;
import org.springframework.stereotype.Service;
import static com.hnac.hzims.ticket.processflow.constant.TicketProcessConstant.OPERATION_TICKET_KEY;
import static com.hnac.hzims.common.logs.constant.TicketProcessConstant.OPERATION_TICKET_KEY;
/**
* 开工作票流程实现类
* 作票流程实现类
*
* @Author dfy
* @Version v1.0
@ -27,7 +28,7 @@ public class OperationTicketProcessServiceImpl extends ProcessAbstractService {
private final OperationTicketService operationTicketService;
private final TicketProcessFeignClient operationTicketService;
@ -35,10 +36,6 @@ public class OperationTicketProcessServiceImpl extends ProcessAbstractService {
/**
* 设置执行那种实现类
*
@ -64,6 +61,10 @@ public class OperationTicketProcessServiceImpl extends ProcessAbstractService {
*/
@Override
public void calculate(ProcessWorkFlowResponse response) {
operationTicketService.findPending(response);
Boolean pending = operationTicketService.findPending(response);
if (!pending) {
throw new ServiceException("操作票流程出现异常呢");
}
}
}

2
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/controller/SysLogController.java

@ -115,7 +115,7 @@ public class SysLogController {
@PathVariable Long size,
StatisticsVo statisticsVo){
Page<StatisticsTitleResponseVo> page1 = new Page(page, size);
List<StatisticsTitleResponseVo> responseVos = sysLogService.statisticsTitleByModuleName(page1,
IPage<StatisticsTitleResponseVo> responseVos = sysLogService.statisticsTitleByModuleName(page1,
statisticsVo);
return R.data(responseVos);
}

3
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/mapper/SysLogMapper.java

@ -1,5 +1,6 @@
package com.hnac.hzims.middle.systemlog.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hnac.hzims.middle.systemlog.entity.SysLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -35,5 +36,5 @@ public interface SysLogMapper extends BaseMapper<SysLog> {
* @param statisticsVo
* @return
*/
List<StatisticsTitleResponseVo> statisticsTitleByModuleName(Page<StatisticsTitleResponseVo> moduleName, @Param("statisticsVo") StatisticsVo statisticsVo);
IPage<StatisticsTitleResponseVo> statisticsTitleByModuleName(Page<StatisticsTitleResponseVo> moduleName, @Param("statisticsVo") StatisticsVo statisticsVo);
}

2
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/SysLogService.java

@ -44,6 +44,6 @@ public interface SysLogService extends IService<SysLog> {
* @param statisticsVo
* @return
*/
List<StatisticsTitleResponseVo> statisticsTitleByModuleName(Page<StatisticsTitleResponseVo> statisticsTitleResponseVoPage,
IPage<StatisticsTitleResponseVo> statisticsTitleByModuleName(Page<StatisticsTitleResponseVo> statisticsTitleResponseVoPage,
StatisticsVo statisticsVo);
}

3
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/SysLogServiceImpl.java

@ -61,7 +61,8 @@ public class SysLogServiceImpl extends ServiceImpl<SysLogMapper, SysLog> impleme
* @return
*/
@Override
public List<StatisticsTitleResponseVo> statisticsTitleByModuleName(Page<StatisticsTitleResponseVo> statisticsTitleResponseVoPage, StatisticsVo statisticsVo) {
public IPage<StatisticsTitleResponseVo> statisticsTitleByModuleName(Page<StatisticsTitleResponseVo> statisticsTitleResponseVoPage, StatisticsVo statisticsVo) {
return baseMapper.statisticsTitleByModuleName(statisticsTitleResponseVoPage, statisticsVo);
}

2
hzims-service/operational/pom.xml

@ -245,8 +245,6 @@
<artifactId>swagger-bootstrap-ui</artifactId>
<version>${swagger-bootstrap-ui.version}</version>
</dependency>
</dependencies>
<build>

66
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/controller/MaintenanceController.java

@ -0,0 +1,66 @@
package com.hnac.hzims.operational.maintenance.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.operational.maintenance.service.MaintenanceService;
import com.hnac.hzims.common.to.process.ProcessWorkFlowResponse;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
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.web.bind.annotation.*;
import java.util.List;
/**
* 日常维护控制层
*
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/6/14 8:08
*/
@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("/maintenance")
public class MaintenanceController {
private final MaintenanceService maintenanceService;
/**
* 日常维护生成任务
* @param ids
* @return
*/
@PostMapping("/createTask")
@ApiOperationSupport(order = 60)
@ApiOperation(value = "根据计划ID生成任务")
public R generateTask(@ApiParam(value = "计划ID", required = true) @RequestBody List<String> ids) {
maintenanceService.createTask(ids);
return R.success("日常维护生成任务成功");
}
/**
* 日常维护待处理
* @param response
*/
@PostMapping("/findPending")
@ApiOperation(value = "日常维护待处理")
public Boolean findPending(@RequestBody ProcessWorkFlowResponse response){
try {
maintenanceService.findPending(response);
return true;
} catch (Exception e) {
throw new ServiceException("日常维护待处理:" + e.getMessage());
}
}
}

30
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/MaintenanceService.java

@ -0,0 +1,30 @@
package com.hnac.hzims.operational.maintenance.service;
import com.hnac.hzims.common.to.process.ProcessWorkFlowResponse;
import java.util.List;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/6/14 8:24
*/
public interface MaintenanceService {
/**
* 日常维护生成任务
* @param ids
*/
void createTask(List<String> ids);
/**
* 日常维护待处理
* @param response
*/
void findPending(ProcessWorkFlowResponse response);
}

343
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/MaintenanceServiceImpl.java

@ -0,0 +1,343 @@
package com.hnac.hzims.operational.maintenance.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.hnac.hzims.common.utils.DateUtil;
import com.hnac.hzims.message.MessageConstants;
import com.hnac.hzims.message.dto.MessagePushRecordDto;
import com.hnac.hzims.message.dto.PlanMsgRecordDto;
import com.hnac.hzims.message.entity.config.MessageTemplateEntity;
import com.hnac.hzims.message.fegin.IMessageClient;
import com.hnac.hzims.operational.duty.entity.ImsDutyMainEntity;
import com.hnac.hzims.operational.duty.service.IImsDutyMainService;
import com.hnac.hzims.operational.maintenance.entity.OperMaintenancePlanEntity;
import com.hnac.hzims.operational.maintenance.entity.OperMaintenanceTaskEntity;
import com.hnac.hzims.operational.maintenance.service.IOperMaintenancePlanService;
import com.hnac.hzims.operational.maintenance.service.IOperMaintenanceTaskService;
import com.hnac.hzims.operational.maintenance.service.MaintenanceService;
import com.hnac.hzims.operational.maintenance.template.service.TemplateService;
import com.hnac.hzims.operational.maintenance.vo.OperMaintenanceTaskEntityVo;
import com.hnac.hzims.operational.util.StringObjUtils;
import com.hnac.hzims.common.to.process.ProcessWorkFlowResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseEntity;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.*;
import org.springblade.flow.core.feign.IFlowClient;
import org.springblade.system.feign.ISysClient;
import org.springblade.system.user.cache.UserCache;
import org.springblade.system.user.entity.User;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static org.springblade.core.tool.utils.DateUtil.PATTERN_DATE;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/6/14 8:24
*/
@Slf4j
@Service
@RequiredArgsConstructor
public class MaintenanceServiceImpl implements MaintenanceService {
private final IOperMaintenancePlanService maintenancePlanService;
private final IImsDutyMainService mainService;
private final IOperMaintenanceTaskService taskService;
private final IMessageClient messageClient;
private final List<TemplateService> templateService;
private final IFlowClient flowClient;
private final ISysClient sysClient;
/**
* 日常维护生成任务
*
* @param ids
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void createTask(List<String> ids) {
//获取日常维护计划
LambdaQueryWrapper<OperMaintenancePlanEntity> planEntityLambdaQueryWrapper = new LambdaQueryWrapper<>();
planEntityLambdaQueryWrapper.in(BaseEntity::getId, ids);
List<OperMaintenancePlanEntity> planEntities = maintenancePlanService
.list(planEntityLambdaQueryWrapper);
//筛选当月没生成任务的计划
List<OperMaintenancePlanEntity> finalPlanEntities = planEntities.stream().filter(planEntity ->
ObjectUtil.isEmpty(planEntity.getCreateTaskTime())
|| !DateUtil.judgeSameDay(
DateUtil.DateToLocalDateTime(planEntity.getCreateTaskTime()), LocalDate.now())
).collect(Collectors.toList());
if (CollectionUtil.isEmpty(finalPlanEntities)) {
throw new ServiceException("所选计划当天已生成任务");
}
for (OperMaintenancePlanEntity finalPlanEntity : finalPlanEntities) {
// 通过计划生成任务
this.createTaskByPlan(finalPlanEntity);
//更新任务派发时间
LambdaUpdateWrapper<OperMaintenancePlanEntity> planEntityLambdaUpdateWrapper =
new LambdaUpdateWrapper<>();
planEntityLambdaUpdateWrapper.set(OperMaintenancePlanEntity::getCreateTaskTime, new Date());
planEntityLambdaUpdateWrapper.eq(OperMaintenancePlanEntity::getId, finalPlanEntity.getId());
boolean update = maintenancePlanService.update(planEntityLambdaUpdateWrapper);
if (!update) {
log.error("maintenance:generateTask 更新任务派发失败");
throw new ServiceException("更新任务派发失败");
}
}
}
/**
* 日常维护待处理
*
* @param response
*/
@Override
public void findPending(ProcessWorkFlowResponse response) {
log.info("获取businessKey: {}", response.getBusinessKey());
log.info("获取taskId: {} ", response.getTaskId());
log.info("获取下一个审批人是: {} ", response.getNextStepOperator());
log.info("获取下一个用户Id是: {} ", response.getUserId());
log.info("获取当前任务名称是: {} ", response.getTaskName());
log.info("获取根据handleType区分是用户还是候选组角色: {}", response.getHandleType());
//json转换表单
String formData = JSON.toJSONString(response.getVariables());
log.info("获取表单的数据:{}", formData);
OperMaintenanceTaskEntityVo standardTicketInfoVo = null;
try {
JSONObject jsonObject = JSONObject.parseObject(formData);
standardTicketInfoVo = JSONObject.toJavaObject(jsonObject, OperMaintenanceTaskEntityVo.class);
} catch (Exception e) {
log.error("获取表单出现异常了~~~~");
throw new IllegalArgumentException(e.getMessage());
}
//1.查询日常维护信息
Long id = NumberUtils.toLong(response.getBusinessKey());
OperMaintenanceTaskEntity dbOperMaintenanceTaskEntity = taskService.getById(id);
if (ObjectUtils.isEmpty(dbOperMaintenanceTaskEntity)) {
log.error("获取日常维护数据不存在");
return;
}
OperMaintenanceTaskEntity entity = new OperMaintenanceTaskEntity();
BeanUtils.copyProperties(standardTicketInfoVo,entity);
entity.setId(id);
//填充日常维护信息
saveOperMaintenanceTaskEntity(entity, response);
entity.setProcessInstanceId(response.getProcessInstanceId());
taskService.updateById(entity);
//推送消息
if (response.getTaskId() != null) {
MessagePushRecordDto message = new MessagePushRecordDto();
message.setBusinessClassify("business");
message.setBusinessKey(MessageConstants.BusinessClassifyEnum.OPERATIONTICKETMESSAGE.getKey());
message.setSubject(MessageConstants.BusinessClassifyEnum.OPERATIONTICKETMESSAGE.getDescription());
message.setTaskId(entity.getId());
message.setTenantId("200000");
message.setTypes(Arrays.asList(MessageConstants.APP_PUSH, MessageConstants.WS_PUSH));
message.setPushType(MessageConstants.IMMEDIATELY);
//您有一张工作票待审批,工作内容:*****,审批环节:*****;
String countent =
"您有一条日常维护任务待审批,工作内容:".concat(entity.getTitle())
.concat(",审批环节:")
.concat(response.getTaskName());
message.setContent(countent);
message.setDeptId(entity.getCreateDept());
R<String> deptName = sysClient.getDeptName(entity.getCreateDept());
if (deptName.isSuccess()) {
message.setDeptName(deptName.getData());
}
String userIds = response.getUserId();
if (com.hnac.hzims.common.logs.utils.StringUtils.isBlank(userIds)) {
log.error("推送的消息不能为空哦,{}", userIds);
return;
}
String[] split = userIds.split(",");
for (String userId : split) {
message.setPusher(userId);
User user = UserCache.getUser(NumberUtils.toLong(userId));
if (ObjectUtils.isNotEmpty(user)) {
message.setPusherName(user.getName());
}
message.setAccount(userId);
message.setCreateUser(NumberUtils.toLong(userId));
messageClient.sendMessage(message);
}
}
}
/**
* 填充日常维护信息
* @param entity
* @param response
*/
private void saveOperMaintenanceTaskEntity(OperMaintenanceTaskEntity entity, ProcessWorkFlowResponse response) {
String flowDescription = "";
//如果response.getHandleType() 是0使用户
entity.setFlowUserId(response.getUserId());
entity.setNextStepOperator(response.getNextStepOperator());
flowDescription = "审批中,当前环节是".concat(response.getTaskName()).concat(",待").concat(response.getNextStepOperator()).concat("审批");
//如果taskId为空
String taskId = response.getTaskId();
if (StringUtils.isEmpty(taskId)) {
entity.setFlowDescription("结束");
entity.setFlowTaskId(" ");
entity.setFlowTaskName("结束");
entity.setNextStepOperator(" ");
entity.setFlowStatus(999);
} else {
entity.setFlowTaskId(taskId);
entity.setFlowTaskName(response.getTaskName());
entity.setFlowDescription(flowDescription);
}
}
/**
* 通过计划生成任务
*
* @param finalPlanEntity
*/
private void createTaskByPlan(OperMaintenancePlanEntity finalPlanEntity) {
OperMaintenanceTaskEntity taskEntity = BeanUtil.copy(finalPlanEntity, OperMaintenanceTaskEntity.class);
//拆分设备 每个设备生成一条任务
if (StringUtil.isNotBlank(finalPlanEntity.getEmCode())) {
log.info("finalPlanEntity.getEmCode() : {}", finalPlanEntity.getEmCode());
List<String> emCodeList = Arrays.asList(finalPlanEntity.getEmCode().split(","));
for (String emCode : emCodeList) {
taskEntity.setEmCode(emCode);
this.fillTask(taskEntity, finalPlanEntity);
}
} else {
this.fillTask(taskEntity, finalPlanEntity);
}
}
/**
* 补充日常维护任务内容
*
* @param taskEntity
* @param finalPlanEntity
*/
private void fillTask(OperMaintenanceTaskEntity taskEntity, OperMaintenancePlanEntity finalPlanEntity) {
taskEntity.setId(null);
taskEntity.setCreateTime(new Date());
taskEntity.setUpdateTime(new Date());
taskEntity.setPlanId(finalPlanEntity.getId());
taskEntity.setTaskCode(UUID.randomUUID().toString());
if (taskEntity.getRefLibraryId() != 0) {
taskEntity.setCreateTime(org.springblade.core.tool.utils.DateUtil.now());
}
taskEntity.setDisposer(StringObjUtils.toString(finalPlanEntity.getDisposer()));
//补充计划结束时间
Instant instant = taskEntity.getDisposeTime().toInstant();
ZoneId zoneId = ZoneId.systemDefault();
LocalDateTime disposeTime = instant.atZone(zoneId).toLocalDateTime();
taskEntity.setPlanEndTime(disposeTime.plusHours(taskEntity.getHours()));
//获取值班人员
if (ObjectUtil.isNotEmpty(finalPlanEntity.getMaintenanceModel()) && finalPlanEntity.getMaintenanceModel() == 2) {
//查询值班信息
LambdaQueryWrapper<ImsDutyMainEntity> entityLambdaQueryWrapper = new LambdaQueryWrapper<>();
entityLambdaQueryWrapper.eq(ImsDutyMainEntity::getDutyDate,
DateTimeFormatter.ofPattern(PATTERN_DATE).format(disposeTime));
entityLambdaQueryWrapper.eq(ImsDutyMainEntity::getClassId, finalPlanEntity.getImsDutyClassId());
ImsDutyMainEntity entity = mainService.getOne(entityLambdaQueryWrapper);
if (ObjectUtil.isNotEmpty(entity) && StringUtils.isNotEmpty(entity.getDutyPersonIds())) {
String userId = entity.getDutyPersonIds();
taskEntity.setDisposer(userId.replaceAll("\\^", ","));
} else {
log.info("计划ID为:{}未查询到排班记录", finalPlanEntity.getId());
return;
}
}
taskService.save(taskEntity);
//生成工作流实例
String processInstanceId = this.startProcess(finalPlanEntity.getProcDefId(), taskEntity);
taskEntity.setProcessInstanceId(processInstanceId);
taskService.updateById(taskEntity);
finalPlanEntity.setCreateTaskTime(new Date());
maintenancePlanService.updateById(finalPlanEntity);
taskEntity = taskService.getById(taskEntity.getId());
//推送消息
this.pushTaskMessage(taskEntity);
}
/**
* 开启一个流程实例
*
* @author xiashandong
**/
private String startProcess(String processDefinitionKey, OperMaintenanceTaskEntity taskEntity) {
OperMaintenanceTaskEntityVo operMaintenanceTaskEntityVo = new OperMaintenanceTaskEntityVo();
BeanUtils.copyProperties(taskEntity,operMaintenanceTaskEntityVo);
Map<String,Object> params = new HashMap<>();
params.put("taskId", taskEntity.getId());
List<String> userIdList = Stream.of(taskEntity.getDisposer().split(",")).collect(Collectors.toList());
String taskUsers = userIdList.stream().filter(o -> StringUtils.isNotBlank(o)).map(s -> {
return "taskUser_".concat(s);
}).collect(Collectors.joining(","));
params.put("initUserIds", taskUsers);
params.put("operMaintenanceTaskEntityVo", operMaintenanceTaskEntityVo);
return flowClient.startProcessInstanceContainNameByKey(processDefinitionKey,
String.valueOf(taskEntity.getId()),taskEntity.getTitle(), params)
.getData()
.getProcessInstanceId();
}
/**
* 推送日常维护任务消息
* @return void
* @Param taskEntity 日常维护任务
**/
private void pushTaskMessage(OperMaintenanceTaskEntity taskEntity) {
log.info("开始保存{}的日常维护消息推送记录", taskEntity.getDisposer());
R<MessageTemplateEntity> templateR = messageClient.getMsgTemplateById(taskEntity.getMessageTemplateId());
if (templateR.isSuccess() && ObjectUtil.isNotEmpty(templateR.getData())) {
Func.toLongList(",", taskEntity.getDisposer()).forEach(userId -> {
//推送消息
ZoneId zoneId = ZoneId.systemDefault();
PlanMsgRecordDto planMsgRecordDto = new PlanMsgRecordDto();
planMsgRecordDto.setTemplateId(taskEntity.getMessageTemplateId());
planMsgRecordDto.setCreateUser(taskEntity.getCreateUser());
planMsgRecordDto.setPlanTime(LocalDateTime.ofInstant(taskEntity.getDisposeTime().toInstant(), zoneId));
planMsgRecordDto.setTaskId(taskEntity.getId());
planMsgRecordDto.setDeptId(taskEntity.getCreateDept());
planMsgRecordDto.setReceiver(userId);
TemplateService templateService1 = templateService.stream().filter(item -> item.isTemplateStatus(1)).findFirst().orElse(null);
templateService1.execute(planMsgRecordDto);
log.info("推送内容体为:{}", JSON.toJSONString(taskEntity.getDisposer()));
});
}
}
}

222
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/vo/OperMaintenanceTaskEntityVo.java

@ -0,0 +1,222 @@
package com.hnac.hzims.operational.maintenance.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import java.util.Date;
/**
* 日常维护对象
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/6/13 17:20
*/
@Data
public class OperMaintenanceTaskEntityVo {
private static final long serialVersionUID = 1L;
/**
* 主键id
*/
@ApiModelProperty(value = "主键id")
private Long id;
/**
* 创建人
*/
private Long createUser;
/**
* 创建部门
*/
@ApiModelProperty(value = "创建部门")
private Long createDept;
/**
* 创建时间
*/
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**
* 更新人
*/
private Long updateUser;
/**
* 更新时间
*/
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
@ApiModelProperty(value = "更新时间")
private Date updateTime;
/**
* 状态[1:正常]
*/
@ApiModelProperty(value = "业务状态")
private Integer status;
/**
* 设备编码
*/
@ApiModelProperty(value = "设备编码")
private String emCode;
/**
* 维护类型 01=定期试验 02=定期保养 03=定期操作 04=其他
*/
@ApiModelProperty(value = "维护类型 01=定期试验 02=定期保养 03=定期操作 04=其他")
private String typeCode;
/**
* 任务编码
*/
@ApiModelProperty(value = "任务编码,后台自动生成")
private String taskCode;
/**
* 维护项目
*/
@ApiModelProperty(value = "维护项目")
private Long refLibraryId;
/**
* 维护标题
*/
@ApiModelProperty(value = "维护标题")
private String title;
/**
* 工作流实例ID
*/
@ApiModelProperty(value = "工作流实例ID")
private String processInstanceId;
/**
* 执行人
*/
@ApiModelProperty(value = "执行人")
private String disposer;
/**
* 执行日期
*/
@ApiModelProperty(value = "任务按周期生成计划时间")
private Date disposeTime;
@ApiModelProperty(value = "执行时间")
private LocalDateTime executeTime;
/**
* 标准工时
*/
@ApiModelProperty(value = "标准工时")
private Integer hours;
/**
* 实际工时
*/
@ApiModelProperty(value = "实际工时")
private Integer actHours;
/**
* 维护内容
*/
@ApiModelProperty(value = "维护内容")
private String content;
/**
* 操作规范
*/
@ApiModelProperty(value = "操作规范")
private String workStandards;
/**
* 安全警告
*/
@ApiModelProperty(value = "安全警告")
private String safo;
/**
* 是否异常 0= 1=
*/
@ApiModelProperty(value = "是否异常 0=否 1=是")
private Integer isAnomaly;
/**
* 遗留问题
*/
@ApiModelProperty(value = "遗留问题")
private String legacy;
/**
* 问题描述
*/
@ApiModelProperty(value = "问题描述")
private String description;
@ApiModelProperty(value = "任务类型")
private String taskType;
@ApiModelProperty(value = "票据ID")
private Long ticketId;
@ApiModelProperty(value = "延期状态")
private Integer delayStatus;
@ApiModelProperty(value = "延期时间")
private LocalDateTime delayDate;
@ApiModelProperty(value = "计划结束时间")
@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
private LocalDateTime planEndTime;
@ApiModelProperty("计划ID")
private Long planId;
@ApiModelProperty(value = "消息推送模板ID")
private Long messageTemplateId;
/**
* 流程状态'
*/
@ApiModelProperty("流程状态")
private Integer flowStatus;
/**
* 流程描述
*/
@ApiModelProperty("流程描述")
private String flowDescription;
/**
* 下一个审批人
*/
@ApiModelProperty("下一个审批人")
private String nextStepOperator;
/**
* 用户Id
*/
@ApiModelProperty("用户Id")
private String flowUserId;
/**
* 当前任务名
*/
@ApiModelProperty("当前任务名")
private String flowTaskName;
/**
* 当前任务名
*/
@ApiModelProperty("当前任务名")
private String flowTaskId;
}

23
hzims-service/operational/src/main/java/com/hnac/hzims/operational/util/StringObjUtils.java

@ -0,0 +1,23 @@
package com.hnac.hzims.operational.util;
import org.apache.commons.lang3.StringUtils;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/6/14 9:24
*/
public class StringObjUtils extends StringUtils {
/**
* object转Str
*
* @param obj
* @return
*/
public static String toString(Object obj) {
return obj == null ? (String) obj : obj.toString();
}
}

2
hzims-service/ticket/pom.xml

@ -267,7 +267,7 @@
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.aliyun</groupId>-->
<!-- <artifactId>aliyun-java-sdk-ecs</artifactId>-->
<!-- <version>4.2.0</version>-->

28
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/constant/TicketProcessConstant.java

@ -1,28 +0,0 @@
package com.hnac.hzims.ticket.processflow.constant;
/**
* 开票常量类
*
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/4/8 10:53
*/
public class TicketProcessConstant {
/**
* 第一种工作票的key
*/
public static final String FIRST_TICKET_KEY = "networking";
/**
* 操作票
*/
public static final String OPERATION_TICKET_KEY = "moreActionBankDirect";
/**
* 水力机械工作票
*/
public static final String MACHINERY_TICKET_KEY = "machinery";
}

3
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/redisConsume/WorkTicketMsgConsume.java

@ -3,8 +3,9 @@ package com.hnac.hzims.ticket.redisConsume;
import com.alibaba.fastjson.JSONObject;
import com.hnac.hzims.common.config.RedisMessageListener;
import com.hnac.hzims.ticket.constants.TicketConstants;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.twoTicket.service.IFirstWorkTicketService;
import com.hnac.hzims.common.to.process.ProcessWorkFlowResponse;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.log.exception.ServiceException;

19
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/OperationTicketController.java

@ -3,9 +3,11 @@ package com.hnac.hzims.ticket.standardTicket.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.ticket.standardTicket.service.OperationTicketService;
import com.hnac.hzims.ticket.twoTicket.vo.operation.StandardTicketInfoVo;
import com.hnac.hzims.common.to.process.ProcessWorkFlowResponse;
import io.swagger.annotations.ApiOperation;
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.web.bind.annotation.*;
@ -41,6 +43,23 @@ public class OperationTicketController {
}
/**
* 操作票待处理
* @param response
*/
@PostMapping("/findPending")
@ApiOperation(value = "操作票待处理")
public Boolean findPending(@RequestBody ProcessWorkFlowResponse response){
try {
operationTicketService.findPending(response);
return true;
} catch (Exception e) {
throw new ServiceException("操作票待处理:" + e.getMessage());
}
}
/**

78
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardWorkTicketController.java

@ -1,25 +1,10 @@
package com.hnac.hzims.ticket.standardTicket.controller;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.standardTicket.service.StandardWorkTicketService;
import com.hnac.hzims.ticket.processflow.properties.TicketProperties;
import com.hnac.hzims.ticket.processflow.properties.WorkTicketProperties;
import com.hnac.hzims.ticket.processflow.strategy.entity.WorkflowQueue;
import com.hnac.hzims.ticket.processflow.strategy.service.ProcessService;
import com.hnac.hzims.ticket.processflow.strategy.core.ProcessIdWorker;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.api.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDateTime;
import java.util.List;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 工作票管理
@ -36,65 +21,6 @@ import java.util.List;
@RequestMapping("/standard/wordTicket")
public class StandardWorkTicketController {
private final StandardWorkTicketService standardWorkTicketService;
@Autowired
private RedisTemplate redisTemplate;
@Autowired
private ProcessIdWorker standardTicketIdWorker;
@Autowired
List<ProcessService> ticketService;
@Autowired
private TicketProperties ticketProperties;
@ApiOperation("测试开票")
@PostMapping("/createTicket")
public R createTicket() {
ProcessWorkFlowResponse workTicketMessageResponse = new ProcessWorkFlowResponse();
workTicketMessageResponse.setTaskId(IdWorker.get32UUID());
workTicketMessageResponse.setTaskName("工作流");
String jsonString = JSON.toJSONString(workTicketMessageResponse);
redisTemplate.convertAndSend("blade:queue:flow", jsonString);
standardWorkTicketService.createTicket();
redisTemplate.opsForValue().set("1", "2");
return R.success("成功");
}
@ApiOperation("测试生成唯一编码")
@GetMapping("/idWored")
public R idWored() {
String ticketCode = standardTicketIdWorker.getTicketByCode("aa", "bb", LocalDateTime.now());
return R.data(ticketCode);
}
@ApiOperation("测试")
@GetMapping("/hello/{type}")
public R hello(@PathVariable String type) {
WorkflowQueue ticket = new WorkflowQueue();
ticket.setProcessDefinitionKey(type);
ProcessService service = ticketService.stream().filter(item -> item.isWorkflowProcess(ticket))
.findFirst().orElse(null);
service.calculate(new ProcessWorkFlowResponse());
return R.data("hello");
}
@ApiOperation("测试1")
@GetMapping("/hello1")
public R hello1() {
List<WorkTicketProperties> workTickets = ticketProperties.getWorkTickets();
System.out.println("workTickets = " + workTickets);
return R.data(workTickets);
}
}

4
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/OperationTicketService.java

@ -1,8 +1,8 @@
package com.hnac.hzims.ticket.standardTicket.service;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.twoTicket.vo.operation.StandardTicketInfoVo;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
import com.hnac.hzims.common.to.process.ProcessWorkFlowResponse;
import javax.servlet.http.HttpServletResponse;

28
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java

@ -5,16 +5,15 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.hnac.hzims.common.logs.fegin.ProcessDictFeignService;
import com.hnac.hzims.common.logs.utils.StringUtils;
import com.hnac.hzims.common.to.process.ProcessWorkFlowResponse;
import com.hnac.hzims.message.MessageConstants;
import com.hnac.hzims.message.dto.MessagePushRecordDto;
import com.hnac.hzims.message.fegin.IMessageClient;
import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.operational.station.feign.IStationClient;
import com.hnac.hzims.ticket.constants.TicketConstants;
import com.hnac.hzims.ticket.processflow.service.ProcessDictService;
import com.hnac.hzims.ticket.processflow.strategy.core.ProcessIdWorker;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.standardTicket.entity.StandardTicketInfoEntity;
import com.hnac.hzims.ticket.standardTicket.entity.StandardTicketMeasureEntity;
import com.hnac.hzims.ticket.standardTicket.service.IStandardTicketInfoService;
@ -22,11 +21,9 @@ import com.hnac.hzims.ticket.standardTicket.service.IStandardTicketMeasureServic
import com.hnac.hzims.ticket.standardTicket.service.OperationTicketService;
import com.hnac.hzims.ticket.standardTicket.utils.OperationWordHelper;
import com.hnac.hzims.ticket.twoTicket.constant.TicketConstant;
import com.hnac.hzims.ticket.twoTicket.utils.WordHelper;
import com.hnac.hzims.ticket.twoTicket.utils.WordMapUtils;
import com.hnac.hzims.ticket.twoTicket.vo.operation.StandardTicketInfoVo;
import com.hnac.hzims.ticket.twoTicket.vo.operation.StandardTicketMeasureVo;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
import com.hnac.hzims.ticket.utils.PdfUtils;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
@ -55,7 +52,8 @@ import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
import static com.hnac.hzims.ticket.processflow.constant.TicketProcessConstant.OPERATION_TICKET_KEY;
import static com.hnac.hzims.common.logs.constant.TicketProcessConstant.OPERATION_TICKET_KEY;
/**
* @Author WL
@ -76,10 +74,8 @@ public class OperationTicketServiceImpl implements OperationTicketService {
private final IStationClient stationClient;
private final ProcessIdWorker processIdWorker;
private final ProcessDictFeignService processDictFeignService;
private final ProcessDictService processDictService;
private final IFlowClient flowClient;
@ -128,7 +124,11 @@ public class OperationTicketServiceImpl implements OperationTicketService {
standardTicketInfoVo.setSignage(signage);
standardTicketInfoVo.setSignageCode(station.getCode());
//2. 获取编码
String code = processIdWorker.getTicketByCode(standardTicketInfoVo.getSignage(), this.getTicketWichCode(standardTicketInfoVo.getTicketType()), LocalDateTime.now());
String code = processDictFeignService.getTicketByCode(standardTicketInfoVo.getSignage(), this.getTicketWichCode(standardTicketInfoVo.getTicketType()), LocalDateTime.now());
log.info("获取编码: {}", code);
if (StringUtils.isBlank(code)) {
throw new ServiceException("服务器异常,请联系管理员");
}
standardTicketInfoVo.setCode(code);
//3. 保存操作对象
this.saveStandardTicketInfo(standardTicketInfoVo);
@ -136,8 +136,12 @@ public class OperationTicketServiceImpl implements OperationTicketService {
List<StandardTicketMeasureVo> standardTicketInfoVos = this.saveStandardTicketMeasure(
this.saveStandardTicketMeasureWichTicket(standardTicketInfoVo));
standardTicketInfoVo.setStandardTicketMeasureVos(standardTicketInfoVos);
//6. 查询第一种工作票值
String dictValue = processDictService.selectDictValueByKey(OPERATION_TICKET_KEY);
//6. 查询第操作票值
String dictValue = processDictFeignService.selectDictValueByKey(OPERATION_TICKET_KEY);
log.info("查询第操作票值: {}", dictValue);
if (StringUtils.isBlank(dictValue)) {
throw new ServiceException("服务器异常,请联系管理员");
}
// 7.启动流程
this.startProcess(standardTicketInfoVo, dictValue);
}

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/utils/OperationWordHelper.java

@ -42,7 +42,7 @@ public class OperationWordHelper {
public static String getWorkTicketStatus(Integer status) {
String result = null;
switch (status) {
case 0:
case 1:
result = "电气操作票.docx";
default:
result = "电气操作票.docx";

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

@ -3,24 +3,16 @@ 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 com.hnac.hzims.common.to.process.ProcessWorkFlowResponse;
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.log.exception.ServiceException;
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.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 工作票
@ -55,6 +47,24 @@ public class TicketProcessController {
/**
* 工作票待处理
* @param response
*/
@PostMapping("/findPending")
@ApiOperation(value = "工作票待处理")
public Boolean findPending(@RequestBody ProcessWorkFlowResponse response){
try {
ticketProcessService.findPending(response);
return true;
} catch (Exception e) {
throw new ServiceException("工作票待处理:" + e.getMessage());
}
}
/**
* 预览
*/
@GetMapping("/newPreview")

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

@ -1,7 +1,7 @@
package com.hnac.hzims.ticket.twoTicket.service;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
import com.hnac.hzims.common.to.process.ProcessWorkFlowResponse;
import javax.servlet.http.HttpServletResponse;

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

@ -7,7 +7,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.google.common.collect.Lists;
import com.hnac.hzims.common.logs.fegin.ProcessDictFeignService;
import com.hnac.hzims.common.logs.utils.StringUtils;
import com.hnac.hzims.message.MessageConstants;
import com.hnac.hzims.message.dto.MessagePushRecordDto;
@ -21,9 +21,6 @@ import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.operational.station.feign.IStationClient;
import com.hnac.hzims.ticket.constants.TicketConstants;
import com.hnac.hzims.ticket.constants.WorkTicketConstants;
import com.hnac.hzims.ticket.processflow.service.ProcessDictService;
import com.hnac.hzims.ticket.processflow.strategy.core.ProcessIdWorker;
import com.hnac.hzims.ticket.response.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.twoTicket.constant.TicketConstant;
import com.hnac.hzims.ticket.twoTicket.entity.TicketInfoDanger;
import com.hnac.hzims.ticket.twoTicket.entity.WorkTicketFinish;
@ -41,6 +38,7 @@ import com.hnac.hzims.ticket.workTicket.entity.*;
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.common.to.process.ProcessWorkFlowResponse;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
@ -73,8 +71,8 @@ import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
import static com.hnac.hzims.ticket.processflow.constant.TicketProcessConstant.FIRST_TICKET_KEY;
import static com.hnac.hzims.ticket.processflow.constant.TicketProcessConstant.MACHINERY_TICKET_KEY;
import static com.hnac.hzims.common.logs.constant.TicketProcessConstant.FIRST_TICKET_KEY;
import static com.hnac.hzims.common.logs.constant.TicketProcessConstant.MACHINERY_TICKET_KEY;
/**
@ -97,9 +95,6 @@ public class TicketProcessServiceImpl implements TicketProcessService {
private final IWorkTicketInfoService workTicketInfoService;
private final ProcessIdWorker processIdWorker;
private final IFirstWorkTicketService firstWorkTicketService;
@ -147,7 +142,7 @@ public class TicketProcessServiceImpl implements TicketProcessService {
private final TicketInfoDangerService ticketInfoDangerService;
private final ProcessDictService processDictService;
private final ProcessDictFeignService processDictFeignService;
private final IMessageClient messageClient;
@ -195,8 +190,12 @@ public class TicketProcessServiceImpl implements TicketProcessService {
workTicketVo.getWorkTicket().setSignage(station.getSignage());
workTicketVo.getWorkTicket().setSignageCode(station.getCode());
//2. 获取编码
String code = processIdWorker.getTicketByCode(signage, this.getTicketWichCode(workTicketVo.getWorkTicket().getType()),
String code = processDictFeignService.getTicketByCode(signage, this.getTicketWichCode(workTicketVo.getWorkTicket().getType()),
LocalDateTime.now());
log.info("获取编码: {}", code);
if (StringUtils.isBlank(code)) {
throw new ServiceException("服务器异常,请联系管理员");
}
workTicketVo.getWorkTicket().setCode(code);
//3 .保存工作对象
this.saveWorkTicketInfo(workTicketVo.getWorkTicket());
@ -204,8 +203,12 @@ public class TicketProcessServiceImpl implements TicketProcessService {
this.saveSafetyMeasures(workTicketVo.getSafetyMeasuresList(), workTicketVo.getWorkTicket());
//5. 保存工作任务
this.saveWorkTicketContentDto(workTicketVo.getWorkTicketContentDtoList(), workTicketVo.getWorkTicket());
//6. 查询第一种工作票值
//6. 查询第工作票值
String dictValue = getDictValue(workTicketVo);
log.info("查询第工作票值: {}", dictValue);
if (StringUtils.isBlank(dictValue)) {
throw new ServiceException("服务器异常,请联系管理员");
}
//7. 开启动作流
this.dealProcess(dictValue, workTicketVo);
//8. 处理任务
@ -233,7 +236,7 @@ public class TicketProcessServiceImpl implements TicketProcessService {
} else if ("8".equals(workTicketVo.getWorkTicket().getType()) && userId.longValue() != principal.longValue()) {
key = MACHINERY_TICKET_KEY;
}
String dictValue = processDictService.selectDictValueByKey(key);
String dictValue = processDictFeignService.selectDictValueByKey(key);
return dictValue;
}

41
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/operation/StandardTicketInfoVo.java

@ -126,6 +126,47 @@ public class StandardTicketInfoVo extends TenantEntity {
@ApiModelProperty("编号(原站点ID)")
private String signageCode;
/**
* 流程状态'
*/
@ApiModelProperty("流程状态")
private Integer flowStatus;
/**
* 流程描述
*/
@ApiModelProperty("流程描述")
private String flowDescription;
/**
* 下一个审批人
*/
@ApiModelProperty("下一个审批人")
private String nextStepOperator;
/**
* 用户Id
*/
@ApiModelProperty("用户Id")
private String flowUserId;
/**
* 当前任务名
*/
@ApiModelProperty("当前任务名")
private String flowTaskName;
/**
* 当前任务名
*/
@ApiModelProperty("当前任务名")
private String flowTaskId;
@ApiModelProperty("创建人名称")

BIN
hzims-service/ticket/src/main/resources/template/secondary/工作票安全措施附页.docx

Binary file not shown.

BIN
hzims-service/ticket/src/main/resources/template/secondary/有限空间监测记录单.docx

Binary file not shown.

BIN
hzims-service/ticket/src/main/resources/template/secondary/每日开工和收工时间附页.docx

Binary file not shown.

BIN
hzims-service/ticket/src/main/resources/template/水力机械工作票模版.docx

Binary file not shown.

BIN
hzims-service/ticket/src/main/resources/template/电气第二种工作票模版.docx

Binary file not shown.
Loading…
Cancel
Save