Procházet zdrojové kódy

活动安排签到优化

应县
ndbs před 9 měsíci
rodič
revize
4e808cf4d7
2 změnil soubory, kde provedl 8 přidání a 6 odebrání
  1. +1
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ActivitySchedule/Form.cshtml
  2. +7
    -4
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ActivitySchedule/ActivityScheduleService.cs

+ 1
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/PersonnelManagement/Views/ActivitySchedule/Form.cshtml Zobrazit soubor

@@ -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" />


+ 7
- 4
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/ActivitySchedule/ActivityScheduleService.cs Zobrazit soubor

@@ -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
{


Načítá se…
Zrušit
Uložit