Browse Source

Merge branch 'master' of http://dev.ccwin-in.com:3000/BoXu.Zheng/BeiJinSettleAccount

master
安虹睿 1 year ago
parent
commit
3f6eda4055
  1. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/sync.js
  2. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/log.js
  3. 7
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_DETAIL_DTO.cs
  4. 7
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SE_DETAIL_DTO.cs
  5. 15
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs
  6. 14
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs
  7. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeSyncAppService.cs
  8. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/sync.js

@ -7,6 +7,10 @@ export default function () {
type: "object",
properties: {
taskState,
creationTime: {
title: "发票时间",
type: "datetime",
},
taskId: {
title: "任务Id",
type: "string",

8
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/log.js

@ -54,21 +54,21 @@ export default function () {
default: [
{
logic: "and",
column: "changedTime",
column: "billTime",
action: "biggerThanOrEqual",
value: null,
readOnly: true,
title: "变动开始",
title: "发运开始",
default: dayjs().subtract(1, "month").startOf("day").format("YYYY-MM-DD HH:mm:ss"),
clearable: false,
},
{
logic: "and",
column: "changedTime",
column: "billTime",
action: "smallThan",
value: null,
readOnly: true,
title: "变动结束",
title: "发运结束",
default: dayjs().startOf("day").format("YYYY-MM-DD HH:mm:ss"),
clearable: false,
},

7
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SE_DETAIL_DTO.cs

@ -280,6 +280,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[ExporterHeader(DisplayName = "发货人")]
public string Oper { get; set; }
/// <summary>
/// 数量
/// </summary>
[Display(Name = "数量")]
[ExporterHeader(DisplayName = "数量")]
public decimal Qty { get; set; }
/// <summary>
/// 排序单号
/// </summary>

7
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SE_DETAIL_DTO.cs

@ -280,6 +280,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[ExporterHeader(DisplayName = "发货人")]
public string Oper { get; set; }
/// <summary>
/// 数量
/// </summary>
[Display(Name = "数量")]
[ExporterHeader(DisplayName = "数量")]
public decimal Qty { get; set; }
/// <summary>
/// 排序单号
/// </summary>

15
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/PD_SERVICE.cs

@ -287,13 +287,28 @@ namespace Win.Sfs.SettleAccount.Bases
//[Route("mainquery")]
public virtual async Task<PagedResultDto<TEntityDto>> MainQueryAsync(TRequestMainInput input)
{
var invs= await _invRepository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount).ConfigureAwait(false);
var invbills = invs.Select(p => p.InvbillNum).ToList();
var entitys = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount).ConfigureAwait(false);
entitys=entitys.Where(p => invbills.Contains(p.BillNum)).ToList();
var totalCount = await _repository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false);
var dtos = ObjectMapper.Map<List<TEntity>, List<TEntityDto>>(entitys);
dtos = dtos.Where(p => invbills.Contains(p.BillNum)).ToList();
var entity= entitys.FirstOrDefault();
var invoices =entitys.Select(p => p.BillNum);
var entities=_invRepository.Where(p => invoices.Contains(p.InvbillNum)).ToList();
foreach (var itm in dtos)
{
var pd = entities.FirstOrDefault(p => p.InvbillNum == itm.BillNum);

14
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs

@ -95,9 +95,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
await transaction.RollbackAsync().ConfigureAwait(false);
}
}
//var ediReturnQuery = db.Set<BBAC_SE_DETAIL>().FromSqlRaw("SELECT a.* FROM Set_BBAC_SE_DETAIL a right join (SELECT PN,CustomerPartCodeNoSpace,sum(Qty) as Qty FROM Set_BBAC_SE_DETAIL group by PN,CustomerPartCodeNoSpace having sum(Qty)=0) b on a.PN=b.PN and a.CustomerPartCodeNoSpace=b.CustomerPartCodeNoSpace");
var ediReturnQuery = db.Set<BBAC_SE_EDI>().FromSqlRaw("select * from (SELECT a.* FROM [dbo].[Set_BBAC_SE_EDI] a right join (SELECT PN,CustomerPartCodeNoSpace,sum(Qty) as Qty FROM Set_BBAC_SE_DETAIL group by PN,CustomerPartCodeNoSpace having sum(Qty)=0) b on a.PN=b.PN and a.CustomerPartCodeNoSpace=b.CustomerPartCodeNoSpace and a.IsHaveSeData=1) c where c.id is not null");
var ediReturnQuery = db.Set<BBAC_SE_EDI>().FromSqlRaw("select * from (SELECT a.* FROM [dbo].[Set_BBAC_SE_EDI] a right join (SELECT PN,CustomerPartCodeNoSpace,sum(Qty) as Qty FROM Set_BBAC_SE_DETAIL where BusinessType=1 group by PN,CustomerPartCodeNoSpace having sum(Qty)=0) b on a.PN=b.PN and a.CustomerPartCodeNoSpace=b.CustomerPartCodeNoSpace and a.IsHaveSeData=1) c where c.id is not null");
var ediReturnEntities = ediReturnQuery.ToList();
if (ediReturnEntities.Count > 0)
{
@ -105,6 +104,17 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
await db.BulkUpdateAsync<BBAC_SE_EDI>(ediReturnEntities).ConfigureAwait(false);
}
var seReturnQuery = db.Set<BBAC_SE_DETAIL>().FromSqlRaw("select * from (SELECT a.* FROM [dbo].[Set_BBAC_SE_DETAIL] a right join (select PN,CustomerPartCodeNoSpace,COUNT(*) as hj,sum(Qty) as Qty,sum(CAST(IsHaveEdiData AS int)) as haveedi from Set_BBAC_SE_DETAIL where BusinessType=1 group by PN,CustomerPartCodeNoSpace having count(*)>sum(CAST(IsHaveEdiData AS int)) and count(*)>=3 and sum(CAST(IsHaveEdiData AS int))>=1) b on a.PN=b.PN and a.CustomerPartCodeNoSpace=b.CustomerPartCodeNoSpace and a.IsHaveEdiData=0) c where c.id is not null ");
var seReturnEntities = seReturnQuery.ToList();
if (seReturnEntities.Count > 0)
{
seReturnEntities.ForEach(t => t.IsHaveEdiData = true);
await db.BulkUpdateAsync<BBAC_SE_DETAIL>(seReturnEntities).ConfigureAwait(false);
}
}
}
/// <summary>

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeSyncAppService.cs

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Uow;
using Volo.Abp.Validation;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.EntityFrameworkCore;
@ -39,6 +40,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
/// <summary>
/// 执行JisHBPO发运同步
/// </summary>
[DisableValidation]
[UnitOfWork(IsDisabled = true)]
public virtual async Task Invoke(IServiceProvider serviceProvider)
{

1
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

@ -350,7 +350,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs
}
foreach (var item in bbacinvList)
{
if (item.State == SettleBillState.QAD)
{
item.State = SettleBillState.;

Loading…
Cancel
Save