|
@@ -22,6 +22,7 @@ using Mapster;
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
using SqlSugar;
|
|
|
+using SqlSugar.Extensions;
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
using System.Reflection;
|
|
|
using XF.Domain.Authentications;
|
|
@@ -86,7 +87,7 @@ public class SnapshotController : BaseController
|
|
|
[LogFilter("添加随手拍工单")]
|
|
|
public async Task<AddSnapshotOrderOutDto> AddOrderAsync([FromBody] AddSnapshotOrderInDto dto)
|
|
|
{
|
|
|
- var ssp = _systemDicDataCacheManager.SourceChannel.FirstOrDefault(m => m.DicDataName == "随手拍")
|
|
|
+ var ssp = _systemDicDataCacheManager.SourceChannel.FirstOrDefault(m => m.DicDataName == "随手拍")
|
|
|
?? throw UserFriendlyException.SameMessage("请添加[随手拍]来源.");
|
|
|
var order = dto.Adapt<Order>();
|
|
|
dto.ValidateObject();
|
|
@@ -113,6 +114,8 @@ public class SnapshotController : BaseController
|
|
|
orderSnapshot.IndustryId = dto.IndustryId;
|
|
|
orderSnapshot.IndustryName = industry.Name;
|
|
|
orderSnapshot.CompanyName = dto.CompanyName;
|
|
|
+ if (dto.StartWorkTime.NotNullOrEmpty()) orderSnapshot.StartWorkTime = dto.StartWorkTime.ObjToDate();
|
|
|
+ if (dto.EndWorkTime.NotNullOrEmpty()) orderSnapshot.EndWorkTime = dto.EndWorkTime.ObjToDate();
|
|
|
await _orderSnapshotRepository.AddAsync(orderSnapshot);
|
|
|
return order.Adapt<AddSnapshotOrderOutDto>();
|
|
|
}
|
|
@@ -261,7 +264,7 @@ public class SnapshotController : BaseController
|
|
|
/// <param name="dtos"></param>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost("practitioner")]
|
|
|
- public async Task AddPractitionerAsync([FromBody]IList<AddBatchPractitionerInDto> dtos)
|
|
|
+ public async Task AddPractitionerAsync([FromBody] IList<AddBatchPractitionerInDto> dtos)
|
|
|
=> await _snapshotApplication.AddPractitionerAsync(dtos);
|
|
|
|
|
|
/// <summary>
|
|
@@ -281,7 +284,7 @@ public class SnapshotController : BaseController
|
|
|
/// <returns></returns>
|
|
|
[HttpGet("practitioner")]
|
|
|
[AllowAnonymous]
|
|
|
- public async Task<IList<PractitionerItemOutDto>> GetPractitionerDetailAsync([FromQuery]PractitionerItemInDto dto)
|
|
|
+ public async Task<IList<PractitionerItemOutDto>> GetPractitionerDetailAsync([FromQuery] PractitionerItemInDto dto)
|
|
|
=> await _snapshotApplication.GetPractitionerItemsAsync(dto, HttpContext.RequestAborted);
|
|
|
|
|
|
/// <summary>
|
|
@@ -301,7 +304,7 @@ public class SnapshotController : BaseController
|
|
|
/// <returns></returns>
|
|
|
[HttpGet("report/base")]
|
|
|
public Dictionary<string, dynamic> GetReportBaseAsync()
|
|
|
- {
|
|
|
+ {
|
|
|
return new Dictionary<string, dynamic>
|
|
|
{
|
|
|
{ "jobType", _systemDicDataCacheManager.JobType },
|