shanji 3 years ago
parent
commit
5bd129d1c1
  1. 61
      BBWY.Client/APIServices/FinancialTerminalService.cs
  2. 96
      BBWY.Client/Models/APIModel/Response/FinancialTerminal/AuditPayBillResponse.cs
  3. 2
      BBWY.Client/Models/FinancialTerminal/ProcurementAudit/AuditPayBill.cs
  4. 2
      BBWY.Client/Models/MappingProfile.cs
  5. 53
      BBWY.Client/ViewModels/FinancialTerminal/ProcurementAuditViewModel.cs
  6. 149
      BBWY.Client/Views/FinancialTerminal/ProcurementAudit.xaml
  7. 2
      BBWY.Server.Business/FinancialTerminal/FinancialTerminalBusiness.cs
  8. 7
      BBWY.Server.Model/Db/FinancialTerminal/AuditPayBill.cs
  9. 10
      BBWY.Server.Model/Enums.cs

61
BBWY.Client/APIServices/FinancialTerminalService.cs

@ -0,0 +1,61 @@
using BBWY.Client.Models;
using BBWY.Common.Http;
using BBWY.Common.Models;
using System;
using System.Collections.Generic;
using System.Net.Http;
namespace BBWY.Client.APIServices
{
public class FinancialTerminalService : BaseApiService, IDenpendency
{
public FinancialTerminalService(RestApiService restApiService, GlobalContext globalContext) : base(restApiService, globalContext)
{
}
/// <summary>
/// 查询账单
/// </summary>
/// <param name="importShopIds"></param>
/// <param name="startDate"></param>
/// <param name="endDate"></param>
/// <returns></returns>
public ApiResponse<IList<AuditPayBillResponse>> GetAuditPayBillList(string importShopIds, DateTime startDate, DateTime endDate)
{
return SendRequest<IList<AuditPayBillResponse>>(globalContext.BBYWApiHost, "Api/FinancialTerminal/GetAuditPayBillList", new
{
importShopIds,
startDate,
endDate
}, null, HttpMethod.Post);
}
/// <summary>
/// 批量插入账单
/// </summary>
/// <param name="insertList"></param>
/// <returns></returns>
public ApiResponse<object> BatchInsertAuditPayBill(IList<AuditPayBill> insertList)
{
return SendRequest<object>(globalContext.BBYWApiHost, "Api/FinancialTerminal/BatchInsertAuditPayBill", insertList, null, HttpMethod.Post);
}
/// <summary>
/// 检测账单是否存在
/// </summary>
/// <param name="importShopIds"></param>
/// <param name="startDate"></param>
/// <param name="endDate"></param>
/// <returns></returns>
public ApiResponse<bool> IsExistAuditPayBill(string importShopIds, DateTime startDate, DateTime endDate)
{
return SendRequest<bool>(globalContext.BBYWApiHost, "Api/FinancialTerminal/IsExistAuditPayBill", new
{
importShopIds,
startDate,
endDate
}, null, HttpMethod.Post);
}
}
}

96
BBWY.Client/Models/APIModel/Response/FinancialTerminal/AuditPayBillResponse.cs

