学 赵 1 year ago
parent
commit
bea36c3572
  1. 30
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
  2. 51
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
  3. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/business-type.js
  4. 32
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js
  5. 127
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/fa-yun.js
  6. 118
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/edi.js
  7. 186
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/fa-yun.js
  8. 52
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan-detail.js
  9. 23
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js
  10. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/tb_re-parts-relationship_service.js
  11. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/request/index.js
  12. 1450
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  13. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/styles/site.css
  14. 98
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/fa-yun.js
  15. 106
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/jie-suan.js
  16. 23
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/edi.js
  17. 31
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/fa-yun.js
  18. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/jie-suan.js
  19. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs
  20. 32
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BBACSeSyncAppService.cs
  21. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BeiSeSyncAppService.cs
  22. 29
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/HBPOSeSyncAppService.cs
  23. 46
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs
  24. 73
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeEdiCompareAppService.cs
  25. 23
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JitSeSyncAppService.cs
  26. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/YinDuSeSyncAppService.cs
  27. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/ZhiGongBBACSeSyncAppService.cs
  28. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/ZhiGongHBPOSeSyncAppService.cs
  29. 21
      code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
  30. 199
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_DETAIL.cs
  31. 201
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SE_DETAIL.cs
  32. 43
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/MaterialRelationshipManager.cs
  33. 10
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIS_RECORD.cs
  34. 11
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIT_RECORD.cs
  35. 5503
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230815054853_20230815-3.Designer.cs
  36. 368
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230815054853_20230815-3.cs
  37. 98
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs

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

