1.传统的测算设备款校验更改
This commit is contained in:
parent
dd495913c0
commit
4d9f85af0c
@ -1128,18 +1128,14 @@ public class CreateTransactionExecutor implements Transaction {
|
||||
|
||||
//校验融资金额是否超额
|
||||
public String checkMoney()throws Exception{
|
||||
double sumMoney = 0.0;
|
||||
BizObjectManager lcctManage = JBOFactory.getBizObjectManager(LC_CALC_CONDITION_TEMP.CLASS_NAME);
|
||||
BigDecimal sumMoney = new BigDecimal("0") ;
|
||||
BizObjectManager letManage = JBOFactory.getBizObjectManager(LB_EQUIPMENT_TEMP.CLASS_NAME);
|
||||
List<BizObject> lccts = lcctManage.createQuery(" project_id=:projectid and flowunid<>:flowunid and contract_plan_number<>'' ").setParameter("projectid", projectId).setParameter("flowunid", flowunid).getResultList(false);
|
||||
for (BizObject lcct : lccts) {
|
||||
lcct.getAttribute("EQUIP_AMT").getString();
|
||||
double equip_money = new Double(lcct.getAttribute("EQUIP_AMT").getString());
|
||||
sumMoney = sumMoney+equip_money;
|
||||
List<BizObject> letms = letManage.createQuery("flowunid=:flowunid").setParameter("flowunid", this.flowunid).getResultList(false);
|
||||
for(BizObject letm:letms){
|
||||
sumMoney = new BigDecimal(letm.getAttribute("EQUIP_PRICE").getString()).add(sumMoney);
|
||||
}
|
||||
BizObject letm = letManage.createQuery("flowunid=:flowunid").setParameter("flowunid", this.flowunid).getSingleResult(false);
|
||||
double equip_money = new Double(letm.getAttribute("EQUIP_PRICE").getString()).doubleValue();
|
||||
return (equip_money-sumMoney)+"";
|
||||
sumMoney = sumMoney.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
return sumMoney.toString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user