|
@@ -22,6 +22,7 @@ import nc.vo.uif2.LoginContext;
|
|
|
import nc.vo.wa.category.WaClassVO;
|
|
|
import nc.vo.wa.classitem.WaClassItemVO;
|
|
|
import nc.vo.wa.item.WaItemVO;
|
|
|
+import nc.vo.wa.paydata.WaClassItemShowInfVO;
|
|
|
import nc.vo.wa.paydata.WaPaydataDspVO;
|
|
|
import nc.vo.wa.pub.PeriodStateVO;
|
|
|
import nc.vo.wa.pub.WaLoginContext;
|
|
@@ -41,6 +42,8 @@ import nccloud.web.hr.pub.HRNccTemplateUtils;
|
|
|
import nccloud.web.hr.pub.HRNccUtils;
|
|
|
import nccloud.web.hr.rpt.pub.INccHrRptConst;
|
|
|
import nccloud.web.hrhi.pub.PsndocTempUtils;
|
|
|
+import nccloud.web.hrwa.helper.WaLoginContextUtils;
|
|
|
+import nccloud.web.hrwa.paydata.action.WaPaydataClassItemHelper;
|
|
|
import nccloud.web.uapbd.commons.web.ParamUtils;
|
|
|
|
|
|
/**
|
|
@@ -52,6 +55,7 @@ public class WaRptQryAfterEditAction extends HRCommonAction {
|
|
|
public <T> Object execute(IRequest iRequest, T t) throws Exception {
|
|
|
ParamUtils param = new ParamUtils(iRequest);
|
|
|
LoginContext loginContext = HRNccUtils.getLoginContext(param);
|
|
|
+ WaLoginContext context = WaLoginContextUtils.getWaLoginContext(param);
|
|
|
|
|
|
String areaCode = param.getString("area_code", null);
|
|
|
if (StringUtils.isBlank(areaCode)) {
|
|
@@ -90,7 +94,7 @@ public class WaRptQryAfterEditAction extends HRCommonAction {
|
|
|
waGlobalVO.setWaClassPK(waClassPk);
|
|
|
waGlobalVO.setWaYear(Cyear);
|
|
|
result.put("item_list", getItemList(waGlobalVO, 0));
|
|
|
- extracted(result, vo);
|
|
|
+ extracted(result, vo,context);
|
|
|
return result;
|
|
|
}
|
|
|
} else if ("WaItemQueryConditionPanelForGroup".equals(areaCode) || "WaBaseQueryConditionPanel".equals(areaCode) || "WaSumByPsnclQueryConditionPanel".equals(areaCode)
|
|
@@ -134,7 +138,7 @@ public class WaRptQryAfterEditAction extends HRCommonAction {
|
|
|
waGlobalVO.setCurUserid(loginContext.getPk_loginUser());
|
|
|
}
|
|
|
result.put("item_list", getItemList(waGlobalVO, 0));
|
|
|
- extracted(result, vo);
|
|
|
+ extracted(result, vo,context);
|
|
|
if ("WaBaseQueryConditionPanel".equals(areaCode) || "WaSumByDeptQueryConditionPanel".equals(areaCode) || "WaItemQueryConditionPanel".equals(areaCode)) {
|
|
|
// 这三个要查询数值型薪资项目和字符型薪资项目
|
|
|
IPaydataQueryService service = ServiceLocator.find(IPaydataQueryService.class);
|
|
@@ -195,7 +199,7 @@ public class WaRptQryAfterEditAction extends HRCommonAction {
|
|
|
waGlobalVO.setWaClassPK(waClassPk);
|
|
|
waGlobalVO.setWaYear(Cyear);
|
|
|
result.put("item_list", getItemList(waGlobalVO, 0));
|
|
|
- extracted(result, vo);
|
|
|
+ extracted(result, vo,context);
|
|
|
return result;
|
|
|
}
|
|
|
} else if ("WaMultiRptQueryConditionPanel".equals(areaCode)) {
|
|
@@ -225,7 +229,7 @@ public class WaRptQryAfterEditAction extends HRCommonAction {
|
|
|
}
|
|
|
WaItemVO[] items = ServiceLocator.find(IClassitemQry.class).queryItemInfoWithPowerForMutiClasses(waGlobalVOs, 0);
|
|
|
result.put("item_list", createList(items));
|
|
|
- extracted(result, vo);
|
|
|
+ extracted(result, vo,context);
|
|
|
return result;
|
|
|
}
|
|
|
} else if ("OrgWaAccountQueryConditionPanel".equals(areaCode) || "DeptWaAccountQueryConditionPanel".equals(areaCode)) {
|
|
@@ -252,7 +256,7 @@ public class WaRptQryAfterEditAction extends HRCommonAction {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- private void extracted(HashMap result, GeneralVO vo) throws BusinessException {
|
|
|
+ private void extracted(HashMap result, GeneralVO vo,WaLoginContext context) throws BusinessException {
|
|
|
//add by@chenzf 添加薪资发放设置的通用项目 2022-5-23 17:49:52 begin
|
|
|
if(result.get("item_list") != null) {
|
|
|
List<Map> map = (List<Map>) result.get("item_list");
|
|
@@ -260,21 +264,69 @@ public class WaRptQryAfterEditAction extends HRCommonAction {
|
|
|
List<Map> ymap = new ArrayList();//已选
|
|
|
if(map.size() > 0) {
|
|
|
String waClassPk = (String) vo.getAttributeValue(WaProviderConst.WA_CLASS_PK);
|
|
|
-// select * from wa_paydatadsp where type = 0 and pk_wa_class = '1001A1100000000MYC7Z' and bshow = 'Y' and iswaitem = 'Y' order by displayseq;
|
|
|
+ String baseCperiod = (String) vo.getAttributeValue(WaProviderConst.BASE_CPERIOD);
|
|
|
+ WaLoginVO waLoginVO = null;
|
|
|
+ if (baseCperiod != null && baseCperiod.length() == 6) {
|
|
|
+ String m_waYear = baseCperiod.substring(0, 4);
|
|
|
+ String m_waPeriod = baseCperiod.substring(4, baseCperiod.length());
|
|
|
+ // 设置薪资类别参数
|
|
|
+ waLoginVO = new WaLoginVO();
|
|
|
+ waLoginVO.setPk_wa_class(waClassPk);
|
|
|
+ waLoginVO.setPk_prnt_class(waClassPk);
|
|
|
+ waLoginVO.setCyear(m_waYear);
|
|
|
+ waLoginVO.setCperiod(m_waPeriod);
|
|
|
+ waLoginVO.setPk_org(context.getPk_org());
|
|
|
+ waLoginVO.setPk_group(context.getPk_group());
|
|
|
+ context.setWaLoginVO(waLoginVO);
|
|
|
+ }
|
|
|
List<WaPaydataDspVO> list = ServiceLocator.find(IClassitemQry.class).queryWaPaydataDspVOByPkWaClass(waClassPk);
|
|
|
if(list != null && list.size() > 0) {
|
|
|
List<String> keyList = new ArrayList();
|
|
|
for(WaPaydataDspVO dspVO : list) {
|
|
|
keyList.add(dspVO.getItem_key());
|
|
|
}
|
|
|
+ for(String key : keyList) {
|
|
|
+ for(Map m : map) {
|
|
|
+ if(key.equals(m.get("itemkey"))) {
|
|
|
+ ymap.add(m);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
for(Map m : map) {
|
|
|
if(keyList.contains(m.get("itemkey"))) {
|
|
|
- ymap.add(m);
|
|
|
+// ymap.add(m);
|
|
|
} else {
|
|
|
dmap.add(m);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+// WaClassItemVO[] waClassItemVO = ServiceLocator.find(IClassitemQry.class).getUserShowClassItemVOs(context);
|
|
|
+// if(list != null && list.size() > 0) {
|
|
|
+// List<String> keyList = new ArrayList();
|
|
|
+// if(waClassItemVO != null && waClassItemVO.length > 0) {
|
|
|
+// for(WaClassItemVO item : waClassItemVO) {
|
|
|
+// for(WaPaydataDspVO dspVO : list) {
|
|
|
+// if(item.getItemkey().equals(dspVO.getItem_key())) {
|
|
|
+// keyList.add(item.getItemkey());
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// for(String key : keyList) {
|
|
|
+// for(Map m : map) {
|
|
|
+// if(key.equals(m.get("itemkey"))) {
|
|
|
+// ymap.add(m);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// for(Map m : map) {
|
|
|
+// if(keyList.contains(m.get("itemkey"))) {
|
|
|
+//// ymap.add(m);
|
|
|
+// } else {
|
|
|
+// dmap.add(m);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
}
|
|
|
result.put("item_list", dmap);
|
|
|
result.put("yitem_list", ymap);
|