| | |
| | | cellValue = cell.getStringCellValue(); |
| | | |
| | | switch (m){ |
| | | case 2:{material.setCategory(cellValue);}break; |
| | | //case 2:{material.setCategory(cellValue);}break; |
| | | case 3:{material.setSubCode(cellValue);}break; |
| | | case 4:{material.setSubName(cellValue);}break; |
| | | case 5:{material.setSubModel(cellValue);}break; |
| | |
| | | return response.set(1,false,"拒绝解析,excel文件中记录包含名称为空的记录"); |
| | | } |
| | | } |
| | | //追加物料规范校验 暂时去除校验 |
| | | /*List<MaterialCheckDTO> checkList = list.stream().map(material -> { |
| | | MaterialCheckDTO dto = new MaterialCheckDTO(); |
| | | dto.setNum(material.getId()); |
| | | dto.setSubCode(material.getSubCode()); |
| | | dto.setSubName(material.getSubName()); |
| | | dto.setSubModel(material.getSubModel()); |
| | | return dto; |
| | | }).collect(Collectors.toList()); |
| | | List<MaterialCheckDTO> irregularList = CommonUtil.checkFormat(checkList); |
| | | if(irregularList.size()>0){ |
| | | return new Response().setII(1,false,irregularList,"名称或型号命名不规范"); |
| | | }*/ |
| | | return response.setII(1,true,list,filePath); |
| | | } |
| | | //根据物料id查询返回附件文件夹下所有的文件列表 |