Exemplo n.º 1
0
        public DTOResponse InsertTaskStat(INF_JOBFEEDBACKEntity jobFeedBack)
        {
            DTOResponse dtoResponse = new DTOResponse();

            try
            {
                TaskStatEntity projTaskstatEntity = new TaskStatEntity();
                projTaskstatEntity.TASKNO        = jobFeedBack.JOBID;
                projTaskstatEntity.STATITEMNAME  = jobFeedBack.FEEDBACKSTATUS;
                projTaskstatEntity.STATITEMDESC  = jobFeedBack.FEEDBACKSTATUS;
                projTaskstatEntity.STATITEMVALUE = "0";
                projTaskstatEntity.CREATETIME    = Utils.GetDatetime();
                projTaskstatEntity.P01           = jobFeedBack.ENTERDATE;
                projTaskstatEntity.P02           = Utils.GetDatetime();
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                    dbConn.Save <TaskStatEntity>(projTaskstatEntity, false);
                dtoResponse.IsSuccess   = true;
                dtoResponse.MessageText = "保存 PROJ_TASKSTAT成功!";
                DCSInfService.logger.Info((object)dtoResponse);
                return(dtoResponse);
            }
            catch (Exception ex)
            {
                dtoResponse.IsSuccess   = false;
                dtoResponse.MessageText = ex.Message;
                DCSInfService.logger.Error((object)ex);
                return(dtoResponse);
            }
        }
Exemplo n.º 2
0
        public DTOResponse GetList(LocationStnRequest request)
        {
            DTOResponse dtoResponse = new DTOResponse();

            try
            {
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    SqlExpression <LocStationInfoEntity> expression = dbConn.From <LocStationInfoEntity>();
                    if (!string.IsNullOrEmpty(request.STATIONTYPE) && request.STATIONTYPE != "0")
                    {
                        expression.And(x => x.STATIONTYPE == request.STATIONTYPE);
                    }

                    if (!string.IsNullOrEmpty(request.TECHNO) && request.TECHNO != "000")
                    {
                        expression.And(x => x.TECHNO == request.TECHNO);
                    }

                    List <LocStationInfoEntity> list = dbConn.Select <LocStationInfoEntity>(expression).OrderBy <LocStationInfoEntity, string>((Func <LocStationInfoEntity, string>)(x => x.ID)).ToList <LocStationInfoEntity>();

                    dtoResponse.ResultObject = (object)list;
                    dtoResponse.IsSuccess    = true;
                    dtoResponse.MessageText  = "查询操作成功!";
                }
            }
            catch (Exception ex)
            {
                dtoResponse.IsSuccess   = false;
                dtoResponse.MessageText = ex.Message;
                logger.Error((object)ex);
            }
            return(dtoResponse);
        }
Exemplo n.º 3
0
        public static bool CheckSysScenceOrderDcsState()
        {
            bool ifOrder = false;

            try
            {
                SysSceneEntity sysScene = null;
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    sysScene = dbConn.Select <SysSceneEntity>(x => x.SCENESTATE == "1").FirstOrDefault();
                }
                if (sysScene != null)
                {
                    if (sysScene.ORDERDCSSTATE == 1)
                    {
                        ifOrder = true;
                    }
                }
                return(ifOrder);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 4
0
        public DTOResponse OrderSenceMode(SceneRequest request)
        {
            DTOResponse dtoResponse = new DTOResponse();

            try
            {
                using (IDbConnection dbConnection = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    using (IDbTransaction trans = dbConnection.OpenTransaction())
                    {
                        dtoResponse = this.OrderSenceMode(request, dbConnection, trans);
                        if (dtoResponse.IsSuccess)
                        {
                            trans.Commit();
                        }
                        else
                        {
                            trans.Rollback();
                        }
                        SysSceneService.logger.Info((object)dtoResponse.ToString());
                        return(dtoResponse);
                    }
                }
            }
            catch (Exception ex)
            {
                dtoResponse.IsSuccess   = false;
                dtoResponse.MessageText = ex.Message;
                SysSceneService.logger.Error((object)ex);
                return(dtoResponse);
            }
        }
Exemplo n.º 5
0
        public DTOResponse SaveEntity(SceneRequest request)
        {
            DTOResponse dtoResponse = new DTOResponse();

            try
            {
                SysSceneEntity uldScene = JsonSerializer.DeserializeFromString <SysSceneEntity>(request.PostData);
                if (request.PostData == null)
                {
                    dtoResponse.IsSuccess   = false;
                    dtoResponse.MessageText = "传入的数据为空!";
                    return(dtoResponse);
                }
                int num = 0;
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                    num = dbConn.Update <SysSceneEntity>(uldScene, (Action <IDbCommand>)null);
                dtoResponse.IsSuccess   = true;
                dtoResponse.MessageText = "保存数据操作成功!" + num.ToString();
                return(dtoResponse);
            }
            catch (Exception ex)
            {
                dtoResponse.IsSuccess   = false;
                dtoResponse.MessageText = ex.Message;
                SysSceneService.logger.Error((object)ex);
                return(dtoResponse);
            }
        }
Exemplo n.º 6
0
        public DTOResponse GetList(MsgRequest request)
        {
            DTOResponse dtoResponse = new DTOResponse();

            try
            {
                string   str1 = (string)null;
                string   str2 = (string)null;
                DateTime dt1;
                DateTime dt2;
                if (!string.IsNullOrEmpty(request.datetimerange) && request.datetimerange.Length > 10)
                {
                    string s1 = request.datetimerange.Substring(0, 10);
                    string s2 = request.datetimerange.Substring(13, 10);
                    DateTime.TryParse(s1, out dt1);
                    DateTime.TryParse(s2, out dt2);
                    str1 = dt1.ToString("yyyy-MM-dd HH:mm:ss");
                    str2 = dt2.ToString("yyyy-MM-dd HH:mm:ss");
                }
                else
                {
                    DateTime today = DateTime.Today;
                    dt1   = today.AddDays(-7.0);
                    today = DateTime.Today;
                    dt2   = today.AddDays(1.0);
                    str1  = dt1.ToString("yyyy-MM-dd HH:mm:ss");
                    str2  = dt2.ToString("yyyy-MM-dd HH:mm:ss");
                }
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    SqlExpression <SysAlterInfoEntity> expression = dbConn.From <SysAlterInfoEntity>();
                    expression.And((Expression <Func <SysAlterInfoEntity, bool> >)(x => x.CREATEDATETIME >= dt1 && x.CREATEDATETIME <= dt2));
                    if (!string.IsNullOrEmpty(request.MSGTEXT))
                    {
                        expression.And((Expression <Func <SysAlterInfoEntity, bool> >)(x => x.MSGTEXT.Contains(request.MSGTEXT)));
                    }
                    if (!string.IsNullOrEmpty(request.MSGTYPE) && request.MSGTYPE != "0")
                    {
                        expression.And((Expression <Func <SysAlterInfoEntity, bool> >)(x => x.MSGTYPE == request.MSGTYPE));
                    }
                    if (!string.IsNullOrEmpty(request.MSGSTATE))
                    {
                        expression.And((Expression <Func <SysAlterInfoEntity, bool> >)(x => x.MSGSTATE == request.MSGSTATE));
                    }
                    long num = dbConn.Count <SysAlterInfoEntity>(expression);
                    List <SysAlterInfoEntity> list = dbConn.Select <SysAlterInfoEntity>(expression).OrderByDescending <SysAlterInfoEntity, long>((Func <SysAlterInfoEntity, long>)(x => x.ID)).ToList <SysAlterInfoEntity>().Skip <SysAlterInfoEntity>((request.page - 1) * request.limit).Take <SysAlterInfoEntity>(request.limit).ToList <SysAlterInfoEntity>();
                    dtoResponse.TotalCount   = num;
                    dtoResponse.ResultObject = (object)list;
                    dtoResponse.IsSuccess    = true;
                    dtoResponse.MessageText  = "查询操作成功!";
                }
            }
            catch (Exception ex)
            {
                dtoResponse.IsSuccess   = false;
                dtoResponse.MessageText = ex.Message;
                MsgService.logger.Error((object)ex);
            }
            return(dtoResponse);
        }
