学 赵 1 year ago
parent
commit
5272ac1732
  1. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccountHttpApiHostModule.cs
  2. 1
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/app.js
  3. BIN
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/influxdb/influxd.exe
  4. 6
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/influxdb/influxdb.conf
  5. 11
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/influxdb/start.cmd
  6. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/influxdb/stop.cmd
  7. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/material-relationship.js
  8. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js
  9. 12
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_PD_SERVICE.cs
  10. 12
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_PD_SERVICE.cs
  11. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeSyncBaseAppService.cs
  12. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeSyncBaseAppService.cs
  13. 28
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JitSeSyncAppService.cs
  14. 62
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
  15. 162
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs
  16. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj
  17. 68
      code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs
  18. 86
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiBalance.cs
  19. 158
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiLog.cs
  20. 22
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiMessage.cs
  21. 22
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  22. 25
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/VmiSqliteContext.cs
  23. 5618
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230822072327_vmi12.Designer.cs
  24. 236
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230822072327_vmi12.cs
  25. 106
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs
  26. 30
      code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccountHttpApiHostModule.cs

@ -102,9 +102,9 @@ namespace Win.Sfs.SettleAccount
//注册BOLB容器 //注册BOLB容器
ConfigureBLOBServices(configuration); ConfigureBLOBServices(configuration);
//注册大众的二配实际输出文件的容器 //注册大众的二配实际输出文件的容器
ConfigureBLOBSecSummaryServices(configuration); //ConfigureBLOBSecSummaryServices(configuration);
//注册奔腾的二配实际输出文件的容器 //注册奔腾的二配实际输出文件的容器
ConfigureBLOBTSecSummaryServices(configuration); //ConfigureBLOBTSecSummaryServices(configuration);
ConfigureHangfire(context, configuration); ConfigureHangfire(context, configuration);
//context.Services.Configure<AbpExceptionHttpStatusCodeOptions>(options => //context.Services.Configure<AbpExceptionHttpStatusCodeOptions>(options =>

1
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/app.js

