|
@@ -2972,11 +2972,31 @@ public class OrderController : BaseController
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
- /// 获取工单甄别所有文件
|
|
|
+ /// 更新甄别信息
|
|
|
/// </summary>
|
|
|
- /// <param name="id"></param>
|
|
|
+ /// <param name="dto"></param>
|
|
|
/// <returns></returns>
|
|
|
- [HttpGet("screen/all_file/{id}")]
|
|
|
+ [HttpPut("order_screen_alter")]
|
|
|
+ [LogFilter("更新甄别信息")]
|
|
|
+ public async Task Update([FromBody] OrderScreenAlterDto dto)
|
|
|
+ {
|
|
|
+ var screen = await _orderScreenRepository.GetAsync(dto.ScreenId);
|
|
|
+ var FileJson = new List<Share.Dtos.File.FileJson>();
|
|
|
+ if (dto.Files.Any())
|
|
|
+ FileJson = await _fileRepository.AddFileAsync(dto.Files, dto.ScreenId, "", HttpContext.RequestAborted);
|
|
|
+ else
|
|
|
+ FileJson = screen.FileJson;
|
|
|
+ dto.Content = string.IsNullOrEmpty(dto.Content) ? screen.Content : dto.Content;
|
|
|
+ await _orderScreenRepository.Updateable().SetColumns(x => new OrderScreen { Content = dto.Content,FileJson = FileJson })
|
|
|
+ .Where(x => x.Id == dto.ScreenId).ExecuteCommandAsync();
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 获取工单甄别所有文件
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="id"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpGet("screen/all_file/{id}")]
|
|
|
public async Task<List<FileDto>> GetOrderScreenAllFile(string id)
|
|
|
{
|
|
|
var screen = await _orderScreenRepository.GetAsync(id);
|