Exemplo n.º 7
0
        public DTOResponse SaveSysparams(BasicRequest request)
        {
            DTOResponse dtoResponse = new DTOResponse();

            try
            {
                SysParams entity = HelperSerializer.GetObjectFromJsonString <SysParams>(request.PostData);
                if (entity == null)
                {
                    throw new Exception("传入的参数无法解析!");
                }

                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    SqlExpression <SysParams> expression1 = dbConn.From <SysParams>();
                    expression1.Where(x => x.ID == entity.ID);
                    expression1.UpdateFields.Add("PARAVALUE");

                    int count1 = dbConn.UpdateOnly <SysParams>(entity, expression1);
                    dtoResponse.TotalCount = count1;
                    dtoResponse.IsSuccess  = count1 == 1 ? true : false;

                    //dtoResponse.IsSuccess = dbConn.Update<SysParams>(entity);
                    dtoResponse.MessageText = "操作完成:" + dtoResponse.IsSuccess;
                    return(dtoResponse);
                }
            }
            catch (Exception ex)
            {
                dtoResponse.IsSuccess   = false;
                dtoResponse.MessageText = ex.Message;
                logger.Error((object)ex);
                return(dtoResponse);
            }
        }
Exemplo n.º 8
0
        public DTOResponse SetP01(LocationStnRequest request)
        {
            DTOResponse dtoResponse = new DTOResponse();

            try
            {
                using (IDbConnection dbConnection = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    using (IDbTransaction trans = dbConnection.OpenTransaction())
                    {
                        request.CONTROLMODE = 1;
                        dtoResponse         = this.SetP01(request, dbConnection, trans);
                        if (dtoResponse.IsSuccess)
                        {
                            trans.Commit();
                        }
                        else
                        {
                            trans.Rollback();
                        }
                        return(dtoResponse);
                    }
                }
            }
            catch (Exception ex)
            {
                dtoResponse.IsSuccess   = false;
                dtoResponse.MessageText = ex.Message;
                logger.Error((object)ex);
                return(dtoResponse);
            }
        }
Exemplo n.º 9
0
        public DTOResponse GetList(PalletRequest request)
        {
            DTOResponse dtoResponse = new DTOResponse();

            try
            {
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    SqlExpression <PalletEntity> expression = dbConn.From <PalletEntity>();

                    if (!string.IsNullOrEmpty(request.STOCKNO))
                    {
                        expression.And(x => x.STOCKNO == request.STOCKNO);
                    }
                    if (!string.IsNullOrEmpty(request.GROUPNO))
                    {
                        expression.And(x => x.GROUPNO == request.GROUPNO);
                    }
                    if (!string.IsNullOrEmpty(request.LOCATIONNO))
                    {
                        expression.And(x => x.LOCATIONNO == request.LOCATIONNO);
                    }
                    if (!string.IsNullOrEmpty(request.PALLETNO))
                    {
                        expression.And(x => x.PALLETNO == request.PALLETNO);
                    }

                    if (!string.IsNullOrEmpty(request.STATE))
                    {
                        expression.And(x => x.STATE == int.Parse(request.STATE));
                    }

                    if (!string.IsNullOrEmpty(request.PLANNO))
                    {
                        expression.And(x => x.PLANNO == request.PLANNO);
                    }

                    long count = dbConn.Count <PalletEntity>(expression);
                    List <PalletEntity> entityList = dbConn.Select <PalletEntity>(expression)
                                                     .OrderBy(x => x.ID)
                                                     .Skip((request.page - 1) * request.limit)
                                                     .Take(request.limit)
                                                     .ToList();
                    dtoResponse.TotalCount   = count;
                    dtoResponse.ResultObject = (object)entityList;
                    dtoResponse.IsSuccess    = true;
                    dtoResponse.MessageText  = "查询操作成功!";
                    return(dtoResponse);
                }
            }
            catch (Exception ex)
            {
                dtoResponse.IsSuccess   = false;
                dtoResponse.MessageText = ex.Message;
                logger.Error((object)ex);
                return(dtoResponse);
            }
        }
