|
|
@@ -23,6 +23,7 @@ import kd.sdk.plugin.Plugin;
|
|
|
import nckd.jxccl.base.swc.helper.SWCHelper;
|
|
|
import nckd.jxccl.swc.constants.SwcConstant;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.ZoneId;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
@@ -117,6 +118,16 @@ public class AgencyBillEdit extends AbstractFormPlugin implements Plugin {
|
|
|
return key2;
|
|
|
}));
|
|
|
|
|
|
+ // 获取到人员证件信息
|
|
|
+ DynamicObject[] percreDyns = SWCHelper.queryPercreDyns(employeeId);
|
|
|
+ Map<Long, DynamicObject> percreMap = Arrays.stream(percreDyns).collect(Collectors.toMap((dyx) -> {
|
|
|
+ return dyx.getLong("employee.id");
|
|
|
+ }, (dyx) -> {
|
|
|
+ return dyx;
|
|
|
+ }, (key1, key2) -> {
|
|
|
+ return key2;
|
|
|
+ }));
|
|
|
+
|
|
|
for (Object calPerson : calPersonIds) {
|
|
|
DynamicObject row = entryCols.addNew();
|
|
|
Long calPersonId = Long.valueOf(calPerson.toString());
|
|
|
@@ -125,7 +136,13 @@ public class AgencyBillEdit extends AbstractFormPlugin implements Plugin {
|
|
|
row.set("nckd_adminorg", calPersonMap.get(calPersonId).getDynamicObject("empposorgrelsndet.adminorg"));
|
|
|
//row.set("nckd_payrollgrp", model.getValue("nckd_payrollgroup"));
|
|
|
row.set("nckd_belongdate", date);
|
|
|
- row.set("nckd_amount", calTableMap.get(calPersonId).getBigDecimal("hsas_caltableentry.calamountvalue"));
|
|
|
+ row.set("nckd_idcardno", percreMap.get(row.getLong("nckd_employee.id")).getString("number"));
|
|
|
+ if(calTableMap.keySet().contains(calPersonId)) {
|
|
|
+ row.set("nckd_amount", calTableMap.get(calPersonId).getBigDecimal("hsas_caltableentry.calamountvalue"));
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ row.set("nckd_amount", BigDecimal.ZERO);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -140,10 +157,6 @@ public class AgencyBillEdit extends AbstractFormPlugin implements Plugin {
|
|
|
return SwcConstant.CALPERSON_HELPER.queryOriginalCollection(selectFields, new QFilter[]{filter});
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
@Override
|
|
|
public void beforeDoOperation(BeforeDoOperationEventArgs args) {
|
|
|
super.beforeDoOperation(args);
|