diff --git a/24Hour/Controllers/Common/CloudCabinetController.cs b/24Hour/Controllers/Common/CloudCabinetController.cs index 38c55b0..4d6efc5 100644 --- a/24Hour/Controllers/Common/CloudCabinetController.cs +++ b/24Hour/Controllers/Common/CloudCabinetController.cs @@ -57,15 +57,16 @@ namespace _24Hour.Controllers.Common .WhereIF(cabinetdata.lxhm.NotNull(), q => q.lxhm.Contains(cabinetdata.lxhm)) .WhereIF(cabinetdata.zt.NotNull(), q => q.zt.Contains(cabinetdata.zt)) .WhereIF(cabinetdata.dwbm.NotNull(), q => q.dwbm.Contains(cabinetdata.dwbm)) - .Where(q=>q.sfzh.Contains(_userdata.cardId)|| q.sfzh.Contains(_userdata.phone)) + .Where(q => q.sfzh.Contains(_userdata.cardId)|| q.sfzh.Contains(_userdata.phone)) .ToPageListAsync(cabinetdata.PageIndex, cabinetdata.PageSize, totalNumber); cabinetdata.RowsCount = totalNumber; - list.ForEach(q => { + list.ForEach(q => + { var da = _Unitdata.Where(x => x.unitCode == q.dwbm).FirstOrDefault(); q.dwbm = da?.unitname; }); - var data = new QueryResult(cabinetdata, list.OrderByDescending(q => long.Parse(q.cjsj)).ToList()); + var data = new QueryResult(cabinetdata, list.OrderByDescending(q => q.cjsj).ToList()); result.IsSucceed = true; result.result = data; return result; @@ -86,8 +87,8 @@ namespace _24Hour.Controllers.Common .WhereIF(cabinetdata.xm.NotNull(), q => q.xm.Contains(cabinetdata.xm)) .WhereIF(cabinetdata.lxhm.NotNull(), q => q.lxhm.Contains(cabinetdata.lxhm)) .WhereIF(cabinetdata.zt.NotNull(), q => q.zt.Contains(cabinetdata.zt)) - .WhereIF(cabinetdata.StartTime != null && cabinetdata.EndTime != null, q => unixStartTime.AddMilliseconds(long.Parse(q.cjsj)) >= cabinetdata.StartTime && unixStartTime.AddMilliseconds(long.Parse(q.cjsj)) < cabinetdata.EndTime.Value.AddDays(1)).ToPageListAsync(cabinetdata.PageIndex, cabinetdata.PageSize); - var data = new QueryResult(cabinetdata, list.OrderByDescending(q => long.Parse(q.cjsj)).ToList()); + .WhereIF(cabinetdata.StartTime != null && cabinetdata.EndTime != null, q => q.cjsj>= q.cjsj && q.cjsj (cabinetdata, list.OrderByDescending(q => q.cjsj).ToList()); result.IsSucceed = true; result.result = data; return result; diff --git a/24Hour/Controllers/Common/CommonController.cs b/24Hour/Controllers/Common/CommonController.cs index 78a2eac..28f0385 100644 --- a/24Hour/Controllers/Common/CommonController.cs +++ b/24Hour/Controllers/Common/CommonController.cs @@ -333,6 +333,7 @@ namespace _24Hour.Controllers.Common reason = q.reason, sttime = q.receptiontime, ettime = "", + qrsj=q.acceptancetime, creationtime = q.creationtime, receptionuser = q.receptionuser, receive = q.receptionuser, @@ -372,6 +373,7 @@ namespace _24Hour.Controllers.Common reason = q.reason,//原因 sttime = q.sttime, ettime = q.ettime, + qrsj = q.acceptancetime, creationtime = q.creationtime, receptionuser = q.meetwitId, username = q.meetwitname, @@ -408,6 +410,7 @@ namespace _24Hour.Controllers.Common courtname = "", casetype = "", + qrsj = q.acceptancetime, state = q.state,//状态 reason = q.reason,//原因 sttime = q.sttime, @@ -448,6 +451,7 @@ namespace _24Hour.Controllers.Common courtname = "", casetype = "", + qrsj = q.acceptancetime, state = q.state,//状态 reason = q.reason,//原因 sttime = q.sttime, @@ -483,6 +487,7 @@ namespace _24Hour.Controllers.Common lawyerunit = q.lawyerunit,//律师事务所 location = q.location,//预约地点 + qrsj = q.acceptancetime, phone = q.contact,//联系方式 matter = q.witnessrequest,//事由 objectstr = "",//访问对象(案件名称) @@ -554,7 +559,7 @@ namespace _24Hour.Controllers.Common location = "", courtname = "", casetype = "", - + qrsj = q.acceptancetime, state = q.state, reason = q.reason, sttime = q.receptiontime, @@ -591,7 +596,7 @@ namespace _24Hour.Controllers.Common location = "", courtname = "", casetype = "", - + qrsj = q.acceptancetime, Code = q.Code, state = q.state,//状态 reason = q.reason,//原因 @@ -630,7 +635,7 @@ namespace _24Hour.Controllers.Common location = "", courtname = "", casetype = "", - + qrsj = q.acceptancetime, Code = "", state = q.state,//状态 reason = q.reason,//原因 @@ -666,7 +671,7 @@ namespace _24Hour.Controllers.Common lawyerunit = q.lawyerunit,//律师事务所 location = q.location,//预约地点 - + qrsj = q.acceptancetime, phone = q.contact,//联系方式 matter = q.witnessrequest,//事由 objectstr = "",//访问对象(案件名称) @@ -706,7 +711,6 @@ namespace _24Hour.Controllers.Common lawyerunit = Unitdata?.unitname,//单位 location = "",//预约地点 - phone = "",//联系方式 matter = q.ajmc,//案件名称 objectstr = "",//访问对象(案件名称) @@ -746,16 +750,16 @@ namespace _24Hour.Controllers.Common lawyerunit = Unitdata?.unitname,// location = "",// - + phone = q.lxhm,//联系方式 matter = !string.IsNullOrEmpty(q.gjkqmm) ? q.gjkqmm : q.wbkqmm,//取件码 objectstr = "",//干警取件码 Code = "", state = q.zt,//状态 reason = "", - sttime = unixStartTime.AddMilliseconds(long.Parse(q.cjsj)),//创建时间 + sttime =q.cjsj,//创建时间 ettime = q.qjsj == null ? "" : unixStartTime.AddMilliseconds(long.Parse(q.qjsj)).ToString("yyyy-MM-dd HH:mm"),//取件时间 - creationtime = unixStartTime.AddMilliseconds(long.Parse(q.cjsj)),//创建时间 + creationtime =q.cjsj,//创建时间 receptionuser = "", username = "", receive = "", @@ -788,7 +792,7 @@ namespace _24Hour.Controllers.Common location = "", courtname = "", casetype = "", - + qrsj = q.acceptancetime, Code = "", state = q.state,//状态 reason = q.reason,//原因 @@ -1082,9 +1086,9 @@ namespace _24Hour.Controllers.Common Code = "", state = q.zt,//状态 reason = "", - sttime = unixStartTime.AddMilliseconds(long.Parse(q.cjsj)),//创建时间 + sttime = q.cjsj,//创建时间 ettime = q.qjsj == null ? "" : unixStartTime.AddMilliseconds(long.Parse(q.qjsj)).ToString("yyyy-MM-dd HH:mm"),//取件时间 - creationtime = unixStartTime.AddMilliseconds(long.Parse(q.cjsj)),//创建时间 + creationtime = q.cjsj,//创建时间 receptionuser = "", username = "", receive = "", @@ -1493,7 +1497,7 @@ namespace _24Hour.Controllers.Common sttime = "", ettime = "", state = q.zt, - creationtime = unixStartTime.AddMilliseconds(long.Parse(q.cjsj)),//创建时间 + creationtime = q.cjsj,//创建时间 }); }); //查询 @@ -1710,7 +1714,7 @@ namespace _24Hour.Controllers.Common sttime = "", ettime = "", state = q.zt, - creationtime = unixStartTime.AddMilliseconds(long.Parse(q.cjsj)),//创建时间 + creationtime = q.cjsj,//创建时间 }); }); //查询 diff --git a/24Hour/Properties/PublishProfiles/FolderProfile.pubxml.user b/24Hour/Properties/PublishProfiles/FolderProfile.pubxml.user index 2d0e357..90706a3 100644 --- a/24Hour/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/24Hour/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. <_PublishTargetUrl>D:\24小时发布 - True|2023-06-30T12:53:10.2775714Z;True|2023-06-30T20:47:24.3123829+08:00;True|2023-06-30T18:44:10.1995292+08:00;True|2023-06-30T18:35:05.6876552+08:00;True|2023-06-30T14:33:30.1363930+08:00;True|2023-06-30T14:17:02.8263130+08:00;True|2023-06-30T14:16:41.6529398+08:00;True|2023-06-30T10:20:34.2470363+08:00;True|2023-06-30T09:51:41.3251931+08:00;True|2023-06-29T16:07:09.3334291+08:00;True|2023-06-29T15:56:52.9510718+08:00;True|2023-06-29T15:49:16.8161173+08:00;True|2023-06-27T18:06:12.3724487+08:00;True|2023-06-27T17:22:11.4211972+08:00;True|2023-06-27T15:48:34.1728433+08:00;True|2023-06-13T18:05:11.2568840+08:00;False|2023-06-13T18:04:56.9546003+08:00; + True|2023-07-01T02:12:33.0301410Z;True|2023-06-30T20:53:10.2775714+08:00;True|2023-06-30T20:47:24.3123829+08:00;True|2023-06-30T18:44:10.1995292+08:00;True|2023-06-30T18:35:05.6876552+08:00;True|2023-06-30T14:33:30.1363930+08:00;True|2023-06-30T14:17:02.8263130+08:00;True|2023-06-30T14:16:41.6529398+08:00;True|2023-06-30T10:20:34.2470363+08:00;True|2023-06-30T09:51:41.3251931+08:00;True|2023-06-29T16:07:09.3334291+08:00;True|2023-06-29T15:56:52.9510718+08:00;True|2023-06-29T15:49:16.8161173+08:00;True|2023-06-27T18:06:12.3724487+08:00;True|2023-06-27T17:22:11.4211972+08:00;True|2023-06-27T15:48:34.1728433+08:00;True|2023-06-13T18:05:11.2568840+08:00;False|2023-06-13T18:04:56.9546003+08:00; \ No newline at end of file diff --git a/Elight.Entity/AppMode/App_CloudCabinetModel.cs b/Elight.Entity/AppMode/App_CloudCabinetModel.cs index 3b0e57d..75b5428 100644 --- a/Elight.Entity/AppMode/App_CloudCabinetModel.cs +++ b/Elight.Entity/AppMode/App_CloudCabinetModel.cs @@ -76,7 +76,8 @@ namespace Elight.Entity /// 创建时间 /// [DataMember] - public string? cjsj { get; set; } + public DateTime? cjsj { get; set; }=DateTime.Now; + /// /// 取件时间 /// diff --git a/Elight.Logic/Job/YgJob.cs b/Elight.Logic/Job/YgJob.cs index 6c4ab07..1a8d059 100644 --- a/Elight.Logic/Job/YgJob.cs +++ b/Elight.Logic/Job/YgJob.cs @@ -81,13 +81,13 @@ namespace Elight.Logic.Job //获取app平台所有用户电话号码 var userphone = _db.Queryable().Where(q => q.IsDeleted == 0 && q.usertype == 1).Select(q => q.phone).ToList(); //获取云柜最新创建时间 - var Document = _db.Queryable().OrderByDescending(q => long.Parse(q.cjsj)).ToList().FirstOrDefault(); + var Document = _db.Queryable().OrderByDescending(q => q.cjsj).ToList().FirstOrDefault(); //获取云柜编号 var Documentwsslbh = _db.Queryable().Select(q => q.bh).ToList(); //获取云柜Id,云柜编号 var CloudCabinetdatalist = _db.Queryable().Select(q => new { q.bh, q.Id }).ToList(); //根据数据库最新时间戳筛选文书数据 - CloudCabinetdata.Where(q => long.Parse(q.cjsj) >= long.Parse(Document.cjsj)); + CloudCabinetdata.Where(q => q.cjsj >= Document.cjsj); //获取系统存在的用户云柜数据 CloudCabinetdata = CloudCabinetdata.Where(q => usercardIds.Contains(q.sfzh) || userphone.Contains(q.lxhm)).ToList(); //筛选数据库包含云柜 @@ -99,17 +99,19 @@ namespace Elight.Logic.Job { var data = CloudCabinetdatalist.Where(x => x.bh == q.bh).FirstOrDefault(); q.Id = data.Id; - q.reservationId = "0e23db19-0439-11ee-ab29-0242ac110004"; + q.reservationId = "0e23db19-0439-11ee-ab29-0242ac110004"; + // q.cjsj=DateTime.Now; }); //循环生成唯一Id nobhyglist.ForEach(q => { q.Id = Guid.NewGuid().ToString(); - q.reservationId = "0e23db19-0439-11ee-ab29-0242ac110004"; + q.reservationId = "0e23db19-0439-11ee-ab29-0242ac110004"; + // q.cjsj=DateTime.Now; }); _db.BeginTran(); await _db.Insertable(nobhyglist).ExecuteCommandAsync(); - await _db.Updateable(bhyglist).UpdateColumns(it => new { it.zt, it.qjsj }).ExecuteCommandAsync(); + await _db.Updateable(bhyglist).UpdateColumns(it => new { it.zt, it.qjsj ,it.cjsj}).ExecuteCommandAsync(); _db.CommitTran(); } catch (System.Exception ex)