whycxzp
2022-08-03 5089341b7d31ea6f580f4ef3a8e97d0602d69edf
更新zip解析
2个文件已修改
19 ■■■■ 已修改文件
src/main/java/com/whyc/pojo/ProductBomApproving.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/service/ProductBomApprovingService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/pojo/ProductBomApproving.java
@@ -67,6 +67,9 @@
    @TableField(exist = false)
    private Integer dwgExist;
    @TableField(exist = false)
    private String excelName;
    public Integer getId() {
        return id;
    }
@@ -282,4 +285,12 @@
    public void setRejectVersion(Integer rejectVersion) {
        this.rejectVersion = rejectVersion;
    }
    public String getExcelName() {
        return excelName;
    }
    public void setExcelName(String excelName) {
        this.excelName = excelName;
    }
}
src/main/java/com/whyc/service/ProductBomApprovingService.java
@@ -214,6 +214,7 @@
                    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);
@@ -303,6 +304,7 @@
            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())){
@@ -311,15 +313,15 @@
                        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());