|
|
|
@ -74,6 +74,11 @@ public class MesTimeRoundnessService implements IRoundnessStrategy {
|
|
|
|
|
log.info("当前零件生产组:{} 没有到达生产工单的窗口", partProdGroup.getPartProdGroupName());
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
String lastRunTime = TimeTool.getNowTime(true);
|
|
|
|
|
log.info("当前零件生产组:{},更新本次执行时间:{}",partProdGroup.getPartProdGroupName(),lastRunTime);
|
|
|
|
|
ConvertBean.saveOrUpdate(time, "JOB");
|
|
|
|
|
time.setLastRunTime(lastRunTime);
|
|
|
|
|
windowTimeRao.update(time);
|
|
|
|
|
DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
|
|
|
|
long createSeq = Long.parseLong(dateFormat.format(new Date()));
|
|
|
|
|
Map<String, List<MesCustSortInfo>> sortInfoMap = sortInfoList.stream().collect(Collectors.groupingBy(MesCustSortInfo::getCustPartNo));
|
|
|
|
@ -236,9 +241,7 @@ public class MesTimeRoundnessService implements IRoundnessStrategy {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
ConvertBean.saveOrUpdate(time, "JOB");
|
|
|
|
|
time.setLastRunTime(TimeTool.getNowTime(true));
|
|
|
|
|
windowTimeRao.update(time);
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error("创建工单报错:{}", Arrays.toString(e.getStackTrace()));
|
|
|
|
|
}
|
|
|
|
@ -274,6 +277,7 @@ public class MesTimeRoundnessService implements IRoundnessStrategy {
|
|
|
|
|
if (Objects.isNull(time.getLastRunTime())) {
|
|
|
|
|
return time;
|
|
|
|
|
}
|
|
|
|
|
//校验lastRuntime 是否已经在当前圆整时区已经生成完了工单
|
|
|
|
|
Date lastRunTime = sdf.parse(time.getLastRunTime());
|
|
|
|
|
if (dateCreateOrder.before(lastRunTime)) {
|
|
|
|
|
continue;
|
|
|
|
|