yxq преди 1 месец
родител
ревизия
0b3cd42ac8
променени са 33 файла, в които са добавени 273 реда и са изтрити 74 реда
  1. +20
    -1
      SafeCampus.API/SafeCampus.Application/SafeCampus.Application.xml
  2. +1
    -1
      SafeCampus.API/SafeCampus.Application/Services/Business/AttendanceService/AttendanceService.cs
  3. +1
    -1
      SafeCampus.API/SafeCampus.Application/Services/Business/AttendanceService/Dto/AttendanceList.cs
  4. +15
    -0
      SafeCampus.API/SafeCampus.Application/Services/Business/BuildingService/BuildingService.cs
  5. +7
    -0
      SafeCampus.API/SafeCampus.Application/Services/Business/BuildingService/IBuildingService.cs
  6. +6
    -0
      SafeCampus.API/SafeCampus.Application/Services/Business/CameraInfoService/CameraInfoService.cs
  7. +5
    -0
      SafeCampus.API/SafeCampus.Application/Services/Business/CameraInfoService/ICameraInfoService.cs
  8. +5
    -0
      SafeCampus.API/SafeCampus.Application/Services/Business/DepartmentService/DepartmentService.cs
  9. +5
    -0
      SafeCampus.API/SafeCampus.Application/Services/Business/DormitoryService/DormitoryService.cs
  10. +5
    -0
      SafeCampus.API/SafeCampus.Application/Services/Business/MajorService/MajorService.cs
  11. +1
    -1
      SafeCampus.API/SafeCampus.Application/Services/Business/PersonInfoService/Dto/PersonInfoSearch.cs
  12. +1
    -1
      SafeCampus.API/SafeCampus.Application/Services/Business/PersonInfoService/PersonInfoService.cs
  13. +6
    -0
      SafeCampus.API/SafeCampus.Application/Services/Business/PersonSetInfoService/IPersonSetInfoService.cs
  14. +6
    -0
      SafeCampus.API/SafeCampus.Application/Services/Business/PersonSetInfoService/PersonSetInfoService.cs
  15. +2
    -1
      SafeCampus.API/SafeCampus.Application/Services/Business/Warn/Dto/WarnInfoDto.cs
  16. +2
    -2
      SafeCampus.API/SafeCampus.System/Entity/Attendance.cs
  17. +1
    -1
      SafeCampus.API/SafeCampus.System/Entity/PersonInfo.cs
  18. +1
    -1
      SafeCampus.API/SafeCampus.System/SafeCampus.System.xml
  19. +14
    -1
      SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/BuildingController.cs
  20. +55
    -19
      SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/ClothApi.cs
  21. +9
    -5
      SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/DfieldApi.cs
  22. +42
    -16
      SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/KeyPersonnelController.cs
  23. +4
    -4
      SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/PersonApi.cs
  24. +6
    -2
      SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/WarnInfoController.cs
  25. +2
    -2
      SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Violation/VioAnalysisController.cs
  26. +6
    -0
      SafeCampus.API/SafeCampus.Web.Core/SafeCampus.Web.Core.xml
  27. +1
    -1
      SafeCampus.API/SafeCampus.Web.Entry/Properties/PublishProfiles/FolderProfile.pubxml.user
  28. +3
    -2
      SafeCampus.WEB/src/views/userManage/clothing/index.vue
  29. +1
    -1
      SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/form_basic.vue
  30. +10
    -1
      SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/index.vue
  31. +1
    -1
      SafeCampus.WEB/src/views/userManage/personnel/components/form/form_basic.vue
  32. +10
    -4
      SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue
  33. +19
    -5
      SafeCampus.WEB/src/views/violation/portraitSummary/index.vue

+ 20
- 1
SafeCampus.API/SafeCampus.Application/SafeCampus.Application.xml Целия файл

@@ -463,6 +463,12 @@
</summary>
<returns></returns>
</member>
<member name="M:SafeCampus.Application.Services.Business.BuildingService.IBuildingService.GetUseCameraList">
<summary>
获取寝室使用的摄像头
</summary>
<returns></returns>
</member>
<member name="P:SafeCampus.Application.Services.Business.CameraGroupService.CameraGroupAddInput.ParentId">
<summary>
父级id
@@ -607,6 +613,12 @@
<param name="input"></param>
<returns></returns>
</member>
<member name="M:SafeCampus.Application.Services.Business.CameraInfoService.ICameraInfoService.GetBuildCameraList(System.Collections.Generic.List{System.String})">
<summary>
获取未被宿舍楼使用的摄像头
</summary>
<returns></returns>
</member>
<member name="P:SafeCampus.Application.Services.Business.ClassRoomCallService.ClassRoomCallDto.TenantCode">
<summary>
租户id
@@ -1579,7 +1591,7 @@
进班时间
</summary>
</member>
<member name="P:SafeCampus.Application.Services.Business.PersonInfoService.PersonInfoSearch.PersonName">
<member name="P:SafeCampus.Application.Services.Business.PersonInfoService.PersonInfoSearch.Name">
<summary>
人员名称
</summary>
@@ -1703,6 +1715,13 @@
</summary>
<returns></returns>
</member>
<member name="M:SafeCampus.Application.Services.Business.PersonSetInfoService.IPersonSetInfoService.CheckName(System.String)">
<summary>
检查名称是否存在
</summary>
<param name="name"></param>
<returns></returns>
</member>
<member name="P:SafeCampus.Application.Services.Business.Warn.Dto.HandWarnInput.Id">
<summary>
预警id


+ 1
- 1
SafeCampus.API/SafeCampus.Application/Services/Business/AttendanceService/AttendanceService.cs Целия файл