@ -0,0 +1,96 @@
using System;
namespace BBWY.Client.Models
{
public class AuditPayBillResponse
{
/// <summary>
/// 账单流水号
/// </summary>
public long PayBillNo { get; set; }
/// <summary>
/// 归属店铺
/// </summary>
public string BelongShop { get; set; }
/// <summary>
/// 归属店铺Id
/// </summary>
public int? BelongShopId { get; set; }
public DateTime? CreateTime { get; set; }
/// <summary>
/// 支出金额
/// </summary>
public decimal? ExpenditureAmount { get; set; }
/// <summary>
/// 收入金额
/// </summary>
public decimal? IncomeAmount { get; set; }
/// <summary>
/// 是否支持商户订单号
/// </summary>
public bool? IsSupportMerchantOrderNo { get; set; }
/// <summary>
/// 格式化之后的商家订单号
/// </summary>
public string MerchantOrderNo { get; set; }
/// <summary>
/// 对方账户
/// </summary>
public string OppositeAccount { get; set; }
/// <summary>
/// 账单类型
/// </summary>
public PayBillType? PayBillType { get; set; }
/// <summary>
/// 支付时间
/// </summary>
public DateTime? PayTime { get; set; }
/// <summary>
/// 商品名称
/// </summary>
public string ProductName { get; set; }
/// <summary>
/// 关联采购订单号
/// </summary>
public string RelationPurchaseOrderId { get; set; }
/// <summary>
/// 关联平台订单Id
/// </summary>
public string RelationShopOrderId { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 原始商家订单号
/// </summary>
public string SourceMerchantOrderNo { get; set; }
/// <summary>
/// 导入时选择的店铺
/// </summary>
public string ImportShopIds { get; set; }
}
}

2
BBWY.Client/Models/FinancialTerminal/ProcurementAudit/AuditPayBill.cs

@ -56,7 +56,7 @@ namespace BBWY.Client.Models
/// </summary> /// </summary>
public decimal IncomeAmount { get; set; } public decimal IncomeAmount { get; set; }
public long BelongShopId { get; set; } public long? BelongShopId { get; set; }
/// <summary> /// <summary>
/// 归属店铺 /// 归属店铺

2
BBWY.Client/Models/MappingProfile.cs

@ -14,7 +14,7 @@ namespace BBWY.Client.Models
CreateMap<AfterSaleOrderResponse, AfterSaleOrder>(); CreateMap<AfterSaleOrderResponse, AfterSaleOrder>();
CreateMap<OrderResponse, Order>(); CreateMap<OrderResponse, Order>();
CreateMap<OrderSkuResponse, OrderSku>().ForMember(t => t.ProductItemNum, opt => opt.MapFrom(f => f.ProductNo)); CreateMap<OrderSkuResponse, OrderSku>().ForMember(t => t.ProductItemNum, opt => opt.MapFrom(f => f.ProductNo));
CreateMap<AuditPayBillResponse, AuditPayBill>();
CreateMap<MDSUserResponse, User>().ForMember(t => t.TeamId, opt => opt.MapFrom(f => f.DepartmentId)) CreateMap<MDSUserResponse, User>().ForMember(t => t.TeamId, opt => opt.MapFrom(f => f.DepartmentId))
.ForMember(t => t.TeamName, opt => opt.MapFrom(f => f.DepartmentName)) .ForMember(t => t.TeamName, opt => opt.MapFrom(f => f.DepartmentName))
.ForMember(t => t.Name, opt => opt.MapFrom(f => f.UserName)); .ForMember(t => t.Name, opt => opt.MapFrom(f => f.UserName));

53
BBWY.Client/ViewModels/FinancialTerminal/ProcurementAuditViewModel.cs

@ -30,6 +30,11 @@ namespace BBWY.Client.ViewModels
private Department selectedDepartment; private Department selectedDepartment;
private DateTime startDate; private DateTime startDate;
private DateTime endDate; private DateTime endDate;
private Shop selectResultShop;
private bool noMatchPurchaseOrder;
private bool noChooseFundType;
private string searchResultPurchaseOrder;
public Department SelectedDepartment public Department SelectedDepartment
{ {
get => selectedDepartment; set get => selectedDepartment; set
@ -58,7 +63,7 @@ namespace BBWY.Client.ViewModels
get => selectAuditFile; set get => selectAuditFile; set
{ {
if (Set(ref selectAuditFile, value)) if (Set(ref selectAuditFile, value))
OnSelectAuditFileChanged(); SearchLocal();
} }
} }
@ -75,11 +80,7 @@ namespace BBWY.Client.ViewModels
public bool OnlyException public bool OnlyException
{ {
get => onlyException; set get => onlyException; set { Set(ref onlyException, value); }
{
if (Set(ref onlyException, value))
OnOnlyExceptionChanged();
}
} }
public ICommand AuditCommand { get; set; } public ICommand AuditCommand { get; set; }
@ -92,6 +93,16 @@ namespace BBWY.Client.ViewModels
public ICommand ImportJDShopOrderCommand { get; set; } public ICommand ImportJDShopOrderCommand { get; set; }
public ICommand SearchHistoryCommand { get; set; }
public ICommand SearchLocalCommand { get; set; }
public Shop SelectResultShop { get => selectResultShop; set { Set(ref selectResultShop, value); } }
public bool NoMatchPurchaseOrder { get => noMatchPurchaseOrder; set { Set(ref noMatchPurchaseOrder, value); } }
public bool NoChooseFundType { get => noChooseFundType; set { Set(ref noChooseFundType, value); } }
public string SearchResultPurchaseOrder { get => searchResultPurchaseOrder; set { Set(ref searchResultPurchaseOrder, value); } }
public ProcurementAuditViewModel(PurchaseOrderService purchaseOrderService, GlobalContext globalContext) public ProcurementAuditViewModel(PurchaseOrderService purchaseOrderService, GlobalContext globalContext)
{ {
this.globalContext = globalContext; this.globalContext = globalContext;
@ -99,6 +110,8 @@ namespace BBWY.Client.ViewModels
AuditCommand = new RelayCommand(Audit); AuditCommand = new RelayCommand(Audit);
ClearAuditCommand = new RelayCommand(ClearAudit); ClearAuditCommand = new RelayCommand(ClearAudit);
ImportAliPayBillCommand = new RelayCommand(ImportAliPayBill); ImportAliPayBillCommand = new RelayCommand(ImportAliPayBill);
SearchHistoryCommand = new RelayCommand(SearchHistory);
SearchLocalCommand = new RelayCommand(SearchLocal);
this.purchaseOrderService = purchaseOrderService; this.purchaseOrderService = purchaseOrderService;
DepartmentList = new ObservableCollection<Department>(); DepartmentList = new ObservableCollection<Department>();
@ -117,6 +130,13 @@ namespace BBWY.Client.ViewModels
SelectedDepartment = DepartmentList[0]; SelectedDepartment = DepartmentList[0];
} }
private void SearchHistory()
{
if (IsLoading)
return;
}
private void Audit() private void Audit()
{ {
if (IsLoading) if (IsLoading)
@ -254,6 +274,8 @@ namespace BBWY.Client.ViewModels
//IsShowPurchaseOrderPanel = false; //IsShowPurchaseOrderPanel = false;
//IsShowShopOrderPanel = false; //IsShowShopOrderPanel = false;
OnlyException = false; OnlyException = false;
SelectResultShop = null;
} }
private (string ErrorMessage, string FileName, List<string> Lines) ImportAuditFile(AuditFileType auditFileType) private (string ErrorMessage, string FileName, List<string> Lines) ImportAuditFile(AuditFileType auditFileType)
@ -370,7 +392,7 @@ namespace BBWY.Client.ViewModels
/// <summary> /// <summary>
/// 采购审计文件对象改变事件 /// 采购审计文件对象改变事件
/// </summary> /// </summary>
private void OnSelectAuditFileChanged() private void SearchLocal()
{ {
if (SelectAuditFile == null) if (SelectAuditFile == null)
return; return;
@ -381,19 +403,18 @@ namespace BBWY.Client.ViewModels
var where = AuditPayBillList.Where(b => b.BelongFileName == SelectAuditFile.FileName); var where = AuditPayBillList.Where(b => b.BelongFileName == SelectAuditFile.FileName);
if (OnlyException) if (OnlyException)
where = where.Where(b => !string.IsNullOrEmpty(b.ErrorMessage)); where = where.Where(b => !string.IsNullOrEmpty(b.ErrorMessage));
if (NoMatchPurchaseOrder)
where = where.Where(b => !string.IsNullOrEmpty(b.ErrorMessage) && b.ErrorMessage == "未匹配采购单");
if (NoChooseFundType)
where = where.Where(b => !string.IsNullOrEmpty(b.ErrorMessage) && b.ErrorMessage == "未选资金类型");
if (SelectResultShop != null)
where = where.Where(b => b.BelongShopId != null && b.BelongShopId.Value == SelectResultShop.ShopId);
if (string.IsNullOrEmpty(SearchResultPurchaseOrder))
where = where.Where(b => b.RelationPurchaseOrderId == SearchResultPurchaseOrder);
var list = where.ToList(); var list = where.ToList();
foreach (var b in list) foreach (var b in list)
ShowAuditPayBillList.Add(b); ShowAuditPayBillList.Add(b);
} }
} }
private void OnOnlyExceptionChanged()
{
if (SelectAuditFile == null || AuditFileList.Count() == 0)
return;
var f = SelectAuditFile;
SelectAuditFile = null;
SelectAuditFile = f;
}
} }
} }