@ -22,10 +22,9 @@ export default {
<template v-if="getInput(schema)==='select'">
<el-select
v-model="model[prop]"
:placeholder="$t('select')"
:placeholder="schema.placeholder??schema.title"
:multiple="!!schema.multiple"
:clearable="!!schema.clearable"
style="width:100%"
>
<el-option v-for="item in options" :key="item.key" :label="item.label" :value="item.value" />
</el-select>
@ -37,7 +36,9 @@ export default {
</el-tabs>
<br />
</template>
<template v-else-if="getInput(schema)==='month'||getInput(schema)==='datetime'">
<template
v-else-if="getInput(schema)==='month'||getInput(schema)==='datetime'||getInput(schema)==='datetimerange'"
>
<el-date-picker
v-model="model[prop]"
:type="schema.input"
@ -45,13 +46,28 @@ export default {
/>
</template>
<template v-else-if="getInput(schema)==='number'">
<el-input :disabled="getDisabled()" :placeholder="schema.title" v-model="model[prop]" type="number" />
<el-input
:disabled="getDisabled()"
:placeholder="schema.placeholder??schema.title"
v-model="model[prop]"
type="number"
/>
</template>
<template v-else-if="getInput(schema)==='integer'">
<el-input-number :disabled="getDisabled()" :placeholder="schema.title" v-model="model[prop]" :precision="0" />
<el-input-number
:disabled="getDisabled()"
:placeholder="schema.placeholder??schema.title"
v-model="model[prop]"
:precision="0"
/>
</template>
<template v-else-if="getInput(schema)==='boolean'">
<el-select :disabled="getDisabled()" v-model="model[prop]" :placeholder="schema.title" v-if="schema.nullable">
<el-select
:disabled="getDisabled()"
v-model="model[prop]"
:placeholder="schema.placeholder??schema.title"
v-if="schema.nullable"
>
<el-option prop="select" value="" :label="$t('select')" />
<el-option prop="true" :value="true" :label="$t('true')" />
<el-option prop="false" :value="false" :label="$t('false')" />
@ -89,7 +105,7 @@ export default {
<el-input
clearable
:disabled="getDisabled()"
:placeholder="schema.title"
:placeholder="schema.placeholder??schema.title"
v-model="model[prop]"
:type="schema.input??'text'"
:show-password="schema.input==='password'"

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

@ -81,12 +81,7 @@ export default {
</template>
</el-table-column>
<template v-for="(item,key) in config.table.schema.properties">
<template v-if="key==='properties'">
<el-table-column :label="subKey" v-for="(subItem,subKey) in item.properties">
<template #default="scope">{{ scope.row[key][subKey] }} </template>
</el-table-column>
</template>
<template v-else-if="item.navigation">
<template v-if="item.navigation">
<el-table-column :prop="key" :label="item.title">
<template #default="scope">{{getProp(scope.row,item.navigation)}}</template>
</el-table-column>
@ -121,10 +116,15 @@ export default {
</template>
</el-table-column>
</template>
<template v-if="key==='extraProperties'">
<el-table-column v-for="item in scope.row['extraProperties']">
<template #header="scope">{{$t(item.key)??item.key}}</template>
<template #default="scope"> {{item.value}} </template>
</template>
<template v-if="item.type==='object'">
<template v-for="(item2,key2) in item['properties']">
<el-table-column :prop="key+'.'+key2">
<template #header="scope">{{item2.title}}</template>
<template #default="scope">
<app-form-input mode="details" :schema="item2" :prop="key+'.'+key2" v-model="scope.row[key]" />
{{scope.row[key][key2]}}
</template>
</el-table-column>
</template>
</template>
@ -637,7 +637,7 @@ export default {
const url = config.edit.exportUrl;
const method = config.edit.exportMethod ?? "POST";
const postData = {
filters: [{ logic: "and", action: "equal", column: item.meta.key, value: rows[0][item.meta.key] }],
[item.meta.key]: rows[0][item.meta.key],
};
const response = await request(url, postData, { method });
if (!response.errors) {
@ -646,16 +646,6 @@ export default {
} else {
console.log(item);
}
} else if (item.path === "compare") {
exportModel.value = defaultExportModel;
versions.value = (
await request("settleaccount/centralized-control/get-all", null, { method: "POST" })
).data.items.map((o) => ({
value: o.version,
label: o.version,
}));
editFormTitle.value = `${t(item.path)}${config.query.schema.title}`;
dialogVisible.value = true;
} else if (item.path === "import") {
//import
try {
@ -668,10 +658,6 @@ 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;
@ -722,11 +708,8 @@ export default {
const url = config.edit.importUrl;
const formData = new FormData();
//
if (config.query.schema.properties.businessType?.default) {
formData.append("businessType", config.query.schema.properties.businessType.default);
}
if (!router.currentRoute.value.path.startsWith("/base-data")) {
formData.append("version", queryModel.value.version);
if (route.meta.businessType) {
formData.append("businessType", route.meta.businessType);
}
Object.keys(importModel.value).forEach((propertyName) => {
if (importModel.value[propertyName]) {
@ -869,6 +852,14 @@ export default {
const postData = JSON.parse(JSON.stringify(queryModel.value));
Object.assign(postData, subListQuery.value.query);
postData.filters = filterList.value.filter((o) => o.column && o.action && (o.value || o.value === false));
if (route.meta.businessType) {
postData.filters.push({
logic: "and",
column: "businessType",
action: "equal",
value: route.meta.businessType,
});
}
if (postData.items) {
delete postData["items"];
}

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/business-type.js

@ -1,4 +1,4 @@
export default [
const options = [
{ value: 0, label: "未定义" },
{ value: 1, label: "JisBBAC" },
{ value: 2, label: "JisHBPO" },
@ -9,3 +9,5 @@ export default [
{ value: 7, label: "备件" },
{ value: 8, label: "印度件" },
];
const businessType = { title: "业务类型", type: "string", input: "select", options };
export default businessType;

32
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js

@ -0,0 +1,32 @@
import defaultVersion from "../version.js";
const version = Object.assign({}, defaultVersion);
export default {
properties: {
version: Object.assign(version, { rules: [{ required: true }] }),
seDateTime: {
title: "发运日期",
type: "array",
input: "datetimerange",
},
downLineDateTime: {
title: "下线日期",
type: "array",
input: "datetimerange",
},
pn: {
title: "通用码",
type: "string",
input: "textarea",
columns: 1,
placeholder: "通用码",
},
lu: {
title: "客户零件号",
type: "string",
input: "textarea",
placeholder: "客户零件号",
},
},
};

127
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/fa-yun.js

@ -0,0 +1,127 @@
import version from "../version.js";
import compareSchema from "./compare.js";
const stateName = {
title: "状态",
type: "string",
input: "select",
clearable: true,
options: [
{ label: "执行完成(任务成功)", value: "Succeeded" },
{ label: "执行完成(任务失败)", value: "Failed" },
{ label: "执行中", value: "Processing" },
{ label: "等待执行", value: "Enqueued" },
],
};
const schema = {
title: "数据对比",
type: "object",
properties: {
type: {
title: "版本号",
type: "string",
},
taskId: {
title: "单据流水号",
type: "string",
},
email: {
title: "创建人",
type: "string",
},
createdAt: {
title: "创建时间",
type: "DateTime",
},
remark: {
title: "说明",
type: "string",
},
stateName,
},
};
export default function (compareService) {
const queryUrl = "settleaccount/Job/list";
const deleteUrl = "settleaccount/Job/delete";
const exportUrl = "settleaccount/pub_sa_detail_service/export";
const compareUrl = `settleaccount/${compareService}`;
const queryMethod = "POST";
const deleteMethod = "POST";
const exportMethod = "POST";
const compareMethod = "POST";
return {
query: {
url: queryUrl,
method: queryMethod,
autoSubmit: true,
disableQueryOnLoad: false,
schema: {
title: "数据对比",
type: "object",
properties: {
type: Object.assign({ defaultSelected: false }, version),
name: {
type: "string",
hidden: true,
},
stateName,
businessType: {
type: "string",
hidden: true,
},
filters: {
type: "array",
hidden: true,
items: {
type: "object",
properties: {
logic: {
type: "int",
},
column: {
type: "string",
},
action: {
type: "int",
},
value: {
type: "string",
},
},
},
default: [],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
deleteUrl,
exportUrl,
compareUrl,
deleteMethod,
exportMethod,
compareMethod,
schema: schema,
},
compare: {
schema: compareSchema,
},
};
}

118
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/edi.js

@ -0,0 +1,118 @@
import version from "../version.js";
const schema = {
title: "EDI数据",
type: "object",
properties: {
keyCode: {
title: "LU+生产码",
type: "string",
},
version,
lu: {
title: "零件号",
type: "string",
},
pn: {
title: "生产码",
type: "string",
},
seqNumber: {
title: "日顺序号",
type: "string",
},
assemblyCode: {
title: "小总成号",
type: "string",
},
injectionCode: {
title: "注塑码",
type: "string",
},
qty: {
title: "EDI数量",
type: "number",
},
beginDate: {
title: "订货时间",
type: "string",
input: "datetime",
},
id: {
type: "string",
hidden: true,
showForList: false,
},
},
};
export default function (service) {
const queryUrl = `settleaccount/${service}/get-list`;
const exportUrl = `settleaccount/${service}/export`;
const queryMethod = "POST";
const exportMethod = "POST";
return {
query: {
url: queryUrl,
method: queryMethod,
hasFilter: true,
schema: {
title: "EDI数据",
type: "object",
properties: {
filters: {
title: "项目",
type: "array",
hidden: true,
items: {
type: "object",
properties: {
logic: {
type: "int",
},
column: {
type: "string",
},
action: {
type: "int",
},
value: {
type: "string",
},
},
},
default: [
{
logic: "and",
column: "version",
action: "equal",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
exportUrl,
exportMethod,
schema: schema,
},
};
}

186
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/fa-yun.js

@ -0,0 +1,186 @@
const schema = {
title: "JIS发运数据",
type: "object",
properties: {
wmsBillNum: {
title: "发货单号",
type: "string",
},
num: {
title: "单据编号",
type: "string",
},
billTime: {
title: "发货时间",
type: "string",
input: "datetime",
},
oper: {
title: "发货人",
type: "string",
},
orderNum: {
title: "排序单号",
type: "string",
},
seq: {
title: "订单序号",
type: "string",
},
realCode: {
title: "实际生产码",
type: "string",
},
vinCode: {
title: "订单生产码",
type: "string",
},
codeType: {
title: "生产码类型",
type: "string",
},
realPartCode: {
title: "实际零件号",
type: "string",
},
partCode: {
title: "零件号",
type: "string",
},
batch: {
title: "批次",
type: "string",
},
mesConfigCode: {
title: "MES配置码",
type: "string",
},
fromLoc: {
title: "来源库位",
type: "string",
},
toLoc: {
title: "目标库位",
type: "string",
},
refVinCode: {
title: "参照订单生产码",
type: "string",
},
billCharacter: {
title: "单据性质",
type: "string",
},
refBillNum: {
title: "发货关联单号",
type: "string",
},
erpToLoc: {
title: "Erp目标库位",
type: "string",
},
origiCode: {
title: "原生产码",
type: "string",
},
remark: {
title: "备注",
type: "string",
},
uniqueCode: {
title: "塑件唯一码",
type: "string",
},
pjsNum: {
title: "PJS顺序号",
type: "string",
},
matchNumber: {
title: "虚拟小总成",
type: "string",
},
deliverCode: {
title: "发货条码",
type: "string",
},
position: {
title: "客户位置",
type: "string",
},
},
};
export default function (service, syncService) {
const queryUrl = `settleaccount/${service}/get-list`;
const exportUrl = `settleaccount/${service}/export`;
const syncUrl = `settleaccount/${syncService}`;
const queryMethod = "POST";
const exportMethod = "POST";
const syncMethod = "POST";
return {
query: {
url: queryUrl,
method: queryMethod,
hasFilter: true,
schema: {
title: "JIS发运数据",
type: "object",
properties: {
filters: {
title: "项目",
type: "array",
hidden: true,
items: {
type: "object",
properties: {
logic: {
type: "int",
},
column: {
type: "string",
},
action: {
type: "int",
},
value: {
type: "string",
},
},
},
default: [
{
logic: "and",
column: "wmsBillNum",
action: "like",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
exportUrl,
syncUrl,
exportMethod,
syncMethod,
schema: schema,
},
};
}

52
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan-detail.js

@ -33,6 +33,58 @@ const schema = {
title: "生产号",
type: "string",
},
extraProperties: {
title: "扩展属性",
type: "object",
properties: {
DeliveryNumber: {
title: "交货号",
},
InvoiceNumber: {
title: "发票号",
},
VendorCode: {
title: "供应商代码",
},
VendorName: {
title: "供应商名称",
},
PurchaseOrderNumber: {
title: "采购订单号",
},
DeliveryIndexNumber: {
title: "交付索引号",
},
PartName: {
title: "零件名称",
},
Price: {
title: "价格",
type: "number",
},
Amount: {
title: "金额",
type: "number",
},
Tallage: {
title: "税额",
type: "number",
},
Total: {
title: "价税合计",
type: "number",
},
ProtocolNumber: {
title: "协议编号",
},
Remark: {
title: "备注",
},
CommodityGroup: {
title: "商品组",
},
},
},
},
};

23
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js

@ -1,5 +1,6 @@
import version from "../version.js";
import state from "../state.js";
import businessType from "../business-type.js";
const schema = {
title: "结算数据",
@ -13,19 +14,14 @@ const schema = {
oneToMany: "/input/jie-suan/detail",
config: "/models/input/jie-suan-detail.js",
},
businessType: {
title: "业务类型",
type: "string",
hidden: true,
default: 0,
},
businessType,
},
};
export default function (service = "pub_sa_service", detailService = "pub_sa_detail_service") {
export default function (service, detailService) {
const queryUrl = `settleaccount/${service}/get-list`;
const deleteUrl = `settleaccount/${service}/delete-list`;
const importUrl = `settleaccount/${service}/import`;
const importUrl = `settleaccount/pub_sa_service/import-by-business-type`;
const exportUrl = `settleaccount/${detailService}/export`;
const queryMethod = "POST";
const deleteMethod = "POST";
@ -83,16 +79,19 @@ export default function (service = "pub_sa_service", detailService = "pub_sa_det
sorting: {
hidden: true,
},
businessType: {
hidden: true,
default: 0,
},
},
},
},
table: {
schema: schema,
},
import: {
schema: {
properties: {
version: Object.assign(version, { rules: [{ required: true }] }),
},
},
},
edit: {
deleteUrl,
importUrl,

8
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/tb_re-parts-relationship_service.js

@ -1,4 +1,4 @@
import businessTypes from "./business-type.js";
import options from "./business-type.js";
const schema = {
title: "客户替换件关系",
@ -12,11 +12,7 @@ const schema = {
title: "替换厂内物料号",
type: "string",
},
businessType: {
title: "业务分类",
input: "select",
options: businessTypes,
},
options,
},
};

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

@ -51,9 +51,9 @@ const getResult = async (response) => {
};
if (response.status === 200 || response.status === 201 || response.status === 204) {
const contentType = response.headers.get("Content-Type");
if (contentType.indexOf("application/json") > -1) {
if (contentType?.indexOf("application/json") > -1) {
result.data = await response.json();
} else if (contentType.indexOf("text/plain") > -1) {
} else if (contentType?.indexOf("text/plain") > -1) {
result.data = await response.text();
} else if (contentType === "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") {
result.data = await response.blob();

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

File diff suppressed because it is too large

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/styles/site.css

@ -97,7 +97,7 @@ a.logo {
.el-form--inline .el-form-item__content {
width: 192px;
height: 32px;
/* height: 32px; */
}
.el-table .cell {
@ -125,7 +125,7 @@ a.logo {
.el-select,
.el-input-number {
width: 100%;
/* width: 100%; */
}
/* markdown component */

98
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/fa-yun.js

@ -0,0 +1,98 @@
import AppList from "../../components/list/index.js";
import AppForm from "../../components/form/index.js";
import html from "html";
import { useRoute } from "vue-router";
import useConfig from "../../models/compare/fa-yun.js";
import { ref, onMounted, onUnmounted } from "vue";
import { schemaToModel } from "../../utils/index.js";
import request from "../../request/index.js";
export default {
components: { AppList, AppForm },
template: html`<app-list ref="appListRef" :config="config" @command="onCommand" />
<el-dialog v-model="dialogVisable" align-center destroy-on-close style="width:40%;height:50%;">
<template #header> <span class="el-dialog__title"> EDI与发运对比 </span> </template>
<el-scrollbar>
<app-form
ref="formRef"
:mode="create"
label-position="left"
:schema="schema"
v-model="model"
:hideButton="true"
@submit="submit"
/>
</el-scrollbar>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="submit"> {{$t('confirm')}} </el-button>
</span>
</template>
</el-dialog>`,
styles: html`<style>
.el-dialog__body {
height: calc(100% - 120px);
}
</style>`,
setup() {
const route = useRoute();
const businessType = route.meta.businessType;
const dialogVisable = ref(false);
const loading = ref(false);
let config = null;
let name = null;
if (businessType === "JisBBAC") {
config = useConfig("edi-se-compare/bbacedi-se-compare");
name = "JisBBACEDI与发运数据对比";
} else if (businessType === "JisHBPO") {
config = useConfig("edi-se-compare/hbpoedi-se-compare");
name = "JisHBPOEDI与发运数据对比";
}
config.query.schema.properties.name.default = name;
const schema = config.compare.schema;
const defaultModel = schemaToModel(schema);
const model = ref(null);
const formRef = ref(null);
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
if (item.path === "compare") {
model.value = Object.assign({}, defaultModel);
dialogVisable.value = true;
}
};
const submit = async () => {
try {
const valid = await formRef.value.validate();
if (valid) {
loading.value = true;
}
const url = config.edit.compareUrl;
const data = Object.assign({ businessType, name }, model.value);
if (data.seDateTime?.length === 2) {
data.seStartDateTime = data.seDateTime[0];
data.seEndDateTime = data.seDateTime[1];
}
if (data.downLineDateTime?.length === 2) {
data.downLineStartDateTime = data.downLineDateTime[0];
data.downLineEndDateTime = data.downLineDateTime[1];
}
if (businessType) delete data["seDateTime"];
delete data["downLineDateTime"];
const result = await request(url, data, { method: "POST" }, true);
if (!result.errors) {
dialogVisable.value = false;
}
} catch (error) {
console.log(error);
} finally {
loading.value = false;
}
};
//
const appListRef = ref(null);
const event = "SaSeCompare";
onMounted(() => PubSub.subscribe(event, async () => await appListRef.value.load()));
onUnmounted(() => PubSub.unsubscribe(event));
return { config, onCommand, appListRef, dialogVisable, loading, schema, model, formRef, submit };
},
};

106
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/jie-suan.js

@ -0,0 +1,106 @@
import AppList from "../../components/list/index.js";
import AppForm from "../../components/form/index.js";
import html from "html";
import { useRoute } from "vue-router";
import useConfig from "../../models/compare/fa-yun.js";
import { ref, onMounted, onUnmounted } from "vue";
import { schemaToModel } from "../../utils/index.js";
import request from "../../request/index.js";
export default {
components: { AppList, AppForm },
template: html`<app-list ref="appListRef" :config="config" @command="onCommand" />
<el-dialog v-model="dialogVisable" align-center destroy-on-close style="width:40%;height:50%;">
<template #header> <span class="el-dialog__title"> EDI发运与发运对比 </span> </template>
<el-scrollbar>
<app-form
ref="formRef"
:mode="create"
label-position="left"
:schema="schema"
v-model="model"
:hideButton="true"
@submit="submit"
/>
</el-scrollbar>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="submit"> {{$t('confirm')}} </el-button>
</span>
</template>
</el-dialog>`,
styles: html`<style>
.el-dialog__body {
height: calc(100% - 120px);
}
</style>`,
setup() {
const route = useRoute();
const businessType = route.meta.businessType;
const dialogVisable = ref(false);
const loading = ref(false);
const nameList = {
JisBBAC: "JisBBAC结算与发运数据对比",
JisHBPO: "JisHBPO结算与发运数据对比",
ZhiGongJianBBAC: "直供件BBAC结算与发运数据对比",
ZhiGongJianHBPO: "直供件HBPO结算与发运数据对比",
MaiDanJianBBAC: "买单件BBAC结算与发运数据对比",
MaiDanJianHBPO: "买单件HBPO结算与发运数据对比",
BeiJian: "备件结算与发运数据对比",
YinDuJian: "印度件结算与发运数据对比",
};
let config = null;
let name = null;
if (businessType === "JisBBAC") {
config = useConfig("edi-se-compare/bbacedi-se-compare");
} else if (businessType === "JisHBPO") {
config = useConfig("edi-se-compare/hbpoedi-se-compare");
} else {
config = useConfig("pub_sa_detail_service/pub-sa-se-compare");
name = nameList[businessType];
}
config.query.schema.properties.businessType.default = businessType;
config.query.schema.properties.name.default = name;
const schema = config.compare.schema;
const defaultModel = schemaToModel(schema);
const model = ref(null);
const formRef = ref(null);
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
if (item.path === "compare") {
model.value = Object.assign({}, defaultModel);
dialogVisable.value = true;
}
};
const submit = async () => {
try {
const valid = await formRef.value.validate();
if (valid) {
loading.value = true;
}
const url = config.edit.compareUrl;
const data = Object.assign({}, model.value);
data.seStartDateTime = data.seDateTime[0];
data.seEndDateTime = data.seDateTime[1];
data.downLineStartDateTime = data.downLineDateTime[0];
data.downLineEndDateTime = data.downLineDateTime[1];
delete data["seDateTime"];
delete data["downLineDateTime"];
const result = await request(url, data, { method: "POST" }, true);
if (!result.errors) {
dialogVisable.value = false;
}
} catch (error) {
console.log(error);
} finally {
loading.value = false;
}
};
//
const appListRef = ref(null);
const event = "SaSeCompare";
onMounted(() => PubSub.subscribe(event, async () => await appListRef.value.load()));
onUnmounted(() => PubSub.unsubscribe(event));
return { config, onCommand, appListRef, dialogVisable, loading, schema, model, formRef, submit };
},
};

23
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/edi.js

@ -0,0 +1,23 @@
import AppList from "../../components/list/index.js";
import html from "html";
import { useRoute } from "vue-router";
import useConfig from "../../models/input/edi.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
let config = null;
const route = useRoute();
const businessType = route.meta.businessType;
if (businessType === "JisBBAC") {
config = useConfig("bbac_se_edi_service");
} else if (businessType === "JisHBPO") {
config = useConfig("hbpo_se_edi_service");
}
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

31
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/fa-yun.js

@ -0,0 +1,31 @@
import AppList from "../../components/list/index.js";
import html from "html";
import { useRoute } from "vue-router";
import useConfig from "../../models/input/fa-yun.js";
import request from "../../request/index.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
let config = null;
const route = useRoute();
const businessType = route.meta.businessType;
if (businessType === "JisBBAC") {
config = useConfig("bbac_se_detail_service", "bbacse-sync/invoke");
} else if (businessType === "JisHBPO") {
config = useConfig("hbpo_se_detail_service", "hbpose-sync/invoke");
} else {
config = useConfig("pub_se_detail_service", "hand-se-sync/sync");
}
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
if (item.path === "sync") {
const url = config.edit.syncUrl;
const method = config.edit.syncMethod;
await request(url, route.meta.businessType, { method });
}
};
return { config, onCommand };
},
};

8
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/jie-suan.js

@ -1,4 +1,4 @@
import AppList from "../../../components/list/index.js";
import AppList from "../../components/list/index.js";
import html from "html";
import { useRoute } from "vue-router";
import useConfig from "../../models/input/jie-suan.js";
@ -15,12 +15,8 @@ export default {
} else if (businessType === "JisHBPO") {
config = useConfig("hbpo_sa_service", "hbpo_sa_detail_service");
} else {
config = useConfig();
config = useConfig("pub_sa_service", "pub_sa_detail_service");
}
config.query.url = "settleaccount/bbac_sa_service/get-list";
config.edit.importUrl = "settleaccount/bbac_sa_service/import";
config.edit.exportUrl = "settleaccount/bbac_sa_detail_service/export";
config.edit.deleteUrl = "settleaccount/bbac_sa_service/delete-list";
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};

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

@ -155,7 +155,6 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase<PUB_SA>
[HttpPost]
public async Task<PagedResultDto<PUB_SA_DTO>> GetListAsync(PUB_SARequestDto input)
{
input.Filters.Add(new FilterCondition("BusinessType", input.BusinessType.ToString(), EnumFilterAction.Equal, EnumFilterLogic.And));
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);
var totalCount = await _repository.GetCountByFilterAsync(input.Filters);
var dtos = ObjectMapper.Map<List<PUB_SA>, List<PUB_SA_DTO>>(entities);

32
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BBACSeSyncAppService.cs

@ -8,8 +8,10 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ;
using Volo.Abp.Application.Services;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.EntityFrameworkCore;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
@ -36,17 +38,30 @@ public class BBACSeSyncAppService : ApplicationService, IInvocable, IJobService
/// </summary>
private readonly INormalEfCoreRepository<BBAC_SE_DETAIL, Guid> _bbacSeDetailRepository;
/// <summary>
/// 客户零件关系领域
/// </summary>
private readonly MaterialRelationshipManager _materialRelationshipManager;
/// <summary>
/// 客户零件关系集合
/// </summary>
private List<MaterialRelationship> _addMaterialRelationships;
/// <summary>
/// 构造
/// </summary>
public BBACSeSyncAppService(
WMSBJBMPTDbContext wmsBJBMPTContext,
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository,
INormalEfCoreRepository<BBAC_SE_DETAIL, Guid> bbacSeDetailRepository)
INormalEfCoreRepository<BBAC_SE_DETAIL, Guid> bbacSeDetailRepository,
MaterialRelationshipManager materialRelationshipManager)
{
_wmsBJBMPTContext = wmsBJBMPTContext;
_syncPositionFlagRepository = syncPositionFlagRepository;
_bbacSeDetailRepository = bbacSeDetailRepository;
_materialRelationshipManager = materialRelationshipManager;
_addMaterialRelationships = new List<MaterialRelationship>();
}
[ApiExplorerSettings(IgnoreApi = true)]
@ -60,6 +75,11 @@ public class BBACSeSyncAppService : ApplicationService, IInvocable, IJobService
{
await SyncJitRecordAsync();
await SyncJisRecordAsync();
if (_addMaterialRelationships.Any())
{
_addMaterialRelationships = _addMaterialRelationships.GroupBy(t => new { t.ErpMaterialCode }).Select(t => t.First()).ToList();
await _materialRelationshipManager.AddNewMaterialRelationships(_addMaterialRelationships).ConfigureAwait(false);
}
}
/// <summary>
@ -73,7 +93,7 @@ public class BBACSeSyncAppService : ApplicationService, IInvocable, IJobService
var EnumDeliverSubBillTypes = GetDeliverSubBillTypes();
Expression<Func<TM_BJBMPT_JIT_RECORD, bool>> predicate = (t) => t.DeliverBillType == EnumDeliverBjBmpBillType.JIS件 && EnumDeliverSubBillTypes.Contains(t.DeliverSubBillType);
var syncPositionFlag = await _syncPositionFlagRepository.FindAsync(t => t.TableName == syncTableName);
var syncPositionFlag = await _syncPositionFlagRepository.FindAsync(t => t.TableName == syncTableName).ConfigureAwait(false);
if (syncPositionFlag != null)
{
predicate = (t) => t.UID > int.Parse(syncPositionFlag.Position) && t.DeliverBillType == EnumDeliverBjBmpBillType.JIS件 && EnumDeliverSubBillTypes.Contains(t.DeliverSubBillType);
@ -85,6 +105,10 @@ public class BBACSeSyncAppService : ApplicationService, IInvocable, IJobService
var bbacSeDetails = ObjectMapper.Map<List<TM_BJBMPT_JIT_RECORD>, List<BBAC_SE_DETAIL>>(wmsSeRecords);
if (bbacSeDetails.Any())
{
//客户零件号和厂内零件号
var materialRelationships = bbacSeDetails.GroupBy(t => new { t.LU, t.PartCode }).Select(t => new MaterialRelationship(GuidGenerator.Create(), t.Key.LU, "", t.Key.PartCode, ""));
_addMaterialRelationships.AddRange(materialRelationships);
bbacSeDetails.ForEach(bbacSeDetail =>
{
bbacSeDetail.KeyCode = bbacSeDetail.PN + bbacSeDetail.LU;
@ -131,6 +155,10 @@ public class BBACSeSyncAppService : ApplicationService, IInvocable, IJobService
var bbacSeDetails = ObjectMapper.Map<List<TM_BJBMPT_JIS_RECORD>, List<BBAC_SE_DETAIL>>(wmsRecords);
if (bbacSeDetails.Any())
{
//客户零件号和厂内零件号
var materialRelationships = bbacSeDetails.GroupBy(t => new { t.LU, t.PartCode }).Select(t => new MaterialRelationship(GuidGenerator.Create(), t.Key.LU, "", t.Key.PartCode, ""));
_addMaterialRelationships.AddRange(materialRelationships);
bbacSeDetails.ForEach(bbacSeDetail => bbacSeDetail.KeyCode = bbacSeDetail.PN + bbacSeDetail.LU);
await _bbacSeDetailRepository.InsertManyAsync(bbacSeDetails);

5
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BeiSeSyncAppService.cs

@ -4,8 +4,10 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.EntityFrameworkCore;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
@ -24,8 +26,9 @@ public class BeiSeSyncAppService : JitSeSyncAppService, IJobService
WMSBJBMPTDbContext wmsBJBMPTContext,
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository,
INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository,
MaterialRelationshipManager materialRelationshipManager,
VmiAppService vmiService
) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, vmiService)
) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, materialRelationshipManager, vmiService)
{
base.SeSyncConfigInfo = new SeSyncConfig()
{

29
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/HBPOSeSyncAppService.cs

@ -9,8 +9,10 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ;
using Volo.Abp.Application.Services;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.EntityFrameworkCore;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
@ -42,6 +44,16 @@ public class HBPOSeSyncAppService : ApplicationService, IInvocable, IJobService
/// </summary>
private readonly INormalEfCoreRepository<PUB_SE_DETAIL, Guid> _pubSeDetailRepository;
/// <summary>
/// 客户零件关系领域
/// </summary>
private readonly MaterialRelationshipManager _materialRelationshipManager;
/// <summary>
/// 客户零件关系集合
/// </summary>
private List<MaterialRelationship> _addMaterialRelationships;
/// <summary>
/// 构造
/// </summary>
@ -49,12 +61,15 @@ public class HBPOSeSyncAppService : ApplicationService, IInvocable, IJobService
WMSBJBMPTDbContext wmsBJBMPTContext,
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository,
INormalEfCoreRepository<HBPO_SE_DETAIL, Guid> hbpoSeDetailRepository,
INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository)
INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository,
MaterialRelationshipManager materialRelationshipManager)
{
_wmsBJBMPTContext = wmsBJBMPTContext;
_syncPositionFlagRepository = syncPositionFlagRepository;
_hbpoSeDetailRepository = hbpoSeDetailRepository;
_pubSeDetailRepository = pubSeDetailRepository;
_materialRelationshipManager = materialRelationshipManager;
_addMaterialRelationships = new List<MaterialRelationship>();
}
[ApiExplorerSettings(IgnoreApi = true)]
@ -71,6 +86,11 @@ public class HBPOSeSyncAppService : ApplicationService, IInvocable, IJobService
{
await SyncJitRecordAsync().ConfigureAwait(false);
await SyncJisRecordAsync().ConfigureAwait(false);
if (_addMaterialRelationships.Any())
{
_addMaterialRelationships = _addMaterialRelationships.GroupBy(t => new { t.ErpMaterialCode }).Select(t => t.First()).ToList();
await _materialRelationshipManager.AddNewMaterialRelationships(_addMaterialRelationships).ConfigureAwait(false);
}
}
/// <summary>
@ -186,6 +206,13 @@ public class HBPOSeSyncAppService : ApplicationService, IInvocable, IJobService
/// </summary>
private async Task SaveSeDataAsync(List<HBPO_SE_DETAIL> hbpoSeDetails, List<PUB_SE_DETAIL> maiDanHBPOSeDetails)
{
//客户零件号和厂内零件号
var hbpoSeLuRePartCodes = hbpoSeDetails.Select(t => new { t.LU, t.PartCode });
var maiDanHBPOSeLuRePartCodes = maiDanHBPOSeDetails.Select(t => new { t.LU, t.PartCode });
var luRePartCodes = hbpoSeLuRePartCodes.Union(maiDanHBPOSeLuRePartCodes);
var materialRelationships = luRePartCodes.GroupBy(t => new { t.LU, t.PartCode }).Select(t => new MaterialRelationship(GuidGenerator.Create(), t.Key.LU, "", t.Key.PartCode, ""));
_addMaterialRelationships.AddRange(materialRelationships);
hbpoSeDetails.ForEach(hbpoSeDetail => hbpoSeDetail.KeyCode = hbpoSeDetail.PN + hbpoSeDetail.LU);
maiDanHBPOSeDetails.ForEach(maiDanHBPOSeDetail =>
{

46
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs

@ -3,7 +3,9 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Coravel.Invocable;
using LinqToDB;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using SettleAccount.Domain.BQ;
using Volo.Abp.Application.Services;
@ -16,6 +18,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
[ApiExplorerSettings(IgnoreApi = true)]
public class JisBBACSeEdiCompareAppService : ApplicationService, IInvocable
{
private readonly object _lockObj = new object();
private readonly IServiceProvider _serviceProvider;
public JisBBACSeEdiCompareAppService(IServiceProvider serviceProvider)
@ -27,22 +30,40 @@ public class JisBBACSeEdiCompareAppService : ApplicationService, IInvocable
/// 执行
/// </summary>
public async Task Invoke()
{
try
{
using var serviceScope = _serviceProvider.CreateScope();
var db = serviceScope.ServiceProvider.GetRequiredService<SettleAccountDbContext>();
await HandDelEdiDataAsync().ConfigureAwait(false);
lock (_lockObj)
{
var seDetailGroup = db.Set<BBAC_SE_DETAIL>().Where(t => t.IsHaveEdiData == false).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU });
var ediDetailGroup = db.Set<BBAC_SE_EDI>().Where(t => t.IsDeleted == false && t.IsHaveSeData == false).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU });
var keyCodes = seDetailGroup.Join(ediDetailGroup, a => new { a.PN, a.LU }, b => new { b.PN, b.LU }, (se, edi) => new { se.PN, se.LU });
var seDetails = db.Set<BBAC_SE_DETAIL>().Where(t => keyCodes.Contains(new { t.PN, t.LU }));
var ediDetails = db.Set<BBAC_SE_EDI>().Where(t => keyCodes.Contains(new { t.PN, t.LU }));
if (keyCodes.Any())
{
var seDetails = db.Set<BBAC_SE_DETAIL>().Join(keyCodes, a => new { a.PN, a.LU }, b => new { b.PN, b.LU }, (a, b) => a);
var ediDetails = db.Set<BBAC_SE_EDI>().Join(keyCodes, a => new { a.PN, a.LU }, b => new { b.PN, b.LU }, (a, b) => a);
if (seDetails.Any())
{
seDetails.ForEach(t => t.IsHaveEdiData = true);
ediDetails.ForEach(t => t.IsHaveSeData = true);
db.Set<BBAC_SE_DETAIL>().UpdateRange(seDetails);
}
if (ediDetails.Any())
{
ediDetails.ForEach(t => t.IsHaveSeData = true);
db.Set<BBAC_SE_EDI>().UpdateRange(ediDetails);
await db.SaveChangesAsync().ConfigureAwait(false);
}
db.SaveChanges();
}
}
}
catch (Exception)
{
throw;
}
}
/// <summary>
@ -61,12 +82,21 @@ public class JisBBACSeEdiCompareAppService : ApplicationService, IInvocable
//Edi 删除的数据(有发运数据)
var ediDelKeyCodes = db.Set<BBAC_SE_EDI>().Where(t => t.IsDeleted == true && t.IsHaveSeData == true).Select(t => new { t.PN, t.LU }).Distinct();
var seDetails = db.Set<BBAC_SE_DETAIL>().Where(t => ediDelKeyCodes.Contains(new { t.PN, t.LU }));
var ediDetails = db.Set<BBAC_SE_EDI>().Where(t => ediDelKeyCodes.Contains(new { t.PN, t.LU }));
if (ediDelKeyCodes.Any())
{
var seDetails = db.Set<BBAC_SE_DETAIL>().Join(ediDelKeyCodes, a => new { a.PN, a.LU }, b => new { b.PN, b.LU }, (a, b) => a);
var ediDetails = db.Set<BBAC_SE_EDI>().Join(ediDelKeyCodes, a => new { a.PN, a.LU }, b => new { b.PN, b.LU }, (a, b) => a);
if (seDetails.Any())
{
seDetails.ForEach(t => t.IsHaveEdiData = false);
ediDetails.ForEach(t => t.IsHaveSeData = false);
db.Set<BBAC_SE_DETAIL>().UpdateRange(seDetails);
}
if (ediDetails.Any())
{
ediDetails.ForEach(t => t.IsHaveSeData = false);
db.Set<BBAC_SE_EDI>().UpdateRange(ediDetails);
}
await db.SaveChangesAsync().ConfigureAwait(false);
}
}
}

73
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeEdiCompareAppService.cs

@ -20,6 +20,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
[ApiExplorerSettings(IgnoreApi = true)]
public class JisHBPOSeEdiCompareAppService : ApplicationService, IInvocable
{
private readonly object _lockObj = new object();
private readonly IServiceProvider _serviceProvider;
/// <summary>
@ -46,48 +47,39 @@ public class JisHBPOSeEdiCompareAppService : ApplicationService, IInvocable
/// </summary>
public async Task Invoke()
{
Debug.WriteLine($"执行了:{this.GetType()}");
try
{
using var serviceScope = _serviceProvider.CreateScope();
var db = serviceScope.ServiceProvider.GetRequiredService<SettleAccountDbContext>();
await HandDelEdiDataAsync().ConfigureAwait(false);
var seDetailGroup = from se in db.Set<HBPO_SE_DETAIL>()
where se.IsHaveEdiData == false
group se by new { se.PN, se.LU }
into a
select new { a.Key.PN, a.Key.LU };
var ediDetailGroup = from edi in db.Set<HBPO_SE_EDI>()
where edi.IsDeleted == false && edi.IsHaveSeData == false
group edi by new { edi.PN, edi.LU }
into a
select new { a.Key.PN, a.Key.LU };
var keyCodes = from se in seDetailGroup
join edi in ediDetailGroup on new
lock (_lockObj)
{
se.PN,
se.LU
} equals new
var seDetailGroup = db.Set<HBPO_SE_DETAIL>().Where(t => t.IsHaveEdiData == false).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU });
var ediDetailGroup = db.Set<HBPO_SE_EDI>().Where(t => t.IsDeleted == false && t.IsHaveSeData == false).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU });
var keyCodes = seDetailGroup.Join(ediDetailGroup, a => new { a.PN, a.LU }, b => new { b.PN, b.LU }, (se, edi) => new { se.PN, se.LU });
if (keyCodes.Any())
{
var seDetails = db.Set<HBPO_SE_DETAIL>().Join(keyCodes, a => new { a.PN, a.LU }, b => new { b.PN, b.LU }, (a, b) => a);
var ediDetails = db.Set<HBPO_SE_EDI>().Join(keyCodes, a => new { a.PN, a.LU }, b => new { b.PN, b.LU }, (a, b) => a);
if (seDetails.Any())
{
edi.PN,
edi.LU
}
select new { se.PN, se.LU };
//var seDetailGroup2 = db.Set<HBPO_SE_DETAIL>().Where(t => t.IsHaveEdiData == false).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU });
//var ediDetailGroup2 = db.Set<HBPO_SE_EDI>().Where(t => t.IsHaveSeData == false).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU });
//var keyCodes2 = seDetailGroup2.Join(ediDetailGroup2, a => new { a.PN, a.LU }, b => new { b.PN, b.LU }, (se, edi) => new { se.PN, se.LU });
var seDetails = db.Set<HBPO_SE_DETAIL>().Where(t => keyCodes.Contains(new { t.PN, t.LU }));
var ediDetails = db.Set<HBPO_SE_EDI>().Where(t => keyCodes.Contains(new { t.PN, t.LU }));
seDetails.ForEach(t => t.IsHaveEdiData = true);
ediDetails.ForEach(t => t.IsHaveSeData = true);
db.Set<HBPO_SE_DETAIL>().UpdateRange(seDetails);
}
if (ediDetails.Any())
{
ediDetails.ForEach(t => t.IsHaveSeData = true);
db.Set<HBPO_SE_EDI>().UpdateRange(ediDetails);
await db.SaveChangesAsync().ConfigureAwait(false);
Debug.WriteLine($"处理数量:{keyCodes.Count()}");
}
db.SaveChanges();
}
}
}
catch (Exception)
{
throw;
}
}
/// <summary>
@ -100,12 +92,21 @@ public class JisHBPOSeEdiCompareAppService : ApplicationService, IInvocable
//Edi 删除的数据(有发运数据)
var ediDelKeyCodes = db.Set<HBPO_SE_EDI>().Where(t => t.IsDeleted == true && t.IsHaveSeData == true).Select(t => new { t.PN, t.LU }).Distinct();
var seDetails = db.Set<HBPO_SE_DETAIL>().Where(t => ediDelKeyCodes.Contains(new { t.PN, t.LU }));
var ediDetails = db.Set<HBPO_SE_EDI>().Where(t => ediDelKeyCodes.Contains(new { t.PN, t.LU }));
if (ediDelKeyCodes.Any())
{
var seDetails = db.Set<HBPO_SE_DETAIL>().Join(ediDelKeyCodes, a => new { a.PN, a.LU }, b => new { b.PN, b.LU }, (a, b) => a);
var ediDetails = db.Set<HBPO_SE_EDI>().Join(ediDelKeyCodes, a => new { a.PN, a.LU }, b => new { b.PN, b.LU }, (a, b) => a);
if (seDetails.Any())
{
seDetails.ForEach(t => t.IsHaveEdiData = false);
ediDetails.ForEach(t => t.IsHaveSeData = false);
db.Set<HBPO_SE_DETAIL>().UpdateRange(seDetails);
}
if (ediDetails.Any())
{
ediDetails.ForEach(t => t.IsHaveSeData = false);
db.Set<HBPO_SE_EDI>().UpdateRange(ediDetails);
}
await db.SaveChangesAsync().ConfigureAwait(false);
}
}
}

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

@ -7,9 +7,11 @@ using Coravel.Invocable;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ;
using Volo.Abp.Application.Services;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.EntityFrameworkCore;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.CurrentBranch;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
@ -36,9 +38,9 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
private readonly INormalEfCoreRepository<PUB_SE_DETAIL, Guid> _pubSeDetailRepository;
/// <summary>
/// 客户零件关系仓储
/// 客户零件关系领域
/// </summary>
private readonly INormalEfCoreRepository<MaterialRelationship, Guid> _materialRelationshipRepository;
private readonly MaterialRelationshipManager _materialRelationshipManager;
private readonly IVmiService _vmiService;
@ -49,11 +51,13 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
WMSBJBMPTDbContext wmsBJBMPTContext,
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository,
INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository,
MaterialRelationshipManager materialRelationshipManager,
VmiAppService vmiService)
{
_wmsBJBMPTContext = wmsBJBMPTContext;
_syncPositionFlagRepository = syncPositionFlagRepository;
_pubSeDetailRepository = pubSeDetailRepository;
_materialRelationshipManager = materialRelationshipManager;
_vmiService = vmiService;
}
@ -88,20 +92,15 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
var wmsSeRecords = _wmsBJBMPTContext.TM_BJBMPT_OTHER_RECORD.Where(predicate).OrderBy(b => b.UID).ToList();
var pubSeDetails = ObjectMapper.Map<List<TM_BJBMPT_OTHER_RECORD>, List<PUB_SE_DETAIL>>(wmsSeRecords);
pubSeDetails.RemoveAll(t => !string.IsNullOrEmpty(t.LU) || !string.IsNullOrEmpty(t.PartCode));
pubSeDetails.RemoveAll(t => string.IsNullOrEmpty(t.LU) || string.IsNullOrEmpty(t.PartCode));
if (pubSeDetails.Any())
{
//客户零件号和厂内零件号
var luRePartCodes = pubSeDetails.Select(t => new { t.LU, t.PartCode });
var haveLuRePartCodes = (await _materialRelationshipRepository.GetListAsync(t => luRePartCodes.Contains(new { LU = t.ErpMaterialCode, PartCode = t.SettleMaterialCode })).ConfigureAwait(false)).Select(t => new { LU = t.ErpMaterialCode, PartCode = t.SettleMaterialCode });
var noHaveLuRePartCodes = luRePartCodes.Except(haveLuRePartCodes);
if (noHaveLuRePartCodes.Any())
var luRePartCodes = pubSeDetails.Select(t => new { t.LU, t.PartCode }).Distinct().ToList();
if (luRePartCodes.Any())
{
var materialRelationships = noHaveLuRePartCodes.Select(t => new MaterialRelationship(GuidGenerator.Create(), t.LU, "", t.PartCode, ""));
await _materialRelationshipRepository.InsertManyAsync(materialRelationships).ConfigureAwait(false);
var materialRelationships = luRePartCodes.Select(t => new MaterialRelationship(GuidGenerator.Create(), t.LU, "", t.PartCode, businessType.ToString()));
await _materialRelationshipManager.AddNewMaterialRelationships(materialRelationships).ConfigureAwait(false);
}
pubSeDetails.ForEach(t =>

5
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/YinDuSeSyncAppService.cs

@ -4,8 +4,10 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.EntityFrameworkCore;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
@ -24,8 +26,9 @@ public class YinDuSeSyncAppService : JitSeSyncAppService, IJobService
WMSBJBMPTDbContext wmsBJBMPTContext,
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository,
INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository,
MaterialRelationshipManager materialRelationshipManager,
VmiAppService vmiService
) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, vmiService)
) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, materialRelationshipManager, vmiService)
{
base.SeSyncConfigInfo = new SeSyncConfig()
{

5
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/ZhiGongBBACSeSyncAppService.cs

@ -4,8 +4,10 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.EntityFrameworkCore;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
@ -24,8 +26,9 @@ public class ZhiGongBBACSeSyncAppService : JitSeSyncAppService, IJobService
WMSBJBMPTDbContext wmsBJBMPTContext,
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository,
INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository,
MaterialRelationshipManager materialRelationshipManager,
VmiAppService vmiService
) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, vmiService)
) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, materialRelationshipManager, vmiService)
{
base.SeSyncConfigInfo = new SeSyncConfig()
{

5
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/ZhiGongHBPOSeSyncAppService.cs

@ -4,8 +4,10 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.EntityFrameworkCore;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
@ -24,8 +26,9 @@ public class ZhiGongHBPOSeSyncAppService : JitSeSyncAppService, IJobService
WMSBJBMPTDbContext wmsBJBMPTContext,
INormalEfCoreRepository<SyncPositionFlag, Guid> syncPositionFlagRepository,
INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository,
MaterialRelationshipManager materialRelationshipManager,
VmiAppService vmiService
) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, vmiService)
) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, materialRelationshipManager, vmiService)
{
base.SeSyncConfigInfo = new SeSyncConfig()
{

21
code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs

@ -1129,27 +1129,27 @@ namespace Win.Sfs.SettleAccount
private void CreateMapSeSync()
{
CreateMap<TM_BJBMPT_JIT_RECORD, BBAC_SE_DETAIL>()
.ForMember(x => x.SeqNumber, y => y.MapFrom(d => d.JISNum))
.ForMember(x => x.AssemblyCode, y => y.MapFrom(d => d.RealPartCode))
.ForMember(x => x.InjectionCode, y => y.MapFrom(d => d.DeliverCode))
.ForMember(x => x.BeginDate, y => y.MapFrom(d => d.BillTime))
.ForMember(x => x.SeqNumber, y => y.MapFrom(d => d.Seq))
.ForMember(x => x.AssemblyCode, y => y.MapFrom(d => d.MatchNumber))
.ForMember(x => x.InjectionCode, y => y.MapFrom(d => d.UniqueCode))
.ForMember(x => x.BeginDate, y => y.MapFrom(d => d.AssembleData))
.ForMember(x => x.ShippingDate, y => y.MapFrom(d => d.BillTime))
.ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum))
.ForMember(x => x.LU, y => y.MapFrom(d => d.PartCode))
.ForMember(x => x.PN, y => y.MapFrom(d => d.VinCode))
.ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
CreateMap<TM_BJBMPT_JIT_RECORD, HBPO_SE_DETAIL>()
.ForMember(x => x.SeqNumber, y => y.MapFrom(d => d.JISNum))
.ForMember(x => x.AssemblyCode, y => y.MapFrom(d => d.RealPartCode))
.ForMember(x => x.InjectionCode, y => y.MapFrom(d => d.DeliverCode))
.ForMember(x => x.BeginDate, y => y.MapFrom(d => d.BillTime))
.ForMember(x => x.SeqNumber, y => y.MapFrom(d => d.Seq))
.ForMember(x => x.AssemblyCode, y => y.MapFrom(d => d.MatchNumber))
.ForMember(x => x.InjectionCode, y => y.MapFrom(d => d.UniqueCode))
.ForMember(x => x.BeginDate, y => y.MapFrom(d => d.AssembleData))
.ForMember(x => x.ShippingDate, y => y.MapFrom(d => d.BillTime))
.ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum))
.ForMember(x => x.LU, y => y.MapFrom(d => d.PartCode))
.ForMember(x => x.PN, y => y.MapFrom(d => d.VinCode))
.ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
CreateMap<TM_BJBMPT_JIT_RECORD, PUB_SE_DETAIL>()
.ForMember(x => x.BeginDate, y => y.MapFrom(d => d.BillTime))
.ForMember(x => x.BeginDate, y => y.MapFrom(d => d.AssembleData))
.ForMember(x => x.ShippingDate, y => y.MapFrom(d => d.BillTime))
.ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum))
.ForMember(x => x.LU, y => y.MapFrom(d => d.PartCode))
@ -1188,7 +1188,8 @@ namespace Win.Sfs.SettleAccount
.ForMember(x => x.BeginDate, y => y.MapFrom(d => d.AssembleData))
.ForMember(x => x.ShippingDate, y => y.MapFrom(d => d.BillTime))
.ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum))
.ForMember(x => x.LU, y => y.MapFrom(d => d.CustPartCode))
//.ForMember(x => x.LU, y => y.MapFrom(d => d.CustPartCode))
.ForMember(x => x.LU, y => y.MapFrom(d => d.PartCode))
.ForMember(x => x.PN, y => y.MapFrom(d => d.BillNum))
.ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
}

199
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_DETAIL.cs

@ -1,7 +1,9 @@
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using SettleAccount.Bases;
using Win.Sfs.SettleAccount;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
namespace SettleAccount.Domain.BQ;
@ -46,157 +48,196 @@ public class BBAC_SE_DETAIL:SE_BASE
//[Display(Name = "Wms发货单号")]
//public string WmsBillNum { get; set; } = null!;
/// <summary>
/// 单据编
/// JIT订单号
/// </summary>
[Display(Name = "单据编号")]
public string Num { get; set; }
[Display(Name = "JIT订单号")]
[DisplayName("JIT订单号")]
public string JISNum { get; set; }
/// <summary>
/// 发货时间
/// JIT排序生产码
/// </summary>
[Display(Name = "发货时间")]
public DateTime BillTime { get; set; }
[Display(Name = "JIT排序生产码")]
public string VinCode { get; set; }
/// <summary>
/// 发货人
/// JIT排序生产码类型
/// </summary>
[Display(Name = "发货人")]
public string Oper { get; set; }
[Display(Name = "JIT排序生产码类型")]
public string CodeType { get; set; }
/// <summary>
/// 排序单
/// 订单零件
/// </summary>
[Display(Name = "排序单号")]
public string OrderNum { get; set; }
[Display(Name = "订单零件号")]
public string PartCode { get; set; }
/// <summary>
/// 订单零件号
/// </summary>
[Display(Name = "订单零件号")]
public string RealPartCode { get; set; }
/// <summary>
/// 批次
/// </summary>
[Display(Name = "批次")]
public string Batch { get; set; }
/// <summary>
/// 客户零件号
/// </summary>
[Display(Name = "客户零件号")]
public string CustPartCode { get; set; }
/// <summary>
/// 订单序号
/// </summary>
[Display(Name = "订单序号")]
public string Seq { get; set; }
/// <summary>
/// 实际生产码
/// 订单时间
/// </summary>
[Display(Name = "实际生产码")]
public string RealCode { get; set; }
[Display(Name = "订单时间")]
public DateTime AssembleData { get; set; }
/// <summary>
/// 订单生产码
/// 发货条
/// </summary>
[Display(Name = "订单生产码")]
public string VinCode { get; set; }
[Display(Name = "发货条码")]
public string DeliverCode { get; set; }
/// <summary>
/// 生产码类型
/// 发货单号
/// </summary>
[Display(Name = "生产码类型")]
public string CodeType { get; set; }
[Display(Name = "发货单号")]
public string BillNum { get; set; }
/// <summary>
/// 实际零件号
/// 发货时间
/// </summary>
[Display(Name = "实际零件号")]
public string RealPartCode { get; set; }
[Display(Name = "发货时间")]
public DateTime? BillTime { get; set; }
/// <summary>
/// 零件号
/// 发货人
/// </summary>
[Display(Name = "零件号")]
public string PartCode { get; set; }
[Display(Name = "发货人")]
public string Oper { get; set; }
/// <summary>
/// 批次
/// 客户位置
/// </summary>
[Display(Name = "批次")]
public string Batch { get; set; }
[Display(Name = "客户位置")]
public string Position { get; set; }
/// <summary>
/// 工厂
/// </summary>
[Display(Name = "工厂")]
public string Factory { get; set; }
/// <summary>
/// MES配置码
/// </summary>
[Display(Name = "MES配置码")]
public string MESConfigCode { get; set; }
/// <summary>
/// 来源库位
/// </summary>
[Display(Name = "来源库位")]
public string FromLoc { get; set; }
/// <summary>
/// 目标库位
/// </summary>
[Display(Name = "目标库位")]
public string ToLoc { get; set; }
/// <summary>
/// 参照订单生产码
/// 单据类型
/// </summary>
[Display(Name = "参照订单生产码")]
public string RefVinCode { get; set; }
public EnumBillType BillType { get; set; }
/// <summary>
/// 单据性质
/// 子单据类型
/// </summary>
[Display(Name = "单据性质")]
public string BillCharacter { get; set; }
[Display(Name = "子单据类型")]
public EnumSubBillType SubBillType { get; set; }
/// <summary>
/// 发货关联单号
/// 事务类型
/// </summary>
[Display(Name = "发货关联单号")]
public string RefBillNum { get; set; }
[Display(Name = "事务类型")]
public EnumDelTransType TransType { get; set; }
/// <summary>
/// Erp目标库位
/// 发运主类型
/// </summary>
[Display(Name = "Erp目标库位")]
public string ErpToLoc { get; set; }
[Display(Name = "发运主类型")]
public EnumDeliverBjBmpBillType DeliverBillType { get; set; }
/// <summary>
/// 发运子类型
/// </summary>
[Display(Name = "发运子类型")]
public EnumDeliverSubBillType DeliverSubBillType { get; set; }
/// <summary>
/// 单据性质
/// </summary>
[Display(Name = "单据性质")]
public string BillCharacter { get; set; }
/// <summary>
/// 原生产码
/// </summary>
[Display(Name = "原生产码")]
public string OrigiCode { get; set; }
/// <summary>
/// 描述
/// </summary>
[Display(Name = "描述")]
public string PartDesc { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "备注")]
public string Remark { get; set; }
/// <summary>
/// 业务类型
/// </summary>
[Display(Name = "业务类型")]
public EnumProTpe ProType { get; set; }
/// <summary>
/// JIS排序单号
/// </summary>
[Display(Name = "JIS排序单号")]
public string OrderNum { get; set; }
/// <summary>
/// JIS实际生产码
/// </summary>
[Display(Name = "JIS实际生产码")]
public string RealCode { get; set; }
/// <summary>
/// 来源库位
/// </summary>
[Display(Name = "来源库位")]
public string FromLoc { get; set; }
/// <summary>
/// 参照订单生产码
/// </summary>
[Display(Name = "参照订单生产码")]
public string RefVinCode { get; set; }
/// <summary>
/// 发货关联单号
/// </summary>
[Display(Name = "发货关联单号")]
public string RefBillNum { get; set; }
/// <summary>
/// Erp目标库位
/// </summary>
[Display(Name = "Erp目标库位")]
public string ErpToLoc { get; set; }
/// <summary>
/// 塑件唯一码
/// </summary>
[Display(Name = "塑件唯一码")]
public string UniqueCode { get; set; }
/// <summary>
/// PJS顺序号
/// </summary>
[Display(Name = "PJS顺序号")]
public string PjsNum { get; set; }
/// <summary>
/// 虚拟小总成
/// </summary>
[Display(Name = "虚拟小总成")]
public string MatchNumber { get; set; }
/// <summary>
/// 发货条码
/// 状态
/// </summary>
[Display(Name = "发货条码")]
public string DeliverCode { get; set; }
[Display(Name = "状态")]
public EnumBillState State { get; set; }
/// <summary>
/// 客户位置
/// 创建时间
/// </summary>
[Display(Name = "客户位置")]
public string Position { get; set; }
[Display(Name = "创建时间")]
public DateTime CreateTime { get; set; }
/// <summary>
/// 是否有EDI数据
/// </summary>

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

@ -2,8 +2,8 @@ using SettleAccount.Bases;
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Win.Sfs.SettleAccount;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
namespace SettleAccount.Domain.BQ;
@ -42,157 +42,196 @@ public class HBPO_SE_DETAIL :SE_BASE
//[Display(Name = "Wms发货单号")]
//public string WmsBillNum { get; set; } = null!;
/// <summary>
/// 单据编
/// JIT订单号
/// </summary>
[Display(Name = "单据编号")]
public string Num { get; set; }
[Display(Name = "JIT订单号")]
[DisplayName("JIT订单号")]
public string JISNum { get; set; }
/// <summary>
/// 发货时间
/// JIT排序生产码
/// </summary>
[Display(Name = "发货时间")]
public DateTime BillTime { get; set; }
[Display(Name = "JIT排序生产码")]
public string VinCode { get; set; }
/// <summary>
/// 发货人
/// JIT排序生产码类型
/// </summary>
[Display(Name = "发货人")]
public string Oper { get; set; }
[Display(Name = "JIT排序生产码类型")]
public string CodeType { get; set; }
/// <summary>
/// 排序单
/// 订单零件
/// </summary>
[Display(Name = "排序单号")]
public string OrderNum { get; set; }
[Display(Name = "订单零件号")]
public string PartCode { get; set; }
/// <summary>
/// 订单零件号
/// </summary>
[Display(Name = "订单零件号")]
public string RealPartCode { get; set; }
/// <summary>
/// 批次
/// </summary>
[Display(Name = "批次")]
public string Batch { get; set; }
/// <summary>
/// 客户零件号
/// </summary>
[Display(Name = "客户零件号")]
public string CustPartCode { get; set; }
/// <summary>
/// 订单序号
/// </summary>
[Display(Name = "订单序号")]
public string Seq { get; set; }
/// <summary>
/// 实际生产码
/// 订单时间
/// </summary>
[Display(Name = "实际生产码")]
public string RealCode { get; set; }
[Display(Name = "订单时间")]
public DateTime AssembleData { get; set; }
/// <summary>
/// 订单生产码
/// 发货条
/// </summary>
[Display(Name = "订单生产码")]
public string VinCode { get; set; }
[Display(Name = "发货条码")]
public string DeliverCode { get; set; }
/// <summary>
/// 生产码类型
/// 发货单号
/// </summary>
[Display(Name = "生产码类型")]
public string CodeType { get; set; }
[Display(Name = "发货单号")]
public string BillNum { get; set; }
/// <summary>
/// 实际零件号
/// 发货时间
/// </summary>
[Display(Name = "实际零件号")]
public string RealPartCode { get; set; }
[Display(Name = "发货时间")]
public DateTime? BillTime { get; set; }
/// <summary>
/// 零件号
/// 发货人
/// </summary>
[Display(Name = "零件号")]
public string PartCode { get; set; }
[Display(Name = "发货人")]
public string Oper { get; set; }
/// <summary>
/// 批次
/// 客户位置
/// </summary>
[Display(Name = "批次")]
public string Batch { get; set; }
[Display(Name = "客户位置")]
public string Position { get; set; }
/// <summary>
/// 工厂
/// </summary>
[Display(Name = "工厂")]
public string Factory { get; set; }
/// <summary>
/// MES配置码
/// </summary>
[Display(Name = "MES配置码")]
public string MESConfigCode { get; set; }
/// <summary>
/// 来源库位
/// </summary>
[Display(Name = "来源库位")]
public string FromLoc { get; set; }
/// <summary>
/// 目标库位
/// </summary>
[Display(Name = "目标库位")]
public string ToLoc { get; set; }
/// <summary>
/// 参照订单生产码
/// 单据类型
/// </summary>
[Display(Name = "参照订单生产码")]
public string RefVinCode { get; set; }
public EnumBillType BillType { get; set; }
/// <summary>
/// 单据性质
/// 子单据类型
/// </summary>
[Display(Name = "单据性质")]
public string BillCharacter { get; set; }
[Display(Name = "子单据类型")]
public EnumSubBillType SubBillType { get; set; }
/// <summary>
/// 发货关联单号
/// 事务类型
/// </summary>
[Display(Name = "发货关联单号")]
public string RefBillNum { get; set; }
[Display(Name = "事务类型")]
public EnumDelTransType TransType { get; set; }
/// <summary>
/// Erp目标库位
/// 发运主类型
/// </summary>
[Display(Name = "Erp目标库位")]
public string ErpToLoc { get; set; }
[Display(Name = "发运主类型")]
public EnumDeliverBjBmpBillType DeliverBillType { get; set; }
/// <summary>
/// 发运子类型
/// </summary>
[Display(Name = "发运子类型")]
public EnumDeliverSubBillType DeliverSubBillType { get; set; }
/// <summary>
/// 单据性质
/// </summary>
[Display(Name = "单据性质")]
public string BillCharacter { get; set; }
/// <summary>
/// 原生产码
/// </summary>
[Display(Name = "原生产码")]
public string OrigiCode { get; set; }
/// <summary>
/// 描述
/// </summary>
[Display(Name = "描述")]
public string PartDesc { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "备注")]
public string Remark { get; set; }
/// <summary>
/// 业务类型
/// </summary>
[Display(Name = "业务类型")]
public EnumProTpe ProType { get; set; }
/// <summary>
/// JIS排序单号
/// </summary>
[Display(Name = "JIS排序单号")]
public string OrderNum { get; set; }
/// <summary>
/// JIS实际生产码
/// </summary>
[Display(Name = "JIS实际生产码")]
public string RealCode { get; set; }
/// <summary>
/// 来源库位
/// </summary>
[Display(Name = "来源库位")]
public string FromLoc { get; set; }
/// <summary>
/// 参照订单生产码
/// </summary>
[Display(Name = "参照订单生产码")]
public string RefVinCode { get; set; }
/// <summary>
/// 发货关联单号
/// </summary>
[Display(Name = "发货关联单号")]
public string RefBillNum { get; set; }
/// <summary>
/// Erp目标库位
/// </summary>
[Display(Name = "Erp目标库位")]
public string ErpToLoc { get; set; }
/// <summary>
/// 塑件唯一码
/// </summary>
[Display(Name = "塑件唯一码")]
public string UniqueCode { get; set; }
/// <summary>
/// PJS顺序号
/// </summary>
[Display(Name = "PJS顺序号")]
public string PjsNum { get; set; }
/// <summary>
/// 虚拟小总成
/// </summary>
[Display(Name = "虚拟小总成")]
public string MatchNumber { get; set; }
/// <summary>
/// 发货条码
/// 状态
/// </summary>
[Display(Name = "发货条码")]
public string DeliverCode { get; set; }
[Display(Name = "状态")]
public EnumBillState State { get; set; }
/// <summary>
/// 客户位置
/// 创建时间
/// </summary>
[Display(Name = "客户位置")]
public string Position { get; set; }
[Display(Name = "创建时间")]
public DateTime CreateTime { get; set; }
/// <summary>
/// 是否有EDI数据
/// </summary>

43
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/MaterialRelationshipManager.cs

@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Domain.Services;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Managers;
/// <summary>
/// 客户零件关系
/// </summary>
public class MaterialRelationshipManager : DomainService
{
/// <summary>
/// 客户零件关系仓储
/// </summary>
private readonly INormalEfCoreRepository<MaterialRelationship, Guid> _materialRelationshipRepository;
public MaterialRelationshipManager(INormalEfCoreRepository<MaterialRelationship, Guid> materialRelationshipRepository)
{
_materialRelationshipRepository = materialRelationshipRepository;
}
/// <summary>
/// 添加零件关系
/// </summary>
public async Task AddNewMaterialRelationships(IEnumerable<MaterialRelationship> materialRelationships)
{
//客户零件号和厂内零件号
var luRePartCodes = materialRelationships.Select(t => new { t.ErpMaterialCode, t.SettleMaterialCode }).Distinct().ToList();
var haveLuRePartCodes = materialRelationships.Join(_materialRelationshipRepository.AsNoTracking(),
a => new { a.ErpMaterialCode, a.SettleMaterialCode },
b => new { b.ErpMaterialCode, b.SettleMaterialCode },
(a, b) => a).ToList();
var noHaveLuRePartCodes = materialRelationships.Except(haveLuRePartCodes).ToList();
if (noHaveLuRePartCodes.Any())
{
await _materialRelationshipRepository.InsertManyAsync(noHaveLuRePartCodes).ConfigureAwait(false);
}
}
}

10
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIS_RECORD.cs

@ -35,8 +35,8 @@ public class TM_BJBMPT_JIS_RECORD
[DisplayName("JIS生产码类型")]
public string CodeType { get; set; }
[DisplayName("状态")]
public EnumBillState State { get; set; }
//[DisplayName("状态")]
//public EnumBillState State { get; set; }
[DisplayName("订单零件号")]
public string RealPartCode { get; set; }
@ -51,7 +51,7 @@ public class TM_BJBMPT_JIS_RECORD
public string CustPartCode { get; set; }
[DisplayName("数量")]
public decimal Qty { get; set; }
public decimal? Qty { get; set; }
[DisplayName("发货单号")]
public string BillNum { get; set; }
@ -60,7 +60,7 @@ public class TM_BJBMPT_JIS_RECORD
public string MESConfigCode { get; set; }
[DisplayName("订单时间")]
public DateTime AssembleData { get; set; }
public DateTime? AssembleData { get; set; }
[DisplayName("来源库位")]
public string FromLoc { get; set; }
@ -120,5 +120,5 @@ public class TM_BJBMPT_JIS_RECORD
public string Position { get; set; }
[DisplayName("创建时间")]
public DateTime CreateTime { get; set; }
public DateTime? CreateTime { get; set; }
}

11
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIT_RECORD.cs

@ -39,7 +39,7 @@ public class TM_BJBMPT_JIT_RECORD
public string Seq { get; set; }
[DisplayName("订单时间")]
public DateTime AssembleData { get; set; }
public DateTime? AssembleData { get; set; }
[DisplayName("发货条码")]
public string DeliverCode { get; set; }
@ -89,9 +89,6 @@ public class TM_BJBMPT_JIT_RECORD
[DisplayName("原生产码")]
public string OrigiCode { get; set; }
[DisplayName("描述")]
public string PartDesc { get; set; }
[DisplayName("备注")]
public string Remark { get; set; }
@ -125,11 +122,11 @@ public class TM_BJBMPT_JIT_RECORD
[DisplayName("虚拟小总成")]
public string MatchNumber { get; set; }
[DisplayName("状态")]
public EnumBillState State { get; set; }
//[DisplayName("状态")]
//public EnumBillState State { get; set; }
[DisplayName("创建时间")]
public DateTime CreateTime { get; set; }
public DateTime? CreateTime { get; set; }
}
public enum EnumProTpe

5503
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230815054853_20230815-3.Designer.cs

File diff suppressed because it is too large

368
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230815054853_20230815-3.cs

@ -0,0 +1,368 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class _202308153 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("75ce4934-06de-4cac-a1f0-536935975b38"));
migrationBuilder.RenameColumn(
name: "Num",
table: "Set_HBPO_SE_DETAIL",
newName: "PartDesc");
migrationBuilder.RenameColumn(
name: "Num",
table: "Set_BBAC_SE_DETAIL",
newName: "PartDesc");
migrationBuilder.AlterColumn<DateTime>(
name: "BillTime",
table: "Set_HBPO_SE_DETAIL",
type: "datetime2",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "datetime2");
migrationBuilder.AddColumn<DateTime>(
name: "AssembleData",
table: "Set_HBPO_SE_DETAIL",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "BillNum",
table: "Set_HBPO_SE_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "BillType",
table: "Set_HBPO_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<DateTime>(
name: "CreateTime",
table: "Set_HBPO_SE_DETAIL",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "CustPartCode",
table: "Set_HBPO_SE_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "DeliverBillType",
table: "Set_HBPO_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "DeliverSubBillType",
table: "Set_HBPO_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<string>(
name: "Factory",
table: "Set_HBPO_SE_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "JISNum",
table: "Set_HBPO_SE_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "ProType",
table: "Set_HBPO_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "State",
table: "Set_HBPO_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "SubBillType",
table: "Set_HBPO_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "TransType",
table: "Set_HBPO_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AlterColumn<DateTime>(
name: "BillTime",
table: "Set_BBAC_SE_DETAIL",
type: "datetime2",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "datetime2");
migrationBuilder.AddColumn<DateTime>(
name: "AssembleData",
table: "Set_BBAC_SE_DETAIL",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "BillNum",
table: "Set_BBAC_SE_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "BillType",
table: "Set_BBAC_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<DateTime>(
name: "CreateTime",
table: "Set_BBAC_SE_DETAIL",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "CustPartCode",
table: "Set_BBAC_SE_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "DeliverBillType",
table: "Set_BBAC_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "DeliverSubBillType",
table: "Set_BBAC_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<string>(
name: "Factory",
table: "Set_BBAC_SE_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "JISNum",
table: "Set_BBAC_SE_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "ProType",
table: "Set_BBAC_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "State",
table: "Set_BBAC_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "SubBillType",
table: "Set_BBAC_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "TransType",
table: "Set_BBAC_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
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("c085a562-1da9-4dd3-8e65-85e4518f1383"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "4b83550d90bf425493e93dcd552a0bd1", 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("c085a562-1da9-4dd3-8e65-85e4518f1383"));
migrationBuilder.DropColumn(
name: "AssembleData",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "BillNum",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "BillType",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "CreateTime",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "CustPartCode",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "DeliverBillType",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "DeliverSubBillType",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "Factory",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "JISNum",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "ProType",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "State",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "SubBillType",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "TransType",
table: "Set_HBPO_SE_DETAIL");
migrationBuilder.DropColumn(
name: "AssembleData",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "BillNum",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "BillType",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "CreateTime",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "CustPartCode",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "DeliverBillType",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "DeliverSubBillType",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "Factory",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "JISNum",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "ProType",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "State",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "SubBillType",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.DropColumn(
name: "TransType",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.RenameColumn(
name: "PartDesc",
table: "Set_HBPO_SE_DETAIL",
newName: "Num");
migrationBuilder.RenameColumn(
name: "PartDesc",
table: "Set_BBAC_SE_DETAIL",
newName: "Num");
migrationBuilder.AlterColumn<DateTime>(
name: "BillTime",
table: "Set_HBPO_SE_DETAIL",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
oldClrType: typeof(DateTime),
oldType: "datetime2",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "BillTime",
table: "Set_BBAC_SE_DETAIL",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
oldClrType: typeof(DateTime),
oldType: "datetime2",
oldNullable: true);
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("75ce4934-06de-4cac-a1f0-536935975b38"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "8e865c8947ea4381b1b48c3ee4d572b4", 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 });
}
}
}

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

