|
@@ -25,6 +25,9 @@ namespace DataSharing.Host.Controllers.ZiGong
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 自贡12345天府通办、自贡12345观察
|
|
|
+ /// 测试地址:http://110.188.24.28:50105
|
|
|
+ /// 天府通办密钥:FWZGTFTB001
|
|
|
+ /// 自贡观察密钥:FWZGGC716
|
|
|
/// </summary>
|
|
|
public class DockingPlatformController : BaseController
|
|
|
{
|
|
@@ -61,14 +64,16 @@ namespace DataSharing.Host.Controllers.ZiGong
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
+ #region 2.1.1 工单写信
|
|
|
+
|
|
|
/// <summary>
|
|
|
- /// 2.1写信---1
|
|
|
+ /// 2.1 写信---1
|
|
|
/// </summary>
|
|
|
/// <param name="dto"></param>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost("WriteOrder")]
|
|
|
[AllowAnonymous]
|
|
|
- public async Task<OpenResponse> WriteOrder([FromForm] WriteOrderReceiveDto dto)
|
|
|
+ public async Task<OpenResponse> WriteOrder([FromBody] WriteOrderReceiveDto dto)
|
|
|
{
|
|
|
var accountDto = await _dsUserTokenInfoService.CheckAccountAsync(dto.Code, HttpContext.RequestAborted);
|
|
|
if (accountDto is null || accountDto.IsCheckAccount == false)
|
|
@@ -222,14 +227,92 @@ namespace DataSharing.Host.Controllers.ZiGong
|
|
|
|
|
|
}
|
|
|
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 2.1.2 上传附件
|
|
|
+
|
|
|
/// <summary>
|
|
|
- /// 2.2工单列表---1
|
|
|
+ /// 2.1.2 上传附件---1
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="formData"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost("WriteFiles")]
|
|
|
+ [AllowAnonymous]
|
|
|
+ public async Task<OpenResponse> WriteFiles([FromForm] IFormCollection formData)
|
|
|
+ {
|
|
|
+ string Code = formData["Code"];
|
|
|
+ string AcceptCode = formData["AcceptCode"];
|
|
|
+ string AcceptPwd = formData["AcceptPwd"];
|
|
|
+
|
|
|
+ //验证密钥
|
|
|
+ var accountDto = await _dsUserTokenInfoService.CheckAccountAsync(Code, HttpContext.RequestAborted);
|
|
|
+ if (accountDto is null || accountDto.IsCheckAccount == false)
|
|
|
+ {
|
|
|
+ List<ConvergenceMediaDeResponse<string>> convergenceMediaDes = new() {
|
|
|
+ new()
|
|
|
+ {
|
|
|
+ msg = "密钥错误",
|
|
|
+ code = "-900",
|
|
|
+ data = ""
|
|
|
+ } };
|
|
|
+
|
|
|
+ return OpenResponse.Ok(ConvergenceMediaDeResponse<List<ConvergenceMediaDeResponse<string>>>.Failed(convergenceMediaDes, "0", "失败"));
|
|
|
+ }
|
|
|
+
|
|
|
+ //验证数据
|
|
|
+ if (string.IsNullOrEmpty(AcceptCode) || string.IsNullOrEmpty(AcceptPwd))
|
|
|
+ return OpenResponse.Ok(ConvergenceMediaDeResponse<string>.Failed("编号、密码不能为空!", "0", "失败"));
|
|
|
+
|
|
|
+ var dataRaw = await _dsReceiveMediaDataRepository.GetAsync(p => p.OrderCode == AcceptCode, HttpContext.RequestAborted);
|
|
|
+
|
|
|
+ IFormFileCollection files = formData.Files;//等价于Request.Form.Files
|
|
|
+
|
|
|
+ List<FileDto> fileDtos = new();
|
|
|
+
|
|
|
+ foreach (var item in files)
|
|
|
+ {
|
|
|
+ //这里需要上文件服务器上传
|
|
|
+ var businessFileDto = await SendFileData(item);
|
|
|
+
|
|
|
+ string strFileName = item.FileName;
|
|
|
+ string strSuffix = strFileName.LastIndexOf(".") > 0 ? strFileName.Substring(strFileName.LastIndexOf(".") + 1) : "";
|
|
|
+ string strSubFileName = strFileName.LastIndexOf(".") > 0 ? strFileName.Substring(0, strFileName.LastIndexOf(".")) : strFileName;
|
|
|
+ fileDtos.Add(new FileDto()
|
|
|
+ {
|
|
|
+ Name = strSubFileName,
|
|
|
+ Type = strSuffix,
|
|
|
+ Classify = "受理上传",
|
|
|
+ Additions = businessFileDto.id,
|
|
|
+ Path = businessFileDto.path,
|
|
|
+ AllPath = businessFileDto.path,
|
|
|
+ FileName = item.FileName,
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ UpdateOrderFilesDto updateOrderFiles = new()
|
|
|
+ {
|
|
|
+ Files = fileDtos,
|
|
|
+ Id = dataRaw.ExternalId,
|
|
|
+ OrderNo = dataRaw.OrderCode
|
|
|
+ };
|
|
|
+
|
|
|
+ //推送数据
|
|
|
+ var result = await _fwClient.RequestNoTokenAsync<HotlineClientResponse>("api/v1/Order/update-orderfiles", "Post", System.Text.Json.JsonSerializer.Serialize(updateOrderFiles));
|
|
|
+ return OpenResponse.Ok(ConvergenceMediaDeResponse<string>.Success("", "上传成功"));
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 2.2.1 工单列表
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 2.2.1 工单列表
|
|
|
/// </summary>
|
|
|
/// <param name="dto"></param>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost("GetOrderByList")]
|
|
|
[AllowAnonymous]
|
|
|
- public async Task<OpenResponse> GetOrderByList([FromForm] GetOrderMediaReceiveDto dto)
|
|
|
+ public async Task<OpenResponse> GetOrderByList([FromBody] GetOrderMediaReceiveDto dto)
|
|
|
{
|
|
|
//密钥验证
|
|
|
var accountDto = await _dsUserTokenInfoService.CheckAccountAsync(dto.Code, HttpContext.RequestAborted);
|
|
@@ -254,7 +337,7 @@ namespace DataSharing.Host.Controllers.ZiGong
|
|
|
19 => "35",
|
|
|
20 => "20",
|
|
|
21 => "15",
|
|
|
- 25 => "40",
|
|
|
+ 1906 => "25",
|
|
|
_ => "",
|
|
|
};
|
|
|
GetOrderList orderList = new()
|
|
@@ -353,14 +436,18 @@ namespace DataSharing.Host.Controllers.ZiGong
|
|
|
|
|
|
}
|
|
|
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 2.2.2 工单列表(暂不使用)
|
|
|
+
|
|
|
/// <summary>
|
|
|
- /// 2.2工单列表---1
|
|
|
+ /// 2.2.2 工单列表
|
|
|
/// </summary>
|
|
|
/// <param name="dto"></param>
|
|
|
/// <returns></returns>
|
|
|
- [HttpPost("GetOrderByListiyb")]
|
|
|
+ [HttpPost("GetOrderByListWatch")]
|
|
|
[AllowAnonymous]
|
|
|
- public async Task<OpenResponse> GetOrderByListIyb([FromForm] GetOrderMediaReceiveDto dto)
|
|
|
+ public async Task<OpenResponse> GetOrderByListIyb([FromBody] GetOrderMediaReceiveDto dto)
|
|
|
{
|
|
|
//密钥验证
|
|
|
var accountDto = await _dsUserTokenInfoService.CheckAccountAsync(dto.Code, HttpContext.RequestAborted);
|
|
@@ -484,13 +571,17 @@ namespace DataSharing.Host.Controllers.ZiGong
|
|
|
|
|
|
}
|
|
|
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 2.3 工单查询
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 2.3 工单查询---1
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost("GetOrderDetail")]
|
|
|
[AllowAnonymous]
|
|
|
- public async Task<OpenResponse> GetOrderDetail([FromForm] MediaOrderDetailReceiveDto dto)
|
|
|
+ public async Task<OpenResponse> GetOrderDetail([FromBody] MediaOrderDetailReceiveDto dto)
|
|
|
{
|
|
|
//验证密钥
|
|
|
var accountDto = await _dsUserTokenInfoService.CheckAccountAsync(dto.Code, HttpContext.RequestAborted);
|
|
@@ -574,6 +665,10 @@ namespace DataSharing.Host.Controllers.ZiGong
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 2.4 今日受理分类统计
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 2.4 今日受理分类统计---1
|
|
|
/// </summary>
|
|
@@ -581,10 +676,10 @@ namespace DataSharing.Host.Controllers.ZiGong
|
|
|
/// <returns></returns>
|
|
|
[HttpPost("GetPurTypeReport")]
|
|
|
[AllowAnonymous]
|
|
|
- public async Task<OpenResponse> GetPurTypeReport([FromForm] string Code)
|
|
|
+ public async Task<OpenResponse> GetPurTypeReport([FromBody] MediaOrderReportReceiveDto dto)
|
|
|
{
|
|
|
//验证密钥
|
|
|
- var accountDto = await _dsUserTokenInfoService.CheckAccountAsync(Code, HttpContext.RequestAborted);
|
|
|
+ var accountDto = await _dsUserTokenInfoService.CheckAccountAsync(dto.Code, HttpContext.RequestAborted);
|
|
|
if (accountDto is null || accountDto.IsCheckAccount == false)
|
|
|
{
|
|
|
List<ConvergenceMediaDeResponse<string>> convergenceMediaDes = new() {
|
|
@@ -612,6 +707,10 @@ namespace DataSharing.Host.Controllers.ZiGong
|
|
|
return OpenResponse.Ok(ConvergenceMediaDeResponse<List<GetPurTypeReportDataDto>>.Success(data, "成功"));
|
|
|
}
|
|
|
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 2.5 答复公开
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 2.5 答复公开---1
|
|
|
/// </summary>
|
|
@@ -619,7 +718,7 @@ namespace DataSharing.Host.Controllers.ZiGong
|
|
|
/// <returns></returns>
|
|
|
[HttpPost("GetOrderByListOpen")]
|
|
|
[AllowAnonymous]
|
|
|
- public async Task<OpenResponse> GetOrderByListOpen([FromForm] GetOrderMediaReceiveOpenDto dto)
|
|
|
+ public async Task<OpenResponse> GetOrderByListOpen([FromBody] GetOrderMediaReceiveOpenDto dto)
|
|
|
{
|
|
|
//密钥验证
|
|
|
var accountDto = await _dsUserTokenInfoService.CheckAccountAsync(dto.Code, HttpContext.RequestAborted);
|
|
@@ -704,6 +803,10 @@ namespace DataSharing.Host.Controllers.ZiGong
|
|
|
return OpenResponse.Ok(ConvergenceMediaDeResponse<List<GetOrderMediaDataDto>>.Success(dataDto, "成功"));
|
|
|
}
|
|
|
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 2.6 办理明细
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 2.6 办理明细
|
|
|
/// </summary>
|
|
@@ -711,7 +814,7 @@ namespace DataSharing.Host.Controllers.ZiGong
|
|
|
/// <returns></returns>
|
|
|
[HttpPost("GetOrderByRun")]
|
|
|
[AllowAnonymous]
|
|
|
- public async Task<OpenResponse> GetOrderByRun([FromForm] MediaOrderDetailReceiveDto dto)
|
|
|
+ public async Task<OpenResponse> GetOrderByRun([FromBody] MediaOrderDetailReceiveDto dto)
|
|
|
{
|
|
|
//密钥验证
|
|
|
var accountDto = await _dsUserTokenInfoService.CheckAccountAsync(dto.Code, HttpContext.RequestAborted);
|
|
@@ -762,75 +865,7 @@ namespace DataSharing.Host.Controllers.ZiGong
|
|
|
return OpenResponse.Ok(ConvergenceMediaDeResponse<IReadOnlyList<GetOrderByRunDataDto>>.Success(orderByRunData, "成功"));
|
|
|
}
|
|
|
|
|
|
- /// <summary>
|
|
|
- /// 2.1.3 上传附件---1
|
|
|
- /// </summary>
|
|
|
- /// <param name="formData"></param>
|
|
|
- /// <returns></returns>
|
|
|
- [HttpPost("WriteFiles")]
|
|
|
- [AllowAnonymous]
|
|
|
- public async Task<OpenResponse> WriteFiles([FromForm] IFormCollection formData)
|
|
|
- {
|
|
|
- string Code = formData["Code"];
|
|
|
- string AcceptCode = formData["AcceptCode"];
|
|
|
- string AcceptPwd = formData["AcceptPwd"];
|
|
|
-
|
|
|
- //验证密钥
|
|
|
- var accountDto = await _dsUserTokenInfoService.CheckAccountAsync(Code, HttpContext.RequestAborted);
|
|
|
- if (accountDto is null || accountDto.IsCheckAccount == false)
|
|
|
- {
|
|
|
- List<ConvergenceMediaDeResponse<string>> convergenceMediaDes = new() {
|
|
|
- new()
|
|
|
- {
|
|
|
- msg = "密钥错误",
|
|
|
- code = "-900",
|
|
|
- data = ""
|
|
|
- } };
|
|
|
-
|
|
|
- return OpenResponse.Ok(ConvergenceMediaDeResponse<List<ConvergenceMediaDeResponse<string>>>.Failed(convergenceMediaDes, "0", "失败"));
|
|
|
- }
|
|
|
-
|
|
|
- //验证数据
|
|
|
- if (string.IsNullOrEmpty(AcceptCode) || string.IsNullOrEmpty(AcceptPwd))
|
|
|
- return OpenResponse.Ok(ConvergenceMediaDeResponse<string>.Failed("编号、密码不能为空!", "0", "失败"));
|
|
|
-
|
|
|
- var dataRaw = await _dsReceiveMediaDataRepository.GetAsync(p => p.OrderCode == AcceptCode, HttpContext.RequestAborted);
|
|
|
-
|
|
|
- IFormFileCollection files = formData.Files;//等价于Request.Form.Files
|
|
|
-
|
|
|
- List<FileDto> fileDtos = new();
|
|
|
-
|
|
|
- foreach (var item in files)
|
|
|
- {
|
|
|
- //这里需要上文件服务器上传
|
|
|
- var businessFileDto = await SendFileData(item);
|
|
|
-
|
|
|
- string strFileName = item.FileName;
|
|
|
- string strSuffix = strFileName.LastIndexOf(".") > 0 ? strFileName.Substring(strFileName.LastIndexOf(".") + 1) : "";
|
|
|
- string strSubFileName = strFileName.LastIndexOf(".") > 0 ? strFileName.Substring(0, strFileName.LastIndexOf(".")) : strFileName;
|
|
|
- fileDtos.Add(new FileDto()
|
|
|
- {
|
|
|
- Name = strSubFileName,
|
|
|
- Type = strSuffix,
|
|
|
- Classify = "受理上传",
|
|
|
- Additions = businessFileDto.id,
|
|
|
- Path = businessFileDto.path,
|
|
|
- AllPath = businessFileDto.path,
|
|
|
- FileName = item.FileName,
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- UpdateOrderFilesDto updateOrderFiles = new()
|
|
|
- {
|
|
|
- Files = fileDtos,
|
|
|
- Id = dataRaw.ExternalId,
|
|
|
- OrderNo = dataRaw.OrderCode
|
|
|
- };
|
|
|
-
|
|
|
- //推送数据
|
|
|
- var result = await _fwClient.RequestNoTokenAsync<HotlineClientResponse>("api/v1/Order/update-orderfiles", "Post", System.Text.Json.JsonSerializer.Serialize(updateOrderFiles));
|
|
|
- return OpenResponse.Ok(ConvergenceMediaDeResponse<string>.Success("", "上传成功"));
|
|
|
- }
|
|
|
+ #endregion
|
|
|
|
|
|
#region 私有方法-将文件转化为文件流
|
|
|
|
|
@@ -978,7 +1013,5 @@ namespace DataSharing.Host.Controllers.ZiGong
|
|
|
return strParam;
|
|
|
}
|
|
|
#endregion
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
}
|