Exemplo n.º 10
0
        public DTOResponse GetList <T>(DCSInfRequest request)
        {
            DTOResponse dtoResponse = new DTOResponse();

            try
            {
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    string str1 = typeof(T).Name.Replace("Entity", "");
                    string str2 = "SELECT * FROM " + str1;
                    string str3 = " WHERE 1=1";
                    if (!string.IsNullOrEmpty(request.EQUIPMENTID) && str1 != "INF_JOBFEEDBACK")
                    {
                        str3 += string.Format(" AND EQUIPMENTID='{0}'", (object)request.EQUIPMENTID);
                    }
                    if (!string.IsNullOrEmpty(request.STATUS))
                    {
                        str3 += string.Format(" AND STATUS={0}", (object)request.STATUS);
                    }
                    if (!string.IsNullOrEmpty(request.JOBID))
                    {
                        str3 += string.Format(" AND JOBID='{0}'", (object)request.JOBID);
                    }
                    if (!string.IsNullOrEmpty(request.CREATEDATE))
                    {
                        DateTime dt1;
                        if (DateTime.TryParse(request.CREATEDATE, out dt1))
                        {
                            str3 += string.Format(" AND CREATEDATE LIKE '{0}%'", dt1.ToString("yyyy-MM-dd"));
                        }
                        else
                        {
                            dt1   = System.DateTime.Today;
                            str3 += string.Format(" AND CREATEDATE LIKE '{0}%'", dt1.ToString("yyyy-MM-dd"));
                        }
                    }

                    string str4 = " ORDER BY AUTOID DESC,CREATEDATE DESC";
                    long   num  = dbConn.Count <T>();
                    string sql  = str2 + str3 + str4;
                    DCSInfService.logger.Debug((object)sql);
                    List <T> list = Enumerable.ToList <T>(Enumerable.Take <T>(Enumerable.Skip <T>(dbConn.Select <T>(sql), (request.page - 1) * request.limit), request.limit));
                    dtoResponse.TotalCount   = num;
                    dtoResponse.ResultObject = (object)list;
                    dtoResponse.IsSuccess    = true;
                    dtoResponse.MessageText  = "查询操作成功!";
                    return(dtoResponse);
                }
            }
            catch (Exception ex)
            {
                dtoResponse.IsSuccess   = false;
                dtoResponse.MessageText = ex.Message;
                DCSInfService.logger.Error((object)ex);
                return(dtoResponse);
            }
        }
Exemplo n.º 11
0
        public DTOResponse GetList(PlanDetailRequest request)
        {
            DTOResponse dtoResponse = new DTOResponse();

            try
            {
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    SqlExpression <PlanDetailEntity> expression = dbConn.From <PlanDetailEntity>();

                    if (request.LINESTATE != null)
                    {
                        expression.And(x => x.LINESTATE == request.LINESTATE);
                    }
                    if (request.PLANTYPE != null)
                    {
                        expression.And(x => x.PLANTYPE == request.PLANTYPE);
                    }

                    if (!string.IsNullOrEmpty(request.PRODUCTTYPE) && request.PRODUCTTYPE != "0")
                    {
                        expression.And(x => x.PRODUCTTYPE == request.PRODUCTTYPE);
                    }
                    if (!string.IsNullOrEmpty(request.PRODUCTNO) && request.PRODUCTNO != "0")
                    {
                        expression.And(x => x.PRODUCTNO == request.PRODUCTNO);
                    }
                    if (!string.IsNullOrEmpty(request.PRODUCTNAME))
                    {
                        expression.And(x => x.PRODUCTNAME.Contains(request.PRODUCTNAME));
                    }

                    long count = dbConn.Count <PlanDetailEntity>(expression);
                    List <PlanDetailEntity> entityList = dbConn.Select <PlanDetailEntity>(expression)
                                                         .OrderByDescending(x => x.ID)
                                                         .Skip <PlanDetailEntity>((request.page - 1) * request.limit)
                                                         .Take <PlanDetailEntity>(request.limit)
                                                         .ToList <PlanDetailEntity>();
                    dtoResponse.TotalCount   = count;
                    dtoResponse.ResultObject = (object)entityList;
                    dtoResponse.IsSuccess    = true;
                    dtoResponse.MessageText  = "查询操作成功!";
                    return(dtoResponse);
                }
            }
            catch (Exception ex)
            {
                dtoResponse.IsSuccess   = false;
                dtoResponse.MessageText = ex.Message;
                logger.Error((object)ex);
                return(dtoResponse);
            }
        }
Exemplo n.º 12
0
        public static void InsertAlterInfo(string msgType, string msg, string msgState = "1")
        {
            SysAlterInfoEntity projAlertinfo = new SysAlterInfoEntity();

            projAlertinfo.MSGSTATE       = msgState;
            projAlertinfo.MSGTYPE        = msgType;
            projAlertinfo.MSGTEXT        = msg;
            projAlertinfo.CREATEDATE     = Utils.GetDatetime();
            projAlertinfo.CREATEDATETIME = Utils.GetTodayDateTimeNow();
            using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
            {
                dbConn.Save <SysAlterInfoEntity>(projAlertinfo, false);
            }
        }
