|
@@ -16,6 +16,7 @@ using MapsterMapper;
|
|
|
using MediatR;
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
+using System.Drawing.Printing;
|
|
|
using XF.Domain.Filters;
|
|
|
using XF.Domain.Repository;
|
|
|
|
|
@@ -459,25 +460,26 @@ namespace DataSharing.Host.Controllers.YiBin
|
|
|
}
|
|
|
|
|
|
//数据处理
|
|
|
- string acceptTypeCode = (object)dto.PurTypeID switch
|
|
|
+ string acceptTypeCode = dto.PurTypeID switch
|
|
|
{
|
|
|
- 17 => "10",
|
|
|
- 18 => "30",
|
|
|
- 19 => "35",
|
|
|
- 20 => "20",
|
|
|
- 21 => "15",
|
|
|
- 25 => "40",
|
|
|
+ "17" => "10",
|
|
|
+ "18" => "30",
|
|
|
+ "19" => "35",
|
|
|
+ "20" => "20",
|
|
|
+ "21" => "15",
|
|
|
+ "25" => "40",
|
|
|
_ => "",
|
|
|
};
|
|
|
-
|
|
|
+ int pageIndex = string.IsNullOrEmpty(dto.CurrentPage) == true ? 1 : Convert.ToInt32(dto.CurrentPage);
|
|
|
+ int pageSize = string.IsNullOrEmpty(dto.PageSize) == true ? 1 : Convert.ToInt32(dto.PageSize);
|
|
|
GetOrderList getOrder = new GetOrderList()
|
|
|
{
|
|
|
Title = dto.Title,
|
|
|
AcceptTypeCode = acceptTypeCode,
|
|
|
StartTime = string.IsNullOrEmpty(dto.StartDate) == true ? null : Convert.ToDateTime(dto.StartDate),
|
|
|
EndTime = string.IsNullOrEmpty(dto.EndDate) == true ? null : Convert.ToDateTime(dto.EndDate).AddDays(1),
|
|
|
- PageIndex = dto.CurrentPage,
|
|
|
- PageSize = dto.PageSize
|
|
|
+ PageIndex = pageIndex,
|
|
|
+ PageSize = pageSize,
|
|
|
};
|
|
|
|
|
|
var result = await _fwClient.RequestNoTokenAsync<HotlineClientDataSharingResponse<PagedDto<PublishDto>>>("api/v1/DataSharing/get_order_list_publish",
|
|
@@ -489,14 +491,14 @@ namespace DataSharing.Host.Controllers.YiBin
|
|
|
if (result.result.Items != null && result.result.Items.Count > 0)
|
|
|
{
|
|
|
//计算总页数
|
|
|
- nPageCount = Convert.ToInt32(Math.Ceiling(Convert.ToDouble(result.result.Total) / dto.PageSize));
|
|
|
+ nPageCount = Convert.ToInt32(Math.Ceiling(Convert.ToDouble(result.result.Total) / pageSize));
|
|
|
int rowID = 0;
|
|
|
foreach (var item in result.result.Items)
|
|
|
{
|
|
|
rowID++;
|
|
|
listData.Add(new GetOrderMediaDataListDto()
|
|
|
{
|
|
|
- RowID = ((dto.CurrentPage - 1) * dto.PageSize) + rowID + "",
|
|
|
+ RowID = ((pageIndex - 1) * pageSize) + rowID + "",
|
|
|
FlowID = item.Id,
|
|
|
Code = item.No,
|
|
|
Title = item.Title,
|
|
@@ -971,14 +973,14 @@ namespace DataSharing.Host.Controllers.YiBin
|
|
|
|
|
|
//数据处理
|
|
|
string acceptTypeCode = "";
|
|
|
- acceptTypeCode = (object)dto.PurTypeID switch
|
|
|
+ acceptTypeCode = dto.PurTypeID switch
|
|
|
{
|
|
|
- 17 => "10",
|
|
|
- 18 => "30",
|
|
|
- 19 => "35",
|
|
|
- 20 => "20",
|
|
|
- 21 => "15",
|
|
|
- 25 => "40",
|
|
|
+ "17" => "10",
|
|
|
+ "18" => "30",
|
|
|
+ "19" => "35",
|
|
|
+ "20" => "20",
|
|
|
+ "21" => "15",
|
|
|
+ "25" => "40",
|
|
|
_ => "",
|
|
|
};
|
|
|
string areaCode = "";
|
|
@@ -1021,14 +1023,16 @@ namespace DataSharing.Host.Controllers.YiBin
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
+ int pageIndex = string.IsNullOrEmpty(dto.CurrentPage) == true ? 1 : Convert.ToInt32(dto.CurrentPage);
|
|
|
+ int pageSize = string.IsNullOrEmpty(dto.PageSize) == true ? 1 : Convert.ToInt32(dto.PageSize);
|
|
|
GetOrderList getOrder = new GetOrderList()
|
|
|
{
|
|
|
Title = dto.Title,
|
|
|
AcceptTypeCode = acceptTypeCode,
|
|
|
StartTime = string.IsNullOrEmpty(dto.StartDate) == true ? null : Convert.ToDateTime(dto.StartDate),
|
|
|
EndTime = string.IsNullOrEmpty(dto.EndDate) == true ? null : Convert.ToDateTime(dto.EndDate).AddDays(1),
|
|
|
- PageIndex = dto.CurrentPage,
|
|
|
- PageSize = dto.PageSize,
|
|
|
+ PageIndex = pageIndex,
|
|
|
+ PageSize = pageSize,
|
|
|
AreaCode = areaCode
|
|
|
};
|
|
|
|
|
@@ -1041,14 +1045,14 @@ namespace DataSharing.Host.Controllers.YiBin
|
|
|
if (result.result.Items != null && result.result.Items.Count > 0)
|
|
|
{
|
|
|
//计算总页数
|
|
|
- nPageCount = Convert.ToInt32(Math.Ceiling(Convert.ToDouble(result.result.Total) / dto.PageSize));
|
|
|
+ nPageCount = Convert.ToInt32(Math.Ceiling(Convert.ToDouble(result.result.Total) /pageSize));
|
|
|
int rowID = 0;
|
|
|
foreach (var item in result.result.Items)
|
|
|
{
|
|
|
rowID++;
|
|
|
listData.Add(new GetOrderMediaDataListDto()
|
|
|
{
|
|
|
- RowID = ((dto.CurrentPage - 1) * dto.PageSize) + rowID + "",
|
|
|
+ RowID = ((pageIndex - 1) * pageSize) + rowID + "",
|
|
|
FlowID = item.Id,
|
|
|
Code = item.No,
|
|
|
Title = item.Title,
|