ContractCompositionQueryHandlerEx.java 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package com.kingdee.eas.custom.esign.contract;
  2. import com.alibaba.fastjson.JSONObject;
  3. import com.kingdee.bos.BOSException;
  4. import com.kingdee.bos.Context;
  5. import com.kingdee.eas.common.EASBizException;
  6. import com.kingdee.shr.base.syssetting.MSFServiceFacadeFactory;
  7. import com.kingdee.shr.base.syssetting.context.SHRContext;
  8. import com.kingdee.shr.base.syssetting.exception.SHRWebException;
  9. import com.kingdee.shr.base.syssetting.web.json.JSONUtils;
  10. import com.kingdee.shr.batchContract.web.handler.ContractCompositionQueryHandler;
  11. import org.springframework.ui.ModelMap;
  12. import javax.servlet.http.HttpServletRequest;
  13. import javax.servlet.http.HttpServletResponse;
  14. import java.util.HashMap;
  15. import java.util.Map;
  16. public class ContractCompositionQueryHandlerEx extends ContractCompositionQueryHandler {
  17. public String getTableDataAction(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap) throws SHRWebException {
  18. Context ctx = SHRContext.getInstance().getContext();
  19. String id = request.getParameter("id");
  20. String number = request.getParameter("number");
  21. try {
  22. Map<String,Object> getSqlServiceMap = new HashMap<String,Object>();
  23. getSqlServiceMap.put("number",number);
  24. getSqlServiceMap.put("filter"," where \"employeeContract\".FID = '"+id+"'");
  25. JSONObject jsonObject = new JSONObject();
  26. jsonObject.put("id",id);
  27. getSqlServiceMap.put("otherParameters",jsonObject);
  28. Object o2 = MSFServiceFacadeFactory.getLocalInstance(ctx)
  29. .processService("getESignConfigTableService", getSqlServiceMap);
  30. Map<String,Object> map = new HashMap<String,Object>();
  31. map.put("code",200);
  32. map.put("data",o2);
  33. JSONUtils.SUCCESS(map);
  34. } catch (BOSException e) {
  35. throw new RuntimeException(e);
  36. } catch (EASBizException e) {
  37. throw new RuntimeException(e);
  38. }
  39. return null;
  40. }
  41. }