Browse Source

更新版本

master
学 赵 1 year ago
parent
commit
5ddf611503
  1. 10
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
  2. 50
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/ADJ_SERVICE.cs
  3. 22
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs
  4. 25
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
  5. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs
  6. 61
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
  7. 194
      code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs
  8. 7
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/INVOICE_NOT_SETTLE.cs
  9. 18
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs
  10. 11
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs
  11. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Temp/TempClass.cs
  12. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQFactoryUnSettledDetailDiffExportService.cs
  13. 334
      code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs

10
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs

@ -257,6 +257,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[Display(Name = "价格结束日期")]
public DateTime EndDate { get; set; }
public Dictionary<string, object> ExtraProperties { get; set; }
}
public class INVOICE_WAIT_DETAIL_REQ_DTO : RequestInputBase
{
@ -403,6 +411,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[Display(Name = "扩展字段2")]
public string Extend2 { get; set; }
public Dictionary<string, object> ExtraProperties { get; set; }
}

50
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/ADJ_SERVICE.cs

@ -207,11 +207,9 @@ public class ADJ_SERVICE : BASE_SERVICE
switch (inv.BusinessType)
{
case EnumBusinessType.MaiDanJianHBPO:
break;
case EnumBusinessType.MaiDanJianBBAC:
break;
case EnumBusinessType.ZhiGongJianBBAC:
var errors1 = _pubRepository.Where(p => pnlist.Contains(p.PN));
@ -257,30 +255,11 @@ public class ADJ_SERVICE : BASE_SERVICE
errorList.Add(new ERR_EXP_DTO() { Message = $"不能结算数据中存在发货单{p.PN}数据,不能导入调整表" });
}
break;
}
}
//ExportImporter _exportImporter = new ExportImporter();
//var result = await _exportImporter.UploadExcelImport<PUB_ADJ_DETAIL_IMP_DTO>(files, _excelImportService);
//if (result.Count == 0)
//{
// throw new BusinessException("8989", "导入数据记录为0条");
//}
// var invs= p_list.Select(p => p.InvBillNum).ToList();//所有发票号
//var deletels = _repository.Where(p =>invs.Contains(p.OldInvBillNum) ).ToList();//所有关联发票号的调整表
// var invlist= _invRepository.Where(p => invs.Contains(p.InvbillNum)).ToList();//所有旧发票
// var dlists= deletels.Where(p=>string.IsNullOrEmpty(p.InvBillNum)).ToList();//所有新发票号不为空的调整记录
//foreach (var itm in dlists)
//{
// errorList.Add(new ERR_EXP_DTO() { ItemCode = $"{itm.LU}", Message = $"客户零件号{itm.LU}标识号{itm.PN}下线日期{itm.SettleDate}记录已经被重新开票,新发票号为:{itm.InvBillNum}" });
//}
//var first = deletels.FirstOrDefault();
//if (!string.IsNullOrEmpty(first.InvBillNum))
//{
// throw new BusinessException("8989", $"调整记录已经生成新发票号:{first.InvBillNum}");
//}
var entityList = ObjectMapper.Map<List<PUB_ADJ_DETAIL_DTO>, List<PUB_ADJ_DETAIL>>(p_list);
var codelist = entityList.Select(p => p.LU).ToList();
var errors = await _baseDomainService.CheckBase(codelist, new BASE_CONF() { IsRelationShip = true });
@ -302,32 +281,7 @@ public class ADJ_SERVICE : BASE_SERVICE
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, fileName = await ExportErrorReportAsync(errorList) });
}
//var query = from itm in entityList
// join itm1 in invlist
// on itm.InvBillNum equals itm1.InvbillNum
// select new PUB_ADJ_DETAIL(
// id: GuidGenerator.Create(),
// keyCode: itm.PN + itm.LU,
// version: itm.Version,
// settleBillNum: itm.SettleBillNum,
// lU: itm.LU,
// pN: itm.PN,
// site: itm.Site,
// qty: itm.Qty,
// extend1: string.Empty,
// price: 0,
// invGroupNum: itm1.InvGroupNum,
// settleDate: itm.SettleDate,
// businessType: itm1.BusinessType,
// groupNum: itm.GroupNum,
// oldinv: itm.InvBillNum,
// inv: string.Empty,
// partcode:itm.PartCode
// );
//await _repository.DbContext.BulkDeleteAsync(deletels);//删除发票下所有调整明细
//await _repository.DbContext.BulkInsertAsync(query.ToList());
return new JsonResult(new { Code = 200, Message = "校验成功" }); ;
}

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

