| | |
| | | import com.whyc.pojo.*; |
| | | import com.whyc.util.CommonUtil; |
| | | import com.whyc.util.Zip4jUtil; |
| | | import org.aspectj.util.FileUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.FileCopyUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | String dateFormat = new SimpleDateFormat("YYYY-MM").format(new Date()); |
| | | long timeStamp = System.currentTimeMillis(); |
| | | String filePath = rootFile + "product_approving" + File.separator + user.getName() + File.separator + dateFormat+ File.separator + timeStamp; |
| | | String inFilePath = rootFile + "product" + File.separator + product.getParentModel() + File.separator + "standard"+ File.separator; |
| | | String inFilePath = rootFile + "product" + File.separator + product.getParentModel() + File.separator + "standard"+ File.separator + product.getVersion(); |
| | | File parentFile = new File(filePath); |
| | | FileCopyUtils.copy(new File(inFilePath),parentFile); |
| | | |
| | | //FileCopyUtils.copy(new File(inFilePath),parentFile); |
| | | FileUtil.copyDir(new File(inFilePath),parentFile); |
| | | productApproving.setFileUrl(filePath); |
| | | bomList.clear(); |
| | | productBomList.forEach(bom->{ |
| | |
| | | //判断是哪种类型的审批,返回不同的类型 具体数据 |
| | | Integer type = getInfoById(id).getType(); |
| | | if(type.intValue() == EnumWorksheetType.ProductBom.getType()) { |
| | | return mainMapper.getLinkList(id); |
| | | WorksheetMain main = mainMapper.getLinkList(id); |
| | | List<ProductBomApproving> pbaList = approvingService.getList(main.getProductApproving().getId()); |
| | | main.getProductApproving().setBomApprovingList(pbaList); |
| | | return main; |
| | | }else if(type.intValue() == EnumWorksheetType.Material.getType()){ |
| | | return mainMapper.getLinkListWithMaterials(id); |
| | | }else{ //物料-产品 |