Browse Source

更新代码

branch_ccpg_220107
Administrator 3 years ago
parent
commit
e8329d2a94
  1. BIN
      .vs/Win.Sfs.SmartSettlementSystem.PG/v16/.suo
  2. 3294
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Logs/log-20211222.txt
  3. 8
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json
  4. 8
      src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json
  5. 56
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs
  6. 46
      src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml
  7. 2
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  8. 2
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountEntityFrameworkCoreModule.cs
  9. 2
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettleDiffDapperRepository.cs
  10. 50
      src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettleDiffExportService.cs

BIN
.vs/Win.Sfs.SmartSettlementSystem.PG/v16/.suo

Binary file not shown.

3294
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Logs/log-20211222.txt

File diff suppressed because it is too large

8
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.Development.json

@ -7,10 +7,10 @@
// "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;" // "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;"
//}, //},
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1", //"Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1",
"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService1;user id=sa;Password=1;" //"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService1;user id=sa;Password=1;"
//"Default": "Server=192.168.0.140;Database=ABP;User ID=sa;Password=Microsoft2008;", "Default": "Server=192.168.0.140;Database=ABP;User ID=sa;Password=Microsoft2008;",
//"SettleAccountService": "Server=192.168.0.140;Database=SettleAccountService;user id=sa;password=Microsoft2008;" "SettleAccountService": "Server=192.168.0.140;Database=SettleAccountService;user id=sa;password=Microsoft2008;"
}, },
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {

8
src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json

@ -7,10 +7,10 @@
// "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;" // "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService;user id=sa;Password=1q2w!@#;"
//}, //},
"ConnectionStrings": { "ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1", //"Default": "Server=127.0.0.1;Database=ABP;user id=sa;Password=1",
"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService1;user id=sa;Password=1;" //"SettleAccountService": "Server=127.0.0.1;Database=SettleAccountService1;user id=sa;Password=1;"
//"Default": "Server=192.168.0.140;Database=ABP;User ID=sa;Password=Microsoft2008;", "Default": "Server=192.168.0.140;Database=ABP;User ID=sa;Password=Microsoft2008;",
//"SettleAccountService": "Server=192.168.0.140;Database=SettleAccountService;user id=sa;password=Microsoft2008;", "SettleAccountService": "Server=192.168.0.140;Database=SettleAccountService;user id=sa;password=Microsoft2008;",
//"WmsService": "Server=192.168.0.140;Database=CPAT_WMS_TEST;user id=sa;password=Microsoft2008;" //"WmsService": "Server=192.168.0.140;Database=CPAT_WMS_TEST;user id=sa;password=Microsoft2008;"
}, },

56
src/Modules/SettleAccount/src/SettleAccount.Application/Entities/SettleAccounts/SettleAccountAppService.cs