@ -49,15 +49,19 @@ 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;
List<CustomCondition> customConditionList = new List<CustomCondition>();
//var billList = property.Where(p => p.Name == "BillNumList").FirstOrDefault().Value;
//var type = property.Where(p => p.Name == "Type").FirstOrDefault().Value;
customConditionList.Add(new CustomCondition() { Name = "BillNumList", Value =string.Join(",",p_list) });
customConditionList.Add(new CustomCondition() { Name = "Type", Value = EnumBusinessType.JisBBAC.ToString() });
//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("BBAC待扣减任务", ExportExtentsion.Excel, DateTime.Now.ToString("yyyyMM"), string.Empty, CurrentUser, typeof(PendingDeductionService), customConditionList, (rs) =>
{
});
return _taskid;

25
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs

@ -180,17 +180,20 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var adj = invdetail.ADJ_DETAIL;
var classDisplayName = typeof(INVOICE_GRP_DTO).GetCustomAttribute<DisplayAttribute>()?.Name ?? typeof(INVOICE_GRP_DTO).Name;
string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx";
var result = _excel
.Append(dtoDetails,"发票表")
.SeparateBySheet()
.Append(m, "发票和结算分组关系")
.SeparateBySheet()
.Append(not, "对应未结结算分组")
.SeparateBySheet()
.Append(detail, "发票明细")
.SeparateBySheet()
.Append(adj,"发票调整单")
.ExportAppendDataAsByteArray();
foreach (var itm in entities)
{
var invlist = detail.Where(p => p.InvbillNum == itm.InvbillNum).ToList();
var mgroup =m.Where(p => p.InvbillNum == itm.InvbillNum).ToList();
var adjp = adj.Where(p => p.InvBillNum == itm.InvbillNum).ToList();
_excel.Append(invlist, "发票号" + itm.InvbillNum).SeparateBySheet();
_excel.Append(mgroup, "发票结算分组对应" + itm.InvbillNum).SeparateBySheet();
_excel.Append(adj, "发票调整数据" + itm.InvbillNum).SeparateBySheet();
}
_excel.Append(not, "发票分组未结对应结算分组");
var result = _excel.ExportAppendDataAsByteArray();
result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制
await _excelImportService.SaveBlobAsync(

4
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs

@ -115,7 +115,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
ContractDocID = "no",
BeginDate = p.BeginTime,
EndDate = p.EndTime,
PartCode=d.PartCode//客户零件号
PartCode=d.PartCode,//客户零件号
PoNum=""
};
var dtos = q.ToList();

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