149
BBWY.Client/Views/FinancialTerminal/ProcurementAudit.xaml

@ -25,7 +25,7 @@
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="40"/> <RowDefinition Height="40"/>
<RowDefinition Height="5"/> <RowDefinition Height="5"/>
<RowDefinition Height="auto"/> <RowDefinition Height="30"/>
<RowDefinition Height="5"/> <RowDefinition Height="5"/>
<RowDefinition Height="30"/> <RowDefinition Height="30"/>
<RowDefinition Height="5"/> <RowDefinition Height="5"/>
@ -64,9 +64,9 @@
</hc:CheckComboBox> </hc:CheckComboBox>
<DatePicker Width="100" Height="30" Margin="5,0,0,0" SelectedDate="{Binding StartDate,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> <DatePicker Width="100" Height="30" Margin="5,0,0,0" SelectedDate="{Binding StartDate,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
<DatePicker Width="100" Height="30" Margin="5,0,0,0" SelectedDate="{Binding EndDate,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/> <DatePicker Width="100" Height="30" Margin="5,0,0,0" SelectedDate="{Binding EndDate,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
<c:BButton Content="查询" Margin="5,0,0,0" Padding="10,0" Command="{Binding AuditCommand}"/> <c:BButton Content="查询" Margin="5,0,0,0" Padding="10,0" Command="{Binding SearchHistoryCommand}"/>
<c:BButton Content="审计" Margin="5,0,0,0" Padding="10,0" Command="{Binding AuditCommand}"/> <c:BButton Content="审计" Padding="10,0" Command="{Binding AuditCommand}" Background="#02A7F0"/>
<c:BButton Content="清空" Margin="5,0,0,0" Padding="10,0" Command="{Binding ClearAuditCommand}"/> <c:BButton Content="清空" Padding="10,0" Command="{Binding ClearAuditCommand}" Background="#1CC2A2"/>
</StackPanel> </StackPanel>
</Border> </Border>
@ -76,86 +76,97 @@
<RowDefinition Height="40"/> <RowDefinition Height="40"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
<ColumnDefinition/> <ColumnDefinition/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBlock Text="支付数据" Visibility="Collapsed"/>
<TextBlock Text="采购数据" Grid.Column="1" Visibility="Collapsed"/>
<TextBlock Text="销售数据" Grid.Column="2" Visibility="Collapsed"/>
<Border Background="{StaticResource Border.Background}" Grid.Row="1" Grid.ColumnSpan="3" Margin="0,0,5,0"> <Border>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<c:BButton Content="导入支付宝账单" Padding="10,0" Margin="5,0,0,0" Command="{Binding ImportAliPayBillCommand}"/> <c:BButton Content="导入支付宝账单" Padding="10,0" Margin="5,0,0,0" Command="{Binding ImportAliPayBillCommand}"/>
<c:BButton Content="导入微信账单" Padding="10,0" Margin="5,0,0,0" <c:BButton Content="导入微信账单" Padding="10,0" Margin="5,0,0,0"
IsEnabled="False" DisableText="{Binding Content,RelativeSource={RelativeSource Mode=Self}}"/> IsEnabled="False" DisableText="{Binding Content,RelativeSource={RelativeSource Mode=Self}}"/>
</StackPanel> </StackPanel>
</Border> </Border>
<ListBox ItemsSource="{Binding AuditFileList}"
<Border Background="{StaticResource Border.Background}" Grid.Row="1" Grid.Column="1" Margin="0,0,5,0" Visibility="Collapsed"> SelectedItem="{Binding SelectAuditFile,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
<StackPanel Orientation="Horizontal"> Grid.Column="1"
<c:BButton Content="导入1688采购单" Padding="10,0" Margin="5,0,0,0" Command="{Binding Import1688PurchaseOrderCommand}"/> IsEnabled="{Binding IsAudited,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
<c:BButton Content="导入淘宝采购单" Padding="10,0" Margin="5,0,0,0" Margin="5,0,0,0">
IsEnabled="False" DisableText="{Binding Content,RelativeSource={RelativeSource Mode=Self}}"/> <ListBox.ItemContainerStyle>
<c:BButton Content="导入拼多多采购单" Padding="10,0" Margin="5,0,0,0" <Style TargetType="ListBoxItem" BasedOn="{StaticResource NoBgListBoxItemStyle}">
IsEnabled="False" DisableText="{Binding Content,RelativeSource={RelativeSource Mode=Self}}"/> <Style.Triggers>
</StackPanel> <DataTrigger Binding="{Binding AuditFileType}" Value="销售订单">
</Border> <Setter Property="IsEnabled" Value="False"/>
</DataTrigger>
<Border Background="{StaticResource Border.Background}" Grid.Row="1" Grid.Column="2" Visibility="Collapsed"> </Style.Triggers>
<StackPanel Orientation="Horizontal"> </Style>
<c:BButton Content="后台出单表(京东)" Padding="10,0" Margin="5,0,0,0" Command="{Binding ImportJDShopOrderCommand}"/> </ListBox.ItemContainerStyle>
<c:BButton Content="后台出单表(淘宝)" Padding="10,0" Margin="5,0,0,0" <ListBox.ItemsPanel>
IsEnabled="False" DisableText="{Binding Content,RelativeSource={RelativeSource Mode=Self}}"/> <ItemsPanelTemplate>
<c:BButton Content="后台出单表(拼多多)" Padding="10,0" Margin="5,0,0,0" <StackPanel Orientation="Horizontal"/>
IsEnabled="False" DisableText="{Binding Content,RelativeSource={RelativeSource Mode=Self}}"/> </ItemsPanelTemplate>
</StackPanel> </ListBox.ItemsPanel>
</Border> <ListBox.ItemTemplate>
</Grid> <DataTemplate>
<Border BorderThickness="1"
<ListBox ItemsSource="{Binding AuditFileList}"
SelectedItem="{Binding SelectAuditFile,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
Grid.Row="4"
IsEnabled="{Binding IsAudited,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}">
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem" BasedOn="{StaticResource NoBgListBoxItemStyle}">
<Style.Triggers>
<DataTrigger Binding="{Binding AuditFileType}" Value="销售订单">
<Setter Property="IsEnabled" Value="False"/>
</DataTrigger>
</Style.Triggers>
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Border BorderThickness="1"
BorderBrush="{StaticResource Border.Brush}" BorderBrush="{StaticResource Border.Brush}"
Height="30" Height="30"
Padding="5,0" Padding="5,0"
Margin="0,0,-1,0"> Margin="0,0,-1,0">
<TextBlock x:Name="txtFileName" Text="{Binding FileName}" <TextBlock x:Name="txtFileName" Text="{Binding FileName}"
VerticalAlignment="Center"/> VerticalAlignment="Center"/>
</Border> </Border>
<DataTemplate.Triggers> <DataTemplate.Triggers>
<DataTrigger Binding="{Binding IsSelected,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBoxItem}}}" <DataTrigger Binding="{Binding IsSelected,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type ListBoxItem}}}"
Value="True"> Value="True">
<DataTrigger.Setters> <DataTrigger.Setters>
<Setter TargetName="txtFileName" Property="Foreground" Value="{StaticResource Text.Link.Color }"/> <Setter TargetName="txtFileName" Property="Foreground" Value="{StaticResource Text.Link.Color }"/>
</DataTrigger.Setters> </DataTrigger.Setters>
</DataTrigger> </DataTrigger>
</DataTemplate.Triggers> </DataTemplate.Triggers>
</DataTemplate> </DataTemplate>
</ListBox.ItemTemplate> </ListBox.ItemTemplate>
</ListBox> </ListBox>
</Grid>
<Grid Grid.Row="4">
<StackPanel Orientation="Horizontal">
<CheckBox Content="仅显示异常"
IsChecked="{Binding OnlyException,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
FocusVisualStyle="{x:Null}"/>
<CheckBox Content="未匹配采购单"
IsChecked="{Binding NoMatchPurchaseOrder,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
FocusVisualStyle="{x:Null}" Margin="5,0,0,0"/>
<CheckBox Content="未选资金类型"
IsChecked="{Binding NoChooseFundType,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
FocusVisualStyle="{x:Null}" Margin="5,0,0,0"/>
<TextBlock Text="店铺名称" VerticalAlignment="Center" Margin="5,0,0,0"/>
<ComboBox Margin="5,0,0,0" ItemsSource="{Binding SelectedDepartment.ShopList}"
SelectedItem="{Binding SelectResultShop,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
VerticalContentAlignment="Center"
VerticalAlignment="Center" Height="25"/>
<TextBlock Text="采购平台" VerticalAlignment="Center" Margin="5,0,0,0"/>
<ComboBox Width="100" Margin="5,0,0,0" Height="25"/>
<TextBlock Text="采购单号" VerticalAlignment="Center" Margin="5,0,0,0"/>
<c:BTextBox Width="100" Height="25" Margin="5,0,0,0"
Text="{Binding SearchResultPurchaseOrder,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<c:BButton Content="结果搜索" Padding="10,0" Command="{Binding SearchLocalCommand}"/>
<c:BButton Content="导出Excel" Padding="10,0" Background="#02A7F0"/>
<c:BButton Content="保存" Padding="10,0" Background="#1CC2A2"/>
</StackPanel>
</Grid>
<CheckBox Content="仅显示异常" Grid.Row="6"
IsChecked="{Binding OnlyException,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
FocusVisualStyle="{x:Null}"/>
<DataGrid ItemsSource="{Binding ShowAuditPayBillList}" <DataGrid ItemsSource="{Binding ShowAuditPayBillList}"
Grid.Row="7" Grid.Row="7"
Visibility="{Binding IsShowPayBillPanel,Converter={StaticResource objConverter},ConverterParameter=true:Visible:Collapsed}" Visibility="{Binding IsShowPayBillPanel,Converter={StaticResource objConverter},ConverterParameter=true:Visible:Collapsed}"
@ -187,7 +198,7 @@
</DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn> </DataGridTemplateColumn>
<!--<DataGridTextColumn Header="商户订单号" Width="200" Binding="{Binding SourceMerchantOrderNo}" ElementStyle="{StaticResource verticalCenterTextBlock}"/>--> <!--<DataGridTextColumn Header="商户订单号" Width="200" Binding="{Binding SourceMerchantOrderNo}" ElementStyle="{StaticResource verticalCenterTextBlock}"/>-->
<DataGridTextColumn Header="归属店铺" Width="100" Binding="{Binding BelongShop}" ElementStyle="{StaticResource verticalCenterTextBlock}"/> <DataGridTextColumn Header="归属店铺" Width="100" Binding="{Binding BelongShop}" ElementStyle="{StaticResource verticalCenterTextBlock}"/>
<DataGridTextColumn Header="关联采购单" Width="140" Binding="{Binding RelationPurchaseOrderId}" ElementStyle="{StaticResource verticalCenterTextBlock}"/> <DataGridTextColumn Header="关联采购单" Width="140" Binding="{Binding RelationPurchaseOrderId}" ElementStyle="{StaticResource verticalCenterTextBlock}"/>
<DataGridTextColumn Header="关联销售单" Width="120" Binding="{Binding RelationShopOrderId}" ElementStyle="{StaticResource verticalCenterTextBlock}"/> <DataGridTextColumn Header="关联销售单" Width="120" Binding="{Binding RelationShopOrderId}" ElementStyle="{StaticResource verticalCenterTextBlock}"/>

2
BBWY.Server.Business/FinancialTerminal/FinancialTerminalBusiness.cs

@ -32,6 +32,8 @@ namespace BBWY.Server.Business
public void BatchInsertAuditPayBill(List<AuditPayBill> insertList) public void BatchInsertAuditPayBill(List<AuditPayBill> insertList)
{ {
if (insertList == null || insertList.Count == 0)
throw new BusinessException("数据不全");
var importShopIds = insertList[0].ImportShopIds; var importShopIds = insertList[0].ImportShopIds;
var startTime = insertList.Min(abp => abp.PayTime).Value; var startTime = insertList.Min(abp => abp.PayTime).Value;
var endTime = insertList.Max(abp => abp.PayTime).Value; var endTime = insertList.Max(abp => abp.PayTime).Value;

7
BBWY.Server.Model/Db/FinancialTerminal/AuditPayBill.cs

@ -23,8 +23,7 @@ namespace BBWY.Server.Model.Db
/// <summary> /// <summary>
/// 归属店铺Id /// 归属店铺Id
/// </summary> /// </summary>
public long? BelongShopId { get; set; }
public int? BelongShopId { get; set; }
[ Column(DbType = "datetime")] [ Column(DbType = "datetime")]
public DateTime? CreateTime { get; set; } public DateTime? CreateTime { get; set; }
@ -62,8 +61,8 @@ namespace BBWY.Server.Model.Db
/// <summary> /// <summary>
/// 账单类型 /// 账单类型
/// </summary> /// </summary>
[ Column(DbType = "int(1)")] [ Column(DbType = "int(1)",MapType = typeof(int?))]
public int? PayBillType { get; set; } public Enums.PayBillType? PayBillType { get; set; }
/// <summary> /// <summary>
/// 支付时间 /// 支付时间

10
BBWY.Server.Model/Enums.cs

@ -157,5 +157,15 @@
{ {
ModifyTime = 0, StartTime = 1 ModifyTime = 0, StartTime = 1
} }
/// <summary>
/// 支付账单类型
/// </summary>
public enum PayBillType
{
= 0,
= 1,
= 2
}
} }
} }

Loading…
Cancel
Save