|
|
|
@ -80,13 +80,13 @@ public class MesQmsSuspiciousJob extends BaseMesScheduleJob {
|
|
|
|
|
// new SimpleDateFormat("yyyy-MM-dd").format(TimeTool.getDateBefore(new Date(), 1)) + " 00:00:00",
|
|
|
|
|
// TimeTool.getToday() + " 00:00:00", "createDatetime", packBean, true);
|
|
|
|
|
// 获取当前时间前1小时的时间
|
|
|
|
|
LocalDateTime now = LocalDateTime.now();
|
|
|
|
|
LocalDateTime oneHourAgo = now.minusHours(1);
|
|
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
String formattedNow = now.format(formatter);
|
|
|
|
|
String formattedOneHourAgo = oneHourAgo.format(formatter);
|
|
|
|
|
// LocalDateTime now = LocalDateTime.now();
|
|
|
|
|
// LocalDateTime oneHourAgo = now.minusHours(1);
|
|
|
|
|
// DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
// String formattedNow = now.format(formatter);
|
|
|
|
|
// String formattedOneHourAgo = oneHourAgo.format(formatter);
|
|
|
|
|
// DdlPreparedPack.timeBuilder(formattedOneHourAgo, formattedNow, "createDatetime", packBean, true);
|
|
|
|
|
DdlPreparedPack.getNumEqualPack(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), "qmsSync", packBean);
|
|
|
|
|
DdlPreparedPack.timeBuilder(formattedOneHourAgo, formattedNow, "createDatetime", packBean, true);
|
|
|
|
|
|
|
|
|
|
List<MesPartInspection> mesPartInspectionList = partInspectionRepository.findByHqlWhere(packBean);
|
|
|
|
|
if (!CollectionUtils.isEmpty(mesPartInspectionList)) {
|
|
|
|
@ -114,7 +114,7 @@ public class MesQmsSuspiciousJob extends BaseMesScheduleJob {
|
|
|
|
|
|
|
|
|
|
for (MesPartInspection mesPartInspection : mesPartInspectionList) {
|
|
|
|
|
mesPartInspection.setQmsSync(1);
|
|
|
|
|
ConvertBean.serviceModelUpdate(mesPartInspection, MesExtConstWords.JOB);
|
|
|
|
|
// ConvertBean.serviceModelUpdate(mesPartInspection, MesExtConstWords.JOB);
|
|
|
|
|
}
|
|
|
|
|
partInspectionRepository.saveAll(mesPartInspectionList);
|
|
|
|
|
}
|
|
|
|
|