From 1a2d79bcfcf2a752eecee74ea69419c507497c90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E5=AE=87?= <2433098676@qq.com> Date: Tue, 8 Aug 2023 18:45:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=A4=87=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/controller/purchase/SupProductController.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/purchase/SupProductController.java b/src/main/java/com/glxp/api/controller/purchase/SupProductController.java index 873a662..988c8b1 100644 --- a/src/main/java/com/glxp/api/controller/purchase/SupProductController.java +++ b/src/main/java/com/glxp/api/controller/purchase/SupProductController.java @@ -12,6 +12,7 @@ import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.constant.BusinessType; import com.glxp.api.constant.ConstantStatus; import com.glxp.api.entity.auth.AuthAdmin; +import com.glxp.api.entity.basic.BasicUdiProductEntity; import com.glxp.api.entity.basic.UdiRelevanceEntity; import com.glxp.api.entity.purchase.SupCertEntity; import com.glxp.api.entity.purchase.SupCertSetEntity; @@ -27,6 +28,7 @@ import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.basic.UdiRelevanceResponse; import com.glxp.api.res.purchase.SupProductResponse; import com.glxp.api.service.auth.AuthAdminService; +import com.glxp.api.service.basic.BasicUdiProductService; import com.glxp.api.service.basic.UdiRelevanceService; import com.glxp.api.service.purchase.SupCertService; import com.glxp.api.service.purchase.SupCertSetService; @@ -223,12 +225,13 @@ public class SupProductController { } } - + @Resource + BasicUdiProductService basicUdiProductService; @AuthRuleAnnotation("") @PostMapping("/sup/product/selectBind") public BaseResponse selectBind(@RequestBody SelectProductBindRequest selectProductBindRequest) { - - UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectUdiId(Long.valueOf(selectProductBindRequest.getRelIdFk())); + BasicUdiProductEntity udiRelevanceResponse = basicUdiProductService.getById(selectProductBindRequest.getRelIdFk()); +// UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectUdiId(Long.valueOf(selectProductBindRequest.getRelIdFk())); SupProductEntity supProductEntity = supProductService.findByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory(),selectProductBindRequest.getManufacturerId()); if (supProductEntity != null) { return ResultVOUtils.error(500, "该产品资质已存在,请勿重复添加!"); @@ -239,7 +242,7 @@ public class SupProductController { supProductEntity.setRecordCode(udiRelevanceResponse.getZczbhhzbapzbh()); supProductEntity.setRelIdFk(udiRelevanceResponse.getId() + ""); supProductEntity.setRecordProductName(udiRelevanceResponse.getCpmctymc()); - supProductEntity.setProductType(udiRelevanceResponse.getQxlb()); + supProductEntity.setProductType(udiRelevanceResponse.getCplx()); supProductEntity.setProductDirectoryCode(udiRelevanceResponse.getFlbm()); supProductEntity.setRecordPeopleName(udiRelevanceResponse.getYlqxzcrbarmc()); supProductEntity.setSpecification(udiRelevanceResponse.getGgxh());