Browse Source

更新版本

master
学 赵 1 year ago
parent
commit
7da3ed2760
  1. 79
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs
  2. 16
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
  3. 29
      code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs
  4. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/BaseDomainServices/BaseDomainService.cs

79
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs

@ -1,11 +1,14 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components;
using SettleAccount.Domain.BQ;
using SettleAccount.Job.Services.Report;
using SettleAccount.Job.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TaskJob.EventArgs;
using Volo.Abp.Application.Services;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
@ -16,6 +19,7 @@ using Win.Sfs.SettleAccount.Entities.BQ.Dtos.SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.Shared.RepositoryBase;
using Win.Sfs.SettleAccount.Entities.TaskJobs;
namespace Win.Sfs.SettleAccount.Entities.BQ
{
@ -28,8 +32,16 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
BBAC_PD_DETAIL, BBAC_PD_DETAIL_DTO, BBAC_PD_REQ_DTO,
BBAC_PD_DETAIL_REQ_DTO, BBAC_PD_DETAIL_EXP_DTO>
{
public BBAC_PD_SERVICE(INormalEfCoreRepository<BBAC_SEC_DETAIL, Guid> bbacSecRepository, INormalEfCoreRepository<HBPO_SEC_DETAIL, Guid> hbpoSecRepository, INormalEfCoreRepository<PUB_SEC_DETAIL, Guid> pubSecRepository, IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository<BBAC_PD, Guid> repository, VmiAppService vimservice, INormalEfCoreRepository<BBAC_PD_DETAIL, Guid> detailRepository) : base(bbacSecRepository, hbpoSecRepository, pubSecRepository, excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository)
private readonly TaskJobService _service;
public BBAC_PD_SERVICE(INormalEfCoreRepository<BBAC_SEC_DETAIL, Guid> bbacSecRepository, INormalEfCoreRepository<HBPO_SEC_DETAIL, Guid> hbpoSecRepository, INormalEfCoreRepository<PUB_SEC_DETAIL, Guid> pubSecRepository, IExcelImportAppService excelImportService, ISnowflakeIdGenerator snowflakeIdGenerator, ICommonManager commonManager, INormalEfCoreRepository<BBAC_PD, Guid> repository, VmiAppService vimservice,
INormalEfCoreRepository<BBAC_PD_DETAIL, Guid> detailRepository,
TaskJobService service
) :
base(bbacSecRepository, hbpoSecRepository, pubSecRepository, excelImportService, snowflakeIdGenerator, commonManager, repository, vimservice, detailRepository)
{
_service = service;
}
public override async Task<string> ApprovalPassed(List<string> p_list)
@ -37,33 +49,48 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var detailist = _detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList();
//List<CustomCondition> customConditionList = new List<CustomCondition>();
////customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
////customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
////customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
////customConditionList.Add(new CustomCondition() { Name = "State", Value = string.IsNullOrEmpty(input.State) ? string.Empty : input.State });
//var _taskid = await _service.ExportEnqueueAsync("出库单合计汇总输出", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(WmsOutputSumExportService), customConditionList, (rs) =>
//{
//});
//return _taskid;
// _bbacSecRepository.Where(p=>)
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
{
await _vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
DeliverTime = itm.CreationTime,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
SubBillType = EnumDeliverSubBillType.BBAC,
BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,
SettlementVinCode = itm.PN,
PartCode2 = itm.LU,
CustomerPartCode = itm.LU,
VinCode = itm.PN,
OrderNum = itm.GroupNum,
ErpToLoc = "C0001"
});
}
}
//if (detailist != null && detailist.Count > 0)
//{
// foreach (var itm in detailist)
// {
// await _vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
// {
// BillTime = itm.CreationTime,
// ChangedTime = DateTime.Now,
// Qty = itm.Qty,
// DeliverTime = itm.CreationTime,
// LogType = Entities.BQ.Vmi.VmiLogType.Type200,
// ChangedQty = itm.Qty,
// ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.小件BBAC,
// BillType = EnumDeliverBjBmpBillType.JIS件,
// PartCode = itm.LU,
// SettlementVinCode = itm.PN,
// PartCode2 = itm.LU,
// CustomerPartCode = itm.LU,
// VinCode = itm.PN,
// OrderNum = itm.GroupNum,
// ErpToLoc = "C0001"
// });
// }
//}
return ApplicationConsts.SuccessStr;

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

