From e80137a0b53903e3cac98c70e8d4171a380df88d Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Fri, 14 Jun 2024 11:59:47 +0800 Subject: [PATCH] '123' --- ABAP_AS_WITH_POOL.jcoDestination | 11 ++ .../web/controller/quot/QuotController.java | 49 ++++++- .../controller/redBook/RedBookController.java | 6 +- .../mapper/redBook/OARedBookMapper.xml | 2 +- ruoyi-ui/src/views/quot/quot/index.vue | 122 +++++++++--------- ruoyi-ui/src/views/redBook/productSelect.vue | 8 +- 6 files changed, 128 insertions(+), 70 deletions(-) create mode 100644 ABAP_AS_WITH_POOL.jcoDestination diff --git a/ABAP_AS_WITH_POOL.jcoDestination b/ABAP_AS_WITH_POOL.jcoDestination new file mode 100644 index 0000000..620db56 --- /dev/null +++ b/ABAP_AS_WITH_POOL.jcoDestination @@ -0,0 +1,11 @@ +#for tests only ! +#Fri Jun 14 11:47:35 CST 2024 +jco.destination.pool_capacity=10 +jco.client.lang=ZH +jco.client.ashost=172.19.0.120 +jco.client.saprouter= +jco.client.user=RFC +jco.client.sysnr=00 +jco.destination.peak_limit=10 +jco.client.passwd=fIM!UgIY[[%*5IWWy6w`}PO$6)+{K)R`9,$_P^3ve}26(Qf| +jco.client.client=300 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java index e705ad9..b6f09f1 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java @@ -191,11 +191,28 @@ public class QuotController extends BaseController @PostMapping public AjaxResult add(@RequestBody Quot quot) { + // 获取用户角色 --判断是否是核价组角色 + Boolean hjRoleFlag = false; + List roles = SecurityUtils.getLoginUser().getUser().getRoles(); + for(SysRole sysRole:roles){ + String roleKey = sysRole.getRoleKey(); + if("PRICE_VERIFICATION".equals(roleKey) || "QUOT".equals(roleKey)){ + hjRoleFlag = true; + break; + } + } + + quot.setQuotId(UUID.fastUUID().toString()); //quot.setQuotCode(IdUtils.createNo("BJD_",0)); String quotCode = quotService.getCode("BJD"); quot.setQuotCode(quotCode); - quot.setCreateBy(getUsername()); + if(hjRoleFlag){ + quot.setCreateBy(quot.getQuotSalesmanCode()); + }else{ + quot.setCreateBy(getUsername()); + } + //quot.setQuotSalesmanCode(getUsername()); quot.setUpdateBy(getUsername()); quotService.insertQuot(quot); @@ -210,7 +227,21 @@ public class QuotController extends BaseController @PutMapping public AjaxResult edit(@RequestBody Quot quot) { - quot.setUpdateBy(getUsername()); + // 获取用户角色 --判断是否是核价组角色 + Boolean hjRoleFlag = false; + List roles = SecurityUtils.getLoginUser().getUser().getRoles(); + for(SysRole sysRole:roles){ + String roleKey = sysRole.getRoleKey(); + if("PRICE_VERIFICATION".equals(roleKey) || "QUOT".equals(roleKey)){ + hjRoleFlag = true; + break; + } + } + if(hjRoleFlag){ + quot.setUpdateBy(quot.getQuotSalesmanCode()); + }else{ + quot.setUpdateBy(getUsername()); + } return toAjax(quotService.updateQuot(quot)); } @@ -318,7 +349,7 @@ public class QuotController extends BaseController List roles = SecurityUtils.getLoginUser().getUser().getRoles(); for(SysRole sysRole:roles){ String roleKey = sysRole.getRoleKey(); - if("PRICE_VERIFICATION".equals(roleKey)){ + if("PRICE_VERIFICATION".equals(roleKey) || "QUOT".equals(roleKey)){ hjRoleFlag = true; break; } @@ -354,12 +385,22 @@ public class QuotController extends BaseController //quot.setQuotCode(IdUtils.createNo("BJD_",0)); String quotCode = quotService.getCode("BJD"); quot.setQuotCode(quotCode); - quot.setCreateBy(getUsername()); + + if(hjRoleFlag){ + quot.setCreateBy(quot.getQuotSalesmanCode()); + }else{ + quot.setCreateBy(getUsername()); + } //quot.setQuotSalesmanCode(getUsername()); quotService.insertQuot(quot); sendNoticeToBjz(quot); return success(); }else{ + if(hjRoleFlag){ + quot.setUpdateBy(quot.getQuotSalesmanCode()); + }else{ + quot.setUpdateBy(getUsername()); + } quotService.updateQuot(quot); sendNoticeToBjz(quot); return success(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/redBook/RedBookController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/redBook/RedBookController.java index 05a021e..aca60b3 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/redBook/RedBookController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/redBook/RedBookController.java @@ -323,7 +323,11 @@ public class RedBookController extends BaseController } String voltage = temp.getVoltage(); - temp.setVoltage(StringUtils.isBlank(voltage)?"0.6/1kV":voltage.replace(" ","")); + if(StringUtils.isNotBlank(voltage)){ + voltage = voltage.replace(" ",""); + voltage = voltage.toUpperCase(); + } + temp.setVoltage(StringUtils.isBlank(voltage)?"0.6/1KV":voltage); index++; } diff --git a/ruoyi-system/src/main/resources/mapper/redBook/OARedBookMapper.xml b/ruoyi-system/src/main/resources/mapper/redBook/OARedBookMapper.xml index 3dd0b73..9efe560 100644 --- a/ruoyi-system/src/main/resources/mapper/redBook/OARedBookMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/redBook/OARedBookMapper.xml @@ -178,7 +178,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" convert(decimal,convert(float,A.红本价格)) price,convert(varchar(10),B.date_0,23) pricedate from [rb_product_price] A left join rb_productVersion B on A.version_uid_0=B.uid_0 - where A.型号 = #{name_1} and A.规格 = #{spec} and A.电压等级 = #{voltage} + where A.型号 = #{name_1} and A.规格 = #{spec} and UPPER(A.电压等级) = #{voltage} and B.uid_0 = #{uid_0} and (B.sta_0=1 or sta_0=0) diff --git a/ruoyi-ui/src/views/quot/quot/index.vue b/ruoyi-ui/src/views/quot/quot/index.vue index 37c86f9..1f98d66 100644 --- a/ruoyi-ui/src/views/quot/quot/index.vue +++ b/ruoyi-ui/src/views/quot/quot/index.vue @@ -381,24 +381,25 @@ - 反馈附件 -
+ + 清单附件(先保存再上传且必须是EXCEL文件) +
- 上传文件 + v-if="this.form.quotApprovalStatus == '0'"> + 上传文件
- - + +