Beispiel #1
0
        /// <summary>
        /// 绑定预约专员
        /// </summary>
        /// <param name="userList"></param>
        /// <param name="wctInfo"></param>
        /// <param name="usrJob"></param>
        /// <returns></returns>
        public static SysUsrMstr GetAptUser(List <SysUsrMstr> userList, SysUsrWct wctInfo, string usrJob)
        {
            var list = userList.Where(c => c.USR_JOB == usrJob).ToList();

            if (list.Count == 0)
            {
                return(null);
            }
            Random     random   = new Random();
            int        i        = random.Next(list.Count);
            SysUsrMstr userInfo = list[i];

            return(userInfo);
        }
Beispiel #2
0
 /// <summary>
 /// 转换为数据传输对象
 /// </summary>
 /// <param name="entity">实体</param>
 public static SysUsrWctDto ToDto(this SysUsrWct entity)
 {
     if (entity == null)
     {
         return(new SysUsrWctDto());
     }
     return(new SysUsrWctDto {
         Id = entity.Id,
         BU_NO = entity.BU_NO,
         USR_ID = entity.USR_ID,
         OPEN_ID = entity.OPEN_ID,
         CUS_SVC_CODE = entity.CUS_SVC_CODE,
         FOLLOW_STATUS = entity.FOLLOW_STATUS,
         USR_SOURCE = entity.USR_SOURCE,
         REG_DATE = entity.REG_DATE,
         REFEREE_USR_ID = entity.REFEREE_USR_ID,
         CREATE_PSN = entity.CREATE_PSN,
         CREATE_DATE = entity.CREATE_DATE,
         UPDATE_PSN = entity.UPDATE_PSN,
         UPDATE_DATE = entity.UPDATE_DATE,
         CREATE_ORG_NO = entity.CREATE_ORG_NO,
         UDF1 = entity.UDF1,
         UDF2 = entity.UDF2,
         UDF3 = entity.UDF3,
         UDF4 = entity.UDF4,
         UDF5 = entity.UDF5,
         UDF6 = entity.UDF6,
         UDF7 = entity.UDF7,
         UDF8 = entity.UDF8,
         UDF9 = entity.UDF9,
         UDF10 = entity.UDF10,
         DEL_FLAG = entity.DEL_FLAG,
         WX_AVATAR_URL = entity.WX_AVATAR_URL,
         APP_ID = entity.APP_ID,
         TAG_NAME = entity.TAG_NAME,
         TICKET = entity.TICKET,
         BG_NO = entity.BG_NO,
         AFTER_SALE_CODE = entity.AFTER_SALE_CODE
     });
 }