diff --git a/src/main/java/com/xujie/sys/modules/pms/controller/PqcController.java b/src/main/java/com/xujie/sys/modules/pms/controller/PqcController.java index 0e8ca562..3f30a204 100644 --- a/src/main/java/com/xujie/sys/modules/pms/controller/PqcController.java +++ b/src/main/java/com/xujie/sys/modules/pms/controller/PqcController.java @@ -242,7 +242,6 @@ public class PqcController { @PostMapping("/queryOperationForResourceList") public R queryOperationForResourceList(@RequestBody OperationForResource data){ IPage page = pqcService.queryOperationForResourceList(data); - System.out.println("工序所属机台列表数量"+page.getTotal()); if (page.getTotal()!=0){ return R.ok().put("code",3).put("rows",page.getRecords()).put("total",page.getTotal()); } diff --git a/src/main/java/com/xujie/sys/modules/pms/service/Impl/QcServiceImpl.java b/src/main/java/com/xujie/sys/modules/pms/service/Impl/QcServiceImpl.java index a571c0f5..a9fc9c63 100644 --- a/src/main/java/com/xujie/sys/modules/pms/service/Impl/QcServiceImpl.java +++ b/src/main/java/com/xujie/sys/modules/pms/service/Impl/QcServiceImpl.java @@ -1285,9 +1285,23 @@ public class QcServiceImpl implements QcService { String templateId = row.getCell(1).getStringCellValue(); // 截取检验类型 String type = templateId.substring(0, templateId.indexOf("-")); - String operation = row.getCell(2).getStringCellValue(); - String resourceId = row.getCell(3).getStringCellValue(); - String supplierNo = row.getCell(4).getStringCellValue(); + String operation = null; + String resourceId = null; + String supplierNo = null; + String attributeRemark = null; + if(row.getCell(2)!= null){ + operation = row.getCell(2).getStringCellValue(); + } + if(row.getCell(3)!= null){ + resourceId = row.getCell(3).getStringCellValue(); + } + if(row.getCell(4)!= null){ + supplierNo = row.getCell(4).getStringCellValue(); + } + if(row.getCell(5)!= null){ + attributeRemark = row.getCell(5).getStringCellValue(); + } + if ("IQC".equals(type)) { if (Objects.isNull(supplierNo)||supplierNo.equals("")){ throw new RuntimeException("第"+j+"条数据,检验模板类型为"+type+"时,供应商不能为空!"); @@ -1301,9 +1315,9 @@ public class QcServiceImpl implements QcService { task.setSite(paramData.getSite().split("_")[0]); task.setBuNo(paramData.getSite().split("_")[1]); task.setPartNo(row.getCell(0).getRawValue()); - task.setSupplierNo(row.getCell(4).getStringCellValue()); + task.setSupplierNo(supplierNo); task.setAttributeType("A"); - task.setAttributeRemark(row.getCell(5).getStringCellValue()); + task.setAttributeRemark(attributeRemark); task.setCreateBy(paramData.getCreateBy()); // 查重 task.setAttributeNo(task.getPartNo());