Prechádzať zdrojové kódy

提交offer同步北森状态

Heyuan 2 týždňov pred
rodič
commit
f46d2d2496

+ 63 - 3
websrc/com/kingdee/shr/recuritment/web/handler/OfferListHandlerEx.java

@@ -18,6 +18,40 @@ import javax.servlet.http.HttpServletResponse;
  * @Created by Heyuan
  */
 public class OfferListHandlerEx extends OfferListHandler {
+    private Context ctx = SHRContext.getInstance().getContext();
+
+    /**
+     * 终止入职
+     *
+     * @param request
+     * @param response
+     * @param modelMap
+     * @throws SHRWebException
+     */
+    public void executeSyncBeisenAction(
+            HttpServletRequest request,
+            HttpServletResponse response,
+            ModelMap modelMap
+    ) throws SHRWebException {
+        String billIds = this.getBillId(request);
+        if (org.apache.commons.lang3.StringUtils.isEmpty(billIds)) {
+            throw new ShrWebBizException("单据id不能为空!");
+        } else if (billIds.split(",").length > 1) {
+            throw new ShrWebBizException("只能选中单行!");
+        }
+        try {
+            if (!StringUtils.isEmpty(billIds)) {
+                //同步录用报批状态至北森
+                IBeisenTransferPhaseFacade iBeisenTransferPhaseFacade =
+                        BeisenTransferPhaseFacadeFactory.getLocalInstance(ctx);
+                iBeisenTransferPhaseFacade.syncOfferToBeisen(billIds, 0);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new ShrWebBizException(e);
+        }
+    }
+
     /**
      * 终止入职
      *
@@ -33,7 +67,35 @@ public class OfferListHandlerEx extends OfferListHandler {
             ModelMap modelMap
     ) throws SHRWebException {
         super.stopOfferAction(request, response, modelMap);
-        Context ctx = SHRContext.getInstance().getContext();
+        String billIds = request.getParameter("billId");
+        try {
+            if (!StringUtils.isEmpty(billIds)) {
+                //同步录用报批状态至北森
+                IBeisenTransferPhaseFacade iBeisenTransferPhaseFacade =
+                        BeisenTransferPhaseFacadeFactory.getLocalInstance(ctx);
+                iBeisenTransferPhaseFacade.syncOfferToBeisen(billIds, 0);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new ShrWebBizException(e);
+        }
+    }
+
+    /**
+     * 转标准预备入职
+     *
+     * @param request
+     * @param response
+     * @param modelMap
+     * @throws SHRWebException
+     */
+    @Override
+    public void toPrePersonAction(
+            HttpServletRequest request,
+            HttpServletResponse response,
+            ModelMap modelMap
+    ) throws SHRWebException {
+        super.toPrePersonAction(request, response, modelMap);
         String billIds = request.getParameter("billId");
         try {
             if (!StringUtils.isEmpty(billIds)) {
@@ -63,7 +125,6 @@ public class OfferListHandlerEx extends OfferListHandler {
             ModelMap modelMap
     ) throws SHRWebException {
         super.noStopOfferAction(request, response, modelMap);
-        Context ctx = SHRContext.getInstance().getContext();
         String billIds = request.getParameter("billId");
         try {
             if (!StringUtils.isEmpty(billIds)) {
@@ -93,7 +154,6 @@ public class OfferListHandlerEx extends OfferListHandler {
             ModelMap modelMap
     ) throws SHRWebException {
         super.abondonEntryAction(request, response, modelMap);
-        Context ctx = SHRContext.getInstance().getContext();
         String billIds = request.getParameter("billId");
         try {
             if (!StringUtils.isEmpty(billIds)) {

+ 32 - 0
websrc/com/kingdee/shr/recuritment/web/handler/recApproval/RecApprovalListHandlerEx.java

@@ -22,6 +22,38 @@ import javax.servlet.http.HttpServletResponse;
 public class RecApprovalListHandlerEx extends RecApprovalListHandler {
     private Context ctx = SHRContext.getInstance().getContext();
 
+    /**
+     * 终止入职
+     *
+     * @param request
+     * @param response
+     * @param modelMap
+     * @throws SHRWebException
+     */
+    public void executeSyncBeisenAction(
+            HttpServletRequest request,
+            HttpServletResponse response,
+            ModelMap modelMap
+    ) throws SHRWebException {
+        String billIds = this.getBillId(request);
+        if (StringUtils.isEmpty(billIds)) {
+            throw new ShrWebBizException("单据id不能为空!");
+        } else if (billIds.split(",").length > 1) {
+            throw new ShrWebBizException("只能选中单行!");
+        }
+        try {
+            if (!com.kingdee.util.StringUtils.isEmpty(billIds)) {
+                //同步录用报批状态至北森
+                IBeisenTransferPhaseFacade iBeisenTransferPhaseFacade =
+                        BeisenTransferPhaseFacadeFactory.getLocalInstance(ctx);
+                iBeisenTransferPhaseFacade.syncRecApprovalToBeisen(billIds, 0);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new ShrWebBizException(e);
+        }
+    }
+
     /**
      * 终止报批
      *