Exemplo n.º 13
0
        public DTOResponse SetSTATIONSTATE(LocationStnRequest request)
        {
            DTOResponse dtoResponse = new DTOResponse();

            try
            {
                int num = 0;
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    using (IDbTransaction dbTransaction = dbConn.OpenTransaction())
                    {
                        LocStationInfoEntity stationinfoEntity = OrmLiteReadExpressionsApi.Single <LocStationInfoEntity>(dbConn, (Expression <Func <LocStationInfoEntity, bool> >)(x => x.STATIONNO == request.STATIONNO));
                        if (stationinfoEntity == null)
                        {
                            throw new Exception("未查询到" + request.STATIONNO + "的信息");
                        }
                        stationinfoEntity.STATIONSTATE = request.STATIONSTATE;
                        stationinfoEntity.OPBY         = SysInfo.CurrentUserName;
                        stationinfoEntity.OPDATE       = Utils.GetTodayNow();
                        stationinfoEntity.OPMESSAGE    = "设置状态!";

                        SqlExpression <LocStationInfoEntity> sqlExpression = dbConn.From <LocStationInfoEntity>();
                        sqlExpression.Where(x => x.ID == stationinfoEntity.ID);
                        sqlExpression.UpdateFields.Add("STATIONSTATE");

                        sqlExpression.UpdateFields.Add("OPBY");
                        sqlExpression.UpdateFields.Add("OPDATE");
                        sqlExpression.UpdateFields.Add("OPMESSAGE");

                        num = dbConn.UpdateOnly <LocStationInfoEntity>(stationinfoEntity, sqlExpression);

                        dbTransaction.Commit();
                    }
                }
                dtoResponse.IsSuccess   = true;
                dtoResponse.MessageText = "设置状态成功!" + num.ToString();
                return(dtoResponse);
            }
            catch (Exception ex)
            {
                dtoResponse.IsSuccess   = false;
                dtoResponse.MessageText = ex.Message;
                logger.Error((object)ex);
                return(dtoResponse);
            }
        }
Exemplo n.º 14
0
        public DTOResponse GetDataFromDCS(List <long> jobidList)
        {
            DTOResponse dTOResponse = new DTOResponse();

            try
            {
                string        arg  = jobidList.ToInString();
                List <object> list = null;
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory("DCS").OpenDbConnection())
                {
                    string sql = $"select wjid,rid,sc,tg,paid,st,ts,et,sct from sm_wcs_jb_ts_od where wjid in ({arg}) order by wjid,et";
                    list = dbConn.Select <object>(sql);
                }
                List <TaskStatEntity> list2 = new List <TaskStatEntity>();
                foreach (dynamic item in list)
                {
                    TaskStatEntity pROJ_TASKSTATEntity = new TaskStatEntity();
                    pROJ_TASKSTATEntity.TASKNO       = item.wjid;
                    pROJ_TASKSTATEntity.STATITEMNAME = item.paid;
                    pROJ_TASKSTATEntity.STATITEMDESC = item.rid;
                    DateTime d  = Convert.ToDateTime(item.et);
                    DateTime d2 = Convert.ToDateTime(item.sct);
                    pROJ_TASKSTATEntity.STATITEMVALUE = (d2 - d).Seconds.ToString();
                    pROJ_TASKSTATEntity.P01           = item.et;
                    pROJ_TASKSTATEntity.P02           = item.sct;
                    pROJ_TASKSTATEntity.CREATETIME    = Utils.GetDatetime();
                    list2.Add(pROJ_TASKSTATEntity);
                }
                long num = 0L;
                using (IDbConnection dbConn2 = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    num = dbConn2.SaveAll(list2);
                }
                dTOResponse.IsSuccess   = true;
                dTOResponse.MessageText = "获取tsorder成功!" + num.ToString();
                logger.Info(dTOResponse);
                return(dTOResponse);
            }
            catch (Exception ex)
            {
                dTOResponse.IsSuccess   = false;
                dTOResponse.MessageText = ex.Message;
                logger.Error(ex);
                return(dTOResponse);
            }
        }
Exemplo n.º 15
0
 public static void InsertOplog(string opMessage, string keyValue = "")
 {
     try
     {
         SysOplogEntity oplog = new SysOplogEntity();
         oplog.CREATEDATE = System.DateTime.Now;
         oplog.ENTERDATE  = Utils.GetDatetime();
         oplog.KEYVALUE   = keyValue;
         oplog.OPMESSAGE  = opMessage;
         using (IDbConnection dbCon = HelperConnection.GetConnectionFactory().OpenDbConnection())
         {
             dbCon.Insert <SysOplogEntity>(oplog);
         }
     }
     catch (Exception ex)
     {
         logger.Error(ex.Message, ex);
     }
 }
Exemplo n.º 16
0
 public void Install()
 {
     try
     {
         Installer.logger.Debug((object)"创建数据库表……");
         using (IDbConnection dbCon = HelperConnection.GetConnectionFactory().OpenDbConnection())
         {
             using (IDbTransaction dbTransaction = dbCon.OpenTransaction())
             {
                 dbCon.CreateTableIfNotExists <Entitys.INVENTORY>();
                 dbTransaction.Commit();
             }
             dbCon.Close();
         }
         Installer.logger.Debug((object)"创建表结束!");
     }
     catch (Exception ex)
     {
         Installer.logger.Error((object)ex.ToString());
         throw ex;
     }
 }
Exemplo n.º 17
0
        public DTOResponse GetCurrent(SceneRequest request)
        {
            DTOResponse dtoResponse = new DTOResponse();

            try
            {
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    List <SysSceneEntity> uldSceneList = dbConn.Select <SysSceneEntity>((Expression <Func <SysSceneEntity, bool> >)(x => x.SCENESTATE == "1"));
                    dtoResponse.ResultObject = (object)uldSceneList;
                    dtoResponse.IsSuccess    = true;
                    dtoResponse.MessageText  = "查询操作成功!";
                }
            }
            catch (Exception ex)
            {
                dtoResponse.IsSuccess   = false;
                dtoResponse.MessageText = ex.Message;
                SysSceneService.logger.Error((object)ex);
            }
            return(dtoResponse);
        }
Exemplo n.º 18
0
        public DTOResponse GetList(LedInfoRequest request)
        {
            DTOResponse dtoResponse = new DTOResponse();

            try
            {
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    List <INF_LEDINFOEntity> list = dbConn.Select <INF_LEDINFOEntity>().OrderBy <INF_LEDINFOEntity, int>((Func <INF_LEDINFOEntity, int>)(x => x.ID)).ToList <INF_LEDINFOEntity>();
                    dtoResponse.ResultObject = (object)list;
                    dtoResponse.IsSuccess    = true;
                    dtoResponse.MessageText  = "查询操作成功!";
                }
            }
            catch (Exception ex)
            {
                dtoResponse.IsSuccess   = false;
                dtoResponse.MessageText = ex.Message;
                LedInfoService.logger.Error((object)ex);
            }
            return(dtoResponse);
        }
