'123'
This commit is contained in:
parent
f951c3f19c
commit
874990b2da
|
@ -4,6 +4,7 @@ import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -762,6 +763,27 @@ public class QuotController extends BaseController
|
||||||
return error("金思维未协助完成,不能提交OA");
|
return error("金思维未协助完成,不能提交OA");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//厂价金额小于10万 不走OA审批
|
||||||
|
BigDecimal tpxd = BigDecimal.ONE;
|
||||||
|
List<QuotMaterial> materials = quot.getQuotMaterialList();
|
||||||
|
if(materials!=null&&materials.size()>0){
|
||||||
|
BigDecimal matQuotTp = materials.get(0).getMatQuotTp();
|
||||||
|
if(matQuotTp == null || BigDecimal.ZERO.compareTo(matQuotTp)==0){
|
||||||
|
matQuotTp = BigDecimal.ONE;
|
||||||
|
}
|
||||||
|
tpxd = matQuotTp;
|
||||||
|
}
|
||||||
|
|
||||||
|
String allowFactoryPrice = configService.selectConfigByKey("quot:allow.factoryPrice");
|
||||||
|
BigDecimal factoryPrice = new BigDecimal(allowFactoryPrice);
|
||||||
|
|
||||||
|
String quotTotalPrice = quot.getQuotTotalPrice();//报价金额
|
||||||
|
BigDecimal changj = new BigDecimal(quotTotalPrice).divide(tpxd,2,RoundingMode.HALF_UP);//厂价金额
|
||||||
|
|
||||||
|
if(changj.compareTo(factoryPrice)<0){
|
||||||
|
return error("厂价金额不超过"+allowFactoryPrice+",无法提交OA审批");
|
||||||
|
}
|
||||||
|
|
||||||
// 报价单提交OA,插入中间表 sys_oa_quot sys_oa_quot_material
|
// 报价单提交OA,插入中间表 sys_oa_quot sys_oa_quot_material
|
||||||
SysOaQuot sysOaQuot = new SysOaQuot();
|
SysOaQuot sysOaQuot = new SysOaQuot();
|
||||||
SysOaQuot oauser = quotService.selectOAUserByUserName(getUsername());// 查询OA用户
|
SysOaQuot oauser = quotService.selectOAUserByUserName(getUsername());// 查询OA用户
|
||||||
|
|
Loading…
Reference in New Issue