|
@@ -1477,6 +1477,19 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
sis.setChangeMoney(itf.getChangeMoney());
|
|
sis.setChangeMoney(itf.getChangeMoney());
|
|
sis.setPrice(itf.getBidPrice());
|
|
sis.setPrice(itf.getBidPrice());
|
|
if(cur!=null&&cur.getContractMoney()!=null) {
|
|
if(cur!=null&&cur.getContractMoney()!=null) {
|
|
|
|
+ FormulaUtils.getScale(cur.getUnit()).ifPresent(scale->{
|
|
|
|
+ cur.setCompleted(BaseUtils.str2BigDecimal(cur.getCompleted()).setScale(scale,RoundingMode.HALF_UP).doubleValue());
|
|
|
|
+ cur.setMoney(BaseUtils.str2BigDecimal(multiFc.apply(cur.getPrice(),cur.getCompleted().toString())).setScale(0,RoundingMode.HALF_UP));
|
|
|
|
+ if (pre != null) {
|
|
|
|
+ pre.setCompleted(BaseUtils.str2BigDecimal(pre.getCompleted()).setScale(scale,RoundingMode.HALF_UP).doubleValue());
|
|
|
|
+ pre.setMoney(BaseUtils.str2BigDecimal(multiFc.apply(pre.getPrice(),pre.getCompleted().toString())).setScale(0,RoundingMode.HALF_UP));
|
|
|
|
+ end.setCompleted(BaseUtils.str2BigDecimal(addFc.apply(cur.getCompleted().toString(),pre.getCompleted().toString())).setScale(scale,RoundingMode.HALF_UP).doubleValue());
|
|
|
|
+ end.setMoney(BaseUtils.str2BigDecimal(multiFc.apply(end.getPrice(),end.getCompleted().toString())).setScale(0,RoundingMode.HALF_UP));
|
|
|
|
+ }else {
|
|
|
|
+ end.setCompleted(cur.getCompleted());
|
|
|
|
+ end.setMoney(cur.getMoney());
|
|
|
|
+ }
|
|
|
|
+ });
|
|
sis.setCurrentPeriodPay(cur.getMoney().toPlainString());
|
|
sis.setCurrentPeriodPay(cur.getMoney().toPlainString());
|
|
sis.setCurrentPeriodCompleted(cur.getCompleted().toString());
|
|
sis.setCurrentPeriodCompleted(cur.getCompleted().toString());
|
|
if (pre != null) {
|
|
if (pre != null) {
|