Exemplo n.º 19
0
        public DTOResponse BatchChangeUseState(LocationRequest request)
        {
            DTOResponse dtoResponse = new DTOResponse();

            try
            {
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    SqlExpression <LocDetailEntity> sqlExpression = dbConn.From <LocDetailEntity>();
                    sqlExpression.Where(x => request.ListLocatioNo.Contains(x.LOCATIONNO));
                    sqlExpression.UpdateFields.Add("USESTATE");
                    sqlExpression.UpdateFields.Add("OPBY");
                    sqlExpression.UpdateFields.Add("OPDATE");
                    sqlExpression.UpdateFields.Add("OPMESSAGE");

                    LocDetailEntity locDetailEntity = new LocDetailEntity();
                    locDetailEntity.USESTATE  = request.USESTATE;
                    locDetailEntity.OPBY      = SysInfo.GetCurrentUserInfo();
                    locDetailEntity.OPDATE    = Utils.GetTodayNow();
                    locDetailEntity.OPMESSAGE = "修改使用状态!";

                    int count = dbConn.UpdateOnly <LocDetailEntity>(locDetailEntity, sqlExpression);

                    dtoResponse.IsSuccess   = count > 0 ? true : false;
                    dtoResponse.MessageText = "操作完成,修改记录" + count.ToString() + "条 " + dtoResponse.IsSuccess.ToString();
                    HelperOplog.InsertOplog("位置使用状态更改:" + request.USESTATE + "/" + request.ListLocatioNo.ToJson());
                    HelperOplog.InsertOplog(dtoResponse);
                    return(dtoResponse);
                }
            }
            catch (Exception ex)
            {
                dtoResponse.IsSuccess   = false;
                dtoResponse.MessageText = ex.Message;
                logger.Error((object)ex);
                return(dtoResponse);
            }
        }
Exemplo n.º 20
0
        public DTOResponse GetSysparamsList(BasicRequest request)
        {
            DTOResponse dtoResponse = new DTOResponse();

            try
            {
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    List <SysParams> list = dbConn.Select <SysParams>().OrderBy(x => x.ID).ToList();
                    dtoResponse.ResultObject = list;
                    dtoResponse.IsSuccess    = true;
                    dtoResponse.MessageText  = "操作完成:" + dtoResponse.IsSuccess;
                    return(dtoResponse);
                }
            }
            catch (Exception ex)
            {
                dtoResponse.IsSuccess   = false;
                dtoResponse.MessageText = ex.Message;
                logger.Error((object)ex);
                return(dtoResponse);
            }
        }
Exemplo n.º 21
0
        private DTOResponse GetHistoryList(TaskRequest request)
        {
            using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
            {
                DTOResponse dtoResponse = new DTOResponse();
                SqlExpression <ZHISTaskEntity> expression = dbConn.From <ZHISTaskEntity>();
                if (!string.IsNullOrEmpty(request.TASKTCLASS) && request.TASKTCLASS != "0")
                {
                    expression.And((Expression <Func <ZHISTaskEntity, bool> >)(x => x.TASKTCLASS == request.TASKTCLASS));
                }
                if (!string.IsNullOrEmpty(request.PALLETNO))
                {
                    expression.And((Expression <Func <ZHISTaskEntity, bool> >)(x => x.PALLETNO == request.PALLETNO));
                }
                if (!string.IsNullOrEmpty(request.RelateNo))
                {
                    expression.And((Expression <Func <ZHISTaskEntity, bool> >)(x => x.RELATENO == request.RelateNo));
                }

                if (!string.IsNullOrEmpty(request.SourceNo))
                {
                    expression.And((Expression <Func <ZHISTaskEntity, bool> >)(x => x.SOURCE02 == request.SourceNo));
                }
                if (!string.IsNullOrEmpty(request.DescNo))
                {
                    expression.And((Expression <Func <ZHISTaskEntity, bool> >)(x => x.DESTINATION02 == request.DescNo));
                }

                long num = dbConn.Count <ZHISTaskEntity>(expression);
                List <ZHISTaskEntity> list = dbConn.Select <ZHISTaskEntity>(expression).OrderByDescending <ZHISTaskEntity, long>((Func <ZHISTaskEntity, long>)(x => x.ID)).Skip <ZHISTaskEntity>((request.page - 1) * request.limit).Take <ZHISTaskEntity>(request.limit).ToList <ZHISTaskEntity>();
                dtoResponse.TotalCount   = num;
                dtoResponse.ResultObject = (object)list;
                dtoResponse.IsSuccess    = true;
                dtoResponse.MessageText  = "查询操作成功!";
                return(dtoResponse);
            }
        }
Exemplo n.º 22
0
        public DTOResponse GetDetailList(PalletRequest request)
        {
            DTOResponse dtoResponse = new DTOResponse();

            try
            {
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    SqlExpression <PalletDetailEntity> expression = dbConn.From <PalletDetailEntity>();

                    if (request.PALLETID > -1)
                    {
                        expression.And(x => x.PALLETID == request.PALLETID);
                    }

                    long count = dbConn.Count <PalletDetailEntity>(expression);
                    List <PalletDetailEntity> entityList = dbConn.Select <PalletDetailEntity>(expression)
                                                           .OrderBy(x => x.ID)
                                                           .Skip((request.page - 1) * request.limit)
                                                           .Take(request.limit)
                                                           .ToList();

                    dtoResponse.TotalCount   = count;
                    dtoResponse.ResultObject = (object)entityList;
                    dtoResponse.IsSuccess    = true;
                    dtoResponse.MessageText  = "查询操作成功!";
                    return(dtoResponse);
                }
            }
            catch (Exception ex)
            {
                dtoResponse.IsSuccess   = false;
                dtoResponse.MessageText = ex.Message;
                logger.Error((object)ex);
                return(dtoResponse);
            }
        }
