From a3a8614942b72020f194751fbf4d9c6c2921c327 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Fri, 24 Mar 2023 16:30:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E4=B8=8D=E7=BB=9F=E4=B8=80=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inout/IoCodeTempController.java | 5 +++ .../purchase/SupCompanyController.java | 43 ++++++++++--------- src/main/resources/application.yml | 2 +- 3 files changed, 28 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java b/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java index d7585f04..e1addf5c 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java @@ -972,6 +972,8 @@ public class IoCodeTempController extends BaseController { @AuthRuleAnnotation("") @PostMapping("warehouse/inout/saveTempCode") public BaseResponse saveCode(@RequestBody IoCodeTempEntity codeTempEntity) { + if (codeTempEntity.getCount() == null) + codeTempEntity.setCount(1); if (StrUtil.isNotEmpty(codeTempEntity.getSerialNo()) && codeTempEntity.getSerialNo().length() > 20) { return ResultVOUtils.error(500, "无效条码!序列号超出最大范围"); @@ -997,6 +999,9 @@ public class IoCodeTempController extends BaseController { return ResultVOUtils.error(500, "数量不能小于0"); } codeTempEntity.setReCount(codeTempEntity.getMyCount() * udiCalCountUtil.getActCount(codeTempEntity.getNameCode())); + if(codeTempEntity.getId() == null){ + + } int b = codeTempService.updateById(codeTempEntity); if (b > 0) return ResultVOUtils.success("修改成功"); diff --git a/src/main/java/com/glxp/api/controller/purchase/SupCompanyController.java b/src/main/java/com/glxp/api/controller/purchase/SupCompanyController.java index 35e5a261..29ac9f1b 100644 --- a/src/main/java/com/glxp/api/controller/purchase/SupCompanyController.java +++ b/src/main/java/com/glxp/api/controller/purchase/SupCompanyController.java @@ -74,8 +74,6 @@ public class SupCompanyController { AuthRoleAdminService authRoleAdminService; - - @AuthRuleAnnotation("") @GetMapping("/api/pur/getSupComapnys") public BaseResponse getSupComapnys(FilterSupCompanyRequest companyRequest) { @@ -94,10 +92,11 @@ public class SupCompanyController { //判断是不是存在草稿 - if(companyEntity.getAuditStatus()==6){ - List supCertEntityList = supCertService.findAll(companyEntity.getCustomerId()); for(SupCertEntity obj:supCertEntityList){ - if(obj.getAuditStatus()==0){ - return ResultVOUtils.error(999,"证书中存在草稿不允许提交!"); + if (companyEntity.getAuditStatus() == 6) { + List supCertEntityList = supCertService.findAll(companyEntity.getCustomerId()); + for (SupCertEntity obj : supCertEntityList) { + if (obj.getAuditStatus() == 0) { + return ResultVOUtils.error(999, "证书中存在草稿不允许提交!"); } } @@ -143,7 +142,7 @@ public class SupCompanyController { customerContactEntity.setCustomerId(customerId); customerContactService.insertCustomerContact(customerContactEntity); //更新相关证书对应的customerId - supCertService.updateCustomerId(companyEntity.getCustomerId(), customerId,ConstantStatus.AUDIT_UN); + supCertService.updateCustomerId(companyEntity.getCustomerId(), customerId, ConstantStatus.AUDIT_UN); companyEntity.setCustomerId(customerId); companyEntity.setCreateTime(new Date()); @@ -162,9 +161,9 @@ public class SupCompanyController { //判断是不是存在草稿 List supCertEntityList = supCertService.findAll(companyEntity.getCustomerId()); - for(SupCertEntity obj:supCertEntityList){ - if(obj.getAuditStatus()==0){ - return ResultVOUtils.error(999,"证书中存在草稿不允许提交!"); + for (SupCertEntity obj : supCertEntityList) { + if (obj.getAuditStatus() == 0) { + return ResultVOUtils.error(999, "证书中存在草稿不允许提交!"); } } @@ -218,7 +217,7 @@ public class SupCompanyController { public BaseResponse auditCompany(@RequestBody SupCompanyEntity companyEntity) { - if(companyEntity.getAuditStatus()==1){ + if (companyEntity.getAuditStatus() == 1) { //查询用户上传的证书 FilterSupCertRequest filterSupCertRequest = new FilterSupCertRequest(); filterSupCertRequest.setCustomerId(companyEntity.getCustomerId()); @@ -252,7 +251,7 @@ public class SupCompanyController { return ResultVOUtils.error(500, "必传证书不齐全!"); } } - String msg=""; + String msg = ""; //查询是否包含审核未通过的证书 if (companyEntity.getAuditStatus() == ConstantStatus.AUDIT_PASS || companyEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE_PASS) { @@ -263,22 +262,24 @@ public class SupCompanyController { List supCertEntityList = supCertService.filterCompanyCert(filterSupCertRequest); if (CollUtil.isNotEmpty(supCertEntityList)) { for (SupCertEntity supCertEntity : supCertEntityList) { - msg+=supCertEntity.getName()+","; + msg += supCertEntity.getName() + ","; } - return ResultVOUtils.error(500, "审核失败,还有必须提交证书未确认(" + msg.substring(0,msg.length()-1) + ")"); + return ResultVOUtils.error(500, "审核失败,还有必须提交证书未确认(" + msg.substring(0, msg.length() - 1) + ")"); } } //修改用户角色 - if(companyEntity.getRoleId()!=null){ - CustomerInfoEntity customerInfoEntity=new CustomerInfoEntity(); + if (companyEntity.getRoleId() != null) { + CustomerInfoEntity customerInfoEntity = new CustomerInfoEntity(); customerInfoEntity.setCustomerId(Long.valueOf(companyEntity.getCustomerId())); customerInfoEntity.setRoleId(companyEntity.getRoleId()); + customerInfoEntity.setCompanyName(companyEntity.getCompanyName()); + customerInfoEntity.setCustomerName(companyEntity.getCompanyName()); customerInfoService.updateCustomerInfo(customerInfoEntity); //获取该供应商下面的用户 - List authAdmin=authAdminService.findByCustomerld(companyEntity.getCustomerId()); - for (AuthAdmin obj:authAdmin){ - AuthRoleAdmin authRoleAdmin=new AuthRoleAdmin(); + List authAdmin = authAdminService.findByCustomerld(companyEntity.getCustomerId()); + for (AuthAdmin obj : authAdmin) { + AuthRoleAdmin authRoleAdmin = new AuthRoleAdmin(); authRoleAdmin.setUser_id(obj.getId()); authRoleAdmin.setRole_id(Long.valueOf(companyEntity.getRoleId())); authRoleAdminService.updateAuthRoleAdmin(authRoleAdmin); @@ -344,10 +345,10 @@ public class SupCompanyController { @AuthRuleAnnotation("") @GetMapping("api/pur/supCompany/getRoId") - public BaseResponse getRoId( String companyId) { + public BaseResponse getRoId(String companyId) { CustomerInfoEntity customerInfoEntity = customerInfoService.selectById(companyId); - return ResultVOUtils.success(customerInfoEntity); + return ResultVOUtils.success(customerInfoEntity); } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 1c096635..a3fb0cb7 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,6 +1,6 @@ spring: profiles: - active: dev + active: pro jmx: enabled: false