Browse Source

缺陷记录编码修正

zhongwei
tyty 1 year ago
parent
commit
6fdfe4b649
  1. 6
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/DefectCheckServiceImpl.java

6
hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/DefectCheckServiceImpl.java

@ -79,7 +79,7 @@ public class DefectCheckServiceImpl extends BaseServiceImpl<OperPhenomenonMapper
private final IUserClient userClient; private final IUserClient userClient;
@Autowired @Autowired
private RedisTemplate redisTemplate; private RedisTemplate redisTemplate;
private IStationClient stationClient; private final IStationClient stationClient;
private final IFlowClient processClient; private final IFlowClient processClient;
private final IMessageClient messageClient; private final IMessageClient messageClient;
@ -150,14 +150,14 @@ public class DefectCheckServiceImpl extends BaseServiceImpl<OperPhenomenonMapper
LocalDateTime firstDay = date.with(TemporalAdjusters.firstDayOfMonth()).withHour(0).withMinute(0).withSecond(0); LocalDateTime firstDay = date.with(TemporalAdjusters.firstDayOfMonth()).withHour(0).withMinute(0).withSecond(0);
LocalDateTime lastDay = date.with(TemporalAdjusters.lastDayOfMonth()).withHour(23).withMinute(59).withSecond(59); LocalDateTime lastDay = date.with(TemporalAdjusters.lastDayOfMonth()).withHour(23).withMinute(59).withSecond(59);
List<OperPhenomenonEntity> ticketList = this.list( List<OperPhenomenonEntity> ticketList = this.list(
Wrappers.<OperPhenomenonEntity>lambdaQuery().eq(OperPhenomenonEntity::getCreateDept, entity.getCreateDept()) Wrappers.<OperPhenomenonEntity>lambdaQuery().eq(OperPhenomenonEntity::getCreateDept, deptId)
.ge(OperPhenomenonEntity::getCreateTime, firstDay).le(OperPhenomenonEntity::getCreateTime, lastDay) .ge(OperPhenomenonEntity::getCreateTime, firstDay).le(OperPhenomenonEntity::getCreateTime, lastDay)
); );
String suffix = String.format(String.format("%03d", ticketList.size() + 1)); String suffix = String.format(String.format("%03d", ticketList.size() + 1));
String result = stationR.getData().getSignage() + yearMonth + suffix; String result = stationR.getData().getSignage() + yearMonth + suffix;
// 缺陷编码 : 按项目+年+月+序号 // 缺陷编码 : 按项目+年+月+序号
if (Func.isEmpty(result)) { if (Func.isNotEmpty(result)) {
entity.setDefectCode(result); entity.setDefectCode(result);
} }
// 现象发起人 : 当前用户Id // 现象发起人 : 当前用户Id

Loading…
Cancel
Save