Exemplo n.º 23
0
        public DTOResponse SwitchEmexitState(LocationStnRequest request)
        {
            DTOResponse dtoResponse = new DTOResponse();

            try
            {
                int num = 0;
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    using (IDbTransaction dbTransaction = dbConn.OpenTransaction())
                    {
                        LocStationInfoEntity stationinfoEntity = OrmLiteReadExpressionsApi.Single <LocStationInfoEntity>(dbConn, (Expression <Func <LocStationInfoEntity, bool> >)(x => x.STATIONNO == request.STATIONNO));
                        if (stationinfoEntity == null)
                        {
                            throw new Exception("未查询到" + request.STATIONNO + "的信息");
                        }
                        stationinfoEntity.EMEXIT    = request.EMEXIT;
                        stationinfoEntity.OPBY      = SysInfo.CurrentUserName;
                        stationinfoEntity.OPDATE    = Utils.GetTodayNow();
                        stationinfoEntity.OPMESSAGE = "设置紧急出口成功!";
                        num = dbConn.Update <LocStationInfoEntity>(stationinfoEntity, (Action <IDbCommand>)null);

                        dbTransaction.Commit();
                    }
                }
                dtoResponse.IsSuccess   = true;
                dtoResponse.MessageText = "设置状态成功!" + num.ToString();
                return(dtoResponse);
            }
            catch (Exception ex)
            {
                dtoResponse.IsSuccess   = false;
                dtoResponse.MessageText = ex.Message;
                logger.Error((object)ex);
                return(dtoResponse);
            }
        }
Exemplo n.º 24
0
        public DTOResponse ChangeGroupUseState(LocationRequest request)
        {
            DTOResponse dtoResponse = new DTOResponse();

            try
            {
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    LocGroupEntity entity = dbConn.Select <LocGroupEntity>(x => x.GROUPNO == request.GROUPNO).FirstNonDefault();
                    if (entity == null)
                    {
                        throw new Exception(request.LOCATIONNO + "位置不存在!");
                    }
                    entity.USESTATE  = int.Parse(request.USESTATE);
                    entity.OPBY      = SysInfo.GetCurrentUserInfo();
                    entity.OPDATE    = Utils.GetTodayNow();
                    entity.OPMESSAGE = "修改使用状态!";
                    int count = dbConn.UpdateOnly <LocGroupEntity>(
                        entity,
                        new string[4] {
                        "USESTATE", "OPBY", "OPDATE", "OPMESSAGE"
                    },
                        (x => x.GROUPNO == request.GROUPNO));
                    dtoResponse.IsSuccess   = count > 0 ? true : false;
                    dtoResponse.MessageText = "操作成功!" + count.ToString();
                    return(dtoResponse);
                }
            }
            catch (Exception ex)
            {
                dtoResponse.IsSuccess   = false;
                dtoResponse.MessageText = ex.Message;
                logger.Error((object)ex);
                return(dtoResponse);
            }
        }
Exemplo n.º 25
0
        public DTOResponse GetTaskStepList(TaskRequest request)
        {
            DTOResponse dtoResponse = new DTOResponse();

            try
            {
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    long num = dbConn.Count <TaskStepEntity>((Expression <Func <TaskStepEntity, bool> >)(x => x.TASKNO == request.TASKNO));
                    List <TaskStepEntity> list = dbConn.Select <TaskStepEntity>((Expression <Func <TaskStepEntity, bool> >)(x => x.TASKNO == request.TASKNO)).OrderBy <TaskStepEntity, string>((Func <TaskStepEntity, string>)(x => x.ID)).ToList <TaskStepEntity>();
                    dtoResponse.TotalCount   = num;
                    dtoResponse.ResultObject = (object)list;
                    dtoResponse.IsSuccess    = true;
                    dtoResponse.MessageText  = "查询操作成功!";
                }
            }
            catch (Exception ex)
            {
                dtoResponse.IsSuccess   = false;
                dtoResponse.MessageText = ex.Message;
                TaskService.logger.Error((object)ex);
            }
            return(dtoResponse);
        }
Exemplo n.º 26
0
        public DTOResponse GetkanbanInfo(LedInfoRequest request)
        {
            DTOResponse dtoResponse = new DTOResponse();
            string      reportno    = request.REPORTNO;
            Report      report      = HelperDbOperation.Select <Report>((Expression <Func <Report, bool> >)(x => x.REPORTNO == reportno)).First <Report>();

            if (report != null)
            {
                string datasource = report.DATASOURCE;
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    List <object> objectList = dbConn.Select <object>(datasource);
                    dtoResponse.ResultObject = (object)objectList;
                    dtoResponse.IsSuccess    = true;
                    dtoResponse.MessageText  = "查询操作成功!";
                    return(dtoResponse);
                }
            }
            else
            {
                dtoResponse.IsSuccess = false;
                return(dtoResponse);
            }
        }
Exemplo n.º 27
0
        public DTOResponse GetListLocGroup(LocationRequest request)
        {
            DTOResponse dtoResponse = new DTOResponse();

            try
            {
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    SqlExpression <LocGroupEntity> expression = dbConn.From <LocGroupEntity>();
                    if (!string.IsNullOrEmpty(request.LOCATIONTYPE) && request.LOCATIONTYPE != "0")
                    {
                        expression.And((x => x.GROUPTYPE == request.LOCATIONTYPE));
                    }
                    if (!string.IsNullOrEmpty(request.GROUPNO) && request.GROUPNO != "0")
                    {
                        expression.And((x => x.GROUPNO.Contains(request.GROUPNO)));
                    }
                    if (!string.IsNullOrEmpty(request.AREANO) && request.AREANO != "0")
                    {
                        expression.And((x => x.AREANO == request.AREANO));
                    }

                    if (!string.IsNullOrEmpty(request.USESTATE))
                    {
                        expression.And(x => x.USESTATE == int.Parse(request.USESTATE));
                    }
                    if (!string.IsNullOrEmpty(request.GROUPSTATE))
                    {
                        expression.And(x => x.GROUPSTATE == int.Parse(request.GROUPSTATE));
                    }

                    if (!string.IsNullOrEmpty(request.AREANO) && request.STOCKNO != "0")
                    {
                        expression.And(x => x.STOCKNO == request.STOCKNO);
                    }

                    if (request.ROWNO_MIN > 0 && request.ROWNO_MAX > 0)
                    {
                        expression.And(x => x.ROWNO >= request.ROWNO_MIN && x.ROWNO <= request.ROWNO_MAX);
                    }

                    long count = dbConn.Count <LocGroupEntity>(expression);
                    List <LocGroupEntity> listResult = dbConn.Select <LocGroupEntity>(expression)
                                                       .OrderBy(x => x.ID)
                                                       .Skip <LocGroupEntity>((request.page - 1) * request.limit)
                                                       .Take <LocGroupEntity>(request.limit)
                                                       .ToList <LocGroupEntity>();
                    dtoResponse.TotalCount   = count;
                    dtoResponse.ResultObject = (object)listResult;
                    dtoResponse.IsSuccess    = true;
                    dtoResponse.MessageText  = "查询操作成功!";
                    return(dtoResponse);
                }
            }
            catch (Exception ex)
            {
                dtoResponse.IsSuccess   = false;
                dtoResponse.MessageText = ex.Message;
                logger.Error((object)ex);
                return(dtoResponse);
            }
        }
