gongchunyi
14 小时以前 e9149981f5ba50db000ba59eda1e7219308d5126
src/main/java/com/ruoyi/production/service/impl/ProductionRecordServiceImpl.java
@@ -5,6 +5,7 @@
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.config.RuoYiConfig;
import com.ruoyi.other.mapper.TempFileMapper;
import com.ruoyi.other.pojo.TempFile;
import com.ruoyi.production.dto.*;
@@ -52,6 +53,9 @@
    @Value("${file.upload-dir}")
    private String uploadDir;
    @Autowired
    private RuoYiConfig ruoYiConfig;
    @Autowired
    private ProductionProductMainService productionProductMainService;
@@ -303,6 +307,8 @@
                                paramEntity.setValueMode(orderParam.getValueMode());
                                paramEntity.setUnit(orderParam.getUnit());
                                paramEntity.setStandardValue(orderParam.getStandardValue());
                                paramEntity.setMinValue(orderParam.getMinValue());
                                paramEntity.setMaxValue(orderParam.getMaxValue());
                            }
                        }
                        productionProductRouteItemParamService.save(paramEntity);
@@ -347,6 +353,11 @@
                        fileEntity.setProductionProductRouteItemId(productRouteItemEntity.getId());
                        fileEntity.setFileName(originalFilename);
                        fileEntity.setFileUrl(formalFilePath.toString());
                        Path basePath = Paths.get(RuoYiConfig.getProfile());
                        String relativePath = basePath.relativize(formalFilePath).toString();
                        relativePath = relativePath.replace("\\", "/");
                        String url = "/profile/" + relativePath;
                        fileEntity.setUrl(url);
                        fileEntity.setFileSuffix(fileExtension);
                        fileEntity.setFileSize(Files.size(formalFilePath));
                        fileEntity.setCreateTime(LocalDateTime.now());
@@ -743,6 +754,9 @@
                                paramEntity.setParamFormat(orderParam.getParamFormat());
                                paramEntity.setValueMode(orderParam.getValueMode());
                                paramEntity.setUnit(orderParam.getUnit());
                                paramEntity.setStandardValue(orderParam.getStandardValue());
                                paramEntity.setMinValue(orderParam.getMinValue());
                                paramEntity.setMaxValue(orderParam.getMaxValue());
                            }
                        }
                        productionProductRouteItemParamService.save(paramEntity);
@@ -780,6 +794,12 @@
                        fileEntity.setProductionProductRouteItemId(routeItemId);
                        fileEntity.setFileName(originalFilename);
                        fileEntity.setFileUrl(formalFilePath.toString());
                        Path basePath = Paths.get(RuoYiConfig.getProfile());
                        String relativePath = basePath.relativize(formalFilePath).toString();
                        relativePath = relativePath.replace("\\", "/");
                        String url = "/profile/" + relativePath;
                        fileEntity.setUrl(url);
                        fileEntity.setFileSuffix(fileExtension);
                        fileEntity.setFileSize(Files.size(formalFilePath));
                        fileEntity.setCreateTime(LocalDateTime.now());