|
@@ -17,6 +17,7 @@ import kd.bos.entity.MainEntityType;
|
|
import kd.bos.entity.botp.runtime.ConvertOperationResult;
|
|
import kd.bos.entity.botp.runtime.ConvertOperationResult;
|
|
import kd.bos.entity.botp.runtime.PushArgs;
|
|
import kd.bos.entity.botp.runtime.PushArgs;
|
|
import kd.bos.entity.datamodel.ListSelectedRow;
|
|
import kd.bos.entity.datamodel.ListSelectedRow;
|
|
|
|
+import kd.bos.entity.datamodel.events.TotalEntriesEventArgs;
|
|
import kd.bos.entity.filter.FilterBuilder;
|
|
import kd.bos.entity.filter.FilterBuilder;
|
|
import kd.bos.entity.filter.FilterCondition;
|
|
import kd.bos.entity.filter.FilterCondition;
|
|
import kd.bos.entity.operate.result.OperationResult;
|
|
import kd.bos.entity.operate.result.OperationResult;
|
|
@@ -56,6 +57,7 @@ import nckd.jimin.jyyy.fi.common.util.PrintPdfUtil;
|
|
import nckd.jimin.jyyy.fi.common.util.ReceiveTicketUtils;
|
|
import nckd.jimin.jyyy.fi.common.util.ReceiveTicketUtils;
|
|
|
|
|
|
import java.io.ByteArrayInputStream;
|
|
import java.io.ByteArrayInputStream;
|
|
|
|
+import java.math.BigDecimal;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -98,14 +100,13 @@ public class ReimWorkBenchesDetailFormPlugin extends AbstractFormPlugin implemen
|
|
public void initialize() {
|
|
public void initialize() {
|
|
super.initialize();
|
|
super.initialize();
|
|
reimHelper = new ReimWorkBenchesHelper();
|
|
reimHelper = new ReimWorkBenchesHelper();
|
|
|
|
+
|
|
|
|
+ EntryGrid entryGrid = this.getControl(ENTITY_ENTRY);
|
|
|
|
+ entryGrid.setInterveneTotal(true);
|
|
}
|
|
}
|
|
|
|
|
|
protected ReimWorkBenchesHelper getReimHelper(){
|
|
protected ReimWorkBenchesHelper getReimHelper(){
|
|
- if(reimHelper != null){
|
|
|
|
- return reimHelper;
|
|
|
|
- }else{
|
|
|
|
- return new ReimWorkBenchesHelper();
|
|
|
|
- }
|
|
|
|
|
|
+ return Optional.ofNullable(reimHelper).orElse(new ReimWorkBenchesHelper());
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -117,6 +118,43 @@ public class ReimWorkBenchesDetailFormPlugin extends AbstractFormPlugin implemen
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public void totalEntriesByCondition(TotalEntriesEventArgs e) {
|
|
|
|
+ super.totalEntriesByCondition(e);
|
|
|
|
+ setEntryTotalAmount();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ protected void setEntryTotalAmount(){
|
|
|
|
+ EntryGrid entryGrid = this.getControl(ENTITY_ENTRY);
|
|
|
|
+ DynamicObject[] entryPageDataArray = entryGrid.getEntryData().getDataEntitys();
|
|
|
|
+
|
|
|
|
+ BigDecimal applyAmount = BigDecimal.ZERO;
|
|
|
|
+ BigDecimal approveAmount = BigDecimal.ZERO;
|
|
|
|
+ BigDecimal balanceAmount = BigDecimal.ZERO;
|
|
|
|
+ BigDecimal payAmount = BigDecimal.ZERO;
|
|
|
|
+ BigDecimal notpayAmount = BigDecimal.ZERO;
|
|
|
|
+ for(DynamicObject entry : entryPageDataArray){
|
|
|
|
+ applyAmount = applyAmount.add(entry.getBigDecimal("applyamount"));
|
|
|
|
+ approveAmount = approveAmount.add(entry.getBigDecimal("approveamount"));
|
|
|
|
+ balanceAmount = balanceAmount.add(entry.getBigDecimal("balanceamount"));
|
|
|
|
+ payAmount = payAmount.add(entry.getBigDecimal("payamount"));
|
|
|
|
+ notpayAmount = notpayAmount.add(entry.getBigDecimal("notpayamount"));
|
|
|
|
+ }
|
|
|
|
+ Map<String,String> totalAmountMap = new HashMap<>(5);
|
|
|
|
+ totalAmountMap.put("applyAmount",applyAmount.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString());
|
|
|
|
+ totalAmountMap.put("approveAmount",approveAmount.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString());
|
|
|
|
+ totalAmountMap.put("balanceAmount",balanceAmount.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString());
|
|
|
|
+ totalAmountMap.put("payAmount",payAmount.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString());
|
|
|
|
+ totalAmountMap.put("notpayAmount",notpayAmount.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString());
|
|
|
|
+ entryGrid.setFloatButtomData(totalAmountMap);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void afterCreateNewData(EventObject e) {
|
|
|
|
+ super.afterCreateNewData(e);
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public void beforeBindData(EventObject e) {
|
|
public void beforeBindData(EventObject e) {
|
|
super.beforeBindData(e);
|
|
super.beforeBindData(e);
|
|
@@ -128,6 +166,8 @@ public class ReimWorkBenchesDetailFormPlugin extends AbstractFormPlugin implemen
|
|
super.afterBindData(e);
|
|
super.afterBindData(e);
|
|
|
|
|
|
updateEntryFiledTitle();
|
|
updateEntryFiledTitle();
|
|
|
|
+
|
|
|
|
+ setEntryTotalAmount();
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|