diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
index 9372d0d4..3c5b9547 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
@@ -22,10 +22,9 @@ export default {
@@ -37,7 +36,9 @@ export default {
-
+
-
+
-
+
-
+
@@ -89,7 +105,7 @@ export default {
-
-
- {{ scope.row[key][subKey] }}
-
-
-
+
{{getProp(scope.row,item.navigation)}}
@@ -121,10 +116,15 @@ export default {
-
-
- {{$t(item.key)??item.key}}
- {{item.value}}
+
+
+
+
+ {{item2.title}}
+
+
+ {{scope.row[key][key2]}}
+
@@ -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"];
}
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/business-type.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/business-type.js
index 65c37997..e1476c8e 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/business-type.js
+++ b/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;
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/compare.js
new file mode 100644
index 00000000..a9829efb
--- /dev/null
+++ b/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: "客户零件号",
+ },
+ },
+};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/fa-yun.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/compare/fa-yun.js
new file mode 100644
index 00000000..2bf81a49
--- /dev/null
+++ b/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,
+ },
+ };
+}
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/edi.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/edi.js
new file mode 100644
index 00000000..78330f28
--- /dev/null
+++ b/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,
+ },
+ };
+}
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/fa-yun.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/fa-yun.js
new file mode 100644
index 00000000..f3dc5745
--- /dev/null
+++ b/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,
+ },
+ };
+}
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan-detail.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan-detail.js
index f819c2f2..04841dca 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan-detail.js
+++ b/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: "商品组",
+ },
+ },
+ },
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js
index 4cde98f6..86c8550c 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js
+++ b/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,
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/tb_re-parts-relationship_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/tb_re-parts-relationship_service.js
index 6f1f678e..59a15307 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/tb_re-parts-relationship_service.js
+++ b/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,
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/request/index.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/request/index.js
index 8239600b..da1865b6 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/request/index.js
+++ b/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();
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
index 5934cdbc..a4a2268f 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
@@ -1,6 +1,6 @@
import createRoute, { createPage, createButton } from "./utils.js";
-function createJieSuanShuJu(path, business, client, title = "结算数据") {
+function createInputJieSuanShuju(path, business, client, title = "结算数据") {
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
component: "/input/jie-suan",
@@ -13,6 +13,56 @@ function createJieSuanShuJu(path, business, client, title = "结算数据") {
};
}
+function createInputFaYunShuJu(path, business, client, title = "发运数据") {
+ return {
+ ...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
+ component: "/input/fa-yun",
+ children: [
+ createButton("query", "title=查询&isTop=true"),
+ createButton("sync", "title=手动同步&isTop=true"),
+ createButton("export", "title=导出&isTop=true&pattern=paged"),
+ ],
+ };
+}
+
+function createInputEdiShuJu(path, business, client, title = "EDI数据") {
+ return {
+ ...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
+ component: "/input/edi",
+ children: [
+ createButton("query", "title=查询&isTop=true"),
+ createButton("export", "title=导出&isTop=true&pattern=paged"),
+ ],
+ };
+}
+
+function createCompareFaYun(path, business, client, title = "EDI与发运对比") {
+ return {
+ ...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
+ component: "/compare/fa-yun",
+ children: [
+ createButton("query", "title=查询&isTop=true"),
+ createButton("compare", "title=生成比对&isTop=true"),
+ createButton("delete", "title=删除&isTop=true"),
+ createButton("export", "title=下载&pattern=file&disabled=o=>o.stateName!='Succeeded'"),
+ ],
+ };
+}
+
+function createCompareJieSuan(path, business, client, title = "EDI、发运与结算比对") {
+ return {
+ ...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
+ component: "/compare/jie-suan",
+ children: [
+ createButton("query", "title=查询&isTop=true"),
+ createButton("compare", "title=生成比对&isTop=true"),
+ createButton("delete", "title=删除&isTop=true"),
+ createButton("export", "title=下载&pattern=file&disabled=o=>o.stateName!='Succeeded'"),
+ //createButton("export", "title=更新结算数据状态&isTop=true"),
+ ],
+ };
+}
+
export default [
{
...createPage("input/jie-suan/detail", "title=结算数据明细&isHidden=true"),
@@ -24,12 +74,31 @@ export default [
{
...createRoute("input", "title=数据输入"),
children: [
- createJieSuanShuJu("bbac_sa_service", "JisBBAC", "bbac"),
+ createInputJieSuanShuju("bbac_sa_service", "JisBBAC", "bbac"),
+ createInputFaYunShuJu("bbac_se_detail_service", "JisBBAC", "bbac"),
+ createInputEdiShuJu("bbac_se_edi_service", "JisBBAC", "bbac"),
+ ],
+ },
+ {
+ ...createRoute("contrast", "title=数据比对"),
+ children: [
+ createCompareFaYun("bbac_sa_detail_jobservice", "JisBBAC", "bbac"),
+ createCompareJieSuan("first_bbac_sa_detail_jobservice", "JisBBAC", "bbac"),
+ ],
+ },
+ {
+ path: "settlement",
+ meta: {
+ type: "group",
+ title: "结算开票",
+ icon: "folder",
+ },
+ children: [
{
- path: "bbac_se_detail_service",
+ path: "bbac_can_sa_service",
meta: {
type: "page",
- title: "JIS发运数据",
+ title: "可结算单",
icon: "file",
},
children: [
@@ -43,19 +112,20 @@ export default [
},
},
{
- path: "sync",
+ path: "export",
meta: {
type: "button",
- title: "手动同步",
+ title: "导出",
icon: "file",
isTop: true,
+ pattern: "paged",
},
},
{
- path: "export",
+ path: "invoice",
meta: {
type: "button",
- title: "导出",
+ title: "生成发票数据",
icon: "file",
isTop: true,
pattern: "paged",
@@ -64,11 +134,12 @@ export default [
],
},
{
- path: "bbac_se_edi_service",
+ path: "bbac_can_sa_detail_service",
meta: {
type: "page",
- title: "EDI数据",
+ title: "BBAC发票分组号明细",
icon: "file",
+ isHidden: true,
},
children: [
{
@@ -80,11 +151,21 @@ export default [
isTop: true,
},
},
+ ],
+ },
+ {
+ path: "bbac_not_sa_service",
+ meta: {
+ type: "page",
+ title: "不可结算单",
+ icon: "file",
+ },
+ children: [
{
- path: "sync",
+ path: "query",
meta: {
type: "button",
- title: "手动同步",
+ title: "查询",
icon: "file",
isTop: true,
},
@@ -99,23 +180,23 @@ export default [
pattern: "paged",
},
},
+ {
+ path: "settlement",
+ meta: {
+ type: "button",
+ title: "生成可结算单",
+ icon: "file",
+ isTop: true,
+ pattern: "paged",
+ },
+ },
],
},
- ],
- },
- {
- path: "contrast",
- meta: {
- type: "group",
- title: "数据对比",
- icon: "folder",
- },
- children: [
{
- path: "bbac_sa_detail_jobservice",
+ path: "bbac_ba_service",
meta: {
type: "page",
- title: "EDI与发运数据对比",
+ title: "商务审批",
icon: "file",
},
children: [
@@ -129,40 +210,78 @@ export default [
},
},
{
- path: "compare",
+ path: "reject",
+ meta: {
+ type: "button",
+ title: "退回",
+ icon: "file",
+ isTop: true,
+ disabled: "(rows,query)=>true",
+ },
+ },
+ {
+ path: "export",
meta: {
type: "button",
- title: "生成对比",
+ title: "导出",
icon: "file",
isTop: true,
+ pattern: "paged",
},
},
{
- path: "delete",
+ path: "received ",
meta: {
type: "button",
- title: "删除",
+ title: "客户已收票",
icon: "file",
isTop: true,
+ pattern: "paged",
},
},
{
- path: "export",
+ path: "check",
+ meta: {
+ type: "button",
+ title: "审核通过",
+ icon: "file",
+ },
+ },
+ {
+ path: "reopen",
+ meta: {
+ type: "button",
+ title: "重开",
+ icon: "file",
+ },
+ },
+ ],
+ },
+ {
+ path: "bbac_ba_detail_service",
+ meta: {
+ type: "page",
+ title: "商务审核明细",
+ icon: "file",
+ isHidden: true,
+ },
+ children: [
+ {
+ path: "query",
meta: {
type: "button",
- title: "下载",
+ title: "查询",
icon: "file",
- pattern: "file",
- disabled: "o=>o.stateName!='Succeeded'",
+ isTop: true,
},
},
],
},
{
- path: "first_bbac_sa_detail_jobservice",
+ path: "bbac_pd_service",
meta: {
type: "page",
- title: "EDI、发运与结算比对",
+ title: "寄售库库存扣减审批",
icon: "file",
},
children: [
@@ -176,45 +295,87 @@ export default [
},
},
{
- path: "compare",
+ path: "reject",
meta: {
type: "button",
- title: "生成对比",
+ title: "退回",
icon: "file",
isTop: true,
},
},
{
- path: "delete",
+ path: "export",
meta: {
type: "button",
- title: "删除",
+ title: "导出",
icon: "file",
isTop: true,
+ pattern: "paged",
},
},
{
- path: "update-data",
+ path: "check",
meta: {
type: "button",
- title: "更新结算数据状态",
+ title: "审核通过",
icon: "file",
isTop: true,
},
},
+ ],
+ },
+ {
+ path: "bbac_pd_detail_service",
+ meta: {
+ type: "page",
+ title: "寄售库库存扣减审批明细",
+ icon: "file",
+ isHidden: true,
+ },
+ children: [
{
- path: "export",
+ path: "query",
meta: {
type: "button",
- title: "下载",
+ title: "查询",
icon: "file",
- pattern: "file",
+ isTop: true,
},
},
],
},
],
},
+ ],
+ },
+ {
+ path: "jis-hbpo",
+ meta: {
+ type: "group",
+ title: "JIS-HBPO",
+ icon: "folder",
+ },
+ children: [
+ {
+ path: "input",
+ meta: {
+ type: "group",
+ title: "数据输入",
+ icon: "folder",
+ },
+ children: [
+ createInputJieSuanShuju("hbpo_sa_service", "JisHBPO", "hbpo"),
+ createInputFaYunShuJu("hbpo_se_detail_service", "JisHBPO", "hbpo"),
+ createInputEdiShuJu("hbpo_se_edi_service", "JisHBPO", "hbpo"),
+ ],
+ },
+ {
+ ...createRoute("contrast", "title=数据比对"),
+ children: [
+ createCompareFaYun("hbpo_sa_detail_jobservice", "JisHBPO", "hbpo"),
+ createCompareJieSuan("first_hbpo_sa_detail_jobservice", "JisHBPO", "hbpo"),
+ ],
+ },
{
path: "settlement",
meta: {
@@ -224,7 +385,7 @@ export default [
},
children: [
{
- path: "bbac_can_sa_service",
+ path: "hbpo_can_sa_service",
meta: {
type: "page",
title: "可结算单",
@@ -251,7 +412,7 @@ export default [
},
},
{
- path: "invoice",
+ path: "generateInvoice",
meta: {
type: "button",
title: "生成发票数据",
@@ -263,10 +424,10 @@ export default [
],
},
{
- path: "bbac_can_sa_detail_service",
+ path: "hbpo_can_sa_detail_service",
meta: {
type: "page",
- title: "BBAC发票分组号明细",
+ title: "HBPO可结算单明细",
icon: "file",
isHidden: true,
},
@@ -283,7 +444,7 @@ export default [
],
},
{
- path: "bbac_not_sa_service",
+ path: "hbpo_not_sa_service",
meta: {
type: "page",
title: "不可结算单",
@@ -322,7 +483,7 @@ export default [
],
},
{
- path: "bbac_ba_service",
+ path: "hbpo_ba_service",
meta: {
type: "page",
title: "商务审批",
@@ -345,7 +506,6 @@ export default [
title: "退回",
icon: "file",
isTop: true,
- disabled: "(rows,query)=>true",
},
},
{
@@ -374,6 +534,7 @@ export default [
type: "button",
title: "审核通过",
icon: "file",
+ isTop: true,
},
},
{
@@ -387,10 +548,10 @@ export default [
],
},
{
- path: "bbac_ba_detail_service",
+ path: "hbpo_ba_detail_service",
meta: {
type: "page",
- title: "商务审核明细",
+ title: "商务审批明细",
icon: "file",
isHidden: true,
},
@@ -407,7 +568,7 @@ export default [
],
},
{
- path: "bbac_pd_service",
+ path: "hbpo_pd_service",
meta: {
type: "page",
title: "寄售库库存扣减审批",
@@ -443,7 +604,7 @@ export default [
},
},
{
- path: "check",
+ path: "check ",
meta: {
type: "button",
title: "审核通过",
@@ -454,7 +615,7 @@ export default [
],
},
{
- path: "bbac_pd_detail_service",
+ path: "hbpo_pd_detail_service",
meta: {
type: "page",
title: "寄售库库存扣减审批明细",
@@ -478,999 +639,39 @@ export default [
],
},
{
- path: "jis-hbpo",
+ path: "jit",
meta: {
type: "group",
- title: "JIS-HBPO",
+ title: "直供件",
icon: "folder",
},
children: [
{
- path: "input",
+ path: "jit-bbac",
meta: {
type: "group",
- title: "数据输入",
+ title: "BBAC",
icon: "folder",
},
children: [
- createJieSuanShuJu("hbpo_sa_service", "JisHBPO", "hbpo"),
{
- path: "hbpo_se_detail_service",
+ path: "input",
meta: {
- type: "page",
- title: "JIS发运数据",
- icon: "file",
+ type: "group",
+ title: "数据输入",
+ icon: "folder",
},
children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "sync",
- meta: {
- type: "button",
- title: "手动同步",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "export",
- meta: {
- type: "button",
- title: "导出",
- icon: "file",
- isTop: true,
- pattern: "paged",
- },
- },
+ createInputJieSuanShuju("bbac_jit_pub_sa_service", "ZhiGongJianBBAC", "bbac"),
+ createInputFaYunShuJu("bbac_jit_pub_se_detail_service", "ZhiGongJianBBAC", "bbac"),
],
},
{
- path: "hbpo_se_edi_service",
- meta: {
- type: "page",
- title: "EDI数据",
- icon: "file",
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "sync",
- meta: {
- type: "button",
- title: "手动同步",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "export",
- meta: {
- type: "button",
- title: "导出",
- icon: "file",
- isTop: true,
- pattern: "paged",
- },
- },
- ],
- },
- ],
- },
- {
- path: "contrast",
- meta: {
- type: "group",
- title: "数据对比",
- icon: "folder",
- },
- children: [
- {
- path: "hbpo_sa_detail_jobservice",
- meta: {
- type: "page",
- title: "EDI与发运数据对比",
- icon: "file",
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "compare",
- meta: {
- type: "button",
- title: "生成对比",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "delete",
- meta: {
- type: "button",
- title: "删除",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "export",
- meta: {
- type: "button",
- title: "下载",
- icon: "file",
- pattern: "file",
- },
- },
- ],
- },
- {
- path: "first_hbpo_sa_detail_jobservice",
- meta: {
- type: "page",
- title: "EDI、发运与结算比对",
- icon: "file",
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "compare",
- meta: {
- type: "button",
- title: "生成对比",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "delete",
- meta: {
- type: "button",
- title: "删除",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "update-data",
- meta: {
- type: "button",
- title: "更新结算数据状态",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "export",
- meta: {
- type: "button",
- title: "下载",
- icon: "file",
- pattern: "file",
- },
- },
- ],
- },
- ],
- },
- {
- path: "settlement",
- meta: {
- type: "group",
- title: "结算开票",
- icon: "folder",
- },
- children: [
- {
- path: "hbpo_can_sa_service",
- meta: {
- type: "page",
- title: "可结算单",
- icon: "file",
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "export",
- meta: {
- type: "button",
- title: "导出",
- icon: "file",
- isTop: true,
- pattern: "paged",
- },
- },
- {
- path: "generateInvoice",
- meta: {
- type: "button",
- title: "生成发票数据",
- icon: "file",
- isTop: true,
- pattern: "paged",
- },
- },
- ],
- },
- {
- path: "hbpo_can_sa_detail_service",
- meta: {
- type: "page",
- title: "HBPO可结算单明细",
- icon: "file",
- isHidden: true,
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- ],
- },
- {
- path: "hbpo_not_sa_service",
- meta: {
- type: "page",
- title: "不可结算单",
- icon: "file",
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "export",
- meta: {
- type: "button",
- title: "导出",
- icon: "file",
- isTop: true,
- pattern: "paged",
- },
- },
- {
- path: "settlement",
- meta: {
- type: "button",
- title: "生成可结算单",
- icon: "file",
- isTop: true,
- pattern: "paged",
- },
- },
- ],
- },
- {
- path: "hbpo_ba_service",
- meta: {
- type: "page",
- title: "商务审批",
- icon: "file",
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "reject",
- meta: {
- type: "button",
- title: "退回",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "export",
- meta: {
- type: "button",
- title: "导出",
- icon: "file",
- isTop: true,
- pattern: "paged",
- },
- },
- {
- path: "received ",
- meta: {
- type: "button",
- title: "客户已收票",
- icon: "file",
- isTop: true,
- pattern: "paged",
- },
- },
- {
- path: "check",
- meta: {
- type: "button",
- title: "审核通过",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "reopen",
- meta: {
- type: "button",
- title: "重开",
- icon: "file",
- },
- },
- ],
- },
- {
- path: "hbpo_ba_detail_service",
- meta: {
- type: "page",
- title: "商务审批明细",
- icon: "file",
- isHidden: true,
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- ],
- },
- {
- path: "hbpo_pd_service",
- meta: {
- type: "page",
- title: "寄售库库存扣减审批",
- icon: "file",
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "reject",
- meta: {
- type: "button",
- title: "退回",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "export",
- meta: {
- type: "button",
- title: "导出",
- icon: "file",
- isTop: true,
- pattern: "paged",
- },
- },
- {
- path: "check ",
- meta: {
- type: "button",
- title: "审核通过",
- icon: "file",
- isTop: true,
- },
- },
- ],
- },
- {
- path: "hbpo_pd_detail_service",
- meta: {
- type: "page",
- title: "寄售库库存扣减审批明细",
- icon: "file",
- isHidden: true,
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- ],
- },
- ],
- },
- ],
- },
- {
- path: "jit",
- meta: {
- type: "group",
- title: "直供件",
- icon: "folder",
- },
- children: [
- {
- path: "jit-bbac",
- meta: {
- type: "group",
- title: "BBAC",
- icon: "folder",
- },
- children: [
- {
- path: "input",
- meta: {
- type: "group",
- title: "数据输入",
- icon: "folder",
- },
- children: [
- createJieSuanShuJu("bbac_jit_pub_sa_service", "ZhiGongJianBBAC", "bbac"),
- {
- path: "bbac_jit_pub_se_detail_service",
- meta: {
- type: "page",
- title: "BBAC发运数据",
- icon: "file",
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "sync",
- meta: {
- type: "button",
- title: "手动同步",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "export",
- meta: {
- type: "button",
- title: "导出",
- icon: "file",
- isTop: true,
- pattern: "paged",
- },
- },
- ],
- },
- ],
- },
- {
- path: "contrast",
- meta: {
- type: "group",
- title: "数据对比",
- icon: "folder",
- },
- children: [
- {
- path: "bbac_jit_pub_sa_detail_jobservice",
- meta: {
- type: "page",
- title: "BBAC发运与结算比对",
- icon: "file",
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "compare",
- meta: {
- type: "button",
- title: "生成对比",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "delete",
- meta: {
- type: "button",
- title: "删除",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "update-data",
- meta: {
- type: "button",
- title: "更新结算数据状态",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "export",
- meta: {
- type: "button",
- title: "下载",
- icon: "file",
- pattern: "file",
- },
- },
- ],
- },
- ],
- },
- {
- path: "settlement",
- meta: {
- type: "group",
- title: "结算开票",
- icon: "folder",
- },
- children: [
- {
- path: "bbac_jit_pub_can_sa_service",
- meta: {
- type: "page",
- title: "可结算单",
- icon: "file",
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "export",
- meta: {
- type: "button",
- title: "导出",
- icon: "file",
- isTop: true,
- pattern: "paged",
- },
- },
- {
- path: "generateInvoice",
- meta: {
- type: "button",
- title: "生成发票数据",
- icon: "file",
- isTop: true,
- pattern: "paged",
- },
- },
- ],
- },
- {
- path: "bbac_jit_pub_can_sa_detail_service",
- meta: {
- type: "page",
- title: "可结算单明细",
- icon: "file",
- isHidden: true,
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "export",
- meta: {
- type: "button",
- title: "导出",
- icon: "file",
- isTop: true,
- pattern: "paged",
- },
- },
- ],
- },
- {
- path: "bbac_jit_pub_not_sa_service",
- meta: {
- type: "page",
- title: "不可结算单",
- icon: "file",
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "export",
- meta: {
- type: "button",
- title: "导出",
- icon: "file",
- isTop: true,
- pattern: "paged",
- },
- },
- {
- path: "generateSettlementOrder",
- meta: {
- type: "button",
- title: "生成可结算单",
- icon: "file",
- isTop: true,
- pattern: "paged",
- },
- },
- ],
- },
- {
- path: "bbac_jit_pub_ba_service",
- meta: {
- type: "page",
- title: "商务审批",
- icon: "file",
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "reject",
- meta: {
- type: "button",
- title: "退回",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "export",
- meta: {
- type: "button",
- title: "导出",
- icon: "file",
- isTop: true,
- pattern: "paged",
- },
- },
- {
- path: "received ",
- meta: {
- type: "button",
- title: "客户已收票",
- icon: "file",
- isTop: true,
- pattern: "paged",
- },
- },
- {
- path: "check",
- meta: {
- type: "button",
- title: "审核通过",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "reopen",
- meta: {
- type: "button",
- title: "重开",
- icon: "file",
- },
- },
- ],
- },
- {
- path: "bbac_jit_pub_ba_detail_service",
- meta: {
- type: "page",
- title: "商务审批明细",
- icon: "file",
- isHidden: true,
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- ],
- },
- {
- path: "bbac_jit_pub_pd_service",
- meta: {
- type: "page",
- title: "寄售库库存扣减审批",
- icon: "file",
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "reject",
- meta: {
- type: "button",
- title: "退回",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "export",
- meta: {
- type: "button",
- title: "导出",
- icon: "file",
- isTop: true,
- pattern: "paged",
- },
- },
- {
- path: "check ",
- meta: {
- type: "button",
- title: "审核通过",
- icon: "file",
- isTop: true,
- },
- },
- ],
- },
- {
- path: "bbac_jit_pub_pd_detail_service",
- meta: {
- type: "page",
- title: "寄售库库存扣减审批明细",
- icon: "file",
- isHidden: true,
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- ],
- },
- ],
- },
- ],
- },
- {
- path: "jit-hbpo",
- meta: {
- type: "group",
- title: "HBPO",
- icon: "folder",
- },
- children: [
- {
- path: "input",
- meta: {
- type: "group",
- title: "数据输入",
- icon: "folder",
- },
- children: [
- createJieSuanShuJu("hbpo_jit_pub_sa_service", "ZhiGongJianHBPO", "hbpo"),
- {
- path: "hbpo_jit_pub_se_detail_service",
- meta: {
- type: "page",
- title: "HBPO发运数据",
- icon: "file",
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "sync",
- meta: {
- type: "button",
- title: "手动同步",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "export",
- meta: {
- type: "button",
- title: "导出",
- icon: "file",
- isTop: true,
- pattern: "paged",
- },
- },
- ],
- },
- ],
- },
- {
- path: "contrast",
- meta: {
- type: "group",
- title: "数据对比",
- icon: "folder",
- },
- children: [
- {
- path: "hbpo_jit_pub_sa_detail_jobservice",
- meta: {
- type: "page",
- title: "HBPO发运与结算比对",
- icon: "file",
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "compare",
- meta: {
- type: "button",
- title: "生成对比",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "delete",
- meta: {
- type: "button",
- title: "删除",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "update-data",
- meta: {
- type: "button",
- title: "更新结算数据状态",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "export",
- meta: {
- type: "button",
- title: "下载",
- icon: "file",
- pattern: "file",
- },
- },
- ],
- },
- ],
- },
- {
- path: "settlement",
+ ...createRoute("contrast", "title=数据比对"),
+ children: [createCompareJieSuan("bbac_jit_pub_sa_detail_jobservice", "ZhiGongJianBBAC", "bbac")],
+ },
+ {
+ path: "settlement",
meta: {
type: "group",
title: "结算开票",
@@ -1478,7 +679,7 @@ export default [
},
children: [
{
- path: "hbpo_jit_pub_can_sa_service",
+ path: "bbac_jit_pub_can_sa_service",
meta: {
type: "page",
title: "可结算单",
@@ -1517,7 +718,7 @@ export default [
],
},
{
- path: "hbpo_jit_pub_can_sa_detail_service",
+ path: "bbac_jit_pub_can_sa_detail_service",
meta: {
type: "page",
title: "可结算单明细",
@@ -1547,7 +748,7 @@ export default [
],
},
{
- path: "hbpo_jit_pub_not_sa_service",
+ path: "bbac_jit_pub_not_sa_service",
meta: {
type: "page",
title: "不可结算单",
@@ -1586,7 +787,7 @@ export default [
],
},
{
- path: "hbpo_jit_pub_ba_service",
+ path: "bbac_jit_pub_ba_service",
meta: {
type: "page",
title: "商务审批",
@@ -1651,7 +852,7 @@ export default [
],
},
{
- path: "hbpo_jit_pub_ba_detail_service",
+ path: "bbac_jit_pub_ba_detail_service",
meta: {
type: "page",
title: "商务审批明细",
@@ -1671,7 +872,7 @@ export default [
],
},
{
- path: "hbpo_jit_pub_pd_service",
+ path: "bbac_jit_pub_pd_service",
meta: {
type: "page",
title: "寄售库库存扣减审批",
@@ -1718,7 +919,7 @@ export default [
],
},
{
- path: "hbpo_jit_pub_pd_detail_service",
+ path: "bbac_jit_pub_pd_detail_service",
meta: {
type: "page",
title: "寄售库库存扣减审批明细",
@@ -1741,21 +942,11 @@ export default [
},
],
},
- ],
- },
- {
- path: "md",
- meta: {
- type: "group",
- title: "买单件",
- icon: "folder",
- },
- children: [
{
- path: "md-bbac",
+ path: "jit-hbpo",
meta: {
type: "group",
- title: "BBAC",
+ title: "HBPO",
icon: "folder",
},
children: [
@@ -1764,15 +955,30 @@ export default [
meta: {
type: "group",
title: "数据输入",
- icon: "file",
+ icon: "folder",
+ },
+ children: [
+ createInputJieSuanShuju("hbpo_jit_pub_sa_service", "ZhiGongJianHBPO", "hbpo"),
+ createInputFaYunShuJu("hbpo_jit_pub_se_detail_service", "ZhiGongJianHBPO", "hbpo"),
+ ],
+ },
+ {
+ ...createRoute("contrast", "title=数据比对"),
+ children: [createCompareJieSuan("bbac_jit_pub_sa_detail_jobservice", "ZhiGongJianHBPO", "hbpo")],
+ },
+ {
+ path: "settlement",
+ meta: {
+ type: "group",
+ title: "结算开票",
+ icon: "folder",
},
children: [
- createJieSuanShuJu("bbac_md_pub_sa_service", "MaiDanJianBBAC", "bbac"),
{
- path: "bbac_md_pub_se_detail_service",
+ path: "hbpo_jit_pub_can_sa_service",
meta: {
type: "page",
- title: "发运数据",
+ title: "可结算单",
icon: "file",
},
children: [
@@ -1796,32 +1002,24 @@ export default [
},
},
{
- path: "sync",
+ path: "generateInvoice",
meta: {
type: "button",
- title: "手动同步",
+ title: "生成发票数据",
icon: "file",
isTop: true,
+ pattern: "paged",
},
},
],
},
- ],
- },
- {
- path: "contrast",
- meta: {
- type: "group",
- title: "数据对比",
- icon: "file",
- },
- children: [
{
- path: "bbac_md_pub_sa_detail_jobservice",
+ path: "hbpo_jit_pub_can_sa_detail_service",
meta: {
type: "page",
- title: "发运与结算比对",
+ title: "可结算单明细",
icon: "file",
+ isHidden: true,
},
children: [
{
@@ -1834,69 +1032,61 @@ export default [
},
},
{
- path: "compare",
+ path: "export",
meta: {
type: "button",
- title: "生成对比",
+ title: "导出",
icon: "file",
isTop: true,
+ pattern: "paged",
},
},
+ ],
+ },
+ {
+ path: "hbpo_jit_pub_not_sa_service",
+ meta: {
+ type: "page",
+ title: "不可结算单",
+ icon: "file",
+ },
+ children: [
{
- path: "delete",
+ path: "query",
meta: {
type: "button",
- title: "删除",
+ title: "查询",
icon: "file",
isTop: true,
},
},
{
- path: "update-data",
+ path: "export",
meta: {
type: "button",
- title: "更新结算数据状态",
+ title: "导出",
icon: "file",
isTop: true,
+ pattern: "paged",
},
},
{
- path: "export",
+ path: "generateSettlementOrder",
meta: {
type: "button",
- title: "下载",
+ title: "生成可结算单",
icon: "file",
- pattern: "file",
+ isTop: true,
+ pattern: "paged",
},
},
],
},
- ],
- },
- ],
- },
- {
- path: "md-hbpo",
- meta: {
- type: "group",
- title: "HBPO",
- icon: "folder",
- },
- children: [
- {
- path: "input",
- meta: {
- type: "group",
- title: "数据输入",
- icon: "file",
- },
- children: [
- createJieSuanShuJu("hbpo_md_pub_sa_service", "MaiDanJianHBPO", "hbpo"),
{
- path: "hbpo_md_pub_se_detail_service",
+ path: "hbpo_jit_pub_ba_service",
meta: {
type: "page",
- title: "发运数据",
+ title: "商务审批",
icon: "file",
},
children: [
@@ -1909,6 +1099,15 @@ export default [
isTop: true,
},
},
+ {
+ path: "reject",
+ meta: {
+ type: "button",
+ title: "退回",
+ icon: "file",
+ isTop: true,
+ },
+ },
{
path: "export",
meta: {
@@ -1920,31 +1119,59 @@ export default [
},
},
{
- path: "sync",
+ path: "received ",
+ meta: {
+ type: "button",
+ title: "客户已收票",
+ icon: "file",
+ isTop: true,
+ pattern: "paged",
+ },
+ },
+ {
+ path: "check",
+ meta: {
+ type: "button",
+ title: "审核通过",
+ icon: "file",
+ isTop: true,
+ },
+ },
+ {
+ path: "reopen",
+ meta: {
+ type: "button",
+ title: "重开",
+ icon: "file",
+ },
+ },
+ ],
+ },
+ {
+ path: "hbpo_jit_pub_ba_detail_service",
+ meta: {
+ type: "page",
+ title: "商务审批明细",
+ icon: "file",
+ isHidden: true,
+ },
+ children: [
+ {
+ path: "query",
meta: {
type: "button",
- title: "手动同步",
+ title: "查询",
icon: "file",
isTop: true,
},
},
],
},
- ],
- },
- {
- path: "contrast",
- meta: {
- type: "group",
- title: "数据对比",
- icon: "file",
- },
- children: [
{
- path: "hbpo_md_pub_sa_detail_jobservice",
+ path: "hbpo_jit_pub_pd_service",
meta: {
type: "page",
- title: "发运与结算比对",
+ title: "寄售库库存扣减审批",
icon: "file",
},
children: [
@@ -1958,45 +1185,119 @@ export default [
},
},
{
- path: "compare",
+ path: "reject",
meta: {
type: "button",
- title: "生成对比",
+ title: "退回",
icon: "file",
isTop: true,
},
},
{
- path: "delete",
+ path: "export",
meta: {
type: "button",
- title: "删除",
+ title: "导出",
icon: "file",
isTop: true,
+ pattern: "paged",
},
},
{
- path: "update-data",
+ path: "check ",
meta: {
type: "button",
- title: "更新结算数据状态",
+ title: "审核通过",
icon: "file",
isTop: true,
},
},
+ ],
+ },
+ {
+ path: "hbpo_jit_pub_pd_detail_service",
+ meta: {
+ type: "page",
+ title: "寄售库库存扣减审批明细",
+ icon: "file",
+ isHidden: true,
+ },
+ children: [
{
- path: "export",
+ path: "query",
meta: {
type: "button",
- title: "下载",
+ title: "查询",
icon: "file",
- pattern: "file",
+ isTop: true,
},
},
],
},
],
},
+ ],
+ },
+ ],
+ },
+ {
+ path: "md",
+ meta: {
+ type: "group",
+ title: "买单件",
+ icon: "folder",
+ },
+ children: [
+ {
+ path: "md-bbac",
+ meta: {
+ type: "group",
+ title: "BBAC",
+ icon: "folder",
+ },
+ children: [
+ {
+ path: "input",
+ meta: {
+ type: "group",
+ title: "数据输入",
+ icon: "file",
+ },
+ children: [
+ createInputJieSuanShuju("bbac_md_pub_sa_service", "MaiDanJianBBAC", "bbac"),
+ createInputFaYunShuJu("bbac_md_pub_se_detail_service", "MaiDanJianBBAC", "bbac"),
+ ],
+ },
+ {
+ ...createRoute("contrast", "title=数据比对"),
+ children: [createCompareJieSuan("bbac_md_pub_sa_detail_jobservice", "MaiDanJianBBAC", "bbac")],
+ },
+ ],
+ },
+ {
+ path: "md-hbpo",
+ meta: {
+ type: "group",
+ title: "HBPO",
+ icon: "folder",
+ },
+ children: [
+ {
+ path: "input",
+ meta: {
+ type: "group",
+ title: "数据输入",
+ icon: "file",
+ },
+ children: [
+ createInputJieSuanShuju("hbpo_md_pub_sa_service", "MaiDanJianHBPO", "hbpo"),
+ createInputFaYunShuJu("hbpo_md_pub_se_detail_service", "MaiDanJianHBPO", "hbpo"),
+ ],
+ },
+ {
+ ...createRoute("contrast", "title=数据比对"),
+ children: [createCompareJieSuan("hbpo_md_pub_sa_detail_jobservice", "MaiDanJianHBPO", "hbpo")],
+ },
{
path: "settlement",
meta: {
@@ -2287,112 +1588,13 @@ export default [
icon: "folder",
},
children: [
- createJieSuanShuJu("bj_pub_sa_service", "BeiJian", "bbac"),
- {
- path: "bj_pub_se_detail_service",
- meta: {
- type: "page",
- title: "发运数据",
- icon: "file",
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "sync",
- meta: {
- type: "button",
- title: "手动同步",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "export",
- meta: {
- type: "button",
- title: "导出",
- icon: "file",
- isTop: true,
- pattern: "paged",
- },
- },
- ],
- },
+ createInputJieSuanShuju("bj_pub_sa_service", "BeiJian", "bbac"),
+ createInputFaYunShuJu("bj_pub_se_detail_service", "BeiJian", "bbac"),
],
},
{
- path: "contrast",
- meta: {
- type: "group",
- title: "数据对比",
- icon: "folder",
- },
- children: [
- {
- path: "bj_pub_sa_detail_jobservice",
- meta: {
- type: "page",
- title: "发运与结算比对",
- icon: "file",
- // businessType: "BeiJian",
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "compare",
- meta: {
- type: "button",
- title: "生成对比",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "delete",
- meta: {
- type: "button",
- title: "删除",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "update-data",
- meta: {
- type: "button",
- title: "更新结算数据状态",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "export",
- meta: {
- type: "button",
- title: "下载",
- icon: "file",
- pattern: "file",
- },
- },
- ],
- },
- ],
+ ...createRoute("contrast", "title=数据比对"),
+ children: [createCompareJieSuan("bj_pub_sa_detail_jobservice", "BeiJian", "bbac")],
},
{
path: "settlement",
@@ -2652,111 +1854,13 @@ export default [
icon: "folder",
},
children: [
- createJieSuanShuJu("in_pub_sa_service", "YinDuJian", "bbac"),
- {
- path: "in_pub_se_detail_service",
- meta: {
- type: "page",
- title: "发运数据",
- icon: "file",
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "sync",
- meta: {
- type: "button",
- title: "手动同步",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "export",
- meta: {
- type: "button",
- title: "导出",
- icon: "file",
- isTop: true,
- pattern: "paged",
- },
- },
- ],
- },
+ createInputJieSuanShuju("in_pub_sa_service", "YinDuJian", "bbac"),
+ createInputFaYunShuJu("in_pub_se_detail_service", "YinDuJian", "bbac"),
],
},
{
- path: "contrast",
- meta: {
- type: "group",
- title: "数据对比",
- icon: "folder",
- },
- children: [
- {
- path: "in_pub_sa_detail_jobservice",
- meta: {
- type: "page",
- title: "发运与结算比对",
- icon: "file",
- },
- children: [
- {
- path: "query",
- meta: {
- type: "button",
- title: "查询",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "compare",
- meta: {
- type: "button",
- title: "生成对比",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "delete",
- meta: {
- type: "button",
- title: "删除",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "update-data",
- meta: {
- type: "button",
- title: "更新结算数据状态",
- icon: "file",
- isTop: true,
- },
- },
- {
- path: "export",
- meta: {
- type: "button",
- title: "下载",
- icon: "file",
- pattern: "file",
- },
- },
- ],
- },
- ],
+ ...createRoute("contrast", "title=数据比对"),
+ children: [createCompareJieSuan("in_pub_sa_detail_jobservice", "YinDuJian", "bbac")],
},
{
path: "settlement",
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/styles/site.css b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/styles/site.css
index 80951295..e8c5c391 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/styles/site.css
+++ b/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 */
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/fa-yun.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/fa-yun.js
new file mode 100644
index 00000000..1492e452
--- /dev/null
+++ b/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`
+
+ EDI与发运对比
+
+
+
+
+
+
+ `,
+ styles: html``,
+ 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 };
+ },
+};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/jie-suan.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/compare/jie-suan.js
new file mode 100644
index 00000000..f726592c
--- /dev/null
+++ b/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`
+
+ EDI、发运与发运对比
+
+
+
+
+
+
+ `,
+ styles: html``,
+ 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 };
+ },
+};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/edi.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/edi.js
new file mode 100644
index 00000000..60a68cbc
--- /dev/null
+++ b/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``,
+ 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 };
+ },
+};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/fa-yun.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/fa-yun.js
new file mode 100644
index 00000000..95b4cd3a
--- /dev/null
+++ b/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``,
+ 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 };
+ },
+};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/jie-suan.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/jie-suan.js
index 8ec599fd..bedbce70 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/jie-suan.js
+++ b/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);
};
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs
index de1c8c62..9ff57b96 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs
@@ -155,7 +155,6 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase
[HttpPost]
public async Task> 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>(entities);
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BBACSeSyncAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BBACSeSyncAppService.cs
index 66125ae7..ae136f48 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BBACSeSyncAppService.cs
+++ b/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
///
private readonly INormalEfCoreRepository _bbacSeDetailRepository;
+ ///
+ /// 客户零件关系领域
+ ///
+ private readonly MaterialRelationshipManager _materialRelationshipManager;
+
+ ///
+ /// 客户零件关系集合
+ ///
+ private List _addMaterialRelationships;
+
///
/// 构造
///
public BBACSeSyncAppService(
WMSBJBMPTDbContext wmsBJBMPTContext,
INormalEfCoreRepository syncPositionFlagRepository,
- INormalEfCoreRepository bbacSeDetailRepository)
+ INormalEfCoreRepository bbacSeDetailRepository,
+ MaterialRelationshipManager materialRelationshipManager)
{
_wmsBJBMPTContext = wmsBJBMPTContext;
_syncPositionFlagRepository = syncPositionFlagRepository;
_bbacSeDetailRepository = bbacSeDetailRepository;
+ _materialRelationshipManager = materialRelationshipManager;
+ _addMaterialRelationships = new List();
}
[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);
+ }
}
///
@@ -73,7 +93,7 @@ public class BBACSeSyncAppService : ApplicationService, IInvocable, IJobService
var EnumDeliverSubBillTypes = GetDeliverSubBillTypes();
Expression> 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>(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>(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);
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BeiSeSyncAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BeiSeSyncAppService.cs
index 7f0e780f..01bba453 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BeiSeSyncAppService.cs
+++ b/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 syncPositionFlagRepository,
INormalEfCoreRepository pubSeDetailRepository,
+ MaterialRelationshipManager materialRelationshipManager,
VmiAppService vmiService
- ) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, vmiService)
+ ) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, materialRelationshipManager, vmiService)
{
base.SeSyncConfigInfo = new SeSyncConfig()
{
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/HBPOSeSyncAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/HBPOSeSyncAppService.cs
index 5934ffa8..480740a9 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/HBPOSeSyncAppService.cs
+++ b/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
///
private readonly INormalEfCoreRepository _pubSeDetailRepository;
+ ///
+ /// 客户零件关系领域
+ ///
+ private readonly MaterialRelationshipManager _materialRelationshipManager;
+
+ ///
+ /// 客户零件关系集合
+ ///
+ private List _addMaterialRelationships;
+
///
/// 构造
///
@@ -49,12 +61,15 @@ public class HBPOSeSyncAppService : ApplicationService, IInvocable, IJobService
WMSBJBMPTDbContext wmsBJBMPTContext,
INormalEfCoreRepository syncPositionFlagRepository,
INormalEfCoreRepository hbpoSeDetailRepository,
- INormalEfCoreRepository pubSeDetailRepository)
+ INormalEfCoreRepository pubSeDetailRepository,
+ MaterialRelationshipManager materialRelationshipManager)
{
_wmsBJBMPTContext = wmsBJBMPTContext;
_syncPositionFlagRepository = syncPositionFlagRepository;
_hbpoSeDetailRepository = hbpoSeDetailRepository;
_pubSeDetailRepository = pubSeDetailRepository;
+ _materialRelationshipManager = materialRelationshipManager;
+ _addMaterialRelationships = new List();
}
[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);
+ }
}
///
@@ -186,6 +206,13 @@ public class HBPOSeSyncAppService : ApplicationService, IInvocable, IJobService
///
private async Task SaveSeDataAsync(List hbpoSeDetails, List 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 =>
{
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs
index 17a8ada2..fbd80e37 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs
+++ b/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)
@@ -28,21 +31,39 @@ public class JisBBACSeEdiCompareAppService : ApplicationService, IInvocable
///
public async Task Invoke()
{
- using var serviceScope = _serviceProvider.CreateScope();
- var db = serviceScope.ServiceProvider.GetRequiredService();
-
- await HandDelEdiDataAsync().ConfigureAwait(false);
+ try
+ {
+ using var serviceScope = _serviceProvider.CreateScope();
+ var db = serviceScope.ServiceProvider.GetRequiredService();
- var seDetailGroup = db.Set().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().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().Where(t => keyCodes.Contains(new { t.PN, t.LU }));
- var ediDetails = db.Set().Where(t => keyCodes.Contains(new { t.PN, t.LU }));
- seDetails.ForEach(t => t.IsHaveEdiData = true);
- ediDetails.ForEach(t => t.IsHaveSeData = true);
- db.Set().UpdateRange(seDetails);
- db.Set().UpdateRange(ediDetails);
- await db.SaveChangesAsync().ConfigureAwait(false);
+ await HandDelEdiDataAsync().ConfigureAwait(false);
+ lock (_lockObj)
+ {
+ var seDetailGroup = db.Set().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().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().Join(keyCodes, a => new { a.PN, a.LU }, b => new { b.PN, b.LU }, (a, b) => a);
+ var ediDetails = db.Set().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);
+ db.Set().UpdateRange(seDetails);
+ }
+ if (ediDetails.Any())
+ {
+ ediDetails.ForEach(t => t.IsHaveSeData = true);
+ db.Set().UpdateRange(ediDetails);
+ }
+ db.SaveChanges();
+ }
+ }
+ }
+ catch (Exception)
+ {
+ throw;
+ }
}
///
@@ -61,12 +82,21 @@ public class JisBBACSeEdiCompareAppService : ApplicationService, IInvocable
//Edi 删除的数据(有发运数据)
var ediDelKeyCodes = db.Set().Where(t => t.IsDeleted == true && t.IsHaveSeData == true).Select(t => new { t.PN, t.LU }).Distinct();
- var seDetails = db.Set().Where(t => ediDelKeyCodes.Contains(new { t.PN, t.LU }));
- var ediDetails = db.Set().Where(t => ediDelKeyCodes.Contains(new { t.PN, t.LU }));
- seDetails.ForEach(t => t.IsHaveEdiData = false);
- ediDetails.ForEach(t => t.IsHaveSeData = false);
- db.Set().UpdateRange(seDetails);
- db.Set().UpdateRange(ediDetails);
- await db.SaveChangesAsync().ConfigureAwait(false);
+ if (ediDelKeyCodes.Any())
+ {
+ var seDetails = db.Set().Join(ediDelKeyCodes, a => new { a.PN, a.LU }, b => new { b.PN, b.LU }, (a, b) => a);
+ var ediDetails = db.Set().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);
+ db.Set().UpdateRange(seDetails);
+ }
+ if (ediDetails.Any())
+ {
+ ediDetails.ForEach(t => t.IsHaveSeData = false);
+ db.Set().UpdateRange(ediDetails);
+ }
+ await db.SaveChangesAsync().ConfigureAwait(false);
+ }
}
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeEdiCompareAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeEdiCompareAppService.cs
index 42ff332f..3fce2653 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeEdiCompareAppService.cs
+++ b/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;
///
@@ -46,48 +47,39 @@ public class JisHBPOSeEdiCompareAppService : ApplicationService, IInvocable
///
public async Task Invoke()
{
- Debug.WriteLine($"执行了:{this.GetType()}");
- using var serviceScope = _serviceProvider.CreateScope();
- var db = serviceScope.ServiceProvider.GetRequiredService();
-
- await HandDelEdiDataAsync().ConfigureAwait(false);
-
- var seDetailGroup = from se in db.Set()
- 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()
- 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
- {
- se.PN,
- se.LU
- } equals new
- {
- edi.PN,
- edi.LU
- }
- select new { se.PN, se.LU };
-
- //var seDetailGroup2 = db.Set().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().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().Where(t => keyCodes.Contains(new { t.PN, t.LU }));
- var ediDetails = db.Set().Where(t => keyCodes.Contains(new { t.PN, t.LU }));
- seDetails.ForEach(t => t.IsHaveEdiData = true);
- ediDetails.ForEach(t => t.IsHaveSeData = true);
- db.Set().UpdateRange(seDetails);
- db.Set().UpdateRange(ediDetails);
- await db.SaveChangesAsync().ConfigureAwait(false);
+ try
+ {
+ using var serviceScope = _serviceProvider.CreateScope();
+ var db = serviceScope.ServiceProvider.GetRequiredService();
- Debug.WriteLine($"处理数量:{keyCodes.Count()}");
+ await HandDelEdiDataAsync().ConfigureAwait(false);
+ lock (_lockObj)
+ {
+ var seDetailGroup = db.Set().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().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().Join(keyCodes, a => new { a.PN, a.LU }, b => new { b.PN, b.LU }, (a, b) => a);
+ var ediDetails = db.Set().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);
+ db.Set().UpdateRange(seDetails);
+ }
+ if (ediDetails.Any())
+ {
+ ediDetails.ForEach(t => t.IsHaveSeData = true);
+ db.Set().UpdateRange(ediDetails);
+ }
+ db.SaveChanges();
+ }
+ }
+ }
+ catch (Exception)
+ {
+ throw;
+ }
}
///
@@ -100,12 +92,21 @@ public class JisHBPOSeEdiCompareAppService : ApplicationService, IInvocable
//Edi 删除的数据(有发运数据)
var ediDelKeyCodes = db.Set().Where(t => t.IsDeleted == true && t.IsHaveSeData == true).Select(t => new { t.PN, t.LU }).Distinct();
- var seDetails = db.Set().Where(t => ediDelKeyCodes.Contains(new { t.PN, t.LU }));
- var ediDetails = db.Set().Where(t => ediDelKeyCodes.Contains(new { t.PN, t.LU }));
- seDetails.ForEach(t => t.IsHaveEdiData = false);
- ediDetails.ForEach(t => t.IsHaveSeData = false);
- db.Set().UpdateRange(seDetails);
- db.Set().UpdateRange(ediDetails);
- await db.SaveChangesAsync().ConfigureAwait(false);
+ if (ediDelKeyCodes.Any())
+ {
+ var seDetails = db.Set().Join(ediDelKeyCodes, a => new { a.PN, a.LU }, b => new { b.PN, b.LU }, (a, b) => a);
+ var ediDetails = db.Set().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);
+ db.Set().UpdateRange(seDetails);
+ }
+ if (ediDetails.Any())
+ {
+ ediDetails.ForEach(t => t.IsHaveSeData = false);
+ db.Set().UpdateRange(ediDetails);
+ }
+ await db.SaveChangesAsync().ConfigureAwait(false);
+ }
}
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JitSeSyncAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JitSeSyncAppService.cs
index 93bb25d0..769a9307 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JitSeSyncAppService.cs
+++ b/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 _pubSeDetailRepository;
///
- /// 客户零件关系仓储
+ /// 客户零件关系领域
///
- private readonly INormalEfCoreRepository _materialRelationshipRepository;
+ private readonly MaterialRelationshipManager _materialRelationshipManager;
private readonly IVmiService _vmiService;
@@ -49,11 +51,13 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
WMSBJBMPTDbContext wmsBJBMPTContext,
INormalEfCoreRepository syncPositionFlagRepository,
INormalEfCoreRepository 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>(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 =>
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/YinDuSeSyncAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/YinDuSeSyncAppService.cs
index b78f51fd..a39dbfcb 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/YinDuSeSyncAppService.cs
+++ b/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 syncPositionFlagRepository,
INormalEfCoreRepository pubSeDetailRepository,
+ MaterialRelationshipManager materialRelationshipManager,
VmiAppService vmiService
- ) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, vmiService)
+ ) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, materialRelationshipManager, vmiService)
{
base.SeSyncConfigInfo = new SeSyncConfig()
{
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/ZhiGongBBACSeSyncAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/ZhiGongBBACSeSyncAppService.cs
index 3a2c28cb..819983f7 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/ZhiGongBBACSeSyncAppService.cs
+++ b/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 syncPositionFlagRepository,
INormalEfCoreRepository pubSeDetailRepository,
+ MaterialRelationshipManager materialRelationshipManager,
VmiAppService vmiService
- ) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, vmiService)
+ ) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, materialRelationshipManager, vmiService)
{
base.SeSyncConfigInfo = new SeSyncConfig()
{
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/ZhiGongHBPOSeSyncAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/ZhiGongHBPOSeSyncAppService.cs
index 02234922..4b520b64 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/ZhiGongHBPOSeSyncAppService.cs
+++ b/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 syncPositionFlagRepository,
INormalEfCoreRepository pubSeDetailRepository,
+ MaterialRelationshipManager materialRelationshipManager,
VmiAppService vmiService
- ) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, vmiService)
+ ) : base(wmsBJBMPTContext, syncPositionFlagRepository, pubSeDetailRepository, materialRelationshipManager, vmiService)
{
base.SeSyncConfigInfo = new SeSyncConfig()
{
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
index 6fcd5af4..f9780bb9 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
@@ -1129,27 +1129,27 @@ namespace Win.Sfs.SettleAccount
private void CreateMapSeSync()
{
CreateMap()
- .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()
- .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()
- .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));
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_DETAIL.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_DETAIL.cs
index 8e7ca83d..3dc4d02e 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_DETAIL.cs
+++ b/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!;
-
///
- /// 单据编号
+ /// JIT订单号
///
- [Display(Name = "单据编号")]
- public string Num { get; set; }
-
+ [Display(Name = "JIT订单号")]
+ [DisplayName("JIT订单号")]
+ public string JISNum { get; set; }
///
- /// 发货时间
+ /// JIT排序生产码
///
- [Display(Name = "发货时间")]
- public DateTime BillTime { get; set; }
-
+ [Display(Name = "JIT排序生产码")]
+ public string VinCode { get; set; }
///
- /// 发货人
+ /// JIT排序生产码类型
///
- [Display(Name = "发货人")]
- public string Oper { get; set; }
-
+ [Display(Name = "JIT排序生产码类型")]
+ public string CodeType { get; set; }
///
- /// 排序单号
+ /// 订单零件号
///
- [Display(Name = "排序单号")]
- public string OrderNum { get; set; }
-
+ [Display(Name = "订单零件号")]
+ public string PartCode { get; set; }
+ ///
+ /// 订单零件号
+ ///
+ [Display(Name = "订单零件号")]
+ public string RealPartCode { get; set; }
+ ///
+ /// 批次
+ ///
+ [Display(Name = "批次")]
+ public string Batch { get; set; }
+ ///
+ /// 客户零件号
+ ///
+ [Display(Name = "客户零件号")]
+ public string CustPartCode { get; set; }
///
/// 订单序号
///
[Display(Name = "订单序号")]
public string Seq { get; set; }
-
///
- /// 实际生产码
+ /// 订单时间
///
- [Display(Name = "实际生产码")]
- public string RealCode { get; set; }
-
+ [Display(Name = "订单时间")]
+ public DateTime AssembleData { get; set; }
///
- /// 订单生产码
+ /// 发货条码
///
- [Display(Name = "订单生产码")]
- public string VinCode { get; set; }
-
+ [Display(Name = "发货条码")]
+ public string DeliverCode { get; set; }
///
- /// 生产码类型
+ /// 发货单号
///
- [Display(Name = "生产码类型")]
- public string CodeType { get; set; }
-
+ [Display(Name = "发货单号")]
+ public string BillNum { get; set; }
///
- /// 实际零件号
+ /// 发货时间
///
- [Display(Name = "实际零件号")]
- public string RealPartCode { get; set; }
-
+ [Display(Name = "发货时间")]
+ public DateTime? BillTime { get; set; }
///
- /// 零件号
+ /// 发货人
///
- [Display(Name = "零件号")]
- public string PartCode { get; set; }
-
+ [Display(Name = "发货人")]
+ public string Oper { get; set; }
///
- /// 批次
+ /// 客户位置
///
- [Display(Name = "批次")]
- public string Batch { get; set; }
-
+ [Display(Name = "客户位置")]
+ public string Position { get; set; }
+ ///
+ /// 工厂
+ ///
+ [Display(Name = "工厂")]
+ public string Factory { get; set; }
///
/// MES配置码
///
[Display(Name = "MES配置码")]
public string MESConfigCode { get; set; }
-
- ///
- /// 来源库位
- ///
- [Display(Name = "来源库位")]
- public string FromLoc { get; set; }
-
///
/// 目标库位
///
[Display(Name = "目标库位")]
public string ToLoc { get; set; }
-
///
- /// 参照订单生产码
+ /// 单据类型
///
- [Display(Name = "参照订单生产码")]
- public string RefVinCode { get; set; }
-
+ public EnumBillType BillType { get; set; }
///
- /// 单据性质
+ /// 子单据类型
///
- [Display(Name = "单据性质")]
- public string BillCharacter { get; set; }
-
+ [Display(Name = "子单据类型")]
+ public EnumSubBillType SubBillType { get; set; }
///
- /// 发货关联单号
+ /// 事务类型
///
- [Display(Name = "发货关联单号")]
- public string RefBillNum { get; set; }
-
+ [Display(Name = "事务类型")]
+ public EnumDelTransType TransType { get; set; }
///
- /// Erp目标库位
+ /// 发运主类型
///
- [Display(Name = "Erp目标库位")]
- public string ErpToLoc { get; set; }
-
+ [Display(Name = "发运主类型")]
+ public EnumDeliverBjBmpBillType DeliverBillType { get; set; }
+ ///
+ /// 发运子类型
+ ///
+ [Display(Name = "发运子类型")]
+ public EnumDeliverSubBillType DeliverSubBillType { get; set; }
+ ///
+ /// 单据性质
+ ///
+ [Display(Name = "单据性质")]
+ public string BillCharacter { get; set; }
///
/// 原生产码
///
[Display(Name = "原生产码")]
public string OrigiCode { get; set; }
-
+ ///
+ /// 描述
+ ///
+ [Display(Name = "描述")]
+ public string PartDesc { get; set; }
///
/// 备注
///
[Display(Name = "备注")]
public string Remark { get; set; }
-
+ ///
+ /// 业务类型
+ ///
+ [Display(Name = "业务类型")]
+ public EnumProTpe ProType { get; set; }
+ ///
+ /// JIS排序单号
+ ///
+ [Display(Name = "JIS排序单号")]
+ public string OrderNum { get; set; }
+ ///
+ /// JIS实际生产码
+ ///
+ [Display(Name = "JIS实际生产码")]
+ public string RealCode { get; set; }
+ ///
+ /// 来源库位
+ ///
+ [Display(Name = "来源库位")]
+ public string FromLoc { get; set; }
+ ///
+ /// 参照订单生产码
+ ///
+ [Display(Name = "参照订单生产码")]
+ public string RefVinCode { get; set; }
+ ///
+ /// 发货关联单号
+ ///
+ [Display(Name = "发货关联单号")]
+ public string RefBillNum { get; set; }
+ ///
+ /// Erp目标库位
+ ///
+ [Display(Name = "Erp目标库位")]
+ public string ErpToLoc { get; set; }
///
/// 塑件唯一码
///
[Display(Name = "塑件唯一码")]
public string UniqueCode { get; set; }
-
///
/// PJS顺序号
///
[Display(Name = "PJS顺序号")]
public string PjsNum { get; set; }
-
///
/// 虚拟小总成
///
[Display(Name = "虚拟小总成")]
public string MatchNumber { get; set; }
-
///
- /// 发货条码
+ /// 状态
///
- [Display(Name = "发货条码")]
- public string DeliverCode { get; set; }
-
+ [Display(Name = "状态")]
+ public EnumBillState State { get; set; }
///
- /// 客户位置
+ /// 创建时间
///
- [Display(Name = "客户位置")]
- public string Position { get; set; }
-
+ [Display(Name = "创建时间")]
+ public DateTime CreateTime { get; set; }
///
/// 是否有EDI数据
///
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SE_DETAIL.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SE_DETAIL.cs
index 3d25eee2..c3cd5209 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SE_DETAIL.cs
+++ b/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!;
-
///
- /// 单据编号
+ /// JIT订单号
///
- [Display(Name = "单据编号")]
- public string Num { get; set; }
-
+ [Display(Name = "JIT订单号")]
+ [DisplayName("JIT订单号")]
+ public string JISNum { get; set; }
///
- /// 发货时间
+ /// JIT排序生产码
///
- [Display(Name = "发货时间")]
- public DateTime BillTime { get; set; }
-
+ [Display(Name = "JIT排序生产码")]
+ public string VinCode { get; set; }
///
- /// 发货人
+ /// JIT排序生产码类型
///
- [Display(Name = "发货人")]
- public string Oper { get; set; }
-
+ [Display(Name = "JIT排序生产码类型")]
+ public string CodeType { get; set; }
///
- /// 排序单号
+ /// 订单零件号
///
- [Display(Name = "排序单号")]
- public string OrderNum { get; set; }
-
+ [Display(Name = "订单零件号")]
+ public string PartCode { get; set; }
+ ///
+ /// 订单零件号
+ ///
+ [Display(Name = "订单零件号")]
+ public string RealPartCode { get; set; }
+ ///
+ /// 批次
+ ///
+ [Display(Name = "批次")]
+ public string Batch { get; set; }
+ ///
+ /// 客户零件号
+ ///
+ [Display(Name = "客户零件号")]
+ public string CustPartCode { get; set; }
///
/// 订单序号
///
[Display(Name = "订单序号")]
public string Seq { get; set; }
-
///
- /// 实际生产码
+ /// 订单时间
///
- [Display(Name = "实际生产码")]
- public string RealCode { get; set; }
-
+ [Display(Name = "订单时间")]
+ public DateTime AssembleData { get; set; }
///
- /// 订单生产码
+ /// 发货条码
///
- [Display(Name = "订单生产码")]
- public string VinCode { get; set; }
-
+ [Display(Name = "发货条码")]
+ public string DeliverCode { get; set; }
///
- /// 生产码类型
+ /// 发货单号
///
- [Display(Name = "生产码类型")]
- public string CodeType { get; set; }
-
+ [Display(Name = "发货单号")]
+ public string BillNum { get; set; }
///
- /// 实际零件号
+ /// 发货时间
///
- [Display(Name = "实际零件号")]
- public string RealPartCode { get; set; }
-
+ [Display(Name = "发货时间")]
+ public DateTime? BillTime { get; set; }
///
- /// 零件号
+ /// 发货人
///
- [Display(Name = "零件号")]
- public string PartCode { get; set; }
-
+ [Display(Name = "发货人")]
+ public string Oper { get; set; }
///
- /// 批次
+ /// 客户位置
///
- [Display(Name = "批次")]
- public string Batch { get; set; }
-
+ [Display(Name = "客户位置")]
+ public string Position { get; set; }
+ ///
+ /// 工厂
+ ///
+ [Display(Name = "工厂")]
+ public string Factory { get; set; }
///
/// MES配置码
///
[Display(Name = "MES配置码")]
public string MESConfigCode { get; set; }
-
- ///
- /// 来源库位
- ///
- [Display(Name = "来源库位")]
- public string FromLoc { get; set; }
-
///
/// 目标库位
///
[Display(Name = "目标库位")]
public string ToLoc { get; set; }
-
///
- /// 参照订单生产码
+ /// 单据类型
///
- [Display(Name = "参照订单生产码")]
- public string RefVinCode { get; set; }
-
+ public EnumBillType BillType { get; set; }
///
- /// 单据性质
+ /// 子单据类型
///
- [Display(Name = "单据性质")]
- public string BillCharacter { get; set; }
-
+ [Display(Name = "子单据类型")]
+ public EnumSubBillType SubBillType { get; set; }
///
- /// 发货关联单号
+ /// 事务类型
///
- [Display(Name = "发货关联单号")]
- public string RefBillNum { get; set; }
-
+ [Display(Name = "事务类型")]
+ public EnumDelTransType TransType { get; set; }
///
- /// Erp目标库位
+ /// 发运主类型
///
- [Display(Name = "Erp目标库位")]
- public string ErpToLoc { get; set; }
-
+ [Display(Name = "发运主类型")]
+ public EnumDeliverBjBmpBillType DeliverBillType { get; set; }
+ ///
+ /// 发运子类型
+ ///
+ [Display(Name = "发运子类型")]
+ public EnumDeliverSubBillType DeliverSubBillType { get; set; }
+ ///
+ /// 单据性质
+ ///
+ [Display(Name = "单据性质")]
+ public string BillCharacter { get; set; }
///
/// 原生产码
///
[Display(Name = "原生产码")]
public string OrigiCode { get; set; }
-
+ ///
+ /// 描述
+ ///
+ [Display(Name = "描述")]
+ public string PartDesc { get; set; }
///
/// 备注
///
[Display(Name = "备注")]
public string Remark { get; set; }
-
+ ///
+ /// 业务类型
+ ///
+ [Display(Name = "业务类型")]
+ public EnumProTpe ProType { get; set; }
+ ///
+ /// JIS排序单号
+ ///
+ [Display(Name = "JIS排序单号")]
+ public string OrderNum { get; set; }
+ ///
+ /// JIS实际生产码
+ ///
+ [Display(Name = "JIS实际生产码")]
+ public string RealCode { get; set; }
+ ///
+ /// 来源库位
+ ///
+ [Display(Name = "来源库位")]
+ public string FromLoc { get; set; }
+ ///
+ /// 参照订单生产码
+ ///
+ [Display(Name = "参照订单生产码")]
+ public string RefVinCode { get; set; }
+ ///
+ /// 发货关联单号
+ ///
+ [Display(Name = "发货关联单号")]
+ public string RefBillNum { get; set; }
+ ///
+ /// Erp目标库位
+ ///
+ [Display(Name = "Erp目标库位")]
+ public string ErpToLoc { get; set; }
///
/// 塑件唯一码
///
[Display(Name = "塑件唯一码")]
public string UniqueCode { get; set; }
-
///
/// PJS顺序号
///
[Display(Name = "PJS顺序号")]
public string PjsNum { get; set; }
-
///
/// 虚拟小总成
///
[Display(Name = "虚拟小总成")]
public string MatchNumber { get; set; }
-
///
- /// 发货条码
+ /// 状态
///
- [Display(Name = "发货条码")]
- public string DeliverCode { get; set; }
-
+ [Display(Name = "状态")]
+ public EnumBillState State { get; set; }
///
- /// 客户位置
+ /// 创建时间
///
- [Display(Name = "客户位置")]
- public string Position { get; set; }
-
+ [Display(Name = "创建时间")]
+ public DateTime CreateTime { get; set; }
///
/// 是否有EDI数据
///
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/MaterialRelationshipManager.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/MaterialRelationshipManager.cs
new file mode 100644
index 00000000..75072812
--- /dev/null
+++ b/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;
+///
+/// 客户零件关系
+///
+public class MaterialRelationshipManager : DomainService
+{
+ ///
+ /// 客户零件关系仓储
+ ///
+ private readonly INormalEfCoreRepository _materialRelationshipRepository;
+
+ public MaterialRelationshipManager(INormalEfCoreRepository materialRelationshipRepository)
+ {
+ _materialRelationshipRepository = materialRelationshipRepository;
+ }
+
+ ///
+ /// 添加零件关系
+ ///
+ public async Task AddNewMaterialRelationships(IEnumerable 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);
+ }
+ }
+}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIS_RECORD.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIS_RECORD.cs
index 08fd2553..452748c8 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIS_RECORD.cs
+++ b/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; }
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIT_RECORD.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIT_RECORD.cs
index fd21f5f9..67c6d5db 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIT_RECORD.cs
+++ b/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
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230815054853_20230815-3.Designer.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230815054853_20230815-3.Designer.cs
new file mode 100644
index 00000000..6e7b996d
--- /dev/null
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230815054853_20230815-3.Designer.cs
@@ -0,0 +1,5503 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Volo.Abp.EntityFrameworkCore;
+using Win.Sfs.SettleAccount;
+
+namespace Win.Sfs.SettleAccount.Migrations
+{
+ [DbContext(typeof(SettleAccountDbContext))]
+ [Migration("20230815054853_20230815-3")]
+ partial class _202308153
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
+ .HasAnnotation("Relational:MaxIdentifierLength", 128)
+ .HasAnnotation("ProductVersion", "5.0.17")
+ .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
+
+ modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_CAN_SA", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("BusinessType")
+ .HasColumnType("int");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("InvGroupNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("SettleBillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Site")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("State")
+ .HasMaxLength(50)
+ .HasColumnType("int");
+
+ b.Property("Version")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("Set_BBAC_CAN_SA");
+ });
+
+ modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_CAN_SA_DETAIL", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("BusinessType")
+ .HasColumnType("int");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("ContractDocID")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("GroupNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("InvGroupNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("InvbillNum")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsMaiDan")
+ .HasColumnType("bit");
+
+ b.Property("IsReturn")
+ .HasMaxLength(50)
+ .HasColumnType("bit");
+
+ b.Property("KeyCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LU")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("PN")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("PartCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Price")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("Qty")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("SettleBillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("SettleDate")
+ .HasColumnType("datetime2");
+
+ b.Property("Site")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Version")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("Set_BBAC_CAN_SA_DETAIL");
+ });
+
+ modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_NOT_SA_DETAIL", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BusinessType")
+ .HasColumnType("int");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("ContractDocID")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("GroupNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("InvGroupNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("IsMaiDan")
+ .HasColumnType("bit");
+
+ b.Property("IsReturn")
+ .HasMaxLength(50)
+ .HasColumnType("bit");
+
+ b.Property("KeyCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LU")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("PN")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("PartCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Price")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("Qty")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("SettleBillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("SettleDate")
+ .HasColumnType("datetime2");
+
+ b.Property("Site")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Version")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("Set_BBAC_NOT_SA_DETAIL");
+ });
+
+ modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_PD", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("InvGroupNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("SettleBillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Site")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("State")
+ .HasColumnType("int");
+
+ b.Property("Version")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("Set_BBAC_PD");
+ });
+
+ modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_PD_DETAIL", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Extend1")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Extend2")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Extend3")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Extend4")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("GroupNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("InvGroupNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("KeyCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LU")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("PN")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Price")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("Qty")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("RELU")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("REPN")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("SettleDate")
+ .HasColumnType("datetime2");
+
+ b.Property("Site")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Version")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("Set_BBAC_PD_DETAIL");
+ });
+
+ modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SA", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("BusinessType")
+ .HasColumnType("int");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("DNBillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Site")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("State")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Version")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("Set_BBAC_SA");
+ });
+
+ modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SA_DETAIL", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("BusinessType")
+ .HasColumnType("int");
+
+ b.Property("Category")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("GroupNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("IsReturn")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("KeyCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LU")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("LastModificationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("LastModifierId");
+
+ b.Property("PN")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("PartCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Price")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("Qty")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("SettleDate")
+ .HasColumnType("datetime2");
+
+ b.Property("Site")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Version")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("Set_BBAC_SA_DETAIL");
+ });
+
+ modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SE_DETAIL", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AssembleData")
+ .HasColumnType("datetime2");
+
+ b.Property("AssemblyCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("Batch")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("BeginDate")
+ .HasColumnType("datetime2");
+
+ b.Property("BillCharacter")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("BillNum")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("BillTime")
+ .HasColumnType("datetime2");
+
+ b.Property("BillType")
+ .HasColumnType("int");
+
+ b.Property("BusinessType")
+ .HasColumnType("int");
+
+ b.Property("CodeType")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)")
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("CreatorId");
+
+ b.Property("CustPartCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DeleterId")
+ .HasColumnType("uniqueidentifier")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnType("datetime2")
+ .HasColumnName("DeletionTime");
+
+ b.Property("DeliverBillType")
+ .HasColumnType("int");
+
+ b.Property("DeliverCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DeliverSubBillType")
+ .HasColumnType("int");
+
+ b.Property("ErpToLoc")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property