From 4e808cf4d7465f4bccfa41f4679f444c29649081 Mon Sep 17 00:00:00 2001 From: ndbs <nabs@LAPTOP-FJ5VQJ6J> Date: Mon, 22 Apr 2024 15:03:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E5=AE=89=E6=8E=92=E7=AD=BE?= =?UTF-8?q?=E5=88=B0=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/ActivitySchedule/Form.cshtml | 3 +-- .../ActivitySchedule/ActivityScheduleService.cs | 11 +++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ActivitySchedule/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ActivitySchedule/Form.cshtml index d5265753b..d01833143 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ActivitySchedule/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ActivitySchedule/Form.cshtml @@ -5,8 +5,7 @@ <div class="lr-form-wrap"> <div class="col-xs-12 lr-form-item" data-table="ActivitySchedule" > <div class="lr-form-item-title">时间<font face="宋体">*</font></div> - <input id="Date" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#Date').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" /> - </div> + <input id="Date" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" data-dateFmt="yyyy-MM-dd HH:mm" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#Date').trigger('change'); } })" /> </div> <div class="col-xs-12 lr-form-item" data-table="ActivitySchedule" > <div class="lr-form-item-title">地点<font face="宋体">*</font></div> <input id="Address" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ActivitySchedule/ActivityScheduleService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ActivitySchedule/ActivityScheduleService.cs index af00b6e04..09f7d778b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ActivitySchedule/ActivityScheduleService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ActivitySchedule/ActivityScheduleService.cs @@ -192,21 +192,20 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement } } } - + public string Scan(string scanParamUserid, string scanParamDutyid) { try { var result = ""; var DutyEntity = this.BaseRepository("CollegeMIS").FindEntity<ActivityScheduleEntity>(a => a.Id == scanParamDutyid); - if (DutyEntity == null) + if (DutyEntity != null) { var signInEntity = this.BaseRepository("CollegeMIS").FindEntity<ActivityScheduleSienInEntity>(x => x.ASID == scanParamDutyid && x.SignInUserId == scanParamUserid); var date = DateTime.Now; DateTime BeginTime = DutyEntity.Date.ToDate(); - if (signInEntity != null) + if (signInEntity == null) { - if (date.Subtract(BeginTime).Duration().Minutes <= 5 && BeginTime > date) { var signInInster = new ActivityScheduleSienInEntity @@ -231,6 +230,10 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement result = "签到失败!!!签到已开始"; } } + else + { + result = "签到成功"; + } } else {