学 赵 1 year ago
parent
commit
ac85d6ed93
  1. 51
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json
  2. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
  3. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
  4. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/bbac-edi-se-compare.js
  5. 5
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/hbpo-edi-se-compare.js
  6. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/adjust.js
  7. 6
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/backup.js
  8. 6
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/balance.js
  9. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/inventory.js
  10. 26
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js
  11. 14
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/vmi.js
  12. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/invoice/invoice_map_group.js
  13. 5
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/input/bbac_sa_service.js
  14. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/input/bbac_se_detail_service.js
  15. 5
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/input/hbpo_sa_service.js
  16. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/input/hbpo_se_detail_service.js
  17. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/job-service.js
  18. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_ba_detail_service.js
  19. 10
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_ba_service.js
  20. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_sa_detail_service.js
  21. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_se_detail_service.js
  22. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/version.js
  23. 945
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  24. 40
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/home.js
  25. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/contrast/bbac_jit_pub_sa_detail_jobservice.js
  26. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/input/bbac_jit_pub_sa_detail_service.js
  27. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/input/bbac_jit_pub_sa_service.js
  28. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/input/bbac_jit_pub_se_detail_service.js
  29. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_ba_detail_service.js
  30. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_ba_service.js
  31. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_can_sa_detail_service.js
  32. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_can_sa_service.js
  33. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_not_sa_service.js
  34. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_pd_detail_service.js
  35. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_pd_service.js
  36. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/contrast/hbpo_jit_pub_sa_detail_jobservice.js
  37. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/input/hbpo_jit_pub_sa_detail_service.js
  38. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/input/hbpo_jit_pub_sa_service.js
  39. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/input/hbpo_jit_pub_se_detail_service.js
  40. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_ba_detail_service.js
  41. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_ba_service.js
  42. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_can_sa_detail_service.js
  43. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_can_sa_service.js
  44. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_not_sa_service.js
  45. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_pd_detail_service.js
  46. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_pd_service.js
  47. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/settlement/jit_pub_pd_service.js
  48. 24
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-bbac/contrast/bbac_md_pub_sa_detail_jobservice.js
  49. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-bbac/input/bbac_md_pub_sa_detail_service.js
  50. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-bbac/input/bbac_md_pub_sa_service.js
  51. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-bbac/input/bbac_md_pub_se_detail_service.js
  52. 6
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/contrast/hbpo_md_pub_sa_detail_jobservice.js
  53. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/input/hbpo_md_pub_sa_detail_service.js
  54. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/input/hbpo_md_pub_sa_service.js
  55. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/input/hbpo_md_pub_se_detail_service.js
  56. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_ba_detail_service.js
  57. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_ba_service.js
  58. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_can_sa_detail_service.js
  59. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_can_sa_service.js
  60. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_not_sa_service.js
  61. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_pd_detail_service.js
  62. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_pd_service.js
  63. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/settlement/md_pub_ba_detail_service.js
  64. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/settlement/md_pub_ba_service.js
  65. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/settlement/md_pub_can_sa_detail_service.js
  66. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/settlement/md_pub_can_sa_service.js
  67. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/settlement/md_pub_not_sa_service.js
  68. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/settlement/md_pub_pd_service.js
  69. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs
  70. 35
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JitSeSyncAppService.cs
  71. 166
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs
  72. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccount.Application.csproj
  73. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SE_DETAIL.cs
  74. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SE_EDI.cs
  75. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_SA.cs
  76. 26
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiBalance.cs
  77. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiLog.cs
  78. 666
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/PubSaSeCompareDiff.cs
  79. 27
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  80. 5349
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230809035500_vmi11.Designer.cs
  81. 186
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230809035500_vmi11.cs
  82. 5355
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230809054836_20230809-1.Designer.cs
  83. 56
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230809054836_20230809-1.cs
  84. 5341
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230809074216_20230809-2.Designer.cs
  85. 65
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230809074216_20230809-2.cs
  86. 50
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs
  87. 13
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/PubSaSeCompareDapperRepository.cs
  88. 44
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/PubSaSeCompareExportService.cs

51
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/appsettings.json

