xyc
2024-08-02 4df461673ff8b350df032429c07bc973a3b83c7f
modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/controller/XhProductModelController.java
@@ -63,8 +63,8 @@
    }
    @GetMapping("tree")
    public Result<List<XhProductModel>> getTreeList(Boolean showXdy,Integer ztShow) {
        List<XhProductModel> list = xhProductModelService.getAllTree(showXdy,ztShow);
    public Result<List<XhProductModel>> getTreeList(Boolean showXdy, Integer ztShow) {
        List<XhProductModel> list = xhProductModelService.getAllTree(showXdy, ztShow);
        return Result.ok(list);
    }
@@ -100,10 +100,10 @@
    @PostMapping("importProductExcel")
    @ApiOperation("导入产品模型")
    @LogOperation("导入产品模型")
    public Result importProductExcel(MultipartFile file, String progressId,Long pid) {
    public Result importProductExcel(MultipartFile file, String progressId, Long pid) {
        Result<List<ImportErrDto>> result = Result.ok();
        try {
            List<Map<String, Object>> importResults = xhProductModelService.importProductExcel(file,progressId,pid);
            List<Map<String, Object>> importResults = xhProductModelService.importProductExcel(file, progressId, pid);
            StringBuilder str = new StringBuilder();
            ImportUtil.importResult(result, importResults, str);
            ImportUtil.ImportErrResult(result, importResults, str);
@@ -122,8 +122,8 @@
        //效验数据
        ValidatorUtils.validateEntity(xhProductModel, AddGroup.class, DefaultGroup.class);
        Integer no = xhProductModelService.getNo(xhProductModel.getPid(),xhProductModel.getProductType());
        if (xhProductModel.getSort() < no) {
        Integer no = xhProductModelService.getNo(xhProductModel.getPid(), xhProductModel.getProductType());
        if (xhProductModel.getSort() == null || xhProductModel.getSort() < no) {
            xhProductModel.setSort(no + 1);
        }
        xhProductModelService.insert(xhProductModel);