Exemplo n.º 28
0
        public void Init()
        {
            try
            {
                string devHotName = ConfigurationManager.AppSettings["DEVHOSTNAME"];//开发计算机
                string hostName   = HelperEnvironmentSetting.GetHostName();
                string appName    = ConfigurationManager.AppSettings["APPNAME"];
                if (string.IsNullOrEmpty(appName))
                {
                    appName = AppDomain.CurrentDomain.FriendlyName.Replace(".vshost", "");
                }
                string responservername      = null;
                string responservernameBydev = null;
                responservername      = hostName + "&" + appName;
                responservernameBydev = devHotName + "&" + appName;
                System.Console.WriteLine("responservername:" + responservername);
                System.Console.WriteLine("devHotName:" + responservername);
                List <JobEntity> jobEntityList = new List <JobEntity>();
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    SqlExpression <JobEntity> expression = dbConn.From <JobEntity>();
                    expression.And(x => x.STATE == "1");//加载启用状态的定时器
                    if (devHotName == hostName)
                    {
                        expression.And(x => x.RESPONSESVRNAMEBYDEV == responservernameBydev);
                    }
                    else
                    {
                        expression.And(x => x.RESPONSESVRNAME == responservername);
                    }

                    jobEntityList = dbConn.Select <JobEntity>(expression).OrderBy <JobEntity, int>((Func <JobEntity, int>)(x => x.JOBID)).ToList <JobEntity>();
                    if (jobEntityList == null || jobEntityList.Count == 0)
                    {
                        this.logger.Info((object)"启动定时服务失败,未查询到相关数据!");
                    }
                    else
                    {
                        this.logger.Info((object)(responservername + ",加载" + jobEntityList.Count.ToString() + "个JOB"));
                        this.scheduler = this.schedulerFactory.GetScheduler();
                        this.scheduler.Clear();
                        foreach (JobEntity jobEntity in jobEntityList)
                        {
                            Type type = Type.GetType(jobEntity.CLASSFULLNAME);
                            if (type == (Type)null)
                            {
                                this.logger.Info((object)("无法获取:" + jobEntity.CLASSFULLNAME));
                            }
                            else
                            {
                                int            jobid          = jobEntity.JOBID;
                                IJobDetail     jobDetail      = (IJobDetail) new JobDetailImpl(jobid.ToString() + "-" + jobEntity.JOBDESC, "CIMS.Server", type, true, true);
                                TriggerBuilder triggerBuilder = TriggerBuilder.Create();
                                jobid = jobEntity.JOBID;
                                string   key     = jobid.ToString() + "-" + jobEntity.JOBTRIGGER;
                                ITrigger trigger = triggerBuilder.WithIdentity(key).WithCronSchedule(jobEntity.JOBTRIGGERPARA).Build();
                                jobDetail.JobDataMap.Put("BASE_JOB", (object)jobEntity);
                                jobDetail.JobDataMap.Put("JobKey", jobEntity.JOBID);
                                JobDataMap jobDataMap = jobDetail.JobDataMap;
                                jobid = jobEntity.JOBID;
                                string str2 = jobid.ToString() + "-" + jobEntity.JOBTRIGGER;
                                jobDataMap.Put("TriggerKey", str2);
                                this.scheduler.ScheduleJob(jobDetail, trigger);

                                logger.Info(jobEntity.JOBID + "创建成功!");
                            }
                        }
                        this.logger.Info((object)(responservername + ",启动了" + jobEntityList.Count.ToString() + "个JOB"));
                        this.scheduler.Start();
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
                this.logger.Info((object)ex.ToString());
                this.logger.Error((object)ex.ToString());
            }
        }
Exemplo n.º 29
0
        public DTOResponse Save(ProductRequest request)
        {
            DTOResponse dtoResponse = new DTOResponse();

            try
            {
                if (string.IsNullOrEmpty(request.PostData))
                {
                    throw new Exception("传入的参数为空!");
                }
                long count = 0;
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    //获取对象值
                    request.Entity = HelperSerializer.GetObjectFromJsonString <ProductEntity>(request.PostData);

                    if (request.ACTION == OPAction.CREATE)
                    {
                        ProductEntity entity = new ProductEntity();
                        entity.PRODUCTNO   = request.Entity.PRODUCTNO;
                        entity.PRODUCTNAME = request.Entity.PRODUCTNAME;
                        //entity.PRODUCTDESC = "";
                        //entity.PRODUCTSUBDESC = "";
                        //entity.PRODUCTSPEC = "";
                        entity.PRODUCTBARCODE = "0";
                        //entity.PRODUCTNODECODE = "";
                        entity.TURNOVERRATE    = "";
                        entity.ABC             = request.Entity.ABC;
                        entity.PRODUCTCLASS    = "";
                        entity.PRODUCTTYPE     = request.Entity.PRODUCTTYPE;
                        entity.PRODUCTTSTATE   = "1";
                        entity.QUANTITY_PACK   = request.Entity.QUANTITY_PACK;
                        entity.MAINUNIT        = request.Entity.MAINUNIT;
                        entity.BASICUNIT       = request.Entity.MAINUNIT;
                        entity.MAINTOBASICRATE = 1;
                        //entity.MAINTOBASICDESC = "";
                        entity.CREATEBY   = SysInfo.GetCurrentUserInfo();
                        entity.CREATEDATE = Utils.GetDatetime();
                        entity.MODIFYBY   = "";
                        entity.MODIFYDATE = "";
                        entity.REMARK     = request.Entity.REMARK;

                        /*entity.BRANDID = "";
                         * entity.BRANDNAME = "";
                         * entity.VENDORID = "";
                         * entity.VENDORNAME = "";
                         * entity.PRODUCTERID = "";
                         * entity.PRODUCTERNAME = "";
                         * entity.MARKETPRICE = "";
                         * entity.LOWESTSALEPRICE = "";
                         * entity.SELLPRICE = "";
                         * entity.ISDELICATE = "";
                         * entity.IMPORTPRODUCT = "";
                         * entity.IMAGEURL = "";
                         * entity.DEFAULTCOLOR = "";
                         * entity.PALLETEMPLTY = "";
                         * entity.PALLETENTITY = "";
                         * entity.SIZE_LENGTH = "";
                         * entity.SIZE_WIDTH = "";
                         * entity.SIZE_HEIGHT = "";
                         * entity.VOLUME = "";
                         * entity.WEIGHT = "";
                         * entity.NETWEIGHT = "";
                         * entity.WARNSTATE = "";
                         * entity.INV_HIGH = "";
                         * entity.INV_SAFE = "";
                         * entity.INV_ORDER = "";
                         * entity.INV_HIVEDAYS = "";
                         * entity.INV_LIMIT = "";
                         * entity.INV_HIGH_COLOR = "";
                         * entity.INV_SAFE_COLOR = "";
                         * entity.INV_ORDER_COLOR = "";
                         * entity.INV_HIVEDAYS_COLOR = "";
                         * entity.INV_LIMIT_COLOR = "";
                         * entity.CUSTOMCOL01 = "";
                         * entity.CUSTOMCOL02 = "";
                         * entity.CUSTOMCOL03 = "";
                         * entity.CUSTOMCOL04 = "";
                         * entity.CUSTOMCOL05 = "";
                         * entity.CUSTOMCOL06 = "";
                         * entity.CUSTOMCOL07 = "";
                         * entity.CUSTOMCOL08 = "";
                         * entity.CUSTOMCOL09 = "";
                         * entity.CUSTOMCOL10 = "";*/

                        //插入记录
                        count = dbConn.Insert <ProductEntity>(entity);
                    }
                    else if (request.ACTION == OPAction.UPDATE)
                    {
                        //更新记录
                        count = dbConn.SaveAll <ProductEntity>(new List <ProductEntity>()
                        {
                            request.Entity
                        });
                    }
                    else if (request.ACTION == OPAction.OP_01)
                    {
                        SqlExpression <ProductEntity> sqlExpression = dbConn.From <ProductEntity>();
                        sqlExpression.Where(x => x.ID == request.Entity.ID);
                        sqlExpression.UpdateFields.Add("DEFAULTCOLOR");
                        sqlExpression.UpdateFields.Add("PRODUCTTSTATE");

                        //更新记录
                        count = dbConn.UpdateOnly <ProductEntity>(request.Entity, sqlExpression);
                    }

                    dtoResponse.IsSuccess   = true;
                    dtoResponse.MessageText = "操作成功!" + count;
                    return(dtoResponse);
                }
            }
            catch (Exception ex)
            {
                dtoResponse.IsSuccess   = false;
                dtoResponse.MessageText = ex.Message;
                logger.Error((object)ex);
                return(dtoResponse);
            }
        }