@ -2,25 +2,12 @@
"App": {
"CorsOrigins": "https://*.abc.com,http://localhost:9527,http://149.223.116.5:8088"
},
//"ConnectionStrings": {
// "Default": "Server=LAPTOP-V3U07C2O;Database=ABP;user id=sa;Password=1q2w!@#",
// "SettleAccountService": "Server=LAPTOP-V3U07C2O;Database=SettleAccountService1;user id=sa;Password=1q2w!@#;"
//},
"ConnectionStrings": {
"Default": "Server=dev.ccwin-in.com,13319;Database=BJABP;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True",
"SettleAccountService": "Server=dev.ccwin-in.com,13319;Database=BQ_SA;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True;"
//"SettleAccountService": "Server=localhost;Database=BQ_SA;User ID=sa;Password=aA123456!;Trusted_Connection=False;TrustServerCertificate=True",
//"Default": "Server=localhost;Database=BJABP;User ID=sa;Password=aA123456!;Trusted_Connection=False;TrustServerCertificate=True"
"SettleAccountService": "Server=dev.ccwin-in.com,13319;Database=BQ_SA;User ID=ccwin-in;Password=Microsoft@2022;Trusted_Connection=False;TrustServerCertificate=True;",
"WMSBJBMPT": "Server=dev.ccwin-in.com,6208;Database=WMS_BJBMPT_2;User ID=sa;Password=ChangkeTec@2021;Trusted_Connection=False;TrustServerCertificate=True;",
"questdb": "host=dev.ccwin-in.com;port=10580;username=admin;password=quest;database=vmi;ServerCompatibilityMode=NoTypeLoading;"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"Serilog": {
"Using": [],
"MinumumLevel": {
@ -82,14 +69,7 @@
},
"AuthServer": {
//"Authority": "http://dev.ccwin-in.com:10580",
"Authority": "http://localhost:44378",
"ClientId": "basic-web",
"ClientSecret": "1q2w3e*"
@ -100,28 +80,5 @@
},
"DefaultBranchId": "3FA85F64-5717-4562-B3FC-2C963F66AFA6",
"AllowedHosts": "*",
"ElasticSearch": {
"Url": "http://localhost:9200"
},
"RemoteServices": {
"Default": {
"BaseUrl": "http://149.223.116.5:8091/",
"UseCurrentAccessToken": "true"
}
},
"IdentityClients": {
"Default": {
"GrantType": "client_credentials",
"ClientId": "business-app",
"ClientSecret": "1q2w3e*",
"Authority": "http://149.223.116.5:8066",
"Scope": "InternalGateway IdentityService SettleAccount"
}
}
"AllowedHosts": "*"
}

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js

@ -76,7 +76,7 @@ export default {
</template>
<template v-else>
<el-input
:clearable="!!schema.clearable"
clearable
:disabled="getDisabled()"
:placeholder="schema.title"
v-model="model[prop]"

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js

@ -618,6 +618,10 @@ export default {
} finally {
editFormloading.value = false;
}
} else if (item.path === "sync") {
const url = config.edit.syncUrl;
const method = config.edit.syncMethod;
await request(url, null, { method });
} else if (item === "filter") {
editFormTitle.value = t("自定义查询");
dialogVisible.value = true;

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/bbac-edi-se-compare.js

@ -55,12 +55,12 @@ export default function () {
url: queryUrl,
method: queryMethod,
autoSubmit: true,
disableQueryOnLoad: true,
disableQueryOnLoad: false,
schema: {
title: "数据对比",
type: "object",
properties: {
type: Object.assign({ defaultSelected: true }, version),
type: Object.assign({ defaultSelected: false }, version),
name: {
type: "string",
default: null,

5
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/hbpo-edi-se-compare.js

@ -54,14 +54,13 @@ export default function () {
query: {
url: queryUrl,
method: queryMethod,
autoSubmit: true,
disableQueryOnLoad: true,
disableQueryOnLoad: false,
schema: {
title: "数据对比",
type: "object",
properties: {
type: Object.assign({ defaultSelected: true }, version),
type: Object.assign({ defaultSelected: false }, version),
name: {
type: "string",
default: null,

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/adjust.js

@ -4,6 +4,11 @@ const schema = {
title: "库存事务日志",
type: "object",
properties: {
logType: {
title: "库存事务分类",
type: "string",
hidden: true,
},
changedNumber: {
title: "变动单号",
type: "string",
@ -11,7 +16,7 @@ const schema = {
changedTime: {
title: "变动时间",
type: "string",
input: "dateTime",
input: "datetime",
},
changedType,
changedBy: {
@ -91,6 +96,7 @@ export default function () {
title: "通用代码",
type: "object",
properties: {
logTypes: { type: "array", hidden: true, default: ["Type500", "Type600"] },
filters: {
title: "项目",
type: "array",
@ -162,6 +168,13 @@ export default function () {
value: null,
readOnly: true,
},
// {
// logic: "and",
// column: "logType",
// action: "in",
// value: "Type500, Type600",
// readOnly: true,
// },
],
},
skipCount: {

6
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/backup.js

@ -73,7 +73,7 @@ export default function () {
},
{
logic: "and",
column: "lu",
column: "partCode",
action: "like",
value: null,
readOnly: true,
@ -88,14 +88,14 @@ export default function () {
{
logic: "and",
column: "codeType",
action: "like",
action: "equal",
value: null,
readOnly: true,
},
{
logic: "and",
column: "billType",
action: "like",
action: "equal",
value: null,
readOnly: true,
},

6
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/balance.js

@ -59,7 +59,7 @@ export default function () {
},
{
logic: "and",
column: "lu",
column: "partCode",
action: "like",
value: null,
readOnly: true,
@ -74,14 +74,14 @@ export default function () {
{
logic: "and",
column: "codeType",
action: "like",
action: "equal",
value: null,
readOnly: true,
},
{
logic: "and",
column: "billType",
action: "like",
action: "equal",
value: null,
readOnly: true,
},

8
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/inventory.js

@ -33,9 +33,9 @@ const options4 = [
{ value: "In", label: "入库" },
{ value: "Out", label: "出库" },
];
const billType = { title: "发货类型", type: "number", input: "select", options: options1 };
const codeType = { title: "生产码类型", type: "string", input: "select", options: options2 };
const subBillType = { title: "发货子类型", type: "number", input: "select", options: options3 };
const changedType = { title: "变动类型", type: "string", input: "select", options: options4 };
const billType = { title: "发货类型", type: "number", input: "select", options: options1, clearable: true };
const codeType = { title: "生产码类型", type: "string", input: "select", options: options2, clearable: true };
const subBillType = { title: "发货子类型", type: "number", input: "select", options: options3, clearable: true };
const changedType = { title: "变动类型", type: "string", input: "select", options: options4, clearable: true };
export { billType, codeType, subBillType, changedType };

26
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js

@ -14,7 +14,7 @@ const schema = {
changedTime: {
title: "变动时间",
type: "string",
input: "dateTime",
input: "datetime",
},
changedType,
changedBy: {
@ -22,7 +22,7 @@ const schema = {
type: "string",
},
partCode: {
title: "实扣厂内零件号",
title: "LU零件号",
type: "string",
},
partCode2: {
@ -45,10 +45,7 @@ const schema = {
title: "结算生产码",
type: "string",
},
codeType: {
title: "生产码类型",
type: "string",
},
codeType,
billType,
subBillType,
qty: {
@ -126,6 +123,7 @@ export default function () {
title: "通用代码",
type: "object",
properties: {
// logTypes: { type: "array", hidden: true, default: ["Type200", "Type400"] },
filters: {
title: "项目",
type: "array",
@ -157,42 +155,42 @@ export default function () {
},
{
logic: "and",
column: "createdDate",
column: "billTime",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "lu",
action: "like",
column: "billType",
action: "equal",
value: null,
readOnly: true,
},
{
logic: "and",
column: "tmpe4",
column: "vinCode",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "vinCode",
action: "like",
column: "codeType",
action: "equal",
value: null,
readOnly: true,
},
{
logic: "and",
column: "codeType",
column: "partCode",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "proType",
column: "orderNum",
action: "like",
value: null,
readOnly: true,

14
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/vmi.js

@ -10,18 +10,22 @@ export default function () {
// hidden: true,
// showForList: false,
// },
lu: {
title: "LU零件号",
type: "string",
},
// lu: {
// title: "LU零件号",
// type: "string",
// },
partCode: {
title: "客户零件号",
title: "LU零件号",
type: "string",
},
vinCode: {
title: "生产码",
type: "string",
},
customerPartCode: {
title: "客户零件号",
type: "string",
},
codeType,
billType,
qty: {

8
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/invoice/invoice_map_group.js

@ -16,10 +16,10 @@ const schema = {
type: "string",
link: true,
},
settleGroupNum: {
title: "结算分组号",
type: "string",
},
// settleGroupNum: {
// title: "结算分组号",
// type: "string",
// },
amt: {
title: "金额",
type: "decimal",

5
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/input/bbac_sa_service.js

@ -30,10 +30,9 @@ const schema = {
},
};
const baseUrl = "settleaccount/bbac_sa_service";
const queryUrl = "settleaccount/bbac_sa_service/get-list";
const deleteUrl = `${baseUrl}/delete-list`;
const importUrl = `${baseUrl}/import`;
const deleteUrl = "settleaccount/bbac_sa_service/delete-list";
const importUrl = "settleaccount/bbac_sa_service/import";
const queryMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/input/bbac_se_detail_service.js

@ -111,15 +111,11 @@ const schema = {
};
const queryUrl = "settleaccount/bbac_se_detail_service/get-list";
// const deleteUrl = `${baseUrl}/delete-list`;
// const importUrl = `${baseUrl}/import`;
const exportUrl = "settleaccount/bbac_se_detail_service/export";
const invokeUrl = "settleaccount/bbacse-sync/invoke";
const syncUrl = "settleaccount/bbacse-sync/invoke";
const queryMethod = "POST";
// const deleteMethod = "POST";
// const importMethod = "POST";
const exportMethod = "POST";
const invokeMethod = "POST";
const syncMethod = "POST";
export default function () {
return {
@ -180,14 +176,10 @@ export default function () {
schema: schema,
},
edit: {
// deleteUrl,
// importUrl,
exportUrl,
invokeUrl,
// deleteMethod,
// importMethod,
syncUrl,
exportMethod,
invokeMethod,
syncMethod,
schema: schema,
},
};

5
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/input/hbpo_sa_service.js

@ -28,10 +28,9 @@ const schema = {
},
};
const baseUrl = "settleaccount/hbpo_sa_service";
const queryUrl = "settleaccount/hbpo_sa_service/get-list";
const deleteUrl = `${baseUrl}/delete-list`;
const importUrl = `${baseUrl}/import`;
const deleteUrl = "settleaccount/hbpo_sa_service/delete-list";
const importUrl = "settleaccount/hbpo_sa_service/import";
const queryMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/input/hbpo_se_detail_service.js

@ -1,5 +1,3 @@
import version from "../../version.js";
const schema = {
title: "JIS发运数据",
type: "object",
@ -112,13 +110,12 @@ const schema = {
},
};
const baseUrl = "settleaccount/hbpo_se_detail_service";
const queryUrl = `${baseUrl}/get-list`;
const exportUrl = `${baseUrl}/export`;
const invokeUrl = "settleaccount/hbpose-sync/invoke";
const queryUrl = "settleaccount/hbpo_se_detail_service/get-list";
const exportUrl = "settleaccount/hbpo_se_detail_service/export";
const syncUrl = "settleaccount/hbpose-sync/invoke";
const queryMethod = "POST";
const exportMethod = "POST";
const invokeMethod = "POST";
const syncMethod = "POST";
export default function () {
return {
@ -180,9 +177,9 @@ export default function () {
},
edit: {
exportUrl,
invokeUrl,
syncUrl,
exportMethod,
invokeMethod,
syncMethod,
schema: schema,
},
};

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/job-service.js

@ -55,12 +55,12 @@ export default function () {
url: queryUrl,
method: queryMethod,
autoSubmit: true,
disableQueryOnLoad: true,
disableQueryOnLoad: false,
schema: {
title: "数据对比",
type: "object",
properties: {
type: Object.assign({ defaultSelected: true }, version),
type: Object.assign({ defaultSelected: false }, version),
name: {
type: "string",
default: null,

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_ba_detail_service.js

@ -70,7 +70,7 @@ const schema = {
},
};
const queryUrl = "settleaccount/p-uB_BA_SERVICE/detail-query";
const queryUrl = "settleaccount/pub_ba_service/detail-query";
const queryMethod = "POST";
export default function () {

10
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_ba_service.js

@ -70,11 +70,11 @@ const schema = {
},
};
const queryUrl = "settleaccount/p-uB_BA_SERVICE/main-query";
const exportUrl = "settleaccount/p-uB_BA_SERVICE/export";
const invoiceUrl = "settleaccount/p-uB_BA_SERVICE/generate-invoice";
const rejectUrl = "settleaccount/p-uB_BA_SERVICE/reject";
const receivedUrl = "settleaccount/p-uB_BA_SERVICE/received";
const queryUrl = "settleaccount/pub_ba_service/main-query";
const exportUrl = "settleaccount/pub_ba_service/export";
const invoiceUrl = "settleaccount/pub_ba_service/generate-invoice";
const rejectUrl = "settleaccount/pub_ba_service/reject";
const receivedUrl = "settleaccount/pub_ba_service/received";
const queryMethod = "POST";
const exportMethod = "POST";
const invoiceMethod = "POST";

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_sa_detail_service.js

@ -130,9 +130,7 @@ export default function () {
schema: schema,
},
edit: {
deleteUrl,
exportUrl,
deleteMethod,
exportMethod,
schema: schema,
},

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_se_detail_service.js

@ -81,8 +81,10 @@ const schema = {
const queryUrl = "settleaccount/pub_se_detail_service/get-list";
const exportUrl = "settleaccount/pub_se_detail_service/export";
const syncUrl = "settleaccount/hand-se-sync/sync";
const queryMethod = "POST";
const exportMethod = "POST";
const syncMethod = "POST";
export default function () {
return {
@ -148,7 +150,9 @@ export default function () {
},
edit: {
exportUrl,
syncUrl,
exportMethod,
syncMethod,
schema: schema,
},
};

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/version.js

@ -5,5 +5,5 @@ export default {
url: "settleaccount/centralized-control/get-all",
value: "version",
label: "version",
clearable: false,
clearable: true,
};

945
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js

File diff suppressed because it is too large

40
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/home.js

@ -1,43 +1,5 @@
import html from "html";
import AppList from "../../../components/list/index.js";
export default {
components: { AppList },
template: html`</app-list :config="config" @command="onCommand"></app-list>
<el-table :data="tableData" border style="width: 100%">
<el-table-column prop="date" label="custoner/type" width="180" />
<el-table-column prop="name" label="BBAC" width="180" />
<el-table-column prop="address" label="HBPO" width="180" />
</el-table>
`,
setup() {
const tableData = [
{
date: "JIS",
name: "√",
address: "√",
},
{
date: "直供件",
name: "√",
address: "√",
},
{
date: "印度件",
name: "√",
address: "",
},
{
date: "备件",
name: "√",
address: "",
},
{
date: "买单件",
name: "对比√ 开票×",
address: "√",
},
];
return { tableData };
},
template: html`<a href="../assets/导入模版.zip" target="blank">导入模板下载</a>`,
};

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/contrast/bbac_jit_pub_sa_detail_jobservice.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/contrast/bbac_jit_pub_sa_detail_jobservice.js

@ -1,6 +1,6 @@
import AppList from "../../../components/list/index.js";
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/job-service.js";
import useConfig from "../../../../models/job-service.js";
import { ref, onMounted, onUnmounted } from "vue";
export default {

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/input/bbac_jit_pub_sa_detail_service.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/input/bbac_jit_pub_sa_detail_service.js

@ -1,6 +1,6 @@
import AppList from "../../../components/list/index.js";
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_sa_detail_service.js";
import useConfig from "../../../../models/pub_sa_detail_service.js";
export default {
components: { AppList },

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/input/bbac_jit_pub_sa_service.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/input/bbac_jit_pub_sa_service.js

@ -1,6 +1,6 @@
import AppList from "../../../components/list/index.js";
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_sa_service.js";
import useConfig from "../../../../models/pub_sa_service.js";
export default {
components: { AppList },

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/input/bbac_jit_pub_se_detail_service.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/input/bbac_jit_pub_se_detail_service.js

@ -1,6 +1,6 @@
import AppList from "../../../components/list/index.js";
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_se_detail_service.js";
import useConfig from "../../../../models/pub_se_detail_service.js";
export default {
components: { AppList },

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/settlement/jit_pub_can_sa_detail_service.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_ba_detail_service.js

@ -1,6 +1,6 @@
import AppList from "../../../components/list/index.js";
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_can_sa_detail_service.js";
import useConfig from "../../../../models/pub_ba_detail_service.js";
export default {
components: { AppList },

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/settlement/jit_pub_not_sa_service.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_ba_service.js

@ -1,6 +1,6 @@
import AppList from "../../../components/list/index.js";
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_not_sa_service.js";
import useConfig from "../../../../models/pub_ba_service.js";
export default {
components: { AppList },

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_can_sa_detail_service.js

@ -0,0 +1,15 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_can_sa_detail_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_can_sa_service.js

@ -0,0 +1,15 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_can_sa_detail_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/settlement/jit_pub_pd_detail_service.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_not_sa_service.js

@ -1,6 +1,6 @@
import AppList from "../../../components/list/index.js";
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_pd_detail_service.js";
import useConfig from "../../../../models/pub_not_sa_service.js";
export default {
components: { AppList },

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_pd_detail_service.js

@ -0,0 +1,15 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_pd_detail_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/settlement/jit_pub_ba_detail_service.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_pd_service.js

@ -1,6 +1,6 @@
import AppList from "../../../components/list/index.js";
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_ba_detail_service";
import useConfig from "../../../../models/pub_pd_service.js";
export default {
components: { AppList },

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/contrast/hbpo_jit_pub_sa_detail_jobservice.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/contrast/hbpo_jit_pub_sa_detail_jobservice.js

@ -1,6 +1,6 @@
import AppList from "../../../components/list/index.js";
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/job-service.js";
import useConfig from "../../../../models/job-service.js";
import { ref, onMounted, onUnmounted } from "vue";
export default {

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/input/hbpo_jit_pub_sa_detail_service.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/input/hbpo_jit_pub_sa_detail_service.js

@ -1,6 +1,6 @@
import AppList from "../../../components/list/index.js";
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_sa_detail_service.js";
import useConfig from "../../../../models/pub_sa_detail_service.js";
export default {
components: { AppList },

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/input/hbpo_jit_pub_sa_service.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/input/hbpo_jit_pub_sa_service.js

@ -1,6 +1,6 @@
import AppList from "../../../components/list/index.js";
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_sa_service.js";
import useConfig from "../../../../models/pub_sa_service.js";
export default {
components: { AppList },

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/input/hbpo_jit_pub_se_detail_service.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/input/hbpo_jit_pub_se_detail_service.js

@ -1,6 +1,6 @@
import AppList from "../../../components/list/index.js";
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_se_detail_service.js";
import useConfig from "../../../../models/pub_se_detail_service.js";
export default {
components: { AppList },

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_ba_detail_service.js

@ -0,0 +1,15 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_ba_detail_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_ba_service.js

@ -0,0 +1,15 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_ba_detail_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_can_sa_detail_service.js

@ -0,0 +1,15 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_can_sa_detail_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_can_sa_service.js

@ -0,0 +1,15 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_can_sa_detail_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/settlement/md_pub_pd_detail_service.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_not_sa_service.js

@ -1,6 +1,6 @@
import AppList from "../../../components/list/index.js";
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_pd_detail_service.js";
import useConfig from "../../../../models/pub_not_sa_service.js";
export default {
components: { AppList },

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_pd_detail_service.js

@ -0,0 +1,15 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_pd_detail_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/settlement/jit_pub_ba_service.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_pd_service.js

@ -1,6 +1,6 @@
import AppList from "../../../components/list/index.js";
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_ba_service.js";
import useConfig from "../../../../models/pub_pd_service.js";
export default {
components: { AppList },

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/settlement/jit_pub_pd_service.js

@ -1,15 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_pd_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

24
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-bbac/contrast/bbac_md_pub_sa_detail_jobservice.js

@ -0,0 +1,24 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/job-service.js";
import { ref, onMounted, onUnmounted } from "vue";
export default {
components: { AppList },
template: html`<app-list ref="appListRef" :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
config.query.schema.title = "发运与结算";
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default = "MaiDanJianBBAC";
config.query.schema.properties.name.default = "买单件BBAC结算与发运数据对比";
const appListRef = ref(null);
onMounted(() =>
PubSub.subscribe(config.query.schema.properties.name.default, async () => await appListRef.value.load())
);
onUnmounted(() => PubSub.unsubscribe(config.query.schema.properties.businessType.default));
return { config, onCommand, appListRef };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-bbac/input/bbac_md_pub_sa_detail_service.js

@ -0,0 +1,16 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_sa_detail_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default = "MaiDanJianBBAC";
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-bbac/input/bbac_md_pub_sa_service.js

@ -0,0 +1,16 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_sa_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default = "MaiDanJianBBAC";
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-bbac/input/bbac_md_pub_se_detail_service.js

@ -0,0 +1,16 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_se_detail_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default = "MaiDanJianBBAC";
return { config, onCommand };
},
};

6
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/contrast/md_pub_sa_detail_jobservice.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/contrast/hbpo_md_pub_sa_detail_jobservice.js

@ -1,6 +1,6 @@
import AppList from "../../../components/list/index.js";
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/job-service.js";
import useConfig from "../../../../models/job-service.js";
import { ref, onMounted, onUnmounted } from "vue";
export default {
@ -13,7 +13,7 @@ export default {
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default = "MaiDanJianHBPO";
// config.query.schema.properties.name.default = "直供件BBAC结算与发运数据对比";
config.query.schema.properties.name.default = "买单件HBPO结算与发运数据对比";
const appListRef = ref(null);
onMounted(() =>
PubSub.subscribe(config.query.schema.properties.name.default, async () => await appListRef.value.load())

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/input/md_pub_sa_detail_service.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/input/hbpo_md_pub_sa_detail_service.js

@ -1,6 +1,6 @@
import AppList from "../../../components/list/index.js";
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_sa_detail_service.js";
import useConfig from "../../../../models/pub_sa_detail_service.js";
export default {
components: { AppList },

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/input/md_pub_sa_service.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/input/hbpo_md_pub_sa_service.js

@ -1,6 +1,6 @@
import AppList from "../../../components/list/index.js";
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_sa_service.js";
import useConfig from "../../../../models/pub_sa_service.js";
export default {
components: { AppList },

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/input/md_pub_se_detail_service.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/input/hbpo_md_pub_se_detail_service.js

@ -1,6 +1,6 @@
import AppList from "../../../components/list/index.js";
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_se_detail_service.js";
import useConfig from "../../../../models/pub_se_detail_service.js";
export default {
components: { AppList },

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_ba_detail_service.js

@ -0,0 +1,15 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_ba_detail_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/settlement/jit_pub_can_sa_service.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_ba_service.js

@ -1,6 +1,6 @@
import AppList from "../../../components/list/index.js";
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_can_sa_service.js";
import useConfig from "../../../../models/pub_ba_service.js";
export default {
components: { AppList },

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_can_sa_detail_service.js

@ -0,0 +1,15 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_can_sa_detail_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_can_sa_service.js

@ -0,0 +1,15 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_can_sa_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_not_sa_service.js

@ -0,0 +1,15 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_not_sa_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_pd_detail_service.js

@ -0,0 +1,15 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_pd_detail_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_pd_service.js

@ -0,0 +1,15 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_pd_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/settlement/md_pub_ba_detail_service.js

@ -1,15 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_ba_detail_service";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/settlement/md_pub_ba_service.js

@ -1,15 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_ba_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/settlement/md_pub_can_sa_detail_service.js

@ -1,15 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_can_sa_detail_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/settlement/md_pub_can_sa_service.js

@ -1,15 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_can_sa_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/settlement/md_pub_not_sa_service.js

@ -1,15 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_not_sa_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/settlement/md_pub_pd_service.js

@ -1,15 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_pd_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

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

@ -220,7 +220,7 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase<PUB_SA>
/// 删除
/// </summary>
[HttpPost]
public async Task DeleteListAsync(List<Guid> ids)
public async Task<IActionResult> DeleteListAsync(List<Guid> ids)
{
//结算主表
List<PUB_SA> pubSas = new List<PUB_SA>();
@ -272,6 +272,8 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase<PUB_SA>
{
await _pubNotSaDetailRepository.DeleteManyAsync(pubNotSaDetails);
}
return new JsonResult(new { Code = 200, Message = "成功" });
}
#endregion

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

@ -106,7 +106,9 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
await _syncPositionFlagRepository.InsertAsync(syncPositionFlag);
}
pubSeDetails.ForEach(pubSeDetail =>
foreach (var pubSeDetail in pubSeDetails)
{
if (pubSeDetail.TransType == EnumDelTransType.)
{
var vmiBalance = new VmiBalance()
{
@ -130,8 +132,35 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
RealCode = default,
ReMark = pubSeDetail.Remark,
};
_vmiService.In(logType: Vmi.VmiLogType.Type100, changedNumber: pubSeDetail.DnBillNum, data: vmiBalance);
});
await _vmiService.In(logType: Vmi.VmiLogType.Type100, changedNumber: pubSeDetail.DnBillNum, data: vmiBalance);
}
else if (pubSeDetail.TransType == EnumDelTransType.退)
{
var vmiLog = new VmiLog()
{
PartCode = pubSeDetail.PartCode,
VinCode = pubSeDetail.PN,
CustomerPartCode = default,
CodeType = default,
BillType = pubSeDetail.DeliverBillType,
Qty = pubSeDetail.Qty,
BillTime = pubSeDetail.BillTime,
DeliverTime = pubSeDetail.DnBillTime,
ErpToLoc = pubSeDetail.ToErpLocCode,
Seq = default,
OrderNum = pubSeDetail.DnBillNum,
UniqueCode = default,
MatchNumber = default,
PjsNum = default,
Configcode = default,
factory = default,
SubBillType = pubSeDetail.DeliverSubBillType,
RealCode = default,
ReMark = pubSeDetail.Remark,
};
await _vmiService.Out(VmiLogType.Type400, pubSeDetail.DnBillNum, vmiLog);
}
}
}
}
}

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

@ -6,6 +6,7 @@ using System.IO;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using ClosedXML.Excel;
using LinqToDB.Data;
@ -23,7 +24,7 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.OpenApi.Extensions;
using Omu.ValueInjecter;
using SettleAccount.Domain.BQ;
using Polly;
using SettleAccount.Job.SignalR;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
@ -55,6 +56,7 @@ public interface IVmiService : IApplicationService, ITransientDependency, IJobSe
[Route("api/settleaccount/[controller]/[action]")]
public class VmiAppService : ApplicationService, IVmiService, IJobService, ITransientDependency
{
public static SemaphoreSlim backupLock = new SemaphoreSlim(1);
private readonly IConfiguration _cfg;
private readonly IServiceProvider _serviceProvider;
private readonly INormalEfCoreRepository<VmiBalance, Guid> _balanceRepository;
@ -130,7 +132,10 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
/// </summary>
[NonAction]
[DisableValidation]
public virtual Task Invoke(IServiceProvider serviceProvider)
public virtual async Task Invoke(IServiceProvider serviceProvider)
{
await backupLock.WaitAsync().ConfigureAwait(false);
try
{
//this._hubContext.Clients.All.ServerToClient("JobItem", "refresh", "");
Directory.CreateDirectory(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot/files/vmi"));
@ -145,24 +150,26 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
dc.BeginTransaction();
try
{
var now = DateTime.Now;
var table = "VmiBalance";
foreach (var item in query)
{
item.BackupTime = DateTime.Now;
item.BackupTime = now;
list.Add(item);
if (list.Count == 10000)
{
//dbContext.Set<VmiBalance>().AddRange(list);
dc.BulkCopy(new BulkCopyOptions { TableName = "VmiBalance" }, list);
await dc.BulkCopyAsync(new BulkCopyOptions { TableName = table }, list).ConfigureAwait(false);
list.Clear();
}
}
if (list.Count > 0)
{
dc.BulkCopy(new BulkCopyOptions { TableName = "VmiBalance" }, list);
await dc.BulkCopyAsync(new BulkCopyOptions { TableName = table }, list).ConfigureAwait(false);
}
dc.Transaction.Commit();
var snapshot = new VmiSnapshot { Name = date, Path = connectionString };
this._snapshotRepository.InsertAsync(snapshot).Wait();
await _snapshotRepository.InsertAsync(snapshot).ConfigureAwait(false);
}
catch
{
@ -170,8 +177,15 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
throw;
}
}
//this._hubContext.Clients.All.ServerToClient("JobItem", "refresh", "");
return Task.CompletedTask;
}
catch
{
throw;
}
finally
{
backupLock.Release();
}
}
/// <summary>
@ -191,18 +205,30 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
/// <summary>
/// 发运入库\反结入库\调整入库
/// </summary>
/// <param name="logType"></param>
/// <param name="changedNumber"></param>
/// <param name="data"></param>
/// <param name="logType">库存事务类型</param>
/// <param name="changedNumber">关联单号</param>
/// <param name="data">入库数据</param>
/// <returns></returns>
[HttpPost]
public async Task In(VmiLogType logType, string changedNumber, VmiBalance data)
{
var balance = this._balanceRepository.FirstOrDefault(o => o.BillType == data.BillType &&
await Policy.Handle<Exception>().WaitAndRetryAsync(5, o => TimeSpan.FromSeconds(o), (e, i) =>
{
Console.WriteLine($"入库类型:{logType.GetDisplayName()},重试次数:{i},异常信息:{e.Message}");
}).ExecuteAsync(async () =>
{
using var scope = _serviceProvider.CreateScope();
var db = scope.ServiceProvider.GetRequiredService<SettleAccountDbContext>();
var balance = db.Set<VmiBalance>().FirstOrDefault(
o => o.BillType == data.BillType &&
o.CodeType == data.CodeType &&
o.PartCode == data.PartCode &&
o.VinCode == data.VinCode &&
o.ErpToLoc == data.ErpToLoc &&
o.OrderNum == data.OrderNum);
o.OrderNum == data.OrderNum &&
o.factory == data.factory &&
o.Configcode == data.Configcode);
var log = new VmiLog
{
@ -213,36 +239,48 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
ChangedBy = _currentUser.UserName,
ChangedQty = data.Qty,
};
log.InjectFrom(data);
if (balance == null)
{
balance = new VmiBalance();
balance = new VmiBalance(GuidGenerator.Create());
balance.InjectFrom(data);
// 初始化库存
balance.Qty = data.Qty;
balance.SetId();
await _balanceRepository.InsertAsync(balance).ConfigureAwait(false);
await db.Set<VmiBalance>().AddAsync(balance).ConfigureAwait(false);
//新建库存,库存事务种库存备份的初始库存为0
log.InjectFrom(balance);
log.Qty = 0;
}
else
{
//已有库存,直接备份
log.InjectFrom(balance);
var qty = balance.Qty + data.Qty;
if (logType == VmiLogType.Type100)
{
//发运入库,只更新库存
}
else if (logType == VmiLogType.Type300)
{
//反结入库,只更新库存
}
else if (logType == VmiLogType.Type500)
{
//调整入库,更新库存和其他字段
balance.InjectFrom(data);
}
// 加库存
balance.Qty = qty;
if (balance.Qty == decimal.Zero)
{
await this._balanceRepository.DeleteAsync(balance).ConfigureAwait(false);
}
else
{
await this._balanceRepository.UpdateAsync(balance).ConfigureAwait(false);
db.Set<VmiBalance>().Remove(balance);
}
if (logType == VmiLogType.Type100 && balance.Qty < decimal.Zero && data.Qty > 0)
{
log.IsReplenished = true;
}
}
await _logRepository.InsertAsync(log).ConfigureAwait(false);
await db.Set<VmiLog>().AddAsync(log).ConfigureAwait(false);
await db.SaveChangesAsync().ConfigureAwait(false);
}).ConfigureAwait(false);
}
/// <summary>
@ -255,48 +293,72 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
[HttpPost]
public async Task Out(VmiLogType logType, string changedNumber, VmiLog data)
{
var balance = this._balanceRepository.FirstOrDefault(o => o.BillType == data.BillType &&
await Policy.Handle<Exception>().WaitAndRetryAsync(5, o => TimeSpan.FromSeconds(o), (e, i) =>
{
Console.WriteLine($"出库类型:{logType.GetDisplayName()},重试次数:{i},异常信息:{e.Message}");
}).ExecuteAsync(async () =>
{
using var scope = _serviceProvider.CreateScope();
var db = scope.ServiceProvider.GetRequiredService<SettleAccountDbContext>();
var balance = db.Set<VmiBalance>().FirstOrDefault(
o => o.BillType == data.BillType &&
o.CodeType == data.CodeType &&
o.PartCode == data.PartCode &&
o.VinCode == data.VinCode &&
o.ErpToLoc == data.ErpToLoc &&
o.OrderNum == data.OrderNum);
o.OrderNum == data.OrderNum &&
o.factory == data.factory &&
o.Configcode == data.Configcode);
var log = new VmiLog
{
LogType = logType,
ChangedType = VmiType.Out,
ChangedType = VmiType.In,
ChangedNumber = changedNumber,
ChangedTime = DateTime.Now,
ChangedBy = _currentUser.UserName,
ChangedQty = data.Qty,
};
log.InjectFrom(data);
log.LogType = logType;
log.ChangedType = VmiType.Out;
log.ChangedTime = DateTime.Now;
log.ChangedBy = _currentUser.UserName;
log.ChangedQty = data.Qty;
if (balance == null)
{
balance = new VmiBalance();
//负库存出库
balance = new VmiBalance(GuidGenerator.Create());
balance.InjectFrom(data);
//新建库存,库存事务种库存备份的初始库存为0
log.InjectFrom(data);
log.Qty = 0;
// 负库存
balance.Qty = -data.Qty;
balance.SetId();
await _balanceRepository.InsertAsync(balance).ConfigureAwait(false);
await db.Set<VmiBalance>().AddAsync(balance).ConfigureAwait(false);
}
else
{
//已有库存,直接备份
log.InjectFrom(data);//更新附加字段
log.InjectFrom(balance);//备份库存
// 减库存
balance.Qty -= data.Qty; ;
if (balance.Qty == decimal.Zero)
if (logType == VmiLogType.Type200)
{
await this._balanceRepository.DeleteAsync(balance).ConfigureAwait(false);
//结算出库,只更新库存
}
else
else if (logType == VmiLogType.Type400)
{
await this._balanceRepository.UpdateAsync(balance).ConfigureAwait(false);
//退货出库,只更新库存
}
else if (logType == VmiLogType.Type600)
{
//调整出库,更新库存和其他字段
balance.InjectFrom(data);
}
if (balance.Qty == decimal.Zero)
{
db.Set<VmiBalance>().Remove(balance);
}
await _logRepository.InsertAsync(log).ConfigureAwait(false);
}
await db.Set<VmiLog>().AddAsync(log).ConfigureAwait(false);
await db.SaveChangesAsync().ConfigureAwait(false);
}).ConfigureAwait(false);
}
/// <summary>
@ -316,7 +378,7 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
o.OrderNum == item.OrderNum);
if (balance == null)
{
balance = new VmiBalance();
balance = new VmiBalance(GuidGenerator.Create());
balance.InjectFrom(item);
await _balanceRepository.InsertAsync(balance).ConfigureAwait(false);
}
@ -357,7 +419,7 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
var entities = await _balanceRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda<VmiBalance>())
.ToListAsync().ConfigureAwait(false);
var fileName = $"库存余额_{DateTime.Now.ToString("yyyy-MM-dd_HH:mm:ss")}.xlsx";
var content = this.GetContent<VmiBalance>(entities, "库存备份");
var content = this.GetContent(entities, "库存备份");
await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false);
return fileName;
}
@ -374,10 +436,13 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
public async Task<PagedResultDto<VmiLog>> Log(RequestDto input)
public async Task<PagedResultDto<VmiLog>> Log(LogRequestDto input)
{
var entities = await _logRepository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true).ConfigureAwait(false);
var totalCount = await _logRepository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false);
var query = _logRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda<VmiLog>())
.WhereIf(input.LogTypes?.Count != 0, o => input.LogTypes.Contains(o.LogType));
var totalCount = await query.CountAsync().ConfigureAwait(false);
query = string.IsNullOrEmpty(input.Sorting) ? query : DynamicQueryableExtensions.OrderBy(query, input.Sorting);
var entities = query.Skip(input.SkipCount).Take(input.MaxResultCount).ToList();
return new PagedResultDto<VmiLog>(totalCount, entities);
//return QueryLogFromTSDb(input);
}
@ -577,3 +642,8 @@ public class BackupListRequest : RequestDto
[Required]
public string Name { get; set; }
}
public class LogRequestDto : RequestDto
{
public List<VmiLogType> LogTypes { get; set; } = new List<VmiLogType>();
}

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

@ -126,6 +126,7 @@
<PackageReference Include="InfluxDB.LineProtocol" Version="1.1.1" />
<PackageReference Include="linq2db.EntityFrameworkCore" Version="5.17.0" />
<PackageReference Include="NPOI" Version="2.5.4" />
<PackageReference Include="Polly" Version="7.2.4" />
<PackageReference Include="Riven.CodeArts.Db.Influx17x" Version="0.1.0" />
<PackageReference Include="Shouldly" Version="4.0.3" />
<PackageReference Include="SqlSugarCore" Version="5.1.4.94" />

6
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SE_DETAIL.cs

@ -193,6 +193,12 @@ public class HBPO_SE_DETAIL :SE_BASE
[Display(Name = "客户位置")]
public string Position { get; set; }
/// <summary>
/// 是否有EDI数据
/// </summary>
[Display(Name = "是否有EDI数据")]
public bool IsHaveEdiData { get; set; }
public HBPO_SE_DETAIL(Guid guid, string keyCode, int version, string lU, string pN, string seqNumber, string assemblyCode, string injectionCode, decimal qty, DateTime beginDate, DateTime shippingDate, string wmsBillNum)
{
this.Id = guid;

8
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SE_EDI.cs

@ -1,4 +1,4 @@
using System;
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Domain.Entities.Auditing;
@ -47,6 +47,12 @@ public class HBPO_SE_EDI :FullAuditedAggregateRoot<Guid>
public string Extend3 { set; get; }
public string Extend4 { set; get; }
/// <summary>
/// 是否有发运数据
/// </summary>
[Display(Name = "是否有发运数据")]
public bool IsHaveSeData { get; set; }
public HBPO_SE_EDI(Guid guid ,string keyCode, int version, string lU, string pN, string seqNumber, string assemblyCode, string injectionCode, decimal qty, DateTime beginDate, string site, string extend1, string extend2, string extend3, string extend4)
{
Id = guid;

2
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_SA.cs

@ -6,7 +6,7 @@ using Win.Sfs.SettleAccount;
namespace SettleAccount.Domain.BQ;
[Display(Name = "公用结算导入主表")]
public class PUB_SA : FullAuditedAggregateRoot<Guid>
public class PUB_SA : AuditedAggregateRoot<Guid>
{
[Display(Name = "期间")]
public int Version { get; set; }

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

@ -1,8 +1,5 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
using Volo.Abp.Domain.Entities;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
@ -18,12 +15,20 @@ public class VmiBalance : BasicAggregateRoot<Guid>, IHasConcurrencyStamp
ConcurrencyStamp = Guid.NewGuid().ToString("N");
}
public VmiBalance(Guid id) : base(id)
{
ConcurrencyStamp = Guid.NewGuid().ToString("N");
}
/// <summary>
/// LU零件号
/// </summary>
[Display(Name = "LU零件号")]
public string PartCode { get; set; }
/// <summary>
/// 生产码
/// </summary>
[Display(Name = "生产码")]
public string VinCode { get; set; }
@ -33,9 +38,15 @@ public class VmiBalance : BasicAggregateRoot<Guid>, IHasConcurrencyStamp
[Display(Name = "客户零件号")]
public string CustomerPartCode { get; set; }
/// <summary>
/// 生产码类型
/// </summary>
[Display(Name = "生产码类型")]
public string CodeType { get; set; }
/// <summary>
/// 发货类型
/// </summary>
[Display(Name = "发货类型")]
public EnumDeliverBjBmpBillType BillType { get; set; }
@ -86,13 +97,4 @@ public class VmiBalance : BasicAggregateRoot<Guid>, IHasConcurrencyStamp
public string ConcurrencyStamp { get; set; }
public DateTime? BackupTime { get; set; }
public VmiBalance SetId()
{
var data = new { BillType, PartCode, VinCode, ErpToLoc, OrderNum };
var json = JsonSerializer.Serialize(data);
var bytes = MD5.Create().ComputeHash(Encoding.UTF8.GetBytes(json));
this.Id = new Guid(bytes);
return this;
}
}

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

@ -47,10 +47,10 @@ public class VmiLog : BasicAggregateRoot<Guid>
[Display(Name = "变动时间")]
public DateTime ChangedTime { get; set; } = DateTime.Now;
/// <summary>
/// 变动类型
/// </summary>
[Display(Name = "变动类型")]
public VmiType ChangedType { get; set; }
/// <summary>

666
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/PubSaSeCompareDiff.cs

@ -144,6 +144,185 @@ public class PubSaSeCompareDetailExport
[ValueMapping("无结算有发运", 3)]
public EnumPubSaSeCompareCategory Category { get; set; }
///// <summary>
///// Wms发货单号
///// </summary>
//[Display(Name = "Wms发货单号")]
//[ExporterHeader(DisplayName = "交货单号")]
//public string WmsBillNum { get; set; }
///// <summary>
///// 发货日期
///// </summary>
//[Display(Name = "发货日期")]
//[ExporterHeader(DisplayName = "发货日期", Format = "yyyy-MM-dd")]
//public DateTime ShippingDate { get; set; }
///// <summary>
///// 生产码
///// </summary>
//[Display(Name = "生产码")]
//[ExporterHeader(DisplayName = "ASN发货单号")]
//public string PN { get; set; }
///// <summary>
///// 物料号
///// </summary>
//[Display(Name = "物料号")]
//[ExporterHeader(DisplayName = "厂内物料号")]
//public string MaterialNumber { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[Display(Name = "物料描述")]
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDes { get; set; }
///// <summary>
///// 原始LU
///// </summary>
//[Display(Name = "原始LU")]
//[ExporterHeader(DisplayName = "原始LU")]
//public string PrimitiveLU { get; set; }
/// <summary>
///替换LU
/// </summary>
[Display(Name = "替换LU")]
[ExporterHeader(DisplayName = "替换LU")]
public string ReplaceLU { get; set; }
///// <summary>
///// 结算数据中的过账日期
///// </summary>
//[Display(Name = "客户下线时间")]
//[ExporterHeader(DisplayName = "客户下线时间")]
//public DateTime CustomerOfflineTime { get; set; }
/// <summary>
/// 结算数量
/// </summary>
[Display(Name = "结算数量")]
[ExporterHeader(DisplayName = "结算数量")]
public decimal SAQty { get; set; }
/// <summary>
/// 发货数量
/// </summary>
[Display(Name = "发货数量")]
[ExporterHeader(DisplayName = "WMS发货数量")]
public decimal SEQty { get; set; }
///// <summary>
///// 差异数量
///// </summary>
//[ExporterHeader(DisplayName = "差异数量")]
//public decimal DiffQty { set; get; }
///// <summary>
///// 匹配类型
///// </summary>
//[Display(Name = "匹配类型")]
//[ExporterHeader(DisplayName = "是否完全匹配")]
//public string MateType { get; set; }
///// <summary>
///// 定价
///// </summary>
//[Display(Name = "定价")]
//[ExporterHeader(DisplayName = "定价")]
//public decimal FixPrice { get; set; }
///// <summary>
///// 日顺序号
///// </summary>
//[Display(Name = "日顺序号")]
//[ExporterHeader(DisplayName = "日顺序号")]
//public string SeqNumber { get; set; }
///// <summary>
///// PJIS日顺序号
///// </summary>
//[Display(Name = "PJIS日顺序号")]
//[ExporterHeader(DisplayName = "PJIS日顺序号")]
//public string PJISSeqNumber { get; set; }
///// <summary>
///// WMS目标库位
///// </summary>
//[Display(Name = "WMS目标库位")]
//[ExporterHeader(DisplayName = "WMS目标库位")]
//public string ToLocCode { get; set; }
///// <summary>
///// ERP目标库位
///// </summary>
//[Display(Name = "ERP目标库位")]
//[ExporterHeader(DisplayName = "ERP目标库位")]
//public string ToErpLocCode { get; set; }
}
/// <summary>
/// PUB结算与发运对比汇总
/// </summary>
[ExcelExporter(MaxRowNumberOnASheet = 900000)]
public class PubSaSeCompareSumExport
{
/// <summary>
/// LU
/// </summary>
[Display(Name = "LU")]
[ExporterHeader(DisplayName = "LU")]
public string LU { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[Display(Name = "物料描述")]
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDes { get; set; }
/// <summary>
/// 结算数量
/// </summary>
[Display(Name = "结算数量")]
[ExporterHeader(DisplayName = "结算数量")]
public decimal SAQty { get; set; }
/// <summary>
/// 发货数量
/// </summary>
[Display(Name = "发货数量")]
[ExporterHeader(DisplayName = "WMS发货数量")]
public decimal SEQty { get; set; }
/// <summary>
/// 差异数量
/// </summary>
[ExporterHeader(DisplayName = "差异数量")]
public decimal DiffQty => SAQty - SEQty;
}
/// <summary>
/// 直供件BBAC结算与发运对比明细
/// </summary>
[ExcelExporter(MaxRowNumberOnASheet = 900000)]
public class PubSaSeCompareDetailExportZhiGongJianBBAC : PubSaSeCompareDetailExport
{
/// <summary>
/// 类别
/// 有结算有发运
/// 有结算无发运
/// 无结算有发运
/// </summary>
[Display(Name = "类别")]
[ExporterHeader(DisplayName = "类别")]
[ValueMapping("有结算有发运", 1)]
[ValueMapping("有结算无发运", 2)]
[ValueMapping("无结算有发运", 3)]
public EnumPubSaSeCompareCategory Category { get; set; }
/// <summary>
/// Wms发货单号
/// </summary>
@ -152,7 +331,7 @@ public class PubSaSeCompareDetailExport
public string WmsBillNum { get; set; }
/// <summary>
///
/// 发货日期
/// </summary>
[Display(Name = "发货日期")]
[ExporterHeader(DisplayName = "发货日期", Format = "yyyy-MM-dd")]
@ -235,32 +414,66 @@ public class PubSaSeCompareDetailExport
public decimal FixPrice { get; set; }
/// <summary>
/// 日顺序号
/// WMS目标库位
/// </summary>
[Display(Name = "日顺序号")]
[ExporterHeader(DisplayName = "日顺序号")]
public string SeqNumber { get; set; }
[Display(Name = "WMS目标库位")]
[ExporterHeader(DisplayName = "WMS目标库位")]
public string ToLocCode { get; set; }
/// <summary>
/// PJIS日顺序号
/// ERP目标库位
/// </summary>
[Display(Name = "PJIS日顺序号")]
[ExporterHeader(DisplayName = "PJIS日顺序号")]
public string PJISSeqNumber { get; set; }
[Display(Name = "ERP目标库位")]
[ExporterHeader(DisplayName = "ERP目标库位")]
public string ToErpLocCode { get; set; }
}
/// <summary>
/// PUB结算与发运对比汇总
/// 直供件HBPO结算与发运对比明细
/// </summary>
[ExcelExporter(MaxRowNumberOnASheet = 900000)]
public class PubSaSeCompareSumExport
public class PubSaSeCompareDetailExportZhiGongJianHBPO : PubSaSeCompareDetailExport
{
/// <summary>
/// LU
/// 类别
/// 有结算有发运
/// 有结算无发运
/// 无结算有发运
/// </summary>
[Display(Name = "LU")]
[ExporterHeader(DisplayName = "LU")]
public string LU { get; set; }
[Display(Name = "类别")]
[ExporterHeader(DisplayName = "类别")]
[ValueMapping("有结算有发运", 1)]
[ValueMapping("有结算无发运", 2)]
[ValueMapping("无结算有发运", 3)]
public EnumPubSaSeCompareCategory Category { get; set; }
/// <summary>
/// Wms发货单号
/// </summary>
[Display(Name = "Wms发货单号")]
[ExporterHeader(DisplayName = "交货单号")]
public string WmsBillNum { get; set; }
/// <summary>
/// 发货日期
/// </summary>
[Display(Name = "发货日期")]
[ExporterHeader(DisplayName = "发货日期", Format = "yyyy-MM-dd")]
public DateTime ShippingDate { get; set; }
/// <summary>
/// 生产码
/// </summary>
[Display(Name = "生产码")]
[ExporterHeader(DisplayName = "ASN发货单号")]
public string PN { get; set; }
/// <summary>
/// 物料号
/// </summary>
[Display(Name = "物料号")]
[ExporterHeader(DisplayName = "厂内物料号")]
public string MaterialNumber { get; set; }
/// <summary>
/// 物料描述
@ -269,6 +482,27 @@ public class PubSaSeCompareSumExport
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDes { get; set; }
/// <summary>
/// 原始LU
/// </summary>
[Display(Name = "原始LU")]
[ExporterHeader(DisplayName = "原始LU")]
public string PrimitiveLU { get; set; }
/// <summary>
///替换LU
/// </summary>
[Display(Name = "替换LU")]
[ExporterHeader(DisplayName = "替换LU")]
public string ReplaceLU { get; set; }
/// <summary>
/// 结算数据中的过账日期
/// </summary>
[Display(Name = "客户下线时间")]
[ExporterHeader(DisplayName = "客户下线时间")]
public DateTime CustomerOfflineTime { get; set; }
/// <summary>
/// 结算数量
/// </summary>
@ -287,23 +521,35 @@ public class PubSaSeCompareSumExport
/// 差异数量
/// </summary>
[ExporterHeader(DisplayName = "差异数量")]
public decimal DiffQty => SAQty - SEQty;
}
public decimal DiffQty { set; get; }
/// <summary>
/// 直供件BBAC结算与发运对比明细
/// 匹配类型
/// </summary>
[ExcelExporter(MaxRowNumberOnASheet = 900000)]
public class PubSaSeCompareDetailExportZhiGongJianBBAC : PubSaSeCompareDetailExport
{
}
[Display(Name = "匹配类型")]
[ExporterHeader(DisplayName = "是否完全匹配")]
public string MateType { get; set; }
/// <summary>
/// 直供件HBPO结算与发运对比明细
/// 定价
/// </summary>
[ExcelExporter(MaxRowNumberOnASheet = 900000)]
public class PubSaSeCompareDetailExportZhiGongJianHBPO : PubSaSeCompareDetailExport
{
[Display(Name = "定价")]
[ExporterHeader(DisplayName = "定价")]
public decimal FixPrice { get; set; }
/// <summary>
/// WMS目标库位
/// </summary>
[Display(Name = "WMS目标库位")]
[ExporterHeader(DisplayName = "WMS目标库位")]
public string ToLocCode { get; set; }
/// <summary>
/// ERP目标库位
/// </summary>
[Display(Name = "ERP目标库位")]
[ExporterHeader(DisplayName = "ERP目标库位")]
public string ToErpLocCode { get; set; }
}
/// <summary>
@ -312,20 +558,368 @@ public class PubSaSeCompareDetailExportZhiGongJianHBPO : PubSaSeCompareDetailExp
[ExcelExporter(MaxRowNumberOnASheet = 900000)]
public class PubSaSeCompareDetailExportMaiDanJianHBPO : PubSaSeCompareDetailExport
{
}
/// <summary>
/// 类别
/// 有结算有发运
/// 有结算无发运
/// 无结算有发运
/// </summary>
[Display(Name = "类别")]
[ExporterHeader(DisplayName = "类别")]
[ValueMapping("有结算有发运", 1)]
[ValueMapping("有结算无发运", 2)]
[ValueMapping("无结算有发运", 3)]
public EnumPubSaSeCompareCategory Category { get; set; }
/// <summary>
/// 备件结算与发运对比明细
/// Wms发货单号
/// </summary>
[ExcelExporter(MaxRowNumberOnASheet = 900000)]
public class PubSaSeCompareDetailExportBeiJian : PubSaSeCompareDetailExport
{
}
[Display(Name = "Wms发货单号")]
[ExporterHeader(DisplayName = "交货单号")]
public string WmsBillNum { get; set; }
/// <summary>
/// 印度件结算与发运对比明细
/// 发货日期
/// </summary>
[ExcelExporter(MaxRowNumberOnASheet = 900000)]
public class PubSaSeCompareDetailExportYinDuJian : PubSaSeCompareDetailExport
{
[Display(Name = "发货日期")]
[ExporterHeader(DisplayName = "发货日期", Format = "yyyy-MM-dd")]
public DateTime ShippingDate { get; set; }
/// <summary>
/// 生产码
/// </summary>
[Display(Name = "生产码")]
[ExporterHeader(DisplayName = "索引号")]
public string PN { get; set; }
/// <summary>
/// 物料号
/// </summary>
[Display(Name = "物料号")]
[ExporterHeader(DisplayName = "厂内物料号")]
public string MaterialNumber { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[Display(Name = "物料描述")]
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDes { get; set; }
/// <summary>
/// 原始LU
/// </summary>
[Display(Name = "原始LU")]
[ExporterHeader(DisplayName = "原始LU")]
public string PrimitiveLU { get; set; }
/// <summary>
///替换LU
/// </summary>
[Display(Name = "替换LU")]
[ExporterHeader(DisplayName = "替换LU")]
public string ReplaceLU { get; set; }
/// <summary>
/// 结算数据中的过账日期
/// </summary>
[Display(Name = "客户下线时间")]
[ExporterHeader(DisplayName = "客户下线时间")]
public DateTime CustomerOfflineTime { get; set; }
/// <summary>
/// 结算数量
/// </summary>
[Display(Name = "结算数量")]
[ExporterHeader(DisplayName = "结算数量")]
public decimal SAQty { get; set; }
/// <summary>
/// 发货数量
/// </summary>
[Display(Name = "发货数量")]
[ExporterHeader(DisplayName = "WMS发货数量")]
public decimal SEQty { get; set; }
/// <summary>
/// 差异数量
/// </summary>
[ExporterHeader(DisplayName = "差异数量")]
public decimal DiffQty { set; get; }
/// <summary>
/// 匹配类型
/// </summary>
[Display(Name = "匹配类型")]
[ExporterHeader(DisplayName = "是否完全匹配")]
public string MateType { get; set; }
/// <summary>
/// 定价
/// </summary>
[Display(Name = "定价")]
[ExporterHeader(DisplayName = "定价")]
public decimal FixPrice { get; set; }
/// <summary>
/// WMS目标库位
/// </summary>
[Display(Name = "WMS目标库位")]
[ExporterHeader(DisplayName = "WMS目标库位")]
public string ToLocCode { get; set; }
/// <summary>
/// ERP目标库位
/// </summary>
[Display(Name = "ERP目标库位")]
[ExporterHeader(DisplayName = "ERP目标库位")]
public string ToErpLocCode { get; set; }
}
/// <summary>
/// 备件结算与发运对比明细
/// </summary>
[ExcelExporter(MaxRowNumberOnASheet = 900000)]
public class PubSaSeCompareDetailExportBeiJian : PubSaSeCompareDetailExport
{
/// <summary>
/// 类别
/// 有结算有发运
/// 有结算无发运
/// 无结算有发运
/// </summary>
[Display(Name = "类别")]
[ExporterHeader(DisplayName = "类别")]
[ValueMapping("有结算有发运", 1)]
[ValueMapping("有结算无发运", 2)]
[ValueMapping("无结算有发运", 3)]
public EnumPubSaSeCompareCategory Category { get; set; }
/// <summary>
/// Wms发货单号
/// </summary>
[Display(Name = "Wms发货单号")]
[ExporterHeader(DisplayName = "交货单号")]
public string WmsBillNum { get; set; }
/// <summary>
/// 发货日期
/// </summary>
[Display(Name = "发货日期")]
[ExporterHeader(DisplayName = "发货日期", Format = "yyyy-MM-dd")]
public DateTime ShippingDate { get; set; }
/// <summary>
/// 生产码
/// </summary>
[Display(Name = "生产码")]
[ExporterHeader(DisplayName = "索引号")]
public string PN { get; set; }
/// <summary>
/// 物料号
/// </summary>
[Display(Name = "物料号")]
[ExporterHeader(DisplayName = "厂内物料号")]
public string MaterialNumber { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[Display(Name = "物料描述")]
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDes { get; set; }
/// <summary>
/// 原始LU
/// </summary>
[Display(Name = "原始LU")]
[ExporterHeader(DisplayName = "原始LU")]
public string PrimitiveLU { get; set; }
/// <summary>
///替换LU
/// </summary>
[Display(Name = "替换LU")]
[ExporterHeader(DisplayName = "替换LU")]
public string ReplaceLU { get; set; }
/// <summary>
/// 结算数据中的过账日期
/// </summary>
[Display(Name = "客户下线时间")]
[ExporterHeader(DisplayName = "客户下线时间")]
public DateTime CustomerOfflineTime { get; set; }
/// <summary>
/// 结算数量
/// </summary>
[Display(Name = "结算数量")]
[ExporterHeader(DisplayName = "结算数量")]
public decimal SAQty { get; set; }
/// <summary>
/// 发货数量
/// </summary>
[Display(Name = "发货数量")]
[ExporterHeader(DisplayName = "WMS发货数量")]
public decimal SEQty { get; set; }
/// <summary>
/// 差异数量
/// </summary>
[ExporterHeader(DisplayName = "差异数量")]
public decimal DiffQty { set; get; }
/// <summary>
/// 匹配类型
/// </summary>
[Display(Name = "匹配类型")]
[ExporterHeader(DisplayName = "是否完全匹配")]
public string MateType { get; set; }
/// <summary>
/// 定价
/// </summary>
[Display(Name = "定价")]
[ExporterHeader(DisplayName = "定价")]
public decimal FixPrice { get; set; }
/// <summary>
/// WMS目标库位
/// </summary>
[Display(Name = "WMS目标库位")]
[ExporterHeader(DisplayName = "WMS目标库位")]
public string ToLocCode { get; set; }
/// <summary>
/// ERP目标库位
/// </summary>
[Display(Name = "ERP目标库位")]
[ExporterHeader(DisplayName = "ERP目标库位")]
public string ToErpLocCode { get; set; }
}
/// <summary>
/// 印度件结算与发运对比明细
/// </summary>
[ExcelExporter(MaxRowNumberOnASheet = 900000)]
public class PubSaSeCompareDetailExportYinDuJian : PubSaSeCompareDetailExport
{
/// <summary>
/// 类别
/// 有结算有发运
/// 有结算无发运
/// 无结算有发运
/// </summary>
[Display(Name = "类别")]
[ExporterHeader(DisplayName = "类别")]
[ValueMapping("有结算有发运", 1)]
[ValueMapping("有结算无发运", 2)]
[ValueMapping("无结算有发运", 3)]
public EnumPubSaSeCompareCategory Category { get; set; }
/// <summary>
/// Wms发货单号
/// </summary>
[Display(Name = "Wms发货单号")]
[ExporterHeader(DisplayName = "交货单号")]
public string WmsBillNum { get; set; }
/// <summary>
/// 发货日期
/// </summary>
[Display(Name = "发货日期")]
[ExporterHeader(DisplayName = "发货日期", Format = "yyyy-MM-dd")]
public DateTime ShippingDate { get; set; }
/// <summary>
/// 生产码
/// </summary>
[Display(Name = "生产码")]
[ExporterHeader(DisplayName = "ASN发货单号")]
public string PN { get; set; }
/// <summary>
/// 物料号
/// </summary>
[Display(Name = "物料号")]
[ExporterHeader(DisplayName = "厂内物料号")]
public string MaterialNumber { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[Display(Name = "物料描述")]
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDes { get; set; }
/// <summary>
/// 原始LU
/// </summary>
[Display(Name = "原始LU")]
[ExporterHeader(DisplayName = "原始LU")]
public string PrimitiveLU { get; set; }
/// <summary>
///替换LU
/// </summary>
[Display(Name = "替换LU")]
[ExporterHeader(DisplayName = "替换LU")]
public string ReplaceLU { get; set; }
/// <summary>
/// 结算数据中的过账日期
/// </summary>
[Display(Name = "客户下线时间")]
[ExporterHeader(DisplayName = "客户下线时间")]
public DateTime CustomerOfflineTime { get; set; }
/// <summary>
/// 结算数量
/// </summary>
[Display(Name = "结算数量")]
[ExporterHeader(DisplayName = "结算数量")]
public decimal SAQty { get; set; }
/// <summary>
/// 发货数量
/// </summary>
[Display(Name = "发货数量")]
[ExporterHeader(DisplayName = "WMS发货数量")]
public decimal SEQty { get; set; }
/// <summary>
/// 差异数量
/// </summary>
[ExporterHeader(DisplayName = "差异数量")]
public decimal DiffQty { set; get; }
/// <summary>
/// 匹配类型
/// </summary>
[Display(Name = "匹配类型")]
[ExporterHeader(DisplayName = "是否完全匹配")]
public string MateType { get; set; }
/// <summary>
/// 定价
/// </summary>
[Display(Name = "定价")]
[ExporterHeader(DisplayName = "定价")]
public decimal FixPrice { get; set; }
/// <summary>
/// WMS目标库位
/// </summary>
[Display(Name = "WMS目标库位")]
[ExporterHeader(DisplayName = "WMS目标库位")]
public string ToLocCode { get; set; }
/// <summary>
/// ERP目标库位
/// </summary>
[Display(Name = "ERP目标库位")]
[ExporterHeader(DisplayName = "ERP目标库位")]
public string ToErpLocCode { get; set; }
}

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

@ -1,5 +1,6 @@
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using SettleAccount.Domain.BQ;
using Volo.Abp;
using Volo.Abp.EntityFrameworkCore.Modeling;
@ -1212,12 +1213,11 @@ namespace Win.Sfs.SettleAccount
b.Property(x => x.ConcurrencyStamp).HasMaxLength(50);
});
}
private static void ConfigureBBAC_PD(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<BBAC_PD>(b =>
{
b.ToTable($"{options.TablePrefix}_BBAC_PD", options.Schema);
b.ConfigureByConvention();
@ -1231,10 +1231,8 @@ namespace Win.Sfs.SettleAccount
private static void ConfigureHBPO_PD(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<HBPO_PD>(b =>
{
b.ToTable($"{options.TablePrefix}_HBPO_PD", options.Schema);
b.ConfigureByConvention();
@ -1245,12 +1243,11 @@ namespace Win.Sfs.SettleAccount
b.Property(x => x.ConcurrencyStamp).HasMaxLength(50);
});
}
private static void ConfigurePUB_PD(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<PUB_PD>(b =>
{
b.ToTable($"{options.TablePrefix}_PUB_PD", options.Schema);
b.ConfigureByConvention();
@ -1262,8 +1259,6 @@ namespace Win.Sfs.SettleAccount
});
}
private static void ConfigureBBAC_ADJ_DETAIL(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
//builder.Entity<BBAC_ADJ_DETAIL>(b =>
@ -1315,13 +1310,23 @@ namespace Win.Sfs.SettleAccount
// b.HasIndex(o => o.Name).IsUnique();
//});
builder.Entity<VmiBalance>((Action<Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<VmiBalance>>)(b =>
builder.Entity((Action<EntityTypeBuilder<VmiBalance>>)(b =>
{
b.ToTable($"{options.TablePrefix}_VmiBalance", options.Schema);
b.ConfigureByConvention();
b.HasAlternateKey(o => (new { o.BillType, o.PartCode, o.VinCode, o.ErpToLoc, o.OrderNum }));
b.HasIndex(o => (new
{
o.BillType,
o.CodeType,
o.PartCode,
o.VinCode,
o.ErpToLoc,
o.OrderNum,
o.factory,
o.Configcode
})).IsUnique();
}));
builder.Entity<VmiBalance>().HasData(new VmiBalance { BillType = EnumDeliverBjBmpBillType.JIS件, PartCode = "PartCode", VinCode = "VinCode", ErpToLoc = "ErpToLoc", OrderNum = "OrderNum" }.SetId());
builder.Entity<VmiBalance>().HasData(new VmiBalance(Guid.NewGuid()) { BillType = EnumDeliverBjBmpBillType.JIS件, PartCode = "PartCode", VinCode = "VinCode", ErpToLoc = "ErpToLoc", OrderNum = "OrderNum" });
builder.Entity<VmiLog>(b =>
{

5349
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230809035500_vmi11.Designer.cs

File diff suppressed because it is too large

186
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230809035500_vmi11.cs

@ -0,0 +1,186 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class vmi11 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropUniqueConstraint(
name: "AK_Set_VmiBalance_BillType_PartCode_VinCode_ErpToLoc_OrderNum",
table: "Set_VmiBalance");
migrationBuilder.AlterColumn<string>(
name: "VinCode",
table: "Set_VmiBalance",
type: "nvarchar(450)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(450)");
migrationBuilder.AlterColumn<string>(
name: "PartCode",
table: "Set_VmiBalance",
type: "nvarchar(450)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(450)");
migrationBuilder.AlterColumn<string>(
name: "OrderNum",
table: "Set_VmiBalance",
type: "nvarchar(450)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(450)");
migrationBuilder.AlterColumn<string>(
name: "ErpToLoc",
table: "Set_VmiBalance",
type: "nvarchar(450)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(450)");
migrationBuilder.AddColumn<int>(
name: "BillType",
table: "Set_PUB_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "DeliverBillType",
table: "Set_PUB_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "DeliverSubBillType",
table: "Set_PUB_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "ProType",
table: "Set_PUB_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "SubBillType",
table: "Set_PUB_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "TransType",
table: "Set_PUB_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.UpdateData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("ea936b34-ecd0-7dbd-85a9-57cd8b730873"),
column: "ConcurrencyStamp",
value: "4affb77e506d43dda8bc322162fcb335");
migrationBuilder.CreateIndex(
name: "IX_Set_VmiBalance_BillType_PartCode_VinCode_ErpToLoc_OrderNum",
table: "Set_VmiBalance",
columns: new[] { "BillType", "PartCode", "VinCode", "ErpToLoc", "OrderNum" },
unique: true,
filter: "[PartCode] IS NOT NULL AND [VinCode] IS NOT NULL AND [ErpToLoc] IS NOT NULL AND [OrderNum] IS NOT NULL");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_Set_VmiBalance_BillType_PartCode_VinCode_ErpToLoc_OrderNum",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "BillType",
table: "Set_PUB_SE_DETAIL");
migrationBuilder.DropColumn(
name: "DeliverBillType",
table: "Set_PUB_SE_DETAIL");
migrationBuilder.DropColumn(
name: "DeliverSubBillType",
table: "Set_PUB_SE_DETAIL");
migrationBuilder.DropColumn(
name: "ProType",
table: "Set_PUB_SE_DETAIL");
migrationBuilder.DropColumn(
name: "SubBillType",
table: "Set_PUB_SE_DETAIL");
migrationBuilder.DropColumn(
name: "TransType",
table: "Set_PUB_SE_DETAIL");
migrationBuilder.AlterColumn<string>(
name: "VinCode",
table: "Set_VmiBalance",
type: "nvarchar(450)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(450)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "PartCode",
table: "Set_VmiBalance",
type: "nvarchar(450)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(450)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "OrderNum",
table: "Set_VmiBalance",
type: "nvarchar(450)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(450)",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ErpToLoc",
table: "Set_VmiBalance",
type: "nvarchar(450)",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(450)",
oldNullable: true);
migrationBuilder.AddUniqueConstraint(
name: "AK_Set_VmiBalance_BillType_PartCode_VinCode_ErpToLoc_OrderNum",
table: "Set_VmiBalance",
columns: new[] { "BillType", "PartCode", "VinCode", "ErpToLoc", "OrderNum" });
migrationBuilder.UpdateData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("ea936b34-ecd0-7dbd-85a9-57cd8b730873"),
column: "ConcurrencyStamp",
value: "7ee5d3ed981d4f87963af8b5654cd9df");
}
}
}

5355
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230809054836_20230809-1.Designer.cs

File diff suppressed because it is too large

56
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230809054836_20230809-1.cs

@ -0,0 +1,56 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class _202308091 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("ea936b34-ecd0-7dbd-85a9-57cd8b730873"));
migrationBuilder.AddColumn<bool>(
name: "IsHaveSeData",
table: "Set_HBPO_SE_EDI",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "IsHaveEdiData",
table: "Set_HBPO_SE_DETAIL",
type: "bit",
nullable: false,
defaultValue: false);
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("3f870b27-55b4-470b-8c44-abb68145e3c8"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "d8fd025b2b0f4872bfa9a40f9f3df4b9", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("3f870b27-55b4-470b-8c44-abb68145e3c8"));
migrationBuilder.DropColumn(
name: "IsHaveSeData",
table: "Set_HBPO_SE_EDI");
migrationBuilder.DropColumn(
name: "IsHaveEdiData",
table: "Set_HBPO_SE_DETAIL");
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("ea936b34-ecd0-7dbd-85a9-57cd8b730873"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "4affb77e506d43dda8bc322162fcb335", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null });
}
}
}

5341
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230809074216_20230809-2.Designer.cs

File diff suppressed because it is too large

65
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230809074216_20230809-2.cs

@ -0,0 +1,65 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class _202308092 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("3f870b27-55b4-470b-8c44-abb68145e3c8"));
migrationBuilder.DropColumn(
name: "DeleterId",
table: "Set_PUB_SA");
migrationBuilder.DropColumn(
name: "DeletionTime",
table: "Set_PUB_SA");
migrationBuilder.DropColumn(
name: "IsDeleted",
table: "Set_PUB_SA");
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("b6018a04-ee6d-447f-8fb8-81eb287a7ebc"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "02418a7349a942d4b3e1fe9a3968a908", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("b6018a04-ee6d-447f-8fb8-81eb287a7ebc"));
migrationBuilder.AddColumn<Guid>(
name: "DeleterId",
table: "Set_PUB_SA",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "DeletionTime",
table: "Set_PUB_SA",
type: "datetime2",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "IsDeleted",
table: "Set_PUB_SA",
type: "bit",
nullable: false,
defaultValue: false);
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("3f870b27-55b4-470b-8c44-abb68145e3c8"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "d8fd025b2b0f4872bfa9a40f9f3df4b9", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null });
}
}
}

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

@ -1780,6 +1780,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<bool>("IsHaveEdiData")
.HasColumnType("bit");
b.Property<string>("KeyCode")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
@ -1941,6 +1944,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<bool>("IsHaveSeData")
.HasColumnType("bit");
b.Property<string>("KeyCode")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
@ -3209,24 +3215,10 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
@ -3350,6 +3342,9 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<DateTime>("BillTime")
.HasColumnType("datetime2");
b.Property<int>("BillType")
.HasColumnType("int");
b.Property<int>("BusinessType")
.HasMaxLength(50)
.HasColumnType("int");
@ -3379,6 +3374,12 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<int>("DeliverBillType")
.HasColumnType("int");
b.Property<int>("DeliverSubBillType")
.HasColumnType("int");
b.Property<string>("DeliveryHose")
.HasColumnType("nvarchar(max)");
@ -3451,6 +3452,9 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("PartCode")
.HasColumnType("nvarchar(max)");
b.Property<int>("ProType")
.HasColumnType("int");
b.Property<decimal>("Qty")
.HasColumnType("decimal(18,2)");
@ -3460,6 +3464,9 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<DateTime>("ShippingDate")
.HasColumnType("datetime2");
b.Property<int>("SubBillType")
.HasColumnType("int");
b.Property<string>("ToErpLocCode")
.HasColumnType("nvarchar(max)");
@ -3469,6 +3476,9 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("ToLocCode")
.HasColumnType("nvarchar(max)");
b.Property<int>("TransType")
.HasColumnType("int");
b.Property<int>("Version")
.HasColumnType("int");
@ -4271,18 +4281,15 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("datetime2");
b.Property<string>("ErpToLoc")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<string>("MatchNumber")
.HasColumnType("nvarchar(max)");
b.Property<string>("OrderNum")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<string>("PartCode")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<string>("PjsNum")
@ -4307,7 +4314,6 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("nvarchar(max)");
b.Property<string>("VinCode")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<string>("factory")
@ -4315,17 +4321,19 @@ namespace Win.Sfs.SettleAccount.Migrations
b.HasKey("Id");
b.HasAlternateKey("BillType", "PartCode", "VinCode", "ErpToLoc", "OrderNum");
b.HasIndex("BillType", "PartCode", "VinCode", "ErpToLoc", "OrderNum")
.IsUnique()
.HasFilter("[PartCode] IS NOT NULL AND [VinCode] IS NOT NULL AND [ErpToLoc] IS NOT NULL AND [OrderNum] IS NOT NULL");
b.ToTable("Set_VmiBalance");
b.HasData(
new
{
Id = new Guid("ea936b34-ecd0-7dbd-85a9-57cd8b730873"),
Id = new Guid("b6018a04-ee6d-447f-8fb8-81eb287a7ebc"),
BillTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
BillType = 1,
ConcurrencyStamp = "7ee5d3ed981d4f87963af8b5654cd9df",
ConcurrencyStamp = "02418a7349a942d4b3e1fe9a3968a908",
DeliverTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
ErpToLoc = "ErpToLoc",
OrderNum = "OrderNum",

13
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/PubSaSeCompareDapperRepository.cs

@ -37,23 +37,20 @@ public class PubSaSeCompareDapperRepository : DapperRepository<SettleAccountDbCo
SELECT
A.WmsBillNum,
A.ShippingDate,
'' SeqNumber,
'' PJISSeqNumber,
'' MaterialNumber,
A.PartCode AS MaterialNumber,
'' MaterialDes,
B.SettleDate CustomerOfflineTime,
'' AssemblyCode,
'' InjectionCode,
A.LU SeLU,
B.LU SaLU,
ISNULL(A.PN,B.PN) PN,
A.SEQty,
B.SAQty,
(B.SAQty-A.SEQty) DiffQty,
'' MateType,
B.Price FixPrice
B.Price FixPrice,
A.ToLocCode,
A.ToErpLocCode
FROM
(SELECT SUM(QTY) SEQty,LU,PN,MAX(WmsBillNum) WmsBillNum,MAX(ShippingDate) ShippingDate FROM Set_PUB_SE_DETAIL WHERE BusinessType = {businessType} {strSeWhere} GROUP BY LU,PN) A
(SELECT SUM(QTY) SEQty,LU,PN,MAX(WmsBillNum) WmsBillNum,MAX(ShippingDate) ShippingDate,MAX(PartCode) PartCode, MAX(ToLocCode) ToLocCode, MAX(ToErpLocCode) ToErpLocCode FROM Set_PUB_SE_DETAIL WHERE BusinessType = {businessType} {strSeWhere} GROUP BY LU,PN) A
FULL JOIN (SELECT SUM(QTY) SAQty,LU,PN,MAX(Price) Price,MAX(SettleDate) SettleDate FROM Set_PUB_SA_DETAIL WHERE BusinessType = {businessType} AND Version = {version} GROUP BY LU,PN) B ON A.LU= B.LU AND A.PN= B.PN
ORDER BY B.SettleDate DESC;
";

44
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/PubSaSeCompareExportService.cs

@ -199,48 +199,9 @@ namespace SettleAccount.Job.Services.Report
}
var pubSaSeCompareDetailExports = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExport>>(pubSaSeCompareDiffs);
//结算核对汇总
var pubSaSeCompareSumExports = pubSaSeCompareDetailExports.GroupBy(p => p.ReplaceLU).Select(p => new PubSaSeCompareSumExport()
{
LU = p.Key,
MaterialDes = p.FirstOrDefault().MaterialDes,
SAQty = p.Sum(t => t.SAQty),
SEQty = p.Sum(t => t.SEQty)
}).ToList();
//有结算有发运
var haveSaHaveSeExports = pubSaSeCompareDetailExports.FindAll(t => t.Category == EnumPubSaSeCompareCategory.HaveSaHaveSe);
//有结算有发运汇总
var haveSaHaveSeSumExports = haveSaHaveSeExports.GroupBy(p => p.ReplaceLU).Select(p => new PubSaSeCompareSumExport()
{
LU = p.Key,
MaterialDes = p.FirstOrDefault().MaterialDes,
SAQty = p.Sum(t => t.SAQty),
SEQty = p.Sum(t => t.SEQty)
}).ToList();
//有结算无发运
var haveSaNotHaveSeExports = pubSaSeCompareDetailExports.FindAll(t => t.Category == EnumPubSaSeCompareCategory.HaveSaNotHaveSe);
//有结算无发运
var haveSaNotHaveSeSumExports = haveSaHaveSeExports.GroupBy(p => p.ReplaceLU).Select(p => new PubSaSeCompareSumExport()
{
LU = p.Key,
MaterialDes = p.FirstOrDefault().MaterialDes,
SAQty = p.Sum(t => t.SAQty),
SEQty = p.Sum(t => t.SEQty)
}).ToList();
//无结算有发运
var notHaveSaHaveSeExports = pubSaSeCompareDetailExports.FindAll(t => t.Category == EnumPubSaSeCompareCategory.NotHaveSaHaveSe);
//无结算有发运
var notHaveSaHaveSeSumExports = haveSaHaveSeExports.GroupBy(p => p.ReplaceLU).Select(p => new PubSaSeCompareSumExport()
{
LU = p.Key,
MaterialDes = p.FirstOrDefault().MaterialDes,
SAQty = p.Sum(t => t.SAQty),
SEQty = p.Sum(t => t.SEQty)
}).ToList();
ExcelExporter excelExporter = new ExcelExporter();
var excelExporter = new ExcelExporter();
#region 根据业务分类转换不同导出Dto
switch (businessType)
{
case EnumBusinessType.ZhiGongJianBBAC:
@ -278,6 +239,7 @@ namespace SettleAccount.Job.Services.Report
default:
break;
}
#endregion
var result = excelExporter.ExportAppendDataAsByteArray();
result.ShouldNotBeNull();

Loading…
Cancel
Save