Просмотр исходного кода

修复人脸识别

黑艺新账号
hwh2023 1 год назад
Родитель
Сommit
dea1952c0a
2 измененных файлов: 11 добавлений и 8 удалений
  1. +3
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticDetailIndex.js
  2. +8
    -5
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs

+ 3
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ADR_Record/StatisticDetailIndex.js Просмотреть файл

@@ -141,9 +141,9 @@ var bootstrap = function ($, learun) {
}
},
{
label: "人脸详情", name: "Photo", width: 80, align: "left", sort: true,
label: "人脸详情", name: "Img", width: 80, align: "left", sort: true,
formatterAsync: function (callback, value, row, op, $cell) {
callback("<span onclick=detail(\'"+row.ADPhoto+"\',\'" + value + "\',\'" + row.IsFitstr + "\',\'" + row.UserName+"\')>查看</span>");
callback("<span onclick=detail(\'"+row.Photo+"\',\'" + value + "\',\'" + row.IsFitstr + "\',\'" + row.UserName+"\')>查看</span>");
}
},
{ label: "迟到(分钟)", name: "ChidaoMinutes", width: 80, align: "left", sort: true },
@@ -186,7 +186,7 @@ function detail(ADPhoto,photos,isfits,username) {
var strs = photos.split(',')
var strs1 = isfits.split(',')
var html = '<div style="padding:20px"><p>检测人员:' + username+'</p>';
html += ' <div style="display:flex">';
html += ' <div style="display:flex;text-align:center;">';
html += ' <div style="margin:50px">';
//html += ' <image src="'+ADPhoto+'" style="width:150px">';
if(ADPhoto){


+ 8
- 5
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs Просмотреть файл

@@ -274,7 +274,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
var date = datest.ToDate().AddDays(i).ToDateString();
//当天查询语句
var strSql = new StringBuilder();
strSql.Append($"select u.F_Encode as UserNo,u.F_RealName as UserName,u.F_DepartmentId as Department,t.ID,t.ADphoto,t.ADType,t.Photo,t.IsFit,t.ADTime,t.ClockTime,t.ClockStatus,'{date}' as ClockDate ");
strSql.Append($"select u.F_Encode as UserNo,u.F_RealName as UserName,u.F_DepartmentId as Department,t.ID,t.ADphoto,t.ADType,emp.Photo,t.img,t.IsFit,t.ADTime,t.ClockTime,t.ClockStatus,'{date}' as ClockDate ");
strSql.Append(" from " + basedbname + ".dbo.LR_Base_User u ");
strSql.Append(" inner join EmpInfo emp on u.F_EnCode=emp.EmpNo ");
strSql.Append(" left join ADR_Record t on u.F_EnCode=t.UserNo and t.ADYear='" + date.Substring(0, 4) + "' and t.ADMonth='" + date.Substring(5, 2) + "' and t.ADDay='" + date.Substring(8, 2) + "' ");
@@ -336,7 +336,8 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
ClockTime = y.ClockTime,
ClockStatus = y.ClockStatus,
Photo = y.Photo,
IsFit = y.IsFit
IsFit = y.IsFit,
Img=y.Img
})
}).ToList();

@@ -351,7 +352,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
//下班时间
var CloseTimeTemp = string.Format("{0} {1}", item.ClockDate, restrictionEntity.CloseTime).ToDate();
var WholeMinutes = (CloseTimeTemp - WorkTimeTemp).TotalMinutes.ToInt();//全天应工作分钟数
string photo = item.Group.FirstOrDefault().Photo;
var adtype1 = item.Group.FirstOrDefault(x => x.ADType == "1");//上班
var adtype2 = item.Group.FirstOrDefault(x => x.ADType == "2");//下班
//全天
@@ -363,7 +364,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
ClockDate = item.ClockDate,
BanCi = "上下班",
TimePeriodNo = 0,
ADPhoto= adtype2 != null ? adtype2.ADPhoto : "",
ADPhoto = adtype2 != null ? adtype2.ADPhoto : "",
TimePeriod = string.Format("上下班({0}-{1})", restrictionEntity.WorkTime, restrictionEntity.CloseTime),
ADStatusWork = adtype1 != null ? adtype1.ClockStatus : "6",
ADStatusClose = adtype2 != null ? adtype2.ClockStatus : "6",
@@ -374,8 +375,9 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
ChuQinMinutes = adtype1 != null && adtype2 != null ? (adtype2.ClockTime.Value - adtype1.ClockTime.Value).TotalMinutes.ToInt() : 0,
QueQinMinutes = adtype1 != null && adtype2 != null ? 0 : WholeMinutes,
RestMinutes = 0,
Photo = photo,// adtype1 != null && adtype2 != null ? adtype1.Photo: "",
IsFitstr = adtype1 != null && adtype2 != null ? adtype1.IsFit +","+ adtype2.IsFit : ",",
Photo = adtype1 != null && adtype2 != null ? adtype1.Photo+","+adtype2.Photo : ",",
Img = adtype1 != null && adtype2 != null ? adtype1.Img + "," + adtype2.Img : ",",
};
whole.WorkMinutes = WholeMinutes == whole.QueQinMinutes ? 0 : WholeMinutes - whole.ChidaoMinutes - whole.ZaoTuiMinutes - whole.QueQinMinutes;
totalResult.Add(whole);
@@ -527,6 +529,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
}
else
{
entity.IsFit = true;
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}


Загрузка…
Отмена
Сохранить