Beispiel #1
0
        public void CopyFrom(RefundTask src)
        {
            if (src == null)
            {
                return;
            }
            TaskID        = src.TaskID;
            RefundTradeID = src.RefundTradeID;
            TechnicianID  = src.TechnicianID;
            CustomerID    = src.CustomerID;
            OperatorID    = src.OperatorID;

            RefundType = src.RefundType;
            TaskState  = src.TaskState;

            TIDTestingToken = src.TIDTestingToken;

            Feedback = src.Feedback;
            Remark   = src.Remark;

            EnableRefund = src.EnableRefund;
            Auditing     = src.Auditing;

            CreatTime  = src.CreatTime;
            FinishTime = src.FinishTime;
        }
        /// <summary>
        /// 获取文件名
        /// 根据任务类型和对应的参数
        /// </summary>
        /// <param name="type"></param>
        /// <param name="refundtaskinfo"></param>
        /// <param name="resultinfo"></param>
        /// <param name="isResultFile">true-结果文件名,false-任务文件名</param>
        /// <returns></returns>
        private static String GetFileName(eTaskType type,
                                          RefundTask refundtaskinfo, MeterDisassemblyTaskBase resultinfo, Boolean isResultFile = true)
        {
            List <String> namelist = new List <string> {
            };

            String str = String.Empty;

            //先根据任务类型
            switch (type)
            {
            case eTaskType.CloseCustomer:
                str = (isResultFile) ? Const_TaskFileResultName_CancelAccountResult : Const_TaskFileName_CancelAccountTask;
                break;

            case eTaskType.Refund:
                str = (isResultFile) ? Const_TaskFileResultName_RefundResult : Const_TaskFileName_RefundTask;
                break;

            case eTaskType.ReplaceMeter:
                str = (isResultFile) ? Const_TaskFileResultName_ReplaceMeterResult : Const_TaskFileName_ReplaceMeterTask;
                break;

            default:
                return(null);
            }
            namelist.Add(str);

            if (type == eTaskType.Refund)
            {
                if (refundtaskinfo == null)
                {
                    return(null);
                }
                //获取 TechnicianID
                namelist.Add(refundtaskinfo.TechnicianID.ToString());
                //获取 TaskID
                namelist.Add(refundtaskinfo.TaskID.ToString());
            }
            else
            {
                if (resultinfo == null)
                {
                    return(null);
                }
                //获取 TechnicianID
                namelist.Add(resultinfo.TechnicianID.ToString());
                //获取 TaskID
                namelist.Add(resultinfo.TaskID.ToString());
            }
            String reslutfilename = DataFormatProcessor.ListToString(namelist, "_");

            reslutfilename = reslutfilename + ".bin";
            return(reslutfilename);
        }