From 7379c5be8a5cebcef69a03fa41f44dfe1b87e9b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B5=E9=A3=9E=E5=AE=87?= <2684146481@qq.com> Date: Thu, 4 May 2023 13:41:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=90=AF=E5=B7=A5=E4=BD=9C=E7=A5=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operational/station/entity/StationEntity.java | 1 + .../fallback/StationFeginServiceFallback.java | 10 + .../ticket/fegin/StationFeginService.java | 16 + .../workTicket/entity/WorkTicketInfoEntity.java | 395 +++++++++--- .../entity/WorkTicketSafetyMeasureEntity.java | 1 + .../operational/station/feign/StationClient.java | 5 + hzims-service/ticket/pom.xml | 13 + .../hnac/hzims/ticket/config/Swagger2Config.java | 60 ++ .../hzims/ticket/processflow/CodeGenerator.java | 4 +- .../constant/TicketProcessConstant.java | 2 +- .../controller/ProcessTypeController.java | 2 +- .../processflow/strategy/core/ProcessIdWorker.java | 343 ++++++----- .../serviceimpl/MakeProcessServiceImpl.java | 4 +- .../ticket/response/ProcessWorkFlowResponse.java | 4 +- .../controller/StandardWorkTicketController.java | 3 +- .../controller/TicketProcessController.java | 49 ++ .../controller/WorkTicketFinishController.java | 20 + .../ticket/twoTicket/entity/WorkTicketFinish.java | 146 +++++ .../twoTicket/enums/FlowWorkTicketConstants.java | 97 +++ .../twoTicket/enums/TwoWorkTicketStatusEnum.java | 62 ++ .../twoTicket/mapper/WorkTicketFinishMapper.java | 17 + .../twoTicket/mapper/WorkTicketFinishMapper.xml | 5 + .../service/IWorkTicketFinishService.java | 16 + .../twoTicket/service/TicketProcessService.java | 9 +- .../service/impl/FirstWorkTicketServiceImpl.java | 1 + .../service/impl/TicketProcessServiceImpl.java | 674 ++++++++++++++++++--- .../service/impl/WorkTicketFinishServiceImpl.java | 20 + .../twoTicket/vo/process/SafetyMeasuresVo.java | 14 +- .../ticket/twoTicket/vo/process/TeamGroupVo.java | 51 +- .../twoTicket/vo/process/TeamPersonnelVo.java | 23 +- .../ticket/twoTicket/vo/process/WorkTicketVo.java | 147 +---- .../workTicket/service/IWorkTicketInfoService.java | 9 + .../service/impl/WorkTicketInfoServiceImpl.java | 18 + .../src/main/resources/file/工作票.bpmn20.xml | 198 +++--- .../main/resources/file/新工作票.bpmn20.xml | 165 +++-- .../hnac/hzims/ticket/TicketApplicationTest.java | 7 + 36 files changed, 1961 insertions(+), 650 deletions(-) create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/ticket/fallback/StationFeginServiceFallback.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/ticket/fegin/StationFeginService.java create mode 100644 hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/config/Swagger2Config.java create mode 100644 hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/TicketProcessController.java create mode 100644 hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/WorkTicketFinishController.java create mode 100644 hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/entity/WorkTicketFinish.java create mode 100644 hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/enums/FlowWorkTicketConstants.java create mode 100644 hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/enums/TwoWorkTicketStatusEnum.java create mode 100644 hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/mapper/WorkTicketFinishMapper.java create mode 100644 hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/mapper/WorkTicketFinishMapper.xml create mode 100644 hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/IWorkTicketFinishService.java create mode 100644 hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/WorkTicketFinishServiceImpl.java diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/StationEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/StationEntity.java index 4468b3b..1253b7c 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/StationEntity.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/station/entity/StationEntity.java @@ -52,6 +52,7 @@ public class StationEntity extends TenantEntity implements Serializable { @QueryField(condition = SqlCondition.EQUAL) private String areaCode; + @ApiModelProperty("上属机构") @QueryField(condition = SqlCondition.EQUAL) private Long higherDept; diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/ticket/fallback/StationFeginServiceFallback.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/ticket/fallback/StationFeginServiceFallback.java new file mode 100644 index 0000000..284f4b6 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/ticket/fallback/StationFeginServiceFallback.java @@ -0,0 +1,10 @@ +package com.hnac.hzims.operational.ticket.fallback; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/4/26 15:04 + */ +public class StationFeginServiceFallback { +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/ticket/fegin/StationFeginService.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/ticket/fegin/StationFeginService.java new file mode 100644 index 0000000..4a4ae29 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/ticket/fegin/StationFeginService.java @@ -0,0 +1,16 @@ +package com.hnac.hzims.operational.ticket.fegin; + +import com.hnac.hzims.operational.ticket.fallback.StationFeginServiceFallback; +import org.springframework.cloud.openfeign.FeignClient; + +import static com.hnac.hzims.operational.OperationalConstants.APP_NAME; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/4/26 15:03 + */ +//@FeignClient(value = APP_NAME,fallback = StationFeginServiceFallback.class) +public interface StationFeginService { +} diff --git a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/entity/WorkTicketInfoEntity.java b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/entity/WorkTicketInfoEntity.java index a07e66f..fc2293a 100644 --- a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/entity/WorkTicketInfoEntity.java +++ b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/entity/WorkTicketInfoEntity.java @@ -25,136 +25,369 @@ import org.springframework.format.annotation.DateTimeFormat; */ @Data @EqualsAndHashCode(callSuper = false) -@ApiModel(value = "工作票对象",description = "工作票对象") +@ApiModel(value = "工作票对象", description = "工作票对象") @TableName("hzims_work_ticket_info") public class WorkTicketInfoEntity extends TenantEntity implements Serializable { - private static final long serialVersionUID=1L; + private static final long serialVersionUID = 1L; + + /** + * 工作流ID + */ @ApiModelProperty(value = "工作流ID") - @QueryField(condition = SqlCondition.EQUAL) + @QueryField(condition = SqlCondition.EQUAL) private String processInstanceId; + + /** + * 附页第几章 + */ + @ApiModelProperty("附页第几章") + private Integer followerNum; + + + /** + * 设备code + */ @ApiModelProperty(value = "设备code") - @QueryField(condition = SqlCondition.EQUAL) + @QueryField(condition = SqlCondition.EQUAL) private String emCode; + /** + * 设备名称 + */ @ApiModelProperty(value = "设备名称") - @QueryField(condition = SqlCondition.LIKE) + @QueryField(condition = SqlCondition.LIKE) private String emName; - @ApiModelProperty(value = "工作票类型") - @QueryField(condition = SqlCondition.EQUAL) + /** + * 工作票类型 + */ + @ApiModelProperty(value = "工作票类型") + @QueryField(condition = SqlCondition.EQUAL) private String type; - @ApiModelProperty(value = "单位") - @QueryField(condition = SqlCondition.LIKE) + + /** + * 票据模板 + */ + @ApiModelProperty("票据模板") + private String ticketTemplate; + + + /** + * 单位 + */ + @ApiModelProperty(value = "单位") + @QueryField(condition = SqlCondition.LIKE) private String company; - @ApiModelProperty(value = "编号") - @QueryField(condition = SqlCondition.LIKE) + + /** + * 编号 + */ + @ApiModelProperty(value = "编号") + @QueryField(condition = SqlCondition.LIKE) private String code; - @ApiModelProperty(value = "关联业务类型") - @QueryField(condition = SqlCondition.EQUAL) + + /** + * 关联业务类型 + */ + @ApiModelProperty(value = "关联业务类型") + @QueryField(condition = SqlCondition.EQUAL) private String taskType; - @ApiModelProperty(value = "关联业务ID") - @QueryField(condition = SqlCondition.EQUAL) - @JsonSerialize(nullsUsing = NullSerializer.class) + + /** + * 关联业务ID + */ + @ApiModelProperty(value = "关联业务ID") + @QueryField(condition = SqlCondition.EQUAL) + @JsonSerialize(nullsUsing = NullSerializer.class) private Long taskId; - @ApiModelProperty("关联业务名称") - @QueryField(condition = SqlCondition.LIKE) - private String taskName; + /** + * 关联业务名称 + */ + @ApiModelProperty("关联业务名称") + @QueryField(condition = SqlCondition.LIKE) + private String taskName; + + /** + * 班组 + */ @ApiModelProperty(value = "班组") - @JsonSerialize(nullsUsing = NullSerializer.class) + @JsonSerialize(nullsUsing = NullSerializer.class) private Long classGroup; + + /** + * 班组名称 + */ @ApiModelProperty("班组名称") private String classGroupName; - @ApiModelProperty(value = "班组成员") + + /** + * 班组成员 + */ + @ApiModelProperty(value = "班组成员") private String classGroupMembers; - @ApiModelProperty(value = "班组成员手填") - private String classGroupMembersManual; - @ApiModelProperty(value = "工作地点及设备名称") + /** + * 班组成员手填 + */ + @ApiModelProperty(value = "班组成员手填") + private String classGroupMembersManual; + + + /** + * 班组成员名称 + */ + @ApiModelProperty(value = "班组成员名称") + private String classGroupMembersName; + + + /** + * 工作地点及设备名称 + */ + @ApiModelProperty(value = "工作地点及设备名称") private String addressEquName; - @ApiModelProperty(value = "工作任务及内容") + + /** + * 工作任务及内容 + */ + @ApiModelProperty(value = "工作任务及内容") private String workContent; - @ApiModelProperty(value = "计划开始时间") - @DateTimeFormat( - pattern = "yyyy-MM-dd HH:mm:ss" - ) - @JsonFormat( - pattern = "yyyy-MM-dd HH:mm:ss" - ) + + /** + * 计划开始时间 + */ + @ApiModelProperty(value = "计划开始时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime planStartTime; - @ApiModelProperty(value = "计划结束时间") - @DateTimeFormat( - pattern = "yyyy-MM-dd HH:mm:ss" - ) - @JsonFormat( - pattern = "yyyy-MM-dd HH:mm:ss" - ) + /** + * 计划结束时间 + */ + @ApiModelProperty(value = "计划结束时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime planEndTime; - @ApiModelProperty(value = "签发人") - @JsonSerialize(nullsUsing = NullSerializer.class) + + /** + * 签发人 + */ + @ApiModelProperty(value = "签发人") + @JsonSerialize(nullsUsing = NullSerializer.class) private Long signer; - @ApiModelProperty(value = "负责人") - @JsonSerialize(nullsUsing = NullSerializer.class) + + /** + * 签发人签发时间 + */ + @ApiModelProperty(value = "签发人签发时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime signerDateTime; + + + /** + * 负责人 + */ + @ApiModelProperty(value = "负责人") + @JsonSerialize(nullsUsing = NullSerializer.class) private Long principal; - @ApiModelProperty(value = "手填值班负责人") - private String principalManual; + /** + * 手填值班负责人 + */ + @ApiModelProperty(value = "手填值班负责人") + private String principalManual; + + + /** + * 负责人名称 + */ + @ApiModelProperty(value = "负责人名称") + @JsonSerialize(nullsUsing = NullSerializer.class) + private String principalName; + - @ApiModelProperty(value = "许可人") - @JsonSerialize(nullsUsing = NullSerializer.class) + /** + * 许可人 + */ + @ApiModelProperty(value = "许可人") + @JsonSerialize(nullsUsing = NullSerializer.class) private Long licensor; - @ApiModelProperty(value = "许可时间") - @DateTimeFormat( - pattern = "yyyy-MM-dd HH:mm:ss" - ) - @JsonFormat( - pattern = "yyyy-MM-dd HH:mm:ss" - ) + /** + * 许可时间 + */ + @ApiModelProperty(value = "许可时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime licenseTime; - @ApiModelProperty("工作负责人确认工作完成上传图片地址") - private String confirmImgUrls; - - @ApiModelProperty("工作负责人确认工作完成上传图片名称") - private String confirmImgFilenames; - - @DateTimeFormat( - pattern = "yyyy-MM-dd HH:mm:ss" - ) - @JsonFormat( - pattern = "yyyy-MM-dd HH:mm:ss" - ) - @ApiModelProperty("工作负责人确认工作完成时间") - private LocalDateTime confirmWorkTime; - - @DateTimeFormat( - pattern = "yyyy-MM-dd HH:mm:ss" - ) - @JsonFormat( - pattern = "yyyy-MM-dd HH:mm:ss" - ) - @ApiModelProperty(value = "许可人确认工作结束时间") - private LocalDateTime licenseEndTime; - - @ApiModelProperty("是否评价") - @JsonSerialize(nullsUsing = NullSerializer.class) - private Integer isEvaluate; + + /** + * 工作负责人确认工作完成上传图片地址 + */ + @ApiModelProperty("工作负责人确认工作完成上传图片地址") + private String confirmImgUrls; + + /** + * 工作负责人确认工作完成上传图片名称 + */ + @ApiModelProperty("工作负责人确认工作完成上传图片名称") + private String confirmImgFilenames; + + + /** + * 工作负责人确认工作完成时间 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("工作负责人确认工作完成时间") + private LocalDateTime confirmWorkTime; + + + /** + * 许可人确认工作结束时间 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "许可人确认工作结束时间") + private LocalDateTime licenseEndTime; + + + @ApiModelProperty("是否评价") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Integer isEvaluate; + + + /** + * 值班负责人 + */ + @ApiModelProperty("值班负责人") + private Long watchPrincipal; + + + /** + * 批准工作结束时间 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("批准工作结束时间") + private LocalDateTime watchPrincipalEndTime; + + + /** + * 开工时间 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("开工时间") + private LocalDateTime startDateTime; + + + /** + * 收工时间 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("收工时间") + private LocalDateTime endDateTime; + + + /** + * 工作票结束时间 + */ + @ApiModelProperty("工作票结束时间") + private LocalDateTime workTicketEndTime; + + + /** + * 备注 + */ + @ApiModelProperty("备注") + private String content; + + + /** + * 交底内容 + */ + @ApiModelProperty("交底内容") + private String tellContent; + + + /** + * 工作条件(false 停电 true 不停电) + */ + @ApiModelProperty("工作条件(false 停电 true 不停电)") + private Boolean isPower; + + + /** + * 流程状态' + */ + @ApiModelProperty("流程状态") + private Integer flowStatus; + + /** + * 流程描述 + */ + @ApiModelProperty("流程描述") + private String flowDescription; + + + /** + * AA/AAA/AAAA由建站时建站人填写必须系统验证唯一性 + * 站点标识-两票编码 + */ + @ApiModelProperty("站点标识-两票编码") + private String signage; + + + /** + * 编号(原站点ID) + */ + @ApiModelProperty("编号(原站点ID)") + private String signageCode; + + + /** + * 开票时间 + */ + @ApiModelProperty("开票时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime makeDateTime; + /** + * 共几人 + */ + @ApiModelProperty("共几人") + private Integer totalPerson; + + + /** + * 负责人确认安全措施时间 + */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime confirmDateTime; + + + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime issuerReviewDateTime; } diff --git a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/entity/WorkTicketSafetyMeasureEntity.java b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/entity/WorkTicketSafetyMeasureEntity.java index 956ffd1..cd4b164 100644 --- a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/entity/WorkTicketSafetyMeasureEntity.java +++ b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/workTicket/entity/WorkTicketSafetyMeasureEntity.java @@ -93,4 +93,5 @@ public class WorkTicketSafetyMeasureEntity extends TenantEntity implements Seria @JsonSerialize(nullsUsing = NullSerializer.class) private Integer sort; + } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/feign/StationClient.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/feign/StationClient.java index 48644d6..e96e54a 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/feign/StationClient.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/feign/StationClient.java @@ -128,6 +128,11 @@ public class StationClient implements IStationClient { return R.data(stationService.getOne(request)); } + + + + + @Override @PostMapping("/getStationByCodeOrRedDept") @ApiOperation("根据条件查询单个站点") diff --git a/hzims-service/ticket/pom.xml b/hzims-service/ticket/pom.xml index 0685ea8..4169881 100644 --- a/hzims-service/ticket/pom.xml +++ b/hzims-service/ticket/pom.xml @@ -20,6 +20,7 @@ 3.15 3.2.0 1.0.3 + 1.9.6 @@ -277,6 +278,18 @@ + + + + com.github.xiaoymin + swagger-bootstrap-ui + ${swagger-bootstrap-ui.version} + + + + com.hnac.hzims + hzims-operational-api + diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/config/Swagger2Config.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/config/Swagger2Config.java new file mode 100644 index 0000000..6299226 --- /dev/null +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/config/Swagger2Config.java @@ -0,0 +1,60 @@ +package com.hnac.hzims.ticket.config; + +import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j; +import com.google.common.base.Predicates; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.PathSelectors; +import springfox.documentation.service.ApiInfo; +import springfox.documentation.service.Contact; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spring.web.plugins.Docket; +import springfox.documentation.swagger2.annotations.EnableSwagger2; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/4/13 13:40 + */ +//@Configuration +//@EnableSwagger2 +public class Swagger2Config implements WebMvcConfigurer { + + + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + registry.addResourceHandler("/**") + .addResourceLocations("classpath:/static/"); + registry.addResourceHandler("doc.html") + .addResourceLocations("classpath:/META-INF/resources/"); + registry.addResourceHandler("/webjars/**") + .addResourceLocations("classpath:/META-INF/resources/webjars/"); + } + + + + @Bean + public Docket webApiConfig(){ + return new Docket(DocumentationType.SWAGGER_2) + .groupName("工作票") + .apiInfo(webApiInfo()) + .select() + //只显示api路径下的页面 + .paths(Predicates.and(PathSelectors.regex("/ticket-process/.*"))) + .build(); + + } + + private ApiInfo webApiInfo() { + return new ApiInfoBuilder() + .title("网站-API文档") + .description("本文档描述了网站微服务接口定义") + .version("1.0") + .contact(new Contact("WL", "http://localhost:8501/", "55317332@qq.com")) + .build(); + } +} diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/CodeGenerator.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/CodeGenerator.java index 7693224..b797501 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/CodeGenerator.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/CodeGenerator.java @@ -42,7 +42,7 @@ // // // 包配置 // PackageConfig pc = new PackageConfig(); -// pc.setModuleName("processflow"); +// pc.setModuleName("p"); // pc.setParent("com.hnac.hzims.ticket"); // mpg.setPackageInfo(pc); // @@ -93,7 +93,7 @@ // // strategy.setSuperControllerClass("你自己的父类控制器,没有就不用设置!"); // // 写于父类中的公共字段 // // strategy.setSuperEntityColumns("id"); -// strategy.setInclude("hzims_process_type"); +// strategy.setInclude("hzims_work_ticket_finish"); // strategy.setControllerMappingHyphenStyle(true); // strategy.setTablePrefix("hzims_"); // mpg.setStrategy(strategy); diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/constant/TicketProcessConstant.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/constant/TicketProcessConstant.java index d161a4f..f37dcae 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/constant/TicketProcessConstant.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/constant/TicketProcessConstant.java @@ -11,5 +11,5 @@ package com.hnac.hzims.ticket.processflow.constant; public class TicketProcessConstant { // public final static String STARTEVENT = "startEvent1"; - public final static String STARTEVENT = "newFirstWorkTicket"; + public final static String STARTEVENT = "workTicket"; } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/controller/ProcessTypeController.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/controller/ProcessTypeController.java index 80d39e0..8e22483 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/controller/ProcessTypeController.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/controller/ProcessTypeController.java @@ -107,7 +107,7 @@ public class ProcessTypeController { workTicketMessageResponse.setTaskId("1"); workTicketMessageResponse.setProcessDefinitionKey("newFirstWorkTicket"); workTicketMessageResponse.setTaskName("签发人签发"); - workTicketMessageResponse.setFormData("1"); + workTicketMessageResponse.setVariables("1"); String qqqq = JsonUtil.toJson(workTicketMessageResponse); queueProduceService.sendMessage("blade:queue:flow", qqqq); } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/core/ProcessIdWorker.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/core/ProcessIdWorker.java index e29a875..6fcddf2 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/core/ProcessIdWorker.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/core/ProcessIdWorker.java @@ -3,12 +3,15 @@ package com.hnac.hzims.ticket.processflow.strategy.core; import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.toolkit.StringUtils; import lombok.Data; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.core.ValueOperations; import org.springframework.stereotype.Component; import java.text.NumberFormat; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; import java.util.HashMap; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; @@ -22,166 +25,190 @@ import java.util.concurrent.atomic.AtomicInteger; * @Serial 1.0 * @Date 2023/3/27 10:11 */ +@Slf4j @Component public class ProcessIdWorker { - private static Map cacheMap = new HashMap<>(); - - - @Autowired - private StringRedisTemplate redisTemplate; - - private static NumberFormat numberFormatter; - - - static { - //初始化 - numberFormatter = NumberFormat.getInstance(); - numberFormatter.setGroupingUsed(false); - numberFormatter.setMinimumIntegerDigits(3); - numberFormatter.setMaximumFractionDigits(3); - } - - /** - * 按规则生成票据编码:票据编码:AA-BB-CCCC-DDD格式 - * - * @param staff AA在建站之初由接站人员填写要求唯一 - * @param typeInstrument 票据种类,第一种票,第二种票 - * @param yearMonth 开票时间年月 - */ - public String getTicketCode(String staff, String typeInstrument, String yearMonth) { - ValueOperations operations = redisTemplate.opsForValue(); - AtomicInteger atomicInteger = new AtomicInteger(1); - String key = staff + ":" + typeInstrument + ":" + yearMonth; - // TicketCode ticketCode1 = cacheMap.get(key); - TicketCode ticketCode = JSON.parseObject(operations.get(key), TicketCode.class); - if (ticketCode == null) { - ticketCode = new TicketCode(); - ticketCode.setYearMonth(yearMonth); - ticketCode.setSequencing(atomicInteger); - // cacheMap.put(key, ticketCode); - operations.set(key, JSON.toJSONString(ticketCode)); - String result = getTicketCode(staff, typeInstrument, yearMonth, atomicInteger.get()); - return result; - } - - String originalYearMonth = ticketCode.getYearMonth(); - - AtomicInteger sequencing = ticketCode.getSequencing(); - - //生成 票据排序 格式 001 010 111 - int code = getYearMonthCode(originalYearMonth, yearMonth, key, sequencing); - - String result = getTicketCode(staff, typeInstrument, yearMonth, code); - return result; - } - - - /** - * 生成的票据 编号 - */ - public String getTicketCode(String staff, String typeInstrument, String YearMonth, int sequencing) { - return staff.concat("-").concat(typeInstrument).concat("-").concat(YearMonth).concat("-").concat(numberFormatter.format(sequencing)); - } - - - /** - * 返回票据排序 - * - * @param - * @param originalYearMonth 上次的年月 年的后2位 + 月 - * @param nextYearMonth 现在的年月 年的后2位 + 月 - * @param key - * @param sequencing - * @return - */ - private int getYearMonthCode(String originalYearMonth, String nextYearMonth, String key, AtomicInteger sequencing) { - ValueOperations operations = redisTemplate.opsForValue(); - //1. 累计票据 - sequencing.incrementAndGet(); - //3. 判断年是否为空 - if (StringUtils.isEmpty(originalYearMonth) && StringUtils.isEmpty(nextYearMonth)) { - return sequencing.get(); - } - //4. 验证年 最后一位数 - String year1 = getSubstring(originalYearMonth, 1); - String year2 = getSubstring(nextYearMonth, 1); - if (!year1.equals(year2)) { - sequencing.compareAndSet(sequencing.get(), 1); - return sequencing.get(); - } - - //4. 验证倒数第二位数 - year1 = getSubstring(originalYearMonth, 2); - year2 = getSubstring(nextYearMonth, 2); - if (!year1.equals(year2)) { - sequencing.compareAndSet(sequencing.get(), 1); - return sequencing.get(); - } - - //4. 验证倒数第三位数 - year1 = getSubstring(originalYearMonth, 3); - year2 = getSubstring(nextYearMonth, 3); - if (!year1.equals(year2)) { - sequencing.compareAndSet(sequencing.get(), 1); - return sequencing.get(); - } - - - //6. sequencing 大于等于1000 的话,从头开始 - if (sequencing.get() >= 1000) { - sequencing.compareAndSet(sequencing.get(), 1); - System.out.println("sequencing >= 1000 被执行呢"); - redisTemplate.delete(key); - // cacheMap.remove(key); - return sequencing.get(); - } - - TicketCode ticketCode = new TicketCode(); - ticketCode.setYearMonth(nextYearMonth); - ticketCode.setSequencing(sequencing); - operations.set(key, JSON.toJSONString(ticketCode)); - //cacheMap.put(key, ticketCode); - - return sequencing.get(); - } - - /** - * 截取字符串 - * - * @param originalYearMonth - * @param digit 位数 - * @return - */ - private static String getSubstring(String originalYearMonth, int digit) { - return originalYearMonth.substring(originalYearMonth.length() - digit); - } - - - /** - * 按规则生成票据编码:票据编码:AA-BB-CCCC-DDD格式 - * @param staff AA在建站之初由接站人员填写要求唯一 - * @param typeInstrument 票据种类,第一种票,第二种票 - * @param year 年 - * @param month 月 - * @return - */ - public String getTicketCode(String staff, String typeInstrument, String year,String month){ - String yearMonth = year.substring(year.length() - 2) + month; - return getTicketCode(staff,typeInstrument,yearMonth); - } - - @Data - public static class TicketCode { - - /** - * 月份 - */ - private String yearMonth; - /** - * 记录数 - */ - private AtomicInteger sequencing = new AtomicInteger(1); - } + private static Map cacheMap = new HashMap<>(); + + + @Autowired + private StringRedisTemplate redisTemplate; + + private static NumberFormat numberFormatter; + + + static { + //初始化 + numberFormatter = NumberFormat.getInstance(); + numberFormatter.setGroupingUsed(false); + numberFormatter.setMinimumIntegerDigits(3); + numberFormatter.setMaximumFractionDigits(3); + } + + /** + * 按规则生成票据编码:票据编码:AA-BB-CCCC-DDD格式 + * + * @param staff AA在建站之初由接站人员填写要求唯一 + * @param typeInstrument 票据种类,第一种票,第二种票 + * @param yearMonth 开票时间年月 + */ + private String getTicketCode(String staff, String typeInstrument, String yearMonth) { + ValueOperations operations = redisTemplate.opsForValue(); + AtomicInteger atomicInteger = new AtomicInteger(1); + String key = staff + ":" + typeInstrument + ":" + yearMonth; + // TicketCode ticketCode1 = cacheMap.get(key); + TicketCode ticketCode = JSON.parseObject(operations.get(key), TicketCode.class); + if (ticketCode == null) { + ticketCode = new TicketCode(); + ticketCode.setYearMonth(yearMonth); + ticketCode.setSequencing(atomicInteger); + // cacheMap.put(key, ticketCode); + operations.set(key, JSON.toJSONString(ticketCode)); + String result = getTicketCode(staff, typeInstrument, yearMonth, atomicInteger.get()); + return result; + } + + String originalYearMonth = ticketCode.getYearMonth(); + + AtomicInteger sequencing = ticketCode.getSequencing(); + + //生成 票据排序 格式 001 010 111 + int code = getYearMonthCode(originalYearMonth, yearMonth, key, sequencing); + //获取编码信息 + String result = getTicketCode(staff, typeInstrument, yearMonth, code); + log.info("获取编码信息 {}", result); + return result; + } + + + /** + * 生成的票据 编号 + */ + private String getTicketCode(String staff, String typeInstrument, String YearMonth, int sequencing) { + return staff.concat("-").concat(typeInstrument).concat("-").concat(YearMonth).concat("-").concat(numberFormatter.format(sequencing)); + } + + + /** + * 返回票据排序 + * + * @param + * @param originalYearMonth 上次的年月 年的后2位 + 月 + * @param nextYearMonth 现在的年月 年的后2位 + 月 + * @param key + * @param sequencing + * @return + */ + private int getYearMonthCode(String originalYearMonth, String nextYearMonth, String key, AtomicInteger sequencing) { + ValueOperations operations = redisTemplate.opsForValue(); + //1. 累计票据 + sequencing.incrementAndGet(); + //3. 判断年是否为空 + if (StringUtils.isEmpty(originalYearMonth) && StringUtils.isEmpty(nextYearMonth)) { + return sequencing.get(); + } + //4. 验证年 最后一位数 + String year1 = getSubstring(originalYearMonth, 1); + String year2 = getSubstring(nextYearMonth, 1); + if (!year1.equals(year2)) { + sequencing.compareAndSet(sequencing.get(), 1); + return sequencing.get(); + } + + //4. 验证倒数第二位数 + year1 = getSubstring(originalYearMonth, 2); + year2 = getSubstring(nextYearMonth, 2); + if (!year1.equals(year2)) { + sequencing.compareAndSet(sequencing.get(), 1); + return sequencing.get(); + } + + //4. 验证倒数第三位数 + year1 = getSubstring(originalYearMonth, 3); + year2 = getSubstring(nextYearMonth, 3); + if (!year1.equals(year2)) { + sequencing.compareAndSet(sequencing.get(), 1); + return sequencing.get(); + } + + + //6. sequencing 大于等于1000 的话,从头开始 + if (sequencing.get() >= 1000) { + sequencing.compareAndSet(sequencing.get(), 1); + System.out.println("sequencing >= 1000 被执行呢"); + redisTemplate.delete(key); + // cacheMap.remove(key); + return sequencing.get(); + } + + TicketCode ticketCode = new TicketCode(); + ticketCode.setYearMonth(nextYearMonth); + ticketCode.setSequencing(sequencing); + operations.set(key, JSON.toJSONString(ticketCode)); + //cacheMap.put(key, ticketCode); + + return sequencing.get(); + } + + /** + * 截取字符串 + * + * @param originalYearMonth + * @param digit 位数 + * @return + */ + private static String getSubstring(String originalYearMonth, int digit) { + return originalYearMonth.substring(originalYearMonth.length() - digit); + } + + + /** + * 按规则生成票据编码:票据编码:AA-BB-CCCC-DDD格式 + * + * @param staff AA在建站之初由接站人员填写要求唯一 + * @param typeInstrument 票据种类,第一种票,第二种票 + * @param year 年 + * @param month 月 + * @return + */ + private String getTicketCode(String staff, String typeInstrument, String year, String month) { + String yearMonth = year.substring(year.length() - 2) + month; + return getTicketCode(staff, typeInstrument, yearMonth); + } + + + /** + * 按规则生成票据编码:票据编码:AA-BB-CCCC-DDD格式 + * + * @param staff AA在建站之初由接站人员填写要求唯一 + * @param typeInstrument 票据种类,第一种票,第二种票 + * @param createTime 开票时间 YYYY-MM-dd HH:mm:ss + * @return + */ + public String getTicketByCode(String staff, String typeInstrument, LocalDateTime createTime) { + DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + String format = createTime.format(dateTimeFormatter); + String year = format.substring(0, 4); + log.info("获取年份信息: {}", year); + String month = format.substring(5, 7); + log.info("获取月份信息: {}", month); + return getTicketCode(staff, typeInstrument, year, month); + } + + + @Data + public static class TicketCode { + + /** + * 月份 + */ + private String yearMonth; + /** + * 记录数 + */ + private AtomicInteger sequencing = new AtomicInteger(1); + } + } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/serviceimpl/MakeProcessServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/serviceimpl/MakeProcessServiceImpl.java index cf40c11..cb5f248 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/serviceimpl/MakeProcessServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/processflow/strategy/serviceimpl/MakeProcessServiceImpl.java @@ -8,6 +8,7 @@ import com.hnac.hzims.ticket.processflow.strategy.entity.WorkflowQueue; import com.hnac.hzims.ticket.twoTicket.service.TicketProcessService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springblade.core.tool.api.R; import org.springframework.stereotype.Service; import java.util.List; @@ -54,7 +55,6 @@ public class MakeProcessServiceImpl extends ProcessAbstractService { */ @Override public void calculate(ProcessWorkFlowResponse response) { - log.info("启动开票流程环节...."); - ticketProcessService.startUp(response); + ticketProcessService.findPending(response); } } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/response/ProcessWorkFlowResponse.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/response/ProcessWorkFlowResponse.java index 8e4dcbf..f32345e 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/response/ProcessWorkFlowResponse.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/response/ProcessWorkFlowResponse.java @@ -45,7 +45,9 @@ public class ProcessWorkFlowResponse implements Serializable { */ private String nextStepOperator; + + /**票据表单**/ - private String formData; + private String variables; } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardWorkTicketController.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardWorkTicketController.java index 9fa6697..986749b 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardWorkTicketController.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardWorkTicketController.java @@ -18,6 +18,7 @@ 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; /** @@ -70,7 +71,7 @@ public class StandardWorkTicketController { @ApiOperation("测试生成唯一编码") @GetMapping("/idWored") public R idWored() { - String ticketCode = standardTicketIdWorker.getTicketCode("aa", "bb", "2304"); + String ticketCode = standardTicketIdWorker.getTicketByCode("aa", "bb", LocalDateTime.now()); return R.data(ticketCode); } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/TicketProcessController.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/TicketProcessController.java new file mode 100644 index 0000000..7d0030b --- /dev/null +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/TicketProcessController.java @@ -0,0 +1,49 @@ +package com.hnac.hzims.ticket.twoTicket.controller; + +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.Tag; +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.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; + +/** + * 工作票 + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/4/23 10:34 + */ +@Slf4j +@RestController +@RequiredArgsConstructor +@Api(tags = "新工作票") +@RequestMapping("/ticket-process") +public class TicketProcessController { + + + @Autowired + private TicketProcessService ticketProcessService; + + + /** + * 启动流程 + * @return + */ + @ApiOperation("启动流程") + @PostMapping("/startUp") + public R start(@RequestBody WorkTicketVo workTicketVo) { + ticketProcessService.startUp(workTicketVo); + return R.success("启动流程成功"); + } + + + +} diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/WorkTicketFinishController.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/WorkTicketFinishController.java new file mode 100644 index 0000000..80ce24f --- /dev/null +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/WorkTicketFinishController.java @@ -0,0 +1,20 @@ +package com.hnac.hzims.ticket.twoTicket.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 工作结束 前端控制器 + *

+ * + * @author dfy + * @since 2023-04-24 + */ +@RestController +@RequestMapping("/p/work-ticket-finish") +public class WorkTicketFinishController { + +} + diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/entity/WorkTicketFinish.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/entity/WorkTicketFinish.java new file mode 100644 index 0000000..e201719 --- /dev/null +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/entity/WorkTicketFinish.java @@ -0,0 +1,146 @@ +package com.hnac.hzims.ticket.twoTicket.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * 工作结束 + *

+ * + * @author dfy + * @since 2023-04-24 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("hzims_work_ticket_finish") +public class WorkTicketFinish implements Serializable { + + private static final long serialVersionUID=1L; + + /** + * 编号 + */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 工作票编号 + */ + @ApiModelProperty("工作票编号") + @TableField("ticket_id") + private Long ticketId; + + /** + * 临时接地线 + */ + @ApiModelProperty("临时接地线") + @TableField("temp_ground_num") + private Integer tempGroundNum; + + /** + * 临时拆除几组 + */ + @ApiModelProperty("临时拆除几组") + @TableField("temp_dismantle_num") + private Integer tempDismantleNum; + + /** + * 接地线几组 + */ + @ApiModelProperty("接地线几组") + @TableField("ground_num") + private Integer groundNum; + + /** + * 拆除几组 + */ + @ApiModelProperty("拆除几组") + @TableField("dismantle_num") + private Integer dismantleNum; + + /** + * 保留几组 + */ + @ApiModelProperty("拆除几组") + @TableField("retain_num") + private Integer retainNum; + + + /** + * 创建时间 + */ + @ApiModelProperty("创建时间") + @TableField("create_time") + private LocalDateTime createTime; + + /** + * 更新时间 + */ + @ApiModelProperty("更新时间") + @TableField("update_time") + private LocalDateTime updateTime; + + /** + * 负责人名称 + */ + @ApiModelProperty("负责人名称") + @TableField("principal") + private Long principal; + + + + /** + * 许可人 + */ + @ApiModelProperty("许可人") + @TableField("licensor") + private Long licensor; + + + + /** + * 负责人工作结束时间 + */ + @ApiModelProperty("负责人工作结束时间") + private LocalDateTime principalEndTime; + + + /** + * 工作票终结时间 + */ + @ApiModelProperty("工作票终结时间") + private LocalDateTime licensorEndTime; + + + /** + * 结束时间 + */ + private LocalDateTime workEndTime; + + + + /** + * 备注 + */ + @ApiModelProperty("备注") + private String content; + + /** + * 交底内容 + */ + @ApiModelProperty("交底内容") + private String tellContent; + + +} diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/enums/FlowWorkTicketConstants.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/enums/FlowWorkTicketConstants.java new file mode 100644 index 0000000..6c84698 --- /dev/null +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/enums/FlowWorkTicketConstants.java @@ -0,0 +1,97 @@ +package com.hnac.hzims.ticket.twoTicket.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +import java.util.Arrays; +import java.util.Optional; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/3/24 11:34 + */ +public enum FlowWorkTicketConstants { + /** + * 开票 + */ + START(1, "开票"), + /** + * 签发人签发 + */ + SIGN(2, "签发人签发"), + /** + * 运行人员接收 + */ + RECEIVE(3,"运行人员接收"), + /** + * 运行人员布置安全措施 + */ + FIX_UP(4 ,"运行人员布置安全措施"), + /** + * 工作负责人确认安全措施 + */ + PRINCIPAL_CONFIRM_MEASURE(5 ,"工作负责人确认安全措施"), + + /** + * 许可人许可 + */ + LICENCE(6,"许可人许可"), + + + + /** + * 工作负责人确认工作内容执行 + */ + PRINCIPAL_CONFIRM_CONTENT(6, "工作负责人确认工作内容执行"), + + /** + * 工作负责人确认工作票结束 + */ + PRINCIPAL_CONFIRM_END(7, "工作负责人确认工作票结束、终结"), + + + /** + * 许可人确认工作票结束 + */ + LICENSE_CONFIRM_END(9, "许可人确认工作票结束、终结"), + + /** + * 签发人审核 + */ + SIGN_CONFIRM_DELAY(10, "签发人审核"), + + /** + * 工作票转移 + */ + PROCESS_COURSE(12 , "工作票转移"), + /** + * 工作票延期 + */ + PROCESS_POSTPONE(13, "工作票延期"), + + /** + * 结束 + */ + END(14,"流程结束"); + + @Getter + private Integer status; + + @Getter + private String description; + + FlowWorkTicketConstants(Integer status, String description) { + this.status = status; + this.description = description; + } + + + public static FlowWorkTicketConstants getEnumByStatus(Integer status) { + Optional statusOptional = Arrays.stream(FlowWorkTicketConstants.class.getEnumConstants()) + .filter(e -> status.equals(e.getStatus())).findAny(); + return statusOptional.orElse(null); + } + +} diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/enums/TwoWorkTicketStatusEnum.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/enums/TwoWorkTicketStatusEnum.java new file mode 100644 index 0000000..b72b77c --- /dev/null +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/enums/TwoWorkTicketStatusEnum.java @@ -0,0 +1,62 @@ +package com.hnac.hzims.ticket.twoTicket.enums; + +import com.hnac.hzims.ticket.constants.WorkTicketConstants; +import lombok.AllArgsConstructor; +import lombok.Getter; + +import java.util.Arrays; +import java.util.Optional; + +/** + * @Author WL + * @Version v1.0 + * @Serial 1.0 + * @Date 2023/4/24 17:19 + */ +@AllArgsConstructor +public enum TwoWorkTicketStatusEnum { + + /**签发**/ + SIGN(1,"签发"), + /**收到工作票**/ + RECEIVE(2,"收到工作票"), + /**许可人许可**/ + LICENSE(3,"许可人许可"), + /**确认条件具备**/ + CONFIRM_MEASURE(4,"确认条件具备"), + /**工作负责人确认工作**/ + CONFIRM_WORK(5,"工作负责人确认工作"), + /**许可人确认工作结束**/ + WORK_FINISH(6,"许可人确认工作结束"), + /**工作票终结**/ + TICKET_FINISH(7,"工作票终结"), + /**结束**/ + FINISH(8,"结束"), + /**许可人延期确认**/ + LICENSE_DELAY(9,"许可人延期确认"), + /**负责人延期确认**/ + CONFIRM_DELAY(10,"负责人延期确认"), + /**作废**/ + INVALID(11,"作废"), + /**逾期**/ + OVERDUE(12,"逾期"), + /**线下开票**/ + OFFLINE(13,"线下开票"), + /**线下执行任务**/ + OFFLINE_OPERATE(14,"线下执行任务"), + /**线下许可人许可**/ + OFFLINE_LICENSE(15,"线下许可人许可"), + /**线下结束**/ + OFFLINE_END(16,"线下结束") + ; + @Getter + private Integer status; + @Getter + private String description; + + public static WorkTicketConstants.FirstWorkTicketStatusEnum getEnumByStatus(Integer status) { + Optional statusOptional = Arrays.stream(WorkTicketConstants.FirstWorkTicketStatusEnum.class.getEnumConstants()) + .filter(e-> status.equals(e.getStatus())).findAny(); + return statusOptional.orElse(null); + } +} diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/mapper/WorkTicketFinishMapper.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/mapper/WorkTicketFinishMapper.java new file mode 100644 index 0000000..398cb8f --- /dev/null +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/mapper/WorkTicketFinishMapper.java @@ -0,0 +1,17 @@ +package com.hnac.hzims.ticket.twoTicket.mapper; + + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hnac.hzims.ticket.twoTicket.entity.WorkTicketFinish; + +/** + *

+ * 工作结束 Mapper 接口 + *

+ * + * @author dfy + * @since 2023-04-24 + */ +public interface WorkTicketFinishMapper extends BaseMapper { + +} diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/mapper/WorkTicketFinishMapper.xml b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/mapper/WorkTicketFinishMapper.xml new file mode 100644 index 0000000..0b73df2 --- /dev/null +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/mapper/WorkTicketFinishMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/IWorkTicketFinishService.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/IWorkTicketFinishService.java new file mode 100644 index 0000000..43bdf90 --- /dev/null +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/IWorkTicketFinishService.java @@ -0,0 +1,16 @@ +package com.hnac.hzims.ticket.twoTicket.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.hnac.hzims.ticket.twoTicket.entity.WorkTicketFinish; + +/** + *

+ * 工作结束 服务类 + *

+ * + * @author dfy + * @since 2023-04-24 + */ +public interface IWorkTicketFinishService extends IService { + +} diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/TicketProcessService.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/TicketProcessService.java index 0c134f2..2d0005e 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/TicketProcessService.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/TicketProcessService.java @@ -1,6 +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; /** * 开票处理流程接口 @@ -13,7 +14,13 @@ public interface TicketProcessService { /** * 启动开票流程 + */ + void startUp(WorkTicketVo workTicketVo); + + + /** + * 待处理 * @param response */ - void startUp(ProcessWorkFlowResponse response); + void findPending(ProcessWorkFlowResponse response); } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java index 59e0853..b207705 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java @@ -788,6 +788,7 @@ public class FirstWorkTicketServiceImpl extends BaseServiceImpl map = new HashMap(){{ - put("key",true); - }}; + 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 workTicketVo + */ + @Override + @Transactional + public void startUp(WorkTicketVo workTicketVo) { + if (workTicketVo.getWorkTicket().getSignage() == null) { + throw new ServiceException("站点标识-两票编码不能为空"); + } + //1. 获取站点站点标识-两票编码 + StationEntity stationEntity = new StationEntity(); + stationEntity.setCode(workTicketVo.getWorkTicket().getSignageCode()); + R stationClientOne = stationClient.getOne(stationEntity); + if (!stationClientOne.isSuccess()) { + throw new IllegalArgumentException("根据条件获取唯一站点出错呢"); + } + StationEntity station = stationClientOne.getData(); + if (station == null) { + throw new ServiceException("根据条件获取唯一站点暂无数据"); + } + + log.info("前端查的站点编号 :{}",workTicketVo.getWorkTicket().getSignage()); + log.info("后端查寻的站点编码 :{}",station.getSignage()); + if (!workTicketVo.getWorkTicket().getSignage().equals(station.getSignage())) { + throw new ServiceException("获取唯一站点不一致"); + } + String signage = + station.getSignage().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()); + workTicketVo.getWorkTicket().setCode(code); + //3 .保存工作对象 + this.saveWorkTicketInfo(workTicketVo.getWorkTicket()); + //4. 保存安全措施 + this.saveSafetyMeasures(workTicketVo.getSafetyMeasuresList(), workTicketVo.getWorkTicket()); + //5. 保存工作任务 + this.saveWorkTicketContentDto(workTicketVo.getWorkTicketContentDtoList(), workTicketVo.getWorkTicket()); + //6. 开启动作流 + this.dealProcess(newFirstWorkTicketFlowKey, workTicketVo); + } + + /** + * 待处理 + * * @param response */ @Override - public void startUp(ProcessWorkFlowResponse response) { + public void findPending(ProcessWorkFlowResponse response) { + //json转换表单 + String formData = response.getVariables(); + WorkTicketVo workTicketVo = JSON.parseObject(formData, WorkTicketVo.class); + WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket(); + //2.流程处理 + Integer flowStatus = workTicket.getFlowStatus(); + FlowWorkTicketConstants enumByStatus = FlowWorkTicketConstants.getEnumByStatus(flowStatus); + 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; + } + } - Boolean key = map.get("key"); - //当前环节Id - String processDefinitionKey = response.getProcessDefinitionKey(); - //当前任务Id - String taskId = response.getTaskId(); - //表单数据 - String formData = response.getFormData(); - log.info("当前任务ID:{},当前流程定义ID:{},启动开票流程", taskId, processDefinitionKey); - System.out.println(formData); + /** + * 签发人审核 + * @param response + * @param workTicketVo + */ + private void signConfirmDelay(ProcessWorkFlowResponse response, WorkTicketVo workTicketVo) { + WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket(); + workTicket.setFlowStatus(FlowWorkTicketConstants.LICENCE.getStatus()); + workTicket.setFlowDescription(FlowWorkTicketConstants.LICENCE.getDescription()); + workTicketInfoService.updateById(workTicket); - // Map variables = new HashMap<>(); - // variables.put("task_id", taskId); - // variables.put("signUserIds", formData); - if (key) { - Map params = new HashMap(2) {{ - put("taskId", "4066d774-df2c-11ed-b33e-fa163ee12c20"); - put("signUserIds", "1377143375838359553"); - }}; + } - R processInstanceContainNameByKey = flowClient.startProcessInstanceContainNameByKey( - processDefinitionKey, "workTicket:task:" + 1377143375838359553L, - "开启工作的任务", - params); + /** + * 工作票转移 + * @param response + * @param workTicketVo + */ + private void processCourse(ProcessWorkFlowResponse response, WorkTicketVo workTicketVo) { + //工作票负责人变更 + WorkTicketPrincipalChangeEntity workTicketPrincipalChange = workTicketVo.getWorkTicketPrincipalChange(); + workTicketPrincipalChangeService.save(workTicketPrincipalChange); + //更新工作票信息 + WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket(); + workTicket.setFlowStatus(FlowWorkTicketConstants.SIGN_CONFIRM_DELAY.getStatus()); + workTicket.setFlowDescription(FlowWorkTicketConstants.SIGN_CONFIRM_DELAY.getDescription()); + workTicketInfoService.updateById(workTicket); - if (processInstanceContainNameByKey.getCode() != 200) { - log.error("启动开票流程失败: {}", processInstanceContainNameByKey); - return; - } - BladeFlow bladeFlow = processInstanceContainNameByKey.getData(); - log.info("bladeFlow: {}", bladeFlow); - map.put("key",false); + } + + + /** + * 工作票延期 + * + * @param response + * @param workTicketVo + */ + private void processPostpone(ProcessWorkFlowResponse response, WorkTicketVo workTicketVo) { + //保存工作票延期 + WorkTicketDelayEntity workTicketDelay = workTicketVo.getWorkTicketDelay(); + workTicketDelayService.save(workTicketDelay); + //更新工作票信息 + WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket(); + workTicket.setFlowStatus(FlowWorkTicketConstants.LICENCE.getStatus()); + workTicket.setFlowDescription(FlowWorkTicketConstants.LICENCE.getDescription()); + workTicketInfoService.updateById(workTicket); + + } + + + /** + * 许可人确认工作票结束 + * + * @param response + * @param workTicketVo + */ + private void licenseConfirmEnd(ProcessWorkFlowResponse response, WorkTicketVo workTicketVo) { + //工作结束 + WorkTicketFinish workTicketFinish = workTicketVo.getWorkTicketFinish(); + workTicketFinishService.updateById(workTicketFinish); + //更新工作票信息 + WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket(); + workTicket.setFlowStatus(FlowWorkTicketConstants.END.getStatus()); + workTicket.setFlowDescription(FlowWorkTicketConstants.END.getDescription()); + workTicketInfoService.updateById(workTicket); + } + + + /** + * 工作负责人确认工作票结束 + * + * @param response + * @param workTicketVo + */ + private void principalConfirmEnd(ProcessWorkFlowResponse response, WorkTicketVo workTicketVo) { + //工作结束 + WorkTicketFinish workTicketFinish = workTicketVo.getWorkTicketFinish(); + workTicketFinishService.save(workTicketFinish); + //更新工作票信息 + WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket(); + workTicket.setFlowStatus(FlowWorkTicketConstants.LICENSE_CONFIRM_END.getStatus()); + workTicket.setFlowDescription(FlowWorkTicketConstants.LICENSE_CONFIRM_END.getDescription()); + workTicketInfoService.updateById(workTicket); + } + + + /** + * 工作负责人确认工作内容执行 + * + * @param response + * @param workTicketVo + */ + private void principalConfirmContent(ProcessWorkFlowResponse response, WorkTicketVo workTicketVo) { + List workTicketOperateTimeEntities = workTicketVo.getWorkTicketOperateTimeEntities(); + if (CollectionUtils.isEmpty(workTicketOperateTimeEntities)) { + log.info("暂时没有每日开工每日收的数据"); + return; + } + workTicketOperateTimeServiceImpl.saveBatch(workTicketOperateTimeEntities); + //更新工作票信息 + WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket(); + workTicket.setFlowStatus(FlowWorkTicketConstants.PRINCIPAL_CONFIRM_END.getStatus()); + workTicket.setFlowDescription(FlowWorkTicketConstants.PRINCIPAL_CONFIRM_END.getDescription()); + workTicketInfoService.updateById(workTicket); + } + + /** + * 许可人许可 + * + * @param response + * @param workTicketVo + */ + private void license(ProcessWorkFlowResponse response, WorkTicketVo workTicketVo) { + List safetyMeasuresList = workTicketVo.getSafetyMeasuresList(); + if (CollectionUtils.isEmpty(safetyMeasuresList)) { + log.error("没有安全措施数据"); return; } + //更新安全措施的状态 + List workTicketSafetyMeasureEntities = new ArrayList<>(); + for (WorkTicketSafetyMeasureDto workTicketSafetyMeasureDto : safetyMeasuresList) { + WorkTicketSafetyMeasureEntity workTicketSafetyMeasureEntity = BeanUtil.copyProperties(workTicketSafetyMeasureDto, WorkTicketSafetyMeasureEntity.class); + workTicketSafetyMeasureEntities.add(workTicketSafetyMeasureEntity); + } + workTicketSafetyMeasureService.saveBatch(workTicketSafetyMeasureEntities); - // R tasks = flowClient.getTaskByProcessInstanceIdAndUserId(response.getProcessInstanceId(), - // "1377143375838359553"); - // - // - // flowClient.getTaskByProcessInstanceIdAndUserId(response.getProcessInstanceId(), - // "1377143375838359553"); - // - // if (tasks.getCode() != 200){ - // return; - // } - // - // BladeFlow bladeFlow1 = tasks.getData(); - // - // String curStep = bladeFlow1.getCurStep(); - // System.out.println("curStep = " + curStep); - // - // String status = bladeFlow1.getStatus(); - // System.out.println("status = " + status); - // - // // R> listR = flowClient.todoList(processDefinitionKey); - // // listR.getData().forEach(taskList -> { - // // System.out.println("任务名称:"+taskList); - // // System.out.println(taskList.getTaskName()); - // // System.out.println(taskList.getStatus()); - // // }); - // - // R> taskedVariables = flowClient.taskVariables(response.getTaskId()); - // - // System.out.println(taskedVariables); - - - // R> listR = flowClient.todoList(response.getProcessDefinitionKey()); - // for (TaskList datum : listR.getData()) { - // System.out.println(datum); - // } - - - ComleteTask comleteTask = new ComleteTask(); - comleteTask.setPass(true); - comleteTask.setProcessInstanceId(response.getProcessInstanceId()); - comleteTask.setTaksUserId(1377143375838359553L); - comleteTask.setTaskId(response.getTaskId()); - comleteTask.setComment("同意"); - FlowAttachment flowAttachment= new FlowAttachment(); - flowAttachment.setProcessInstanceId(response.getProcessInstanceId()); - flowAttachment.setTaskId(taskId); - flowAttachment.setAttachmentType(""); - List list = new ArrayList<>(); - list.add(flowAttachment); - comleteTask.setAttachments(list); - Map params = new HashMap(2) {{ - put("taskId",taskId); - put("principalUserIds", "1377143375838359553"); - }}; - comleteTask.setVariables(params); - flowClient.completeTask(comleteTask); + //更新工作票 + WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket(); + workTicket.setFlowStatus(FlowWorkTicketConstants.PRINCIPAL_CONFIRM_CONTENT.getStatus()); + workTicket.setFlowDescription(FlowWorkTicketConstants.PRINCIPAL_CONFIRM_CONTENT.getDescription()); + workTicketInfoService.updateById(workTicket); + } + /** + * 工作负责人确认安全措施 + * + * @param response + * @param workTicketVo + */ + private void principal(ProcessWorkFlowResponse response, WorkTicketVo workTicketVo) { + WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket(); + //负责人确认时间 + //workTicket.setConfirmDateTime(workTicketVo.getWorkTicket().getConfirmDateTime()); + workTicket.setFlowStatus(FlowWorkTicketConstants.PRINCIPAL_CONFIRM_MEASURE.getStatus()); + workTicket.setFlowDescription(FlowWorkTicketConstants.PRINCIPAL_CONFIRM_MEASURE.getDescription()); + //更新状态值 + workTicketInfoService.updateById(workTicket); } + + + /** + * 运行人员布置安全措施 + * + * @param response + * @param workTicketVo + */ + private void safety(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); + } + + + /** + * 运功人接收 + * + * @param response + * @param workTicketVo + */ + private void reception(ProcessWorkFlowResponse response, WorkTicketVo workTicketVo) { + WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket(); + workTicket.setFlowStatus(FlowWorkTicketConstants.FIX_UP.getStatus()); + workTicket.setFlowDescription(FlowWorkTicketConstants.FIX_UP.getDescription()); + //更新状态值 + workTicketInfoService.updateById(workTicket); + } + + + /** + * 第一种工作票签发 + */ + //@Transactional(rollbackFor = Exception.class) + public void sign(ProcessWorkFlowResponse response, WorkTicketVo workTicketVo) { + WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket(); + //更新状态值 + WorkTicketInfoEntity workTicketInfoEntity = new WorkTicketInfoEntity(); + workTicketInfoEntity.setFlowStatus(FlowWorkTicketConstants.RECEIVE.getStatus()); + workTicketInfoEntity.setFlowDescription(FlowWorkTicketConstants.RECEIVE.getDescription()); + workTicketInfoEntity.setSignerDateTime(workTicketVo.getWorkTicket().getSignerDateTime()); + workTicketInfoService.updateById(workTicketInfoEntity); + } + + + /** + * 开票 + */ + private void make(ProcessWorkFlowResponse response, WorkTicketVo workTicketVo) { + WorkTicketInfoEntity workTicket = workTicketVo.getWorkTicket(); + workTicket.setProcessInstanceId(response.getProcessInstanceId()); + //保存工作流实例ID + workTicketInfoService.update(Wrappers.lambdaUpdate(). + set(WorkTicketInfoEntity::getProcessInstanceId, response.getProcessInstanceId()). + set(WorkTicketInfoEntity::getFlowStatus, FlowWorkTicketConstants.SIGN.getStatus()).set(WorkTicketInfoEntity::getFlowDescription, FlowWorkTicketConstants.SIGN.getDescription()).eq(WorkTicketInfoEntity::getId, workTicket.getId())); + //处理来源任务 + 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()); + } + } + + + /** + * 开启流程 + * + * @param newFirstWorkTicketFlowKey + * @param workTicketVo + */ + private void + dealProcess(String newFirstWorkTicketFlowKey, WorkTicketVo workTicketVo) { + //若为线下工作票 则无需开启工作流 + Integer status = WorkTicketConstants.FirstWorkTicketStatusEnum.SIGN.getStatus(); + if (status.intValue() != workTicketVo.getWorkTicket().getStatus().intValue()) { + return; + } + log.info("租户Id:{}",AuthUtil.getTenantId()); + log.info("用户部门Id: {}",AuthUtil.getUser().getDeptId()); + log.info("用户Id: {}",AuthUtil.getUserId()); + //获取签发人角色下的人员 + R> 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()); + Map params = new HashMap<>(4); + params.put("workTicketVo",workTicketVo); + R 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); + } + + + /** + * 保存工作任务 + * + * @param workTicketContentDtoList + * @param workTicketInfoEntity + */ + private void saveWorkTicketContentDto(List workTicketContentDtoList, WorkTicketInfoEntity workTicketInfoEntity) { + if (CollectionUtils.isEmpty(workTicketContentDtoList)) { + return; + } + List contentEntities = workTicketContentDtoList.stream().map(contentDto -> { + WorkTicketContentEntity contentEntity = BeanUtil.copy(contentDto, WorkTicketContentEntity.class); + contentEntity.setTicketId(workTicketInfoEntity.getId()); + contentEntity.setCreateDept(workTicketInfoEntity.getCreateDept()); + return contentEntity; + }).collect(Collectors.toList()); + boolean savedBatch = contentService.saveBatch(contentEntities); + if (!savedBatch) { + throw new IllegalArgumentException("保存工作任务出错呢"); + } + + } + + + /** + * 保存安全措施 + * + * @param safetyMeasuresList + * @param workTicketInfoEntity + */ + private void saveSafetyMeasures(List safetyMeasuresList, WorkTicketInfoEntity workTicketInfoEntity) { + if (CollectionUtil.isEmpty(safetyMeasuresList)) { + return; + } + List 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; + }).collect(Collectors.toList()); + boolean savedBatch = workTicketSafetyMeasureService.saveBatch(measureEntityList); + if (!savedBatch) { + throw new IllegalArgumentException("保存安全措施出错呢"); + } + + } + + + /** + * 保存工作对象 + * + * @param workTicket + * @return + */ + private WorkTicketInfoEntity saveWorkTicketInfo(WorkTicketInfoEntity workTicket) { + workTicket.setStatus(Func.isEmpty(workTicket.getPrincipal()) || Func.isEmpty(workTicket.getClassGroupMembers()) ? WorkTicketConstants.FirstWorkTicketStatusEnum.OFFLINE_OPERATE.getStatus() : WorkTicketConstants.FirstWorkTicketStatusEnum.SIGN.getStatus()); + //班组成员名称 + String byclassGroupMembers = getByClassGroupMembers(workTicket); + workTicket.setClassGroupMembersName(byclassGroupMembers); + //班组负责人 + String principalName = getByPrincipal(workTicket); + workTicket.setPrincipalName(principalName); + workTicket.setFlowStatus(FlowWorkTicketConstants.START.getStatus()); + workTicket.setFlowDescription(FlowWorkTicketConstants.START.getDescription()); + //唯一 + workTicket.setCreateUser(AuthUtil.getUserId()); + boolean isSave = firstWorkTicketService.save(workTicket); + if (!isSave) { + throw new IllegalArgumentException("保存工作对象错误"); + } + return workTicket; + } + + + /** + * 把班组负责人 ==> principalName 里 + * + * @param workTicket + * @return + */ + private String getByPrincipal(WorkTicketInfoEntity workTicket) { + //班组成员 + Long principal = workTicket.getPrincipal(); + if (ObjectUtils.isNotEmpty(principal)) { + return UserCache.getUser(principal).getName(); + } + return workTicket.getPrincipalManual(); + } + + + /** + * 把班组成员 ==> classGroupMembersName 里 + */ + private String getByClassGroupMembers(WorkTicketInfoEntity workTicket) { + StringJoiner stringJoiner = new StringJoiner(","); + //班组成员 + String classGroupMembers = workTicket.getClassGroupMembers(); + if (StringUtils.isNotBlank(classGroupMembers)) { + String[] splits = classGroupMembers.split(","); + for (String split : splits) { + User user = UserCache.getUser(Long.valueOf(split)); + stringJoiner.add(user != null ? user.getName() : ""); + } + } + String classGroupMembersManual = workTicket.getClassGroupMembersManual(); + if (StringUtils.isNotBlank(classGroupMembersManual)) { + String[] splits = classGroupMembersManual.split(","); + for (String split : splits) { + stringJoiner.add(split); + } + } + return stringJoiner.toString(); + } + } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/WorkTicketFinishServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/WorkTicketFinishServiceImpl.java new file mode 100644 index 0000000..17c044d --- /dev/null +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/WorkTicketFinishServiceImpl.java @@ -0,0 +1,20 @@ +package com.hnac.hzims.ticket.twoTicket.service.impl; + +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 org.springframework.stereotype.Service; + +/** + *

+ * 工作结束 服务实现类 + *

+ * + * @author dfy + * @since 2023-04-24 + */ +@Service +public class WorkTicketFinishServiceImpl extends ServiceImpl implements IWorkTicketFinishService { + +} diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/process/SafetyMeasuresVo.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/process/SafetyMeasuresVo.java index 410dfb3..8e84867 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/process/SafetyMeasuresVo.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/process/SafetyMeasuresVo.java @@ -1,5 +1,6 @@ package com.hnac.hzims.ticket.twoTicket.vo.process; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.time.LocalDateTime; @@ -16,32 +17,31 @@ public class SafetyMeasuresVo { /** * 安全措施Id */ + @ApiModelProperty("安全措施Id") private String safetyId; - /** * 安全措施名称 */ + @ApiModelProperty("安全措施名称") private String safetyName; /** * 安全措施说明 */ + @ApiModelProperty("安全措施说明") private String safetyExplain; /** * 是否执行 状态 (true √ false ×) */ - private Boolean status; - - /** - * 执行标识 (有的话 已执行 (√) 否 null) - */ - private String statusType; + @ApiModelProperty(" 是否执行 状态 (true √ false ×)") + private Boolean isExecute; /** * 安全措施时间 */ + @ApiModelProperty("安全措施时间") private LocalDateTime safetyTime; } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/process/TeamGroupVo.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/process/TeamGroupVo.java index ddb5af3..0d9fdea 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/process/TeamGroupVo.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/process/TeamGroupVo.java @@ -1,5 +1,6 @@ package com.hnac.hzims.ticket.twoTicket.vo.process; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.time.LocalDateTime; @@ -18,54 +19,96 @@ public class TeamGroupVo { /** * 班组Id */ + @ApiModelProperty("班组Id") private String groupId; /** * 班组 名称 */ + @ApiModelProperty("班组名称") private String groupName; /** - * 变更 负责人 id + * 负责人id */ + @ApiModelProperty("原负责人id") private String workLeaderId; /** - * 变更 负责人 名称 + * 负责人名称 */ + @ApiModelProperty("原负责人名称") private String workLeaderName; /** + * 负责人id + */ + @ApiModelProperty("原负责人id") + private String changeWorkLeaderId; + + + /** + * 变更负责人 + */ + private String changeWorkLeaderName; + + + /** * 班组人员 */ + @ApiModelProperty("班组人员") private List teamGroupName; /** + * 开工时间 + */ + @ApiModelProperty("开工时间") + private LocalDateTime startDateTime; + + + /** + * 收工时间 + */ + @ApiModelProperty("收工时间") + private LocalDateTime endDateTime; + + + /** * 离开时间 */ + @ApiModelProperty("离开时间") private LocalDateTime changeGroupDepartureTime; /** * 加入时间 */ + @ApiModelProperty("加入时间") private LocalDateTime changeGroupAddTime; /** * 离开内容 */ + @ApiModelProperty("离开内容") private LocalDateTime changeContent; /** - * 收工时间 (完成时间) + * 是否有变动 */ - private LocalDateTime leaveTime; + @ApiModelProperty("是否有变动") + private Boolean isChange; + + /** + * 变动时间 + */ + @ApiModelProperty("变动时间") + private LocalDateTime changeTime; } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/process/TeamPersonnelVo.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/process/TeamPersonnelVo.java index e39e8b6..586b504 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/process/TeamPersonnelVo.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/process/TeamPersonnelVo.java @@ -1,5 +1,6 @@ package com.hnac.hzims.ticket.twoTicket.vo.process; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.time.LocalDateTime; @@ -14,22 +15,34 @@ import java.time.LocalDateTime; public class TeamPersonnelVo { + /** * 人员名称 */ - private String name; + @ApiModelProperty("人员Id") + private String userId; + + + /** + * 人员名称 + */ + @ApiModelProperty("人员名称") + private String username; + /** - * 开工时间 + * 变动人员Id */ - private LocalDateTime startDateTime; + @ApiModelProperty("变动人员Id") + private String changeUserId; /** - * 收工时间 + * 变动人员名称 */ - private LocalDateTime endDateTime; + @ApiModelProperty("变动人员名称") + private String changeUsername; diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/process/WorkTicketVo.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/process/WorkTicketVo.java index 8cb78cb..904541b 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/process/WorkTicketVo.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/process/WorkTicketVo.java @@ -1,162 +1,77 @@ 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 io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import java.time.LocalDateTime; import java.util.List; /** - * @Author WL + * @Author dfy * @Version v1.0 * @Serial 1.0 * @Date 2023/4/6 11:52 */ @Data +@ApiModel("工作票对象") public class WorkTicketVo { - /** - * 编号 - */ - private String serialNumberId; - - - /** - * 票据名称 - */ - private String ticketName; - - - /** - * 票据模板 - */ - private String ticketTemplate; - - /** - * 开票来源 - */ - private String opensource; - - /** - * 开票任务来源 - */ - private String opensourceTask; - - - /** - * 设备 - */ - private String device; - - /** - * 单位 - */ - private String unit; - /** - * 班组 + * 工作票对象 */ - private List TeamGroupList; - - - /** - * 工作地点 - */ - private String workPlace; - - - /** - * 工作内容 - */ - private String workContent; - - /** - * 设备及工作地点 - */ - private String devicePlace; - - /** - * 设备及工作内容 - */ - private String deviceContent; - - - /** - * 计划开始时间 - */ - private LocalDateTime projectStartTime; - - /** - * 计划结束时间 - */ - private LocalDateTime projectEndTime; + @ApiModelProperty("工作票对象") + private WorkTicketInfoEntity workTicket; /** * 安全措施 */ - private List safetyMeasuresList; + @ApiModelProperty("安全措施数组") + private List safetyMeasuresList; /** - * 工作签发人 + * 工作票工作任务组 */ - private String workSigner; + @ApiModelProperty("工作票工作任务组") + private List workTicketContentDtoList; - /** - * 签发人时间 - */ - private LocalDateTime workSignerTime; /** - * 批准工作结束时间 + * 工作票延期 */ - private LocalDateTime workEndTime; - - /** - * 值班负责人 - */ - private String WatchPrincipal; - - /** - * 许可人 - */ - private String licensorName; - - /** - * 许可人时间 - */ - private LocalDateTime licensorTime; + @ApiModelProperty("工作票延期") + private WorkTicketDelayEntity workTicketDelay; /** - * 变动时间 + * 工作结束 */ - private String changeTime; + @ApiModelProperty("工作结束") + private WorkTicketFinish workTicketFinish; /** - * 延期时间 + * 工作开始时间和结束时间 */ - private LocalDateTime postponeDateTime; + @ApiModelProperty("工作开始时间和结束时间") + private List workTicketOperateTimeEntities; /** - * 交底内容 + * 工作票负责人变更 */ - private String tellContent; + private WorkTicketPrincipalChangeEntity workTicketPrincipalChange; - /** - * 工作票结束时间 - */ - private LocalDateTime workTicketEndTime; - - - /** - * 备注 - */ - private String content; - } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketInfoService.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketInfoService.java index 37f0e5f..48e377e 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketInfoService.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketInfoService.java @@ -135,4 +135,13 @@ public interface IWorkTicketInfoService extends BaseService workTicketListByMonthAndArea(Page pageEntity, StandardTicketWithAreaVo standardTicketWithAreaVo); + + + /** + * 更新状态值 + * @param status + * @param description + * @param id + */ + void updateFlowStatusById(Integer status, String description, Long id); } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java index 9952803..7bbe64b 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java @@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; 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; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -21,6 +22,7 @@ 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.enums.FlowWorkTicketConstants; import com.hnac.hzims.ticket.utils.ExcelUtil; import com.hnac.hzims.ticket.workTicket.dto.*; import com.hnac.hzims.ticket.workTicket.entity.WorkTicketDelayEntity; @@ -940,4 +942,20 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl 0; } + + + /** + * 更新状态值 + * + * @param status + * @param description + * @param id + */ + @Override + public void updateFlowStatusById(Integer status, String description, Long id) { + LambdaUpdateWrapper queryWrapper = new LambdaUpdateWrapper<>(); + queryWrapper.set(WorkTicketInfoEntity::getFlowStatus, status); + queryWrapper.set(WorkTicketInfoEntity::getFlowDescription, description); + queryWrapper.eq(WorkTicketInfoEntity::getId,id); + } } diff --git a/hzims-service/ticket/src/main/resources/file/工作票.bpmn20.xml b/hzims-service/ticket/src/main/resources/file/工作票.bpmn20.xml index 823e09f..1b29421 100644 --- a/hzims-service/ticket/src/main/resources/file/工作票.bpmn20.xml +++ b/hzims-service/ticket/src/main/resources/file/工作票.bpmn20.xml @@ -1,5 +1,5 @@ - + @@ -11,33 +11,30 @@ - - + - + + - - - + - + - @@ -50,7 +47,7 @@ - + @@ -58,20 +55,35 @@ - - - - - - - + + + + + + + - + - - + + + + + + + + + + + + + + + + + @@ -94,19 +106,19 @@ - + - + - + - + - + @@ -115,79 +127,87 @@ - + - - - - - - - - - - - + + + + + + - - - + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hzims-service/ticket/src/main/resources/file/新工作票.bpmn20.xml b/hzims-service/ticket/src/main/resources/file/新工作票.bpmn20.xml index bbc2874..fbd5498 100644 --- a/hzims-service/ticket/src/main/resources/file/新工作票.bpmn20.xml +++ b/hzims-service/ticket/src/main/resources/file/新工作票.bpmn20.xml @@ -1,88 +1,87 @@ - - + + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -105,13 +104,13 @@ - + - + @@ -126,84 +125,84 @@ - + - - - + + + - - - + + + + + - + + + + + - + - - - + + + - + - - - - + + + + - - - + + + - - - + + + - + - - - - - - - + + + - - - - - + + + - - - + + + - - - + + + - - - + + + - - - - + + + + - + \ No newline at end of file diff --git a/hzims-service/ticket/src/test/java/com/hnac/hzims/ticket/TicketApplicationTest.java b/hzims-service/ticket/src/test/java/com/hnac/hzims/ticket/TicketApplicationTest.java index aaa93b5..f103792 100644 --- a/hzims-service/ticket/src/test/java/com/hnac/hzims/ticket/TicketApplicationTest.java +++ b/hzims-service/ticket/src/test/java/com/hnac/hzims/ticket/TicketApplicationTest.java @@ -84,4 +84,11 @@ public class TicketApplicationTest { TicketInfoStatisticVO ticketInfoStatisticVO = firstWorkTicketService.workTicketReportStatistic(startDate, endDate, deptIdList); log.info("{}",JSON.toJSONString(ticketInfoStatisticVO)); } + + + @Test + public void worker() { + System.out.println(1); + } + }