|
|
@@ -16,12 +16,9 @@ import kd.bos.form.plugin.AbstractFormPlugin;
|
|
|
import kd.bos.org.utils.DynamicObjectUtils;
|
|
|
import kd.bos.orm.query.QFilter;
|
|
|
import kd.hr.hbp.business.servicehelper.HRBaseServiceHelper;
|
|
|
-import kd.hr.hbp.common.cache.HRPageCache;
|
|
|
import kd.hr.hbp.common.util.HRStringUtils;
|
|
|
import kd.sdk.plugin.Plugin;
|
|
|
import kd.sdk.sit.sitbp.business.helper.SITBPServiceHelper;
|
|
|
-import kd.sdk.sit.sitbp.common.StdDimDTO;
|
|
|
-import kd.sdk.sit.sitbp.common.StdInsuranceItemDTO;
|
|
|
import kd.sdk.sit.sitbp.common.StdResultInfoDTO;
|
|
|
import nckd.jxccl.sit.hcsi.common.constant.SitConstant;
|
|
|
import nckd.jxccl.sit.hcsi.utils.SITCoordinationUtils;
|
|
|
@@ -39,6 +36,7 @@ public class SinSurEmpChgCoordBatchEditPluginEx extends AbstractFormPlugin imple
|
|
|
|
|
|
private static final HRBaseServiceHelper COORDBILL_HELPER = new HRBaseServiceHelper("hpdi_empcoordverifbill3");
|
|
|
private static final List<String> defaultQueryFields = (List) Stream.of("id", "employeev", "assignment", "coordruleparam").collect(Collectors.toList());
|
|
|
+ private static final Map<Long, StdResultInfoDTO> stdResultInfoDTOMap = new HashMap<Long, StdResultInfoDTO>();
|
|
|
/**
|
|
|
* 在标品加载完数据之后,再获取一下核定单分录的数据展示出来
|
|
|
* @param e
|
|
|
@@ -112,12 +110,11 @@ public class SinSurEmpChgCoordBatchEditPluginEx extends AbstractFormPlugin imple
|
|
|
* @return
|
|
|
*/
|
|
|
public void getStdInfoAndStdDimfromCache (DynamicObject sinSurStd) {
|
|
|
- HRPageCache pageCache = new HRPageCache(this.getView());
|
|
|
- String cacheKey = String.valueOf(sinSurStd.getLong("id"));
|
|
|
- StdResultInfoDTO stdResultInfoDTO = pageCache.get(cacheKey, StdResultInfoDTO.class);
|
|
|
+ Long cacheKey = sinSurStd.getLong("id");
|
|
|
+ StdResultInfoDTO stdResultInfoDTO = stdResultInfoDTOMap.get(cacheKey);
|
|
|
if(stdResultInfoDTO == null) {
|
|
|
stdResultInfoDTO = SITBPServiceHelper.getStdInfoAndStdDim(Arrays.asList(sinSurStd.getLong("id"))).get(sinSurStd.getLong("id"));
|
|
|
- pageCache.put(cacheKey, stdResultInfoDTO);
|
|
|
+ stdResultInfoDTOMap.put(cacheKey, stdResultInfoDTO);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -146,9 +143,8 @@ public class SinSurEmpChgCoordBatchEditPluginEx extends AbstractFormPlugin imple
|
|
|
*/
|
|
|
public void getDimensionValue(DynamicObject sinSurStd, DynamicObject welfaretype, DynamicObject sinSurDimension, int rowIndex, int subRowIndex) {
|
|
|
IDataModel model = this.getModel();
|
|
|
- HRPageCache pageCache = new HRPageCache(this.getView());
|
|
|
- String cacheKey = String.valueOf(sinSurStd.getLong("id"));
|
|
|
- StdResultInfoDTO stdResultInfoDTO = pageCache.get(cacheKey, StdResultInfoDTO.class);
|
|
|
+ Long cacheKey = sinSurStd.getLong("id");
|
|
|
+ StdResultInfoDTO stdResultInfoDTO = stdResultInfoDTOMap.get(cacheKey);
|
|
|
|
|
|
if(welfaretype == null)
|
|
|
return;
|
|
|
@@ -209,12 +205,18 @@ public class SinSurEmpChgCoordBatchEditPluginEx extends AbstractFormPlugin imple
|
|
|
DynamicObjectCollection entryCols = bill.getDynamicObjectCollection("entryentity");
|
|
|
// 当前选中行
|
|
|
int row = model.getEntryCurrentRowIndex("entryentity");
|
|
|
+ // 2025-12-08 单据体中实际/理论参保单位也需要批量设置
|
|
|
+ DynamicObject payerA = (DynamicObject) model.getValue("welfarepayertheory_r31", row);
|
|
|
+ DynamicObject payerB = (DynamicObject) model.getValue("welfarepayer_r31", row);
|
|
|
// 当前选中行的子单据体数据
|
|
|
DynamicObjectCollection subCols = entryCols.get(row).getDynamicObjectCollection("nckd_subentryentity");
|
|
|
|
|
|
for(int i = 0; i < entryCols.size(); i++) {
|
|
|
if(i == row)
|
|
|
continue;
|
|
|
+ // 设置实际/理论参保单位
|
|
|
+ entryCols.get(i).set("welfarepayertheory_r31", payerA);
|
|
|
+ entryCols.get(i).set("welfarepayer_r31", payerB);
|
|
|
// 获取本次要执行覆盖的子单据体
|
|
|
DynamicObjectCollection otherSubCols = entryCols.get(i).getDynamicObjectCollection("nckd_subentryentity");
|
|
|
// 清除数据
|
|
|
@@ -225,6 +227,7 @@ public class SinSurEmpChgCoordBatchEditPluginEx extends AbstractFormPlugin imple
|
|
|
DynamicObjectUtils.copy(subEntry, otherSubEntry);
|
|
|
}
|
|
|
}
|
|
|
+ this.getView().updateView("entryentity");
|
|
|
this.getView().updateView("nckd_subentryentity");
|
|
|
}
|
|
|
|