@@ -59,7 +59,7 @@ public class AttendanceService:DbRepository<Attendance>, IAttendanceService
.WhereIF(!string.IsNullOrEmpty(search.PersonSetId), x => x.PersonSetId == search.PersonSetId)
.WhereIF(!string.IsNullOrEmpty(search.PersonId), x => x.PersonId == search.PersonId)
.WhereIF(!string.IsNullOrEmpty(search.TrackId), x => x.TrackId == search.TrackId)
.WhereIF(!string.IsNullOrEmpty(search.CameraId), x => x.CameraId == search.CameraId)
//.WhereIF(!string.IsNullOrEmpty(search.CameraId), x => x.CameraId == search.CameraId)
.WhereIF(search.CameraIds!=null&&search.CameraIds.Any(),x=>search.CameraIds.Contains(x.CameraId))
.WhereIF(search.StartTick.HasValue, x => x.Tick >= search.StartTick)
.WhereIF(search.EndTick.HasValue, x => x.Tick <= search.EndTick);


+ 1
- 1
SafeCampus.API/SafeCampus.Application/Services/Business/AttendanceService/Dto/AttendanceList.cs Целия файл

@@ -93,7 +93,7 @@ public class AttendanceListMapper : IRegister
config.ForType<Attendance, AttendanceList>()
.Map(x => x.PersonName, x => !string.IsNullOrEmpty(x.PersonId) ? x.PersonInfoItem.Name : "")
.Map(x => x.PersonSetName, x => !string.IsNullOrEmpty(x.PersonId) ? x.PersonInfoItem.PersonSetInfoItem.PersonSetName : "")
.Map(x => x.DormitName, x => !string.IsNullOrEmpty(x.PersonId) ? x.PersonInfoItem.DormitoryInfoItem.Name : "")
.Map(x => x.DormitName, x => !string.IsNullOrEmpty(x.PersonId) ? (x.PersonInfoItem.DormitoryId.HasValue? x.PersonInfoItem.DormitoryInfoItem.Name : "") : "")
.Map(x => x.Gender, x => !string.IsNullOrEmpty(x.PersonId) ? x.PersonInfoItem.Gender : "");
}
}

+ 15
- 0
SafeCampus.API/SafeCampus.Application/Services/Business/BuildingService/BuildingService.cs Целия файл

@@ -5,6 +5,11 @@ public class BuildingService:DbRepository<BuildingInfo>,IBuildingService
public async Task<bool> Add(BuildingInfoDto input)
{
var model = input.Adapt<BuildingInfo>();
var modelold = await GetFirstAsync(p => p.Name == input.Name);
if (modelold != null)
{
throw Oops.Oh("宿舍楼已存在");
}
await InsertAsync(model);
return true;
}
@@ -58,8 +63,18 @@ public class BuildingService:DbRepository<BuildingInfo>,IBuildingService
var list = await Context.Queryable<BuildingInfo>()
.Includes(x => x.InsCameraInfoItem)
.Includes(x => x.OutCameraInfoItem)
.OrderBy(x=>x.CreateTime)
.ToListAsync();
//var list = await GetListAsync();
return list.Adapt<List<BuildingInfoDto>>();
}

public async Task<List<string>> GetUseCameraList()
{
var list = await GetListAsync();
var camera = new List<string>();
camera.AddRange(list.Select(x=>x.InsCameraId));
camera.AddRange(list.Select(x=>x.OutCameraId));
return camera;
}
}

+ 7
- 0
SafeCampus.API/SafeCampus.Application/Services/Business/BuildingService/IBuildingService.cs Целия файл

@@ -1,4 +1,6 @@

using SafeCampus.Application.Services.Business.CameraInfoService;

namespace SafeCampus.Application.Services.Business.BuildingService;

public interface IBuildingService:ITransient
@@ -32,4 +34,9 @@ public interface IBuildingService:ITransient
/// </summary>
/// <returns></returns>
Task<List<BuildingInfoDto>> GetNoPageList();
/// <summary>
/// 获取寝室使用的摄像头
/// </summary>
/// <returns></returns>
Task<List<string>> GetUseCameraList();
}

+ 6
- 0
SafeCampus.API/SafeCampus.Application/Services/Business/CameraInfoService/CameraInfoService.cs Целия файл

@@ -196,4 +196,10 @@ public class CameraInfoService : DbRepository<CameraInfo>, ICameraInfoService

throw Oops.Oh("分组不存在");
}

public async Task<List<CameraInfoDto>> GetBuildCameraList(List<string> useList)
{
var list=await Context.Queryable<CameraInfo>().Where(x=> !useList.Contains(x.SensorId)).ToListAsync();
return list.Adapt<List<CameraInfoDto>>();
}
}

+ 5
- 0
SafeCampus.API/SafeCampus.Application/Services/Business/CameraInfoService/ICameraInfoService.cs Целия файл

@@ -37,4 +37,9 @@ public interface ICameraInfoService:ITransient
/// <param name="input"></param>
/// <returns></returns>
Task<bool> BatchSetPushPersonByWarn(SetPushPersonWarnInput input);
/// <summary>
/// 获取未被宿舍楼使用的摄像头
/// </summary>
/// <returns></returns>
Task<List<CameraInfoDto>> GetBuildCameraList(List<string> useList);
}

+ 5
- 0
SafeCampus.API/SafeCampus.Application/Services/Business/DepartmentService/DepartmentService.cs Целия файл

@@ -5,6 +5,11 @@ public class DepartmentService: DbRepository<DepartmentInfo>, IDepartmentService
public async Task<bool> Add(DepartmentDto input)
{
var model = input.Adapt<DepartmentInfo>();
var modelold = await GetFirstAsync(p => p.Code == input.Code);
if (modelold != null)
{
throw Oops.Oh("院系编号已存在");
}
await InsertAsync(model);
return true;
}


+ 5
- 0
SafeCampus.API/SafeCampus.Application/Services/Business/DormitoryService/DormitoryService.cs Целия файл

