Browse Source

# 线下工作票修改

zhongwei
haungxing 1 year ago
parent
commit
e5f4ba9fa8
  1. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/OfflineTicketServiceImpl.java
  2. 11
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/wrapper/WorkTicketInfoWrapper.java

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

@ -71,7 +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.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()));
ticketInfoEntity.setStepOperator(userName); ticketInfoEntity.setStepOperator(userName);

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

@ -39,15 +39,8 @@ public class WorkTicketInfoWrapper extends BaseEntityWrapper<WorkTicketInfoEntit
} }
User licensor = UserCache.getUser(workTicketInfoVO.getLicensor()); User licensor = UserCache.getUser(workTicketInfoVO.getLicensor());
workTicketInfoVO.setLicensorName(Optional.ofNullable(licensor).map(User::getName).orElse(null)); workTicketInfoVO.setLicensorName(Optional.ofNullable(licensor).map(User::getName).orElse(null));
/*完善班组成员名称,按逗号分隔*/ if(Func.isNotEmpty(workTicketInfoVO.getClassGroupMembersManual())){
if(Func.isEmpty(workTicketInfoVO.getClassGroupMembers())){ workTicketInfoVO.setClassGroupMembersName(workTicketInfoVO.getClassGroupMembersManual());
workTicketInfoVO.setMembersName(workTicketInfoVO.getClassGroupMembersManual());
}
else{
String membersName = Optional.ofNullable(workTicketInfoVO.getClassGroupMembers()).map(ids -> {
return Arrays.stream(ids.split(",")).map(id->Optional.ofNullable(UserCache.getUser(Long.parseLong(id))).map(User::getName).orElse(id)).collect(Collectors.joining(","));
}).orElse(null);
workTicketInfoVO.setMembersName(membersName);
} }
/*完善票据来源、票据类型*/ /*完善票据来源、票据类型*/
workTicketInfoVO.setTypeName(DictCache.getValue(DictConstants.TICKET_TYPE,workTicketInfoVO.getType())); workTicketInfoVO.setTypeName(DictCache.getValue(DictConstants.TICKET_TYPE,workTicketInfoVO.getType()));

Loading…
Cancel
Save