|
|
|
@ -8,6 +8,7 @@ import cn.estsh.i3plus.platform.common.tool.TimeTool;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.util.StringUtil;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesProduceSn;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesProductionRecord;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesShift;
|
|
|
|
@ -102,6 +103,13 @@ public class MesReportWorkByPreDayJob extends BaseMesScheduleJob {
|
|
|
|
|
workOrderService.doPcnJobProductReport(mesProductionRecords, mesShiftList, organizeCode, userName, mesWorkOrder);
|
|
|
|
|
}
|
|
|
|
|
for (MesProductionRecord mesProductionRecord : mesProductionRecordList) {
|
|
|
|
|
if(StringUtil.isEmpty(mesProductionRecord.getWorkOrderNo())){
|
|
|
|
|
List<MesWorkOrder> collect = mesWorkOrders.stream().filter(w -> w.getWorkCenterCode().equalsIgnoreCase(mesProductionRecord.getWorkCenterCode())
|
|
|
|
|
&& w.getPartNo().equalsIgnoreCase(mesProductionRecord.getPartNo())).collect(Collectors.toList());
|
|
|
|
|
if (!CollectionUtils.isEmpty(collect)){
|
|
|
|
|
mesProductionRecord.setWorkOrderNo(collect.get(0).getWorkOrderNo());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
mesProductionRecord.setReportStatus(MesExtEnumUtil.REPORT_STATUS.REPORT_STATUS_20.getValue());
|
|
|
|
|
mesProductionRecord.setSystemSyncStatus(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue());
|
|
|
|
|
ConvertBean.serviceModelUpdate(mesProductionRecord, userName);
|
|
|
|
|