@ -49,10 +49,20 @@ public class PendingDeductionService : ITransientDependency, IExportJob
{
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")
// /// </summary>
//[Display(Name = "JisBBAC")]
// JisBBAC = 1,
///// <summary>
///// JisHBPO
///// </summary>
//[Display(Name = "JisHBPO")]
// JisHBPO = 2,
if (type == "JisBBAC")
{
var jisdetail = _bbacRepository.Where(p => list.Contains(p.BillNum) && p.IsMaiDan==false);
var mdetail = _bbacRepository.Where(p => list.Contains(p.BillNum) && p.IsMaiDan ==true);
@ -108,10 +118,9 @@ public class PendingDeductionService : ITransientDependency, IExportJob
}
}
}
else if (type == "HBPOJIS")
else if (type == "JisHBPO")
{
var detailist = _hbpoRepository.Where(p => list.Contains(p.BillNum)).ToList();
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
@ -143,6 +152,50 @@ public class PendingDeductionService : ITransientDependency, IExportJob
{
var detailist = _hbpoRepository.Where(p => list.Contains(p.BillNum)).ToList();
switch (type)
{
case "ZhiGongJianBBAC":
break;
case "ZhiGongJianHBPO":
break;
case "MaiDanJianBBAC":
break;
case "MaiDanJianHBPO":
break;
case "BeiJian":
break;
case "YinDuJian":
break;
}
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)

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

@ -13,6 +13,8 @@ using Volo.Abp.RabbitMQ;
using System;
using TaskJob.Interfaces;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
using SettleAccount.Job.Services.Report;
using SettleAccount.Job.Services;
namespace Win.Sfs.SettleAccount
{
@ -47,7 +49,8 @@ namespace Win.Sfs.SettleAccount
ConfigureJson(context);
//context.Services.AddTransient(typeof(INormalEfCoreRepository<,>),
// typeof(SettleAccountNormalEfCoreRepository<,>));
//typeof(SettleAccountNormalEfCoreRepository<,>));
@ -55,22 +58,207 @@ namespace Win.Sfs.SettleAccount
{
Func<string, IExportJob> accesor = key =>
{
if (key.Equals(typeof(PubSaSeCompareExportService).FullName))
{
return implementationFactory.GetService<PubSaSeCompareExportService>();
}
if (key.Equals(typeof(JisBBACEdiSeCompareExportService).FullName))
{
return implementationFactory.GetService<JisBBACEdiSeCompareExportService>();
}
if (key.Equals(typeof(JisHBPOEdiSeCompareExportService).FullName))
{
return implementationFactory.GetService<JisHBPOEdiSeCompareExportService>();
}
if (key.Equals(typeof(PendingDeductionService).FullName))
{
return implementationFactory.GetService<PendingDeductionService>();
}
//if (key.Equals(typeof(InvoiceSettledDiffExportService).FullName))
//{
// return implementationFactory.GetService<InvoiceSettledDiffExportService>();
//}
//if (key.Equals(typeof(UnSettledExportService).FullName))
//{
// return implementationFactory.GetService<UnSettledExportService>();
//}
//if (key.Equals(typeof(fisUnsettledDiffReport).FullName))
//{//ERP总成开票报表
// return implementationFactory.GetService<fisUnsettledDiffReport>();
//}
//if (key.Equals(typeof(PriceQtyDifferenceExportService).FullName))
//{//量差和价差分析报表
// return implementationFactory.GetService<PriceQtyDifferenceExportService>();
//}
//if (key.Equals(typeof(SettledPartAndErpPartPriceDiffExportService).FullName))
//{
// return implementationFactory.GetService<SettledPartAndErpPartPriceDiffExportService>();
//}
//if (key.Equals(typeof(SecMatchBaseExportService).FullName))
//{
// return implementationFactory.GetService<SecMatchBaseExportService>();
//}
//if (key.Equals(typeof(SettleFisDiffExportService).FullName))
//{
// return implementationFactory.GetService<SettleFisDiffExportService>();
//}
////大众看板结算与交货核对明细表(有条码)
//if (key.Equals(typeof(SettleKBWithCodeExportService).FullName))
//{
// return implementationFactory.GetService<SettleKBWithCodeExportService>();
//}
////大众备件结算核对明细表
//if (key.Equals(typeof(SettleSparePartExportService).FullName))
//{
// return implementationFactory.GetService<SettleSparePartExportService>();
//}
////大众备件未结明细
//if (key.Equals(typeof(SettleUnSparePartExportService).FullName))
//{
// return implementationFactory.GetService<SettleUnSparePartExportService>();
//}
////大众备件90天核对明细
//if (key.Equals(typeof(SettleSparePart90ExportService).FullName))
//{
// return implementationFactory.GetService<SettleSparePart90ExportService>();
//}
//if (key.Equals(typeof(InvoiceSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<InvoiceSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(UnInvoiceSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<UnInvoiceSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(UnSettleDiffExportService).FullName))
//{
// return implementationFactory.GetService<UnSettleDiffExportService>();
//}
//if (key.Equals(typeof(SettleDoorPanelExportService).FullName))
//{
// return implementationFactory.GetService<SettleDoorPanelExportService>();
//}
//if (key.Equals(typeof(UnsettledDetailReportService).FullName))
//{
// return implementationFactory.GetService<UnsettledDetailReportService>();
//}
//if (key.Equals(typeof(SettleKBWithOutCodeExportService).FullName))
//{
// return implementationFactory.GetService<SettleKBWithOutCodeExportService>();
//}
//if (key.Equals(typeof(SharePartUnSettledExport).FullName))
//{
// return implementationFactory.GetService<SharePartUnSettledExport>();
//}
////红旗、一汽轿车结算报表
//if (key.Equals(typeof(HQFSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQFSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(HQFSharePartSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQFSharePartSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(HQMSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQMSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(HQMSharePartSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQMSharePartSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(HQHSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQHSettledDetailDiffExportService>();
//}
////红旗结算未结明细
//if (key.Equals(typeof(HQHUnSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQHUnSettledDetailDiffExportService>();
//}
////红旗未结核对
//if (key.Equals(typeof(HQFactoryUnSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQFactoryUnSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(HQHSharePartSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQHSharePartSettledDetailDiffExportService>();
//}
////红旗、轿车发运报表
//if (key.Equals(typeof(HQMShippingExportService).FullName))
//{
// return implementationFactory.GetService<HQMShippingExportService>();
//}
//if (key.Equals(typeof(HQHShippingExportService).FullName))
//{
// return implementationFactory.GetService<HQHShippingExportService>();
//}
//if (key.Equals(typeof(HQFShippingExportService).FullName))
//{
// return implementationFactory.GetService<HQFShippingExportService>();
//}
//if (key.Equals(typeof(WmsOutputSumExportService).FullName))
//{
// return implementationFactory.GetService<WmsOutputSumExportService>();
//}
////大众看板未结输出
//if (key.Equals(typeof(KanBanUnSettledExport).FullName))
//{
// return implementationFactory.GetService<KanBanUnSettledExport>();
//}
//if (key.Equals(typeof(FisUpdateExportService).FullName))
//{
// return implementationFactory.GetService<FisUpdateExportService>();
//}
//if (key.Equals(typeof(FisOutputService).FullName))
//{
// return implementationFactory.GetService<FisOutputService>();
//}
else
{
throw new ArgumentException($"Not Support key:{key}");
}
};
return accesor;
}; return accesor;
});
//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;
//});
}

