|
@@ -0,0 +1,72 @@
|
|
|
+package com.kingdee.eas.custom.ResumeHandler;
|
|
|
+import com.google.common.base.Joiner;
|
|
|
+import com.kingdee.bos.BOSException;
|
|
|
+import com.kingdee.bos.Context;
|
|
|
+import com.kingdee.bos.dao.ormapping.ObjectUuidPK;
|
|
|
+import com.kingdee.shr.base.syssetting.context.SHRContext;
|
|
|
+import com.kingdee.shr.base.syssetting.exception.SHRWebException;
|
|
|
+import com.kingdee.shr.base.syssetting.json.GridDataEntity;
|
|
|
+import com.kingdee.shr.recuritment.EducationExpRECCollection;
|
|
|
+import com.kingdee.shr.recuritment.EducationExpRECFactory;
|
|
|
+import com.kingdee.shr.recuritment.EducationExpRECInfo;
|
|
|
+import com.kingdee.shr.recuritment.IEducationExpREC;
|
|
|
+import com.kingdee.shr.recuritment.app.service.ResumeOperRecordService;
|
|
|
+import com.kingdee.shr.recuritment.app.util.convert.ResumeConvertUtil;
|
|
|
+import com.kingdee.shr.recuritment.utils.ShowHistoryNameService;
|
|
|
+import com.kingdee.shr.recuritment.web.handler.resume.ResumeBaseRecListHandler;
|
|
|
+import org.apache.log4j.Logger;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.util.*;
|
|
|
+
|
|
|
+public class ResumeBaseRecListExHandler extends ResumeBaseRecListHandler {
|
|
|
+ private static Logger logger = Logger.getLogger(ResumeBaseRecListExHandler.class);
|
|
|
+
|
|
|
+ protected void afterGetListData(HttpServletRequest request, HttpServletResponse response, GridDataEntity gridDataEntity) throws SHRWebException {
|
|
|
+ super.afterGetListData(request, response, gridDataEntity);
|
|
|
+ Context ctx = SHRContext.getInstance().getContext();
|
|
|
+ List<HashMap<String, Object>> rows = gridDataEntity.getRows();
|
|
|
+ IEducationExpREC iEducationExpREC = null;
|
|
|
+ try {
|
|
|
+ iEducationExpREC = EducationExpRECFactory.getLocalInstance(ctx);
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ for (int i = 0; i < rows.size(); i++) {
|
|
|
+ String resumeId = rows.get(i).get("id").toString();
|
|
|
+ EducationExpRECCollection eduColl = iEducationExpREC.getEducationExpRECCollection("select diplomaModality.*,dateEnd where resumeBase = '" + resumeId + "' order by dateStart desc,degreeF7.LevelCode desc");
|
|
|
+ if (eduColl != null && eduColl.size() > 0) {
|
|
|
+ EducationExpRECInfo edu = eduColl.get(0);
|
|
|
+ rows.get(i).put("diplomaModality",edu.getDiplomaModality()==null?"":edu.getDiplomaModality().getName());
|
|
|
+ rows.get(i).put("dateEnd",sdf.format(edu.getDateEnd()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (BOSException e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void afterGetExportData(HttpServletRequest request, HttpServletResponse response, List listData) {
|
|
|
+ List<HashMap<String, Object>> rows = (List<HashMap<String, Object>>)listData;
|
|
|
+ Context ctx = SHRContext.getInstance().getContext();
|
|
|
+ IEducationExpREC iEducationExpREC = null;
|
|
|
+ try {
|
|
|
+ iEducationExpREC = EducationExpRECFactory.getLocalInstance(ctx);
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ for (int i = 0; i < rows.size(); i++) {
|
|
|
+ String resumeId = rows.get(i).get("id").toString();
|
|
|
+ EducationExpRECCollection eduColl = iEducationExpREC.getEducationExpRECCollection("select diplomaModality.*,dateEnd where resumeBase = '" + resumeId + "' order by dateStart desc,degreeF7.LevelCode desc");
|
|
|
+ if (eduColl != null && eduColl.size() > 0) {
|
|
|
+ EducationExpRECInfo edu = eduColl.get(0);
|
|
|
+ rows.get(i).put("diplomaModality",edu.getDiplomaModality()==null?"":edu.getDiplomaModality().getName());
|
|
|
+ rows.get(i).put("dateEnd",sdf.format(edu.getDateEnd()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (BOSException e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
+ super.afterGetExportData(request, response, listData);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|