package weaver.interfaces.htsc.lhhtsq;

import com.engine.common.util.ServiceUtil;
import com.engine.htsc.lhhtsq.Serivce.LhhtEndToOldDataService;
import com.engine.htsc.lhhtsq.Serivce.impl.LhhtEndToOldDataServiceImpl;
import com.weaver.general.BaseBean;
import weaver.general.Util;
import weaver.interfaces.htsc.GlobatTools.JAVATools;
import weaver.interfaces.htsc.comInfo.PropBean;
import weaver.interfaces.workflow.action.Action;
import weaver.soa.workflow.request.RequestInfo;

import java.util.HashMap;
import java.util.Map;

/**
 * @author xf
 * @version 1.0.0
 * @ClassName LhhtDataToOldaction.java
 * @createTime 2021年12月15日 14:57:00
 */
public class LhhtDataToOldaction extends BaseBean implements Action {

    @Override
    public String execute(RequestInfo requestInfo) {
      try {
          String requestid = Util.null2String(requestInfo.getRequestid());
          String talbename = Util.null2String(requestInfo.getRequestManager().getBillTableName());
          String title = Util.null2String(requestInfo.getRequestManager().getRequestname());

          Map<String, Object> map = new HashMap<>();
          map.put("requestid", requestid);
          map.put("tablename", talbename);
          map.put("title", title);
          LhhtEndToOldDataService lhhtEndToOldDataService = ServiceUtil.getService(LhhtEndToOldDataServiceImpl.class);
          lhhtEndToOldDataService.innerttodata(map);
      }catch (Exception e){
          JAVATools.SetCmdwritelog("调用老oa失败",e.getMessage());
      }finally {

      }
        return Action.SUCCESS;
    }



}
