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; },