OrgUnitListHandlerEx.java 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. package com.kingdee.eas.custom.synctask.handler;
  2. import com.kingdee.bos.BOSException;
  3. import com.kingdee.bos.Context;
  4. import com.kingdee.eas.custom.synctask.utils.SynctaskUtils;
  5. import com.kingdee.eas.hr.org.web.handler.OrgUnitListHandler;
  6. import com.kingdee.shr.base.syssetting.context.SHRContext;
  7. import com.kingdee.shr.base.syssetting.exception.SHRWebException;
  8. import com.kingdee.shr.base.syssetting.exception.ShrWebBizException;
  9. import com.kingdee.util.StringUtils;
  10. import org.apache.log4j.Logger;
  11. import org.springframework.ui.ModelMap;
  12. import javax.servlet.http.HttpServletRequest;
  13. import javax.servlet.http.HttpServletResponse;
  14. /**
  15. * @author qingwu
  16. * @date 2024/10/21
  17. * @apiNote
  18. */
  19. public class OrgUnitListHandlerEx extends OrgUnitListHandler {
  20. Logger logger = Logger.getLogger("com.kingdee.eas.custom.synctask.handler.OrgUnitListHandlerEx");
  21. private Context ctx = SHRContext.getInstance().getContext();
  22. public void syncOrgUnitToOAAction(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap) throws SHRWebException {
  23. String billIds = request.getParameter("billIds");
  24. try {
  25. SynctaskUtils synctaskUtils = new SynctaskUtils();
  26. synctaskUtils._syncOrgUnitToOA(ctx, billIds == "" ? null : billIds, null);
  27. } catch (Exception e) {
  28. e.printStackTrace();
  29. throw new RuntimeException(e);
  30. }
  31. }
  32. }