|
|
|
@ -61,6 +61,9 @@ public class MesProductionRecordService implements IMesProductionRecordService {
|
|
|
|
|
@Autowired
|
|
|
|
|
private MesWorkCellRepository mesWorkCellRepository;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private MesProductionRecordRepository productionRecordRao;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<MesProductionRecord> findProductionRecordList(String organizeCode, String productSn) {
|
|
|
|
|
if (StringUtils.isEmpty(organizeCode) || StringUtils.isEmpty(productSn)) return null;
|
|
|
|
@ -251,15 +254,14 @@ public class MesProductionRecordService implements IMesProductionRecordService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void updateProductionRecord(List<MesProductionRecord> recordList, String userName, Integer reportStatus, String msg) {
|
|
|
|
|
|
|
|
|
|
recordList.forEach(record->{
|
|
|
|
|
record.setReportStatus(reportStatus);
|
|
|
|
|
record.setRemark(msg);
|
|
|
|
|
record.setSystemSyncStatus(CommonEnumUtil.FALSE);
|
|
|
|
|
record.setSystemSyncDatetime(MesPcnExtConstWords.EMPTY);
|
|
|
|
|
ConvertBean.serviceModelUpdate(record,userName);
|
|
|
|
|
record.setModifyDatetime((new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS")).format(new Date()));
|
|
|
|
|
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(record.getOrganizeCode());
|
|
|
|
|
DdlPreparedPack.getNumEqualPack(record.getId(), "id", ddlPackBean);
|
|
|
|
|
productionRecordRao.updateByPropertiesNoSync(new String[]{"modifyUser", "modifyDatetime", "reportStatus","remark","systemSyncStatus","systemSyncDatetime"},
|
|
|
|
|
new Object[]{userName, DateUtil.format(new Date(), MesPcnExtConstWords.DATE_FORMAT_SSS), reportStatus,msg,CommonEnumUtil.FALSE,""}, ddlPackBean);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
productionRecordRepository.saveAll(recordList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|