|
@@ -296,16 +296,21 @@ public class ApsReportRecordsServiceImpl extends ServiceImpl<ApsReportRecordsDao
|
|
|
//根据工序查询其工序的加工参数
|
|
|
List<ApsParameterDo> parameterDoList = this.baseMapper.selectApsParameterByProcess(apsProcessOperationDo.getProcess());
|
|
|
List<ApsReportMachiningDo> needInsertApsReportMachingList = new LinkedList<>();
|
|
|
- for (ApsParameterDo apsParameterDo : parameterDoList) {
|
|
|
- ApsReportMachiningDo apsReportMachiningDo = new ApsReportMachiningDo();
|
|
|
- apsReportMachiningDo.setId(SecurityUtil.getUUID());
|
|
|
- apsReportMachiningDo.setTenantid(tenantId);
|
|
|
- apsReportMachiningDo.setMainid(apsReportRecordsDo.getId());
|
|
|
- apsReportMachiningDo.setMatching(apsParameterDo.getParameter());
|
|
|
- needInsertApsReportMachingList.add(apsReportMachiningDo);
|
|
|
- }
|
|
|
- if (ObjectUtil.isNotEmpty(needInsertApsReportMachingList)) {
|
|
|
- apsReportMachiningService.saveBatch(needInsertApsReportMachingList);
|
|
|
+ if (ObjectUtil.isNotEmpty(parameterDoList)) {
|
|
|
+ for (ApsParameterDo apsParameterDo : parameterDoList) {
|
|
|
+ if (ObjectUtil.isEmpty(apsParameterDo)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ ApsReportMachiningDo apsReportMachiningDo = new ApsReportMachiningDo();
|
|
|
+ apsReportMachiningDo.setId(SecurityUtil.getUUID());
|
|
|
+ apsReportMachiningDo.setTenantid(tenantId);
|
|
|
+ apsReportMachiningDo.setMainid(apsReportRecordsDo.getId());
|
|
|
+ apsReportMachiningDo.setMatching(apsParameterDo.getParameter());
|
|
|
+ needInsertApsReportMachingList.add(apsReportMachiningDo);
|
|
|
+ }
|
|
|
+ if (ObjectUtil.isNotEmpty(needInsertApsReportMachingList)) {
|
|
|
+ apsReportMachiningService.saveBatch(needInsertApsReportMachingList);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//根据工序查询其工序的检查项目
|