@@ -5,6 +5,11 @@ public class DormitoryService:DbRepository<DormitoryInfo>,IDormitoryService
public async Task<bool> Add(DormitoryInfoDto input)
{
var model = input.Adapt<DormitoryInfo>();
var modelold = await GetFirstAsync(p => p.Name == input.Name&&p.BuildId==input.BuildId);
if (modelold != null)
{
throw Oops.Oh("寝室名称已存在");
}
await InsertAsync(model);
return true;
}


+ 5
- 0
SafeCampus.API/SafeCampus.Application/Services/Business/MajorService/MajorService.cs Целия файл

@@ -5,6 +5,11 @@ public class MajorService: DbRepository<MajorInfo>, IMajorService
public async Task<bool> Add(MajorDto input)
{
var model = input.Adapt<MajorInfo>();
var modelold = await GetFirstAsync(p => p.Code == input.Code);
if (modelold != null)
{
throw Oops.Oh("专业编号已存在");
}
await InsertAsync(model);
return true;
}


+ 1
- 1
SafeCampus.API/SafeCampus.Application/Services/Business/PersonInfoService/Dto/PersonInfoSearch.cs Целия файл

@@ -5,7 +5,7 @@ public class PersonInfoSearch:BasePageInput
/// <summary>
/// 人员名称
/// </summary>
public string PersonName { get; set; }
public string Name { get; set; }
/// <summary>
/// 手机号
/// </summary>


+ 1
- 1
SafeCampus.API/SafeCampus.Application/Services/Business/PersonInfoService/PersonInfoService.cs Целия файл

@@ -68,7 +68,7 @@ public class PersonInfoService:DbRepository<PersonInfo>, IPersonInfoService
.Includes(x=>x.PersonFacesList)
.Includes(x=>x.DormitoryInfoItem)
.WhereIF(!string.IsNullOrEmpty(search.PersonSetId), x => x.PersonSetId == search.PersonSetId)
.WhereIF(!string.IsNullOrEmpty(search.PersonName), x => x.Name.Contains(search.PersonName))
.WhereIF(!string.IsNullOrEmpty(search.Name), x => x.Name.Contains(search.Name))
.WhereIF(search.DepId.HasValue, x => x.PersonSetInfoItem.MajorInfoItem.DepId==search.DepId)
.WhereIF(search.MajorId.HasValue, x => x.PersonSetInfoItem.MajorId==search.MajorId)
.WhereIF(!string.IsNullOrEmpty(search.Phone), x => x.Phone.Contains(search.Phone));


+ 6
- 0
SafeCampus.API/SafeCampus.Application/Services/Business/PersonSetInfoService/IPersonSetInfoService.cs Целия файл

@@ -24,4 +24,10 @@ public interface IPersonSetInfoService:ITransient
/// </summary>
/// <returns></returns>
Task<List<PersonSetInfoDto>> GetPageList(long? majorId,string setName);
/// <summary>
/// 检查名称是否存在
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
Task<bool> CheckName(string name);
}

+ 6
- 0
SafeCampus.API/SafeCampus.Application/Services/Business/PersonSetInfoService/PersonSetInfoService.cs Целия файл

@@ -49,4 +49,10 @@ public class PersonSetInfoService:DbRepository<PersonSetInfo>, IPersonSetInfoSer
.ToListAsync();
return list.Adapt<List<PersonSetInfoDto>>();
}

public async Task<bool> CheckName(string name)
{
var model = GetFirstAsync(x => x.PersonSetName == name);
return model != null;
}
}

+ 2
- 1
SafeCampus.API/SafeCampus.Application/Services/Business/Warn/Dto/WarnInfoDto.cs Целия файл

@@ -138,6 +138,7 @@ public class WarnInfoDtoMapper : IRegister
//.Map(dest => dest.CameraName, src => src.CameraId.GetDescriptionByEnum<CameraType>());
.Map(x => x.PersonSetName,x=>x.PersonSetInfoItem.PersonSetName)
.Map(x => x.PersonName,x=>x.PersonInfoItem.Name)
.Map(dest => dest.CameraName, src => src.CameraInfoItem.SensorName);
.Map(dest => dest.CameraName, src => src.CameraInfoItem.SensorName)
.Map(x=>x.Extend,x=>string.IsNullOrEmpty(x.PersonId)?"":$"年龄:{x.PersonInfoItem.Age},年龄置信度:100%");
}
}

+ 2
- 2
SafeCampus.API/SafeCampus.System/Entity/Attendance.cs Целия файл

@@ -97,8 +97,8 @@ public class Attendance : PrimaryKeyEntity
[Navigate(NavigateType.OneToOne, nameof(CameraId), nameof(CameraInfo.SensorId))]
public CameraInfo CameraInfoItem { get; set; }
/// <summary>
/// 寝室信息
/// 人员信息
/// </summary>
[Navigate(NavigateType.OneToOne, nameof(PersonId), nameof(PersonInfo.PersonId))]
[Navigate(NavigateType.OneToOne, nameof(PersonId))]
public PersonInfo PersonInfoItem { get; set; }
}

+ 1
- 1
SafeCampus.API/SafeCampus.System/Entity/PersonInfo.cs Целия файл

@@ -49,7 +49,7 @@ public class PersonInfo
/// <summary>
/// 创建时间
/// </summary>
[SugarColumn(ColumnName = "CreateTime", ColumnDescription = "创建时间", IsNullable = true)]
[SugarColumn(ColumnName = "CreateTime", ColumnDescription = "创建时间", IsNullable = true, IsOnlyIgnoreUpdate = true)]
public DateTime CreateTime { get; set; }
/// <summary>
/// 所属班级id


+ 1
- 1
SafeCampus.API/SafeCampus.System/SafeCampus.System.xml Целия файл

@@ -788,7 +788,7 @@
</member>
<member name="P:SafeCampus.System.Attendance.PersonInfoItem">
<summary>
寝室信息
人员信息
</summary>
</member>
<member name="T:SafeCampus.System.BuildingInfo">


