| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.ruoyi.basic.service.*; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.basic.dto.AddStandardTreeNodeDto; |
| | | import com.ruoyi.basic.dto.CopyStandardProductListDto; |
| | | import com.ruoyi.basic.dto.FactoryDto; |
| | | import com.ruoyi.basic.dto.InsSampleReceiveDto; |
| | | import com.ruoyi.basic.dto.ResetTreeDragDTO; |
| | | import com.ruoyi.basic.dto.StandardLibraryTreeNodeDto; |
| | | import com.ruoyi.basic.dto.UpdateStandardTreeNodeDto; |
| | | import com.ruoyi.basic.dto.StandardTreeTemplateBindingDto; |
| | | import com.ruoyi.basic.pojo.StandardProductList; |
| | | import com.ruoyi.basic.pojo.StandardProductListSupplierAsk; |
| | | import com.ruoyi.basic.pojo.StandardTree; |
| | | import com.ruoyi.basic.service.StandardMethodListService; |
| | | import com.ruoyi.basic.service.StandardProductListService; |
| | | import com.ruoyi.basic.service.StandardProductListSupplierAskService; |
| | | import com.ruoyi.basic.service.StandardTreeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | |
| | | private StandardTreeService standardTreeService; |
| | | |
| | | private StandardMethodListService standardMethodListService; |
| | | private StandardMethodService standardMethodService; |
| | | |
| | | private StandardProductListService standardProductListService; |
| | | |
| | |
| | | |
| | | @ApiOperation(value = "添加标准树") |
| | | @PostMapping("/addStandardTree") |
| | | public Result addStandardTree(@RequestBody StandardTree standardTree) { |
| | | return Result.success(standardTreeService.addStandardTree(standardTree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "给标准树添加检验标准") |
| | | @PostMapping("/addStandardMethodList") |
| | | public Result addStandardMethodList(@RequestBody Map<String, Object> map) { |
| | | Integer standardId = (Integer) map.get("standardId"); |
| | | String tree = (String) map.get("tree"); |
| | | return Result.success(standardMethodListService.addStandardMethodList(standardId, tree)); |
| | | public Result addStandardTree(@RequestBody AddStandardTreeNodeDto dto) { |
| | | return Result.success(standardTreeService.addStandardTree(dto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据标准树进行标准查询") |
| | | @GetMapping("/selectsStandardMethodByFLSSM") |
| | | public Result selectsStandardMethodByFLSSM(String tree) { |
| | | return Result.success(standardMethodListService.selectsStandardMethodByFLSSM(tree)); |
| | | if (tree == null || tree.trim().isEmpty()) { |
| | | return Result.fail("标准树参数不能为空"); |
| | | } |
| | | return Result.success(standardMethodService.selectsStandardMethodByFLSSM(tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改标准库中的内容") |
| | |
| | | return Result.success(standardProductListService.updateSection(list)); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除标准树下的检验标准") |
| | | @DeleteMapping("/delStandardMethodByFLSSM") |
| | | public Result delStandardMethodByFLSSM(Integer id) { |
| | | return Result.success(standardMethodListService.delStandardMethodByFLSSM(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除标准树下的检验项目") |
| | | @DeleteMapping("/delStandardProductByIds") |
| | | public Result delStandardProductByIds(String ids) { |
| | | JSONArray lists = JSON.parseArray(ids); |
| | | return Result.success(standardProductListService.delStandardProduct(lists)); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增标准树下的检验项目") |
| | | @PostMapping("/addStandardProduct") |
| | | public Result addStandardProduct(@RequestBody Map<String, String> map) { |
| | | String ids = map.get("ids"); |
| | | String tree = map.get("tree"); |
| | | return Result.success(standardTreeService.addStandardProduct(ids, tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除标准树的层级") |
| | | @DeleteMapping("/delStandardTree") |
| | | public Result delStandardTree(String tree) { |
| | |
| | | |
| | | @ApiOperation(value = "通过检验标准查询检验项目") |
| | | @GetMapping("/selectStandardProductListByMethodId") |
| | | public Result selectStandardProductListByMethodId(Integer id, String tree, Integer page) { |
| | | return Result.success(standardProductListService.selectStandardProductListByMethodId(id, tree, page)); |
| | | public Result selectStandardProductListByMethodId(Integer id, String tree, Integer page, String keyword) { |
| | | return Result.success(standardProductListService.selectStandardProductListByMethodId(id, tree, page, keyword)); |
| | | } |
| | | |
| | | @ApiOperation(value = "批量查询检验项目") |
| | |
| | | @ApiOperation(value = "获取标准树下标准方法枚举") |
| | | @GetMapping("/selectStandardMethodEnum") |
| | | public Result selectStandardMethodEnum() { |
| | | return Result.success(standardMethodListService.selectStandardMethodEnum()); |
| | | return Result.success(standardMethodService.selectStandardMethodEnum()); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取产品架构") |
| | |
| | | return Result.success(standardTreeService.upStandardProducts(product)); |
| | | } |
| | | |
| | | @ApiOperation("仅获取光纤的型号") |
| | | @GetMapping("/getStandTreeBySampleType") |
| | | public Result<?> getStandTreeBySampleType(String laboratory, String sampleType) { |
| | | return Result.success(standardTreeService.getStandTreeBySampleType(laboratory, sampleType)); |
| | | } |
| | | |
| | | @ApiOperation("导入标准库") |
| | | @PostMapping("/inExcelOfTree/{isEquipment}") |
| | | public Result inExcelOfTree(@RequestParam("file") MultipartFile file, @PathVariable("isEquipment") Boolean isEquipment) { |
| | | if (!isEquipment) { |
| | | standardTreeService.inExcelOfTree(file); |
| | | } else { |
| | | standardTreeService.importWorkstationExcel(file); |
| | | } |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("重置标准库单价") |
| | | @PostMapping("/resetTreeOfPrice") |
| | | public Result resetTreeOfPrice(@RequestBody Map<String, Object> map) { |
| | | String tree = (String) map.get("tree"); |
| | | Integer standardId = (Integer) map.get("standardId"); |
| | | standardTreeService.resetTreeOfPrice(tree, standardId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("重置标准库工时系数") |
| | | @PostMapping("/resetTreeOfHour") |
| | | public Result resetTreeOfHour(@RequestBody Map<String, Object> map) { |
| | | String tree = (String) map.get("tree"); |
| | | Integer standardId = (Integer) map.get("standardId"); |
| | | standardTreeService.resetTreeOfHour(tree, standardId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("重置标准库要求描述和要求值") |
| | | @PostMapping("/resetTreeOfAsk") |
| | | public Result resetTreeOfAsk(@RequestBody Map<String, Object> map) { |
| | | String tree = (String) map.get("tree"); |
| | | Integer standardId = (Integer) map.get("standardId"); |
| | | standardTreeService.resetTreeOfAsk(tree, standardId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("标准库拖拽") |
| | | @PostMapping("/resetTreeDrag") |
| | |
| | | |
| | | @ApiOperation(value = "标准树排序") |
| | | @PostMapping("/updateTreeSort") |
| | | public Result updateTreeSort(@RequestBody List<FactoryDto> list) { |
| | | public Result updateTreeSort(@RequestBody List<StandardLibraryTreeNodeDto> list) { |
| | | return Result.success(standardTreeService.updateTreeSort(list)); |
| | | } |
| | | |
| | |
| | | |
| | | @ApiOperation(value = "修改标准树") |
| | | @PostMapping("/updateStandardTree") |
| | | public Result updateStandardTree(@RequestBody StandardTree standardTree) { |
| | | return Result.success(standardTreeService.updateStandardTree(standardTree)); |
| | | public Result updateStandardTree(@RequestBody UpdateStandardTreeNodeDto dto) { |
| | | return Result.success(standardTreeService.updateStandardTree(dto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询标准绑定的原始记录模板") |
| | | @GetMapping("/selectTemplateBindings") |
| | | public Result selectTemplateBindings(Integer standardTreeId) { |
| | | return Result.success(standardTreeService.selectTemplateBindings(standardTreeId)); |
| | | } |
| | | |
| | | @ApiOperation(value = "保存标准绑定的原始记录模板") |
| | | @PostMapping("/saveTemplateBindings") |
| | | public Result saveTemplateBindings(@RequestBody StandardTreeTemplateBindingDto dto) { |
| | | return Result.success(standardTreeService.saveTemplateBindings(dto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "检验项要求值复制对比") |