package weaver.interfaces.htsc.cooperation.task;


import com.engine.htsc.collaboration.service.TaskLogService;
import weaver.conn.RecordSet;
import weaver.formmode.customjavacode.AbstractModeExpandJavaCodeNew;
import weaver.general.BaseBean;
import weaver.general.Util;
import weaver.hrm.User;
import weaver.interfaces.htsc.GlobatTools.Smstools;
import weaver.interfaces.htsc.comInfo.PropBean;
import weaver.soa.workflow.request.RequestInfo;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

public class TaskRelese  extends AbstractModeExpandJavaCodeNew {
    /**
     * 执行模块扩展动作
     * @param param
     *  param包含(但不限于)以下数据
     *  user 当前用户
     *  importtype 导入方式(仅在批量导入的接口动作会传输) 1 追加，2覆盖,3更新，获取方式(int)param.get("importtype")
     *  导入链接中拼接的特殊参数(仅在批量导入的接口动作会传输)，比如a=1，可通过param.get("a")获取参数值
     *  页面链接拼接的参数，比如b=2,可以通过param.get("b")来获取参数
     * @return
     */
    public Map<String, String> doModeExpand(Map<String, Object> param) {
        Map<String, String> result = new HashMap<String, String>();
        RecordSet rs = new RecordSet();
        BaseBean beanBean = new BaseBean();
        TaskTools taskTools=new TaskTools();
        result=taskTools.ToSmsUser(param);
        return result;
    }



    public String sqlmaintableid(int billid){
        RecordSet rs = new RecordSet();
        BaseBean beanBean = new BaseBean();
        String mainid="";

        String sql=" select  xzsy from uf_rw where id="+billid;
        beanBean.writeLog("协作根据任务查询主表id："+sql);
        rs.execute(sql);
        if(rs.next()){
            mainid=rs.getString("xzsy");
        }
        return mainid;
    }


    public String getarray(String jbr,String gzr){
        String rylist="";
        if(jbr==""&&gzr==""){
            return rylist;
        }else if(jbr==""&&gzr!=""){
            rylist=gzr;
        }else if(jbr!=""&&gzr==""){
            rylist=jbr;
        }else{
            rylist=jbr+","+gzr;
        }
        return rylist;
    }


}