+ 14
- 1
SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/BuildingController.cs Целия файл

@@ -1,4 +1,5 @@
using SafeCampus.Application.Services.Business.BuildingService;
using SafeCampus.Application.Services.Business.CameraInfoService;

namespace SafeCampus.Web.Core.Controllers.Application.Business;
/// <summary>
@@ -10,10 +11,12 @@ namespace SafeCampus.Web.Core.Controllers.Application.Business;
public class BuildingController
{
private readonly IBuildingService _buildingService;
private readonly ICameraInfoService _cameraInfoService;

public BuildingController(IBuildingService buildingService)
public BuildingController(IBuildingService buildingService, ICameraInfoService cameraInfoService)
{
_buildingService = buildingService;
_cameraInfoService = cameraInfoService;
}

/// <summary>
@@ -54,4 +57,14 @@ public class BuildingController
{
return await _buildingService.GetNoPageList();
}
/// <summary>
/// 获取未被宿舍楼使用的摄像头
/// </summary>
/// <returns></returns>
public async Task<List<CameraInfoDto>> GetBuildCameraList()
{
var list =await _buildingService.GetUseCameraList();
var camera = await _cameraInfoService.GetBuildCameraList(list);
return camera;
}
}

+ 55
- 19
SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/ClothApi.cs Целия файл

@@ -10,7 +10,7 @@ namespace SafeCampus.Web.Core.Controllers.Application.Business;
/// 服装底库管理接口
/// </summary>
[Route("/business/[controller]")]
[ApiDescriptionSettings(ApiGroupConsts.SYSTEM_Business, Order = 97,Tag = "服装底库管理")]
[ApiDescriptionSettings(ApiGroupConsts.SYSTEM_Business, Order = 97, Tag = "服装底库管理")]
public class ClothApi
{
private readonly IDeepelephManager _deepelephManager;
@@ -27,7 +27,28 @@ public class ClothApi
/// <returns></returns>
public async Task<dynamic> AddClothDataBaseA(ClothDataNameInfo input)
{

var appSettings = App.GetOptionsMonitor<AppInfoOptions>();
var liststr = await $"{appSettings.SXAPIURL}/dfield-api/ecology/cloth/set/query-list"
.SetBody(new
{
token = _deepelephManager.GetToken(),
tenantCode = appSettings.TenantCode,
poiId = appSettings.PoiId,
})
.SetContentType("application/json")
.PostAsAsync<string>();
var list = JsonConvert.DeserializeObject<JObject>(liststr);
var newlist = new List<string>();
foreach (var item in list["data"])
{
newlist.Add(item.Value<string>("clothSetName"));
}

if (newlist.Any(x=>x==input.ClothSetName))
{
throw Oops.Oh("服装库名称已存在");
}
var str = await $"{appSettings.SXAPIURL}/dfield-api/ecology/cloth/set/create"
.SetBody(new
{
@@ -60,7 +81,7 @@ public class ClothApi
token = _deepelephManager.GetToken(),
tenantCode = appSettings.TenantCode,
poiId = appSettings.PoiId,
clothSetId= clothSetId,
clothSetId = clothSetId,
})
.SetContentType("application/json")
.PostAsAsync<string>();
@@ -133,7 +154,7 @@ public class ClothApi
token = _deepelephManager.GetToken(),
tenantCode = appSettings.TenantCode,
poiId = appSettings.PoiId,
clothSetId= clothSetId
clothSetId = clothSetId
})
.SetContentType("application/json")
.PostAsAsync<string>();
@@ -207,23 +228,38 @@ public class ClothApi
[HttpPost]
public async Task<dynamic> DeleteClothD(ClothInfos info)
{
var appSettings = App.GetOptionsMonitor<AppInfoOptions>();
var str = await $"{appSettings.SXAPIURL}/dfield-api/ecology/cloth/delete"
.SetBody(new
{
token = _deepelephManager.GetToken(),
tenantCode = appSettings.TenantCode,
poiId = appSettings.PoiId,
info.clothSetId,
info.clothId
})
.SetContentType("application/json")
.PostAsAsync<string>();
var model = JsonConvert.DeserializeObject<JObject>(str);
if ((bool)model["success"])
var list = new List<string>();
if (info.clothId.Contains(","))
{
return model["data"];
list = info.clothId.Split(",").ToList();
}
throw Oops.Oh(model["message"].ToString());
else
{
list.Add(info.clothId);
}

foreach (var ids in list)
{
var appSettings = App.GetOptionsMonitor<AppInfoOptions>();
var str = await $"{appSettings.SXAPIURL}/dfield-api/ecology/cloth/delete"
.SetBody(new
{
token = _deepelephManager.GetToken(),
tenantCode = appSettings.TenantCode,
poiId = appSettings.PoiId,
info.clothSetId,
clothId= ids
})
.SetContentType("application/json")
.PostAsAsync<string>();
//var model = JsonConvert.DeserializeObject<JObject>(str);
//if ((bool)model["success"])
//{
// return model["data"];
//}
//throw Oops.Oh(model["message"].ToString());
}

return true;
}
}

+ 9
- 5
SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/DfieldApi.cs Целия файл

@@ -29,6 +29,10 @@ public class DfieldApi : IDynamicApiController
/// <returns></returns>
public async Task<dynamic> CreateDfieldA(ControllersNameInput input)
{
if (await _personSetInfoService.CheckName(input.Name))
{
throw Oops.Oh("【"+input.Name+"】班级名称已存在");
}
var personSetId = Guid.NewGuid().ToString("N");
var appSettings = App.GetOptionsMonitor<AppInfoOptions>();
var str = await $"{appSettings.SXAPIURL}/dfield-api/ecology/person/set/create"
@@ -130,13 +134,13 @@ public class DfieldApi : IDynamicApiController
{
await _personSetInfoService.Delete(ids);
}
return isOk;
}

