Browse Source

审计

qianyi
shanji 2 years ago
parent
commit
40ee12142d
  1. 5
      BBWY.Client/ViewModels/FinancialTerminal/ProcurementAuditViewModel.cs
  2. 6
      BBWY.Server.Business/FinancialTerminal/FinancialTerminalBusiness.cs

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

@ -163,13 +163,14 @@ namespace BBWY.Client.ViewModels
ShopList.Clear();
}
private void SearchHistory()
{
if (IsLoading)
return;
ClearAudit();
IsLoading = true;
var importShopIds = string.Join(',', ShopList.Where(s => s.IsSelected).Select(s => s.ShopId));
var importShopIds = string.Join(',', ShopList.Where(s => s.IsSelected).Select(s => s.ShopId).OrderBy(s => s).ToList());
Task.Factory.StartNew(() => financialTerminalService.GetAuditPayBillList(importShopIds, StartDate, EndDate)).ContinueWith(t =>
{
IsLoading = false;
@ -541,7 +542,7 @@ namespace BBWY.Client.ViewModels
return;
}
var importShopIds = string.Join(',', ShopList.Where(s => s.IsSelected).Select(s => s.ShopId));
var importShopIds = string.Join(',', ShopList.Where(s => s.IsSelected).Select(s => s.ShopId).OrderBy(s => s).ToList());
var replaceResponse = financialTerminalService.IsExistAuditPayBill(importShopIds, StartDate, EndDate);
if (!replaceResponse.Success)

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

@ -1,6 +1,7 @@
using BBWY.Common.Models;
using BBWY.Server.Model.Db;
using BBWY.Server.Model.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using Yitter.IdGenerator;
@ -39,13 +40,12 @@ namespace BBWY.Server.Business
//var endTime = insertList.Max(abp => abp.PayTime).Value;
var deleteIds = insertList.Select(p => p.PayBillNo).ToArray();
foreach (var b in insertList)
b.CreateTime = DateTime.Now;
fsql.Transaction(() =>
{
fsql.Delete<AuditPayBill>(deleteIds).ExecuteAffrows();
//fsql.Delete<AuditPayBill>().Where(apb => apb.ImportShopIds == importShopIds &&
// apb.PayTime >= startTime &&
// apb.PayTime <= endTime).ExecuteAffrows();
fsql.Insert(insertList).ExecuteAffrows();
});
}

Loading…
Cancel
Save