|  |  | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @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,Long productId) { | 
 |  |  |         List<XhProductModel> list = xhProductModelService.getAllTree(showXdy, ztShow,productId); | 
 |  |  |  | 
 |  |  |         return Result.ok(list); | 
 |  |  |     } | 
 |  |  | 
 |  |  |     @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); | 
 |  |  | 
 |  |  |         //效验数据 | 
 |  |  |         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); |