throw Oops.Oh(model["message"].ToString());
//else
//{
// throw Oops.Oh(model["message"].ToString());
//}
}

return false;
return true;
}
/// <summary>
/// 更新底库


+ 42
- 16
SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/KeyPersonnelController.cs Целия файл

@@ -3,6 +3,8 @@ using MoYu.RemoteRequest;
using MoYu.RemoteRequest.Extensions;
using Newtonsoft.Json.Linq;
using SafeCampus.Application.Manager.DeepelephManager;
using SafeCampus.Application.Services.Business.PersonFacesService;
using SafeCampus.Application.Services.Business.PersonInfoService;
using SafeCampus.Web.Core.Controllers.Application.Business.Dto.Person;

namespace SafeCampus.Web.Core.Controllers.Application.Business;
@@ -15,10 +17,14 @@ namespace SafeCampus.Web.Core.Controllers.Application.Business;
public class KeyPersonnelController
{
private readonly IDeepelephManager _deepelephManager;
private readonly IPersonInfoService _personInfoService;
private readonly IPersonFacesService _personFacesService;

public KeyPersonnelController(IDeepelephManager deepelephManager)
public KeyPersonnelController(IDeepelephManager deepelephManager, IPersonInfoService personInfoService, IPersonFacesService personFacesService)
{
_deepelephManager = deepelephManager;
_personInfoService = personInfoService;
_personFacesService = personFacesService;
}

/// <summary>
@@ -129,25 +135,45 @@ public class KeyPersonnelController
/// <returns></returns>
public async Task<dynamic> DeletePersonD(string id)
{
var appSettings = App.GetOptionsMonitor<AppInfoOptions>();
var str = await $"{appSettings.SXAPIURL}/dfield-api/ecology/person/delete"
.SetBody(new
{
token = _deepelephManager.GetToken(),
tenantCode = appSettings.TenantCode,
poiId = appSettings.PoiId,
personId = id,
var list = new List<string>();
if (id.Contains(","))
{
list = id.Split(",").ToList();
}
else
{
list.Add(id);
}

})
.SetContentType("application/json")
.PostAsAsync<string>();
var model = JsonConvert.DeserializeObject<JObject>(str);
if ((bool)model["success"])
foreach (var ids in list)
{
return model["data"].ToString() == id;
var appSettings = App.GetOptionsMonitor<AppInfoOptions>();
var str = await $"{appSettings.SXAPIURL}/dfield-api/ecology/person/delete"
.SetBody(new
{
token = _deepelephManager.GetToken(),
tenantCode = appSettings.TenantCode,
poiId = appSettings.PoiId,
personId = ids,

})
.SetContentType("application/json")
.PostAsAsync<string>();
//var model = JsonConvert.DeserializeObject<JObject>(str);
//if ((bool)model["success"])
//{
// var isOk = model["data"].ToString() == ids;
// if (isOk)
// {
// await _personInfoService.Delete(ids);
// }
// //return model["data"].ToString() == id;
//}

//throw Oops.Oh(model["message"].ToString());
}

throw Oops.Oh(model["message"].ToString());
return true;
}
/// <summary>
/// 更新人员信息,如果人员不存在,则创建人员;如果人员存在,则覆盖信息。


+ 4
- 4
SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/PersonApi.cs Целия файл

@@ -185,13 +185,13 @@ public class PersonApi : IDynamicApiController
{
await _personInfoService.Delete(ids);
}
return isOk;
//return isOk;
}

throw Oops.Oh(model["message"].ToString());
//throw Oops.Oh(model["message"].ToString());
}

return false;
return true;
}
/// <summary>
/// 更新人员信息
@@ -327,7 +327,7 @@ public class PersonApi : IDynamicApiController
poiId = appSettings.PoiId,
personSetId = search.PersonSetId,
//personId = search.PersonId,
personName = search.PersonName,
personName = search.Name,
pageIndex = search.PageNum,
pageSize = search.PageSize,
})


+ 6
- 2
SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/WarnInfoController.cs Целия файл

@@ -61,8 +61,12 @@ public class WarnInfoController
var model = await _warnInfoService.GetInfo(Id);
if (!string.IsNullOrEmpty(model.Extend))
{
var extend = JsonConvert.DeserializeObject<JObject>(model.Extend);
model.Extend = extend["age"]!=null?$"年龄:{extend["age"]};年龄置信度:{Convert.ToInt32(Convert.ToDecimal(extend["ageProb"])*100)}%;":"";
if (string.IsNullOrEmpty(model.PersonId))
{
var extend = JsonConvert.DeserializeObject<JObject>(model.Extend);
model.Extend = extend["age"] != null ? $"年龄:{extend["age"]};年龄置信度:{Convert.ToInt32(Convert.ToDecimal(extend["ageProb"]) * 100)}%;" : "";
}
}

try


+ 2
- 2
SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Violation/VioAnalysisController.cs Целия файл

@@ -184,8 +184,8 @@ public class VioAnalysisController
var warnList = await _warnInfoService.GetListNoPage(new WarnInfoSearch
{
StartTick = input.StartTime,
EndTick = input.EndTime,
AlarmTypes = warnGroup.Subset.Select(x => x.Code).ToArray(),
EndTick = input.EndTime.AddDays(1).AddSeconds(-1),
AlarmTypes = warnGroup.Subset.Where(x=>x.State).Select(x => x.Code).ToArray(),
PersonSetIds = input.PersonSetIds
});
var templatePath = Path.Combine(Directory.GetCurrentDirectory(), "Template", $"WordTemplate.docx");


+ 6
- 0
SafeCampus.API/SafeCampus.Web.Core/SafeCampus.Web.Core.xml Целия файл

