示例#1
0
文件: APIOp.cs 项目: sky-tc/U8
        /// <summary>
        /// 组织数据
        /// </summary>
        /// <param name="dt">当前任务节点信息</param>
        /// <param name="bd">HY_DZ_K7_DLLReflect 中预置的 data类</param>
        /// <returns></returns>
        public override Model.DealResult MakeData(Model.Synergismlogdt dt, BaseData bd)
        {
            Model.DealResult dr      = new Model.DealResult();
            Model.APIData    apidata = bd as Model.APIData;      //API实体,包括当前任务节点信息
            DAL.TaskLogFactory.ITaskLogDetail dtdal;

            //当前任务节点信息
            switch (apidata.TaskType)
            {
            case 0:
                dtdal = new DAL.TaskLogFactory.CQ.TaskDetail();
                break;

            case 1:
                dtdal = new DAL.SynergismLogDt();
                break;

            case 2:
                dtdal = new DAL.TaskLogFactory.DS.TaskDetail();
                break;

            default:
                BLL.Common.ErrorMsg(SysInfo.productName, "tasktype" + apidata.TaskType + "未适配!");
                dr.Message = "tasktype" + apidata.TaskType + "未适配!";
                return(dr);
            }

            Model.Synergismlogdt pdt = dtdal.GetPrevious(dt);  //上一任务节点信息

            apidata.ConnectInfo    = dtdal.GetConnectInfo(dt); //获取当前结点的数据串连接串
            apidata.Synergismlogdt = dt;

            if (!apidata.Dodelete)
            {
                DataSet rdds  = SetFromTabet(dt, pdt, apidata);                                          //上一节点 单据头信息
                DataSet rdsds = SetFromTabets(dt, pdt, apidata);                                         //上一节点 单据体信息

                DAL.IFieldcmps         fieldcmpdal    = ClassFactory.GetIFieldcmpsDAL(apidata.TaskType); //new DAL.Fieldcmps();
                List <Model.Fieldcmps> listfd         = fieldcmpdal.GetListFieldcmps(dt, pdt);           //字段对照信息
                BLL.U8NameValue        u8namevaluebll = new BLL.U8NameValue();                           //字段赋值
                u8namevaluebll.SetHeadData(apidata, rdds, rdsds, listfd, dt);
                u8namevaluebll.SetBodyData(apidata, rdds, rdsds, listfd, dt);

                //设置订单关联
                DAL.Common.SetInBody(apidata);
                SetNormalValue(apidata, dt);
            }
            return(dr);
        }
示例#2
0
        /// <summary>
        /// 任务detail DAL 工厂
        /// </summary>
        /// <param name="tasktype"></param>
        /// <returns></returns>
        public static DAL.TaskLogFactory.ITaskLogDetail GetITaskLogDetailDAL(int tasktype)
        {
            DAL.TaskLogFactory.ITaskLogDetail logdtDAL;
            switch (tasktype)
            {
            case 0:
                logdtDAL = new DAL.TaskLogFactory.CQ.TaskDetail();
                break;

            case 1:
                logdtDAL = new DAL.SynergismLogDt();
                break;

            case 2:
                logdtDAL = new DAL.TaskLogFactory.DS.TaskDetail();
                break;

            default:
                BLL.Common.ErrorMsg(SysInfo.productName, "tasktype" + tasktype + "未适配!");
                return(null);
            }

            return(logdtDAL);
        }