|
@@ -156,6 +156,12 @@ public class MesProductRecordService extends CrudService<MesProductRecordDao, Me
|
|
|
if (StringUtils.isEmpty(record.getSource())) {
|
|
if (StringUtils.isEmpty(record.getSource())) {
|
|
|
record.setSource("0");
|
|
record.setSource("0");
|
|
|
}
|
|
}
|
|
|
|
|
+ // 批量插入时,如果记录首次就是 OK/NG(非 UDF),设置计件时间
|
|
|
|
|
+ if (record.getPieceworkDate() == null
|
|
|
|
|
+ && !StringUtils.isEmpty(record.getContent())
|
|
|
|
|
+ && !"UDF".equals(record.getContent())) {
|
|
|
|
|
+ record.setPieceworkDate(new Date());
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
return mesProductRecordDao.insertBatch(mesProductRecordList,num);
|
|
return mesProductRecordDao.insertBatch(mesProductRecordList,num);
|
|
|
}
|
|
}
|