| | |
| | | if(param.id !=null){ |
| | | paramDao.updateByPrimaryKeySelective(param); |
| | | }else{ |
| | | param.deleted=false; |
| | | paramDao.insert(param); |
| | | } |
| | | }); |
| | | saveRel(p, p.processDocuments, "01"); |
| | | saveRel(p, p.userManual, "02"); |
| | | saveRel(p, p.materials, "03"); |
| | | saveRel(p, p.proFiles); |
| | | } |
| | | |
| | | private void saveRel(PltProduct p, List<PltProductFile> docs, String fileType) { |
| | | private void saveRel(PltProduct p, List<PltProductFile> docs) { |
| | | docs.forEach(doc -> { |
| | | doc.proId = p.id; |
| | | doc.fileType = fileType; |
| | | pfDao.insert(doc); |
| | | if(doc.id == null){ |
| | | doc.proId = p.id; |
| | | pfDao.insertSelective(doc); |
| | | } |
| | | }); |
| | | } |
| | | |
| | |
| | | pro.imageWebPathZip = fileOperate.getImgFileZipPath(filePathWithWebUrl); |
| | | } |
| | | |
| | | Stream.concat( |
| | | pro.userManual.stream(), |
| | | Stream.concat(pro.processDocuments.stream(), pro.materials.stream()) |
| | | ) |
| | | .forEach(doc -> { |
| | | pro.proFiles.stream().forEach(doc -> { |
| | | OthFile file = othFileMapper.selectByPrimaryKey(doc.fileId); |
| | | FileRestVo fileRestVo = fileOperate.parseHashcode(fmUrl, file.hash); |
| | | |