学 赵 1 year ago
parent
commit
7fbed0c48d
  1. BIN
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/assets/导入模版.zip
  2. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
  3. 102
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/adjust.js
  4. 46
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/inventory.js
  5. 89
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js
  6. 12
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/vmi.js
  7. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/invoiceState.js
  8. 55
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_ba_service.js
  9. 55
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_ba_service.js
  10. 77
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_ba_service.js
  11. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/tb_re-parts-relationship_service.js
  12. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/tb_relationship.js
  13. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-data.js
  14. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  15. 41
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/log.js
  16. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_ba_service.js
  17. 44
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs
  18. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_DETAIL.cs
  19. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_EDI.cs
  20. 5401
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230810081159_20230810-3.Designer.cs
  21. 56
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230810081159_20230810-3.cs
  22. 10
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs

BIN
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/assets/导入模版.zip

Binary file not shown.

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

@ -30,7 +30,7 @@ export default {
<el-option v-for="item in options" :key="item.key" :label="item.label" :value="item.value" /> <el-option v-for="item in options" :key="item.key" :label="item.label" :value="item.value" />
</el-select> </el-select>
</template> </template>
<template v-else-if="getInput(schema)==='month'"> <template v-else-if="getInput(schema)==='month'||getInput(schema)==='datetime'">
<el-date-picker v-model="model[prop]" :type="schema.input" :value-format="schema.format" /> <el-date-picker v-model="model[prop]" :type="schema.input" :value-format="schema.format" />
</template> </template>
<template v-else-if="getInput(schema)==='number'"> <template v-else-if="getInput(schema)==='number'">

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

@ -1,4 +1,4 @@
import { billType, codeType, changedType, subBillType } from "./inventory.js"; import { billType, codeType, subBillType } from "./inventory.js";
const schema = { const schema = {
title: "寄售库存调整", title: "寄售库存调整",
@ -7,30 +7,26 @@ const schema = {
logType: { logType: {
title: "库存事务分类", title: "库存事务分类",
type: "string", type: "string",
default: "Type500",
hidden: true, hidden: true,
}, },
changedNumber: { changedType: {
title: "变动单号", title: "变动类型",
type: "string", type: "string",
rules: [ default: "in",
{ hidden: true,
required: true,
},
],
}, },
changedTime: { partCode: {
title: "变动时间", title: "LU零件号",
type: "string", type: "string",
input: "datetime",
rules: [ rules: [
{ {
required: true, required: true,
}, },
], ],
}, },
changedType, customerPartCode: {
changedBy: { title: "客户零件号",
title: "变动人",
type: "string", type: "string",
rules: [ rules: [
{ {
@ -38,26 +34,25 @@ const schema = {
}, },
], ],
}, },
partCode: { codeType,
title: "调整LU零件号", billType,
type: "string", qty: {
title: "数量",
type: "number",
input: "number",
rules: [ rules: [
{ {
required: true, required: true,
}, },
], ],
}, },
customerPartCode: { billTime: {
title: "调整客户零件号", title: "发运日期",
type: "string", type: "string",
rules: [ input: "datetime",
{
required: true,
},
],
}, },
orderNum: { changedNumber: {
title: "EDI原始订单号", title: "变动单号",
type: "string", type: "string",
rules: [ rules: [
{ {
@ -65,39 +60,27 @@ const schema = {
}, },
], ],
}, },
billType, changedTime: {
subBillType, title: "变动时间",
reMark: {
title: "备注",
type: "string", type: "string",
input: "textarea", input: "datetime",
rules: [
{
required: true,
},
],
}, },
vinCode: { deliverTime: {
title: "调整生产码", title: "订单日期",
type: "string", type: "string",
rules: [ input: "datetime",
{
required: true,
},
],
}, },
codeType, erpToLoc: {
qty: { title: "ERP库位",
title: "数量", type: "string",
type: "number",
rules: [ rules: [
{ {
required: true, required: true,
}, },
], ],
}, },
billTime: { orderNum: {
title: "发运日期", title: "EDI原始订单号",
type: "string", type: "string",
rules: [ rules: [
{ {
@ -105,8 +88,8 @@ const schema = {
}, },
], ],
}, },
billNum: { changedBy: {
title: "WMS发运单号", title: "变动人",
type: "string", type: "string",
rules: [ rules: [
{ {
@ -114,18 +97,23 @@ const schema = {
}, },
], ],
}, },
deliverTime: { subBillType,
title: "订单日期", reMark: {
title: "备注",
type: "string",
input: "textarea",
},
vinCode: {
title: "EDI订单生产码",
type: "string", type: "string",
input: "datetime",
rules: [ rules: [
{ {
required: true, required: true,
}, },
], ],
}, },
erpToLoc: { billNum: {
title: "ERP库位", title: "WMS发运单号",
type: "string", type: "string",
rules: [ rules: [
{ {
@ -139,7 +127,7 @@ const schema = {
const baseUrl = "settleaccount/vmi"; const baseUrl = "settleaccount/vmi";
const queryUrl = `${baseUrl}/log`; const queryUrl = `${baseUrl}/log`;
const detailsUrl = `${baseUrl}/get/%s`; const detailsUrl = `${baseUrl}/get/%s`;
const createUrl = `${baseUrl}/create`; const createUrl = "settleaccount/vmi/edit-balance";
const updateUrl = `${baseUrl}/update/%s`; const updateUrl = `${baseUrl}/update/%s`;
const deleteUrl = `${baseUrl}/delete-list`; const deleteUrl = `${baseUrl}/delete-list`;
const importUrl = `${baseUrl}/code-setting-upload-excel-import`; const importUrl = `${baseUrl}/code-setting-upload-excel-import`;

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

@ -29,13 +29,41 @@ const options3 = [
{ value: 9, label: "JIT直供件BBAC" }, { value: 9, label: "JIT直供件BBAC" },
{ value: 10, label: "JIT直供件HBPO" }, { value: 10, label: "JIT直供件HBPO" },
]; ];
const options4 = [ const billType = {
{ value: "In", label: "入库" }, title: "发货类型",
{ value: "Out", label: "出库" }, type: "number",
]; input: "select",
const billType = { title: "发货类型", type: "number", input: "select", options: options1, clearable: true }; options: options1,
const codeType = { title: "生产码类型", type: "string", input: "select", options: options2, clearable: true }; clearable: true,
const subBillType = { title: "发货子类型", type: "number", input: "select", options: options3, clearable: true }; rules: [
const changedType = { title: "变动类型", type: "string", input: "select", options: options4, clearable: true }; {
required: true,
},
],
};
const codeType = {
title: "生产码类型",
type: "string",
input: "select",
options: options2,
clearable: true,
rules: [
{
required: true,
},
],
};
const subBillType = {
title: "发货子类型",
type: "number",
input: "select",
options: options3,
clearable: true,
rules: [
{
required: true,
},
],
};
export { billType, codeType, subBillType, changedType }; export { billType, codeType, subBillType };

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

@ -1,4 +1,4 @@
import { billType, codeType, changedType, subBillType } from "./inventory.js"; import { billType, codeType, subBillType } from "./inventory.js";
//变动单据号、发生时间、生产码类型、、订单号、库位、变动数、EDI顺序号、备注、变动类型(In、Out标识)、发货类型(JIS\JIT\买单件\备件等)、 //变动单据号、发生时间、生产码类型、、订单号、库位、变动数、EDI顺序号、备注、变动类型(In、Out标识)、发货类型(JIS\JIT\买单件\备件等)、
//实扣LU零件号、实扣客户零件号、结算LU零件号、结算客户零件号、实扣生产码、结算生产码 //实扣LU零件号、实扣客户零件号、结算LU零件号、结算客户零件号、实扣生产码、结算生产码
@ -7,47 +7,16 @@ const schema = {
title: "库存事务日志", title: "库存事务日志",
type: "object", type: "object",
properties: { properties: {
changedNumber: {
title: "变动单号",
type: "string",
},
changedTime: {
title: "变动时间",
type: "string",
input: "datetime",
},
changedType,
changedBy: {
title: "变动人",
type: "string",
},
partCode: { partCode: {
title: "LU零件号", title: "LU零件号",
type: "string", type: "string",
}, },
partCode2: {
title: "结算厂内零件号",
type: "string",
},
customerPartCode: { customerPartCode: {
title: "结算客户零件号", title: "客户零件号",
type: "string",
},
realCode: {
title: "WMS实发生产码",
type: "string",
},
vinCode: {
title: "EDI订单生产码",
type: "string",
},
settlementVinCode: {
title: "结算生产码",
type: "string", type: "string",
}, },
codeType, codeType,
billType, billType,
subBillType,
qty: { qty: {
title: "数量", title: "数量",
type: "number", type: "number",
@ -62,6 +31,10 @@ const schema = {
type: "string", type: "string",
input: "datetime", input: "datetime",
}, },
erpToLoc: {
title: "ERP库位",
type: "string",
},
seq: { seq: {
title: "EDI顺序号", title: "EDI顺序号",
type: "string", type: "string",
@ -82,14 +55,40 @@ const schema = {
title: "PJIS生产顺序号", title: "PJIS生产顺序号",
type: "string", type: "string",
}, },
changedNumber: {
title: "变动单号",
type: "string",
},
changedTime: {
title: "变动时间",
type: "string",
input: "datetime",
},
changedBy: {
title: "变动人",
type: "string",
},
partCode2: {
title: "结算厂内零件号",
type: "string",
},
realCode: {
title: "WMS实发生产码",
type: "string",
},
vinCode: {
title: "EDI订单生产码",
type: "string",
},
settlementVinCode: {
title: "结算生产码",
type: "string",
},
subBillType,
isReplenished: { isReplenished: {
title: "是否补货", title: "是否补货",
type: "boolean", type: "boolean",
}, },
erpToLoc: {
title: "ERP库位",
type: "string",
},
configcode: { configcode: {
title: "配置码", title: "配置码",
type: "string", type: "string",
@ -156,10 +155,24 @@ export default function () {
{ {
logic: "and", logic: "and",
column: "billTime", column: "billTime",
action: "like", action: "BiggerThanOrEqual",
value: null,
readOnly: true,
},
{
logic: "and",
column: "billTime",
action: "SmallThanOrEqual",
value: null, value: null,
readOnly: true, readOnly: true,
}, },
{
logic: "and",
column: "isReplenished",
action: "equal",
value: true,
readOnly: true,
},
{ {
logic: "and", logic: "and",
column: "billType", column: "billType",

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

@ -18,10 +18,6 @@ export default function () {
title: "LU零件号", title: "LU零件号",
type: "string", type: "string",
}, },
vinCode: {
title: "生产码",
type: "string",
},
customerPartCode: { customerPartCode: {
title: "客户零件号", title: "客户零件号",
type: "string", type: "string",
@ -83,6 +79,14 @@ export default function () {
title: "WMS实发生产码", title: "WMS实发生产码",
type: "string", type: "string",
}, },
vinCode: {
title: "EDI订单生产码",
type: "string",
},
settlementVinCode: {
title: "结算生产码",
type: "string",
},
}, },
}; };
} }

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

@ -0,0 +1,8 @@
const options1 = [
{ value: 1, label: "正常" },
{ value: 2, label: "报废" },
{ value: 3, label: "提交" },
];
const invoiceState = { title: "发票状态", type: "string", input: "select", options: options1 };
export default invoiceState;

55
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_ba_service.js

@ -1,51 +1,42 @@
import version from "../../version.js"; import version from "../../version.js";
import { state2, state3 } from "../../state.js"; import { state2 as state, state3 } from "../../state.js";
import businessType from "../../businessType.js";
import invoiceState from "../../invoiceState.js";
const schema = { const schema = {
title: "商务审批", title: "商务审批",
type: "object", type: "object",
properties: { properties: {
settleBillNum: { version,
title: "关联结算单号", realnvBillNum: {
title: "金税发票号",
type: "string", type: "string",
}, },
site: { invbillNum: {
title: "工厂地点", title: "系统发票号",
type: "string", type: "string",
}, },
version, amt: {
state2, title: "未税金额",
price: { type: "number",
title: "单价",
type: "decimal",
}, },
billNum: { taxAmt: {
title: "结算单号", title: "税后金额",
type: "string", type: "number",
},
settleDate: {
title: "结算日期",
type: "DateTime",
}, },
invGroupNum: { invGroupNum: {
title: "发票分组号", title: "发票分组号",
type: "string", type: "number",
},
lu: {
title: "零件号",
type: "string",
},
pn: {
title: "生产号",
type: "string",
}, },
qty: { businessType,
title: "结算数量", state,
type: "decimal", invoiceState,
taxDiff: {
title: "发票税后尾差",
type: "number",
}, },
groupNum: { clientCode: {
title: "结算分组号", title: "客户代码",
type: "string", type: "string",
}, },
}, },

55
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_ba_service.js

@ -1,51 +1,42 @@
import version from "../../version.js"; import version from "../../version.js";
import { state2, state3 } from "../../state.js"; import { state2 as state, state3 } from "../../state.js";
import businessType from "../../businessType.js";
import invoiceState from "../../invoiceState.js";
const schema = { const schema = {
title: "不可结算单", title: "不可结算单",
type: "object", type: "object",
properties: { properties: {
state2, version,
settleBillNum: { realnvBillNum: {
title: "关联结算单号", title: "金税发票号",
type: "string", type: "string",
}, },
site: { invbillNum: {
title: "工厂地点", title: "系统发票号",
type: "string", type: "string",
}, },
version, amt: {
price: { title: "未税金额",
title: "单价", type: "number",
type: "decimal",
}, },
billNum: { taxAmt: {
title: "结算单号", title: "税后金额",
type: "string", type: "number",
},
settleDate: {
title: "结算日期",
type: "DateTime",
}, },
invGroupNum: { invGroupNum: {
title: "发票分组号", title: "发票分组号",
type: "string", type: "number",
},
lu: {
title: "零件号",
type: "string",
},
pn: {
title: "生产号",
type: "string",
}, },
qty: { businessType,
title: "结算数量", state,
type: "decimal", invoiceState,
taxDiff: {
title: "发票税后尾差",
type: "number",
}, },
groupNum: { clientCode: {
title: "结算分组号", title: "客户代码",
type: "string", type: "string",
}, },
}, },

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

@ -1,75 +1,46 @@
import version from "./version.js"; import version from "./version.js";
import { state2, state3 } from "./state.js"; import { state2 as state, state3 } from "./state.js";
import businessType from "./businessType.js";
import invoiceState from "./invoiceState.js";
const schema = { const schema = {
title: "结算数据", title: "不可结算单",
type: "object", type: "object",
properties: { properties: {
settleBillNum: { version,
title: "关联结算单号", realnvBillNum: {
title: "金税发票号",
type: "string", type: "string",
}, },
site: { invbillNum: {
title: "工厂地点", title: "系统发票号",
type: "string", type: "string",
}, },
businessType: { amt: {
title: "业务分类", title: "未税金额",
type: "EnumBusinessType", type: "number",
},
version,
state2,
price: {
title: "价格",
type: "decimal",
},
billNum: {
title: "结算单号",
type: "string",
}, },
settleDate: { taxAmt: {
title: "下线日期", title: "税后金额",
type: "DateTime", type: "number",
}, },
invGroupNum: { invGroupNum: {
title: "发票分组号", title: "发票分组号",
type: "string", type: "number",
},
lu: {
title: "零件号",
type: "string",
},
pn: {
title: "发货单号",
type: "string",
},
keycode: {
title: "键值",
type: "string",
}, },
qty: { businessType,
title: "结算数量", state,
type: "decimal", invoiceState,
taxDiff: {
title: "发票税后尾差",
type: "number",
}, },
groupNum: { clientCode: {
title: "结算分组号", title: "客户代码",
type: "decimal",
},
entend1: {
title: "扩展1",
type: "string",
},
entend2: {
title: "扩展2",
type: "string",
},
entend3: {
title: "扩展3",
type: "string", type: "string",
}, },
}, },
}; };
const queryUrl = "settleaccount/pub_ba_service/main-query"; const queryUrl = "settleaccount/pub_ba_service/main-query";
const exportUrl = "settleaccount/pub_ba_service/export"; const exportUrl = "settleaccount/pub_ba_service/export";
const invoiceUrl = "settleaccount/pub_ba_service/generate-invoice"; const invoiceUrl = "settleaccount/pub_ba_service/generate-invoice";

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

@ -5,11 +5,11 @@ const schema = {
type: "object", type: "object",
properties: { properties: {
lu: { lu: {
title: "客户物料号", title: "厂内物料号",
type: "string", type: "string",
}, },
repLU: { repLU: {
title: "替换客户物料号", title: "替换厂内物料号",
type: "string", type: "string",
}, },
businessType: { businessType: {

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/tb_relationship.js

@ -3,7 +3,7 @@ const schema = {
type: "object", type: "object",
properties: { properties: {
project: { project: {
title: "项目", title: "业务类别",
type: "string", type: "string",
readOnly: true, readOnly: true,
showForList: true, showForList: true,
@ -14,7 +14,7 @@ const schema = {
], ],
}, },
value: { value: {
title: "", title: "库位",
type: "string", type: "string",
readOnly: true, readOnly: true,
showForList: true, showForList: true,
@ -24,18 +24,6 @@ const schema = {
}, },
], ],
}, },
description: {
title: "描述",
type: "string",
input: "textarea",
showForList: true,
rules: [
{
required: true,
},
{ max: 60 },
],
},
}, },
}; };

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-data.js

@ -245,7 +245,7 @@ export default [
path: "tb_re-parts-relationship_service", path: "tb_re-parts-relationship_service",
meta: { meta: {
type: "page", type: "page",
title: "客户替换件关系", title: "厂内替换件关系",
icon: "file", icon: "file",
children: [ children: [
{ {

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

@ -3671,7 +3671,7 @@ export default [
}, },
}, },
{ {
path: "data-export", path: "dataExport",
meta: { meta: {
type: "button", type: "button",
title: "补货数据导出", title: "补货数据导出",

41
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/log.js

@ -1,15 +1,52 @@
import AppList from "../../../components/list/index.js"; import AppList from "../../../components/list/index.js";
import html from "html"; import html from "html";
import useConfig from "../../../models/inventory/log.js"; import useConfig from "../../../models/inventory/log.js";
import { reactive, ref } from "vue";
import request from "../../request/index.js";
import { schemaToModel } from "../../utils/index.js";
export default { export default {
components: { AppList }, components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`, template: html`<app-list :config="config" @command="onCommand" />
<el-dialog v-model="dialog" width="45%" title="补货数据导出">
<el-form :model="exportModel" style="height:100%;">
<el-form-item label="" label-width="100px">
开始时间<el-date-picker v-model="exportModel.startDatetime" value-format="YYYY-MM-DD" />
<span style="margin:0 .5em;">-</span>
结束时间<el-date-picker v-model="exportModel.endDatetime" value-format="YYYY-MM-DD" />
</el-form-item>
<el-button type="primary" @click="openDialog" style="margin-left: 10px;">确定</el-button>
</el-form>
</el-dialog> `,
setup() { setup() {
const defaultExportModel = {
startDatetime: "",
endDatetime: "",
};
const exportModel = ref(defaultExportModel);
const config = useConfig(); const config = useConfig();
const dialog = ref(false);
const prop = ref("");
const queryModel = ref(schemaToModel(config.query.schema));
function buildQuery() {
const postData = JSON.parse(JSON.stringify(queryModel.value));
return postData;
}
const openDialog = async () => {
// const url =
// const method =
// const postData = buildQuery();
const response = await request(url, postData, { method });
if (!response.errors) {
window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`));
}
dialog.value = false;
};
const onCommand = async (item, rows) => { const onCommand = async (item, rows) => {
prop.value = item.path;
dialog.value = true;
console.log(item.path, item, rows); console.log(item.path, item, rows);
}; };
return { config, onCommand }; return { config, onCommand, dialog, prop, exportModel, openDialog };
}, },
}; };

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

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

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

@ -0,0 +1,44 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Coravel.Invocable;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using SettleAccount.Domain.BQ;
using Volo.Abp.Application.Services;
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
/// <summary>
/// JisBBAC 发运数据与EDI数据对比
/// </summary>
[ApiExplorerSettings(IgnoreApi = true)]
public class JisBBACSeEdiCompareAppService : ApplicationService, IInvocable
{
private readonly IServiceProvider _serviceProvider;
public JisBBACSeEdiCompareAppService(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
}
/// <summary>
/// 执行
/// </summary>
public async Task Invoke()
{
using var serviceScope = _serviceProvider.CreateScope();
var db = serviceScope.ServiceProvider.GetRequiredService<SettleAccountDbContext>();
var query = db.Set<BBAC_SE_DETAIL>().Join(db.Set<BBAC_SE_EDI>(), a => new { a.PN, a.LU, a.Qty }, b => new { b.PN, b.LU, b.Qty }, (se, edi) => new { se, edi }).Where(t => t.se.IsHaveEdiData == false && t.edi.IsHaveSeData == false);
var ses = query.Select(t => t.se);
var edis = query.Select(t => t.edi);
ses.ForEach(t => t.IsHaveEdiData = true);
edis.ForEach(t => t.IsHaveSeData = true);
db.Set<BBAC_SE_DETAIL>().UpdateRange(ses);
db.Set<BBAC_SE_EDI>().UpdateRange(edis);
await db.SaveChangesAsync().ConfigureAwait(false);
}
}

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

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

5
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_EDI.cs

@ -44,6 +44,11 @@ public class BBAC_SE_EDI:FullAuditedAggregateRoot<Guid>
public string Extend3 { set; get; } public string Extend3 { set; get; }
public string Extend4 { set; get; } public string Extend4 { set; get; }
/// <summary>
/// 是否有发运数据
/// </summary>
[Display(Name = "是否有发运数据")]
public bool IsHaveSeData { get; set; }
public BBAC_SE_EDI() public BBAC_SE_EDI()
{ } { }

5401
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230810081159_20230810-3.Designer.cs

File diff suppressed because it is too large

56
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230810081159_20230810-3.cs

@ -0,0 +1,56 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class _202308103 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("96b1beec-0eef-4ae5-880b-23678addb759"));
migrationBuilder.AddColumn<bool>(
name: "IsHaveSeData",
table: "Set_BBAC_SE_EDI",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "IsHaveEdiData",
table: "Set_BBAC_SE_DETAIL",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("824c911a-6915-42a3-8bb2-bcb4aca93545"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "1d0093aa74814ffd982671a5ac362c52", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("824c911a-6915-42a3-8bb2-bcb4aca93545"));
migrationBuilder.DropColumn(
name: "IsHaveSeData",
table: "Set_BBAC_SE_EDI");
migrationBuilder.DropColumn(
name: "IsHaveEdiData",
table: "Set_BBAC_SE_DETAIL");
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("96b1beec-0eef-4ae5-880b-23678addb759"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "ebf2d34687e14358a9d63dbe3df7abd3", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null });
}
}
}

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

@ -672,6 +672,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasDefaultValue(false) .HasDefaultValue(false)
.HasColumnName("IsDeleted"); .HasColumnName("IsDeleted");
b.Property<bool>("IsHaveEdiData")
.HasColumnType("bit");
b.Property<string>("KeyCode") b.Property<string>("KeyCode")
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("nvarchar(50)");
@ -833,6 +836,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasDefaultValue(false) .HasDefaultValue(false)
.HasColumnName("IsDeleted"); .HasColumnName("IsDeleted");
b.Property<bool>("IsHaveSeData")
.HasColumnType("bit");
b.Property<string>("KeyCode") b.Property<string>("KeyCode")
.HasMaxLength(50) .HasMaxLength(50)
.HasColumnType("nvarchar(50)"); .HasColumnType("nvarchar(50)");
@ -4384,10 +4390,10 @@ namespace Win.Sfs.SettleAccount.Migrations
b.HasData( b.HasData(
new new
{ {
Id = new Guid("96b1beec-0eef-4ae5-880b-23678addb759"), Id = new Guid("824c911a-6915-42a3-8bb2-bcb4aca93545"),
BillTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), BillTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
BillType = 1, BillType = 1,
ConcurrencyStamp = "ebf2d34687e14358a9d63dbe3df7abd3", ConcurrencyStamp = "1d0093aa74814ffd982671a5ac362c52",
DeliverTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), DeliverTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
ErpToLoc = "ErpToLoc", ErpToLoc = "ErpToLoc",
OrderNum = "OrderNum", OrderNum = "OrderNum",

Loading…
Cancel
Save