Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
yang_shj 8 months ago
parent
commit
8615a5a66d
  1. 10
      hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageClient.java
  2. 36
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java
  3. BIN
      hzims-service/ticket/src/main/resources/template/水力机械工作票模版.docx
  4. BIN
      hzims-service/ticket/src/main/resources/template/电气第一种工作票模版.docx
  5. BIN
      hzims-service/ticket/src/main/resources/template/电气第二种工作票模版.docx

10
hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageClient.java

@ -184,6 +184,9 @@ public class MessageClient extends BladeController implements IMessageClient{
record.setMessageId(IdWorker.getId());
for (Long pushId : Func.toLongList(",", smsImmediatelyPushDTO.getPusher())) {
User user = UserCache.getUser(pushId);
if (ObjectUtil.isEmpty(user)||ObjectUtil.isEmpty(user.getPhone())){
continue;
}
record.setPusherName(user.getName());
record.setPusher(pushId.toString());
record.setPushType(MessageConstants.IMMEDIATELY);
@ -195,14 +198,13 @@ public class MessageClient extends BladeController implements IMessageClient{
record.setStatus(MessageConstants.NOT_PUSH);
Map<String, String> params = smsImmediatelyPushDTO.getParams();
int maxSize=35;
params.put("ruleDefName",getTruncateString(params.get("ruleDefName"), maxSize));
params.put("projectName",getTruncateString(params.get("projectName"), maxSize));
params.put("deviceName",getTruncateString(params.get("deviceName"), maxSize));
for (Map.Entry<String, String> stringStringEntry : params.entrySet()) {
params.put(stringStringEntry.getKey(),getTruncateString(stringStringEntry.getValue(), maxSize));
}
record.setSmsParam(JSON.toJSONString(params));
Boolean flag = recordService.sendSmsImmediatelyMsg(record);
if (!flag) {
log.error("短信推送失败,参数:" + record.toString());
return R.data(false);
}
}
return R.data(true);

36
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java

@ -95,6 +95,7 @@ public class FirstWorkTicketServiceImpl extends BaseServiceImpl<WorkTicketInfoMa
private final IWorkTicketFlowService workTicketFlowService;
private final IWorkTicketDelayService workTicketDelayService;
private final WorkDelayNoScopeMapper workDelayNoScopeMapper;
private final IWorkTicketPrincipalChangeService workTicketPrincipalChangeService;
private final IWorkTicketOperateTimeService workTicketOperateTimeService;
private final IMessageConfigClient messageConfigClient;
private final IAccessTaskClient accessTaskClient;
@ -402,6 +403,41 @@ public class FirstWorkTicketServiceImpl extends BaseServiceImpl<WorkTicketInfoMa
params.put("tellContent",finish.getTellContent());
params.putAll(ObjectUtils.LocalDateConvertMap(finish.getLicensorEndTime(),"e","_"));
}
if("结束".equals(workTicketInfoEntity.getFlowTaskName())){
/**获取工作票负责人变更**/
WorkTicketPrincipalChangeDto workTicketPrincipalChangeDto = new WorkTicketPrincipalChangeDto();
workTicketPrincipalChangeDto.setTicketId(workTicketInfoEntity.getId());
List<WorkTicketPrincipalChangeVO> workTicketPrincipalChangeVOList = workTicketPrincipalChangeService.list(workTicketPrincipalChangeDto);
if(CollectionUtil.isNotEmpty(workTicketPrincipalChangeVOList)){
params.put("initialPrincipalName",workTicketPrincipalChangeVOList.get(0).getInitialPrincipalName());
params.put("changePrincipalName",workTicketPrincipalChangeVOList.get(0).getChangePrincipalName());
params.put("principalChangeTime", DateUtil.format(workTicketPrincipalChangeVOList.get(0).getCreateTime(),TicketConstants.TICKET_DATE_PATTERN));
params.put("signerName2", Optional.ofNullable(workTicketInfoEntity.getSigner()).map(UserCache::getUser).map(User::getName).orElse(null));
params.put("licensorName3", params.get("licensorName"));
}
else {
params.put("initialPrincipalName", "");
params.put("changePrincipalName", "");
params.put("principalChangeTime", "");
params.put("signerName2","");
params.put("licensorName3","");
}
/**获取工作票延期列表**/
List<WorkTicketDelayEntity> workTicketDelayVOList = workDelayNoScopeMapper.selectList(new LambdaQueryWrapper<WorkTicketDelayEntity>() {{
eq(WorkTicketDelayEntity::getTicketId, workTicketInfoEntity.getId());
eq(WorkTicketDelayEntity::getIsDeleted, 0L);
}});
if(CollectionUtil.isNotEmpty(workTicketDelayVOList)){
WorkTicketDelayEntity workTicketDelayVO = workTicketDelayVOList.get(0);
params.put("changeTime",DateUtil.format(workTicketDelayVO.getChangeTime(),TicketConstants.TICKET_DATE_PATTERN));
params.put("principalName2",params.get("principalName"));
}
else {
params.put("changeTime", "");
params.put("principalName2","");
}
}
}
//第一种工作票
params.put("one", "6".equals(workTicketInfoEntity.getType()) ? "☑" : "□");

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

Binary file not shown.

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

Binary file not shown.

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

Binary file not shown.
Loading…
Cancel
Save