示例#1
0
        /// <summary>
        /// 设置交易记录的共通字段
        /// </summary>
        /// <param name="dailyRecord"></param>
        /// <param name="recordImportOperationInfo"></param>
        public static void SetTradeRecordCommonFields(this DailyRecord dailyRecord, RecordImportOperationEntity recordImportOperationInfo)
        {
            if (dailyRecord == null)
            {
                throw new ArgumentNullException(nameof(dailyRecord));
            }

            if (recordImportOperationInfo == null)
            {
                throw new ArgumentNullException(nameof(recordImportOperationInfo));
            }

            dailyRecord.DataType     = (int)recordImportOperationInfo.DataType;
            dailyRecord.AccountId    = recordImportOperationInfo.AccountId;
            dailyRecord.OperatorCode = recordImportOperationInfo.OperatorCode;
            dailyRecord.ImportUser   = recordImportOperationInfo.ImportUserCode;
            dailyRecord.ImportTime   = recordImportOperationInfo.ImportTime;
            dailyRecord.UpdateUser   = recordImportOperationInfo.ImportUserCode;
            dailyRecord.UpdateTime   = recordImportOperationInfo.ImportTime;
            if (recordImportOperationInfo.TradeDate.HasValue)
            {
                dailyRecord.TradeDate = recordImportOperationInfo.TradeDate.Value;
            }
        }
示例#2
0
        /// <summary>
        /// 设置交易记录的共通字段
        /// </summary>
        /// <param name="deliveryRecord"></param>
        /// <param name="recordImportOperationInfo"></param>
        public static void SetTradeRecordCommonFields(this DeliveryRecord deliveryRecord, RecordImportOperationEntity recordImportOperationInfo)
        {
            if (deliveryRecord == null)
            {
                throw new ArgumentNullException(nameof(deliveryRecord));
            }

            if (recordImportOperationInfo == null)
            {
                throw new ArgumentNullException(nameof(recordImportOperationInfo));
            }

            deliveryRecord.DataType   = (int)recordImportOperationInfo.DataType;
            deliveryRecord.AccountId  = recordImportOperationInfo.AccountId;
            deliveryRecord.ImportUser = recordImportOperationInfo.ImportUserCode;
            deliveryRecord.ImportTime = recordImportOperationInfo.ImportTime;
            deliveryRecord.UpdateUser = recordImportOperationInfo.ImportUserCode;
            deliveryRecord.UpdateTime = recordImportOperationInfo.ImportTime;
        }