lxw
2022-08-13 b72144f43b9851a9fc30678115869cca451af6e7
src/main/java/com/whyc/service/ComponentApprovingService.java
@@ -90,7 +90,7 @@
                Row row3 = sheet.getRow(3);
                String productVersion = row3.getCell(5).getStringCellValue();
                for (int l = 8; l < lastRowNum-1; l++) {
                    Cell cellTemp = sheet.getRow(l).getCell(4);
                    Cell cellTemp = sheet.getRow(l).getCell(1);
                    cellTemp.setCellType(Cell.CELL_TYPE_STRING);
                    if(cellTemp.getStringCellValue().equals("")){
                        break;
@@ -133,6 +133,11 @@
                }
            }
        }
        for (ComponentApproving componentApproving : list) {
            if(componentApproving.getSubName()==null ||componentApproving.getSubName().equals("")){
                return response.set(1,false,"拒绝解析,excel文件中记录包含名称为空的记录");
            }
        }
        String nextTitle = originalFilename.substring(0,originalFilename.lastIndexOf("."));
        return response.setIII(1,true,list,nextTitle,"解析完成");
    }
@@ -147,9 +152,9 @@
        return mapper.selectList(query);
    }
    public void endType(Integer mainId) {
    public void endStatus(Integer mainId) {
        UpdateWrapper<ComponentApproving> update = Wrappers.update();
        update.set("type",2).eq("main_id",mainId);
        update.set("status",2).eq("main_id",mainId);
        mapper.update(null,update);
    }
@@ -158,4 +163,10 @@
        query.eq("main_id",mainId);
        return mapper.selectList(query);
    }
    public ComponentApproving getListByComponentId(Integer componentId) {
        QueryWrapper<ComponentApproving> query = Wrappers.query();
        query.eq("component_id",componentId).last(" limit 1");
        return mapper.selectOne(query);
    }
}