This commit is contained in:
xd 2024-07-08 08:12:54 +08:00
commit 844cd435f7
6 changed files with 45 additions and 27 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

@ -834,20 +834,23 @@ public class QuotController extends BaseController
}
//下点超5.2 提醒
BigDecimal tpxd = BigDecimal.ZERO;
BigDecimal tpxd = BigDecimal.ONE;
List<QuotMaterial> materials = quot.getQuotMaterialList();
if(materials!=null&&materials.size()>0){
for(QuotMaterial quotMaterial:materials){
/*for(QuotMaterial quotMaterial:materials){
BigDecimal matQuotTp = quotMaterial.getMatQuotTp();
if(BigDecimal.ZERO.compareTo(matQuotTp)<0){
tpxd = matQuotTp;
break;
}
}
}*/
BigDecimal matQuotTp = materials.get(0).getMatQuotTp();
tpxd = matQuotTp;
}
String matQuotTp = configService.selectConfigByKey("quot.allow.matQuotTp");
if(tpxd.compareTo(new BigDecimal(matQuotTp))>0 && "0".equals(quot_oa_approval_status)){
BigDecimal matQuotTp2 = BigDecimal.ONE.subtract(new BigDecimal(matQuotTp).divide(new BigDecimal("100")));
if(tpxd.compareTo(matQuotTp2) < 0 && "0".equals(quot_oa_approval_status)){
return error("特批下点数超"+matQuotTp+"个点,请走OA审批流程");
}

View File

@ -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;
@ -269,7 +270,7 @@ public class RedBookController extends BaseController
Quot xjquot = new Quot();
List<QuotMaterial> materials = new ArrayList<QuotMaterial>();
QuotMaterial xjquotMaterials = new QuotMaterial();
File excelFile = null;
/*File excelFile = null;*/
try{
xjquot.setQuotId(UUID.fastUUID().toString());
String quotCode = redBookService.getCode("BJD");
@ -285,7 +286,9 @@ public class RedBookController extends BaseController
List<OAQuotProduct> list = quot.getSelectedResultData();
/** ===================================插入询价单明细表==================================*/
/*for(OAQuotProduct op:list){
int quotMaterialsCount = 0;//明细条数
BigDecimal quotTotalPrice = BigDecimal.ZERO;//报价金额小计
for(OAQuotProduct op:list){
xjquotMaterials = new QuotMaterial();
xjquotMaterials.setMatXingh(op.getName_1());//型号
xjquotMaterials.setMatGuig(op.getSpec());//规格
@ -300,13 +303,17 @@ public class RedBookController extends BaseController
xjquotMaterials.setIndex(op.getIndex());
materials.add(xjquotMaterials);
quotMaterialsCount++;
quotTotalPrice = quotTotalPrice.add(xjquotMaterials.getMatQuotAllPrice());
}
xjquot.setQuotMaterialList(materials);*/
xjquot.setQuotMaterialsCount(quotMaterialsCount);
xjquot.setQuotTotalPrice(String.valueOf(quotTotalPrice.setScale(2, RoundingMode.HALF_UP)));
xjquot.setQuotMaterialList(materials);
iQuotService.insertQuot(xjquot);
/** ===================================插入询价单明细表==================================*/
/** ===================================产品明细生成附件==================================*/
File directory = new File("xjQuotFile/");
/*File directory = new File("xjQuotFile/");
// 如果文件夹不存在则创建文件夹
if (!directory.exists()) {
directory.mkdir();
@ -344,7 +351,7 @@ public class RedBookController extends BaseController
return error("系统异常,询价单号为空!");
}
// 上传清单附件
FileUtils.delete(excelFile);
FileUtils.delete(excelFile);*/
/** ===================================产品明细生成附件==================================*/
}catch(Exception e){
return error("系统异常");

View File

@ -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<QuotMaterial> qmaterials = new ArrayList<QuotMaterial>();
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){

View File

@ -408,7 +408,12 @@ public class excelUtil {
String QuotXjrq = DateUtils.dateTime(quot.getQuotInquiryDate());//询价日期
String QuotBjrq = DateUtils.dateTime(new Date());//报价日期
String[] bjs = {"询价单位:"+QuotCustomer,"业务联系人:"+QuotLxr,"项目名称:"+QuotProject,"联 系 电 话:"+QuotLxrdh,"询价日期:"+QuotXjrq,"编 制:","报价日期:"+QuotBjrq,"审 核:"};
String QuotBzr = quot.getQuotCheckUserNickname();//编制人
QuotBzr = StringUtils.isEmpty(QuotBzr)?"":QuotBzr;
String QuotShr = quot.getQuotJswCheckUserNickname();//审核人
QuotShr = StringUtils.isEmpty(QuotShr)?"":QuotShr;
String[] bjs = {"询价单位:"+QuotCustomer,"业务联系人:"+QuotLxr,"项目名称:"+QuotProject,"联 系 电 话:"+QuotLxrdh,"询价日期:"+QuotXjrq,"编 制:"+QuotBzr,"报价日期:"+QuotBjrq,"审 核:"+QuotShr};
int k=0;
while(k<bjs.length){
wsheet.mergeCells(0,i,3,i);
@ -712,7 +717,12 @@ public class excelUtil {
String QuotXjrq = DateUtils.dateTime(quot.getQuotInquiryDate());//询价日期
String QuotBjrq = DateUtils.dateTime(new Date());//报价日期
String[] bjs = {"询价单位:"+QuotCustomer,"业务联系人:"+QuotLxr,"项目名称:"+QuotProject,"联 系 电 话:"+QuotLxrdh,"询价日期:"+QuotXjrq,"编 制:","报价日期:"+QuotBjrq,"审 核:"};
String QuotBzr = quot.getQuotCheckUserNickname();//编制人
QuotBzr = StringUtils.isEmpty(QuotBzr)?"":QuotBzr;
String QuotShr = quot.getQuotJswCheckUserNickname();//审核人
QuotShr = StringUtils.isEmpty(QuotShr)?"":QuotShr;
String[] bjs = {"询价单位:"+QuotCustomer,"业务联系人:"+QuotLxr,"项目名称:"+QuotProject,"联 系 电 话:"+QuotLxrdh,"询价日期:"+QuotXjrq,"编 制:"+QuotBzr,"报价日期:"+QuotBjrq,"审 核:"+QuotShr};
int k=0;
while(k<bjs.length){
wsheet.mergeCells(0,i,3,i);

View File

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