|
@ -1,11 +1,14 @@ |
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
using Microsoft.AspNetCore.Components; |
|
|
using Microsoft.AspNetCore.Components; |
|
|
using SettleAccount.Domain.BQ; |
|
|
using SettleAccount.Domain.BQ; |
|
|
|
|
|
using SettleAccount.Job.Services.Report; |
|
|
|
|
|
using SettleAccount.Job.Services; |
|
|
using System; |
|
|
using System; |
|
|
using System.Collections.Generic; |
|
|
using System.Collections.Generic; |
|
|
using System.Linq; |
|
|
using System.Linq; |
|
|
using System.Text; |
|
|
using System.Text; |
|
|
using System.Threading.Tasks; |
|
|
using System.Threading.Tasks; |
|
|
|
|
|
using TaskJob.EventArgs; |
|
|
using Volo.Abp.Application.Services; |
|
|
using Volo.Abp.Application.Services; |
|
|
using Win.Abp.Snowflakes; |
|
|
using Win.Abp.Snowflakes; |
|
|
using Win.Sfs.BaseData.ImportExcelCommon; |
|
|
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.Syncs; |
|
|
using Win.Sfs.SettleAccount.Entities.BQ.Vmi; |
|
|
using Win.Sfs.SettleAccount.Entities.BQ.Vmi; |
|
|
using Win.Sfs.Shared.RepositoryBase; |
|
|
using Win.Sfs.Shared.RepositoryBase; |
|
|
|
|
|
using Win.Sfs.SettleAccount.Entities.TaskJobs; |
|
|
|
|
|
|
|
|
namespace Win.Sfs.SettleAccount.Entities.BQ |
|
|
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, BBAC_PD_DETAIL_DTO, BBAC_PD_REQ_DTO, |
|
|
BBAC_PD_DETAIL_REQ_DTO, BBAC_PD_DETAIL_EXP_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) |
|
|
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(); |
|
|
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=>)
|
|
|
// _bbacSecRepository.Where(p=>)
|
|
|
|
|
|
|
|
|
if (detailist != null && detailist.Count > 0) |
|
|
//if (detailist != null && detailist.Count > 0)
|
|
|
{ |
|
|
//{
|
|
|
foreach (var itm in detailist) |
|
|
// foreach (var itm in detailist)
|
|
|
{ |
|
|
// {
|
|
|
await _vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog() |
|
|
// await _vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
|
|
|
{ |
|
|
// {
|
|
|
BillTime = itm.CreationTime, |
|
|
// BillTime = itm.CreationTime,
|
|
|
ChangedTime = DateTime.Now, |
|
|
// ChangedTime = DateTime.Now,
|
|
|
Qty = itm.Qty, |
|
|
// Qty = itm.Qty,
|
|
|
DeliverTime = itm.CreationTime, |
|
|
// DeliverTime = itm.CreationTime,
|
|
|
LogType = Entities.BQ.Vmi.VmiLogType.Type200, |
|
|
// LogType = Entities.BQ.Vmi.VmiLogType.Type200,
|
|
|
ChangedQty = itm.Qty, |
|
|
// ChangedQty = itm.Qty,
|
|
|
ChangedType = VmiType.Out, |
|
|
// ChangedType = VmiType.Out,
|
|
|
SubBillType = EnumDeliverSubBillType.小件BBAC, |
|
|
// SubBillType = EnumDeliverSubBillType.小件BBAC,
|
|
|
BillType = EnumDeliverBjBmpBillType.JIS件, |
|
|
// BillType = EnumDeliverBjBmpBillType.JIS件,
|
|
|
PartCode = itm.LU, |
|
|
// PartCode = itm.LU,
|
|
|
SettlementVinCode = itm.PN, |
|
|
// SettlementVinCode = itm.PN,
|
|
|
PartCode2 = itm.LU, |
|
|
// PartCode2 = itm.LU,
|
|
|
CustomerPartCode = itm.LU, |
|
|
// CustomerPartCode = itm.LU,
|
|
|
VinCode = itm.PN, |
|
|
// VinCode = itm.PN,
|
|
|
OrderNum = itm.GroupNum, |
|
|
// OrderNum = itm.GroupNum,
|
|
|
ErpToLoc = "C0001" |
|
|
// ErpToLoc = "C0001"
|
|
|
}); |
|
|
// });
|
|
|
} |
|
|
// }
|
|
|
} |
|
|
//}
|
|
|
return ApplicationConsts.SuccessStr; |
|
|
return ApplicationConsts.SuccessStr; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|