Merge branch 'dev_temp_xw_202503310000_45843' into dev

dev
xiangwei.zhang 4 months ago
commit 11285c597c

@ -828,17 +828,21 @@ public class MesWorkOrderService implements IMesWorkOrderService {
MesShift currentShift = shiftList.stream().filter(shift -> {
String startTime = lotNo + " " + shift.getStartTime();
String endTime = lotNo + " " + shift.getEndTime();
if (Objects.equals(shift.getShiftCode(), "20")) {
endTime = getDateTime(lotNo, 2) + " " + shift.getEndTime();
// 如果是晚班12点前结束时间要加一天如果是12点后开始时间要减一天
if (Objects.equals(shift.getShiftCode(),"20")) {
if (hours < 12) {
startTime = getDateTime(lotNo, 1) + " " + shift.getStartTime();
} else {
endTime = getDateTime(lotNo, 2) + " " + shift.getEndTime();
}
}
Date startDate = DateUtil.parse(startTime);
Date endDate = DateUtil.parse(endTime);
return currentDate.getTime() > startDate.getTime() && currentDate.getTime() < endDate.getTime();
return currentDate.getTime() >= startDate.getTime() && currentDate.getTime() <= endDate.getTime();
}).findFirst().orElse(null);
String orderDate = productionRecord.getLotNo();
if (currentShift.getStartTime().compareTo(currentShift.getEndTime()) > 0) {
// 如果比0点大需要找日期前一天的班次的工单号,如果是0点前date =lotNO 如果是0点后则找lot的前一天

Loading…
Cancel
Save