|
@@ -316,16 +316,21 @@ public class ApsReportRecordsServiceImpl extends ServiceImpl<ApsReportRecordsDao
|
|
|
//根据工序查询其工序的检查项目
|
|
|
List<ApsCheckParameterDo> checkParameterDoList = this.baseMapper.selectApsCheckParameterByProcess(apsProcessOperationDo.getProcess());
|
|
|
List<ApsReportCheckoutDo> needInsertApsReportCheckList = new LinkedList<>();
|
|
|
- for (ApsCheckParameterDo apsCheckParameterDo : checkParameterDoList) {
|
|
|
- ApsReportCheckoutDo apsReportCheckoutDo = new ApsReportCheckoutDo();
|
|
|
- apsReportCheckoutDo.setId(SecurityUtil.getUUID());
|
|
|
- apsReportCheckoutDo.setTenantid(tenantId);
|
|
|
- apsReportCheckoutDo.setMainid(apsReportRecordsDo.getId());
|
|
|
- apsReportCheckoutDo.setCheckitem(apsCheckParameterDo.getCheckparameter());
|
|
|
- needInsertApsReportCheckList.add(apsReportCheckoutDo);
|
|
|
- }
|
|
|
- if (ObjectUtil.isNotEmpty(needInsertApsReportCheckList)) {
|
|
|
- apsReportCheckoutService.saveBatch(needInsertApsReportCheckList);
|
|
|
+ if (ObjectUtil.isNotEmpty(checkParameterDoList)) {
|
|
|
+ for (ApsCheckParameterDo apsCheckParameterDo : checkParameterDoList) {
|
|
|
+ if (ObjectUtil.isEmpty(apsCheckParameterDo)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ ApsReportCheckoutDo apsReportCheckoutDo = new ApsReportCheckoutDo();
|
|
|
+ apsReportCheckoutDo.setId(SecurityUtil.getUUID());
|
|
|
+ apsReportCheckoutDo.setTenantid(tenantId);
|
|
|
+ apsReportCheckoutDo.setMainid(apsReportRecordsDo.getId());
|
|
|
+ apsReportCheckoutDo.setCheckitem(apsCheckParameterDo.getCheckparameter());
|
|
|
+ needInsertApsReportCheckList.add(apsReportCheckoutDo);
|
|
|
+ }
|
|
|
+ if (ObjectUtil.isNotEmpty(needInsertApsReportCheckList)) {
|
|
|
+ apsReportCheckoutService.saveBatch(needInsertApsReportCheckList);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|