7
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/INVOICE_NOT_SETTLE.cs

@ -14,6 +14,10 @@ public class INVOICE_NOT_SETTLE : FullAuditedAggregateRoot<Guid>
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; } = null!;
[Display(Name = "发票号")]
public string InvBillNum { get; set; } = null!;
[Display(Name = "结算分组号")]
public string SettleGroupNum { get; set; } = null!;
@ -35,7 +39,7 @@ public class INVOICE_NOT_SETTLE : FullAuditedAggregateRoot<Guid>
public INVOICE_NOT_SETTLE(Guid guid, int version, string invGroupNum, string settleGroupNum, string lU, string lU1, string extend1, string extend2,decimal qty)
public INVOICE_NOT_SETTLE(Guid guid, int version, string invGroupNum, string settleGroupNum, string lU, string lU1, string extend1, string extend2,decimal qty,string p_invbillnum)
{
Id = guid;
Version = version;
@ -46,6 +50,7 @@ public class INVOICE_NOT_SETTLE : FullAuditedAggregateRoot<Guid>
Extend1 = extend1;
Extend2 = extend2;
Qty = qty;
InvBillNum = p_invbillnum;
}
public INVOICE_NOT_SETTLE()

18
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

@ -14,6 +14,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Auditing;
@ -21,6 +22,7 @@ using Volo.Abp.Data;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Domain.Services;
using Volo.Abp.Json;
using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.SettleAccount.Entities.BQ.Temp;
using Win.Sfs.SettleAccount.Entities.Prices;
@ -1348,7 +1350,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var innotls = new List<INVOICE_NOT_SETTLE>();
if (p_notlist != null && p_notlist.Count > 0)
{
var notls = p_notlist.GroupBy(p => new { p.GroupNum, p.LU }).Select(p => new { GroupNum = p.Key.GroupNum, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty) });
var groupnum = itm.Value;
var notls = p_notlist.Where(p=>groupnum.Contains(p.GroupNum)).GroupBy(p => new { p.GroupNum, p.LU }).Select(p => new { GroupNum = p.Key.GroupNum, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty) });
foreach (var nitm in notls)
{
innotls.Add(new INVOICE_NOT_SETTLE(
@ -1360,7 +1363,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
lU1: nitm.LU,
extend1: string.Empty,
extend2: string.Empty,
qty: nitm.Qty
qty: nitm.Qty,
p_invbillnum:itm.Key
));
}
if (innotls.Count > 0)
@ -1812,7 +1816,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var innotls = new List<INVOICE_NOT_SETTLE>();
if (p_notlist != null && p_notlist.Count > 0)
{
var notls = p_notlist.GroupBy(p => new { p.GroupNum, p.LU }).Select(p => new { GroupNum = p.Key.GroupNum, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty) });
var notls = p_notlist.Where(p=>ls.Contains(p.GroupNum)).GroupBy(p => new { p.GroupNum, p.LU }).Select(p => new { GroupNum = p.Key.GroupNum, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty) });
foreach (var nitm in notls)
{
innotls.Add(new INVOICE_NOT_SETTLE(
@ -1824,7 +1828,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
lU1: nitm.LU,
extend1: string.Empty,
extend2: string.Empty,
qty: nitm.Qty
qty: nitm.Qty,
p_invbillnum:key
));
}
if (innotls.Count > 0)
@ -2060,7 +2066,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var query = from inv1 in invdetails
join dto1 in dtos on
new { inv1.LU, inv1.PN } equals new { dto1.LU, dto1.PN }
new { inv1.LU,inv1.PartCode, inv1.PN } equals new { dto1.LU,dto1.PartCode, dto1.PN }
select new
{
PartCode = inv1.PartCode,
@ -2103,6 +2109,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
groupList.AddRange(mapList);
}
List<INVOICE_WAIT_DETAIL> _entityDetailList = new List<INVOICE_WAIT_DETAIL>();
//var txt= JsonSerializer.Serialize(query.ToList());
foreach (var detail in query.ToList())
{

11
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs

@ -408,7 +408,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var innotls = new List<INVOICE_NOT_SETTLE>();
if (p_notlist != null && p_notlist.Count > 0)
{
var notls = p_notlist.GroupBy(p => new { p.GroupNum, p.LU }).Select(p => new { GroupNum = p.Key.GroupNum, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty) });
var notls = p_notlist.Where(p=>ls.Contains(p.GroupNum)).GroupBy(p => new { p.GroupNum, p.LU }).Select(p => new { GroupNum = p.Key.GroupNum, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty) });
foreach (var nitm in notls)
{
innotls.Add(new INVOICE_NOT_SETTLE(
@ -420,7 +420,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
lU1: nitm.LU,
extend1: string.Empty,
extend2: string.Empty,
qty: nitm.Qty
qty: nitm.Qty,
p_invbillnum:key
));
}
if (innotls.Count > 0)
@ -841,7 +843,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var innotls = new List<INVOICE_NOT_SETTLE>();
if (p_notlist != null && p_notlist.Count > 0)
{
var notls = p_notlist.GroupBy(p => new { p.GroupNum, p.LU }).Select(p => new { GroupNum = p.Key.GroupNum, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty) });
var notls = p_notlist.Where(p=>ls.Contains(p.GroupNum)).GroupBy(p => new { p.GroupNum, p.LU }).Select(p => new { GroupNum = p.Key.GroupNum, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty) });
foreach (var nitm in notls)
{
innotls.Add(new INVOICE_NOT_SETTLE(
@ -853,7 +855,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
lU1: nitm.LU,
extend1: string.Empty,
extend2: string.Empty,
qty: nitm.Qty
qty: nitm.Qty,
p_invbillnum:key
));
}
if (innotls.Count > 0)