Exemplo n.º 30
0
        public DTOResponse GetPalletList(PalletRequest request)
        {
            //主从表,获取
            DTOResponse dtoResponse = new DTOResponse();

            try
            {
                using (IDbConnection dbConn = HelperConnection.GetConnectionFactory().OpenDbConnection())
                {
                    var expression = dbConn.From <PalletEntity>()
                                     .Join <PalletEntity, PalletDetailEntity>((x, y) => x.ID == y.PALLETID);

                    if (!string.IsNullOrEmpty(request.STOCKNO))
                    {
                        expression.And(x => x.STOCKNO == request.STOCKNO);
                    }
                    if (!string.IsNullOrEmpty(request.GROUPNO))
                    {
                        expression.And(x => x.GROUPNO == request.GROUPNO);
                    }
                    if (!string.IsNullOrEmpty(request.LOCATIONNO))
                    {
                        expression.And(x => x.LOCATIONNO == request.LOCATIONNO);
                    }
                    if (!string.IsNullOrEmpty(request.PALLETNO))
                    {
                        expression.And(x => x.PALLETNO == request.PALLETNO);
                    }

                    if (!string.IsNullOrEmpty(request.STATE))
                    {
                        expression.And(x => x.STATE == int.Parse(request.STATE));
                    }

                    if (!string.IsNullOrEmpty(request.PLANNO))
                    {
                        expression.And(x => x.PLANNO == request.PLANNO);
                    }

                    expression.Select("WM_PALLET.*,WM_PALLET_DETAIL.*");

                    long           count    = dbConn.Count <PalletEntity>(expression);
                    List <dynamic> dynamics = dbConn.Select <dynamic>(expression)
                                              .OrderByDescending(x => x.ID)
                                              .Skip((request.page - 1) * request.limit)
                                              .Take(request.limit)
                                              .ToList();

                    foreach (var item in dynamics)
                    {
                        item.CREATEDATETIME = item.CREATEDATE.ToString("yyyy-MM-dd HH:mm:ss");
                    }

                    dtoResponse.ResultObject = dynamics;
                    dtoResponse.IsSuccess    = true;
                    dtoResponse.MessageText  = "查询操作成功!";
                    return(dtoResponse);
                }
            }
            catch (Exception ex)
            {
                dtoResponse.IsSuccess   = false;
                dtoResponse.MessageText = ex.Message;
                logger.Error((object)ex);
                return(dtoResponse);
            }
        }