From f5be9675a4f879ca0f0a873660fda5173d3a56a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=98=8E=E6=A2=81?= <2429105222@qq.com> Date: Wed, 12 Apr 2023 10:20:32 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E6=8B=89=E5=8F=96=E8=A7=92=E8=89=B2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/auth/AuthAdminController.java | 22 +++++++++++++++++++ .../auth/impl/AuthRoleServiceImpl.java | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/glxp/api/controller/auth/AuthAdminController.java b/src/main/java/com/glxp/api/controller/auth/AuthAdminController.java index 05e8769d..63924439 100644 --- a/src/main/java/com/glxp/api/controller/auth/AuthAdminController.java +++ b/src/main/java/com/glxp/api/controller/auth/AuthAdminController.java @@ -169,6 +169,28 @@ public class AuthAdminController { } + @AuthRuleAnnotation("admin/auth/admin/customerRoles") + @GetMapping("/admin/auth/admin/customerRolesList") + public BaseResponse customerRolesList(@RequestParam(value = "page", defaultValue = "1") Integer page, + @RequestParam(value = "limit", defaultValue = "100") Integer limit) { + + List authRoleList = authRoleService.listCustomerRoles(page, limit, 1); +// List authRoleList = authRoleService.listAuthRoles2(page, limit); + PageInfo pageInfo = new PageInfo<>(authRoleList); + PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); + pageSimpleResponse.setTotal(pageInfo.getTotal()); + List authAdminRoleResponses = authRoleList.stream().map(e -> { + AuthAdminRoleResponse authAdminRoleResponse = new AuthAdminRoleResponse(); + BeanUtils.copyProperties(e, authAdminRoleResponse); + return authAdminRoleResponse; + }).collect(Collectors.toList()); + pageSimpleResponse.setList(authAdminRoleResponses); + + return ResultVOUtils.success(pageSimpleResponse); + } + + + /** * 新增 * diff --git a/src/main/java/com/glxp/api/service/auth/impl/AuthRoleServiceImpl.java b/src/main/java/com/glxp/api/service/auth/impl/AuthRoleServiceImpl.java index 8b5f8411..251b0fb4 100644 --- a/src/main/java/com/glxp/api/service/auth/impl/AuthRoleServiceImpl.java +++ b/src/main/java/com/glxp/api/service/auth/impl/AuthRoleServiceImpl.java @@ -99,7 +99,7 @@ public class AuthRoleServiceImpl implements AuthRoleService { limit = limit != null && limit > 0 && limit < 100 ? limit : 100; int offset = (page - 1) * limit; PageHelper.offsetPage(offset, limit); - List list = authRoleDao.getCustomerRoles(isCustomer); + List list = authRoleDao.listCustomerRoles(isCustomer); return list; } From a59e4d5cb7a5857a96ddf5839c73d6e6faa7683c Mon Sep 17 00:00:00 2001 From: wangwei <1610949092@qq.com> Date: Wed, 12 Apr 2023 10:45:02 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B5=84=E8=B4=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../glxp/api/controller/purchase/SupCertController.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/purchase/SupCertController.java b/src/main/java/com/glxp/api/controller/purchase/SupCertController.java index 513dfc18..80730ada 100644 --- a/src/main/java/com/glxp/api/controller/purchase/SupCertController.java +++ b/src/main/java/com/glxp/api/controller/purchase/SupCertController.java @@ -267,12 +267,16 @@ public class SupCertController { SupCertEntity supCertEntity = new SupCertEntity(); BeanUtils.copyProperties(postSupCertRequest, supCertEntity); - if(postSupCertRequest.getVailDate().getTime()>postSupCertRequest.getExpireDate().getTime()){ - return ResultVOUtils.error(999,"生效期不能小于失效期!"); + + if(postSupCertRequest.getVailDate() !=null && postSupCertRequest.getExpireDate() != null){ + if(postSupCertRequest.getVailDate().getTime()>postSupCertRequest.getExpireDate().getTime()){ + return ResultVOUtils.error(999,"生效期不能小于失效期!"); + } } + if (postSupCertRequest.getRepeatUpload() == 1) { //已审核的重新提交 //1.修改对应的资质信息进入变更审核状态, From 74729eb59d7308f35c1820c9a4aa2911d7439031 Mon Sep 17 00:00:00 2001 From: wangwei <1610949092@qq.com> Date: Wed, 12 Apr 2023 11:54:24 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=BA=93=E5=AD=98?= =?UTF-8?q?=E9=A2=84=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/inv/impl/InvRemindSetServiceImpl.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/java/com/glxp/api/service/inv/impl/InvRemindSetServiceImpl.java b/src/main/java/com/glxp/api/service/inv/impl/InvRemindSetServiceImpl.java index 1e0c4564..a8673055 100644 --- a/src/main/java/com/glxp/api/service/inv/impl/InvRemindSetServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inv/impl/InvRemindSetServiceImpl.java @@ -140,6 +140,20 @@ public class InvRemindSetServiceImpl implements InvRemindSetService { public BaseResponse getInfoByInvId(Integer invId) { InvRemindSetResponse response = invRemindSetDao.selectInfoByInvId(invId); if (null != response) { + //查询是否已有库存预警设置信息,若已存在预警设置,则回显旧数据 + InvRemindSetEntity invRemindSetEntity = invRemindSetDao.selectOne(new QueryWrapper() + .eq("deptCode", response.getDeptCode()) + .eq("invCode", response.getInvCode()) + .eq("relId", response.getRelId()) + ); + + if (null != invRemindSetEntity) { + response.setLackStock(invRemindSetEntity.getLackStock()); + response.setLowStock(invRemindSetEntity.getLowStock()); + response.setOverStock(invRemindSetEntity.getOverStock()); + response.setExpireDate(invRemindSetEntity.getExpireDate()); + response.setRecentDate(invRemindSetEntity.getRecentDate()); + } if (response.getIsDateBy() == 1 && null != response.getRecentDateTime()) { //将近效期预警值由小时换算成天 response.setRecentDateTime(response.getRecentDateTime() / 24); From c21e7431af37ae5b51475063e70196cefe37ede8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=98=8E=E6=A2=81?= <2429105222@qq.com> Date: Wed, 12 Apr 2023 11:55:57 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E8=B5=84=E8=B4=A8=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E9=80=89=E5=85=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inout/IoOrderDetailBizController.java | 2 +- .../purchase/SupProductController.java | 49 ++++++++++++------- .../service/purchase/SupProductService.java | 2 +- .../purchase/impl/SupProductServiceImpl.java | 18 +++++-- 4 files changed, 46 insertions(+), 25 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java index 5211914f..88475046 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java @@ -159,7 +159,7 @@ public class IoOrderDetailBizController extends BaseController { // todo 查询产品是否已经通过认证 if (isVailCert && udiRelevanceResponse.isNeedCert()) { - SupProductEntity supProductEntity = supProductService.findByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory()); + SupProductEntity supProductEntity = supProductService.findByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory(),""); if (supProductEntity != null && (supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS || supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE_PASS)) { } else { 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 5df65313..eba33f9c 100644 --- a/src/main/java/com/glxp/api/controller/purchase/SupProductController.java +++ b/src/main/java/com/glxp/api/controller/purchase/SupProductController.java @@ -154,27 +154,38 @@ public class SupProductController { public BaseResponse selectBind(@RequestBody SelectProductBindRequest selectProductBindRequest) { UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectUdiId(Long.valueOf(selectProductBindRequest.getRelIdFk())); - SupProductEntity supProductEntity = supProductService.findByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory()); + SupProductEntity supProductEntity = supProductService.findByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory(),selectProductBindRequest.getManufacturerId()); if (supProductEntity != null) { - return ResultVOUtils.error(500, "资质证书已存在,请勿重复添加!"); + return ResultVOUtils.error(500, "该产品资质已存在,请勿重复添加!"); + }else{ + supProductEntity = supProductService.findByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory(),""); + if(supProductEntity!=null){ + supProductEntity.setCustomerId(selectProductBindRequest.getCustomerId()); + supProductEntity.setManufacturerIdFk(selectProductBindRequest.getManufacturerId()); + supProductEntity.setCreateTime(new Date()); + supProductEntity.setUpdateTime(new Date()); + }else{ + supProductEntity = new SupProductEntity(); + BeanUtils.copyProperties(udiRelevanceResponse, supProductEntity); + supProductEntity.setProductId(selectProductBindRequest.getProductId()); + supProductEntity.setRecordCode(udiRelevanceResponse.getZczbhhzbapzbh()); + supProductEntity.setRelIdFk(udiRelevanceResponse.getId() + ""); + supProductEntity.setRecordProductName(udiRelevanceResponse.getCpmctymc()); + supProductEntity.setProductType(udiRelevanceResponse.getQxlb()); + supProductEntity.setProductDirectoryCode(udiRelevanceResponse.getFlbm()); + supProductEntity.setRecordPeopleName(udiRelevanceResponse.getYlqxzcrbarmc()); + supProductEntity.setSpecification(udiRelevanceResponse.getGgxh()); + supProductEntity.setCreateTime(new Date()); + supProductEntity.setUpdateTime(new Date()); + supProductEntity.setManufacturerIdFk(selectProductBindRequest.getManufacturerId()); + supProductEntity.setCustomerId(selectProductBindRequest.getCustomerId()); + supProductEntity.setHchzsb(udiRelevanceResponse.getCplb()); + supProductEntity.setCompanyName(selectProductBindRequest.getCompanyName()); + supProductEntity.setAuditStatus(selectProductBindRequest.getAuditStatus()); + } + } - supProductEntity = new SupProductEntity(); - BeanUtils.copyProperties(udiRelevanceResponse, supProductEntity); - supProductEntity.setProductId(selectProductBindRequest.getProductId()); - supProductEntity.setRecordCode(udiRelevanceResponse.getZczbhhzbapzbh()); - supProductEntity.setRelIdFk(udiRelevanceResponse.getId() + ""); - supProductEntity.setRecordProductName(udiRelevanceResponse.getCpmctymc()); - supProductEntity.setProductType(udiRelevanceResponse.getQxlb()); - supProductEntity.setProductDirectoryCode(udiRelevanceResponse.getFlbm()); - supProductEntity.setRecordPeopleName(udiRelevanceResponse.getYlqxzcrbarmc()); - supProductEntity.setSpecification(udiRelevanceResponse.getGgxh()); - supProductEntity.setCreateTime(new Date()); - supProductEntity.setUpdateTime(new Date()); - supProductEntity.setManufacturerIdFk(selectProductBindRequest.getManufacturerId()); - supProductEntity.setCustomerId(selectProductBindRequest.getCustomerId()); - supProductEntity.setHchzsb(udiRelevanceResponse.getCplb()); - supProductEntity.setCompanyName(selectProductBindRequest.getCompanyName()); - supProductEntity.setAuditStatus(selectProductBindRequest.getAuditStatus()); + return ResultVOUtils.success(supProductEntity); // boolean b = supProductService.insertRegistration(supProductEntity); diff --git a/src/main/java/com/glxp/api/service/purchase/SupProductService.java b/src/main/java/com/glxp/api/service/purchase/SupProductService.java index f764afe6..3cdcc6bc 100644 --- a/src/main/java/com/glxp/api/service/purchase/SupProductService.java +++ b/src/main/java/com/glxp/api/service/purchase/SupProductService.java @@ -17,7 +17,7 @@ public interface SupProductService { SupProductEntity findByRelIdFk(String relIdFk); - SupProductEntity findByManufactury(String cpmctymc, String manufactory); + SupProductEntity findByManufactury(String cpmctymc, String manufactory,String manufacturerIdFk); SupProductResponse findByPassByReCert(String registerCert); diff --git a/src/main/java/com/glxp/api/service/purchase/impl/SupProductServiceImpl.java b/src/main/java/com/glxp/api/service/purchase/impl/SupProductServiceImpl.java index d776303b..b46f88ad 100644 --- a/src/main/java/com/glxp/api/service/purchase/impl/SupProductServiceImpl.java +++ b/src/main/java/com/glxp/api/service/purchase/impl/SupProductServiceImpl.java @@ -82,10 +82,20 @@ public class SupProductServiceImpl implements SupProductService { } @Override - public SupProductEntity findByManufactury(String cpmctymc, String manufactory) { - List supProductEntities = supProductDao.selectList(new QueryWrapper().eq("manufactory", manufactory) - .eq("recordProductName", cpmctymc) - .last("LIMIT 1")); + public SupProductEntity findByManufactury(String cpmctymc, String manufactory,String manufacturerIdFk) { + + QueryWrapper ew=new QueryWrapper<>(); + if(StrUtil.isNotEmpty(manufactory)){ + ew.eq("manufactory",manufactory); + } + if(StrUtil.isNotEmpty(cpmctymc)){ + ew.eq("recordProductName",cpmctymc); + } + if(StrUtil.isNotEmpty(manufacturerIdFk)){ + ew.eq("manufacturerIdFk",manufacturerIdFk); + } + ew.last("limit 1"); + List supProductEntities = supProductDao.selectList(ew); if (CollUtil.isNotEmpty(supProductEntities)) return supProductEntities.get(0); else return null; From c3bfed438ed8bd4b66aa0a7faf1af4eac9de6722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=98=8E=E6=A2=81?= <2429105222@qq.com> Date: Wed, 12 Apr 2023 14:25:49 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E8=B5=84=E8=B4=A8=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E9=80=89=E5=85=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/controller/purchase/SupProductController.java | 9 --------- .../glxp/api/req/purchase/SelectProductBindRequest.java | 1 + 2 files changed, 1 insertion(+), 9 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 eba33f9c..54485fc4 100644 --- a/src/main/java/com/glxp/api/controller/purchase/SupProductController.java +++ b/src/main/java/com/glxp/api/controller/purchase/SupProductController.java @@ -158,13 +158,6 @@ public class SupProductController { if (supProductEntity != null) { return ResultVOUtils.error(500, "该产品资质已存在,请勿重复添加!"); }else{ - supProductEntity = supProductService.findByManufactury(udiRelevanceResponse.getCpmctymc(), udiRelevanceResponse.getManufactory(),""); - if(supProductEntity!=null){ - supProductEntity.setCustomerId(selectProductBindRequest.getCustomerId()); - supProductEntity.setManufacturerIdFk(selectProductBindRequest.getManufacturerId()); - supProductEntity.setCreateTime(new Date()); - supProductEntity.setUpdateTime(new Date()); - }else{ supProductEntity = new SupProductEntity(); BeanUtils.copyProperties(udiRelevanceResponse, supProductEntity); supProductEntity.setProductId(selectProductBindRequest.getProductId()); @@ -182,8 +175,6 @@ public class SupProductController { supProductEntity.setHchzsb(udiRelevanceResponse.getCplb()); supProductEntity.setCompanyName(selectProductBindRequest.getCompanyName()); supProductEntity.setAuditStatus(selectProductBindRequest.getAuditStatus()); - } - } diff --git a/src/main/java/com/glxp/api/req/purchase/SelectProductBindRequest.java b/src/main/java/com/glxp/api/req/purchase/SelectProductBindRequest.java index 1abcae22..672b0748 100644 --- a/src/main/java/com/glxp/api/req/purchase/SelectProductBindRequest.java +++ b/src/main/java/com/glxp/api/req/purchase/SelectProductBindRequest.java @@ -11,4 +11,5 @@ public class SelectProductBindRequest { private String customerId; private Integer auditStatus; private String companyName; + private String manufacturerIdFk; } From 862e3e2ff7b3917079912d7e3094860e4c7c72f0 Mon Sep 17 00:00:00 2001 From: wangwei <1610949092@qq.com> Date: Wed, 12 Apr 2023 16:10:55 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=91=E7=A5=A8?= =?UTF-8?q?=E5=88=86=E9=A1=B5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/service/inout/impl/IoOrderDetailBizServiceImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java b/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java index f93b0633..0a478c77 100644 --- a/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inout/impl/IoOrderDetailBizServiceImpl.java @@ -138,6 +138,12 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService { @Override public List filterListInv(FilterOrderDetailBizRequest orderDetailBizRequest) { + if (null == orderDetailBizRequest) { + return Collections.emptyList(); + } + if (null != orderDetailBizRequest.getPage() && null != orderDetailBizRequest.getLimit()) { + PageHelper.offsetPage((orderDetailBizRequest.getPage() - 1) * orderDetailBizRequest.getLimit(), orderDetailBizRequest.getLimit()); + } return ioOrderDetailBizDao.filterListInv(orderDetailBizRequest); }