111
This commit is contained in:
parent
c75a4bb981
commit
2cdb87f043
|
@ -834,20 +834,23 @@ public class QuotController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
//下点超5.2 提醒
|
//下点超5.2 提醒
|
||||||
BigDecimal tpxd = BigDecimal.ZERO;
|
BigDecimal tpxd = BigDecimal.ONE;
|
||||||
List<QuotMaterial> materials = quot.getQuotMaterialList();
|
List<QuotMaterial> materials = quot.getQuotMaterialList();
|
||||||
if(materials!=null&&materials.size()>0){
|
if(materials!=null&&materials.size()>0){
|
||||||
for(QuotMaterial quotMaterial:materials){
|
/*for(QuotMaterial quotMaterial:materials){
|
||||||
BigDecimal matQuotTp = quotMaterial.getMatQuotTp();
|
BigDecimal matQuotTp = quotMaterial.getMatQuotTp();
|
||||||
if(BigDecimal.ZERO.compareTo(matQuotTp)<0){
|
if(BigDecimal.ZERO.compareTo(matQuotTp)<0){
|
||||||
tpxd = matQuotTp;
|
tpxd = matQuotTp;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
BigDecimal matQuotTp = materials.get(0).getMatQuotTp();
|
||||||
|
tpxd = matQuotTp;
|
||||||
}
|
}
|
||||||
|
|
||||||
String matQuotTp = configService.selectConfigByKey("quot.allow.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审批流程");
|
return error("特批下点数超"+matQuotTp+"个点,请走OA审批流程");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -269,7 +269,7 @@ public class RedBookController extends BaseController
|
||||||
Quot xjquot = new Quot();
|
Quot xjquot = new Quot();
|
||||||
List<QuotMaterial> materials = new ArrayList<QuotMaterial>();
|
List<QuotMaterial> materials = new ArrayList<QuotMaterial>();
|
||||||
QuotMaterial xjquotMaterials = new QuotMaterial();
|
QuotMaterial xjquotMaterials = new QuotMaterial();
|
||||||
File excelFile = null;
|
/*File excelFile = null;*/
|
||||||
try{
|
try{
|
||||||
xjquot.setQuotId(UUID.fastUUID().toString());
|
xjquot.setQuotId(UUID.fastUUID().toString());
|
||||||
String quotCode = redBookService.getCode("BJD");
|
String quotCode = redBookService.getCode("BJD");
|
||||||
|
@ -285,7 +285,7 @@ public class RedBookController extends BaseController
|
||||||
|
|
||||||
List<OAQuotProduct> list = quot.getSelectedResultData();
|
List<OAQuotProduct> list = quot.getSelectedResultData();
|
||||||
/** ===================================插入询价单明细表==================================*/
|
/** ===================================插入询价单明细表==================================*/
|
||||||
/*for(OAQuotProduct op:list){
|
for(OAQuotProduct op:list){
|
||||||
xjquotMaterials = new QuotMaterial();
|
xjquotMaterials = new QuotMaterial();
|
||||||
xjquotMaterials.setMatXingh(op.getName_1());//型号
|
xjquotMaterials.setMatXingh(op.getName_1());//型号
|
||||||
xjquotMaterials.setMatGuig(op.getSpec());//规格
|
xjquotMaterials.setMatGuig(op.getSpec());//规格
|
||||||
|
@ -301,12 +301,12 @@ public class RedBookController extends BaseController
|
||||||
xjquotMaterials.setIndex(op.getIndex());
|
xjquotMaterials.setIndex(op.getIndex());
|
||||||
materials.add(xjquotMaterials);
|
materials.add(xjquotMaterials);
|
||||||
}
|
}
|
||||||
xjquot.setQuotMaterialList(materials);*/
|
xjquot.setQuotMaterialList(materials);
|
||||||
iQuotService.insertQuot(xjquot);
|
iQuotService.insertQuot(xjquot);
|
||||||
|
|
||||||
/** ===================================插入询价单明细表==================================*/
|
/** ===================================插入询价单明细表==================================*/
|
||||||
/** ===================================产品明细生成附件==================================*/
|
/** ===================================产品明细生成附件==================================*/
|
||||||
File directory = new File("xjQuotFile/");
|
/*File directory = new File("xjQuotFile/");
|
||||||
// 如果文件夹不存在,则创建文件夹
|
// 如果文件夹不存在,则创建文件夹
|
||||||
if (!directory.exists()) {
|
if (!directory.exists()) {
|
||||||
directory.mkdir();
|
directory.mkdir();
|
||||||
|
@ -344,7 +344,7 @@ public class RedBookController extends BaseController
|
||||||
return error("系统异常,询价单号为空!");
|
return error("系统异常,询价单号为空!");
|
||||||
}
|
}
|
||||||
// 上传清单附件
|
// 上传清单附件
|
||||||
FileUtils.delete(excelFile);
|
FileUtils.delete(excelFile);*/
|
||||||
/** ===================================产品明细生成附件==================================*/
|
/** ===================================产品明细生成附件==================================*/
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
return error("系统异常");
|
return error("系统异常");
|
||||||
|
|
Loading…
Reference in New Issue