@ -164,8 +164,15 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{ {
if (p_list != null) if (p_list != null)
{ {
List<WmsJitOutPutDetial> _ls = new List<WmsJitOutPutDetial>();
var _ls = await _wmsRepository.Where(p => p_list.Contains(p.Id) && p.Version == version && p.State != 2).ToListAsync(); if (p_list.Count() > 0)
{
_ls = await _wmsRepository.Where(p => p_list.Contains(p.Id) && p.Version == version && p.State != 2).ToListAsync();
}
else
{
_ls = await _wmsRepository.Where(p => p.Version == version && p.State != 2).ToListAsync();
}
if (_ls.Count() > 0) if (_ls.Count() > 0)
{ {
var _first = _ls.FirstOrDefault(); var _first = _ls.FirstOrDefault();
@ -179,7 +186,7 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
{ {
TaskId = _guid, TaskId = _guid,
SourceBillNum = _first.BillNum, SourceBillNum = _first.BillNum,
TableName = "WmsJitOutPutDetail", //TableName = "WmsJitOutPutDetail",
InterfaceType = "1", InterfaceType = "1",
Version = version, Version = version,
State = 0, State = 0,
@ -202,33 +209,34 @@ namespace Win.Sfs.SettleAccount.Entities.SettleAccounts
[HttpGet] [HttpGet]
[Route("WmsJitOutPut-Cancel")] [Route("WmsJitOutPut-Cancel")]
public async Task<bool> WmsJitOutPutCancel(List<string> fileList, string version) public async Task<bool> WmsJitOutPutCancel(List<Guid> ids, string version)
{ {
List<WmsJitOutPutDetial> _lst = new List<WmsJitOutPutDetial>(); //var _guid = GuidGenerator.Create();
foreach (var filename in fileList) //foreach (var itm in _ls)
//{
// itm.TaskId = _guid;
//}
var _ls = await _wmsRepository.Where(p => ids.Contains(p.Id) && p.Version == version && p.State == 1).ToListAsync();
var _first = _ls.FirstOrDefault();
if (_ls.Count>0)
{ {
string fileSavePath = Environment.CurrentDirectory + @"\wwwroot\files\host\my-file-container\" + filename; var _guid = GuidGenerator.Create();
IExcelImporter Importer = new Magicodes.ExporterAndImporter.Excel.ExcelImporter(); await _wmsefRespository.GetDbContext().BulkInsertAsync(_ls,new BulkConfig() { BulkCopyTimeout=0 });
var _list = await Importer.ImportSameSheets<WmsJitOutPutDetialDto, WmsJitOutPutDetial>(fileSavePath); var uniapi = new TS_UNI_API(GuidGenerator.Create(), "1", version, "WmsJitOutPutDetail", _first.BillNum, 0, _guid)
foreach (var itm in _list)
{ {
var list = itm.Value.Data.ToList(); TaskId = _guid,
_lst.AddRange(list.ToArray()); SourceBillNum = _first.BillNum,
} TableName = "WmsJitOutPutDetail",
} InterfaceType = "1",
var _ls1 = _lst.Where(p => p.ParentMaterialCode == p.MaterialCode).ToList(); Version = version,
State = 0,
await _wmsRepository.GetDbContext().BulkInsertAsync(_ls1, new BulkConfig() { BulkCopyTimeout = 0 }); };
var _l = new List<TS_UNI_API>();
_l.Add(uniapi);
await _wmsefRespository.GetDbContext().BulkInsertAsync(_l);
int _count = _wmsVersionRepository.Count(p => p.Version == version);
if (_count == 0)
{
var _version = new List<WmsJitOutPut>();
_version.Add(new WmsJitOutPut { Version = version, BillNum = "T" + DateTime.Now.ToString("yyyyMMddhhmmssdddd"), Creator = CurrentUser.Email });
await _wmsVersionRepository.GetDbContext().BulkInsertAsync(_version);
} }
//_wmsRepository.Where(p=>p)
return true; return true;
} }

46
src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.xml

@ -1402,7 +1402,7 @@
大众准时化结算明细导入-R3已结 大众准时化结算明细导入-R3已结
</summary> </summary>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountAppService.#ctor(Volo.Abp.Guids.IGuidGenerator,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountVersion,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount,System.Guid},Volo.Abp.Caching.IDistributedCache{Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount},Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService,Win.Abp.Snowflakes.ISnowflakeIdGenerator,Win.Sfs.SettleAccount.CommonManagers.ICommonManager,Win.Sfs.SettleAccount.Entities.TaskJobs.TaskJobService,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.FISes.FIS,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Prebatches.Prebatch,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.MaterialRelationships.MaterialRelationship,System.Guid})"> <member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountAppService.#ctor(Volo.Abp.Guids.IGuidGenerator,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountVersion,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount,System.Guid},Volo.Abp.Caching.IDistributedCache{Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccount},Win.Sfs.BaseData.ImportExcelCommon.IExcelImportAppService,Win.Abp.Snowflakes.ISnowflakeIdGenerator,Win.Sfs.SettleAccount.CommonManagers.ICommonManager,Win.Sfs.SettleAccount.Entities.TaskJobs.TaskJobService,Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.FISes.FIS,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Prebatches.Prebatch,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.MaterialRelationships.MaterialRelationship,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsJitOutPutDetial,System.Guid},Win.Sfs.SettleAccount.ISettleAccountBranchEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsJitOutPut,System.Guid},Win.Sfs.SettleAccount.Repository.WMSEfCoreRepository{Win.Sfs.SettleAccount.Entities.WMS.WmsJitOutPutDetial})">
<summary> <summary>
构建方法 构建方法
</summary> </summary>
@ -1410,9 +1410,9 @@
<param name="repository">仓储接口</param> <param name="repository">仓储接口</param>
<param name="cache">缓存</param> <param name="cache">缓存</param>
</member> </member>
<member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountAppService.WmsJitOutPut(System.String,System.String)"> <member name="M:Win.Sfs.SettleAccount.Entities.SettleAccounts.SettleAccountAppService.WmsJitOutPut(System.Collections.Generic.List{System.String},System.String)">
<summary> <summary>
结算总成和ERP总成价格对比 汇总结算明细导记录
</summary> </summary>
<param name="files">上传的文件(前端已经限制只能上传一个附件)</param> <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
<returns></returns> <returns></returns>
@ -2146,46 +2146,6 @@
<param name="input"></param> <param name="input"></param>
<returns></returns> <returns></returns>
</member> </member>
<member name="P:Win.Sfs.SettleAccount.Entities.WMS.TS_UNI_API.InterfaceType">
<summary>
接口类型
</summary>
</member>
<member name="P:Win.Sfs.SettleAccount.Entities.WMS.TS_UNI_API.Version">
<summary>
版本号
</summary>
</member>
<member name="P:Win.Sfs.SettleAccount.Entities.WMS.TS_UNI_API.TableName">
<summary>
表明
</summary>
</member>
<member name="P:Win.Sfs.SettleAccount.Entities.WMS.TS_UNI_API.SourceBillNum">
<summary>
原单据号
</summary>
</member>
<member name="P:Win.Sfs.SettleAccount.Entities.WMS.TS_UNI_API.State">
<summary>
状态
</summary>
</member>
<member name="T:Win.Sfs.SettleAccount.Entities.WMS.WmsJitOutPutDetial">
<summary>
</summary>
</member>
<member name="P:Win.Sfs.SettleAccount.Entities.WMS.WmsJitOutPutDetial.Extend2">
<summary>
扩展字段2
</summary>
</member>
<member name="P:Win.Sfs.SettleAccount.Entities.WMS.WmsJitOutPutDetial.Extend3">
<summary>
扩展字段3
</summary>
</member>
<member name="T:Win.Sfs.SettleAccount.FISes.FISAppService"> <member name="T:Win.Sfs.SettleAccount.FISes.FISAppService">
<summary> <summary>
区域相关应用服务 区域相关应用服务

2
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs

@ -376,7 +376,7 @@ namespace Win.Sfs.SettleAccount
b.Property(x => x.InPut).HasMaxLength(50); b.Property(x => x.InPut).HasMaxLength(50);
b.Property(x => x.Extend1).HasMaxLength(50); b.Property(x => x.Extend1).HasMaxLength(50);
b.Property(x => x.Extend2).HasMaxLength(50); b.Property(x => x.Extend2).HasMaxLength(50);
b.Property(x => x.Extend3).HasMaxLength(50); b.Property(x => x.Version).HasMaxLength(50);
b.Property(x => x.ChassisNumber).HasMaxLength(50); b.Property(x => x.ChassisNumber).HasMaxLength(50);
b.Property(x => x.KennCode).HasMaxLength(50); b.Property(x => x.KennCode).HasMaxLength(50);
b.Property(x => x.MaterialDesc).HasMaxLength(50); b.Property(x => x.MaterialDesc).HasMaxLength(50);

2
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountEntityFrameworkCoreModule.cs

@ -59,7 +59,7 @@ namespace Win.Sfs.SettleAccount
// context.Services.AddTransient(typeof(IInventoryDetailRepository), // context.Services.AddTransient(typeof(IInventoryDetailRepository),
//typeof(InventoryDetailRepository)); //typeof(InventoryDetailRepository));
context.Services.AddTransient(typeof(WMSEfCoreRepository<>)), context.Services.AddTransient(typeof(WMSEfCoreRepository<>));
context.Services.AddTransient(typeof(INormalEfCoreRepository<,>), context.Services.AddTransient(typeof(INormalEfCoreRepository<,>),
typeof(SettleAccountNormalEfCoreRepository<,>)); typeof(SettleAccountNormalEfCoreRepository<,>));
context.Services.AddTransient(typeof(IBranchEfCoreRepository<,>), context.Services.AddTransient(typeof(IBranchEfCoreRepository<,>),

2
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/UnSettleDiffDapperRepository.cs

@ -57,8 +57,6 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
[ExporterHeader(DisplayName = "开票单价",IsIgnore =true)] [ExporterHeader(DisplayName = "开票单价",IsIgnore =true)]
public override decimal InvoicePrice { set; get; } public override decimal InvoicePrice { set; get; }
//交货单号 实际发货日期 KENN号 底盘号 底盘格式整理 M100交货状态 物料号 物料描述 客户物料 组件组物料 组件组物料描述 物料组(车型) 结算平台未结数量 定价 金额 大众R3未结数量 差异 差异金额 //交货单号 实际发货日期 KENN号 底盘号 底盘格式整理 M100交货状态 物料号 物料描述 客户物料 组件组物料 组件组物料描述 物料组(车型) 结算平台未结数量 定价 金额 大众R3未结数量 差异 差异金额

50
src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/UnSettleDiffExportService.cs

@ -83,18 +83,56 @@ namespace SettleAccount.Job.Services.Report
var _list = _ls.Where(p => p.ParentSapMaterialCode != p.SapMaterialCode && !string.IsNullOrEmpty(p.ParentSapMaterialCode)).GroupBy(p => new { p.ParentSapMaterialCode, p.ChassisNumber, p.KENNCode }) var _list = _ls.Where(p => p.ParentSapMaterialCode != p.SapMaterialCode && !string.IsNullOrEmpty(p.ParentSapMaterialCode)).GroupBy(p => new { p.ParentSapMaterialCode, p.ChassisNumber, p.KENNCode })
.Select(p => p.FirstOrDefault()).ToList(); .Select(p => p.FirstOrDefault()).ToList();
var _compareLs=_list.Where(p => p.DiffQty == 0).Select(p=> new { p.ChassisNumber,p.KENNCode,p.ParentSapMaterialCode });
var rangeList = _erpdapperRepository.GetSapList<UnSettleDiff>(_list, version, false); var rangeList = _erpdapperRepository.GetSapList<UnSettleDiff>(_list, version, false);
rangeList.ForEach(p => var query = from itm1 in rangeList
join itm2 in _compareLs on
new { itm1.ParentSapMaterialCode, itm1.KENNCode, itm1.ChassisNumber } equals
new { itm2.ParentSapMaterialCode, itm2.KENNCode, itm2.ChassisNumber }
into temp1
from tm1 in temp1.DefaultIfEmpty()
select new UnSettleDiff
{ {
WmsBillNum = itm1.WmsBillNum,
CP5Time = itm1.CP5Time,
KENNCode = itm1.KENNCode,
ChassisNumber = itm1.ChassisNumber,
WmsState = itm1.WmsState,
SapMaterialCode = itm1.SapMaterialCode,
MaterialDesc = itm1.MaterialDesc,
MaterialCode = itm1.MaterialCode,
ParentSapMaterialCode = itm1.ParentSapMaterialCode,
ParentMaterialDesc = itm1.ParentMaterialDesc,
MaterialGroup = itm1.MaterialGroup,
Price = itm1.Price,
Amt = itm1.Amt,
Qty = 1,
UNSettleQty = !string.IsNullOrEmpty(tm1.ParentSapMaterialCode) ? 1 : 0,
DiffQty = !string.IsNullOrEmpty(tm1.ParentSapMaterialCode) ? 0 : -1,
DiffAmt = !string.IsNullOrEmpty(tm1.ParentSapMaterialCode) ? 0 : (itm1.Qty * itm1.Price)
};
rangeList = query.ToList();
p.Qty = 1;
p.DiffAmt = p.Qty * p.Price;
p.DiffQty = -1;
}
);
_ls.AddRange(rangeList); _ls.AddRange(rangeList);

Loading…
Cancel
Save