| | |
| | | bomApproving.setParentModel(productModel); |
| | | bomApproving.setParentVersion(productVersion); |
| | | bomApproving.setType(type); |
| | | bomApproving.setExcelName(fileTempUrl.substring(fileTempUrl.lastIndexOf(File.separator)+1)); |
| | | |
| | | for (int m = 2; m < lastCellNum; m++) { |
| | | row = sheet.getRow(l); |
| | |
| | | String subCode = sub.getSubCode(); |
| | | String subModel = sub.getSubModel(); |
| | | Integer quantity = sub.getQuantity(); |
| | | String excelName = sub.getExcelName(); |
| | | boolean exists = false; |
| | | for (ProductBomApproving reference:referenceList){ |
| | | if(subCode.equals(reference.getSubCode())){ |
| | |
| | | if(quantity.intValue() == reference.getQuantity()){ |
| | | break; |
| | | }else{ |
| | | return response.set(1,false,"结构件审批提交中列中货品编码:"+subCode+"对应的数量:"+quantity+"在参考bom表中不正确"); |
| | | return response.set(1,false,excelName+"中货品编码:"+subCode+"对应的数量:"+quantity+"在参考bom表中不正确"); |
| | | } |
| | | }else{ |
| | | return response.set(1,false,"结构件审批提交中列中货品编码:"+subCode+"对应的规格型号:"+subModel+"在参考bom表中不正确"); |
| | | return response.set(1,false,excelName+"中货品编码:"+subCode+"对应的规格型号:"+subModel+"在参考bom表中不正确"); |
| | | } |
| | | } |
| | | } |
| | | if(!exists){ |
| | | return response.set(1,false,"结构件审批提交中列中货品编码:"+subCode+"在参考bom表中不存在"); |
| | | return response.set(1,false,excelName+"中货品编码:"+subCode+"在参考bom表中不存在"); |
| | | } |
| | | ProductBomApproving reference = referenceList.get(0); |
| | | sub.setParentCode(reference.getParentCode()); |