diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/xiaos-hou.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/xiao-shou.js
similarity index 100%
rename from code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/xiaos-hou.js
rename to code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/xiao-shou.js
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js
index 4cef2986..ff9eadd2 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js
@@ -71,11 +71,11 @@ const schema = {
export default function (businessType) {
let service;
if (businessType === "JisBBAC") {
- service = "bbac_can_sa_service";
+ service = "bbac_not_sa_service";
} else if (businessType === "JisHBPO") {
- service = "hbpo_can_sa_service";
+ service = "hbpo_not_sa_service";
} else {
- service = "pub_can_sa_service";
+ service = "pub_not_sa_service";
}
if (businessType === "JisBBAC" || businessType === "JisHBPO" || businessType === "MaiDanJianBBAC" || businessType === "MaiDanJianHBPO") {
schema.properties.pn.title = "生产码";
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/finance.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/finance.js
new file mode 100644
index 00000000..ddb0d8f6
--- /dev/null
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/finance.js
@@ -0,0 +1,145 @@
+import version from "../version.js";
+import { state2 } from "../state.js";
+import businessType from "../businessType.js";
+import invoiceState from "../invoiceState.js";
+
+const state = Object.assign({}, state2);
+state.input = "tabs";
+const schema = {
+ title: "商务审批",
+ type: "object",
+ properties: {
+ version,
+ realnvBillNum: {
+ title: "金税发票号",
+ type: "string",
+ },
+ invbillNum: {
+ title: "系统发票号",
+ type: "string",
+ link: true,
+ },
+ amt: {
+ title: "未税金额",
+ type: "number",
+ },
+ taxAmt: {
+ title: "税后金额",
+ type: "number",
+ },
+ invGroupNum: {
+ title: "发票分组号",
+ type: "number",
+ link: true,
+ },
+ businessType,
+ state,
+ invoiceState,
+ taxDiff: {
+ title: "发票税后尾差",
+ type: "number",
+ },
+ clientCode: {
+ title: "客户代码",
+ type: "string",
+ },
+ },
+};
+
+export default function () {
+ const service = "invoice_service";
+ const queryUrl = `settleaccount/${service}/main-query`;
+ const exportUrl = `settleaccount/${service}/export`;
+ const invoiceUrl = `settleaccount/${service}/generate-invoice`;
+ const receivedUrl = `settleaccount/${service}/received`;
+ const rejectUrl = `settleaccount/${service}/reject`;
+ const reissueUrl = `settleaccount/${service}/reissue-invoice`;
+ const queryMethod = "POST";
+ const exportMethod = "POST";
+ const invoiceMethod = "POST";
+ const receivedMethod = "POST";
+ const rejectMethod = "POST";
+ const reissueMethod = "POST";
+ return {
+ query: {
+ url: queryUrl,
+ method: queryMethod,
+ hasFilter: true,
+ schema: {
+ title: "商务审批",
+ 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,
+ },
+ {
+ logic: "and",
+ column: "state",
+ action: "equal",
+ value: null,
+ readOnly: true,
+ },
+ ],
+ },
+ skipCount: {
+ hidden: true,
+ default: 0,
+ },
+ maxResultCount: {
+ hidden: true,
+ default: 10,
+ },
+ sorting: {
+ hidden: true,
+ },
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
+ },
+ },
+ },
+ table: {
+ schema: schema,
+ },
+ edit: {
+ exportUrl,
+ invoiceUrl,
+ receivedUrl,
+ rejectUrl,
+ reissueUrl,
+ exportMethod,
+ invoiceMethod,
+ receivedMethod,
+ rejectMethod,
+ reissueMethod,
+ schema: schema,
+ },
+ };
+}
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 02ef6535..a7e2ba79 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
@@ -76,11 +76,7 @@ function createUnableSettleList(path, business, client, title = "不可结算明
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
component: "/settle/unable",
- children: [
- createButton("query", "title=查询&isTop=true"),
- createButton("compare", "title=生成可结算单&isTop=true"),
- createButton("export", "title=导出&isTop=true&pattern=paged"),
- ],
+ children: [createButton("query", "title=查询&isTop=true"), createButton("add", "title=生成可结算单&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")],
};
}
function createCommerceCheckList(path, business, client, title = "商务审批") {
@@ -99,7 +95,7 @@ function createCommerceCheckList(path, business, client, title = "商务审批")
function createVmiOutCheckList(path, business, client, title = "寄售库库存扣减审批") {
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
- component: "/settle/vmi",
+ component: "/settle/finance",
children: [
createButton("query", "title=查询&isTop=true"),
createButton("compare", "title=扣减审核通过&isTop=true"),
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/_list.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/_list.js
new file mode 100644
index 00000000..9d47015c
--- /dev/null
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/_list.js
@@ -0,0 +1,23 @@
+import AppList from "../../components/list/index.js";
+import html from "html";
+import { ref, onMounted } from "vue";
+import { useRoute } from "vue-router";
+
+export default function (model) {
+ return {
+ components: { AppList },
+ template: html``,
+ setup() {
+ const config = ref(null);
+ const route = useRoute();
+ const onCommand = async (item, rows) => {
+ console.log(item.path, item, rows);
+ };
+ onMounted(async () => {
+ const useConfig = (await import(`../models/${model}.js`)).default;
+ config.value = useConfig(route.meta?.businessType);
+ });
+ return { config, onCommand };
+ },
+ };
+}
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bei-jian.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bei-jian.js
index 1948aa7a..6c6985ca 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bei-jian.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bei-jian.js
@@ -1,15 +1,2 @@
-import AppList from "../../components/list/index.js";
-import html from "html";
-import useConfig from "../../models/base-data/bei-jian.js";
-
-export default {
- components: { AppList },
- template: html``,
- setup() {
- const config = useConfig();
- const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
- };
- return { config, onCommand };
- },
-};
+import useList from "../_list.js";
+export default useList("base-data/bei-jian");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bom.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bom.js
index 06acdd0d..6ec517bb 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bom.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bom.js
@@ -1,15 +1,2 @@
-import AppList from "../../components/list/index.js";
-import html from "html";
-import useConfig from "../../models/base-data/bom.js";
-
-export default {
- components: { AppList },
- template: html``,
- setup() {
- const config = useConfig();
- const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
- };
- return { config, onCommand };
- },
-};
+import useList from "../_list.js";
+export default useList("base-data/bom");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/cai-gou.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/cai-gou.js
index 59e91206..8dc1ceb6 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/cai-gou.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/cai-gou.js
@@ -1,15 +1,2 @@
-import AppList from "../../components/list/index.js";
-import html from "html";
-import useConfig from "../../models/base-data/cai-gou.js";
-
-export default {
- components: { AppList },
- template: html``,
- setup() {
- const config = useConfig();
- const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
- };
- return { config, onCommand };
- },
-};
+import useList from "../_list.js";
+export default useList("base-data/cai-gou");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/code-setting.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/code-setting.js
index 6130585f..3fe80ce7 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/code-setting.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/code-setting.js
@@ -1,15 +1,2 @@
-import AppList from "../../components/list/index.js";
-import html from "html";
-import useConfig from "../../models/base-data/code-setting.js";
-
-export default {
- components: { AppList },
- template: html``,
- setup() {
- const config = useConfig();
- const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
- };
- return { config, onCommand };
- },
-};
+import useList from "../_list.js";
+export default useList("base-data/code-setting");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/ke-hu.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/ke-hu.js
index 69f6bdec..4cf6c8c7 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/ke-hu.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/ke-hu.js
@@ -1,15 +1,2 @@
-import AppList from "../../components/list/index.js";
-import html from "html";
-import useConfig from "../../models/base-data/ke-hu.js";
-
-export default {
- components: { AppList },
- template: html``,
- setup() {
- const config = useConfig();
- const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
- };
- return { config, onCommand };
- },
-};
+import useList from "../_list.js";
+export default useList("base-data/ke-hu");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/material-relationship.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/material-relationship.js
index 3cbcb471..e079749b 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/material-relationship.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/material-relationship.js
@@ -1,15 +1,2 @@
-import AppList from "../../components/list/index.js";
-import html from "html";
-import useConfig from "../../models/base-data/material-relationship.js";
-
-export default {
- components: { AppList },
- template: html``,
- setup() {
- const config = useConfig();
- const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
- };
- return { config, onCommand };
- },
-};
+import useList from "../_list.js";
+export default useList("base-data/material-relationship");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/material.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/material.js
index 20b392a0..87a4f60d 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/material.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/material.js
@@ -1,15 +1,2 @@
-import AppList from "../../components/list/index.js";
-import html from "html";
-import useConfig from "../../models/base-data/material.js";
-
-export default {
- components: { AppList },
- template: html``,
- setup() {
- const config = useConfig();
- const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
- };
- return { config, onCommand };
- },
-};
+import useList from "../_list.js";
+export default useList("base-data/material");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/parts-relationship.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/parts-relationship.js
index 3f49b7c6..8d29ef0f 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/parts-relationship.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/parts-relationship.js
@@ -1,15 +1,2 @@
-import AppList from "../../components/list/index.js";
-import html from "html";
-import useConfig from "../../models/base-data/parts-relationship.js";
-
-export default {
- components: { AppList },
- template: html``,
- setup() {
- const config = useConfig();
- const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
- };
- return { config, onCommand };
- },
-};
+import useList from "../_list.js";
+export default useList("base-data/parts-relationship");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/user.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/user.js
index b9ccf33a..38c44650 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/user.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/user.js
@@ -9,9 +9,7 @@ export default {
components: { AppList },
template: html``,
setup() {
- // 变量定义
const config = useConfig();
- // 函数定义
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
if (item.path === "%s/reset-password") {
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/xiao-shou.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/xiao-shou.js
index 5f16f792..bb80ff15 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/xiao-shou.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/xiao-shou.js
@@ -1,15 +1,2 @@
-import AppList from "../../components/list/index.js";
-import html from "html";
-import useConfig from "../../models/base-data/xiaos-hou.js";
-
-export default {
- components: { AppList },
- template: html``,
- setup() {
- const config = useConfig();
- const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
- };
- return { config, onCommand };
- },
-};
+import useList from "../_list.js";
+export default useList("base-data/xiao-shou");
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
index 201b0423..df1d027e 100644
--- 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
@@ -1,3 +1,2 @@
-import useCompare from "./_compare.js"
-
+import useCompare from "./_compare.js";
export default useCompare("fa-yun");
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
index 85a3670b..2f487293 100644
--- 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
@@ -1,3 +1,2 @@
import useCompare from "./_compare.js";
-
export default useCompare("jie-suan");
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
index 03d7615c..be2a470d 100644
--- 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
@@ -1,18 +1,2 @@
-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() {
- const route = useRoute();
- const businessType = route.meta.businessType;
- const config = useConfig(businessType);
- const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
- };
- return { config, onCommand };
- },
-};
+import useList from "../_list.js";
+export default useList("input/edi");
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 af2b7692..d159513a 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,18 +1,2 @@
-import AppList from "../../components/list/index.js";
-import html from "html";
-import { useRoute } from "vue-router";
-import useConfig from "../../models/input/jie-suan.js";
-
-export default {
- components: { AppList },
- template: html``,
- setup() {
- const route = useRoute();
- const businessType = route.meta.businessType;
- const config = useConfig(businessType);
- const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
- };
- return { config, onCommand };
- },
-};
+import useList from "../_list.js";
+export default useList("input/jie-suan");
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js
index e3b3f985..47b708b6 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/unable.js
@@ -11,7 +11,8 @@ export default {
const businessType = route.meta.businessType;
const config = useConfig(businessType);
const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
+ if (item.path === "add") {
+ }
};
return { config, onCommand };
},
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js
index e129a9a8..b14d10a7 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/usable.js
@@ -1,18 +1,37 @@
import AppList from "../../components/list/index.js";
import html from "html";
+import { ref } from "vue";
import { useRoute } from "vue-router";
+import { ElMessageBox } from "element-plus";
import useConfig from "../../models/settle/usable.js";
+import request from "../../request/index.js";
export default {
components: { AppList },
- template: html``,
+ template: html``,
setup() {
+ const appListRef = ref(null);
const route = useRoute();
const businessType = route.meta.businessType;
const config = useConfig(businessType);
const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
+ const url = config.edit.addUrl;
+ if (item.path === "add") {
+ const invbillNum = rows[0].billNum;
+ try {
+ await ElMessageBox.confirm(`"确认为${invbillNum}创建发票?`, "提示", {
+ type: "warning",
+ });
+ appListRef.value.tableLoading = true;
+ const result = request(url, { invbillNum }, { method: "POST" });
+ console.log(result);
+ } catch (e) {
+ console.log(e);
+ } finally {
+ appListRef.value.tableLoading = false;
+ }
+ }
};
- return { config, onCommand };
+ return { appListRef, config, onCommand };
},
};
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Prices/PriceListDtoBase.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Prices/PriceListDtoBase.cs
index 9ec961ed..1e83bb59 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Prices/PriceListDtoBase.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/Prices/PriceListDtoBase.cs
@@ -293,58 +293,55 @@ public class PriceListBJExportDto
///
/// 客户备件价格导入
///
-[Importer(HeaderRowIndex = 22)]
public class PriceListBJImportDto
{
///
/// 客户零件号
///
[Display(Name = "客户零件号")]
- [ImporterHeader(Name = "Part No.")]
+ [ImporterHeader(Name = "客户零件号")]
public string LU { get; set; }
///
/// 价格
///
- [Display(Name = "客户零件号")]
- [ImporterHeader(Name = "Total Price")]
+ [Display(Name = "价格")]
+ [ImporterHeader(Name = "价格")]
public decimal Price { get; set; }
///
/// 开始时间
///
[Display(Name = "开始时间")]
- [ImporterHeader(Name = "Valid From")]
+ [ImporterHeader(Name = "开始时间")]
public DateTime BeginDate { set; get; }
///
/// 结束时间
///
[Display(Name = "结束时间")]
- [ImporterHeader(Name = "Valid To")]
+ [ImporterHeader(Name = "结束时间")]
public DateTime EndDate { set; get; }
///
/// 客户编码
///
- [Display(Name = "客户零件号")]
- [ImporterHeader(Name = "Plant")]
+ [Display(Name = "客户编码")]
+ [ImporterHeader(Name = "客户编码")]
public string ClientCode { get; set; }
///
/// 合同签订时间
///
- [Display(Name = "客户零件号")]
- [ImporterHeader(IsIgnore = true)]
- [ExcelImporterHeadDesc(Row = 1, Cell = 1)]
- public string Date { get; set; }
+ [Display(Name = "合同签订时间")]
+ [ImporterHeader(Name = "合同签订时间")]
+ public DateTime Date { get; set; }
///
/// 合同号
///
- [Display(Name = "客户零件号")]
- [ImporterHeader(IsIgnore = true)]
- [ExcelImporterHeadDesc(Row = 2, Cell = 1)]
+ [Display(Name = "合同号")]
+ [ImporterHeader(Name = "合同号")]
public string ContractNo { get; set; }
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs
index e08ce6f5..97594bae 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs
@@ -5,6 +5,7 @@ using System.LinqAsync;
using System.Security.Policy;
using System.Threading.Tasks;
using AutoMapper;
+using EFCore.BulkExtensions;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
@@ -306,6 +307,7 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase
var bbacCanSa = new BBAC_CAN_SA()
{
BillNum = bbacCanSaBillNum,
+ InvGroupNum = bbacCanSaBillNum,
SettleBillNum = bbacSaBillNum,
State = SettleBillState.未结状态,
BusinessType = _businessType
@@ -323,6 +325,7 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase
bbacSaDetails.ForEach(bbacSaDetail =>
{
+ bbacSaDetail.SetId(GuidGenerator.Create());
List lus = bbacSaDetail.LU.Split(" ").ToList();
bbacSaDetail.LU = lus[0].Replace(" ", "");
if (lus.Count > 1)
@@ -379,10 +382,9 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase
#region 添加入库
await _bbacSaRepository.InsertAsync(bbacSa);
- await _bbacSaDetailRepository.InsertManyAsync(bbacSaDetails);
+ await _bbacSaDetailRepository.DbContext.BulkInsertAsync(bbacSaDetails);
if (bbacCanSaDetails.Count > 0)
{
- bbacCanSa.InvGroupNum = bbacCanSaDetails.Count.ToString();
bbacCanSaDetails.ForEach(bbacCanSaDetail =>
{
bbacCanSaDetail.BillNum = bbacCanSaDetail.InvGroupNum = bbacCanSaBillNum;
@@ -390,7 +392,7 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase
});
await _bbacCanSaRepository.InsertAsync(bbacCanSa);
- await _bbacCanSaDetailRepository.InsertManyAsync(bbacCanSaDetails);
+ await _bbacCanSaDetailRepository.DbContext.BulkInsertAsync(bbacCanSaDetails);
}
if (bbacNotSaDetails.Count > 0)
{
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs
index 83078799..448995f5 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs
@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
+using EFCore.BulkExtensions;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
@@ -305,6 +306,7 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase
var hbpoCanSa = new HBPO_CAN_SA()
{
BillNum = hbpoCanSaBillNum,
+ InvGroupNum = hbpoCanSaBillNum,
SettleBillNum = hbpoSaBillNum,
State = SettleBillState.未结状态,
BusinessType = _businessType,
@@ -323,6 +325,7 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase
hbpoSaDetails.ForEach(hbpoSaDetail =>
{
+ hbpoSaDetail.SetId(GuidGenerator.Create());
List lus = hbpoSaDetail.LU.Split(" ").ToList();
hbpoSaDetail.LU = lus[0].Replace(" ", "");
if (lus.Count > 1)
@@ -379,21 +382,20 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase
#region 添加入库
await _hbpoSaRepository.InsertAsync(hbpoSa).ConfigureAwait(false);
- await _hbpoSaDetailRepository.InsertManyAsync(hbpoSaDetails).ConfigureAwait(false);
+ await _hbpoSaDetailRepository.DbContext.BulkInsertAsync(hbpoSaDetails).ConfigureAwait(false);
if (hbpoCanSaDetails.Count > 0)
{
- hbpoCanSa.InvGroupNum = hbpoCanSaDetails.Count.ToString();
hbpoCanSaDetails.ForEach(hbpoCanSaDetail =>
{
hbpoCanSaDetail.BillNum = hbpoCanSaDetail.InvGroupNum = hbpoCanSaBillNum;
});
await _hbpoCanSaRepository.InsertAsync(hbpoCanSa).ConfigureAwait(false);
- await _hbpoCanSaDetailRepository.InsertManyAsync(hbpoCanSaDetails).ConfigureAwait(false);
+ await _hbpoCanSaDetailRepository.DbContext.BulkInsertAsync(hbpoCanSaDetails).ConfigureAwait(false);
}
if (hbpoNotSaDetails.Count > 0)
{
- await _hbpoNotSaDetailRepository.InsertManyAsync(hbpoNotSaDetails).ConfigureAwait(false);
+ await _hbpoNotSaDetailRepository.DbContext.BulkInsertAsync(hbpoNotSaDetails).ConfigureAwait(false);
}
if (materialRelationships.Count > 0)
{
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 09354fc6..7f637fa7 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
@@ -67,6 +67,11 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase
///
private readonly INormalEfCoreRepository _priceListRepository;
+ ///
+ /// 备件价格仓储
+ ///
+ private readonly INormalEfCoreRepository _priceBjListRepository;
+
///
/// 客户零件关系仓储
///
@@ -86,6 +91,7 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase
INormalEfCoreRepository pubCanSaDetailRepository,
INormalEfCoreRepository pubNotSaDetailRepository,
INormalEfCoreRepository priceListRepository,
+ INormalEfCoreRepository priceBjListRepository,
INormalEfCoreRepository materialRelationshipRepository,
INormalEfCoreRepository tbRePartsRelationshipRepository,
IDistributedCache cache,
@@ -100,6 +106,7 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase
_pubCanSaDetailRepository = pubCanSaDetailRepository;
_pubNotSaDetailRepository = pubNotSaDetailRepository;
_priceListRepository = priceListRepository;
+ _priceBjListRepository = priceBjListRepository;
_materialRelationshipRepository = materialRelationshipRepository;
_tbRePartsRelationshipRepository = tbRePartsRelationshipRepository;
}
@@ -460,9 +467,6 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase
var materialRelationships = new List();
#region 处理结算数据
- //销售价格
- var priceListEntitys = await _priceListRepository.GetAllAsync().ConfigureAwait(false);
-
pubSaDetails.ForEach(importPubSaDetail =>
{
importPubSaDetail.SetId(GuidGenerator.Create());
@@ -479,11 +483,30 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase
importPubSaDetail.Version = _version;
importPubSaDetail.BusinessType = businessType;
importPubSaDetail.Site = "XX工厂";
-
- //根据物料号、结算日期获取价格
- var priceListEntity = priceListEntitys.Find(t => t.LU == importPubSaDetail.LU && importPubSaDetail.SettleDate > t.BeginTime && importPubSaDetail.SettleDate < t.EndTime);
- importPubSaDetail.Price = priceListEntity?.Price ?? 0;
});
+ var lus = pubSaDetails.Select(t => t.LU).Distinct().ToList();
+ if (businessType == EnumBusinessType.BeiJian)
+ {
+ //备件销售价格
+ var priceListEntitys = _priceBjListRepository.Where(t => lus.Contains(t.LU)).ToList();
+ pubSaDetails.ForEach(importPubSaDetail =>
+ {
+ //根据物料号、结算日期获取价格
+ var priceListEntity = priceListEntitys.Find(t => t.LU == importPubSaDetail.LU && importPubSaDetail.SettleDate >= t.BeginDate && importPubSaDetail.SettleDate <= t.EndDate);
+ importPubSaDetail.Price = priceListEntity?.Price ?? 0;
+ });
+ }
+ else
+ {
+ //销售价格
+ var priceListEntitys = _priceListRepository.Join(lus, a => a.LU, b => b, (a, b) => a).ToList();
+ pubSaDetails.ForEach(importPubSaDetail =>
+ {
+ //根据物料号、结算日期获取价格
+ var priceListEntity = priceListEntitys.Find(t => t.LU == importPubSaDetail.LU && importPubSaDetail.SettleDate >= t.BeginTime && importPubSaDetail.SettleDate <= t.EndTime);
+ importPubSaDetail.Price = priceListEntity?.Price ?? 0;
+ });
+ }
//导入的零件号集合
var importPubSaLUs = pubSaDetails.Select(t => t.LU).Distinct();
@@ -544,6 +567,7 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase
var pubCanSa = new PUB_CAN_SA()
{
BillNum = pubCanSaBillNum,
+ InvGroupNum = pubCanSaBillNum,
SettleBillNum = pubSaBillNum,
State = SettleBillState.未结状态,
BusinessType = pubSa.BusinessType,
@@ -571,7 +595,6 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase
(await _pubSaDetailRepository.GetDbContextAsync().ConfigureAwait(false)).BulkInsert(pubSaDetails);
if (pubCanSaDetails.Count > 0)
{
- pubCanSa.InvGroupNum = pubCanSaDetails.Count.ToString();
pubCanSaDetails.ForEach(pubCanSaDetail =>
{
pubCanSaDetail.BillNum = pubCanSaDetail.InvGroupNum = pubCanSaBillNum;
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 01bba453..feec51ae 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
@@ -36,7 +36,7 @@ public class BeiSeSyncAppService : JitSeSyncAppService, IJobService
SyncDeliverBillType = EnumDeliverBjBmpBillType.北汽4S备件,
SyncDeliverSubBillTypes = new List
{
- EnumDeliverSubBillType.无
+ EnumDeliverSubBillType.北汽4S备件BBAC
},
BusinessType = EnumBusinessType.BeiJian
};
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeSyncBaseAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeSyncBaseAppService.cs
index 1e5e8e21..531d06a4 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeSyncBaseAppService.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeSyncBaseAppService.cs
@@ -8,7 +8,6 @@ using EFCore.BulkExtensions;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ;
using Volo.Abp.Application.Services;
-using Volo.Abp.Uow;
using Win.Sfs.SettleAccount.Entities.BQ.Managers;
using Win.Sfs.SettleAccount.EntityFrameworkCore;
using Win.Sfs.SettleAccount.MaterialRelationships;
@@ -74,13 +73,13 @@ public class JisBBACSeSyncBaseAppService : ApplicationService, IInvocable
return;
}
await SyncJitRecordAsync().ConfigureAwait(false);
+ await CurrentUnitOfWork.SaveChangesAsync().ConfigureAwait(false);
await SyncJisRecordAsync().ConfigureAwait(false);
}
///
/// 同步JitRecord
///
- [UnitOfWork]
private async Task SyncJitRecordAsync()
{
//同步表名称
@@ -115,6 +114,7 @@ public class JisBBACSeSyncBaseAppService : ApplicationService, IInvocable
jisSeDetails.ForEach(t =>
{
+ t.SetId(GuidGenerator.Create());
t.BusinessType = businessType;
t.KeyCode = t.PN + t.LU;
});
@@ -140,7 +140,6 @@ public class JisBBACSeSyncBaseAppService : ApplicationService, IInvocable
///
/// 同步JisRecord
///
- [UnitOfWork]
private async Task SyncJisRecordAsync()
{
//同步表名称
@@ -175,6 +174,7 @@ public class JisBBACSeSyncBaseAppService : ApplicationService, IInvocable
jisSeDetails.ForEach(t =>
{
+ t.SetId(GuidGenerator.Create());
t.BusinessType = businessType;
t.KeyCode = t.PN + t.LU;
});
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeSyncBaseAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeSyncBaseAppService.cs
index 402756d5..9eb57708 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeSyncBaseAppService.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeSyncBaseAppService.cs
@@ -74,6 +74,7 @@ public class JisHBPOSeSyncBaseAppService : ApplicationService, IInvocable
return;
}
await SyncJitRecordAsync().ConfigureAwait(false);
+ await CurrentUnitOfWork.SaveChangesAsync().ConfigureAwait(false);
await SyncJisRecordAsync().ConfigureAwait(false);
}
@@ -115,7 +116,8 @@ public class JisHBPOSeSyncBaseAppService : ApplicationService, IInvocable
jisSeDetails.ForEach(t =>
{
- //t.BusinessType = businessType;
+ t.SetId(GuidGenerator.Create());
+ t.BusinessType = businessType;
t.KeyCode = t.PN + t.LU;
});
await _jisSeDetailRepository.DbContext.BulkInsertAsync(jisSeDetails).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 93011086..aa5c29d2 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
@@ -106,6 +106,7 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
pubSeDetails.ForEach(t =>
{
+ t.SetId(GuidGenerator.Create());
t.BusinessType = businessType;
t.KeyCode = t.PN + t.LU;
});
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 a39dbfcb..0a81b555 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
@@ -36,7 +36,7 @@ public class YinDuSeSyncAppService : JitSeSyncAppService, IJobService
SyncDeliverBillType = EnumDeliverBjBmpBillType.印度件,
SyncDeliverSubBillTypes = new List
{
- EnumDeliverSubBillType.无
+ EnumDeliverSubBillType.印度件BBAC
},
BusinessType = EnumBusinessType.YinDuJian
};
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
index 8d16d0a5..2e53e2cf 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
@@ -562,8 +562,7 @@ namespace Win.Sfs.SettleAccount
///
private void CreateMapPriceListBJ()
{
- CreateMap()
- .ForMember(x => x.Date, y => y.MapFrom(y => DateTime.ParseExact(y.Date, "dd.MM.yyyy", System.Globalization.CultureInfo.CurrentCulture)));
+ CreateMap();
CreateMap().ReverseMap();
CreateMap().ReverseMap();
@@ -1128,37 +1127,6 @@ namespace Win.Sfs.SettleAccount
///
private void CreateMapSeSync()
{
- CreateMap()
- .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.CustPartCode))
- .ForMember(x => x.FactoryPartCode, y => y.MapFrom(d => d.RealPartCode))
- .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.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.CustPartCode))
- .ForMember(x => x.FactoryPartCode, y => y.MapFrom(d => d.RealPartCode))
- .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.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.FactoryPartCode, y => y.MapFrom(d => d.RealPartCode))
- .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))
@@ -1168,7 +1136,7 @@ namespace Win.Sfs.SettleAccount
.ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum))
.ForMember(x => x.LU, y => y.MapFrom(d => d.CustPartCode))
.ForMember(x => x.FactoryPartCode, y => y.MapFrom(d => d.RealPartCode))
- .ForMember(x => x.PN, y => y.MapFrom(d => d.VinCode))
+ .ForMember(x => x.PN, y => y.MapFrom(d => d.OrderNum))
.ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
CreateMap()
.ForMember(x => x.SeqNumber, y => y.MapFrom(d => d.JISNum))
@@ -1179,7 +1147,7 @@ namespace Win.Sfs.SettleAccount
.ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum))
.ForMember(x => x.LU, y => y.MapFrom(d => d.CustPartCode))
.ForMember(x => x.FactoryPartCode, y => y.MapFrom(d => d.RealPartCode))
- .ForMember(x => x.PN, y => y.MapFrom(d => d.VinCode))
+ .ForMember(x => x.PN, y => y.MapFrom(d => d.OrderNum))
.ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
CreateMap()
.ForMember(x => x.BeginDate, y => y.MapFrom(d => d.BillTime))
@@ -1187,7 +1155,38 @@ namespace Win.Sfs.SettleAccount
.ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum))
.ForMember(x => x.LU, y => y.MapFrom(d => d.CustPartCode))
.ForMember(x => x.FactoryPartCode, y => y.MapFrom(d => d.RealPartCode))
- .ForMember(x => x.PN, y => y.MapFrom(d => d.VinCode))
+ .ForMember(x => x.PN, y => y.MapFrom(d => d.OrderNum))
+ .ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
+
+ CreateMap()
+ .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.CustPartCode))
+ .ForMember(x => x.FactoryPartCode, y => y.MapFrom(d => d.RealPartCode))
+ .ForMember(x => x.PN, y => y.MapFrom(d => d.JISNum))
+ .ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
+ CreateMap()
+ .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.CustPartCode))
+ .ForMember(x => x.FactoryPartCode, y => y.MapFrom(d => d.RealPartCode))
+ .ForMember(x => x.PN, y => y.MapFrom(d => d.JISNum))
+ .ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
+ CreateMap()
+ .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.FactoryPartCode, y => y.MapFrom(d => d.RealPartCode))
+ .ForMember(x => x.PN, y => y.MapFrom(d => d.JISNum))
.ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
CreateMap()
@@ -1196,7 +1195,7 @@ namespace Win.Sfs.SettleAccount
.ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum))
.ForMember(x => x.LU, y => y.MapFrom(d => d.CustPartCode))
.ForMember(x => x.FactoryPartCode, y => y.MapFrom(d => d.PartCode))
- .ForMember(x => x.PN, y => y.MapFrom(d => d.BillNum))
+ .ForMember(x => x.PN, y => y.MapFrom(d => d.DeliveryIndex))
.ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SA.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SA.cs
index 846f1943..1d894db1 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SA.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SA.cs
@@ -153,4 +153,9 @@ public class BBAC_SA_DETAIL:SA_BASE
{
}
+
+ public void SetId(Guid id)
+ {
+ Id = id;
+ }
}
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 8e154b05..a5f3d222 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
@@ -270,9 +270,8 @@ public class BBAC_SE_DETAIL:SE_BASE
}
- public BBAC_SE_DETAIL SetQty(decimal qty)
+ public void SetId(Guid id)
{
- this.Qty = qty;
- return this;
+ Id = id;
}
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SA.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SA.cs
index 1fd2efac..3d0c0e0d 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SA.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SA.cs
@@ -142,4 +142,9 @@ public class HBPO_SA_DETAIL : SA_BASE
public HBPO_SA_DETAIL()
{
}
+
+ public void SetId(Guid id)
+ {
+ Id = id;
+ }
}
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 ddee7464..ff4eea93 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
@@ -10,6 +10,12 @@ namespace SettleAccount.Domain.BQ;
[Display(Name = "HBPO发运数据")]
public class HBPO_SE_DETAIL :SE_BASE
{
+ ///
+ /// 业务分类
+ ///
+ [Display(Name = "业务分类")]
+ public EnumBusinessType BusinessType { get; set; }
+
//[Display(Name = "LU+生产码")]
//public string KeyCode { get; set; } = null!;
@@ -263,4 +269,9 @@ public class HBPO_SE_DETAIL :SE_BASE
public HBPO_SE_DETAIL()
{
}
+
+ public void SetId(Guid id)
+ {
+ Id = id;
+ }
}
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
index 75072812..9cda2e60 100644
--- 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
@@ -4,6 +4,7 @@ using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Domain.Services;
+using Win.Sfs.SettleAccount.Entities.Prices;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase;
@@ -28,13 +29,15 @@ public class MaterialRelationshipManager : DomainService
///
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();
+ //新客户零件号和厂内零件号
+ var noHaveLuRePartCodes = from item1 in materialRelationships
+ join item2 in _materialRelationshipRepository
+ on new { item1.ErpMaterialCode, item1.SettleMaterialCode } equals new { item2.ErpMaterialCode, item2.SettleMaterialCode }
+ into temp
+ from item3 in temp.DefaultIfEmpty()
+ where item3 == null
+ select item1;
+
if (noHaveLuRePartCodes.Any())
{
await _materialRelationshipRepository.InsertManyAsync(noHaveLuRePartCodes).ConfigureAwait(false);
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_SE_DETAIL.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_SE_DETAIL.cs
index d655c647..91dbf95f 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_SE_DETAIL.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_SE_DETAIL.cs
@@ -193,4 +193,9 @@ public class PUB_SE_DETAIL :SE_BASE
public PUB_SE_DETAIL()
{
}
+
+ public void SetId(Guid id)
+ {
+ Id = id;
+ }
}
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 86988df7..90998ba1 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
@@ -203,4 +203,6 @@ public enum EnumDeliverSubBillType
小件HBPO = 8,
JIT直供件BBAC = 9,
JIT直供件HBPO = 10,
+ 印度件BBAC = 11,
+ 北汽4S备件BBAC = 12,
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230817051027_20230817-4.Designer.cs b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230817051027_20230817-4.Designer.cs
new file mode 100644
index 00000000..8832b286
--- /dev/null
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230817051027_20230817-4.Designer.cs
@@ -0,0 +1,5542 @@
+//
+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("20230817051027_20230817-4")]
+ partial class _202308174
+ {
+ 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("ExtraProperties")
+ .HasColumnType("nvarchar(max)")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("Factory")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("FactoryPartCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("FromLoc")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("InjectionCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false)
+ .HasColumnName("IsDeleted");
+
+ b.Property("IsHaveEdiData")
+ .HasColumnType("bit");
+
+ b.Property("JISNum")
+ .HasColumnType("nvarchar(max)");
+
+ 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("MESConfigCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("MatchNumber")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Oper")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("OrderNum")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("OrigiCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PN")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("PartCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PartDesc")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PjsNum")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Position")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ProType")
+ .HasColumnType("int");
+
+ b.Property("Qty")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("RealCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RealPartCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RefBillNum")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RefVinCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Remark")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Seq")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("SeqNumber")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("ShippingDate")
+ .HasColumnType("datetime2");
+
+ b.Property("State")
+ .HasColumnType("int");
+
+ b.Property("SubBillType")
+ .HasColumnType("int");
+
+ b.Property("ToLoc")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TransType")
+ .HasColumnType("int");
+
+ b.Property("UID")
+ .HasColumnType("bigint");
+
+ b.Property("UniqueCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Version")
+ .HasColumnType("int");
+
+ b.Property("VinCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("WmsBillNum")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.HasKey("Id");
+
+ b.ToTable("Set_BBAC_SE_DETAIL");
+ });
+
+ modelBuilder.Entity("SettleAccount.Domain.BQ.BBAC_SE_EDI", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AssemblyCode")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property("BeginDate")
+ .HasColumnType("datetime2");
+
+ 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")
+ .HasMaxLength(50)
+ .HasColumnType("nvarchar(50)");
+
+ b.Property