| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.MaterialApprovingMapper; |
| | | import com.whyc.pojo.MaterialApproving; |
| | | import com.whyc.pojo.DocUser; |
| | | import com.whyc.pojo.MaterialApproving; |
| | | import com.whyc.util.ActionUtil; |
| | | import com.whyc.util.CommonUtil; |
| | | import com.whyc.util.FileUtil; |
| | |
| | | return response.set(1,false,"拒绝解析,excel文件中记录包含名称为空的记录"); |
| | | } |
| | | } |
| | | //追加物料规范校验 暂时去除校验 |
| | | /*List<MaterialCheckDTO> checkList = list.stream().map(bom->{ |
| | | MaterialCheckDTO dto = new MaterialCheckDTO(); |
| | | dto.setNum(bom.getId()); |
| | | dto.setSubCode(bom.getSubCode()); |
| | | dto.setSubName(bom.getSubName()); |
| | | dto.setSubModel(bom.getSubModel()); |
| | | return dto; |
| | | }).collect(Collectors.toList()); |
| | | List<MaterialCheckDTO> irregularList = CommonUtil.checkFormat(checkList); |
| | | if(irregularList.size()>0){ |
| | | return response.setII(1,false,irregularList,"名称或型号命名不规范"); |
| | | }*/ |
| | | String nextTitle = originalFilename.substring(0,originalFilename.lastIndexOf(".")); |
| | | return response.setIII(1,true,list,nextTitle,"解析完成"); |
| | | return response.setIII(1,true,list,nextTitle,filePath); |
| | | } |
| | | |
| | | public void insert(List<MaterialApproving> cApprovingList) { |