8
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Temp/TempClass.cs

@ -131,6 +131,14 @@ public class TEMP_CAN_SA_DETAIL
public string PartCode { get; set; }
/// <summary>
/// 订单号
/// </summary>
public string PoNum { get; set; }
}
public class TEMP_NOT_SA_DETAIL : SA_NOT_BASE
{

3
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQFactoryUnSettledDetailDiffExportService.cs

@ -1,4 +1,4 @@
using Magicodes.ExporterAndImporter.Excel;
using Magicodes.ExporterAndImporter.Excel;
using Shouldly;
using System;
using System.Collections.Generic;
@ -23,7 +23,6 @@ namespace SettleAccount.Job.Services.Report
private readonly HQFactorySettledDetailDapperRepository _dapperRepository;
private readonly ErpPartDapperRepository _erpdapperRepository;
private readonly IBlobContainer<MyFileContainer> _fileContainer;
private readonly OutputService _outputService;
private readonly InputService _inputService;

334
code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs

@ -81,187 +81,187 @@ namespace Win.Sfs.SettleAccount
}
}; return accesor;
});
context.Services.AddTransient(implementationFactory =>
{
Func<string, IExportJob> accesor = key =>
{
if (key.Equals(typeof(PubSaSeCompareExportService).FullName))
{
return implementationFactory.GetService<PubSaSeCompareExportService>();
}
if (key.Equals(typeof(JisBBACEdiSeCompareExportService).FullName))
{
return implementationFactory.GetService<JisBBACEdiSeCompareExportService>();
}
if (key.Equals(typeof(JisHBPOEdiSeCompareExportService).FullName))
{
return implementationFactory.GetService<JisHBPOEdiSeCompareExportService>();
}
if (key.Equals(typeof(PD_SERVICE).FullName))
{
return implementationFactory.GetService<PD_SERVICE>();
}
//context.Services.AddTransient(implementationFactory =>
//{
// Func<string, IExportJob> accesor = key =>
// {
// if (key.Equals(typeof(PubSaSeCompareExportService).FullName))
// {
// return implementationFactory.GetService<PubSaSeCompareExportService>();
// }
// if (key.Equals(typeof(JisBBACEdiSeCompareExportService).FullName))
// {
// return implementationFactory.GetService<JisBBACEdiSeCompareExportService>();
// }
// if (key.Equals(typeof(JisHBPOEdiSeCompareExportService).FullName))
// {
// return implementationFactory.GetService<JisHBPOEdiSeCompareExportService>();
// }
// if (key.Equals(typeof(PD_SERVICE).FullName))
// {
// return implementationFactory.GetService<PD_SERVICE>();
// }
if (key.Equals(typeof(InvoiceSettledDiffExportService).FullName))
{
return implementationFactory.GetService<InvoiceSettledDiffExportService>();
}
if (key.Equals(typeof(UnSettledExportService).FullName))
{
return implementationFactory.GetService<UnSettledExportService>();
}
if (key.Equals(typeof(fisUnsettledDiffReport).FullName))
{//ERP总成开票报表
return implementationFactory.GetService<fisUnsettledDiffReport>();
}
if (key.Equals(typeof(PriceQtyDifferenceExportService).FullName))
{//量差和价差分析报表
return implementationFactory.GetService<PriceQtyDifferenceExportService>();
}
if (key.Equals(typeof(SettledPartAndErpPartPriceDiffExportService).FullName))
{
return implementationFactory.GetService<SettledPartAndErpPartPriceDiffExportService>();
}
if (key.Equals(typeof(SecMatchBaseExportService).FullName))
{
return implementationFactory.GetService<SecMatchBaseExportService>();
}
// if (key.Equals(typeof(InvoiceSettledDiffExportService).FullName))
// {
// return implementationFactory.GetService<InvoiceSettledDiffExportService>();
// }
// if (key.Equals(typeof(UnSettledExportService).FullName))
// {
// return implementationFactory.GetService<UnSettledExportService>();
// }
// if (key.Equals(typeof(fisUnsettledDiffReport).FullName))
// {//ERP总成开票报表
// return implementationFactory.GetService<fisUnsettledDiffReport>();
// }
// if (key.Equals(typeof(PriceQtyDifferenceExportService).FullName))
// {//量差和价差分析报表
// return implementationFactory.GetService<PriceQtyDifferenceExportService>();
// }
// if (key.Equals(typeof(SettledPartAndErpPartPriceDiffExportService).FullName))
// {
// return implementationFactory.GetService<SettledPartAndErpPartPriceDiffExportService>();
// }
// if (key.Equals(typeof(SecMatchBaseExportService).FullName))
// {
// return implementationFactory.GetService<SecMatchBaseExportService>();
// }
if (key.Equals(typeof(SettleFisDiffExportService).FullName))
{
return implementationFactory.GetService<SettleFisDiffExportService>();
}
// if (key.Equals(typeof(SettleFisDiffExportService).FullName))
// {
// return implementationFactory.GetService<SettleFisDiffExportService>();
// }
//大众看板结算与交货核对明细表(有条码)
if (key.Equals(typeof(SettleKBWithCodeExportService).FullName))
{
return implementationFactory.GetService<SettleKBWithCodeExportService>();
}
//大众备件结算核对明细表
if (key.Equals(typeof(SettleSparePartExportService).FullName))
{
return implementationFactory.GetService<SettleSparePartExportService>();
}
//大众备件未结明细
if (key.Equals(typeof(SettleUnSparePartExportService).FullName))
{
return implementationFactory.GetService<SettleUnSparePartExportService>();
}
//大众备件90天核对明细
if (key.Equals(typeof(SettleSparePart90ExportService).FullName))
{
return implementationFactory.GetService<SettleSparePart90ExportService>();
}
if (key.Equals(typeof(InvoiceSettledDetailDiffExportService).FullName))
{
return implementationFactory.GetService<InvoiceSettledDetailDiffExportService>();
}
if (key.Equals(typeof(UnInvoiceSettledDetailDiffExportService).FullName))
{
return implementationFactory.GetService<UnInvoiceSettledDetailDiffExportService>();
}
if (key.Equals(typeof(UnSettleDiffExportService).FullName))
{
return implementationFactory.GetService<UnSettleDiffExportService>();
}
// //大众看板结算与交货核对明细表(有条码)
// if (key.Equals(typeof(SettleKBWithCodeExportService).FullName))
// {
// return implementationFactory.GetService<SettleKBWithCodeExportService>();
// }
// //大众备件结算核对明细表
// if (key.Equals(typeof(SettleSparePartExportService).FullName))
// {
// return implementationFactory.GetService<SettleSparePartExportService>();
// }
// //大众备件未结明细
// if (key.Equals(typeof(SettleUnSparePartExportService).FullName))
// {
// return implementationFactory.GetService<SettleUnSparePartExportService>();
// }
// //大众备件90天核对明细
// if (key.Equals(typeof(SettleSparePart90ExportService).FullName))
// {
// return implementationFactory.GetService<SettleSparePart90ExportService>();
// }
// if (key.Equals(typeof(InvoiceSettledDetailDiffExportService).FullName))
// {
// return implementationFactory.GetService<InvoiceSettledDetailDiffExportService>();
// }
// if (key.Equals(typeof(UnInvoiceSettledDetailDiffExportService).FullName))
// {
// return implementationFactory.GetService<UnInvoiceSettledDetailDiffExportService>();
// }
// if (key.Equals(typeof(UnSettleDiffExportService).FullName))
// {
// return implementationFactory.GetService<UnSettleDiffExportService>();
// }
if (key.Equals(typeof(SettleDoorPanelExportService).FullName))
{
return implementationFactory.GetService<SettleDoorPanelExportService>();
}
if (key.Equals(typeof(UnsettledDetailReportService).FullName))
{
return implementationFactory.GetService<UnsettledDetailReportService>();
}
if (key.Equals(typeof(SettleKBWithOutCodeExportService).FullName))
{
return implementationFactory.GetService<SettleKBWithOutCodeExportService>();
}
if (key.Equals(typeof(SharePartUnSettledExport).FullName))
{
return implementationFactory.GetService<SharePartUnSettledExport>();
}
//红旗、一汽轿车结算报表
if (key.Equals(typeof(HQFSettledDetailDiffExportService).FullName))
{
return implementationFactory.GetService<HQFSettledDetailDiffExportService>();
}
if (key.Equals(typeof(HQFSharePartSettledDetailDiffExportService).FullName))
{
return implementationFactory.GetService<HQFSharePartSettledDetailDiffExportService>();
}
if (key.Equals(typeof(HQMSettledDetailDiffExportService).FullName))
{
return implementationFactory.GetService<HQMSettledDetailDiffExportService>();
}
if (key.Equals(typeof(HQMSharePartSettledDetailDiffExportService).FullName))
{
return implementationFactory.GetService<HQMSharePartSettledDetailDiffExportService>();
}
if (key.Equals(typeof(HQHSettledDetailDiffExportService).FullName))
{
return implementationFactory.GetService<HQHSettledDetailDiffExportService>();
}
//红旗结算未结明细
if (key.Equals(typeof(HQHUnSettledDetailDiffExportService).FullName))
{
return implementationFactory.GetService<HQHUnSettledDetailDiffExportService>();
}
//红旗未结核对
if (key.Equals(typeof(HQFactoryUnSettledDetailDiffExportService).FullName))
{
return implementationFactory.GetService<HQFactoryUnSettledDetailDiffExportService>();
}
if (key.Equals(typeof(HQHSharePartSettledDetailDiffExportService).FullName))
{
return implementationFactory.GetService<HQHSharePartSettledDetailDiffExportService>();
}
//红旗、轿车发运报表
if (key.Equals(typeof(HQMShippingExportService).FullName))
{
return implementationFactory.GetService<HQMShippingExportService>();
}
if (key.Equals(typeof(HQHShippingExportService).FullName))
{
return implementationFactory.GetService<HQHShippingExportService>();
}
if (key.Equals(typeof(HQFShippingExportService).FullName))
{
return implementationFactory.GetService<HQFShippingExportService>();
}
if (key.Equals(typeof(WmsOutputSumExportService).FullName))
{
return implementationFactory.GetService<WmsOutputSumExportService>();
}
//大众看板未结输出
if (key.Equals(typeof(KanBanUnSettledExport).FullName))
{
return implementationFactory.GetService<KanBanUnSettledExport>();
}
if (key.Equals(typeof(FisUpdateExportService).FullName))
{
return implementationFactory.GetService<FisUpdateExportService>();
}
if (key.Equals(typeof(FisOutputService).FullName))
{
return implementationFactory.GetService<FisOutputService>();
}
// if (key.Equals(typeof(SettleDoorPanelExportService).FullName))
// {
// return implementationFactory.GetService<SettleDoorPanelExportService>();
// }
// if (key.Equals(typeof(UnsettledDetailReportService).FullName))
// {
// return implementationFactory.GetService<UnsettledDetailReportService>();
// }
// if (key.Equals(typeof(SettleKBWithOutCodeExportService).FullName))
// {
// return implementationFactory.GetService<SettleKBWithOutCodeExportService>();
// }
// if (key.Equals(typeof(SharePartUnSettledExport).FullName))
// {
// return implementationFactory.GetService<SharePartUnSettledExport>();
// }
// //红旗、一汽轿车结算报表
// if (key.Equals(typeof(HQFSettledDetailDiffExportService).FullName))
// {
// return implementationFactory.GetService<HQFSettledDetailDiffExportService>();
// }
// if (key.Equals(typeof(HQFSharePartSettledDetailDiffExportService).FullName))
// {
// return implementationFactory.GetService<HQFSharePartSettledDetailDiffExportService>();
// }
// if (key.Equals(typeof(HQMSettledDetailDiffExportService).FullName))
// {
// return implementationFactory.GetService<HQMSettledDetailDiffExportService>();
// }
// if (key.Equals(typeof(HQMSharePartSettledDetailDiffExportService).FullName))
// {
// return implementationFactory.GetService<HQMSharePartSettledDetailDiffExportService>();
// }
// if (key.Equals(typeof(HQHSettledDetailDiffExportService).FullName))
// {
// return implementationFactory.GetService<HQHSettledDetailDiffExportService>();
// }
// //红旗结算未结明细
// if (key.Equals(typeof(HQHUnSettledDetailDiffExportService).FullName))
// {
// return implementationFactory.GetService<HQHUnSettledDetailDiffExportService>();
// }
// //红旗未结核对
// if (key.Equals(typeof(HQFactoryUnSettledDetailDiffExportService).FullName))
// {
// return implementationFactory.GetService<HQFactoryUnSettledDetailDiffExportService>();
// }
// if (key.Equals(typeof(HQHSharePartSettledDetailDiffExportService).FullName))
// {
// return implementationFactory.GetService<HQHSharePartSettledDetailDiffExportService>();
// }
// //红旗、轿车发运报表
// if (key.Equals(typeof(HQMShippingExportService).FullName))
// {
// return implementationFactory.GetService<HQMShippingExportService>();
// }
// if (key.Equals(typeof(HQHShippingExportService).FullName))
// {
// return implementationFactory.GetService<HQHShippingExportService>();
// }
// if (key.Equals(typeof(HQFShippingExportService).FullName))
// {
// return implementationFactory.GetService<HQFShippingExportService>();
// }
// if (key.Equals(typeof(WmsOutputSumExportService).FullName))
// {
// return implementationFactory.GetService<WmsOutputSumExportService>();
// }
// //大众看板未结输出
// if (key.Equals(typeof(KanBanUnSettledExport).FullName))
// {
// return implementationFactory.GetService<KanBanUnSettledExport>();
// }
// if (key.Equals(typeof(FisUpdateExportService).FullName))
// {
// return implementationFactory.GetService<FisUpdateExportService>();
// }
// if (key.Equals(typeof(FisOutputService).FullName))
// {
// return implementationFactory.GetService<FisOutputService>();
// }
else
{
throw new ArgumentException($"Not Support key:{key}");
}
// else
// {
// throw new ArgumentException($"Not Support key:{key}");
// }
}; return accesor;
});
// }; return accesor;
//});
Configure<AbpBlobStoringOptions>(options =>

Loading…
Cancel
Save