金思维联调,生成报价单带出审核人、编制人

This commit is contained in:
xd 2024-07-07 22:50:12 +08:00
parent 8c9ec6ff9a
commit 6bea8b23f6
4 changed files with 21 additions and 16 deletions

View File

@ -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

View File

@ -40,6 +40,7 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.*; import java.io.*;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*; import java.util.*;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future; import java.util.concurrent.Future;
@ -285,6 +286,8 @@ public class RedBookController extends BaseController
List<OAQuotProduct> list = quot.getSelectedResultData(); List<OAQuotProduct> list = quot.getSelectedResultData();
/** ===================================插入询价单明细表==================================*/ /** ===================================插入询价单明细表==================================*/
int quotMaterialsCount = 0;//明细条数
BigDecimal quotTotalPrice = BigDecimal.ZERO;//报价金额小计
for(OAQuotProduct op:list){ for(OAQuotProduct op:list){
xjquotMaterials = new QuotMaterial(); xjquotMaterials = new QuotMaterial();
xjquotMaterials.setMatXingh(op.getName_1());//型号 xjquotMaterials.setMatXingh(op.getName_1());//型号
@ -300,7 +303,11 @@ public class RedBookController extends BaseController
xjquotMaterials.setIndex(op.getIndex()); xjquotMaterials.setIndex(op.getIndex());
materials.add(xjquotMaterials); 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); xjquot.setQuotMaterialList(materials);
iQuotService.insertQuot(xjquot); iQuotService.insertQuot(xjquot);

View File

@ -18,6 +18,8 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -164,6 +166,9 @@ public class quotJswController extends BaseController {
q.setQuotJswCheckUserNickname(quot.getQuotJswCheckUserNickname());//金思维审核人 q.setQuotJswCheckUserNickname(quot.getQuotJswCheckUserNickname());//金思维审核人
q.setQuotJswApprovalStatus("2"); q.setQuotJswApprovalStatus("2");
int quotMaterialsCount = 0;//明细条数
BigDecimal quotTotalPrice = BigDecimal.ZERO;//报价金额小计
List<QuotMaterial> qmaterials = new ArrayList<QuotMaterial>(); List<QuotMaterial> qmaterials = new ArrayList<QuotMaterial>();
QuotMaterial quotMaterial = new QuotMaterial(); QuotMaterial quotMaterial = new QuotMaterial();
for(quotMaterialModel model:materials){ for(quotMaterialModel model:materials){
@ -184,8 +189,12 @@ public class quotJswController extends BaseController {
quotMaterial.setXh(model.getXh()); quotMaterial.setXh(model.getXh());
quotMaterial.setIndex(model.getIndex()); quotMaterial.setIndex(model.getIndex());
qmaterials.add(quotMaterial); 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); q.setQuotMaterialList(qmaterials);
quotService.updateQuot(q); quotService.updateQuot(q);
}catch(Exception e){ }catch(Exception e){

View File

@ -1709,8 +1709,8 @@ export default {
}); });
this.form.quotQuantity = this.sumMatSl; this.form.quotQuantity = this.sumMatSl;
this.form.quotTotalPrice = this.form.quotTotalPrice; /**this.form.quotTotalPrice = this.form.quotTotalPrice;
this.form.quotMaterialsCount = this.quotMaterialList.length; this.form.quotMaterialsCount = this.quotMaterialList.length;*/
} }
}, },
@ -1753,9 +1753,9 @@ export default {
} }
}); });
this.form.quotQuantity = sums[6]; 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.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; return sums;
}, },