| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.*; |
| | | import com.ruoyi.basic.enums.StandardProductListChcekTypeEnums; |
| | | import com.ruoyi.basic.pojo.*; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | 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.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; |
| | |
| | | |
| | | @ApiOperation(value = "添加标准树") |
| | | @PostMapping("/addStandardTree") |
| | | public Result addStandardTree(@RequestBody StandardTree standardTree) { |
| | | return Result.success(standardTreeService.addStandardTree(standardTree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "给标准树添加检验标准") |
| | | @PostMapping("/addStandardMethodList") |
| | | public Result addStandardMethodList(String tree, Integer standardId) { |
| | | return Result.success(standardMethodListService.addStandardMethodList(standardId, tree)); |
| | | public Result addStandardTree(@RequestBody ModelAddDto modelAddDto) { |
| | | return Result.success(standardTreeService.addStandardTree(modelAddDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据标准树进行标准查询") |
| | | @PostMapping("/selectsStandardMethodByFLSSM") |
| | | @GetMapping("/selectsStandardMethodByFLSSM") |
| | | public Result selectsStandardMethodByFLSSM(String tree) { |
| | | return Result.success(standardMethodListService.selectsStandardMethodByFLSSM(tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改标准库中的内容") |
| | | @PostMapping("/upStandardProductList") |
| | | public Result upStandardProductList(String str) { |
| | | public Result upStandardProductList(@RequestBody Map<String, String> map) { |
| | | String str = map.get("str"); |
| | | StandardProductList list = JSON.parseObject(str, StandardProductList.class); |
| | | return Result.success(standardProductListService.upStandardProductList(list)); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改标准库区间") |
| | | @PostMapping("/updateSection") |
| | | public Result updateSection(String str) { |
| | | public Result updateSection(@RequestBody Map<String, String> map) { |
| | | String str = map.get("str"); |
| | | StandardProductList list = JSON.parseObject(str, StandardProductList.class); |
| | | return Result.success(standardProductListService.updateSection(list)); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除标准树下的检验标准") |
| | | @PostMapping("/delStandardMethodByFLSSM") |
| | | public Result delStandardMethodByFLSSM(Integer id) { |
| | | return Result.success(standardMethodListService.delStandardMethodByFLSSM(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除标准树下的检验项目") |
| | | @PostMapping("/delStandardProductByIds") |
| | | public Result delStandardProductByIds(String ids) { |
| | | JSONArray lists = JSON.parseArray(ids); |
| | | return Result.success(standardProductListService.delStandardProduct(lists)); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增标准树下的检验项目") |
| | | @PostMapping("/addStandardProduct") |
| | | public Result addStandardProduct(String ids, String tree) { |
| | | return Result.success(standardTreeService.addStandardProduct(ids, tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除标准树的层级") |
| | | @PostMapping("/delStandardTree") |
| | | @DeleteMapping("/delStandardTree") |
| | | public Result delStandardTree(String tree) { |
| | | return Result.success(standardTreeService.delStandardTree(tree)); |
| | | } |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "通过检验标准查询检验项目") |
| | | @PostMapping("/selectStandardProductListByMethodId") |
| | | public Result selectStandardProductListByMethodId(Integer id, String tree, Integer page) { |
| | | return Result.success(standardProductListService.selectStandardProductListByMethodId(id, tree, page)); |
| | | @GetMapping("/selectStandardProductListByMethodId") |
| | | public Result selectStandardProductListByMethodId(Integer id, String tree) { |
| | | return Result.success(standardProductListService.selectStandardProductListByMethodId(id, tree)); |
| | | } |
| | | |
| | | @ApiOperation(value = "批量编辑查询检验项目") |
| | | @PostMapping("/selectStandardProductByMethodId") |
| | | @ApiOperation(value = "批量查询检验项目") |
| | | @GetMapping("/selectStandardProductByMethodId") |
| | | public Result selectStandardProductByMethodId(Integer id, String tree, Integer page, String laboratory, String item, String items) { |
| | | return Result.success(standardProductListService.selectStandardProductByMethodId(id, tree, page, laboratory, item, items)); |
| | | } |
| | | |
| | | @ApiOperation(value = "批量编辑查询所有检验项目和检验子项枚举") |
| | | @PostMapping("/selectStandardProductEnumByMethodId") |
| | | @ApiOperation(value = "批量查询所有检验项目和检验子项枚举") |
| | | @GetMapping("/selectStandardProductEnumByMethodId") |
| | | public Result selectStandardProductEnumByMethodId(Integer id, String tree, String item) { |
| | | return Result.success(standardProductListService.selectStandardProductEnumByMethodId(id, tree, item)); |
| | | } |
| | |
| | | return Result.success(standardMethodListService.selectStandardMethodEnum()); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取产品架构") |
| | | @ApiOperation(value = "获取检验对象架构树") |
| | | @GetMapping("/getStandardTree2") |
| | | public Result getStandardTree2() { |
| | | return Result.success(standardTreeService.getStandardTree2()); |
| | |
| | | return Result.success(standardTreeService.upStandardProducts(product)); |
| | | } |
| | | |
| | | @PostMapping("/getStandTreeBySampleType") |
| | | @ApiOperation("仅获取光纤的型号") |
| | | @GetMapping("/getStandTreeBySampleType") |
| | | public Result<?> getStandTreeBySampleType(String laboratory, String sampleType) { |
| | | return Result.success(standardTreeService.getStandTreeBySampleType(laboratory, sampleType)); |
| | | } |
| | |
| | | |
| | | @ApiOperation("重置标准库单价") |
| | | @PostMapping("/resetTreeOfPrice") |
| | | public Result resetTreeOfPrice(String tree, Integer standardId) { |
| | | 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(String tree, Integer standardId) { |
| | | 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(String tree, Integer standardId) { |
| | | 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(value = "根据产品id查询厂家要求值绑定") |
| | | @PostMapping("/selectSupplierAsk") |
| | | public Result selectSupplierAsk(StandardProductListSupplierAsk supplierAsk) throws Exception { |
| | | public Result selectSupplierAsk(@RequestBody StandardProductListSupplierAsk supplierAsk) throws Exception { |
| | | return Result.success(standardProductListSupplierAskService.selectByProductId(supplierAsk)); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增厂家要求值绑定") |
| | | @PostMapping("/addProductSupplierAsk") |
| | | public Result addProductSupplierAsk(String str) { |
| | | public Result addProductSupplierAsk(@RequestBody Map<String, String> map) { |
| | | String str = map.get("str"); |
| | | StandardProductListSupplierAsk supplierAsk = JSON.parseObject(str, StandardProductListSupplierAsk.class); |
| | | return Result.success(standardProductListSupplierAskService.addProductSupplierAsk(supplierAsk)); |
| | | } |
| | | |
| | | @ApiOperation(value = "更新厂家要求值绑定") |
| | | @PostMapping("/updateProductSupplierAsk") |
| | | public Result updateProductSupplierAsk(String str) { |
| | | public Result updateProductSupplierAsk(@RequestBody Map<String, String> map) { |
| | | String str = map.get("str"); |
| | | StandardProductListSupplierAsk supplierAsk = JSON.parseObject(str, StandardProductListSupplierAsk.class); |
| | | standardProductListSupplierAskService.updateProductSupplierAsk(supplierAsk); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除厂家要求值绑定") |
| | | @PostMapping("/deleteProductSupplierAsk") |
| | | @DeleteMapping("/deleteProductSupplierAsk") |
| | | public Result deleteProductSupplierAsk(Integer supplierAskId) { |
| | | standardProductListSupplierAskService.removeById(supplierAskId); |
| | | standardProductListSupplierAskService.deleteProductSupplierAsk(supplierAskId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改标准树") |
| | | @ApiOperation(value = "修改型号") |
| | | @PostMapping("/updateStandardTree") |
| | | public Result updateStandardTree(@RequestBody StandardTree standardTree) { |
| | | return Result.success(standardTreeService.updateStandardTree(standardTree)); |
| | | public Result updateStandardTree(@RequestBody ModelAddDto modelAddDto) { |
| | | return Result.success(standardTreeService.updateStandardTree(modelAddDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "检验项要求值复制对比") |
| | |
| | | @PostMapping("/updateStandardProductListBatch") |
| | | public Result updateStandardProductListBatch(@RequestBody Map<String, Object> param) { |
| | | List<StandardProductList> standardProductList = (List<StandardProductList>) param.get("standardProductList"); |
| | | if(CollectionUtils.isEmpty(standardProductList)){ |
| | | for (StandardProductList productList : standardProductList) { |
| | | productList.setCheckStatus(StandardProductListChcekTypeEnums.WAIT_CHECK.getCode()); |
| | | } |
| | | } |
| | | return Result.success(standardProductListService.updateBatchById(standardProductList)); |
| | | } |
| | | |
| | |
| | | public Result copyStandardProductSort(@RequestBody CopyStandardProductListDto copyStandardProductListDto) { |
| | | return Result.success(standardProductListService.copyStandardProductSort(copyStandardProductListDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "标准树下检验项提交") |
| | | @PostMapping("/productListSubmit") |
| | | public Result productListSubmit(@RequestBody StandardProductListUpdateRecord standardProductListUpdateRecord) { |
| | | standardProductListService.productListSubmit(standardProductListUpdateRecord); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "标准树下检验项审核") |
| | | @PostMapping("/productListCheck") |
| | | public Result productListCheck(@RequestBody StandardProductListUpdateRecord standardProductListUpdateRecord) { |
| | | standardProductListService.productListCheck(standardProductListUpdateRecord); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("查询标准库是否存在审核中状态") |
| | | @GetMapping("/existCheckingRecord") |
| | | public Result existCheckingRecord(){ |
| | | return Result.success(standardProductListService.existCheckingRecord()); |
| | | } |
| | | } |