@ -47,15 +47,18 @@ public class PendingDeductionService : ITransientDependency, IExportJob
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property)
{
var list = property.Where(p => p.Name == "BillNumList").FirstOrDefault().Value;
var billList = property.Where(p => p.Name == "BillNumList").FirstOrDefault().Value;
var type = property.Where(p => p.Name == "Type").FirstOrDefault().Value;
var list=billList.Split(",");
if (type == "BBACJIS")
{
var jisdetail = _bbacRepository.Where(p => list.Contains(p.BillNum) && p.IsMaiDan==false);
var mdetail = _bbacRepository.Where(p => list.Contains(p.BillNum) && p.IsMaiDan ==true);
var query = from itm in jisdetail
join itm1 in _bbacSecRepository
on new { itm.PN, itm.LU } equals new { itm1.PN,LU= itm1.PrimitiveLU } into temp1
on new { itm.PN, itm.LU } equals new { itm1.PN, LU = itm1.PrimitiveLU } into temp1
from tm in temp1
where tm == null
select
@ -70,10 +73,10 @@ public class PendingDeductionService : ITransientDependency, IExportJob
ChangedType = VmiType.Out,
SubBillType = EnumDeliverSubBillType.BBAC,
BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = tm!=null?tm.ReplaceLU:itm.LU,
PartCode = tm != null ? tm.ReplaceLU : itm.LU,
SettlementVinCode = itm.PN,
PartCode2 = tm != null ? tm.ReplaceLU : itm.LU,
CustomerPartCode =string.IsNullOrEmpty(itm.Extend4)?string.Empty:itm.Extend4,
CustomerPartCode = string.IsNullOrEmpty(itm.Extend4) ? string.Empty : itm.Extend4,
VinCode = itm.PN,
OrderNum = itm.GroupNum,
ErpToLoc = "C0001"
@ -172,11 +175,6 @@ public class PendingDeductionService : ITransientDependency, IExportJob
}
return ApplicationConsts.SuccessStr;
return id.ToString();
}
}

29
code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs

@ -1,4 +1,4 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
using Volo.Abp.Application;
@ -10,6 +10,9 @@ using Volo.Abp.Dapper;
using Win.Abp.Snowflakes;
using Volo.Abp.EventBus.RabbitMq;
using Volo.Abp.RabbitMQ;
using System;
using TaskJob.Interfaces;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
namespace Win.Sfs.SettleAccount
{
@ -46,6 +49,30 @@ namespace Win.Sfs.SettleAccount
//context.Services.AddTransient(typeof(INormalEfCoreRepository<,>),
// typeof(SettleAccountNormalEfCoreRepository<,>));
context.Services.AddTransient(implementationFactory =>
{
Func<string, IExportJob> accesor = key =>
{
if (key.Equals(typeof(PendingDeductionService).FullName))
{
return implementationFactory.GetService<PendingDeductionService>();
}
else
{
throw new ArgumentException($"Not Support key:{key}");
}
};
return accesor;
});
}

2
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/BaseDomainServices/BaseDomainService.cs

@ -44,7 +44,7 @@ namespace Win.Sfs.SettleAccount.Bases.DomainServices
//ICommonManager commonManager
)
{
_pricebjRepository = pricebjRepository;
_priceRepository = priceRepository;
_pricebjRepository= pricebjRepository;
_materialRepository = materialRepository;
_relationshipRepository = relationshipRepository;

Loading…
Cancel
Save