Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
tyty 1 year ago
parent
commit
a5d7c530c5
  1. 1
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/feign/IAccessTaskClient.java
  2. 1
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/OfflineTicketServiceImpl.java
  3. 13
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java
  4. 12
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/wrapper/WorkTicketInfoWrapper.java

1
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/feign/IAccessTaskClient.java

@ -15,7 +15,6 @@ import org.springframework.web.bind.annotation.RequestParam;
/** /**
* @author hx * @author hx
*/ */
@Repository
@FeignClient( @FeignClient(
value = OperationalConstants.APP_NAME value = OperationalConstants.APP_NAME
) )

1
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/OfflineTicketServiceImpl.java

@ -71,6 +71,7 @@ public class OfflineTicketServiceImpl extends BaseServiceImpl<WorkTicketInfoMapp
public boolean invoicing(WorkTicketInfoDto dto) { public boolean invoicing(WorkTicketInfoDto dto) {
WorkTicketInfoEntity ticketInfoEntity = BeanUtil.copy(dto,WorkTicketInfoEntity.class); WorkTicketInfoEntity ticketInfoEntity = BeanUtil.copy(dto,WorkTicketInfoEntity.class);
ticketInfoEntity.setCode(this.getTicketCode(ticketInfoEntity.getType(),ticketInfoEntity.getSignageCode())); ticketInfoEntity.setCode(this.getTicketCode(ticketInfoEntity.getType(),ticketInfoEntity.getSignageCode()));
ticketInfoEntity.setStatus(WorkTicketConstants.FirstWorkTicketStatusEnum.OFFLINE_OPERATE.getStatus());
ticketInfoEntity.setFlowStatus(WorkTicketConstants.FirstWorkTicketStatusEnum.OFFLINE_OPERATE.getStatus()); ticketInfoEntity.setFlowStatus(WorkTicketConstants.FirstWorkTicketStatusEnum.OFFLINE_OPERATE.getStatus());
ticketInfoEntity.setFlowTaskName(WorkTicketConstants.FirstWorkTicketStatusEnum.OFFLINE_OPERATE.getDescription()); ticketInfoEntity.setFlowTaskName(WorkTicketConstants.FirstWorkTicketStatusEnum.OFFLINE_OPERATE.getDescription());
String userName = this.getLicensorNameByDept(Long.parseLong(AuthUtil.getDeptId())); String userName = this.getLicensorNameByDept(Long.parseLong(AuthUtil.getDeptId()));

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

@ -983,6 +983,8 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
User user = UserCache.getUser(workTicketInfo.getLicensor()); User user = UserCache.getUser(workTicketInfo.getLicensor());
workTicketInfo.setLicensorName(user == null ? null : user.getName()); workTicketInfo.setLicensorName(user == null ? null : user.getName());
} }
// 工作负责人名称
workTicketInfo.setPrincipalName(Optional.ofNullable(workTicketInfo.getPrincipalManual()).filter(StringUtil::isNotBlank).orElse(workTicketInfo.getPrincipalName()));
// 负责值班负责人 // 负责值班负责人
if (workTicketInfo.getWatchPrincipal() != null) { if (workTicketInfo.getWatchPrincipal() != null) {
@ -1019,14 +1021,11 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
if (workTicketInfo.getTotalPerson() == null) { if (workTicketInfo.getTotalPerson() == null) {
workTicketInfo.setTotalPerson(sb.toString().trim().split(",").length); workTicketInfo.setTotalPerson(sb.toString().trim().split(",").length);
} }
//成员信息
if (workTicketInfo.getClassGroupMembersName() == null) {
workTicketInfo.setClassGroupMembersName(sb.toString().endsWith(",") ? sb.toString().substring(0, sb.length() - 1) : sb.toString());
}
} }
workTicketInfo.setClassGroupMembersName(Optional.ofNullable(workTicketInfo.getClassGroupMembersManual()).filter(StringUtil::isNotBlank).orElse(workTicketInfo.getClassGroupMembersName()));
if(Func.isNotEmpty(workTicketInfo.getClassGroupMembersManual())) {
workTicketInfo.setTotalPerson(workTicketInfo.getClassGroupMembersManual().split(",").length);
}
//负责人名称 //负责人名称
if (workTicketInfo.getPrincipalName() == null && workTicketInfo.getPrincipal() != null) { if (workTicketInfo.getPrincipalName() == null && workTicketInfo.getPrincipal() != null) {
User user = UserCache.getUser(workTicketInfo.getPrincipal()); User user = UserCache.getUser(workTicketInfo.getPrincipal());

12
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/wrapper/WorkTicketInfoWrapper.java

@ -25,20 +25,16 @@ public class WorkTicketInfoWrapper extends BaseEntityWrapper<WorkTicketInfoEntit
@Override @Override
public WorkTicketInfoVO entityVO(WorkTicketInfoEntity entity) { public WorkTicketInfoVO entityVO(WorkTicketInfoEntity entity) {
WorkTicketInfoVO workTicketInfoVO = BeanUtil.copy(entity,WorkTicketInfoVO.class); WorkTicketInfoVO workTicketInfoVO = BeanUtil.copy(entity,WorkTicketInfoVO.class);
User creator = UserCache.getUser(workTicketInfoVO.getCreateUser()); workTicketInfoVO.setCreateUserName(Optional.ofNullable(workTicketInfoVO.getCreateUser()).map(UserCache::getUser).map(User::getName).orElse(null));
User updater = UserCache.getUser(workTicketInfoVO.getUpdateUser()); workTicketInfoVO.setUpdateUserName(Optional.ofNullable(workTicketInfoVO.getUpdateUser()).map(UserCache::getUser).map(User::getName).orElse(null));
workTicketInfoVO.setCreateUserName(Optional.ofNullable(creator).map(User::getName).orElse(null));
workTicketInfoVO.setUpdateUserName(Optional.ofNullable(updater).map(User::getName).orElse(null));
/*完善负责人、许可人名称*/ /*完善负责人、许可人名称*/
if(Func.isEmpty(workTicketInfoVO.getPrincipal())){ if(Func.isEmpty(workTicketInfoVO.getPrincipal())){
workTicketInfoVO.setPrincipalName(workTicketInfoVO.getPrincipalManual()); workTicketInfoVO.setPrincipalName(workTicketInfoVO.getPrincipalManual());
} }
else{ else{
User principal = UserCache.getUser(workTicketInfoVO.getPrincipal()); workTicketInfoVO.setPrincipalName(Optional.ofNullable(workTicketInfoVO.getPrincipal()).map(UserCache::getUser).map(User::getName).orElse(null));
workTicketInfoVO.setPrincipalName(Optional.ofNullable(principal).map(User::getName).orElse(null));
} }
User licensor = UserCache.getUser(workTicketInfoVO.getLicensor()); workTicketInfoVO.setLicensorName(Optional.ofNullable(workTicketInfoVO.getLicensor()).map(UserCache::getUser).map(User::getName).orElse(null));
workTicketInfoVO.setLicensorName(Optional.ofNullable(licensor).map(User::getName).orElse(null));
if(Func.isNotEmpty(workTicketInfoVO.getClassGroupMembersManual())){ if(Func.isNotEmpty(workTicketInfoVO.getClassGroupMembersManual())){
workTicketInfoVO.setClassGroupMembersName(workTicketInfoVO.getClassGroupMembersManual()); workTicketInfoVO.setClassGroupMembersName(workTicketInfoVO.getClassGroupMembersManual());
} }

Loading…
Cancel
Save