| | |
| | | sop.setReleaseNotes(releaseNotes); |
| | | |
| | | //第10行开始,倒数第2行截止 |
| | | int currentFlag=0; //通用表示(0:非通用,1:通用) |
| | | for (int i = fileSuitableProductIndex+1; i < lastRowNum; i++) { |
| | | SOPProduct product = new SOPProduct(); |
| | | //取第3列,第5列 |
| | |
| | | }else{ |
| | | product.setModel(model); |
| | | } |
| | | if((code.equals("") && model.equals(""))){ |
| | | sop.setCurrentFlag(1);//通用 |
| | | if((!code.equals("") && !model.equals(""))){ |
| | | currentFlag+=1; |
| | | } |
| | | sopProductList.add(product); |
| | | } |
| | | |
| | | sop.setCurrentFlag(currentFlag>0?0:1);//通用 |
| | | //存储excel文件,/sop_submit/xxx_202306250506.xlsx(改,不存粗excel了) |
| | | /*String originalFilename = multipartFile.getOriginalFilename(); |
| | | String[] fileNameSplit = originalFilename.split("\\."); |
| | |
| | | return new Response().setII(1,list.size()>0,pageInfo,"查询sop信息"); |
| | | } |
| | | |
| | | |
| | | //更新sop说明(不含锁信息) |
| | | @Transactional |
| | | public Response updateSop(SOP sop) { |
| | | List<SOPProduct> sopProductList = sop.getSopProductList(); |
| | | mapper.updateById(sop); |
| | | if(sopProductList.size()>0) { |
| | | sopProductList.forEach(product -> product.setSopId(sop.getId())); |
| | | productService.updateBySid(sopProductList,sop.getId()); |
| | | } |
| | | return new Response().setII(1,"更新sop说明完成"); |
| | | } |
| | | } |