@@ -139,6 +139,12 @@
</summary>
<returns></returns>
</member>
<member name="M:SafeCampus.Web.Core.Controllers.Application.Business.BuildingController.GetBuildCameraList">
<summary>
获取未被宿舍楼使用的摄像头
</summary>
<returns></returns>
</member>
<member name="T:SafeCampus.Web.Core.Controllers.Application.Business.CameraGroupController">
<summary>
摄像头分组管理接口


+ 1
- 1
SafeCampus.API/SafeCampus.Web.Entry/Properties/PublishProfiles/FolderProfile.pubxml.user Целия файл

@@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project>
<PropertyGroup>
<_PublishTargetUrl>F:\Project\QJKJ\SafeCampus\SafeCampus.API\SafeCampus.Web.Entry\bin\Release\net6.0\publish\</_PublishTargetUrl>
<History>True|2024-09-23T06:58:29.0998917Z;True|2024-09-23T14:34:42.4664825+08:00;True|2024-09-23T14:34:14.9788969+08:00;True|2024-09-23T14:21:01.8969413+08:00;True|2024-09-23T14:17:25.6978104+08:00;True|2024-09-23T13:44:21.2948521+08:00;True|2024-09-23T13:42:29.2647186+08:00;True|2024-09-19T17:53:09.3428873+08:00;True|2024-09-19T17:47:47.8015573+08:00;True|2024-09-19T17:33:18.0038814+08:00;True|2024-09-19T17:13:16.6885326+08:00;True|2024-09-19T16:40:10.4911580+08:00;True|2024-09-19T15:32:43.5092007+08:00;True|2024-09-19T14:13:40.1278496+08:00;True|2024-09-19T11:00:03.7642790+08:00;True|2024-09-04T16:01:07.1761640+08:00;True|2024-09-04T15:47:33.3094448+08:00;True|2024-09-04T13:33:22.9396193+08:00;True|2024-08-30T13:27:03.2003529+08:00;True|2024-08-27T15:31:21.7026102+08:00;True|2024-08-20T11:12:26.7141701+08:00;True|2024-08-19T17:23:34.5703879+08:00;True|2024-08-19T15:55:28.3484786+08:00;True|2024-08-19T15:45:49.5623372+08:00;True|2024-08-19T14:56:17.7733738+08:00;True|2024-08-19T14:52:03.2782392+08:00;True|2024-08-19T14:10:57.7043528+08:00;True|2024-08-19T13:38:29.9236695+08:00;False|2024-08-19T13:29:18.8873264+08:00;True|2024-08-19T12:31:57.9280692+08:00;True|2024-08-19T11:50:36.7241244+08:00;True|2024-08-19T10:24:05.0018377+08:00;True|2024-08-19T10:23:30.0445364+08:00;True|2024-08-19T10:12:33.8316906+08:00;True|2024-08-19T10:10:48.0967630+08:00;True|2024-08-16T12:17:51.5743944+08:00;True|2024-08-16T11:36:15.1880346+08:00;True|2024-08-12T11:27:42.2864171+08:00;True|2024-08-09T14:54:42.9062124+08:00;True|2024-08-09T11:49:01.0339449+08:00;True|2024-08-09T11:43:21.9947939+08:00;True|2024-08-09T10:43:25.7641675+08:00;True|2024-08-08T15:23:17.0510180+08:00;True|2024-08-08T15:20:50.3450876+08:00;True|2024-08-08T11:06:43.0783261+08:00;True|2024-08-07T17:24:03.0780935+08:00;True|2024-08-07T17:20:50.6266614+08:00;True|2024-08-07T17:18:15.6367265+08:00;True|2024-08-06T17:31:40.3452266+08:00;True|2024-07-31T16:54:03.1890463+08:00;True|2024-07-30T17:11:33.2514194+08:00;True|2024-07-30T17:08:14.5888060+08:00;True|2024-07-30T09:56:08.6349163+08:00;True|2024-07-30T09:50:02.2368269+08:00;True|2024-07-29T16:20:12.3202393+08:00;True|2024-07-29T16:16:29.9634841+08:00;True|2024-07-29T16:09:51.7696392+08:00;True|2024-07-29T16:06:49.4145658+08:00;True|2024-07-29T15:58:50.6654249+08:00;True|2024-07-29T11:32:11.6206514+08:00;True|2024-07-29T11:26:26.1574563+08:00;True|2024-07-29T11:04:41.1896705+08:00;True|2024-07-29T10:38:38.4560275+08:00;True|2024-07-29T10:33:38.5288332+08:00;False|2024-07-29T10:33:21.0642261+08:00;False|2024-07-29T10:33:00.1005216+08:00;True|2024-07-29T09:54:59.2794860+08:00;True|2024-07-29T09:08:54.4899269+08:00;True|2024-07-26T18:02:13.5407348+08:00;True|2024-07-26T17:46:06.7922851+08:00;True|2024-07-26T15:50:48.6986834+08:00;True|2024-07-26T15:11:17.1696147+08:00;True|2024-07-26T13:58:49.6884964+08:00;True|2024-07-25T17:31:33.0050952+08:00;True|2024-07-25T17:09:12.7084910+08:00;True|2024-07-25T17:02:01.2617736+08:00;True|2024-07-25T16:59:51.6271873+08:00;True|2024-07-25T16:58:05.5249148+08:00;True|2024-07-25T14:14:10.2008367+08:00;False|2024-07-25T14:13:54.0300465+08:00;True|2024-07-25T14:08:57.0244482+08:00;True|2024-07-25T13:41:48.8201522+08:00;True|2024-07-25T10:41:30.7277553+08:00;True|2024-07-25T10:16:05.9105335+08:00;True|2024-07-24T15:31:54.7914854+08:00;True|2024-07-24T09:54:17.6182454+08:00;True|2024-07-23T17:01:18.1510211+08:00;True|2024-07-23T16:41:53.3366577+08:00;True|2024-07-23T16:07:25.4129335+08:00;True|2024-07-23T15:50:42.2437488+08:00;True|2024-07-23T15:19:00.1900116+08:00;True|2024-07-23T14:59:22.8551233+08:00;True|2024-07-23T14:19:55.1193373+08:00;True|2024-07-19T18:04:32.2703039+08:00;True|2024-07-19T15:56:25.4103701+08:00;True|2024-07-19T15:09:00.9662436+08:00;True|2024-07-19T15:05:35.7255851+08:00;True|2024-07-19T13:14:42.9559521+08:00;False|2024-07-19T11:37:52.4020673+08:00;True|2024-07-19T11:10:22.8661346+08:00;</History>
<History>True|2024-09-29T06:44:27.0928205Z;True|2024-09-24T17:04:13.1154955+08:00;True|2024-09-23T14:58:29.0998917+08:00;True|2024-09-23T14:34:42.4664825+08:00;True|2024-09-23T14:34:14.9788969+08:00;True|2024-09-23T14:21:01.8969413+08:00;True|2024-09-23T14:17:25.6978104+08:00;True|2024-09-23T13:44:21.2948521+08:00;True|2024-09-23T13:42:29.2647186+08:00;True|2024-09-19T17:53:09.3428873+08:00;True|2024-09-19T17:47:47.8015573+08:00;True|2024-09-19T17:33:18.0038814+08:00;True|2024-09-19T17:13:16.6885326+08:00;True|2024-09-19T16:40:10.4911580+08:00;True|2024-09-19T15:32:43.5092007+08:00;True|2024-09-19T14:13:40.1278496+08:00;True|2024-09-19T11:00:03.7642790+08:00;True|2024-09-04T16:01:07.1761640+08:00;True|2024-09-04T15:47:33.3094448+08:00;True|2024-09-04T13:33:22.9396193+08:00;True|2024-08-30T13:27:03.2003529+08:00;True|2024-08-27T15:31:21.7026102+08:00;True|2024-08-20T11:12:26.7141701+08:00;True|2024-08-19T17:23:34.5703879+08:00;True|2024-08-19T15:55:28.3484786+08:00;True|2024-08-19T15:45:49.5623372+08:00;True|2024-08-19T14:56:17.7733738+08:00;True|2024-08-19T14:52:03.2782392+08:00;True|2024-08-19T14:10:57.7043528+08:00;True|2024-08-19T13:38:29.9236695+08:00;False|2024-08-19T13:29:18.8873264+08:00;True|2024-08-19T12:31:57.9280692+08:00;True|2024-08-19T11:50:36.7241244+08:00;True|2024-08-19T10:24:05.0018377+08:00;True|2024-08-19T10:23:30.0445364+08:00;True|2024-08-19T10:12:33.8316906+08:00;True|2024-08-19T10:10:48.0967630+08:00;True|2024-08-16T12:17:51.5743944+08:00;True|2024-08-16T11:36:15.1880346+08:00;True|2024-08-12T11:27:42.2864171+08:00;True|2024-08-09T14:54:42.9062124+08:00;True|2024-08-09T11:49:01.0339449+08:00;True|2024-08-09T11:43:21.9947939+08:00;True|2024-08-09T10:43:25.7641675+08:00;True|2024-08-08T15:23:17.0510180+08:00;True|2024-08-08T15:20:50.3450876+08:00;True|2024-08-08T11:06:43.0783261+08:00;True|2024-08-07T17:24:03.0780935+08:00;True|2024-08-07T17:20:50.6266614+08:00;True|2024-08-07T17:18:15.6367265+08:00;True|2024-08-06T17:31:40.3452266+08:00;True|2024-07-31T16:54:03.1890463+08:00;True|2024-07-30T17:11:33.2514194+08:00;True|2024-07-30T17:08:14.5888060+08:00;True|2024-07-30T09:56:08.6349163+08:00;True|2024-07-30T09:50:02.2368269+08:00;True|2024-07-29T16:20:12.3202393+08:00;True|2024-07-29T16:16:29.9634841+08:00;True|2024-07-29T16:09:51.7696392+08:00;True|2024-07-29T16:06:49.4145658+08:00;True|2024-07-29T15:58:50.6654249+08:00;True|2024-07-29T11:32:11.6206514+08:00;True|2024-07-29T11:26:26.1574563+08:00;True|2024-07-29T11:04:41.1896705+08:00;True|2024-07-29T10:38:38.4560275+08:00;True|2024-07-29T10:33:38.5288332+08:00;False|2024-07-29T10:33:21.0642261+08:00;False|2024-07-29T10:33:00.1005216+08:00;True|2024-07-29T09:54:59.2794860+08:00;True|2024-07-29T09:08:54.4899269+08:00;True|2024-07-26T18:02:13.5407348+08:00;True|2024-07-26T17:46:06.7922851+08:00;True|2024-07-26T15:50:48.6986834+08:00;True|2024-07-26T15:11:17.1696147+08:00;True|2024-07-26T13:58:49.6884964+08:00;True|2024-07-25T17:31:33.0050952+08:00;True|2024-07-25T17:09:12.7084910+08:00;True|2024-07-25T17:02:01.2617736+08:00;True|2024-07-25T16:59:51.6271873+08:00;True|2024-07-25T16:58:05.5249148+08:00;True|2024-07-25T14:14:10.2008367+08:00;False|2024-07-25T14:13:54.0300465+08:00;True|2024-07-25T14:08:57.0244482+08:00;True|2024-07-25T13:41:48.8201522+08:00;True|2024-07-25T10:41:30.7277553+08:00;True|2024-07-25T10:16:05.9105335+08:00;True|2024-07-24T15:31:54.7914854+08:00;True|2024-07-24T09:54:17.6182454+08:00;True|2024-07-23T17:01:18.1510211+08:00;True|2024-07-23T16:41:53.3366577+08:00;True|2024-07-23T16:07:25.4129335+08:00;True|2024-07-23T15:50:42.2437488+08:00;True|2024-07-23T15:19:00.1900116+08:00;True|2024-07-23T14:59:22.8551233+08:00;True|2024-07-23T14:19:55.1193373+08:00;True|2024-07-19T18:04:32.2703039+08:00;True|2024-07-19T15:56:25.4103701+08:00;True|2024-07-19T15:09:00.9662436+08:00;True|2024-07-19T15:05:35.7255851+08:00;True|2024-07-19T13:14:42.9559521+08:00;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>

