| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- package com.kingdee.eas.custom.ot.handler;
- import com.kingdee.bos.Context;
- import com.kingdee.eas.custom.ot.util.OverTimeAgainstApproveUtil;
- import com.kingdee.shr.ats.web.handler.AtsOverTimeBillBatchEditHandler;
- import com.kingdee.shr.base.syssetting.context.SHRContext;
- import com.kingdee.shr.base.syssetting.exception.SHRWebException;
- import org.springframework.ui.ModelMap;
- import javax.servlet.http.HttpServletRequest;
- import javax.servlet.http.HttpServletResponse;
- import java.util.Map;
- /**
- * 多人加班单审核通过的单据分录,删除、变更实现
- * @author lhbj
- */
- public class AtsOverTimeBillBatchEditHandlerEx extends AtsOverTimeBillBatchEditHandler {
- /**
- * 核通过的单据分录删除
- * @param request
- * @param response
- * @param modelMap
- * @return
- * @throws SHRWebException
- */
- public String deleteOTEntryAction(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap) throws SHRWebException {
- try {
- Context ctx = SHRContext.getInstance().getContext();
- String billid = this.getBillId(request);
- String entryId = request.getParameter("entryId");
- OverTimeAgainstApproveUtil u = new OverTimeAgainstApproveUtil();
- Map<String, Object> map = u.deleteOTEntry(ctx, billid, entryId);
- System.out.println("deleteOTEntryAction:"+map);
- this.writeSuccessData(map);
- }catch (Exception e){
- e.printStackTrace();
- throw new SHRWebException(e);
- }
- return null;
- }
- /**
- * 核通过的单据分录变更
- * @param request
- * @param response
- * @param modelMap
- * @return
- * @throws SHRWebException
- */
- public String changeOTEntryAction(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap) throws SHRWebException {
- try {
- Context ctx = SHRContext.getInstance().getContext();
- String billid = this.getBillId(request);
- String entryId = request.getParameter("entryId");
- OverTimeAgainstApproveUtil u = new OverTimeAgainstApproveUtil();
- Map<String, Object> map = u.changeOTEntry(ctx, billid, entryId);
- this.writeSuccessData(map);
- }catch (Exception e){
- e.printStackTrace();
- throw new SHRWebException(e);
- }
- return null;
- }
- /**
- * 取消核通过的单据分录变更
- * @param request
- * @param response
- * @param modelMap
- * @return
- * @throws SHRWebException
- */
- public String unChangeOTEntryAction(HttpServletRequest request, HttpServletResponse response, ModelMap modelMap) throws SHRWebException {
- try {
- Context ctx = SHRContext.getInstance().getContext();
- String billid = this.getBillId(request);
- String entryId = request.getParameter("entryId");
- OverTimeAgainstApproveUtil u = new OverTimeAgainstApproveUtil();
- Map<String, Object> map = u.unChangeOTEntry(ctx, billid, entryId);
- this.writeSuccessData(map);
- }catch (Exception e){
- e.printStackTrace();
- throw new SHRWebException(e);
- }
- return null;
- }
- }
|