| | |
| | | import com.ruoyi.basic.pojo.Product; |
| | | import com.ruoyi.basic.pojo.ProductModel; |
| | | import com.ruoyi.basic.service.IProductModelService; |
| | | import com.ruoyi.common.enums.FileNameType; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | |
| | | product1.setProductName(productModelDto.getProductName()); |
| | | productMapper.updateById(product1); |
| | | } |
| | | commonFileService.deleteByBusinessIds(Collections.singletonList(productModelDto.getId()), FileNameType.PRODUCT_MODEL.getValue()); |
| | | if(CollectionUtils.isNotEmpty(productModelDto.getTempFileIds())){ |
| | | commonFileService.migrateTempFilesToFormal(productModelDto.getId(), productModelDto.getTempFileIds()); |
| | | } |
| | |
| | | // 查询所有工艺路线 |
| | | List<ProductProcess> productRoutes = productProcessMapper.selectList(new QueryWrapper<ProductProcess>()); |
| | | if(CollectionUtils.isEmpty(productRoutes)){ |
| | | throw new RuntimeException("请先创建产品工艺路线"); |
| | | throw new ServiceException("请先创建产品工艺路线"); |
| | | } |
| | | for (ProductModelExcelCopyDto dto : dtoList) { |
| | | // 查询条件:型号+图纸编号(更精准,符合分组逻辑) |