From 6bea8b23f6b9f600d5bffcb3d56655ede8a8ff19 Mon Sep 17 00:00:00 2001 From: xd Date: Sun, 7 Jul 2024 22:50:12 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=91=E6=80=9D=E7=BB=B4=E8=81=94=E8=B0=83?= =?UTF-8?q?=EF=BC=8C=E7=94=9F=E6=88=90=E6=8A=A5=E4=BB=B7=E5=8D=95=E5=B8=A6?= =?UTF-8?q?=E5=87=BA=E5=AE=A1=E6=A0=B8=E4=BA=BA=E3=80=81=E7=BC=96=E5=88=B6?= =?UTF-8?q?=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ABAP_AS_WITH_POOL.jcoDestination | 11 ----------- .../web/controller/redBook/RedBookController.java | 7 +++++++ .../web/controller/tool/quot/quotJswController.java | 11 ++++++++++- ruoyi-ui/src/views/quot/quot/index.vue | 8 ++++---- 4 files changed, 21 insertions(+), 16 deletions(-) delete mode 100644 ABAP_AS_WITH_POOL.jcoDestination diff --git a/ABAP_AS_WITH_POOL.jcoDestination b/ABAP_AS_WITH_POOL.jcoDestination deleted file mode 100644 index db406c2..0000000 --- a/ABAP_AS_WITH_POOL.jcoDestination +++ /dev/null @@ -1,11 +0,0 @@ -#for tests only ! -#Sat Jul 06 09:12:12 CST 2024 -jco.destination.pool_capacity=10 -jco.client.lang=ZH -jco.client.ashost=172.19.0.125 -jco.client.saprouter= -jco.client.user=RFC -jco.client.sysnr=00 -jco.destination.peak_limit=10 -jco.client.passwd=wk11I1%y#bv4hL8`V_592O08%4oY%9d9LEvEX$N`b270Z~O5 -jco.client.client=800 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 dff94ff..8521d01 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 @@ -40,6 +40,7 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import java.io.*; import java.math.BigDecimal; +import java.math.RoundingMode; import java.util.*; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; @@ -285,6 +286,8 @@ public class RedBookController extends BaseController List list = quot.getSelectedResultData(); /** ===================================插入询价单明细表==================================*/ + int quotMaterialsCount = 0;//明细条数 + BigDecimal quotTotalPrice = BigDecimal.ZERO;//报价金额小计 for(OAQuotProduct op:list){ xjquotMaterials = new QuotMaterial(); xjquotMaterials.setMatXingh(op.getName_1());//型号 @@ -300,7 +303,11 @@ public class RedBookController extends BaseController xjquotMaterials.setIndex(op.getIndex()); materials.add(xjquotMaterials); + quotMaterialsCount++; + quotTotalPrice = quotTotalPrice.add(xjquotMaterials.getMatQuotAllPrice()); } + xjquot.setQuotMaterialsCount(quotMaterialsCount); + xjquot.setQuotTotalPrice(String.valueOf(quotTotalPrice.setScale(2, RoundingMode.HALF_UP))); xjquot.setQuotMaterialList(materials); iQuotService.insertQuot(xjquot); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/quot/quotJswController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/quot/quotJswController.java index 7b3643c..37f803b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/quot/quotJswController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/quot/quotJswController.java @@ -18,6 +18,8 @@ import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import java.math.BigDecimal; +import java.math.RoundingMode; import java.util.ArrayList; import java.util.List; @@ -164,6 +166,9 @@ public class quotJswController extends BaseController { q.setQuotJswCheckUserNickname(quot.getQuotJswCheckUserNickname());//金思维审核人 q.setQuotJswApprovalStatus("2"); + + int quotMaterialsCount = 0;//明细条数 + BigDecimal quotTotalPrice = BigDecimal.ZERO;//报价金额小计 List qmaterials = new ArrayList(); QuotMaterial quotMaterial = new QuotMaterial(); for(quotMaterialModel model:materials){ @@ -184,8 +189,12 @@ public class quotJswController extends BaseController { quotMaterial.setXh(model.getXh()); quotMaterial.setIndex(model.getIndex()); qmaterials.add(quotMaterial); - } + quotMaterialsCount++; + quotTotalPrice = quotTotalPrice.add(quotMaterial.getMatQuotAllPrice()); + } + q.setQuotMaterialsCount(quotMaterialsCount); + q.setQuotTotalPrice(String.valueOf(quotTotalPrice.setScale(2, RoundingMode.HALF_UP))); q.setQuotMaterialList(qmaterials); quotService.updateQuot(q); }catch(Exception e){ diff --git a/ruoyi-ui/src/views/quot/quot/index.vue b/ruoyi-ui/src/views/quot/quot/index.vue index f01ed5b..6b1f3e1 100644 --- a/ruoyi-ui/src/views/quot/quot/index.vue +++ b/ruoyi-ui/src/views/quot/quot/index.vue @@ -1709,8 +1709,8 @@ export default { }); this.form.quotQuantity = this.sumMatSl; - this.form.quotTotalPrice = this.form.quotTotalPrice; - this.form.quotMaterialsCount = this.quotMaterialList.length; + /**this.form.quotTotalPrice = this.form.quotTotalPrice; + this.form.quotMaterialsCount = this.quotMaterialList.length;*/ } }, @@ -1753,9 +1753,9 @@ export default { } }); this.form.quotQuantity = sums[6]; - this.form.quotTotalPrice = checkRole(['QUOT_MAT_PRICE_DIFF'])? (sums[14]==0?(this.form.quotTotalPrice?this.form.quotTotalPrice:sums[14]):sums[14]) : (sums[13]==0?(this.form.quotTotalPrice?this.form.quotTotalPrice:sums[13]):sums[13]); + /**this.form.quotTotalPrice = checkRole(['QUOT_MAT_PRICE_DIFF'])? (sums[14]==0?(this.form.quotTotalPrice?this.form.quotTotalPrice:sums[14]):sums[14]) : (sums[13]==0?(this.form.quotTotalPrice?this.form.quotTotalPrice:sums[13]):sums[13]); //this.form.quotTotalPrice = this.form.quotTotalPrice?this.form.quotTotalPrice:checkRole(['QUOT_MAT_PRICE_DIFF'])? sums[14] : sums[13]; - this.form.quotMaterialsCount = this.form.quotMaterialsCount?this.form.quotMaterialsCount:data.length; + this.form.quotMaterialsCount = this.form.quotMaterialsCount?this.form.quotMaterialsCount:data.length;*/ return sums; },