diff --git a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/standardTicket/entity/StandardTicketInfoEntity.java b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/standardTicket/entity/StandardTicketInfoEntity.java index db4adbc..ec3aa06 100644 --- a/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/standardTicket/entity/StandardTicketInfoEntity.java +++ b/hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/standardTicket/entity/StandardTicketInfoEntity.java @@ -176,5 +176,23 @@ public class StandardTicketInfoEntity extends TenantEntity implements Serializab @ApiModelProperty("分组") private String classGroupName; + @ApiModelProperty("创建人名称") + private String createUserName; + + @ApiModelProperty("更新人名称") + private String updateUserName; + + + @ApiModelProperty("发令人名称") + private String issueOrderPersonName; + + @ApiModelProperty("受令人名称") + private String accessOrderPersonName; + + @ApiModelProperty("负责人名称") + private String principalName; + + @ApiModelProperty("许可人名称") + private String guardianName; } 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 785d20c..ea16510 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 @@ -196,7 +196,7 @@ public class WorkTicketInfoEntity extends TenantEntity implements Serializable { private Long signer; - @TableField(exist = false) + @ApiModelProperty(value = "签发人名称") private String signerName; @@ -242,7 +242,7 @@ public class WorkTicketInfoEntity extends TenantEntity implements Serializable { - @TableField(exist = false) + @ApiModelProperty(value = "许可人名称") @JsonSerialize(nullsUsing = NullSerializer.class) private String licensorName; @@ -304,7 +304,6 @@ public class WorkTicketInfoEntity extends TenantEntity implements Serializable { /** * 值班负责人名称 */ - @TableField(exist = false) @ApiModelProperty("值班负责人名称") private String watchPrincipalName; @@ -499,7 +498,11 @@ public class WorkTicketInfoEntity extends TenantEntity implements Serializable { @ApiModelProperty("是否线下 : 1-线下,0-线上") private Boolean isOffline; - @ApiModelProperty - private Integer implementStatus; + @ApiModelProperty("0未执行,1为执行(运行人员确认过)") + private String implementStatus; + @ApiModelProperty("创建人名称") + private String createUserName; + @ApiModelProperty("修改人名称") + private String updateUserName; } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java index decba6c..c3043fa 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java @@ -33,12 +33,17 @@ import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.math.NumberUtils; import org.apache.poi.xwpf.usermodel.XWPFDocument; import org.springblade.core.log.exception.ServiceException; +import org.springblade.core.secure.BladeUser; +import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.CollectionUtil; +import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.flow.core.entity.BladeFlow; 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; @@ -90,7 +95,7 @@ public class OperationTicketServiceImpl implements OperationTicketService { /** - * 启动流程 + * 操作票启动流程 * * @param standardTicketInfoVo */ @@ -193,6 +198,13 @@ public class OperationTicketServiceImpl implements OperationTicketService { //填充操作票信息 saveStandardTicketInfoEntity(newStandardTicketInfoEntity, response); newStandardTicketInfoEntity.setProcessInstanceId(response.getProcessInstanceId()); + //填充许可人 + if(ObjectUtil.isNotEmpty(standardTicketInfoVo.getPrincipal())) { + User principal = UserCache.getUser(standardTicketInfoVo.getPrincipal()); + if (ObjectUtil.isNotEmpty(principal)&&StringUtils.isNotBlank(principal.getName())){ + newStandardTicketInfoEntity.setIssueOrderPersonName(principal.getName()); + } + } standardTicketInfoService.updateById(newStandardTicketInfoEntity); @@ -383,6 +395,34 @@ public class OperationTicketServiceImpl implements OperationTicketService { */ private void saveStandardTicketInfo(StandardTicketInfoVo standardTicketInfoVo) { StandardTicketInfoEntity standardTicketInfo = new StandardTicketInfoEntity(); + //保存前保存对应用户得姓名 + if(ObjectUtil.isNotEmpty(standardTicketInfoVo.getCreateUser())){ + BladeUser user = AuthUtil.getUser(); + if (ObjectUtil.isNotEmpty(user.getUserName())){ + standardTicketInfo.setCreateUserName(user.getUserName()); + standardTicketInfo.setUpdateUserName(user.getUserName()); + } + } + /*发令人、受令人、负责人、监护人*/ + if(ObjectUtil.isNotEmpty(standardTicketInfoVo.getIssueOrderPerson())) { + User issueOrderPerson = UserCache.getUser(standardTicketInfoVo.getIssueOrderPerson()); + if (ObjectUtil.isNotEmpty(issueOrderPerson)){ + standardTicketInfo.setIssueOrderPersonName(issueOrderPerson.getName()); + } + } + if(ObjectUtil.isNotEmpty(standardTicketInfoVo.getAccessOrderPerson())) { + User accessOrderPerson = UserCache.getUser(standardTicketInfoVo.getAccessOrderPerson()); + if (ObjectUtil.isNotEmpty(accessOrderPerson)){ + standardTicketInfo.setIssueOrderPersonName(accessOrderPerson.getName()); + } + } + + if(ObjectUtil.isNotEmpty(standardTicketInfoVo.getGuardian())) { + User guardian = UserCache.getUser(standardTicketInfoVo.getGuardian()); + if (ObjectUtil.isNotEmpty(guardian)){ + standardTicketInfo.setIssueOrderPersonName(guardian.getName()); + } + } BeanUtils.copyProperties(standardTicketInfoVo, standardTicketInfo); boolean save = standardTicketInfoService.save(standardTicketInfo); if (!save) { diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/wrapper/StandardTicketInfoWrapper.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/wrapper/StandardTicketInfoWrapper.java index 0416c2a..fa2a562 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/wrapper/StandardTicketInfoWrapper.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/wrapper/StandardTicketInfoWrapper.java @@ -24,31 +24,6 @@ public class StandardTicketInfoWrapper extends BaseEntityWrapper DictCache.getValue(DictConstants.TICKET_SOURCE_TYPE,t)).orElse(null)); return standardTicketInfoVO; 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 6d2ea88..d58dc5e 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 @@ -1124,7 +1124,7 @@ public class FirstWorkTicketServiceImpl extends BaseServiceImpl workTicketInfoMap) { //工作人员 - workTicketInfoMap.put("membersName", infoVO.getPrincipalName()+","+infoVO.getMembersName()); - workTicketInfoMap.put("membersCount", infoVO.getMembersName().split(",").length+1); + workTicketInfoMap.put("membersName", infoVO.getPrincipalName()+","+infoVO.getClassGroupMembersName()); + workTicketInfoMap.put("membersCount", infoVO.getClassGroupMembersName().split(",").length+1); //安全措施 if(CollectionUtil.isNotEmpty(infoVO.getWorkTicketSafetyMeasureVOList())) { List initMeasures = Lists.newArrayList(); @@ -142,7 +142,7 @@ public class MechanicalTicketServiceImpl extends BaseServiceImpl workTicketInfoMap) { // 人数 - workTicketInfoMap.put("membersCount", infoVO.getMembersName().split(",").length); + workTicketInfoMap.put("membersCount", infoVO.getClassGroupMembersName().split(",").length); // 安全措施 if(CollectionUtil.isNotEmpty(infoVO.getWorkTicketSafetyMeasureVOList())) { List initMeasureList = Lists.newArrayList(); @@ -158,7 +158,7 @@ public class SecondTicketServiceImpl extends BaseServiceImpl workTicketFlowVOList = workTicketInfoVO.getWorkTicketFlowVOList(); //签发 diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/vo/WorkTicketInfoVO.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/vo/WorkTicketInfoVO.java index 34353b7..175c671 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/vo/WorkTicketInfoVO.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/vo/WorkTicketInfoVO.java @@ -27,22 +27,6 @@ public class WorkTicketInfoVO extends WorkTicketInfoEntity implements Serializab @ApiModelProperty("流程名称") private String flowName; - - @ApiModelProperty("创建人名称") - private String createUserName; - - @ApiModelProperty("修改人名称") - private String updateUserName; - - @ApiModelProperty("监护人/工作负责人名称") - private String principalName; - - @ApiModelProperty("许可人名称") - private String licensorName; - - @ApiModelProperty("班组成员名称") - private String membersName; - @ApiModelProperty("班组成员数量") @JsonSerialize(nullsUsing = NullSerializer.class) private Integer membersCount; diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/wrapper/WorkTicketInfoWrapper.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/wrapper/WorkTicketInfoWrapper.java index 9d5452a..7367d77 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/wrapper/WorkTicketInfoWrapper.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/wrapper/WorkTicketInfoWrapper.java @@ -25,16 +25,7 @@ public class WorkTicketInfoWrapper extends BaseEntityWrapper + @@ -12,6 +13,7 @@ + @@ -21,6 +23,7 @@ + @@ -30,12 +33,14 @@ + + @@ -43,17 +48,20 @@ + + + @@ -61,11 +69,13 @@ + + @@ -153,9 +163,9 @@ - - - + + + @@ -179,14 +189,14 @@ - - + + - - - + + + @@ -209,9 +219,9 @@ - - - + + + diff --git a/hzims-service/ticket/src/main/resources/file/工作票流程_bak0118.bpmn20.xml b/hzims-service/ticket/src/main/resources/file/工作票流程_bak0118.bpmn20.xml new file mode 100644 index 0000000..28e971e --- /dev/null +++ b/hzims-service/ticket/src/main/resources/file/工作票流程_bak0118.bpmn20.xml @@ -0,0 +1,226 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/hzims-service/ticket/src/main/resources/file/水力机械工作票流程.bpmn20.xml b/hzims-service/ticket/src/main/resources/file/水力机械工作票流程.bpmn20.xml new file mode 100644 index 0000000..f15bd78 --- /dev/null +++ b/hzims-service/ticket/src/main/resources/file/水力机械工作票流程.bpmn20.xml @@ -0,0 +1,268 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/hzims-service/ticket/src/main/resources/file/线下工作票审批流程.bpmn20.xml b/hzims-service/ticket/src/main/resources/file/线下工作票审批流程.bpmn20.xml index 7660161..3e2c854 100644 --- a/hzims-service/ticket/src/main/resources/file/线下工作票审批流程.bpmn20.xml +++ b/hzims-service/ticket/src/main/resources/file/线下工作票审批流程.bpmn20.xml @@ -1,10 +1,11 @@ - + + @@ -13,6 +14,7 @@ + @@ -21,12 +23,14 @@ + + @@ -34,6 +38,7 @@ + @@ -55,8 +60,8 @@ - - + + @@ -88,26 +93,26 @@ - - + + - - - + + + - - + + - - - + + + @@ -122,12 +127,12 @@ - - + + - - + + diff --git a/hzims-service/ticket/src/main/resources/file/线下工作票审批流程_bak.bpmn20.xml b/hzims-service/ticket/src/main/resources/file/线下工作票审批流程_bak.bpmn20.xml new file mode 100644 index 0000000..7660161 --- /dev/null +++ b/hzims-service/ticket/src/main/resources/file/线下工作票审批流程_bak.bpmn20.xml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file