@ -11,7 +11,6 @@ export default {
template: html` template: html`
<el-config-provider :locale="localeMap.get($i18n.locale)"> <el-config-provider :locale="localeMap.get($i18n.locale)">
<router-view></router-view> <router-view></router-view>
<el-popconfirm title="服务端已更新,是否刷新?"> </el-popconfirm>
</el-config-provider> </el-config-provider>
`, `,
setup() { setup() {

BIN
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/influxdb/influxd.exe

Binary file not shown.

6
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/influxdb/influxdb.conf

@ -1,6 +0,0 @@
[meta]
dir = "./data/meta"
[data]
dir = "./data/data"
wal-dir = "./data/wal"

11
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/influxdb/start.cmd

@ -1,11 +0,0 @@
@echo off
tasklist|find /i "influxd.exe"
if %errorlevel% == 0 (
¡¡¡¡exit
)
%1 start mshta vbscript:createobject("wscript.shell").run("""%~0"" ::",0)(window.close)&&exit
start /b ./influxd.exe -config ./influxdb.conf

3
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/influxdb/stop.cmd

@ -1,3 +0,0 @@
@ECHO OFF
taskkill /im influxd.exe /f /t

3
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/material-relationship.js

@ -1,3 +1,5 @@
import businessType from "../_options.js";
const schema = { const schema = {
title: "客户零件关系", title: "客户零件关系",
type: "object", type: "object",
@ -14,6 +16,7 @@ const schema = {
title: "厂内物料描述", title: "厂内物料描述",
type: "string", type: "string",
}, },
businessType,
}, },
}; };

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js

@ -17,7 +17,7 @@ export default {
const url = config.edit.addUrl; const url = config.edit.addUrl;
if (item.path === "add") { if (item.path === "add") {
const invbillNum = rows[0].billNum; const invbillNum = rows[0].billNum;
await appListRef.value.onClick(async () => await request(url, { invbillNum }, { method: "POST" }, true), `确认为${invbillNum}创建发票?`, true); await appListRef.value.onClick(async () => await request(url, invbillNum, { method: "POST" }, true), `确认为${invbillNum}创建发票?`, true);
} }
}; };
return { appListRef, config, onCommand }; return { appListRef, config, onCommand };

12
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_PD_SERVICE.cs

@ -78,16 +78,16 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
BillTime = itm.CreationTime, BillTime = itm.CreationTime,
ChangedTime = DateTime.Now, ChangedTime = DateTime.Now,
Qty = itm.Qty, Qty = itm.Qty,
DeliverTime = itm.CreationTime, AssembleData = 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, DeliverSubBillType = EnumDeliverSubBillType.BBAC,
BillType = EnumDeliverBjBmpBillType.JIS件, DeliverBillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU, RealPartCode = itm.LU,
SettlementVinCode = itm.PN, SettlementVinCode = itm.PN,
PartCode2 = itm.LU, //PartCode2 = itm.LU,
CustomerPartCode = itm.LU, CustPartCode = itm.LU,
VinCode = itm.PN, VinCode = itm.PN,
OrderNum = itm.GroupNum, OrderNum = itm.GroupNum,
ErpToLoc = "C0001" ErpToLoc = "C0001"

12
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_PD_SERVICE.cs

@ -42,16 +42,16 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
BillTime = itm.CreationTime, BillTime = itm.CreationTime,
ChangedTime = DateTime.Now, ChangedTime = DateTime.Now,
Qty = itm.Qty, Qty = itm.Qty,
DeliverTime = itm.CreationTime, AssembleData = 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, DeliverSubBillType = EnumDeliverSubBillType.BBAC,
BillType = EnumDeliverBjBmpBillType.JIS件, DeliverBillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU, RealPartCode = itm.LU,
SettlementVinCode = itm.PN, SettlementVinCode = itm.PN,
PartCode2 = itm.LU, //PartCode2 = itm.LU,
CustomerPartCode = itm.LU, CustPartCode = itm.LU,
VinCode = itm.PN, VinCode = itm.PN,
OrderNum = itm.GroupNum, OrderNum = itm.GroupNum,
ErpToLoc = "C0001" ErpToLoc = "C0001"

4
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeSyncBaseAppService.cs

@ -46,7 +46,7 @@ public class JisBBACSeSyncBaseAppService : ApplicationService, IInvocable
/// </summary> /// </summary>
private readonly MaterialRelationshipManager _materialRelationshipManager; private readonly MaterialRelationshipManager _materialRelationshipManager;
private readonly IVmiService _vmiService; //private readonly IVmiService _vmiService;
/// <summary> /// <summary>
/// 构造 /// 构造
@ -64,7 +64,7 @@ public class JisBBACSeSyncBaseAppService : ApplicationService, IInvocable
_syncPositionFlagRepository = syncPositionFlagRepository; _syncPositionFlagRepository = syncPositionFlagRepository;
_jisSeDetailRepository = jisSeDetailRepository; _jisSeDetailRepository = jisSeDetailRepository;
_materialRelationshipManager = materialRelationshipManager; _materialRelationshipManager = materialRelationshipManager;
_vmiService = vmiService; //_vmiService = vmiService;
} }
/// <summary> /// <summary>

4
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeSyncBaseAppService.cs

@ -46,7 +46,7 @@ public class JisHBPOSeSyncBaseAppService : ApplicationService, IInvocable
/// </summary> /// </summary>
private readonly MaterialRelationshipManager _materialRelationshipManager; private readonly MaterialRelationshipManager _materialRelationshipManager;
private readonly IVmiService _vmiService; //private readonly IVmiService _vmiService;
/// <summary> /// <summary>
/// 构造 /// 构造
@ -64,7 +64,7 @@ public class JisHBPOSeSyncBaseAppService : ApplicationService, IInvocable
_syncPositionFlagRepository = syncPositionFlagRepository; _syncPositionFlagRepository = syncPositionFlagRepository;
_jisSeDetailRepository = jisSeDetailRepository; _jisSeDetailRepository = jisSeDetailRepository;
_materialRelationshipManager = materialRelationshipManager; _materialRelationshipManager = materialRelationshipManager;
_vmiService = vmiService; //_vmiService = vmiService;
} }
/// <summary> /// <summary>

28
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JitSeSyncAppService.cs

@ -50,7 +50,7 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
/// </summary> /// </summary>
private readonly MaterialRelationshipManager _materialRelationshipManager; private readonly MaterialRelationshipManager _materialRelationshipManager;
private readonly IVmiService _vmiService; //private readonly IVmiService _vmiService;
/// <summary> /// <summary>
/// 构造 /// 构造
@ -68,7 +68,7 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
_syncPositionFlagRepository = syncPositionFlagRepository; _syncPositionFlagRepository = syncPositionFlagRepository;
_pubSeDetailRepository = pubSeDetailRepository; _pubSeDetailRepository = pubSeDetailRepository;
_materialRelationshipManager = materialRelationshipManager; _materialRelationshipManager = materialRelationshipManager;
_vmiService = vmiService; //_vmiService = vmiService;
} }
/// <summary> /// <summary>
@ -149,14 +149,14 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
{ {
var vmiBalance = new VmiBalance() var vmiBalance = new VmiBalance()
{ {
PartCode = pubSeDetail.PartCode, RealPartCode = pubSeDetail.PartCode,
VinCode = pubSeDetail.PN, VinCode = pubSeDetail.PN,
CustomerPartCode = default, CustPartCode = default,
CodeType = default, CodeType = default,
BillType = pubSeDetail.DeliverBillType, DeliverBillType = pubSeDetail.DeliverBillType,
Qty = pubSeDetail.Qty, Qty = pubSeDetail.Qty,
BillTime = pubSeDetail.BillTime ?? new DateTime(), BillTime = pubSeDetail.BillTime ?? new DateTime(),
DeliverTime = pubSeDetail.AssembleData, AssembleData = pubSeDetail.AssembleData,
ErpToLoc = pubSeDetail.ToErpLocCode, ErpToLoc = pubSeDetail.ToErpLocCode,
Seq = default, Seq = default,
OrderNum = pubSeDetail.DeliveryIndex, OrderNum = pubSeDetail.DeliveryIndex,
@ -165,24 +165,24 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
PjsNum = default, PjsNum = default,
Configcode = default, Configcode = default,
factory = default, factory = default,
SubBillType = pubSeDetail.DeliverSubBillType, DeliverSubBillType = pubSeDetail.DeliverSubBillType,
RealCode = default, RealCode = default,
ReMark = pubSeDetail.Remark, ReMark = pubSeDetail.Remark,
}; };
await _vmiService.In(logType: Vmi.VmiLogType.Type100, changedNumber: pubSeDetail.DnBillNum, data: vmiBalance).ConfigureAwait(false); //await _vmiService.In(logType: Vmi.VmiLogType.Type100, changedNumber: pubSeDetail.DnBillNum, data: vmiBalance).ConfigureAwait(false);
} }
else if (pubSeDetail.TransType == EnumDelTransType.退) else if (pubSeDetail.TransType == EnumDelTransType.退)
{ {
var vmiLog = new VmiLog() var vmiLog = new VmiLog()
{ {
PartCode = pubSeDetail.PartCode, RealPartCode = pubSeDetail.PartCode,
VinCode = pubSeDetail.PN, VinCode = pubSeDetail.PN,
CustomerPartCode = default, CustPartCode = default,
CodeType = default, CodeType = default,
BillType = pubSeDetail.DeliverBillType, DeliverBillType = pubSeDetail.DeliverBillType,
Qty = pubSeDetail.Qty, Qty = pubSeDetail.Qty,
BillTime = pubSeDetail.BillTime ?? new DateTime(), BillTime = pubSeDetail.BillTime ?? new DateTime(),
DeliverTime = pubSeDetail.DnBillTime, AssembleData = pubSeDetail.DnBillTime,
ErpToLoc = pubSeDetail.ToErpLocCode, ErpToLoc = pubSeDetail.ToErpLocCode,
Seq = default, Seq = default,
OrderNum = pubSeDetail.DnBillNum, OrderNum = pubSeDetail.DnBillNum,
@ -191,11 +191,11 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
PjsNum = default, PjsNum = default,
Configcode = default, Configcode = default,
factory = default, factory = default,
SubBillType = pubSeDetail.DeliverSubBillType, DeliverSubBillType = pubSeDetail.DeliverSubBillType,
RealCode = default, RealCode = default,
ReMark = pubSeDetail.Remark, ReMark = pubSeDetail.Remark,
}; };
await _vmiService.Out(VmiLogType.Type400, pubSeDetail.DnBillNum, vmiLog).ConfigureAwait(false); //await _vmiService.Out(VmiLogType.Type400, pubSeDetail.DnBillNum, vmiLog).ConfigureAwait(false);
} }
} }
} }

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

@ -98,16 +98,16 @@ public class PendingDeductionService : ITransientDependency, IExportJob
BillTime = itm.BillTime, BillTime = itm.BillTime,
ChangedTime = DateTime.Now, ChangedTime = DateTime.Now,
Qty = itm.Qty, Qty = itm.Qty,
DeliverTime = itm.BillTime, AssembleData = itm.BillTime,
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.PartCode, RealPartCode = itm.PartCode,
SettlementVinCode = itm.VinCode, SettlementVinCode = itm.VinCode,
PartCode2 = itm.PartCode2, //PartCode2 = itm.PartCode2,
CustomerPartCode = itm.CustomerPartCode, CustPartCode = itm.CustomerPartCode,
VinCode = itm.VinCode, VinCode = itm.VinCode,
//OrderNum = itm.OrderNum, //OrderNum = itm.OrderNum,
ErpToLoc = "C0001" ErpToLoc = "C0001"
@ -182,10 +182,10 @@ public class PendingDeductionService : ITransientDependency, IExportJob
ChangedType = VmiType.Out, ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO, // SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件, // BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,//客户 RealPartCode = itm.LU,//客户
SettlementVinCode = itm.PN, SettlementVinCode = itm.PN,
PartCode2 = itm.LU,//厂内 //PartCode2 = itm.LU,//厂内
CustomerPartCode = itm.LU, CustPartCode = itm.LU,
VinCode = itm.PN, VinCode = itm.PN,
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号 // OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
ErpToLoc = "C0001" ErpToLoc = "C0001"
@ -215,10 +215,10 @@ public class PendingDeductionService : ITransientDependency, IExportJob
ChangedType = VmiType.Out, ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO, // SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件, // BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,//客户 RealPartCode = itm.LU,//客户
SettlementVinCode = itm.PN, SettlementVinCode = itm.PN,
PartCode2 = itm.LU,//厂内 //PartCode2 = itm.LU,//厂内
CustomerPartCode = itm.LU, CustPartCode = itm.LU,
VinCode = itm.PN, VinCode = itm.PN,
OrderNum = itm.PN, OrderNum = itm.PN,
ErpToLoc = "C0001" ErpToLoc = "C0001"
@ -244,10 +244,10 @@ public class PendingDeductionService : ITransientDependency, IExportJob
ChangedType = VmiType.Out, ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO, // SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件, // BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,//客户 RealPartCode = itm.LU,//客户
SettlementVinCode = itm.PN, SettlementVinCode = itm.PN,
PartCode2 = itm.LU,//厂内 //PartCode2 = itm.LU,//厂内
CustomerPartCode = itm.LU, CustPartCode = itm.LU,
VinCode = itm.PN, VinCode = itm.PN,
OrderNum = itm.PN,// 非JIS传ASN 交付识别号 OrderNum = itm.PN,// 非JIS传ASN 交付识别号
ErpToLoc = "C0001" ErpToLoc = "C0001"
@ -275,10 +275,10 @@ public class PendingDeductionService : ITransientDependency, IExportJob
ChangedType = VmiType.Out, ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO, // SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件, // BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,//客户 RealPartCode = itm.LU,//客户
SettlementVinCode = itm.PN, SettlementVinCode = itm.PN,
PartCode2 = itm.LU,//厂内 //PartCode2 = itm.LU,//厂内
CustomerPartCode = itm.LU, CustPartCode = itm.LU,
VinCode = itm.PN, VinCode = itm.PN,
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号 // OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
ErpToLoc = "C0001" ErpToLoc = "C0001"
@ -310,10 +310,10 @@ public class PendingDeductionService : ITransientDependency, IExportJob
ChangedType = VmiType.Out, ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO, // SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件, // BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,//客户 RealPartCode = itm.LU,//客户
SettlementVinCode = itm.PN, SettlementVinCode = itm.PN,
PartCode2 = itm.LU,//厂内 //PartCode2 = itm.LU,//厂内
CustomerPartCode = itm.LU, CustPartCode = itm.LU,
VinCode = itm.PN, VinCode = itm.PN,
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号 // OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
ErpToLoc = "C0001" ErpToLoc = "C0001"
@ -343,10 +343,10 @@ public class PendingDeductionService : ITransientDependency, IExportJob
ChangedType = VmiType.Out, ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO, // SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件, // BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,//客户 RealPartCode = itm.LU,//客户
SettlementVinCode = itm.PN, SettlementVinCode = itm.PN,
PartCode2 = itm.LU,//厂内 //PartCode2 = itm.LU,//厂内
CustomerPartCode = itm.LU, CustPartCode = itm.LU,
VinCode = itm.PN, VinCode = itm.PN,
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号 // OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
ErpToLoc = "C0001" ErpToLoc = "C0001"
@ -376,10 +376,10 @@ public class PendingDeductionService : ITransientDependency, IExportJob
ChangedType = VmiType.Out, ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO, // SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件, // BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,//客户 RealPartCode = itm.LU,//客户
SettlementVinCode = itm.PN, SettlementVinCode = itm.PN,
PartCode2 = itm.LU,//厂内 //PartCode2 = itm.LU,//厂内
CustomerPartCode = itm.LU, CustPartCode = itm.LU,
VinCode = itm.PN, VinCode = itm.PN,
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号 // OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
ErpToLoc = "C0001" ErpToLoc = "C0001"
@ -405,16 +405,16 @@ public class PendingDeductionService : ITransientDependency, IExportJob
BillTime = itm.CreationTime, BillTime = itm.CreationTime,
ChangedTime = DateTime.Now, ChangedTime = DateTime.Now,
Qty = itm.Qty, Qty = itm.Qty,
DeliverTime = itm.CreationTime, AssembleData = 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, DeliverSubBillType = EnumDeliverSubBillType.BBAC,
BillType = EnumDeliverBjBmpBillType.JIS件, DeliverBillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU, RealPartCode = itm.LU,
SettlementVinCode = itm.PN, SettlementVinCode = itm.PN,
PartCode2 = itm.LU, //PartCode2 = itm.LU,
CustomerPartCode = itm.LU, CustPartCode = itm.LU,
VinCode = itm.PN, VinCode = itm.PN,
OrderNum = itm.GroupNum, OrderNum = itm.GroupNum,
ErpToLoc = "C0001" ErpToLoc = "C0001"

162
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs

@ -18,8 +18,6 @@ using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.SignalR; using Microsoft.AspNetCore.SignalR;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.OpenApi.Extensions; using Microsoft.OpenApi.Extensions;
@ -35,25 +33,15 @@ using Volo.Abp.Validation;
using Win.Sfs.BaseData.ImportExcelCommon; using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos; using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi; using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.EntityFrameworkCore;
using Win.Sfs.SettleAccount.influxdb; using Win.Sfs.SettleAccount.influxdb;
using Win.Sfs.Shared.Filter; using Win.Sfs.Shared.Filter;
using Win.Sfs.Shared.RepositoryBase; using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ; namespace Win.Sfs.SettleAccount.Entities.BQ;
public interface IVmiService : IApplicationService, ITransientDependency, IJobService
{
Task In(VmiLogType logType, string changedNumber, VmiBalance data);
Task Out(VmiLogType logType, string changedNumber, VmiLog data);
//Task UnDo(string groupId);
}
[AllowAnonymous] [AllowAnonymous]
[Route("api/settleaccount/[controller]/[action]")] [Route("api/settleaccount/[controller]/[action]")]
public class VmiAppService : ApplicationService, IVmiService, IJobService, ITransientDependency public class VmiAppService : ApplicationService, IJobService, ITransientDependency
{ {
public static SemaphoreSlim backupLock = new SemaphoreSlim(1); public static SemaphoreSlim backupLock = new SemaphoreSlim(1);
private readonly IConfiguration _cfg; private readonly IConfiguration _cfg;
@ -85,6 +73,40 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
LinqToDBForEFTools.Initialize(); LinqToDBForEFTools.Initialize();
} }
[HttpPost]
public async Task Test(List<VmiLog> logs, int size = 1000)
{
using var scope = this._serviceProvider.CreateScope();
var db = scope.ServiceProvider.GetRequiredService<SettleAccountDbContext>();
using var dc = db.CreateLinqToDBConnection();
dc.BeginTransaction();
try
{
//var skip = 0;
//var count = logs.Count;
//while (count > 0)
//{
// var batchSize = count > size ? size : count;
// var tempLogs = logs.Skip(skip).Take(batchSize);
// var tempMessages = tempLogs.Select(o => new VmiMessage { Message = JsonSerializer.Serialize(o) });
// await dc.BulkCopyAsync(new BulkCopyOptions { TableName = "Set_VmiLog" }, tempLogs).ConfigureAwait(false);
// await dc.BulkCopyAsync(new BulkCopyOptions { TableName = "Set_VmiMessage" }, tempMessages).ConfigureAwait(false);
// count -= batchSize;
// skip += batchSize;
//}
await dc.BulkCopyAsync(new BulkCopyOptions { TableName = "Set_VmiMessage", MaxBatchSize = 1 }, new List<VmiMessage> {
new VmiMessage(Guid.NewGuid()) { Message="1" },
new VmiMessage(Guid.NewGuid()) { Message="2" }
}).ConfigureAwait(false);
dc.Transaction.Commit();
}
catch
{
dc.Transaction.Rollback();
throw;
}
}
/// <summary> /// <summary>
/// Excel 转 JSON /// Excel 转 JSON
/// </summary> /// </summary>
@ -131,60 +153,32 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
/// </summary> /// </summary>
[NonAction] [NonAction]
[DisableValidation] [DisableValidation]
public virtual async Task Invoke(IServiceProvider serviceProvider) public virtual Task Invoke(IServiceProvider serviceProvider)
{
await backupLock.WaitAsync().ConfigureAwait(false);
try
{ {
//this._hubContext.Clients.All.ServerToClient("JobItem", "refresh", ""); using var scope = serviceProvider.CreateScope();
Directory.CreateDirectory(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot/files/vmi")); var db = scope.ServiceProvider.GetRequiredService<SettleAccountDbContext>();
var date = DateTime.Now.ToString("yyyy-MM-dd_HH.mm.ss"); using var transaction = db.Database.BeginTransaction();
var connectionString = $"Data Source=wwwroot/files/vmi/{date}.db";
using var dbContext = new VmiSqliteContext(connectionString);
if (!dbContext.GetService<IRelationalDatabaseCreator>().Exists() && dbContext.Database.EnsureCreated())
{
var query = serviceProvider.GetRequiredService<SettleAccountDbContext>().Set<VmiBalance>().AsNoTracking();
var list = new List<VmiBalance>();
using var dc = dbContext.CreateLinqToDBConnection();
dc.BeginTransaction();
try try
{ {
var now = DateTime.Now; var time = DateTime.Now.ToString("yyyy_mm_dd_hh_mm_ss");
var table = "VmiBalance"; var table = $"Set_VmiBalance_{time}";
foreach (var item in query) var snapshot = db.Set<VmiSnapshot>().Where(o => o.Name == table).FirstOrDefault();
{ if (snapshot == null)
item.BackupTime = now;
list.Add(item);
if (list.Count == 10000)
{
//dbContext.Set<VmiBalance>().AddRange(list);
await dc.BulkCopyAsync(new BulkCopyOptions { TableName = table }, list).ConfigureAwait(false);
list.Clear();
}
}
if (list.Count > 0)
{
await dc.BulkCopyAsync(new BulkCopyOptions { TableName = table }, list).ConfigureAwait(false);
}
dc.Transaction.Commit();
var snapshot = new VmiSnapshot { Name = date, Path = connectionString };
await _snapshotRepository.InsertAsync(snapshot).ConfigureAwait(false);
}
catch
{ {
dc.Transaction.Rollback(); snapshot = new VmiSnapshot { Name = time, Path = table };
throw; db.Set<VmiSnapshot>().Add(snapshot);
} db.SaveChanges();
var result = db.Database.ExecuteSqlRaw($"select * into {table} from Set_VmiBalance;");
transaction.Commit();
return Task.CompletedTask;
} }
throw new Exception("备份程序正在运行");
} }
catch catch
{ {
transaction.Rollback();
throw; throw;
} }
finally
{
backupLock.Release();
}
} }
/// <summary> /// <summary>
@ -192,9 +186,26 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
/// </summary> /// </summary>
[HttpPost("invoke")] [HttpPost("invoke")]
[DisableValidation] [DisableValidation]
public virtual async Task VmiBackup() public virtual async Task<IActionResult> VmiBackup()
{
if (backupLock.CurrentCount == 1)
{
return new JsonResult(new { Code = 500, Message = "备份程序正在运行" });
}
await backupLock.WaitAsync().ConfigureAwait(false);
try
{ {
await Invoke(_serviceProvider).ConfigureAwait(false); await Invoke(_serviceProvider).ConfigureAwait(false);
return new JsonResult(new { Code = 200, Message = "备份成功" });
}
catch (Exception ex)
{
return new JsonResult(new { Code = 500, Message = ex.Message, Data = ex.ToString() });
}
finally
{
backupLock.Release();
}
} }
/// <summary> /// <summary>
@ -216,9 +227,9 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
var db = scope.ServiceProvider.GetRequiredService<SettleAccountDbContext>(); var db = scope.ServiceProvider.GetRequiredService<SettleAccountDbContext>();
var balance = db.Set<VmiBalance>().FirstOrDefault( var balance = db.Set<VmiBalance>().FirstOrDefault(
o => o.BillType == data.BillType && o => o.DeliverBillType == data.DeliverBillType &&
o.CodeType == data.CodeType && o.CodeType == data.CodeType &&
o.PartCode == data.PartCode && o.DeliverBillType == data.DeliverBillType &&
o.VinCode == data.VinCode && o.VinCode == data.VinCode &&
o.ErpToLoc == data.ErpToLoc && o.ErpToLoc == data.ErpToLoc &&
o.OrderNum == data.OrderNum && o.OrderNum == data.OrderNum &&
@ -296,9 +307,9 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
using var scope = _serviceProvider.CreateScope(); using var scope = _serviceProvider.CreateScope();
var db = scope.ServiceProvider.GetRequiredService<SettleAccountDbContext>(); var db = scope.ServiceProvider.GetRequiredService<SettleAccountDbContext>();
var balance = db.Set<VmiBalance>().FirstOrDefault( var balance = db.Set<VmiBalance>().FirstOrDefault(
o => o.BillType == data.BillType && o => o.DeliverBillType == data.DeliverBillType &&
o.CodeType == data.CodeType && o.CodeType == data.CodeType &&
o.PartCode == data.PartCode && o.DeliverBillType == data.DeliverBillType &&
o.VinCode == data.VinCode && o.VinCode == data.VinCode &&
o.ErpToLoc == data.ErpToLoc && o.ErpToLoc == data.ErpToLoc &&
o.OrderNum == data.OrderNum && o.OrderNum == data.OrderNum &&
@ -508,11 +519,16 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
[HttpPost] [HttpPost]
public async Task<PagedResultDto<VmiBalance>> Backup(BackupListRequest input) public async Task<PagedResultDto<VmiBalance>> Backup(BackupListRequest input)
{ {
var connectionString = $"Data Source=wwwroot/files/vmi/{input.Name}.db"; using var scope = this._serviceProvider.CreateScope();
using var dbContext = new VmiSqliteContext(connectionString); var db = scope.ServiceProvider.GetRequiredService<SettleAccountDbContext>();
var repo = dbContext.Set<VmiBalance>(); var name = input.Name;
var sql = $"select * from {name}";
var query = db.Set<VmiBalance>().FromSqlRaw(sql);
var filters = input.Filters.ToLambda<VmiBalance>(); var filters = input.Filters.ToLambda<VmiBalance>();
var query = (input.Filters.Count > 0 ? repo.Where(input.Filters.ToLambda<VmiBalance>()) : repo); if (input.Filters.Count > 0)
{
query = query.Where(input.Filters.ToLambda<VmiBalance>());
}
var totalCount = query.Count(); var totalCount = query.Count();
query = string.IsNullOrEmpty(input.Sorting) ? query : DynamicQueryableExtensions.OrderBy(query, input.Sorting); query = string.IsNullOrEmpty(input.Sorting) ? query : DynamicQueryableExtensions.OrderBy(query, input.Sorting);
var entities = await query.PageBy(input.SkipCount, input.MaxResultCount).ToListAsync().ConfigureAwait(false); var entities = await query.PageBy(input.SkipCount, input.MaxResultCount).ToListAsync().ConfigureAwait(false);
@ -525,11 +541,17 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
[HttpPost] [HttpPost]
public async Task<string> BackupExport(BackupListRequest input) public async Task<string> BackupExport(BackupListRequest input)
{ {
var connectionString = $"Data Source=wwwroot/files/vmi/{input.Name}.db"; using var scope = this._serviceProvider.CreateScope();
using var dbContext = new VmiSqliteContext(connectionString); var db = scope.ServiceProvider.GetRequiredService<SettleAccountDbContext>();
var repo = dbContext.Set<VmiBalance>(); var name = input.Name;
var sql = $"select * from {name}";
var query = db.Set<VmiBalance>().FromSqlRaw(sql);
var filters = input.Filters.ToLambda<VmiBalance>(); var filters = input.Filters.ToLambda<VmiBalance>();
var query = (input.Filters.Count > 0 ? repo.Where(input.Filters.ToLambda<VmiBalance>()) : repo); if (input.Filters.Count > 0)
{
query = query.Where(input.Filters.ToLambda<VmiBalance>());
}
var totalCount = query.Count();
query = string.IsNullOrEmpty(input.Sorting) ? query : DynamicQueryableExtensions.OrderBy(query, input.Sorting); query = string.IsNullOrEmpty(input.Sorting) ? query : DynamicQueryableExtensions.OrderBy(query, input.Sorting);
var entities = await query.ToListAsync().ConfigureAwait(false); var entities = await query.ToListAsync().ConfigureAwait(false);
var fileName = $"库存备份_{input.Name}.xlsx"; var fileName = $"库存备份_{input.Name}.xlsx";

1
code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj

@ -138,6 +138,7 @@
<PackageReference Include="Volo.Abp.AutoMapper" Version="4.3.3" /> <PackageReference Include="Volo.Abp.AutoMapper" Version="4.3.3" />
<PackageReference Include="Volo.Abp.BackgroundJobs.Abstractions" Version="4.3.3" /> <PackageReference Include="Volo.Abp.BackgroundJobs.Abstractions" Version="4.3.3" />
<PackageReference Include="Volo.Abp.BackgroundWorkers" Version="4.3.3" /> <PackageReference Include="Volo.Abp.BackgroundWorkers" Version="4.3.3" />
<PackageReference Include="Volo.Abp.BlobStoring.Minio" Version="4.3.3" />
<PackageReference Include="Volo.Abp.Dapper" Version="4.3.3" /> <PackageReference Include="Volo.Abp.Dapper" Version="4.3.3" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="4.3.3" /> <PackageReference Include="Volo.Abp.Ddd.Application" Version="4.3.3" />
<PackageReference Include="Volo.Abp.EventBus.RabbitMQ" Version="4.3.3" /> <PackageReference Include="Volo.Abp.EventBus.RabbitMQ" Version="4.3.3" />

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

@ -1,20 +1,19 @@
using System;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using SettleAccount.Job.Services.Report;
using TaskJob.Interfaces;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AutoMapper; using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity; using Volo.Abp.BlobStoring;
using Volo.Abp.Application; using Volo.Abp.BlobStoring.Minio;
using Volo.Abp.Dapper;
using Volo.Abp.Http.Client.IdentityModel; using Volo.Abp.Http.Client.IdentityModel;
using Volo.Abp.Identity; using Volo.Abp.Identity;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.Modularity;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Dapper;
using Win.Abp.Snowflakes; 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; using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
using SettleAccount.Job.Services.Report;
using SettleAccount.Job.Services;
namespace Win.Sfs.SettleAccount namespace Win.Sfs.SettleAccount
{ {
@ -27,33 +26,39 @@ namespace Win.Sfs.SettleAccount
typeof(AbpIdentityHttpApiClientModule), typeof(AbpIdentityHttpApiClientModule),
typeof(AbpAutoMapperModule), typeof(AbpAutoMapperModule),
typeof(AbpAspNetCoreMvcModule), typeof(AbpAspNetCoreMvcModule),
typeof(AbpDapperModule) typeof(AbpDapperModule),
//typeof(AbpEventBusRabbitMqModule) typeof(AbpBlobStoringMinioModule)
)] )]
public class SettleAccountApplicationModule : AbpModule public class SettleAccountApplicationModule : AbpModule
{ {
public override void ConfigureServices(ServiceConfigurationContext context) public override void ConfigureServices(ServiceConfigurationContext context)
{ {
var cfg = context.Services.GetConfiguration();
//Configure<AbpBlobStoringOptions>(options =>
//{
// options.Containers.ConfigureDefault(container =>
// {
// container.UseMinio(minio =>
// {
// minio.EndPoint = cfg.GetValue("MinIO:EndPoint", "");
// minio.AccessKey = cfg.GetValue("MinIO:AccessKey", "");
// minio.SecretKey = cfg.GetValue("MinIO:SecretKey", "");
// minio.BucketName = cfg.GetValue("MinIO:BucketName", "");
// });
// });
//});
//context.Services.AddAutoMapperObjectMapper<SettleAccountApplicationModule>(); //context.Services.AddAutoMapperObjectMapper<SettleAccountApplicationModule>();
//Configure<AbpAutoMapperOptions>(options => //Configure<AbpAutoMapperOptions>(options =>
//{ //{
// options.AddMaps<SettleAccountApplicationModule>(validate: true); // options.AddMaps<SettleAccountApplicationModule>(validate: true);
//}); //});
ConfigureAutoMapper(); ConfigureAutoMapper();
ConfigureJson(context); ConfigureJson(context);
//context.Services.AddTransient(typeof(INormalEfCoreRepository<,>), //context.Services.AddTransient(typeof(INormalEfCoreRepository<,>),
//typeof(SettleAccountNormalEfCoreRepository<,>)); //typeof(SettleAccountNormalEfCoreRepository<,>));
context.Services.AddTransient(implementationFactory => context.Services.AddTransient(implementationFactory =>
{ {
Func<string, IExportJob> accesor = key => Func<string, IExportJob> accesor = key =>
@ -74,26 +79,13 @@ namespace Win.Sfs.SettleAccount
{ {
return implementationFactory.GetService<PendingDeductionService>(); return implementationFactory.GetService<PendingDeductionService>();
} }
else else
{ {
throw new ArgumentException($"Not Support key:{key}"); throw new ArgumentException($"Not Support key:{key}");
} }
}; return accesor; }; return accesor;
}); });
//context.Services.AddTransient(implementationFactory => //context.Services.AddTransient(implementationFactory =>
//{ //{
// Func<string, IExportJob> accesor = key => // Func<string, IExportJob> accesor = key =>
@ -110,16 +102,8 @@ namespace Win.Sfs.SettleAccount
// }; // };
// return accesor; // return accesor;
//}); //});
} }
private static void ConfigureJson(ServiceConfigurationContext context) private static void ConfigureJson(ServiceConfigurationContext context)
{ {
context.Services.Configure<JsonOptions>(opt => context.Services.Configure<JsonOptions>(opt =>

86
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiBalance.cs

@ -8,7 +8,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Vmi;
/// <summary> /// <summary>
/// ERP库位+零件号+生产码 /// ERP库位+零件号+生产码
/// </summary> /// </summary>
public class VmiBalance : BasicAggregateRoot<Guid>, IHasConcurrencyStamp public class VmiBalance : Entity<Guid>, IHasConcurrencyStamp
{ {
public VmiBalance() public VmiBalance()
{ {
@ -20,81 +20,71 @@ public class VmiBalance : BasicAggregateRoot<Guid>, IHasConcurrencyStamp
ConcurrencyStamp = Guid.NewGuid().ToString("N"); ConcurrencyStamp = Guid.NewGuid().ToString("N");
} }
/// <summary> public string ConcurrencyStamp { get; set; }
/// LU零件号
/// </summary>
[Display(Name = "LU零件号")]
public string PartCode { get; set; }
/// <summary> [Display(Name = "LU零件号", Order = 6)]
/// 生产码 public string RealPartCode { get; set; }
/// </summary>
[Display(Name = "生产码")]
public string VinCode { get; set; }
/// <summary> [Display(Name = "客户零件号", Order = 7)]
/// 根据零件关系表匹配 public string CustPartCode { get; set; }
/// </summary>
[Display(Name = "客户零件号")]
public string CustomerPartCode { get; set; }
/// <summary> [Display(Name = "生产码类型", Order = 8)]
/// 生产码类型
/// </summary>
[Display(Name = "生产码类型")]
public string CodeType { get; set; } public string CodeType { get; set; }
/// <summary> [Display(Name = "发货类型", Order = 9)]
/// 发货类型 public EnumDeliverBjBmpBillType? DeliverBillType { get; set; }
/// </summary>
[Display(Name = "发货类型")]
public EnumDeliverBjBmpBillType? BillType { get; set; }
[Display(Name = "数量")] [Display(Name = "数量", Order = 10)]
public decimal Qty { get; set; } public decimal Qty { get; set; }
[Display(Name = "发运日期")] [Display(Name = "发运日期", Order = 11)]
public DateTime? BillTime { get; set; } public DateTime? BillTime { get; set; }
[Display(Name = "订单日期")] [Display(Name = "订单日期", Order = 12)]
public DateTime? DeliverTime { get; set; } public DateTime? AssembleData { get; set; }
/// <summary> [Display(Name = "ERP库位", Order = 13)]
/// ERP库位
/// </summary>
[Display(Name = "ERP库位")]
public string ErpToLoc { get; set; } public string ErpToLoc { get; set; }
[Display(Name = "EDI顺序号")] [Display(Name = "EDI顺序号", Order = 14)]
public string Seq { get; set; } public string Seq { get; set; }
[Display(Name = "客户订单号")] [Display(Name = "客户订单号", Order = 15)]
public string OrderNum { get; set; } public string OrderNum { get; set; }
[Display(Name = "塑件唯一码")] [Display(Name = "塑件唯一码", Order = 16)]
public string UniqueCode { get; set; } public string UniqueCode { get; set; }
[Display(Name = "EDI总成号")] [Display(Name = "EDI总成号", Order = 17)]
public string MatchNumber { get; set; } public string MatchNumber { get; set; }
[Display(Name = "PJIS生产顺序号")] [Display(Name = "PJIS生产顺序号", Order = 18)]
public string PjsNum { get; set; } public string PjsNum { get; set; }
[Display(Name = "配置码")] [Display(Name = "实际生产码", Order = 19)]
public string RealCode { get; set; }
[Display(Name = "配置码", Order = 20)]
public string Configcode { get; set; } public string Configcode { get; set; }
[Display(Name = "工厂")] [Display(Name = "工厂", Order = 21)]
public string factory { get; set; } public string factory { get; set; }
[Display(Name = "发货子类型")] [Display(Name = "发货子类型", Order = 22)]
public EnumDeliverSubBillType? SubBillType { get; set; } public EnumDeliverSubBillType? DeliverSubBillType { get; set; }
[Display(Name = "WMS实发生产码")] [Display(Name = "EDI订单生产码", Order = 23)]
public string RealCode { get; set; } public string VinCode { get; set; }
[Display(Name = "备注")] [Display(Name = "结算生产码", Order = 24)]
public string ReMark { get; set; } public string SettlementVinCode { get; set; }
public string ConcurrencyStamp { get; set; } [Display(Name = "结算生产码", Order = 25)]
public DateTime? BackupTime { get; set; } public string SettlementPartCode { get; set; }
[Display(Name = "是否补货", Order = 26)]
public bool? IsReplenished { get; set; }
[Display(Name = "备注", Order = 27)]
public string ReMark { get; set; }
} }

158
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiLog.cs

@ -8,165 +8,99 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Vmi;
/// <summary> /// <summary>
/// 寄售库存操作记录 /// 寄售库存操作记录
/// </summary> /// </summary>
public class VmiLog : BasicAggregateRoot<Guid> public class VmiLog : Entity<Guid>
{ {
public VmiLog() public VmiLog()
{ {
} }
public VmiLog(Guid id) public VmiLog(Guid id):base(id)
{ {
this.Id = id;
} }
/// <summary> [Display(Name = "库存事务分类", Order = 0)]
/// 分组编号
/// </summary>
public string GroupId { get; set; }
/// <summary>
/// 库存事务分类
/// </summary>
public VmiLogType LogType { get; set; } public VmiLogType LogType { get; set; }
/// <summary> [Display(Name = "变动单号", Order = 1)]
/// 库存变动
/// </summary>
[Display(Name = "库存变动")]
public decimal ChangedQty { get; set; }
/// <summary>
/// 变动单号
/// </summary>
[Display(Name = "变动单号")]
public string ChangedNumber { get; set; } public string ChangedNumber { get; set; }
/// <summary>
/// 变动时间
/// </summary>
[Display(Name = "变动时间")] [Display(Name = "变动时间", Order = 2)]
public DateTime ChangedTime { get; set; } = DateTime.Now; public DateTime ChangedTime { get; set; } = DateTime.Now;
/// <summary> [Display(Name = "变动类型", Order = 3)]
/// 变动类型
/// </summary>
[Display(Name = "变动类型")]
public VmiType ChangedType { get; set; } public VmiType ChangedType { get; set; }
/// <summary>
/// 变动人
/// </summary>
[Display(Name = "便动人")] [Display(Name = "便动人", Order = 4)]
public string ChangedBy { get; set; } public string ChangedBy { get; set; }
/// <summary>
/// 是否补货
/// </summary>
[Display(Name = "是否补货")]
public bool? IsReplenished { get; set; }
#region 附加信息
//[Display(Name = "实扣厂内零件号")]
//public string PartCode { get; set; }
/// <summary>
/// 结算厂内零件号
/// </summary>
[Display(Name = "结算厂内零件号")]
public string PartCode2 { get; set; }
//[Display(Name = "结算客户零件号")]
//public string CustomerPartCode { get; set; }
//[Display(Name = "EDI订单生产码")]
//public string VinCode { get; set; }
/// <summary>
/// 结算生产码
/// </summary>
[Display(Name = "结算生产码")] [Display(Name = "库存变动", Order = 5)]
public string SettlementVinCode { get; set; } public decimal ChangedQty { get; set; }
#endregion 附加信息 //库存余额
#region 库存备份 [Display(Name = "LU零件号", Order = 6)]
public string RealPartCode { get; set; }
/// <summary> [Display(Name = "客户零件号", Order = 7)]
/// LU零件号 public string CustPartCode { get; set; }
/// </summary>
[Display(Name = "LU零件号")]
public string PartCode { get; set; }
/// <summary> [Display(Name = "生产码类型", Order = 8)]
/// 生产码
/// </summary>
[Display(Name = "生产码")]
public string VinCode { get; set; }
/// <summary>
/// 根据零件关系表匹配
/// </summary>
[Display(Name = "客户零件号")]
public string CustomerPartCode { get; set; }
/// <summary>
/// 生产码类型
/// </summary>
[Display(Name = "生产码类型")]
public string CodeType { get; set; } public string CodeType { get; set; }
/// <summary> [Display(Name = "发货类型", Order = 9)]
/// 发货类型 public EnumDeliverBjBmpBillType? DeliverBillType { get; set; }
/// </summary>
[Display(Name = "发货类型")]
public EnumDeliverBjBmpBillType? BillType { get; set; }
[Display(Name = "数量")] [Display(Name = "数量", Order = 10)]
public decimal Qty { get; set; } public decimal Qty { get; set; }
[Display(Name = "发运日期")] [Display(Name = "发运日期", Order = 11)]
public DateTime? BillTime { get; set; } public DateTime? BillTime { get; set; }
[Display(Name = "订单日期")] [Display(Name = "订单日期", Order = 12)]
public DateTime? DeliverTime { get; set; } public DateTime? AssembleData { get; set; }
/// <summary> [Display(Name = "ERP库位", Order = 13)]
/// ERP库位
/// </summary>
[Display(Name = "ERP库位")]
public string ErpToLoc { get; set; } public string ErpToLoc { get; set; }
[Display(Name = "EDI顺序号")] [Display(Name = "EDI顺序号", Order = 14)]
public string Seq { get; set; } public string Seq { get; set; }
[Display(Name = "客户订单号")] [Display(Name = "客户订单号", Order = 15)]
public string OrderNum { get; set; } public string OrderNum { get; set; }
[Display(Name = "塑件唯一码")] [Display(Name = "塑件唯一码", Order = 16)]
public string UniqueCode { get; set; } public string UniqueCode { get; set; }
[Display(Name = "EDI总成号")] [Display(Name = "EDI总成号", Order = 17)]
public string MatchNumber { get; set; } public string MatchNumber { get; set; }
[Display(Name = "PJIS生产顺序号")] [Display(Name = "PJIS生产顺序号", Order = 18)]
public string PjsNum { get; set; } public string PjsNum { get; set; }
[Display(Name = "配置码")] [Display(Name = "实际生产码", Order = 19)]
public string RealCode { get; set; }
[Display(Name = "配置码", Order = 20)]
public string Configcode { get; set; } public string Configcode { get; set; }
[Display(Name = "工厂")] [Display(Name = "工厂", Order = 21)]
public string factory { get; set; } public string factory { get; set; }
[Display(Name = "发货子类型")] [Display(Name = "发货子类型", Order = 22)]
public EnumDeliverSubBillType? SubBillType { get; set; } public EnumDeliverSubBillType? DeliverSubBillType { get; set; }
[Display(Name = "WMS实发生产码")] [Display(Name = "EDI订单生产码", Order = 23)]
public string RealCode { get; set; } public string VinCode { get; set; }
[Display(Name = "备注")] [Display(Name = "结算生产码", Order = 24)]
public string ReMark { get; set; } public string SettlementVinCode { get; set; }
[Display(Name = "结算生产码", Order = 25)]
public string SettlementPartCode { get; set; }
#endregion 库存备份 [Display(Name = "是否补货", Order = 26)]
public bool? IsReplenished { get; set; }
[Display(Name = "备注", Order = 27)]
public string ReMark { get; set; }
} }

22
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiMessage.cs

@ -0,0 +1,22 @@
using System;
using Volo.Abp.Domain.Entities;
namespace Win.Sfs.SettleAccount.Entities.BQ.Vmi;
public class VmiMessage : Entity<Guid>, IHasConcurrencyStamp
{
public VmiMessage()
{
ConcurrencyStamp = Guid.NewGuid().ToString("N");
}
public VmiMessage(Guid id) : base(id)
{
ConcurrencyStamp = Guid.NewGuid().ToString("N");
}
public long Number { get; set; }
public string Message { get; set; }
public bool isConsumed { get; set; }
public DateTime CreatedTime { get; set; } = DateTime.Now;
public string ConcurrencyStamp { get; set; }
}

22
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs

@ -1,5 +1,6 @@
using System; using System;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Builders; using Microsoft.EntityFrameworkCore.Metadata.Builders;
using SettleAccount.Domain.BQ; using SettleAccount.Domain.BQ;
using Volo.Abp; using Volo.Abp;
@ -1298,15 +1299,12 @@ namespace Win.Sfs.SettleAccount
b.ConfigureByConvention(); b.ConfigureByConvention();
}); });
//builder.Entity<VmiCategory>(b => builder.Entity<VmiMessage>(b =>
//{ {
// b.ToTable($"{options.TablePrefix}_VmiCategory", options.Schema); b.ToTable($"{options.TablePrefix}_VmiMessage", options.Schema);
// b.ConfigureByConvention(); b.ConfigureByConvention();
// b.Property(o => o.Number).HasMaxLength(50).IsRequired(); b.Property(o => o.Number).ValueGeneratedOnAdd().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore);
// b.HasIndex(o => o.Number).IsUnique(); });
// b.Property(o => o.Name).HasMaxLength(50).IsRequired();
// b.HasIndex(o => o.Name).IsUnique();
//});
builder.Entity((Action<EntityTypeBuilder<VmiBalance>>)(b => builder.Entity((Action<EntityTypeBuilder<VmiBalance>>)(b =>
{ {
@ -1314,9 +1312,9 @@ namespace Win.Sfs.SettleAccount
b.ConfigureByConvention(); b.ConfigureByConvention();
b.HasIndex(o => (new b.HasIndex(o => (new
{ {
o.BillType, o.DeliverBillType,
o.CodeType, o.CodeType,
o.PartCode, o.RealPartCode,
o.VinCode, o.VinCode,
o.ErpToLoc, o.ErpToLoc,
o.OrderNum, o.OrderNum,
@ -1324,7 +1322,7 @@ namespace Win.Sfs.SettleAccount
o.Configcode o.Configcode
})).IsUnique(); })).IsUnique();
})); }));
builder.Entity<VmiBalance>().HasData(new VmiBalance(Guid.NewGuid()) { BillType = EnumDeliverBjBmpBillType.JIS件, PartCode = "PartCode", VinCode = "VinCode", ErpToLoc = "ErpToLoc", OrderNum = "OrderNum" }); builder.Entity<VmiBalance>().HasData(new VmiBalance(Guid.NewGuid()) { DeliverBillType = EnumDeliverBjBmpBillType.JIS件, RealPartCode = "PartCode", VinCode = "VinCode", ErpToLoc = "ErpToLoc", OrderNum = "OrderNum" });
builder.Entity<VmiLog>(b => builder.Entity<VmiLog>(b =>
{ {

25
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/VmiSqliteContext.cs

@ -1,25 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
namespace Win.Sfs.SettleAccount.EntityFrameworkCore;
public class VmiSqliteContext : DbContext
{
private readonly string _connectionString;
public VmiSqliteContext(string connectionString)
{
this._connectionString = connectionString;
}
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlite(this._connectionString);
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<VmiBalance>().HasKey(o => o.Id);
}
}

5618
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230822072327_vmi12.Designer.cs

File diff suppressed because it is too large

236
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230822072327_vmi12.cs

@ -0,0 +1,236 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class vmi12 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_Set_VmiBalance_BillType_CodeType_PartCode_VinCode_ErpToLoc_OrderNum_factory_Configcode",
table: "Set_VmiBalance");
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("daf33f05-698e-49cf-b688-9288f5e94be5"));
migrationBuilder.DropColumn(
name: "CustomerPartCode",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "BackupTime",
table: "Set_VmiBalance");
migrationBuilder.RenameColumn(
name: "SubBillType",
table: "Set_VmiLog",
newName: "DeliverSubBillType");
migrationBuilder.RenameColumn(
name: "PartCode2",
table: "Set_VmiLog",
newName: "SettlementPartCode");
migrationBuilder.RenameColumn(
name: "PartCode",
table: "Set_VmiLog",
newName: "RealPartCode");
migrationBuilder.RenameColumn(
name: "GroupId",
table: "Set_VmiLog",
newName: "CustPartCode");
migrationBuilder.RenameColumn(
name: "DeliverTime",
table: "Set_VmiLog",
newName: "AssembleData");
migrationBuilder.RenameColumn(
name: "BillType",
table: "Set_VmiLog",
newName: "DeliverBillType");
migrationBuilder.RenameColumn(
name: "SubBillType",
table: "Set_VmiBalance",
newName: "DeliverSubBillType");
migrationBuilder.RenameColumn(
name: "PartCode",
table: "Set_VmiBalance",
newName: "RealPartCode");
migrationBuilder.RenameColumn(
name: "DeliverTime",
table: "Set_VmiBalance",
newName: "AssembleData");
migrationBuilder.RenameColumn(
name: "CustomerPartCode",
table: "Set_VmiBalance",
newName: "SettlementVinCode");
migrationBuilder.RenameColumn(
name: "BillType",
table: "Set_VmiBalance",
newName: "DeliverBillType");
migrationBuilder.AddColumn<string>(
name: "CustPartCode",
table: "Set_VmiBalance",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "IsReplenished",
table: "Set_VmiBalance",
type: "bit",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "SettlementPartCode",
table: "Set_VmiBalance",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.CreateTable(
name: "Set_VmiMessage",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Number = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Message = table.Column<string>(type: "nvarchar(max)", nullable: true),
isConsumed = table.Column<bool>(type: "bit", nullable: false),
CreatedTime = table.Column<DateTime>(type: "datetime2", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Set_VmiMessage", x => x.Id);
});
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "AssembleData", "BillTime", "CodeType", "ConcurrencyStamp", "Configcode", "CustPartCode", "DeliverBillType", "DeliverSubBillType", "ErpToLoc", "IsReplenished", "MatchNumber", "OrderNum", "PjsNum", "Qty", "ReMark", "RealCode", "RealPartCode", "Seq", "SettlementPartCode", "SettlementVinCode", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("1fad01d0-8122-42d3-bb8f-5fff76230eea"), null, null, null, "302d775f40154c279dbf7bbd37489b46", null, null, 1, null, "ErpToLoc", null, null, "OrderNum", null, 0m, null, null, "PartCode", null, null, null, null, "VinCode", null });
migrationBuilder.CreateIndex(
name: "IX_Set_VmiBalance_DeliverBillType_CodeType_RealPartCode_VinCode_ErpToLoc_OrderNum_factory_Configcode",
table: "Set_VmiBalance",
columns: new[] { "DeliverBillType", "CodeType", "RealPartCode", "VinCode", "ErpToLoc", "OrderNum", "factory", "Configcode" },
unique: true,
filter: "[DeliverBillType] IS NOT NULL AND [CodeType] IS NOT NULL AND [RealPartCode] IS NOT NULL AND [VinCode] IS NOT NULL AND [ErpToLoc] IS NOT NULL AND [OrderNum] IS NOT NULL AND [factory] IS NOT NULL AND [Configcode] IS NOT NULL");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Set_VmiMessage");
migrationBuilder.DropIndex(
name: "IX_Set_VmiBalance_DeliverBillType_CodeType_RealPartCode_VinCode_ErpToLoc_OrderNum_factory_Configcode",
table: "Set_VmiBalance");
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("1fad01d0-8122-42d3-bb8f-5fff76230eea"));
migrationBuilder.DropColumn(
name: "CustPartCode",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "IsReplenished",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "SettlementPartCode",
table: "Set_VmiBalance");
migrationBuilder.RenameColumn(
name: "SettlementPartCode",
table: "Set_VmiLog",
newName: "PartCode2");
migrationBuilder.RenameColumn(
name: "RealPartCode",
table: "Set_VmiLog",
newName: "PartCode");
migrationBuilder.RenameColumn(
name: "DeliverSubBillType",
table: "Set_VmiLog",
newName: "SubBillType");
migrationBuilder.RenameColumn(
name: "DeliverBillType",
table: "Set_VmiLog",
newName: "BillType");
migrationBuilder.RenameColumn(
name: "CustPartCode",
table: "Set_VmiLog",
newName: "GroupId");
migrationBuilder.RenameColumn(
name: "AssembleData",
table: "Set_VmiLog",
newName: "DeliverTime");
migrationBuilder.RenameColumn(
name: "SettlementVinCode",
table: "Set_VmiBalance",
newName: "CustomerPartCode");
migrationBuilder.RenameColumn(
name: "RealPartCode",
table: "Set_VmiBalance",
newName: "PartCode");
migrationBuilder.RenameColumn(
name: "DeliverSubBillType",
table: "Set_VmiBalance",
newName: "SubBillType");
migrationBuilder.RenameColumn(
name: "DeliverBillType",
table: "Set_VmiBalance",
newName: "BillType");
migrationBuilder.RenameColumn(
name: "AssembleData",
table: "Set_VmiBalance",
newName: "DeliverTime");
migrationBuilder.AddColumn<string>(
name: "CustomerPartCode",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "BackupTime",
table: "Set_VmiBalance",
type: "datetime2",
nullable: true);
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("daf33f05-698e-49cf-b688-9288f5e94be5"), null, null, 1, null, "2232ce1052044e5db3c50a381547b2bc", null, null, null, "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, null, null, "VinCode", null });
migrationBuilder.CreateIndex(
name: "IX_Set_VmiBalance_BillType_CodeType_PartCode_VinCode_ErpToLoc_OrderNum_factory_Configcode",
table: "Set_VmiBalance",
columns: new[] { "BillType", "CodeType", "PartCode", "VinCode", "ErpToLoc", "OrderNum", "factory", "Configcode" },
unique: true,
filter: "[BillType] IS NOT NULL AND [CodeType] IS NOT NULL AND [PartCode] IS NOT NULL AND [VinCode] IS NOT NULL AND [ErpToLoc] IS NOT NULL AND [OrderNum] IS NOT NULL AND [factory] IS NOT NULL AND [Configcode] IS NOT NULL");
}
}
}

106
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs

@ -4529,15 +4529,12 @@ namespace Win.Sfs.SettleAccount.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<DateTime?>("BackupTime") b.Property<DateTime?>("AssembleData")
.HasColumnType("datetime2"); .HasColumnType("datetime2");
b.Property<DateTime?>("BillTime") b.Property<DateTime?>("BillTime")
.HasColumnType("datetime2"); .HasColumnType("datetime2");
b.Property<int?>("BillType")
.HasColumnType("int");
b.Property<string>("CodeType") b.Property<string>("CodeType")
.HasColumnType("nvarchar(450)"); .HasColumnType("nvarchar(450)");
@ -4550,24 +4547,27 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("Configcode") b.Property<string>("Configcode")
.HasColumnType("nvarchar(450)"); .HasColumnType("nvarchar(450)");
b.Property<string>("CustomerPartCode") b.Property<string>("CustPartCode")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<DateTime?>("DeliverTime") b.Property<int?>("DeliverBillType")
.HasColumnType("datetime2"); .HasColumnType("int");
b.Property<int?>("DeliverSubBillType")
.HasColumnType("int");
b.Property<string>("ErpToLoc") b.Property<string>("ErpToLoc")
.HasColumnType("nvarchar(450)"); .HasColumnType("nvarchar(450)");
b.Property<bool?>("IsReplenished")
.HasColumnType("bit");
b.Property<string>("MatchNumber") b.Property<string>("MatchNumber")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<string>("OrderNum") b.Property<string>("OrderNum")
.HasColumnType("nvarchar(450)"); .HasColumnType("nvarchar(450)");
b.Property<string>("PartCode")
.HasColumnType("nvarchar(450)");
b.Property<string>("PjsNum") b.Property<string>("PjsNum")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
@ -4580,11 +4580,17 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("RealCode") b.Property<string>("RealCode")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<string>("RealPartCode")
.HasColumnType("nvarchar(450)");
b.Property<string>("Seq") b.Property<string>("Seq")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<int?>("SubBillType") b.Property<string>("SettlementPartCode")
.HasColumnType("int"); .HasColumnType("nvarchar(max)");
b.Property<string>("SettlementVinCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("UniqueCode") b.Property<string>("UniqueCode")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
@ -4597,22 +4603,22 @@ namespace Win.Sfs.SettleAccount.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("BillType", "CodeType", "PartCode", "VinCode", "ErpToLoc", "OrderNum", "factory", "Configcode") b.HasIndex("DeliverBillType", "CodeType", "RealPartCode", "VinCode", "ErpToLoc", "OrderNum", "factory", "Configcode")
.IsUnique() .IsUnique()
.HasFilter("[BillType] IS NOT NULL AND [CodeType] IS NOT NULL AND [PartCode] IS NOT NULL AND [VinCode] IS NOT NULL AND [ErpToLoc] IS NOT NULL AND [OrderNum] IS NOT NULL AND [factory] IS NOT NULL AND [Configcode] IS NOT NULL"); .HasFilter("[DeliverBillType] IS NOT NULL AND [CodeType] IS NOT NULL AND [RealPartCode] IS NOT NULL AND [VinCode] IS NOT NULL AND [ErpToLoc] IS NOT NULL AND [OrderNum] IS NOT NULL AND [factory] IS NOT NULL AND [Configcode] IS NOT NULL");
b.ToTable("Set_VmiBalance"); b.ToTable("Set_VmiBalance");
b.HasData( b.HasData(
new new
{ {
Id = new Guid("daf33f05-698e-49cf-b688-9288f5e94be5"), Id = new Guid("1fad01d0-8122-42d3-bb8f-5fff76230eea"),
BillType = 1, ConcurrencyStamp = "302d775f40154c279dbf7bbd37489b46",
ConcurrencyStamp = "2232ce1052044e5db3c50a381547b2bc", DeliverBillType = 1,
ErpToLoc = "ErpToLoc", ErpToLoc = "ErpToLoc",
OrderNum = "OrderNum", OrderNum = "OrderNum",
PartCode = "PartCode",
Qty = 0m, Qty = 0m,
RealPartCode = "PartCode",
VinCode = "VinCode" VinCode = "VinCode"
}); });
}); });
@ -4623,11 +4629,11 @@ namespace Win.Sfs.SettleAccount.Migrations
.ValueGeneratedOnAdd() .ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<DateTime?>("BillTime") b.Property<DateTime?>("AssembleData")
.HasColumnType("datetime2"); .HasColumnType("datetime2");
b.Property<int?>("BillType") b.Property<DateTime?>("BillTime")
.HasColumnType("int"); .HasColumnType("datetime2");
b.Property<string>("ChangedBy") b.Property<string>("ChangedBy")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
@ -4650,16 +4656,16 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("Configcode") b.Property<string>("Configcode")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<string>("CustomerPartCode") b.Property<string>("CustPartCode")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<DateTime?>("DeliverTime") b.Property<int?>("DeliverBillType")
.HasColumnType("datetime2"); .HasColumnType("int");
b.Property<string>("ErpToLoc") b.Property<int?>("DeliverSubBillType")
.HasColumnType("nvarchar(max)"); .HasColumnType("int");
b.Property<string>("GroupId") b.Property<string>("ErpToLoc")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<bool?>("IsReplenished") b.Property<bool?>("IsReplenished")
@ -4674,12 +4680,6 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("OrderNum") b.Property<string>("OrderNum")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<string>("PartCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("PartCode2")
.HasColumnType("nvarchar(max)");
b.Property<string>("PjsNum") b.Property<string>("PjsNum")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
@ -4692,14 +4692,17 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("RealCode") b.Property<string>("RealCode")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<string>("RealPartCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("Seq") b.Property<string>("Seq")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<string>("SettlementVinCode") b.Property<string>("SettlementPartCode")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<int?>("SubBillType") b.Property<string>("SettlementVinCode")
.HasColumnType("int"); .HasColumnType("nvarchar(max)");
b.Property<string>("UniqueCode") b.Property<string>("UniqueCode")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
@ -4715,6 +4718,37 @@ namespace Win.Sfs.SettleAccount.Migrations
b.ToTable("Set_VmiLog"); b.ToTable("Set_VmiLog");
}); });
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiMessage", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreatedTime")
.HasColumnType("datetime2");
b.Property<string>("Message")
.HasColumnType("nvarchar(max)");
b.Property<long>("Number")
.ValueGeneratedOnAdd()
.HasColumnType("bigint")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
b.Property<bool>("isConsumed")
.HasColumnType("bit");
b.HasKey("Id");
b.ToTable("Set_VmiMessage");
});
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiSnapshot", b => modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiSnapshot", b =>
{ {
b.Property<Guid>("Id") b.Property<Guid>("Id")

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

@ -264,22 +264,22 @@ namespace Win.Sfs.SettleAccount
//}); //});
Configure<AbpBlobStoringOptions>(options => //Configure<AbpBlobStoringOptions>(options =>
{ //{
options.Containers.Configure<OutPutErrorContainer>(container => // options.Containers.Configure<OutPutErrorContainer>(container =>
{ // {
container.UseFileSystem(fileSystem => // container.UseFileSystem(fileSystem =>
{ // {
var filestreampath = Environment.CurrentDirectory + @"\wwwroot\files\OutputError"; // var filestreampath = Environment.CurrentDirectory + @"\wwwroot\files\OutputError";
if (!Directory.Exists(filestreampath)) // if (!Directory.Exists(filestreampath))
{ // {
Directory.CreateDirectory(filestreampath); // Directory.CreateDirectory(filestreampath);
} // }
fileSystem.BasePath = filestreampath; // fileSystem.BasePath = filestreampath;
}); // });
}); // });
}); //});
} }

Loading…
Cancel
Save