| | |
| | | |
| | | 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.CopyStandardProductListDto; |
| | | import com.ruoyi.basic.dto.FactoryDto; |
| | |
| | | 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; |
| | | |
| | |
| | | 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)); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据标准树进行标准查询") |
| | | @GetMapping("/selectsStandardMethodByFLSSM") |
| | | public Result selectsStandardMethodByFLSSM(String tree) { |
| | | return Result.success(standardMethodListService.selectsStandardMethodByFLSSM(tree)); |
| | | 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) { |
| | | return Result.success(standardProductListService.selectStandardProductListByMethodId(id, tree)); |
| | | } |
| | | |
| | | @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") |