This commit is contained in:
xd 2024-07-06 14:38:58 +08:00
parent c75a4bb981
commit 2cdb87f043
2 changed files with 12 additions and 9 deletions

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

@ -269,7 +269,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 +285,7 @@ public class RedBookController extends BaseController
List<OAQuotProduct> list = quot.getSelectedResultData();
/** ===================================插入询价单明细表==================================*/
/*for(OAQuotProduct op:list){
for(OAQuotProduct op:list){
xjquotMaterials = new QuotMaterial();
xjquotMaterials.setMatXingh(op.getName_1());//型号
xjquotMaterials.setMatGuig(op.getSpec());//规格
@ -301,12 +301,12 @@ public class RedBookController extends BaseController
xjquotMaterials.setIndex(op.getIndex());
materials.add(xjquotMaterials);
}
xjquot.setQuotMaterialList(materials);*/
xjquot.setQuotMaterialList(materials);
iQuotService.insertQuot(xjquot);
/** ===================================插入询价单明细表==================================*/
/** ===================================产品明细生成附件==================================*/
File directory = new File("xjQuotFile/");
/*File directory = new File("xjQuotFile/");
// 如果文件夹不存在则创建文件夹
if (!directory.exists()) {
directory.mkdir();
@ -344,7 +344,7 @@ public class RedBookController extends BaseController
return error("系统异常,询价单号为空!");
}
// 上传清单附件
FileUtils.delete(excelFile);
FileUtils.delete(excelFile);*/
/** ===================================产品明细生成附件==================================*/
}catch(Exception e){
return error("系统异常");