1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- package com.kingdee.shr.batchContract.web.handler;
- import com.kingdee.bos.BOSException;
- import com.kingdee.bos.Context;
- import com.kingdee.eas.framework.CoreBaseInfo;
- import com.kingdee.eas.hr.affair.EmpEnrollBizBillEntryCollection;
- import com.kingdee.eas.hr.affair.EmpEnrollBizBillEntryFactory;
- import com.kingdee.eas.hr.affair.EmpEnrollBizBillEntryInfo;
- import com.kingdee.eas.hr.affair.IEmpEnrollBizBillEntry;
- import com.kingdee.shr.base.syssetting.context.SHRContext;
- import com.kingdee.shr.base.syssetting.exception.SHRWebException;
- import com.kingdee.shr.common.ContractUtils;
- import com.kingdee.util.StringUtils;
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
- import org.springframework.ui.ModelMap;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
- import java.util.ArrayList;
- import java.util.HashMap;
- import java.util.Map;
- /**
- * 其他劳动合同_批量
- * 拓展
- * @author coyle
- * 202410
- */
- public class SHROtherContractBatchEditEx extends SHROtherContractBatchEditHandler {
- private static final Logger logger = LoggerFactory.getLogger(SHROtherContractBatchEditEx.class);
-
- /**
- * 查询劳动合同主体
- * @param request
- * @param response
- * @param modelMap
- * @throws SHRWebException
- * @throws BOSException
- */
- public void queryContractSubAction (HttpServletRequest request, HttpServletResponse response, ModelMap modelMap)
- throws SHRWebException, BOSException {
- String personId = StringUtils.cnulls(request.getParameter("personId"));
- Context ctx = SHRContext.getInstance().getContext();
- Map<String, String> party = ContractUtils.getParty(ctx, personId);
- writeSuccessData(party);
- }
-
-
-
- /**
- * 根据劳动合同主体查询出不为此主体的人员;
- * @param request
- * @param response
- * @param modelMap
- * @throws SHRWebException
- * @throws BOSException
- */
- public void checkContractSubAction (HttpServletRequest request, HttpServletResponse response, ModelMap modelMap)
- throws SHRWebException, BOSException {
- String personIds = StringUtils.cnulls(request.getParameter("personIds"));
- String partyId = StringUtils.cnulls(request.getParameter("partyId"));
- Context ctx = SHRContext.getInstance().getContext();
-
- IEmpEnrollBizBillEntry entryIns = EmpEnrollBizBillEntryFactory.getLocalInstance(ctx);
- EmpEnrollBizBillEntryCollection col = entryIns.getEmpEnrollBizBillEntryCollection("select ldhtzt.name , person.name "
- + "where person.id in ( "+personIds+") and ldhtzt.id <> '"+partyId+"'" );
-
- ArrayList<Map<String,String>> resultList = new ArrayList();
- for(int i = 0;i<col.size();i++) {
- EmpEnrollBizBillEntryInfo empEnrollBizBillEntryInfo = col.get(0);
- CoreBaseInfo ldhtzt = (CoreBaseInfo) empEnrollBizBillEntryInfo.get("ldhtzt");
- CoreBaseInfo personInfo = (CoreBaseInfo) empEnrollBizBillEntryInfo.get("person");
- if(null != ldhtzt && null != personInfo) {
- String partName = StringUtils.cnulls(ldhtzt.getString("name"));
- String personName = StringUtils.cnulls(personInfo.getString("name"));
- Map<String,String> resultMap = new HashMap();
- resultMap.put("partName", partName);
- resultMap.put("personName", personName);
- resultList.add(resultMap);
- }
- }
- writeSuccessData(resultList);
- }
- }
|