+ 3
- 2
SafeCampus.WEB/src/views/userManage/clothing/index.vue Целия файл

@@ -144,7 +144,7 @@ function onOpen(opt: FormOptEnum, record: {},treeAllData:any) {
async function addDelete(clothSetId: string[],msg: string) {
// 二次确认 => 请求api => 刷新表格
await useHandleData(userManageClothApi.deleteClothDataBaseD, { clothSetId }, msg);
RefreshTree(); //刷新表格
RefreshTree('delete'); //刷新表格
}

/**
@@ -162,7 +162,8 @@ const RefreshTable = () => {
getList(clothSetId.value)
}
// 刷新表格+树
const RefreshTree = async() => {
const RefreshTree = async(type='') => {
if(type == 'delete'){clothSetId.value = ''}
treeKey.value = Math.random();
await getTree(); //刷新树形筛选器
await getList(clothSetId.value)


+ 1
- 1
SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/form_basic.vue Целия файл

@@ -51,7 +51,7 @@
</el-col>
<el-col :span="12">
<s-form-item label="年龄" prop="age">
<s-input v-model="userInfo.age" type="number" min="1"></s-input>
<s-input v-model="userInfo.age" type="number" min="1" max="100"></s-input>
</s-form-item>
</el-col>
</el-row>


+ 10
- 1
SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/index.vue Целия файл

@@ -42,6 +42,14 @@ const sysUserProps = reactive<FormProps.Base<SysUserPersonnel.SysUserPerInfo>>({
record: {},
disabled: false
});
const checkAgeNumber = (rule: any, value: any, callback: any) => {
if (value === "") callback("请输入年龄");
if (value > 100 || value < 0) {
callback(new Error("请输入正确的年龄(年龄范围1-100岁)"));
} else {
return callback();
}
};

// 表单验证规则
const rules = reactive({
@@ -51,7 +59,8 @@ const rules = reactive({
phone: [
{ required: true, message: "请输入手机号", trigger: "blur" },
{ validator: checkPhoneNumber, trigger: "blur" }
]
],
age: [{ validator: checkAgeNumber, trigger: "blur" }]
});

/**


+ 1
- 1
SafeCampus.WEB/src/views/userManage/personnel/components/form/form_basic.vue Целия файл

@@ -73,7 +73,7 @@
</el-col>
<el-col :span="12">
<s-form-item label="年龄" prop="age">
<s-input v-model="userInfo.age"></s-input>
<s-input v-model="userInfo.age" type="number" max="100" min="1"></s-input>
</s-form-item>
</el-col>
</el-row>


+ 10
- 4
SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue Целия файл

@@ -43,7 +43,14 @@ const sysUserProps = reactive<FormProps.Base<SysUserPersonnel.SysUserPerInfo>>({
record: {},
disabled: false
});

const checkAgeNumber = (rule: any, value: any, callback: any) => {
if (value === "") callback("请输入年龄");
if (value > 100 || value < 0) {
callback(new Error("请输入正确的年龄(年龄范围1-100岁)"));
} else {
return callback();
}
};
// 表单验证规则
const rules = reactive({
name: [required("请输入姓名")],
@@ -53,9 +60,8 @@ const rules = reactive({
{ required: true, message: "请输入手机号", trigger: "blur" },
{ validator: checkPhoneNumber, trigger: "blur" }
],
// depId: [required("请选择系部")],
// majorId: [required("请选择专业")],
personSetId: [required("请选择班级")]
personSetId: [required("请选择班级")],
age: [{ validator: checkAgeNumber, trigger: "blur" }]
});

/**


+ 19
- 5
SafeCampus.WEB/src/views/violation/portraitSummary/index.vue Целия файл

@@ -65,7 +65,11 @@ const getDataChart = async () => {
getCharts1(sex.data.label, sex.data.value);
/* 获取学生年龄 */
let age: any = await portraitSummaryApi.getStudentAge();
getCharts2(age.data.label, age.data.value);
let data = {
label: [89, 99, 36, 29, 31, 30, 28, 22, 32, 33, 35, 12012012, 26, 27, 23],
value: [1, 1, 1, 2, 2, 2, 1, 16, 1, 1, 1, 1, 1, 1, 1]
};
getCharts2(data.label, data.value);
/* 获取属性标签 */
let attr: any = await portraitSummaryApi.getStudentAttr();
getCharts4(attr.data.label, attr.data.value);
@@ -104,7 +108,7 @@ function getCharts1(label: any, value: any) {
type: "pie",
radius: "80%",
center: ["50%", "50%"],
roseType: "area",
// roseType: "area",
label: {
normal: {
show: true
@@ -158,10 +162,15 @@ function getCharts2(label: any, value: any) {
{
name: "年龄分布",
type: "pie",
radius: [50, 140],

radius: [50, 110],
roseType: "area",
center: ["35%", "50%"],
data: data,
label: {
bleedMargin: 5,
position: "outer",
alignTo: "none"
},
itemStyle: {
normal: {
label: {
@@ -171,7 +180,12 @@ function getCharts2(label: any, value: any) {
}
},
labelLine: {
show: true
show: true, //数据标签引导线
length: 20,
lineStyle: {
width: 1,
type: "solid"
}
}
}
}


Зареждане…
Отказ
Запис