@ -611,6 +611,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("AssembleData")
.HasColumnType("datetime2");
b.Property<string>("AssemblyCode")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
@ -624,9 +627,15 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("BillCharacter")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("BillTime")
b.Property<string>("BillNum")
.HasColumnType("nvarchar(max)");
b.Property<DateTime?>("BillTime")
.HasColumnType("datetime2");
b.Property<int>("BillType")
.HasColumnType("int");
b.Property<int>("BusinessType")
.HasColumnType("int");
@ -639,6 +648,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("nvarchar(50)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime2");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
@ -647,6 +659,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<string>("CustPartCode")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
@ -655,9 +670,15 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<int>("DeliverBillType")
.HasColumnType("int");
b.Property<string>("DeliverCode")
.HasColumnType("nvarchar(max)");
b.Property<int>("DeliverSubBillType")
.HasColumnType("int");
b.Property<string>("ErpToLoc")
.HasColumnType("nvarchar(max)");
@ -665,6 +686,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<string>("Factory")
.HasColumnType("nvarchar(max)");
b.Property<string>("FromLoc")
.HasColumnType("nvarchar(max)");
@ -681,6 +705,9 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<bool>("IsHaveEdiData")
.HasColumnType("bit");
b.Property<string>("JISNum")
.HasColumnType("nvarchar(max)");
b.Property<string>("KeyCode")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
@ -703,9 +730,6 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("MatchNumber")
.HasColumnType("nvarchar(max)");
b.Property<string>("Num")
.HasColumnType("nvarchar(max)");
b.Property<string>("Oper")
.HasColumnType("nvarchar(max)");
@ -722,12 +746,18 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("PartCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("PartDesc")
.HasColumnType("nvarchar(max)");
b.Property<string>("PjsNum")
.HasColumnType("nvarchar(max)");
b.Property<string>("Position")
.HasColumnType("nvarchar(max)");
b.Property<int>("ProType")
.HasColumnType("int");
b.Property<decimal>("Qty")
.HasColumnType("decimal(18,2)");
@ -756,9 +786,18 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<DateTime>("ShippingDate")
.HasColumnType("datetime2");
b.Property<int>("State")
.HasColumnType("int");
b.Property<int>("SubBillType")
.HasColumnType("int");
b.Property<string>("ToLoc")
.HasColumnType("nvarchar(max)");
b.Property<int>("TransType")
.HasColumnType("int");
b.Property<string>("UniqueCode")
.HasColumnType("nvarchar(max)");
@ -1758,6 +1797,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("AssembleData")
.HasColumnType("datetime2");
b.Property<string>("AssemblyCode")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
@ -1771,9 +1813,15 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("BillCharacter")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("BillTime")
b.Property<string>("BillNum")
.HasColumnType("nvarchar(max)");
b.Property<DateTime?>("BillTime")
.HasColumnType("datetime2");
b.Property<int>("BillType")
.HasColumnType("int");
b.Property<string>("CodeType")
.HasColumnType("nvarchar(max)");
@ -1783,6 +1831,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("nvarchar(50)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime2");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
@ -1791,6 +1842,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<string>("CustPartCode")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
@ -1799,9 +1853,15 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<int>("DeliverBillType")
.HasColumnType("int");
b.Property<string>("DeliverCode")
.HasColumnType("nvarchar(max)");
b.Property<int>("DeliverSubBillType")
.HasColumnType("int");
b.Property<string>("ErpToLoc")
.HasColumnType("nvarchar(max)");
@ -1809,6 +1869,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<string>("Factory")
.HasColumnType("nvarchar(max)");
b.Property<string>("FromLoc")
.HasColumnType("nvarchar(max)");
@ -1825,6 +1888,9 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<bool>("IsHaveEdiData")
.HasColumnType("bit");
b.Property<string>("JISNum")
.HasColumnType("nvarchar(max)");
b.Property<string>("KeyCode")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
@ -1847,9 +1913,6 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("MatchNumber")
.HasColumnType("nvarchar(max)");
b.Property<string>("Num")
.HasColumnType("nvarchar(max)");
b.Property<string>("Oper")
.HasColumnType("nvarchar(max)");
@ -1866,12 +1929,18 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("PartCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("PartDesc")
.HasColumnType("nvarchar(max)");
b.Property<string>("PjsNum")
.HasColumnType("nvarchar(max)");
b.Property<string>("Position")
.HasColumnType("nvarchar(max)");
b.Property<int>("ProType")
.HasColumnType("int");
b.Property<decimal>("Qty")
.HasColumnType("decimal(18,2)");
@ -1900,9 +1969,18 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<DateTime>("ShippingDate")
.HasColumnType("datetime2");
b.Property<int>("State")
.HasColumnType("int");
b.Property<int>("SubBillType")
.HasColumnType("int");
b.Property<string>("ToLoc")
.HasColumnType("nvarchar(max)");
b.Property<int>("TransType")
.HasColumnType("int");
b.Property<string>("UniqueCode")
.HasColumnType("nvarchar(max)");
@ -4414,10 +4492,10 @@ namespace Win.Sfs.SettleAccount.Migrations
b.HasData(
new
{
Id = new Guid("75ce4934-06de-4cac-a1f0-536935975b38"),
Id = new Guid("c085a562-1da9-4dd3-8e65-85e4518f1383"),
BillTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
BillType = 1,
ConcurrencyStamp = "8e865c8947ea4381b1b48c3ee4d572b4",
ConcurrencyStamp = "4b83550d90bf425493e93dcd552a0bd1",
DeliverTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
ErpToLoc = "ErpToLoc",
OrderNum = "OrderNum",

Loading…
Cancel
Save