Exemple #1
0
        /// <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.CQ.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);
        }
Exemple #2
0
        /// <summary>
        /// 重做
        /// </summary>
        /// <param name="autoid"></param>
        /// <param name="id"></param>
        public void ReDo(string autoid, string id)
        {
            DAL.SynergismLogDt   dal = new DAL.SynergismLogDt();
            Model.Synergismlogdt dt  = dal.GetModel(autoid);
            dt.Cstatus    = Constant.SynergisnLogDT_Cstatus_NoDeal;
            dt.Cerrordesc = string.Empty;

            //如果有单号,先删除再重发
            if (string.IsNullOrEmpty(dt.Cvoucherno))
            {
                DeleteSyncDt(1, autoid, id);
            }

            dal.Update(dt);
            DAL.SynergismLog   logdal = new DAL.SynergismLog();
            Model.Synergismlog log    = logdal.GetModel(id);
            log.Cstatus = Constant.SynerginsLog_Cstatus_Dealing;
            logdal.Update(log);
        }
Exemple #3
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);
        }