From 49eab561b788642108e68597749e9ddd27f3815f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A7=9C=E6=97=AD=E4=B9=8B?=
<12930972+jiang-xuzhi@user.noreply.gitee.com>
Date: Fri, 11 Aug 2023 10:07:37 +0800
Subject: [PATCH 01/13] =?UTF-8?q?=E5=8F=AA=E6=9C=89=E5=9C=A8succeeded?=
=?UTF-8?q?=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=EF=BC=8C=E4=B8=8B=E8=BD=BD?=
=?UTF-8?q?=E6=8C=89=E9=92=AE=E5=8F=AF=E4=BB=A5=E7=94=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../wwwroot/router/business.js | 128 ++++++++++++++++++
1 file changed, 128 insertions(+)
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 dcf18f4b..f174d981 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
@@ -210,6 +210,7 @@ export default [
title: "下载",
icon: "file",
pattern: "paged",
+ disabled: "o=>o.stateName!='Succeeded'",
},
},
],
@@ -423,6 +424,23 @@ export default [
pattern: "paged",
},
},
+ {
+ path: "passed",
+ meta: {
+ type: "button",
+ title: "审核通过",
+ icon: "file",
+ isTop: true,
+ },
+ },
+ {
+ path: "reopen",
+ meta: {
+ type: "button",
+ title: "重开",
+ icon: "file",
+ },
+ },
],
},
{
@@ -941,6 +959,23 @@ export default [
pattern: "paged",
},
},
+ {
+ path: "passed",
+ meta: {
+ type: "button",
+ title: "审核通过",
+ icon: "file",
+ isTop: true,
+ },
+ },
+ {
+ path: "reopen",
+ meta: {
+ type: "button",
+ title: "重开",
+ icon: "file",
+ },
+ },
],
},
{
@@ -1393,6 +1428,23 @@ export default [
pattern: "paged",
},
},
+ {
+ path: "passed",
+ meta: {
+ type: "button",
+ title: "审核通过",
+ icon: "file",
+ isTop: true,
+ },
+ },
+ {
+ path: "reopen",
+ meta: {
+ type: "button",
+ title: "重开",
+ icon: "file",
+ },
+ },
],
},
{
@@ -1837,6 +1889,23 @@ export default [
pattern: "paged",
},
},
+ {
+ path: "passed",
+ meta: {
+ type: "button",
+ title: "审核通过",
+ icon: "file",
+ isTop: true,
+ },
+ },
+ {
+ path: "reopen",
+ meta: {
+ type: "button",
+ title: "重开",
+ icon: "file",
+ },
+ },
],
},
{
@@ -2501,6 +2570,23 @@ export default [
pattern: "paged",
},
},
+ {
+ path: "passed",
+ meta: {
+ type: "button",
+ title: "审核通过",
+ icon: "file",
+ isTop: true,
+ },
+ },
+ {
+ path: "reopen",
+ meta: {
+ type: "button",
+ title: "重开",
+ icon: "file",
+ },
+ },
],
},
{
@@ -2918,6 +3004,23 @@ export default [
pattern: "paged",
},
},
+ {
+ path: "passed",
+ meta: {
+ type: "button",
+ title: "审核通过",
+ icon: "file",
+ isTop: true,
+ },
+ },
+ {
+ path: "reopen",
+ meta: {
+ type: "button",
+ title: "重开",
+ icon: "file",
+ },
+ },
],
},
{
@@ -3332,6 +3435,23 @@ export default [
pattern: "paged",
},
},
+ {
+ path: "passed",
+ meta: {
+ type: "button",
+ title: "审核通过",
+ icon: "file",
+ isTop: true,
+ },
+ },
+ {
+ path: "reopen",
+ meta: {
+ type: "button",
+ title: "重开",
+ icon: "file",
+ },
+ },
],
},
{
@@ -3490,6 +3610,14 @@ export default [
pattern: "paged",
},
},
+ {
+ path: "reopen",
+ meta: {
+ type: "button",
+ title: "重开",
+ icon: "file",
+ },
+ },
],
},
{
From d7f78d2cea86c9c2386d403655090e5473fa8e14 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A7=9C=E6=97=AD=E4=B9=8B?=
<12930972+jiang-xuzhi@user.noreply.gitee.com>
Date: Fri, 11 Aug 2023 10:11:09 +0800
Subject: [PATCH 02/13] =?UTF-8?q?=E4=BF=AE=E6=94=B9log?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../wwwroot/models/inventory/log.js | 45 ++++++++++---------
.../wwwroot/views/inventory/log.js | 6 +--
2 files changed, 27 insertions(+), 24 deletions(-)
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js
index 6003865a..3e38b21a 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js
@@ -152,27 +152,30 @@ export default function () {
value: null,
readOnly: true,
},
- {
- logic: "and",
- column: "billTime",
- action: "BiggerThanOrEqual",
- value: null,
- readOnly: true,
- },
- {
- logic: "and",
- column: "billTime",
- action: "SmallThanOrEqual",
- value: null,
- readOnly: true,
- },
- {
- logic: "and",
- column: "isReplenished",
- action: "equal",
- value: true,
- readOnly: true,
- },
+ // {
+ // logic: "and",
+ // column: "billTime",
+ // action: "biggerThanOrEqual",
+ // value: null,
+ // readOnly: true,
+ // hidden: true,
+ // },
+ // {
+ // logic: "and",
+ // column: "billTime",
+ // action: "smallThanOrEqual",
+ // value: null,
+ // readOnly: true,
+ // hidden: true,
+ // },
+ // {
+ // logic: "and",
+ // column: "isReplenished",
+ // action: "equal",
+ // value: true,
+ // readOnly: true,
+ // hidden: true,
+ // },
{
logic: "and",
column: "billType",
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/log.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/log.js
index e47f63fa..6bd46998 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/log.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/log.js
@@ -33,9 +33,9 @@ export default {
return postData;
}
const openDialog = async () => {
- // const url =
- // const method =
- // const postData = buildQuery();
+ const url = "settleaccount/vmi/replenished-export";
+ const method = "POST";
+ const postData = buildQuery();
const response = await request(url, postData, { method });
if (!response.errors) {
window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`));
From 6e165656033d3b519cb8e1da5859337ce18f7468 Mon Sep 17 00:00:00 2001
From: wanggang <76527413@qq.com>
Date: Fri, 11 Aug 2023 10:57:01 +0800
Subject: [PATCH 03/13] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AF=84=E5=94=AE?=
=?UTF-8?q?=E5=BA=93=E5=AD=98=E5=AF=BC=E5=87=BA=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../wwwroot/components/form/form-input.js | 6 +-
.../wwwroot/components/table/index.js | 60 ++-
.../views/invoice/invoice_map_group.js | 397 +++++++++++-------
.../Entities/BQ/VmiAppService.cs | 68 ++-
4 files changed, 349 insertions(+), 182 deletions(-)
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
index 969aef8e..9e9df487 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
@@ -31,7 +31,11 @@ export default {
-
+
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/table/index.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/table/index.js
index e03d66d6..07222ad5 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/table/index.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/table/index.js
@@ -1,16 +1,29 @@
import html from "html";
+import { reactive, ref } from "vue";
export default {
- template: html`
+ template: html`
-
{{item.title}}
+
+
+
+
{{item.title}}
-
+
-
-
{{val}}
+
+
+
+
+
{{row[item.dataKey]}}
@@ -19,12 +32,12 @@ export default {
.app-table {
display: table;
content-visibility: visible;
+ border-top: var(--el-table-border);
+ border-left: var(--el-table-border);
}
.app-table .row {
display: table-row;
background-color: var(--el-table-tr-bg-color);
- border-top: var(--el-table-border);
- border-left: var(--el-table-border);
}
.app-table .cell.el-table__cell {
display: table-cell;
@@ -34,6 +47,35 @@ export default {
}
`,
props: ["modelValue", "columns", "data"],
- emit: ["update:modelValue"],
- setup(props, context) {},
+ setup(props) {
+ const model = reactive(props.data);
+ const tableRef = ref(null);
+ const getSelection = () => {
+ return Array.from(tableRef.value.querySelectorAll("input.row:checked")).map((o) => parseInt(o.value));
+ };
+ const clearSelection = () => {
+ Array.from(tableRef.value.querySelectorAll("input:checked")).forEach((o) => (o.checked = false));
+ };
+ const checkAll = ref(false);
+ const checkAllIndeterminate = ref(false);
+ const checkAllClick = (e) => {
+ checkAll.value = !checkAll.value;
+ if (checkAll.value) {
+ Array.from(tableRef.value.querySelectorAll("input.row:not(:checked)")).forEach((o) => (o.checked = true));
+ } else {
+ Array.from(tableRef.value.querySelectorAll("input.row:checked)")).forEach((o) => (o.checked = false));
+ }
+ const checkdCount = Array.from(tableRef.value.querySelectorAll("input.row:checked")).length;
+ checkAllIndeterminate.value = checkdCount > 0 && checkdCount < props.data.length;
+ };
+ return {
+ model,
+ tableRef,
+ checkAll,
+ checkAllIndeterminate,
+ checkAllClick,
+ getSelection,
+ clearSelection,
+ };
+ },
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js
index ba203786..c132813a 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js
@@ -1,4 +1,5 @@
import AppList from "../../../components/list/index.js";
+import AppForm from "../../../components/form/index.js";
import html from "html";
import { reactive, ref } from "vue";
import useConfig from "../../../models/invoice/invoice_map_group.js";
@@ -6,124 +7,121 @@ import request from "../../../request/index.js";
import AppTable from "../../components/table/index.js";
import { ElMessageBox } from "element-plus";
import { post } from "../../../request/index.js";
+import { schemaToModel } from "html";
export default {
- components: { AppList, AppTable },
+ components: { AppList, AppForm, AppTable },
template: html`
结算明细
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
- `,
+
+
+ 发票重开
+
+
+
+
+
+
+
+ 新建
+ 导入
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 添加调整明细
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+
+ `,
styles: html` `,
setup() {
const fileList = ref([]);
@@ -154,45 +163,11 @@ export default {
}
await post(url, formData, method);
};
- const formInline = reactive({
- oldInvBillNum: "",
- invBillNum: "",
- settleDate: "",
- invGroupNum: "",
- lu: "",
- pn: "",
- qty: null,
- groupNum: "",
- });
//create
const invoiceValue = ref([]);
- const submitForm = () => {
- const newFormInline = { ...formInline };
- invoiceValue.value.push(newFormInline);
- Object.keys(formInline).forEach((key) => {
- delete formInline[key];
- });
- innerVisible.value = false;
- };
- //delete
- const selectedRows = ref([]);
- const deleteRow = async () => {
- const indexes = selectedRows.value.map((row) => invoiceValue.value.indexOf(row));
- indexes.forEach((index) => {
- invoiceValue.value.splice(index, 10000000000);
- });
- selectedRows.value = [];
- };
- const innerVisible = ref(false);
- const openImport = ref(false);
+ const addDialogVisible = ref(false);
+ const importDialogVisible = ref(false);
const dialogVisible = ref(false);
- const handleClose = (done) => {
- ElMessageBox.confirm("确认关闭")
- .then(() => {
- done();
- })
- .catch(() => {});
- };
const config = useConfig();
const drawer = ref(false);
const loading = ref(false);
@@ -213,6 +188,28 @@ export default {
loading.value = false;
};
const columns1 = [
+ {
+ dataKey: "version",
+ title: "期间",
+ },
+ {
+ dataKey: "invbillNum",
+ title: "发票号",
+ },
+ {
+ dataKey: "invGroupNum",
+ title: "发票分组号",
+ },
+ {
+ dataKey: "settleGroupNum",
+ title: "结算分组号",
+ },
+ {
+ dataKey: "amt",
+ title: "金额",
+ },
+ ];
+ const columns2 = [
{
key: "version",
dataKey: "version",
@@ -247,15 +244,11 @@ export default {
title: "业务分类",
},
];
- const columns2 = [
+ const columns3 = [
{
dataKey: "version",
title: "期间",
},
- {
- dataKey: "invbillNum",
- title: "发票号",
- },
{
dataKey: "invGroupNum",
title: "发票分组号",
@@ -265,32 +258,127 @@ export default {
title: "结算分组号",
},
{
- dataKey: "amt",
- title: "金额",
+ dataKey: "lu",
+ title: "可结算分组号",
+ },
+ {
+ dataKey: "lu1",
+ title: "不可结算分组号",
},
];
- const columns3 = [
+ const columns4 = [
{
- dataKey: "version",
- title: "期间",
+ dataKey: "oldInvBillNum",
+ title: "作废发票号",
+ },
+ {
+ dataKey: "invBillNum",
+ title: "发票号",
+ },
+ {
+ dataKey: "settleDate",
+ title: "下线日期",
},
{
dataKey: "invGroupNum",
title: "发票分组号",
},
{
- dataKey: "settleGroupNum",
- title: "结算分组号",
+ dataKey: "lu",
+ title: "零件号",
},
{
- dataKey: "lu",
- title: "可结算分组号",
+ dataKey: "pn",
+ title: "标识号",
},
{
- dataKey: "lu1",
- title: "不可结算分组号",
+ dataKey: "qty",
+ title: "数量",
+ },
+ {
+ dataKey: "groupNum",
+ title: "结算分组",
},
];
+ const columns5 = columns4.filter((o) => o.dataKey !== "oldInvBillNum" && o.dataKey !== "invGroupNum");
+ columns5.unshift({
+ input: "selection",
+ });
+ //
+ const setupRef = ref(1);
+ const adjListRef = ref(null);
+ const adjList = ref([]);
+ const showSetupDialog = () => {
+ adjList.value = [];
+ for (let i = 0; i < 100; i++) {
+ adjList.value.push({ invBillNum: i });
+ }
+ setupRef.value = 1;
+ dialogVisible.value = true;
+ };
+ const deleteAdj = () => {
+ const list = adjListRef.value.getSelection();
+ list.forEach((o) => adjList.value.splice(o, 1));
+ adjListRef.value.clearSelection();
+ };
+ const adjSchema = {
+ type: "object",
+ properties: {
+ invBillNum: {
+ type: "string",
+ title: "发票号",
+ rules: [{ required: true }],
+ },
+ settleDate: {
+ type: "string",
+ title: "下线日期",
+ input: "datetime",
+ rules: [{ required: true }],
+ },
+ lu: {
+ type: "string",
+ title: "零件号",
+ rules: [{ required: true }],
+ },
+ pn: {
+ type: "string",
+ title: "标识号",
+ rules: [{ required: true }],
+ },
+ qty: {
+ type: "string",
+ title: "数量",
+ input: "number",
+ rules: [{ required: true }],
+ },
+ groupNum: {
+ type: "string",
+ title: "结算分组",
+ rules: [{ required: true }],
+ },
+ },
+ };
+ const defaultAdjModel = schemaToModel(adjSchema);
+ const adjModel = ref(Object.assign({}, defaultAdjModel));
+ const addAdjFormRef = ref(null);
+ const addAdj = () => {
+ adjModel.value = Object.assign({}, defaultAdjModel);
+ addDialogVisible.value = true;
+ };
+ const submitAdj = async () => {
+ try {
+ const valid = await addAdjFormRef.value.validate();
+ if (valid) {
+ adjList.value.unshift(JSON.parse(JSON.stringify(adjModel.value)));
+ addDialogVisible.value = false;
+ }
+ } catch (error) {
+ console.log(error);
+ }
+ };
+ const importAdj = async () => {
+ importDialogVisible.value = true;
+ };
return {
config,
onCommand,
@@ -300,17 +388,26 @@ export default {
columns1,
columns2,
columns3,
- innerVisible,
+ columns4,
+ columns4,
+ columns5,
+ addDialogVisible,
dialogVisible,
- handleClose,
prop,
- formInline,
- submitForm,
invoiceValue,
- deleteRow,
- selectedRows,
- openImport,
+ importDialogVisible,
openImportHandler,
+ setupRef,
+ showSetupDialog,
+ adjList,
+ adjListRef,
+ deleteAdj,
+ addAdj,
+ submitAdj,
+ addAdjFormRef,
+ adjSchema,
+ adjModel,
+ importAdj,
};
},
};
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs
index 1fbedb52..3b7c8ad9 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs
@@ -229,7 +229,7 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
o.factory == data.factory &&
o.Configcode == data.Configcode);
- var log = new VmiLog
+ var log = new VmiLog(GuidGenerator.Create())
{
LogType = logType,
ChangedType = VmiType.In,
@@ -308,7 +308,7 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
o.OrderNum == data.OrderNum &&
o.factory == data.factory &&
o.Configcode == data.Configcode);
- var log = new VmiLog
+ var log = new VmiLog(GuidGenerator.Create())
{
LogType = logType,
ChangedType = VmiType.Out,
@@ -415,8 +415,12 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
[HttpPost]
public async Task BalanceExport(RequestDto input)
{
- var entities = await _balanceRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda())
- .ToListAsync().ConfigureAwait(false);
+ IQueryable query = _balanceRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda());
+ if (!string.IsNullOrEmpty(input.Sorting))
+ {
+ query = DynamicQueryableExtensions.OrderBy(query, input.Sorting);
+ }
+ var entities = await query.ToListAsync().ConfigureAwait(false);
var fileName = $"库存余额_{DateTime.Now.ToString("yyyy-MM-dd_HH:mm:ss")}.xlsx";
var content = this.GetContent(entities, "库存备份");
await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false);
@@ -424,34 +428,54 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
}
///
- /// 补货数据导出
+ /// 库存事务查询
///
+ ///
+ ///
[HttpPost]
- public async Task ReplenishedExportAsync(RequestDto input)
+ public async Task> Log(LogRequestDto input)
{
- var entities = await _logRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda())
- .ToListAsync().ConfigureAwait(false);
- var fileName = $"补货数据_{DateTime.Now.ToString("yyyy-MM-dd_HH:mm:ss")}.xlsx";
- var content = this.GetContent(entities, "补货数据_");
+ var entities = await _logRepository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true).ConfigureAwait(false);
+ var totalCount = await _logRepository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false);
+ return new PagedResultDto(totalCount, entities);
+ //return QueryLogFromTSDb(input);
+ }
+
+ ///
+ /// 库存事务导出
+ ///
+ [HttpPost]
+ public async Task LogExport(RequestDto input)
+ {
+ IQueryable query = _logRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda());
+ if (!string.IsNullOrEmpty(input.Sorting))
+ {
+ query = DynamicQueryableExtensions.OrderBy(query, input.Sorting);
+ }
+ var entities = await query.ToListAsync().ConfigureAwait(false);
+ var fileName = $"库存事务_{DateTime.Now.ToString("yyyy-MM-dd_HH:mm:ss")}.xlsx";
+ var content = this.GetContent(entities, "库存事务_");
await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false);
return fileName;
}
///
- /// 库存事务查询
+ /// 补货数据导出
///
- ///
- ///
[HttpPost]
- public async Task> Log(LogRequestDto input)
+ public async Task ReplenishedExportAsync(RequestDto input)
{
- var query = _logRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda())
- .WhereIf(input.LogTypes?.Count != 0, o => input.LogTypes.Contains(o.LogType));
- var totalCount = await query.CountAsync().ConfigureAwait(false);
- query = string.IsNullOrEmpty(input.Sorting) ? query : DynamicQueryableExtensions.OrderBy(query, input.Sorting);
- var entities = query.Skip(input.SkipCount).Take(input.MaxResultCount).ToList();
- return new PagedResultDto(totalCount, entities);
- //return QueryLogFromTSDb(input);
+ IQueryable query = _logRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda());
+ query = query.Where(o => o.IsReplenished.HasValue && o.IsReplenished.Value == true);
+ if (!string.IsNullOrEmpty(input.Sorting))
+ {
+ query = DynamicQueryableExtensions.OrderBy(query, input.Sorting);
+ }
+ var entities = await query.ToListAsync().ConfigureAwait(false);
+ var fileName = $"补货数据_{DateTime.Now.ToString("yyyy-MM-dd_HH:mm:ss")}.xlsx";
+ var content = this.GetContent(entities, "补货数据_");
+ await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false);
+ return fileName;
}
private PagedResultDto QueryLogFromTSDb(RequestDto input)
@@ -547,7 +571,7 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
{
log.LogType = VmiLogType.Type600;
log.ChangedType = VmiType.Out;
- log.Qty=-log.Qty;
+ log.Qty = -log.Qty;
await this.Out(VmiLogType.Type600, null, log).ConfigureAwait(false);
}
}
From dd652ab54cf981b3d33994f079daa26c1f4214c9 Mon Sep 17 00:00:00 2001
From: wanggang <76527413@qq.com>
Date: Fri, 11 Aug 2023 15:04:04 +0800
Subject: [PATCH 04/13] =?UTF-8?q?=E5=8F=91=E7=A5=A8=E9=87=8D=E5=BC=80?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=BB=84=E4=BB=B6=E5=BC=80=E5=8F=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../wwwroot/components/table/index.js | 22 ++-
.../views/invoice/invoice_map_group.js | 178 +++++++++++++-----
2 files changed, 141 insertions(+), 59 deletions(-)
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/table/index.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/table/index.js
index 07222ad5..c5ad74f5 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/table/index.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/table/index.js
@@ -17,15 +17,13 @@ export default {
{{item.title}}
-
-
-
-
-
-
-
{{row[item.dataKey]}}
+
+
+
+
-
+
{{row[item.dataKey]}}
+
`,
styles: html``,
setup() {
const fileList = ref([]);
- // const load = async () => {};
- // const editFormModel = ref(null);
- // const editFormMode = ref(null);
- // const defaultImportModel = config.import?.schema ? schemaToModel(config.import.schema) : {};
- // const importModel = ref(defaultImportModel);
const openImportHandler = async () => {
const url = "settleaccount/vmi/excel-to-json";
const method = "POST";
@@ -306,11 +326,12 @@ export default {
});
//
const setupRef = ref(1);
+ const scrollRef = ref(null);
const adjListRef = ref(null);
const adjList = ref([]);
const showSetupDialog = () => {
adjList.value = [];
- for (let i = 0; i < 100; i++) {
+ for (let i = 0; i < 10; i++) {
adjList.value.push({ invBillNum: i });
}
setupRef.value = 1;
@@ -318,8 +339,15 @@ export default {
};
const deleteAdj = () => {
const list = adjListRef.value.getSelection();
- list.forEach((o) => adjList.value.splice(o, 1));
- adjListRef.value.clearSelection();
+ if (list.length > 0) {
+ for (let i = 0; i < list.length; i++) {
+ adjList.value.splice(list[i] - i, 1);
+ }
+ nextTick(() => {
+ adjListRef.value.clearSelection();
+ scrollRef.value.update();
+ });
+ }
};
const adjSchema = {
type: "object",
@@ -361,24 +389,69 @@ export default {
const defaultAdjModel = schemaToModel(adjSchema);
const adjModel = ref(Object.assign({}, defaultAdjModel));
const addAdjFormRef = ref(null);
- const addAdj = () => {
+ const showAddAdjDialog = () => {
adjModel.value = Object.assign({}, defaultAdjModel);
addDialogVisible.value = true;
};
- const submitAdj = async () => {
+ const addAdj = async () => {
try {
const valid = await addAdjFormRef.value.validate();
if (valid) {
- adjList.value.unshift(JSON.parse(JSON.stringify(adjModel.value)));
+ adjList.value.unshift(adjModel.value);
addDialogVisible.value = false;
}
} catch (error) {
console.log(error);
}
};
- const importAdj = async () => {
+ const importAdjFromRef = ref(null);
+ const importAdjSchema = {
+ type: "object",
+ properties: {
+ files: {
+ title: "文件",
+ type: "array",
+ multiple: true,
+ input: "file",
+ accept: ".xlsx",
+ default: [],
+ limit: 1,
+ size: 100 * 1024 * 1024,
+ rules: [
+ {
+ required: true,
+ trigger: "change",
+ },
+ ],
+ },
+ },
+ };
+ const defaultImportAdjModel = schemaToModel(importAdjSchema);
+ const importAdjModel = ref(defaultImportAdjModel);
+ const showImportAdjDialog = async () => {
+ importAdjModel.value = Object.assign({}, defaultImportAdjModel);
importDialogVisible.value = true;
};
+ const importAdj = async () => {
+ try {
+ const valid = await importAdjFromRef.value.validate();
+ if (valid) {
+ loading.value = true;
+ const url = "settleaccount/vmi/excel-to-json";
+ const formData = new FormData();
+ formData.append("files", importAdjModel.value.files[0].raw);
+ const result = await request(url, formData);
+ if (!result.errors) {
+ adjList.value = result.data;
+ importDialogVisible.value = false;
+ }
+ }
+ } catch (error) {
+ console.log(error);
+ } finally {
+ loading.value = false;
+ }
+ };
return {
config,
onCommand,
@@ -402,12 +475,17 @@ export default {
adjList,
adjListRef,
deleteAdj,
+ showAddAdjDialog,
addAdj,
- submitAdj,
addAdjFormRef,
+ importAdjFromRef,
adjSchema,
adjModel,
+ showImportAdjDialog,
+ importAdjModel,
+ importAdjSchema,
importAdj,
+ scrollRef,
};
},
};
From 65e517564f2898c2e28a92d676c38d1a2683edd0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A7=9C=E6=97=AD=E4=B9=8B?=
<12930972+jiang-xuzhi@user.noreply.gitee.com>
Date: Fri, 11 Aug 2023 15:15:24 +0800
Subject: [PATCH 05/13] update
---
.../wwwroot/models/inventory/adjust.js | 5 -
.../wwwroot/models/inventory/log.js | 49 ++++----
.../wwwroot/router/business.js | 8 --
.../wwwroot/views/inventory/log.js | 117 ++++++++++++------
4 files changed, 104 insertions(+), 75 deletions(-)
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/adjust.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/adjust.js
index 6ea67113..7b76c12f 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/adjust.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/adjust.js
@@ -40,11 +40,6 @@ const schema = {
title: "数量",
type: "number",
input: "number",
- rules: [
- {
- required: true,
- },
- ],
},
billTime: {
title: "发运日期",
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js
index 3e38b21a..6a36303c 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js
@@ -3,6 +3,11 @@ import { billType, codeType, subBillType } from "./inventory.js";
//变动单据号、发生时间、生产码类型、、订单号、库位、变动数、EDI顺序号、备注、变动类型(In、Out标识)、发货类型(JIS\JIT\买单件\备件等)、
//实扣LU零件号、实扣客户零件号、结算LU零件号、结算客户零件号、实扣生产码、结算生产码
//库位、开始结束时间段、发货类型、生产码、生产码类型、LU零件号、订单号
+const options = [
+ { value: null, label: "" },
+ { value: true, label: "是" },
+ { value: false, label: "否" },
+];
const schema = {
title: "库存事务日志",
type: "object",
@@ -88,6 +93,8 @@ const schema = {
isReplenished: {
title: "是否补货",
type: "boolean",
+ input: "select",
+ options,
},
configcode: {
title: "配置码",
@@ -103,7 +110,7 @@ const createUrl = `${baseUrl}/create`;
const updateUrl = `${baseUrl}/update/%s`;
const deleteUrl = `${baseUrl}/delete-list`;
const importUrl = `${baseUrl}/code-setting-upload-excel-import`;
-const exportUrl = `${baseUrl}/export`;
+const exportUrl = `${baseUrl}/log-export`;
const queryMethod = "POST";
const detailsMethod = "POST";
const createMethod = "POST";
@@ -152,30 +159,6 @@ export default function () {
value: null,
readOnly: true,
},
- // {
- // logic: "and",
- // column: "billTime",
- // action: "biggerThanOrEqual",
- // value: null,
- // readOnly: true,
- // hidden: true,
- // },
- // {
- // logic: "and",
- // column: "billTime",
- // action: "smallThanOrEqual",
- // value: null,
- // readOnly: true,
- // hidden: true,
- // },
- // {
- // logic: "and",
- // column: "isReplenished",
- // action: "equal",
- // value: true,
- // readOnly: true,
- // hidden: true,
- // },
{
logic: "and",
column: "billType",
@@ -211,6 +194,22 @@ export default function () {
value: null,
readOnly: true,
},
+ {
+ logic: "and",
+ column: "billTime",
+ action: "biggerThanOrEqual",
+ value: null,
+ readOnly: true,
+ hidden: true,
+ },
+ {
+ logic: "and",
+ column: "billTime",
+ action: "smallThanOrEqual",
+ value: null,
+ readOnly: true,
+ hidden: true,
+ },
],
},
skipCount: {
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 f174d981..dbd985b0 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
@@ -3610,14 +3610,6 @@ export default [
pattern: "paged",
},
},
- {
- path: "reopen",
- meta: {
- type: "button",
- title: "重开",
- icon: "file",
- },
- },
],
},
{
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/log.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/log.js
index 6bd46998..eee29220 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/log.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/log.js
@@ -2,51 +2,94 @@ import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/inventory/log.js";
import { reactive, ref } from "vue";
-import request from "../../request/index.js";
import { schemaToModel } from "../../utils/index.js";
+import AppForm from "../../../components/form/index.js";
+import AppTable from "../../components/table/index.js";
+import request, { get, getUrl, post } from "../../request/index.js";
export default {
- components: { AppList },
- template: html`
-
-
-
- 开始时间
- -
- 结束时间
-
- 确定
-
- `,
+ components: { AppList, AppTable, AppForm },
+ template: html`
+
+
+ 补货数据导出
+
+
+
+
+
+
+
+
+
+
+
+ `,
setup() {
- const defaultExportModel = {
- startDatetime: "",
- endDatetime: "",
- };
- const exportModel = ref(defaultExportModel);
- 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 = "settleaccount/vmi/replenished-export";
- const method = "POST";
- const postData = buildQuery();
- const response = await request(url, postData, { method });
- if (!response.errors) {
- window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`));
+ const addDialogVisible = ref(false);
+ const addAdjFormRef = ref(null);
+ const adjList = ref([]);
+ const submitAdj = async () => {
+ try {
+ const url = "settleaccount/vmi/replenished-export";
+ const method = "POST";
+ const response = await request(url, null, { method });
+ if (!response.errors) {
+ window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`));
+ }
+ } catch (error) {
+ console.log(error);
}
- dialog.value = false;
};
+ const adjSchema = {
+ type: "object",
+ properties: {
+ startBillTime: {
+ type: "string",
+ title: "发运开始日期",
+ input: "datetime",
+ rules: [{ required: true }],
+ },
+ endBillTime: {
+ type: "string",
+ title: "发运结束日期",
+ input: "datetime",
+ rules: [{ required: true }],
+ },
+ },
+ };
+ const defaultAdjModel = schemaToModel(adjSchema);
+ const addAdj = () => {
+ adjModel.value = Object.assign({}, defaultAdjModel);
+ addDialogVisible.value = true;
+ };
+ const adjModel = ref(defaultAdjModel);
+ const config = useConfig();
const onCommand = async (item, rows) => {
- prop.value = item.path;
- dialog.value = true;
+ addDialogVisible.value = true;
console.log(item.path, item, rows);
};
- return { config, onCommand, dialog, prop, exportModel, openDialog };
+ return {
+ config,
+ onCommand,
+ submitAdj,
+ addDialogVisible,
+ adjSchema,
+ addAdjFormRef,
+ defaultAdjModel,
+ adjModel,
+ addAdj,
+ adjList,
+ };
},
};
From 95dfd78553ab77e44bb077fc0c100fa1533ec15c Mon Sep 17 00:00:00 2001
From: wanggang <76527413@qq.com>
Date: Fri, 11 Aug 2023 16:17:27 +0800
Subject: [PATCH 06/13] update
---
.../views/invoice/invoice_map_group.js | 4 +---
.../Entities/BQ/VmiAppService.cs | 24 ++++---------------
2 files changed, 6 insertions(+), 22 deletions(-)
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js
index 25c6f341..3a2113a0 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js
@@ -1,14 +1,12 @@
import AppList from "../../../components/list/index.js";
import AppForm from "../../../components/form/index.js";
import html from "html";
-import { reactive, ref, nextTick } from "vue";
+import { ref, nextTick } from "vue";
import useConfig from "../../../models/invoice/invoice_map_group.js";
import request from "../../../request/index.js";
import AppTable from "../../components/table/index.js";
-import { ElMessageBox } from "element-plus";
import { post } from "../../../request/index.js";
import { schemaToModel } from "html";
-import { delay } from "../../../utils/index.js";
export default {
components: { AppList, AppForm, AppTable },
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs
index 3b7c8ad9..71fc0975 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs
@@ -415,12 +415,7 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
[HttpPost]
public async Task BalanceExport(RequestDto input)
{
- IQueryable query = _balanceRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda());
- if (!string.IsNullOrEmpty(input.Sorting))
- {
- query = DynamicQueryableExtensions.OrderBy(query, input.Sorting);
- }
- var entities = await query.ToListAsync().ConfigureAwait(false);
+ var entities = await _balanceRepository.GetListByFilterAsync(input.Filters).ConfigureAwait(false);
var fileName = $"库存余额_{DateTime.Now.ToString("yyyy-MM-dd_HH:mm:ss")}.xlsx";
var content = this.GetContent(entities, "库存备份");
await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false);
@@ -447,12 +442,7 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
[HttpPost]
public async Task LogExport(RequestDto input)
{
- IQueryable query = _logRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda());
- if (!string.IsNullOrEmpty(input.Sorting))
- {
- query = DynamicQueryableExtensions.OrderBy(query, input.Sorting);
- }
- var entities = await query.ToListAsync().ConfigureAwait(false);
+ var entities = await _logRepository.GetListByFilterAsync(input.Filters).ConfigureAwait(false);
var fileName = $"库存事务_{DateTime.Now.ToString("yyyy-MM-dd_HH:mm:ss")}.xlsx";
var content = this.GetContent(entities, "库存事务_");
await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false);
@@ -465,13 +455,9 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
[HttpPost]
public async Task ReplenishedExportAsync(RequestDto input)
{
- IQueryable query = _logRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda());
- query = query.Where(o => o.IsReplenished.HasValue && o.IsReplenished.Value == true);
- if (!string.IsNullOrEmpty(input.Sorting))
- {
- query = DynamicQueryableExtensions.OrderBy(query, input.Sorting);
- }
- var entities = await query.ToListAsync().ConfigureAwait(false);
+ //input.Filters.Add(new FilterCondition { Logic = EnumFilterLogic.And, Action = EnumFilterAction.NotEqual, Column = "IsReplenished", Value = "null" });
+ var entities = await _logRepository.GetListByFilterAsync(input.Filters).ConfigureAwait(false);
+ //IQueryable query = _logRepository.WhereIf(input.Filters?.Count != 0, input.Filters.ToLambda());
var fileName = $"补货数据_{DateTime.Now.ToString("yyyy-MM-dd_HH:mm:ss")}.xlsx";
var content = this.GetContent(entities, "补货数据_");
await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false);
From 786b57fed174b53245ce41802b940f0d7394b3bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A7=9C=E6=97=AD=E4=B9=8B?=
<12930972+jiang-xuzhi@user.noreply.gitee.com>
Date: Fri, 11 Aug 2023 17:44:41 +0800
Subject: [PATCH 07/13] update
---
.../wwwroot/components/list/index.js | 37 ++++++++++++
.../settlement/bbac_ba_detail_service.js | 4 ++
.../jis-bbac/settlement/bbac_ba_service.js | 4 ++
.../settlement/bbac_can_sa_detail_service.js | 4 ++
.../settlement/bbac_can_sa_service.js | 4 ++
.../settlement/bbac_not_sa_service.js | 4 ++
.../settlement/bbac_pd_detail_service.js | 4 ++
.../jis-bbac/settlement/bbac_pd_service.js | 4 ++
.../settlement/hbpo_ba_detail_service.js | 5 +-
.../jis-hbpo/settlement/hbpo_ba_service.js | 4 ++
.../settlement/hbpo_can_sa_detail_service.js | 4 ++
.../settlement/hbpo_can_sa_service.js | 8 ++-
.../settlement/hbpo_not_sa_service.js | 4 ++
.../settlement/hbpo_pd_detail_service.js | 4 ++
.../jis-hbpo/settlement/hbpo_pd_service.js | 4 ++
.../wwwroot/models/pub_ba_detail_service.js | 4 ++
.../wwwroot/models/pub_ba_service.js | 4 ++
.../models/pub_can_sa_detail_service.js | 4 ++
.../wwwroot/models/pub_can_sa_service.js | 4 ++
.../wwwroot/models/pub_not_sa_service.js | 4 ++
.../wwwroot/models/pub_pd_detail_service.js | 34 ++++++-----
.../wwwroot/models/pub_pd_service.js | 4 ++
.../wwwroot/router/business.js | 59 ++++++++-----------
.../bj_second_pub_sa_detail_jobservice.js | 16 -----
.../wwwroot/views/inventory/log.js | 2 -
.../contrast/bbac_sa_detail_jobservice.js | 10 +++-
.../first_bbac_sa_detail_jobservice.js | 10 +++-
.../second_bbac_sa_detail_jobservice.js | 16 -----
.../third_bbac_sa_detail_jobservice.js | 16 -----
.../first_hbpo_sa_detail_jobservice.js | 10 +++-
.../contrast/hbpo_sa_detail_jobservice.js | 10 +++-
.../second_hbpo_sa_detail_jobservice.js | 16 -----
.../settlement/hbpo_md_pub_ba_service.js | 3 +-
33 files changed, 196 insertions(+), 128 deletions(-)
delete mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/contrast/bj_second_pub_sa_detail_jobservice.js
delete mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/second_bbac_sa_detail_jobservice.js
delete mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/third_bbac_sa_detail_jobservice.js
delete mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/contrast/second_hbpo_sa_detail_jobservice.js
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
index 9f85f0e8..12eb2c04 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
@@ -583,6 +583,38 @@ export default {
}
}
await load();
+ } else if (item.path === "check") {
+ const urls = new Map();
+ urls.set("JisBBAC", "settleaccount/bbac_ba_service/generate-invoice");
+ urls.set("JisHBPO", "settleaccount/hbpo_ba_service/generate-invoice");
+ urls.set("ZhiGongJianBBAC", "settleaccount/pub_ba_service/generate-invoice");
+ urls.set("ZhiGongJianHBPO", "settleaccount/pub_ba_service/generate-invoice");
+ urls.set("MaiDanJianHBPO", "settleaccount/pub_ba_service/generate-invoice");
+ urls.set("BeiJian", "settleaccount/pub_ba_service/generate-invoice");
+ urls.set("YinDuJian", "settleaccount/pub_ba_service/generate-invoice");
+ try {
+ await ElMessageBox.confirm(format("确认审核通过选中的%s行数据吗?", rows.length), "提示", {
+ type: "warning",
+ });
+ const response = await request(
+ urls.get(config.query.schema.properties.businessType?.default),
+ rows.map((o) => o.id),
+ { method: "POST" }
+ );
+ if (!response.errors) {
+ ElMessage({
+ type: "info",
+ message: "操作完毕",
+ });
+ }
+ } catch (error) {
+ if (error === "cancel") {
+ ElMessage({
+ type: "info",
+ message: "操作取消",
+ });
+ }
+ }
} else if (item.path === "export") {
//export
if (item.meta.pattern === "paged") {
@@ -593,6 +625,8 @@ export default {
if (!response.errors) {
window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`));
}
+ } else if (item.meta.pattern === "file") {
+ window.open(getUrl(`settleaccount/getblobfile/download/${rows[0]["downFileName"]}`));
} else {
console.log(item);
}
@@ -675,6 +709,9 @@ export default {
if (config.query.schema.properties.businessType?.default) {
formData.append("businessType", config.query.schema.properties.businessType.default);
}
+ if (!router.currentRoute.value.path.startsWith("/base-data")) {
+ formData.append("version", queryModel.value.version);
+ }
Object.keys(importModel.value).forEach((propertyName) => {
if (importModel.value[propertyName]) {
const schema = config.import.schema.properties[propertyName];
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_ba_detail_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_ba_detail_service.js
index 9e3a7919..a7084f55 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_ba_detail_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_ba_detail_service.js
@@ -106,6 +106,10 @@ export default function () {
sorting: {
hidden: true,
},
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
},
},
},
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_ba_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_ba_service.js
index 9b6e048e..03f3f97f 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_ba_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_ba_service.js
@@ -107,6 +107,10 @@ export default function () {
sorting: {
hidden: true,
},
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
},
},
},
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_can_sa_detail_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_can_sa_detail_service.js
index fdd619e1..a1375de4 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_can_sa_detail_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_can_sa_detail_service.js
@@ -108,6 +108,10 @@ export default function () {
sorting: {
hidden: true,
},
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
},
},
},
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_can_sa_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_can_sa_service.js
index b2ef7804..5ed4cd45 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_can_sa_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_can_sa_service.js
@@ -81,6 +81,10 @@ export default function () {
sorting: {
hidden: true,
},
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
},
},
},
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_not_sa_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_not_sa_service.js
index 58e75c85..b818a73d 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_not_sa_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_not_sa_service.js
@@ -108,6 +108,10 @@ export default function () {
sorting: {
hidden: true,
},
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
},
},
},
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_pd_detail_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_pd_detail_service.js
index 9ef71893..9fae3076 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_pd_detail_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_pd_detail_service.js
@@ -82,6 +82,10 @@ export default function () {
sorting: {
hidden: true,
},
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
},
},
},
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_pd_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_pd_service.js
index b3ad91a0..d38ab70f 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_pd_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_pd_service.js
@@ -87,6 +87,10 @@ export default function () {
sorting: {
hidden: true,
},
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
},
},
},
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_ba_detail_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_ba_detail_service.js
index 59438329..1a3f395e 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_ba_detail_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_ba_detail_service.js
@@ -56,7 +56,6 @@ const queryUrl = `${baseUrl}/detail-query`;
const queryMethod = "POST";
-
export default function () {
return {
query: {
@@ -109,6 +108,10 @@ export default function () {
sorting: {
hidden: true,
},
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
},
},
},
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_ba_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_ba_service.js
index 48623a4b..f8088f76 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_ba_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_ba_service.js
@@ -107,6 +107,10 @@ export default function () {
sorting: {
hidden: true,
},
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
},
},
},
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_can_sa_detail_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_can_sa_detail_service.js
index e5318eb4..35f33181 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_can_sa_detail_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_can_sa_detail_service.js
@@ -109,6 +109,10 @@ export default function () {
sorting: {
hidden: true,
},
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
},
},
},
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_can_sa_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_can_sa_service.js
index 0f05c2af..6e7b82d7 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_can_sa_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_can_sa_service.js
@@ -25,11 +25,11 @@ const schema = {
const baseUrl = "settleaccount/hbpo_can_sa_service";
const queryUrl = `${baseUrl}/main-query`;
const exportUrl = `${baseUrl}/export`;
-const invoiceUrl="settleaccount/hbpo_can_sa_service/generate-invoice";
+const invoiceUrl = "settleaccount/hbpo_can_sa_service/generate-invoice";
const queryMethod = "POST";
const exportMethod = "POST";
-const invoiceMethod="POST";
+const invoiceMethod = "POST";
export default function () {
return {
@@ -83,6 +83,10 @@ export default function () {
sorting: {
hidden: true,
},
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
},
},
},
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_not_sa_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_not_sa_service.js
index 6b65e1d6..c3415a2d 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_not_sa_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_not_sa_service.js
@@ -108,6 +108,10 @@ export default function () {
sorting: {
hidden: true,
},
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
},
},
},
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_pd_detail_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_pd_detail_service.js
index 8faa4363..b0af23bf 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_pd_detail_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_pd_detail_service.js
@@ -82,6 +82,10 @@ export default function () {
sorting: {
hidden: true,
},
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
},
},
},
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_pd_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_pd_service.js
index 3b27421d..cd02e803 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_pd_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_pd_service.js
@@ -87,6 +87,10 @@ export default function () {
sorting: {
hidden: true,
},
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
},
},
},
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_ba_detail_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_ba_detail_service.js
index 9baaba15..d01b31df 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_ba_detail_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_ba_detail_service.js
@@ -125,6 +125,10 @@ export default function () {
sorting: {
hidden: true,
},
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
},
},
},
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_ba_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_ba_service.js
index 3837dc64..546fa078 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_ba_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_ba_service.js
@@ -104,6 +104,10 @@ export default function () {
sorting: {
hidden: true,
},
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
},
},
},
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_can_sa_detail_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_can_sa_detail_service.js
index 0ceb12e6..c24d570b 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_can_sa_detail_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_can_sa_detail_service.js
@@ -113,6 +113,10 @@ export default function () {
sorting: {
hidden: true,
},
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
},
},
},
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_can_sa_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_can_sa_service.js
index dfb893b9..bba28d6e 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_can_sa_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_can_sa_service.js
@@ -85,6 +85,10 @@ export default function () {
sorting: {
hidden: true,
},
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
},
},
},
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_not_sa_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_not_sa_service.js
index be13db11..6f886ab8 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_not_sa_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_not_sa_service.js
@@ -127,6 +127,10 @@ export default function () {
sorting: {
hidden: true,
},
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
},
},
},
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_pd_detail_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_pd_detail_service.js
index 5847afa8..c2ca013c 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_pd_detail_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_pd_detail_service.js
@@ -6,34 +6,32 @@ const schema = {
type: "object",
properties: {
site: {
- title: "工厂地点",
- type: "string",
- },
+ title: "工厂地点",
+ type: "string",
+ },
version,
billNum: {
title: "结算单号",
type: "string",
},
qty: {
- title: "结算单号",
- type: "decimal",
- },
- price: {
- title: "结算单号",
- type: "decimal",
- },
- invGroupNum: {
- title: "结算单号",
- type: "string",
- },
-
+ title: "结算单号",
+ type: "decimal",
+ },
+ price: {
+ title: "结算单号",
+ type: "decimal",
+ },
+ invGroupNum: {
+ title: "结算单号",
+ type: "string",
+ },
},
};
const queryUrl = "settleaccount/p-uB_PD_SERVICE/detail-query";
const queryMethod = "POST";
-
export default function () {
return {
query: {
@@ -86,6 +84,10 @@ export default function () {
sorting: {
hidden: true,
},
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
},
},
},
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_pd_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_pd_service.js
index 9424d11d..96cd91cf 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_pd_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_pd_service.js
@@ -27,6 +27,10 @@ const schema = {
title: "业务类型",
type: "EnumBusinessType",
},
+ businessType: {
+ hidden: true,
+ default: 0,
+ },
},
};
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 dbd985b0..99763e0c 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
@@ -209,7 +209,7 @@ export default [
type: "button",
title: "下载",
icon: "file",
- pattern: "paged",
+ pattern: "file",
disabled: "o=>o.stateName!='Succeeded'",
},
},
@@ -265,7 +265,7 @@ export default [
type: "button",
title: "下载",
icon: "file",
- pattern: "paged",
+ pattern: "file",
},
},
],
@@ -425,12 +425,11 @@ export default [
},
},
{
- path: "passed",
+ path: "check",
meta: {
type: "button",
title: "审核通过",
icon: "file",
- isTop: true,
},
},
{
@@ -500,13 +499,12 @@ export default [
},
},
{
- path: "passed ",
+ path: "check",
meta: {
type: "button",
title: "审核通过",
icon: "file",
isTop: true,
- pattern: "paged",
},
},
],
@@ -745,7 +743,7 @@ export default [
type: "button",
title: "下载",
icon: "file",
- pattern: "paged",
+ pattern: "file",
},
},
],
@@ -800,7 +798,7 @@ export default [
type: "button",
title: "下载",
icon: "file",
- pattern: "paged",
+ pattern: "file",
},
},
],
@@ -960,7 +958,7 @@ export default [
},
},
{
- path: "passed",
+ path: "check",
meta: {
type: "button",
title: "审核通过",
@@ -1035,13 +1033,12 @@ export default [
},
},
{
- path: "passed ",
+ path: "check ",
meta: {
type: "button",
title: "审核通过",
icon: "file",
isTop: true,
- pattern: "paged",
},
},
],
@@ -1259,7 +1256,7 @@ export default [
type: "button",
title: "下载",
icon: "file",
- pattern: "paged",
+ pattern: "file",
},
},
],
@@ -1429,7 +1426,7 @@ export default [
},
},
{
- path: "passed",
+ path: "check",
meta: {
type: "button",
title: "审核通过",
@@ -1504,13 +1501,12 @@ export default [
},
},
{
- path: "approvalPassed ",
+ path: "check ",
meta: {
type: "button",
title: "审核通过",
icon: "file",
isTop: true,
- pattern: "paged",
},
},
],
@@ -1720,7 +1716,7 @@ export default [
type: "button",
title: "下载",
icon: "file",
- pattern: "paged",
+ pattern: "file",
},
},
],
@@ -1890,7 +1886,7 @@ export default [
},
},
{
- path: "passed",
+ path: "check",
meta: {
type: "button",
title: "审核通过",
@@ -1965,13 +1961,12 @@ export default [
},
},
{
- path: "approvalPassed ",
+ path: "check ",
meta: {
type: "button",
title: "审核通过",
icon: "file",
isTop: true,
- pattern: "paged",
},
},
],
@@ -2201,7 +2196,7 @@ export default [
type: "button",
title: "下载",
icon: "file",
- pattern: "paged",
+ pattern: "file",
},
},
],
@@ -2401,7 +2396,7 @@ export default [
type: "button",
title: "下载",
icon: "file",
- pattern: "paged",
+ pattern: "file",
},
},
],
@@ -2571,7 +2566,7 @@ export default [
},
},
{
- path: "passed",
+ path: "check",
meta: {
type: "button",
title: "审核通过",
@@ -2646,13 +2641,12 @@ export default [
},
},
{
- path: "approvalPassed ",
+ path: "check ",
meta: {
type: "button",
title: "审核通过",
icon: "file",
isTop: true,
- pattern: "paged",
},
},
],
@@ -2865,7 +2859,7 @@ export default [
type: "button",
title: "下载",
icon: "file",
- pattern: "paged",
+ pattern: "file",
},
},
],
@@ -3005,7 +2999,7 @@ export default [
},
},
{
- path: "passed",
+ path: "check",
meta: {
type: "button",
title: "审核通过",
@@ -3080,13 +3074,12 @@ export default [
},
},
{
- path: "approvalPassed ",
+ path: "check ",
meta: {
type: "button",
title: "审核通过",
icon: "file",
isTop: true,
- pattern: "paged",
},
},
],
@@ -3296,7 +3289,7 @@ export default [
type: "button",
title: "下载",
icon: "file",
- pattern: "paged",
+ pattern: "file",
},
},
],
@@ -3436,7 +3429,7 @@ export default [
},
},
{
- path: "passed",
+ path: "check",
meta: {
type: "button",
title: "审核通过",
@@ -3511,13 +3504,12 @@ export default [
},
},
{
- path: "approvalPassed ",
+ path: "check ",
meta: {
type: "button",
title: "审核通过",
icon: "file",
isTop: true,
- pattern: "paged",
},
},
],
@@ -3591,13 +3583,12 @@ export default [
},
},
{
- path: "passed ",
+ path: "check ",
meta: {
type: "button",
title: "审核通过",
icon: "file",
isTop: true,
- pattern: "paged",
},
},
{
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/contrast/bj_second_pub_sa_detail_jobservice.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/contrast/bj_second_pub_sa_detail_jobservice.js
deleted file mode 100644
index 976e6f9f..00000000
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/contrast/bj_second_pub_sa_detail_jobservice.js
+++ /dev/null
@@ -1,16 +0,0 @@
-import AppList from "../../../components/list/index.js";
-import html from "html";
-import useConfig from "../../../models/job-service.js";
-
-export default {
- components: { AppList },
- template: html``,
- setup() {
- const config = useConfig();
- config.query.schema.title = "发运与结算二次";
- const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
- };
- return { config, onCommand };
- },
-};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/log.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/log.js
index eee29220..ceece8e2 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/log.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/inventory/log.js
@@ -38,7 +38,6 @@ export default {
setup() {
const addDialogVisible = ref(false);
const addAdjFormRef = ref(null);
- const adjList = ref([]);
const submitAdj = async () => {
try {
const url = "settleaccount/vmi/replenished-export";
@@ -89,7 +88,6 @@ export default {
defaultAdjModel,
adjModel,
addAdj,
- adjList,
};
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/bbac_sa_detail_jobservice.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/bbac_sa_detail_jobservice.js
index 2531f506..1fd7b687 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/bbac_sa_detail_jobservice.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/bbac_sa_detail_jobservice.js
@@ -1,16 +1,22 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/bbac-edi-se-compare.js";
+import { ref, onMounted, onUnmounted } from "vue";
export default {
components: { AppList },
- template: html``,
+ template: html``,
setup() {
const config = useConfig();
config.query.schema.title = "EDI与发运数据";
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
- return { config, onCommand };
+ //
+ const appListRef = ref(null);
+ const event = "SaSeCompare";
+ onMounted(() => PubSub.subscribe(event, async () => await appListRef.value.load()));
+ onUnmounted(() => PubSub.unsubscribe(event));
+ return { config, onCommand, appListRef };
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/first_bbac_sa_detail_jobservice.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/first_bbac_sa_detail_jobservice.js
index 7bafe5af..d77b79ca 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/first_bbac_sa_detail_jobservice.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/first_bbac_sa_detail_jobservice.js
@@ -1,16 +1,22 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/job-service.js";
+import { ref, onMounted, onUnmounted } from "vue";
export default {
components: { AppList },
- template: html``,
+ template: html``,
setup() {
const config = useConfig();
config.query.schema.title = "EDI、发运与结算";
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
- return { config, onCommand };
+ //
+ const appListRef = ref(null);
+ const event = "SaSeCompare";
+ onMounted(() => PubSub.subscribe(event, async () => await appListRef.value.load()));
+ onUnmounted(() => PubSub.unsubscribe(event));
+ return { config, onCommand, appListRef };
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/second_bbac_sa_detail_jobservice.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/second_bbac_sa_detail_jobservice.js
deleted file mode 100644
index 75aaa82a..00000000
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/second_bbac_sa_detail_jobservice.js
+++ /dev/null
@@ -1,16 +0,0 @@
-import AppList from "../../../components/list/index.js";
-import html from "html";
-import useConfig from "../../../models/job-service.js";
-
-export default {
- components: { AppList },
- template: html``,
- setup() {
- const config = useConfig();
- config.query.schema.title = "发运与结算数据二次";
- const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
- };
- return { config, onCommand };
- },
-};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/third_bbac_sa_detail_jobservice.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/third_bbac_sa_detail_jobservice.js
deleted file mode 100644
index 7f5434c3..00000000
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/third_bbac_sa_detail_jobservice.js
+++ /dev/null
@@ -1,16 +0,0 @@
-import AppList from "../../../components/list/index.js";
-import html from "html";
-import useConfig from "../../../models/job-service.js";
-
-export default {
- components: { AppList },
- template: html``,
- setup() {
- const config = useConfig();
- config.query.schema.title = "买单件发运与结算数据三次";
- const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
- };
- return { config, onCommand };
- },
-};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/contrast/first_hbpo_sa_detail_jobservice.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/contrast/first_hbpo_sa_detail_jobservice.js
index 7bafe5af..d77b79ca 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/contrast/first_hbpo_sa_detail_jobservice.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/contrast/first_hbpo_sa_detail_jobservice.js
@@ -1,16 +1,22 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/job-service.js";
+import { ref, onMounted, onUnmounted } from "vue";
export default {
components: { AppList },
- template: html``,
+ template: html``,
setup() {
const config = useConfig();
config.query.schema.title = "EDI、发运与结算";
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
- return { config, onCommand };
+ //
+ const appListRef = ref(null);
+ const event = "SaSeCompare";
+ onMounted(() => PubSub.subscribe(event, async () => await appListRef.value.load()));
+ onUnmounted(() => PubSub.unsubscribe(event));
+ return { config, onCommand, appListRef };
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/contrast/hbpo_sa_detail_jobservice.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/contrast/hbpo_sa_detail_jobservice.js
index f6f146ef..870debd2 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/contrast/hbpo_sa_detail_jobservice.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/contrast/hbpo_sa_detail_jobservice.js
@@ -1,16 +1,22 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/hbpo-edi-se-compare.js";
+import { ref, onMounted, onUnmounted } from "vue";
export default {
components: { AppList },
- template: html``,
+ template: html``,
setup() {
const config = useConfig();
config.query.schema.title = "EDI与发运数据";
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
- return { config, onCommand };
+ //
+ const appListRef = ref(null);
+ const event = "SaSeCompare";
+ onMounted(() => PubSub.subscribe(event, async () => await appListRef.value.load()));
+ onUnmounted(() => PubSub.unsubscribe(event));
+ return { config, onCommand, appListRef };
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/contrast/second_hbpo_sa_detail_jobservice.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/contrast/second_hbpo_sa_detail_jobservice.js
deleted file mode 100644
index 75aaa82a..00000000
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/contrast/second_hbpo_sa_detail_jobservice.js
+++ /dev/null
@@ -1,16 +0,0 @@
-import AppList from "../../../components/list/index.js";
-import html from "html";
-import useConfig from "../../../models/job-service.js";
-
-export default {
- components: { AppList },
- template: html``,
- setup() {
- const config = useConfig();
- config.query.schema.title = "发运与结算数据二次";
- const onCommand = async (item, rows) => {
- console.log(item.path, item, rows);
- };
- return { config, onCommand };
- },
-};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_ba_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_ba_service.js
index e55ea855..671cdd3c 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_ba_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_ba_service.js
@@ -10,6 +10,7 @@ export default {
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
+ config.query.schema.properties.businessType.default = "MaiDanJianHBPO";
return { config, onCommand };
},
-};
\ No newline at end of file
+};
From 186962383f50dd994b0293de41c111de49347b48 Mon Sep 17 00:00:00 2001
From: wanggang <76527413@qq.com>
Date: Fri, 11 Aug 2023 17:54:39 +0800
Subject: [PATCH 08/13] update
---
.../wwwroot/models/invoice/invoice_map_group.js | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/invoice/invoice_map_group.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/invoice/invoice_map_group.js
index a97f8124..33248703 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/invoice/invoice_map_group.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/invoice/invoice_map_group.js
@@ -1,5 +1,6 @@
import version from "../version.js";
-import { state2 as state, state3 } from "../state.js";
+import { state2, state3 } from "../state.js";
+import invoiceState from "../invoiceState.js";
const schema = {
title: "通用代码",
@@ -16,23 +17,16 @@ const schema = {
type: "string",
link: true,
},
- // settleGroupNum: {
- // title: "结算分组号",
- // type: "string",
- // },
amt: {
title: "金额",
type: "decimal",
},
- state,
+ state: state2,
+ invoiceState,
taxAmt: {
title: "税额",
type: "decimal",
},
- Extend2: {
- title: "扩展字段2",
- type: "string",
- },
},
};
const queryUrl = "settleaccount/invoice_service/main-query";
From 482da3b28a7755d27421e10afc1193f0051da8ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A7=9C=E6=97=AD=E4=B9=8B?=
<12930972+jiang-xuzhi@user.noreply.gitee.com>
Date: Fri, 11 Aug 2023 21:01:34 +0800
Subject: [PATCH 09/13] =?UTF-8?q?=E6=9B=B4=E6=94=B9default?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../wwwroot/views/bj/settlement/bj_pub_ba_detail_service.js | 1 +
.../wwwroot/views/bj/settlement/bj_pub_ba_service.js | 1 +
.../wwwroot/views/in/settlement/in_pub_ba_detail_service.js | 1 +
.../wwwroot/views/in/settlement/in_pub_ba_service.js | 1 +
.../wwwroot/views/jis-bbac/settlement/bbac_ba_detail_service.js | 1 +
.../wwwroot/views/jis-bbac/settlement/bbac_ba_service.js | 1 +
.../wwwroot/views/jis-hbpo/settlement/hbpo_ba_detail_service.js | 1 +
.../wwwroot/views/jis-hbpo/settlement/hbpo_ba_service.js | 1 +
.../jit/jit-bbac/settlement/bbac_jit_pub_ba_detail_service.js | 1 +
.../views/jit/jit-bbac/settlement/bbac_jit_pub_ba_service.js | 1 +
.../jit/jit-hbpo/settlement/hbpo_jit_pub_ba_detail_service.js | 1 +
.../views/jit/jit-hbpo/settlement/hbpo_jit_pub_ba_service.js | 1 +
.../views/md/md-hbpo/settlement/hbpo_md_pub_ba_detail_service.js | 1 +
13 files changed, 13 insertions(+)
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/settlement/bj_pub_ba_detail_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/settlement/bj_pub_ba_detail_service.js
index 535888d3..7378d8fa 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/settlement/bj_pub_ba_detail_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/settlement/bj_pub_ba_detail_service.js
@@ -10,6 +10,7 @@ export default {
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
+ config.query.schema.properties.businessType.default = "BeiJian";
return { config, onCommand };
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/settlement/bj_pub_ba_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/settlement/bj_pub_ba_service.js
index a39fdfa4..2636f5d1 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/settlement/bj_pub_ba_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/settlement/bj_pub_ba_service.js
@@ -10,6 +10,7 @@ export default {
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
+ config.query.schema.properties.businessType.default = "BeiJian";
return { config, onCommand };
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/settlement/in_pub_ba_detail_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/settlement/in_pub_ba_detail_service.js
index 535888d3..44d11cb3 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/settlement/in_pub_ba_detail_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/settlement/in_pub_ba_detail_service.js
@@ -10,6 +10,7 @@ export default {
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
+ config.query.schema.properties.businessType.default = "YinDuJian";
return { config, onCommand };
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/settlement/in_pub_ba_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/settlement/in_pub_ba_service.js
index a39fdfa4..2c50f341 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/settlement/in_pub_ba_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/settlement/in_pub_ba_service.js
@@ -10,6 +10,7 @@ export default {
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
+ config.query.schema.properties.businessType.default = "YinDuJian";
return { config, onCommand };
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/settlement/bbac_ba_detail_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/settlement/bbac_ba_detail_service.js
index cc418a00..1c20039d 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/settlement/bbac_ba_detail_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/settlement/bbac_ba_detail_service.js
@@ -10,6 +10,7 @@ export default {
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
+ config.query.schema.properties.businessType.default = "JisBBAC";
return { config, onCommand };
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/settlement/bbac_ba_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/settlement/bbac_ba_service.js
index 1036ce6a..55a02496 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/settlement/bbac_ba_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/settlement/bbac_ba_service.js
@@ -10,6 +10,7 @@ export default {
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
+ config.query.schema.properties.businessType.default = "JisBBAC";
return { config, onCommand };
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/settlement/hbpo_ba_detail_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/settlement/hbpo_ba_detail_service.js
index d44638b7..641eecd7 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/settlement/hbpo_ba_detail_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/settlement/hbpo_ba_detail_service.js
@@ -10,6 +10,7 @@ export default {
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
+ config.query.schema.properties.businessType.default = "JisHBPO";
return { config, onCommand };
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/settlement/hbpo_ba_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/settlement/hbpo_ba_service.js
index 32a39c08..a6cecca7 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/settlement/hbpo_ba_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/settlement/hbpo_ba_service.js
@@ -10,6 +10,7 @@ export default {
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
+ config.query.schema.properties.businessType.default = "JisHBPO";
return { config, onCommand };
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_ba_detail_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_ba_detail_service.js
index 27a2214b..df8d96b8 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_ba_detail_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_ba_detail_service.js
@@ -10,6 +10,7 @@ export default {
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
+ config.query.schema.properties.businessType.default = "ZhiGongJianBBAC";
return { config, onCommand };
},
};
\ No newline at end of file
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_ba_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_ba_service.js
index e55ea855..ba1c9850 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_ba_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_ba_service.js
@@ -10,6 +10,7 @@ export default {
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
+ config.query.schema.properties.businessType.default = "ZhiGongJianBBAC";
return { config, onCommand };
},
};
\ No newline at end of file
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_ba_detail_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_ba_detail_service.js
index 27a2214b..6059959d 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_ba_detail_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_ba_detail_service.js
@@ -10,6 +10,7 @@ export default {
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
+ config.query.schema.properties.businessType.default = "ZhiGongJianHBPO";
return { config, onCommand };
},
};
\ No newline at end of file
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_ba_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_ba_service.js
index 4d572447..aa37a9bf 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_ba_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_ba_service.js
@@ -10,6 +10,7 @@ export default {
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
+ config.query.schema.properties.businessType.default = "ZhiGongJianHBPO";
return { config, onCommand };
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_ba_detail_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_ba_detail_service.js
index 27a2214b..6e26b1c9 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_ba_detail_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_ba_detail_service.js
@@ -10,6 +10,7 @@ export default {
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
+ config.query.schema.properties.businessType.default = "MaiDanJianHBPO";
return { config, onCommand };
},
};
\ No newline at end of file
From 8da897893b928873b62c712e7adb98e07cbb6ec3 Mon Sep 17 00:00:00 2001
From: wanggang <76527413@qq.com>
Date: Sat, 12 Aug 2023 13:47:55 +0800
Subject: [PATCH 10/13] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=95=86=E5=8A=A1?=
=?UTF-8?q?=E5=AE=A1=E6=A0=B8=E5=92=8C=E8=B4=A2=E5=8A=A1=E5=AE=A1=E6=A0=B8?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E9=80=9A=E7=94=A8=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../wwwroot/models/inventory/adjust.js | 2 +-
.../wwwroot/models/inventory/log.js | 2 +-
.../jis-bbac/settlement/bbac_ba_service.js | 134 -----
.../jis-hbpo/settlement/hbpo_ba_service.js | 134 -----
.../wwwroot/models/pub_ba_service.js | 27 +-
.../wwwroot/router/business.js | 9 +
.../wwwroot/views/_check.js | 473 +++++++++++++++++
.../views/bj/settlement/bj_pub_ba_service.js | 13 +-
.../views/in/settlement/in_pub_ba_service.js | 13 +-
.../views/invoice/invoice_map_group.js | 486 +-----------------
.../jis-bbac/settlement/bbac_ba_service.js | 15 +-
.../jis-hbpo/settlement/hbpo_ba_service.js | 15 +-
.../settlement/bbac_jit_pub_ba_service.js | 15 +-
.../settlement/hbpo_jit_pub_ba_service.js | 13 +-
.../settlement/hbpo_md_pub_ba_service.js | 13 +-
.../Entities/BQ/VmiAppService.cs | 102 ++--
16 files changed, 625 insertions(+), 841 deletions(-)
delete mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_ba_service.js
delete mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_ba_service.js
create mode 100644 code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/_check.js
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/adjust.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/adjust.js
index 7b76c12f..a5500643 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/adjust.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/adjust.js
@@ -125,7 +125,7 @@ const detailsUrl = `${baseUrl}/get/%s`;
const createUrl = "settleaccount/vmi/edit-balance";
const updateUrl = `${baseUrl}/update/%s`;
const deleteUrl = `${baseUrl}/delete-list`;
-const importUrl = `${baseUrl}/code-setting-upload-excel-import`;
+const importUrl = `${baseUrl}/import`;
const exportUrl = `${baseUrl}/export`;
const queryMethod = "POST";
const detailsMethod = "POST";
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js
index 6a36303c..61041005 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/inventory/log.js
@@ -109,7 +109,7 @@ const detailsUrl = `${baseUrl}/get/%s`;
const createUrl = `${baseUrl}/create`;
const updateUrl = `${baseUrl}/update/%s`;
const deleteUrl = `${baseUrl}/delete-list`;
-const importUrl = `${baseUrl}/code-setting-upload-excel-import`;
+const importUrl = `${baseUrl}/log-import`;
const exportUrl = `${baseUrl}/log-export`;
const queryMethod = "POST";
const detailsMethod = "POST";
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_ba_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_ba_service.js
deleted file mode 100644
index 03f3f97f..00000000
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/settlement/bbac_ba_service.js
+++ /dev/null
@@ -1,134 +0,0 @@
-import version from "../../version.js";
-import { state2 as state, state3 } from "../../state.js";
-import businessType from "../../businessType.js";
-import invoiceState from "../../invoiceState.js";
-
-const schema = {
- title: "商务审批",
- type: "object",
- properties: {
- version,
- realnvBillNum: {
- title: "金税发票号",
- type: "string",
- },
- invbillNum: {
- title: "系统发票号",
- type: "string",
- },
- amt: {
- title: "未税金额",
- type: "number",
- },
- taxAmt: {
- title: "税后金额",
- type: "number",
- },
- invGroupNum: {
- title: "发票分组号",
- type: "number",
- },
- businessType,
- state,
- invoiceState,
- taxDiff: {
- title: "发票税后尾差",
- type: "number",
- },
- clientCode: {
- title: "客户代码",
- type: "string",
- },
- },
-};
-
-const queryUrl = "settleaccount/bbac_ba_service/main-query";
-const exportUrl = "settleaccount/bbac_ba_service/export";
-const invoiceUrl = "settleaccount/bbac_ba_service/generate-invoice";
-const receivedUrl = "settleaccount/bbac_ba_service/received";
-const rejectUrl = "settleaccount/bbac_ba_service/reject";
-const reissueUrl = "settleaccount/bbac_ba_service/reissue-invoice";
-const queryMethod = "POST";
-const exportMethod = "POST";
-const invoiceMethod = "POST";
-const receivedMethod = "POST";
-const rejectMethod = "POST";
-const reissueMethod = "POST";
-
-export default function () {
- 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,
- },
- ],
- },
- 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/models/jis-hbpo/settlement/hbpo_ba_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_ba_service.js
deleted file mode 100644
index f8088f76..00000000
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/settlement/hbpo_ba_service.js
+++ /dev/null
@@ -1,134 +0,0 @@
-import version from "../../version.js";
-import { state2 as state, state3 } from "../../state.js";
-import businessType from "../../businessType.js";
-import invoiceState from "../../invoiceState.js";
-
-const schema = {
- title: "不可结算单",
- type: "object",
- properties: {
- version,
- realnvBillNum: {
- title: "金税发票号",
- type: "string",
- },
- invbillNum: {
- title: "系统发票号",
- type: "string",
- },
- amt: {
- title: "未税金额",
- type: "number",
- },
- taxAmt: {
- title: "税后金额",
- type: "number",
- },
- invGroupNum: {
- title: "发票分组号",
- type: "number",
- },
- businessType,
- state,
- invoiceState,
- taxDiff: {
- title: "发票税后尾差",
- type: "number",
- },
- clientCode: {
- title: "客户代码",
- type: "string",
- },
- },
-};
-
-const queryUrl = "settleaccount/hbpo_ba_service/main-query";
-const exportUrl = "settleaccount/hbpo_ba_service/export";
-const invoiceUrl = "settleaccount/hbpo_ba_service/generate-invoice";
-const receivedUrl = "settleaccount/hbpo_ba_service/received";
-const rejectUrl = "settleaccount/hbpo_ba_service/reject";
-const reissueUrl = "settleaccount/hbpo_ba_service/reissue-invoice";
-const queryMethod = "POST";
-const exportMethod = "POST";
-const invoiceMethod = "POST";
-const receivedMethod = "POST";
-const rejectMethod = "POST";
-const reissueMethod = "POST";
-
-export default function () {
- 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,
- },
- ],
- },
- 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/models/pub_ba_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_ba_service.js
index 546fa078..111260b0 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_ba_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_ba_service.js
@@ -4,7 +4,7 @@ import businessType from "./businessType.js";
import invoiceState from "./invoiceState.js";
const schema = {
- title: "不可结算单",
+ title: "商务审批",
type: "object",
properties: {
version,
@@ -15,6 +15,7 @@ const schema = {
invbillNum: {
title: "系统发票号",
type: "string",
+ link: true,
},
amt: {
title: "未税金额",
@@ -27,6 +28,7 @@ const schema = {
invGroupNum: {
title: "发票分组号",
type: "number",
+ link: true,
},
businessType,
state,
@@ -41,16 +43,19 @@ const schema = {
},
},
};
-const queryUrl = "settleaccount/pub_ba_service/main-query";
-const exportUrl = "settleaccount/pub_ba_service/export";
-const invoiceUrl = "settleaccount/pub_ba_service/generate-invoice";
-const rejectUrl = "settleaccount/pub_ba_service/reject";
-const receivedUrl = "settleaccount/pub_ba_service/received";
+
+const queryUrl = "settleaccount/bbac_ba_service/main-query";
+const exportUrl = "settleaccount/bbac_ba_service/export";
+const invoiceUrl = "settleaccount/bbac_ba_service/generate-invoice";
+const receivedUrl = "settleaccount/bbac_ba_service/received";
+const rejectUrl = "settleaccount/bbac_ba_service/reject";
+const reissueUrl = "settleaccount/bbac_ba_service/reissue-invoice";
const queryMethod = "POST";
const exportMethod = "POST";
const invoiceMethod = "POST";
-const rejectMethod = "POST";
const receivedMethod = "POST";
+const rejectMethod = "POST";
+const reissueMethod = "POST";
export default function () {
return {
@@ -59,7 +64,7 @@ export default function () {
method: queryMethod,
hasFilter: true,
schema: {
- title: "结算数据",
+ title: "商务审批",
type: "object",
properties: {
filters: {
@@ -117,12 +122,14 @@ export default function () {
edit: {
exportUrl,
invoiceUrl,
- rejectUrl,
receivedUrl,
+ rejectUrl,
+ reissueUrl,
exportMethod,
invoiceMethod,
- rejectMethod,
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 99763e0c..1cb97111 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
@@ -3857,6 +3857,15 @@ export default [
isTop: true,
},
},
+ {
+ path: "import",
+ meta: {
+ type: "button",
+ title: "导入",
+ icon: "file",
+ isTop: true,
+ },
+ },
],
},
],
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/_check.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/_check.js
new file mode 100644
index 00000000..25463e64
--- /dev/null
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/_check.js
@@ -0,0 +1,473 @@
+import html from "html";
+import { schemaToModel } from "html";
+import { ref, defineModel, nextTick, onMounted, watch } from "vue";
+import request from "../request/index.js";
+import AppForm from "../components/form/index.js";
+import AppTable from "../components/table/index.js";
+
+export default {
+ components: { AppForm, AppTable },
+ template: html`
+ 结算明细
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 发票重开
+
+
+
+
+
+
+
+
+ 新建
+ 导入
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 添加调整明细
+
+
+
+
+
+
+
+
+
+
+
+
+ 导入调整明细
+
+
+
+
+
+
+
+
+
+
+ `,
+ styles: html` `,
+ props: ["modelValue", "data", "isBusiness"],
+ emit: ["update:modelValue"],
+ setup(props, context) {
+ const show = ref(props.modelValue);
+ watch(show, (value) => context.emit("update:modelValue", value));
+ const loading = ref(false);
+ const model = ref({
+ invoicE_WAIT_DETAIL: [],
+ invoicE_MAP_GROUP: [],
+ invoicE_NOT_SETTLE: [],
+ adJ_DETAIL: [],
+ });
+ //
+ const columns1 = [
+ {
+ dataKey: "version",
+ title: "期间",
+ },
+ {
+ dataKey: "invbillNum",
+ title: "发票号",
+ },
+ {
+ dataKey: "invGroupNum",
+ title: "发票分组号",
+ },
+ {
+ dataKey: "settleGroupNum",
+ title: "结算分组号",
+ },
+ {
+ dataKey: "amt",
+ title: "金额",
+ },
+ ];
+ const columns2 = [
+ {
+ key: "version",
+ dataKey: "version",
+ title: "期间",
+ },
+ {
+ dataKey: "invbillNum",
+ title: "发票号",
+ },
+ {
+ dataKey: "invGroupNum",
+ title: "发票分组号",
+ },
+ {
+ dataKey: "lu",
+ title: "零件号",
+ },
+ {
+ dataKey: "price",
+ title: "单价",
+ },
+ {
+ dataKey: "qty",
+ title: "数量",
+ },
+ {
+ dataKey: "amt",
+ title: "金额",
+ },
+ {
+ dataKey: "bussiessType",
+ title: "业务分类",
+ },
+ ];
+ const columns3 = [
+ {
+ dataKey: "version",
+ title: "期间",
+ },
+ {
+ dataKey: "invGroupNum",
+ title: "发票分组号",
+ },
+ {
+ dataKey: "settleGroupNum",
+ title: "结算分组号",
+ },
+ {
+ dataKey: "lu",
+ title: "可结算分组号",
+ },
+ {
+ dataKey: "lu1",
+ title: "不可结算分组号",
+ },
+ ];
+ const columns4 = [
+ {
+ dataKey: "oldInvBillNum",
+ title: "作废发票号",
+ },
+ {
+ dataKey: "invBillNum",
+ title: "发票号",
+ },
+ {
+ dataKey: "settleDate",
+ title: "下线日期",
+ },
+ {
+ dataKey: "invGroupNum",
+ title: "发票分组号",
+ },
+ {
+ dataKey: "lu",
+ title: "零件号",
+ },
+ {
+ dataKey: "pn",
+ title: "标识号",
+ },
+ {
+ dataKey: "qty",
+ title: "数量",
+ },
+ {
+ dataKey: "groupNum",
+ title: "结算分组",
+ },
+ ];
+ const columns5 = columns4.filter((o) => o.dataKey !== "oldInvBillNum" && o.dataKey !== "invGroupNum");
+ columns5.unshift({
+ input: "selection",
+ });
+ //显示重开发票对话框
+ const setupDialogVisable = ref(false);
+ const setupRef = ref(1);
+ const adjList = ref([]);
+ const scrollRef = ref(null);
+ const adjListRef = ref(null);
+ const addDialogVisible = ref(false);
+ const importDialogVisible = ref(false);
+ const showSetupDialog = () => {
+ adjList.value = [];
+ setupRef.value = 1;
+ setupDialogVisable.value = true;
+ };
+ const deleteAdj = () => {
+ const list = adjListRef.value.getSelection();
+ if (list.length > 0) {
+ for (let i = 0; i < list.length; i++) {
+ adjList.value.splice(list[i] - i, 1);
+ }
+ nextTick(() => {
+ adjListRef.value.clearSelection();
+ scrollRef.value.update();
+ });
+ }
+ };
+ const adjSchema = {
+ type: "object",
+ properties: {
+ invBillNum: {
+ type: "string",
+ title: "发票号",
+ rules: [{ required: true }],
+ },
+ settleDate: {
+ type: "string",
+ title: "下线日期",
+ input: "datetime",
+ rules: [{ required: true }],
+ },
+ lu: {
+ type: "string",
+ title: "零件号",
+ rules: [{ required: true }],
+ },
+ pn: {
+ type: "string",
+ title: "标识号",
+ rules: [{ required: true }],
+ },
+ qty: {
+ type: "string",
+ title: "数量",
+ input: "number",
+ rules: [{ required: true }],
+ },
+ groupNum: {
+ type: "string",
+ title: "结算分组",
+ rules: [{ required: true }],
+ },
+ },
+ };
+ const defaultAdjModel = schemaToModel(adjSchema);
+ const adjModel = ref(Object.assign({}, defaultAdjModel));
+ const addAdjFormRef = ref(null);
+ const showAddAdjDialog = () => {
+ adjModel.value = Object.assign({}, defaultAdjModel);
+ addDialogVisible.value = true;
+ };
+ const addAdj = async () => {
+ try {
+ const valid = await addAdjFormRef.value.validate();
+ if (valid) {
+ adjList.value.unshift(adjModel.value);
+ addDialogVisible.value = false;
+ }
+ } catch (error) {
+ console.log(error);
+ }
+ };
+ const importAdjFromRef = ref(null);
+ const importAdjSchema = {
+ type: "object",
+ properties: {
+ files: {
+ title: "文件",
+ type: "array",
+ multiple: true,
+ input: "file",
+ accept: ".xlsx",
+ default: [],
+ limit: 1,
+ size: 100 * 1024 * 1024,
+ rules: [
+ {
+ required: true,
+ trigger: "change",
+ },
+ ],
+ },
+ },
+ };
+ const defaultImportAdjModel = schemaToModel(importAdjSchema);
+ const importAdjModel = ref(defaultImportAdjModel);
+ const showImportAdjDialog = async () => {
+ importAdjModel.value = Object.assign({}, defaultImportAdjModel);
+ importDialogVisible.value = true;
+ };
+ const importAdj = async () => {
+ try {
+ const valid = await importAdjFromRef.value.validate();
+ if (valid) {
+ loading.value = true;
+ const url = "settleaccount/vmi/excel-to-json";
+ const formData = new FormData();
+ formData.append("files", importAdjModel.value.files[0].raw);
+ const result = await request(url, formData);
+ if (!result.errors) {
+ adjList.value = result.data;
+ importDialogVisible.value = false;
+ }
+ }
+ } catch (error) {
+ console.log(error);
+ } finally {
+ loading.value = false;
+ }
+ };
+ const submitReOpen = async () => {};
+ //
+ onMounted(async () => {
+ loading.value = true;
+ const response = await request("settleaccount/invoice_service/detail-query", props.data, { method: "POST" });
+ model.value = response.data;
+ loading.value = false;
+ });
+ return {
+ show,
+ loading,
+ model,
+ columns1,
+ columns2,
+ columns3,
+ columns4,
+ columns4,
+ columns5,
+ showSetupDialog,
+ setupRef,
+ setupDialogVisable,
+ adjList,
+ adjListRef,
+ deleteAdj,
+ showAddAdjDialog,
+ addDialogVisible,
+ addAdj,
+ addAdjFormRef,
+ importAdjFromRef,
+ adjSchema,
+ adjModel,
+ showImportAdjDialog,
+ importDialogVisible,
+ importAdjModel,
+ importAdjSchema,
+ importAdj,
+ scrollRef,
+ };
+ },
+};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/settlement/bj_pub_ba_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/settlement/bj_pub_ba_service.js
index 2636f5d1..e3c70576 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/settlement/bj_pub_ba_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/settlement/bj_pub_ba_service.js
@@ -1,16 +1,23 @@
import AppList from "../../../components/list/index.js";
import html from "html";
+import { ref } from "vue";
import useConfig from "../../../models/pub_ba_service.js";
+import AppCheck from "../../_check.js";
export default {
- components: { AppList },
- template: html``,
+ components: { AppList, AppCheck },
+ template: html`
+ `,
setup() {
const config = useConfig();
+ const visable = ref(false);
+ const data = ref(null);
const onCommand = async (item, rows) => {
+ data.value = { [item.path]: rows[0][item.path] };
+ visable.value = true;
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default = "BeiJian";
- return { config, onCommand };
+ return { config, onCommand, visable, data };
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/settlement/in_pub_ba_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/settlement/in_pub_ba_service.js
index 2c50f341..3bfa2cf5 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/settlement/in_pub_ba_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/settlement/in_pub_ba_service.js
@@ -1,16 +1,23 @@
import AppList from "../../../components/list/index.js";
import html from "html";
+import { ref } from "vue";
import useConfig from "../../../models/pub_ba_service.js";
+import AppCheck from "../../_check.js";
export default {
- components: { AppList },
- template: html``,
+ components: { AppList, AppCheck },
+ template: html`
+ `,
setup() {
const config = useConfig();
+ const visable = ref(false);
+ const data = ref(null);
const onCommand = async (item, rows) => {
+ data.value = { [item.path]: rows[0][item.path] };
+ visable.value = true;
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default = "YinDuJian";
- return { config, onCommand };
+ return { config, onCommand, visable, data };
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js
index 3a2113a0..cd945b2d 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/invoice/invoice_map_group.js
@@ -1,489 +1,23 @@
import AppList from "../../../components/list/index.js";
import AppForm from "../../../components/form/index.js";
import html from "html";
-import { ref, nextTick } from "vue";
+import { ref } from "vue";
import useConfig from "../../../models/invoice/invoice_map_group.js";
-import request from "../../../request/index.js";
-import AppTable from "../../components/table/index.js";
-import { post } from "../../../request/index.js";
-import { schemaToModel } from "html";
+import AppCheck from "../_check.js";
export default {
- components: { AppList, AppForm, AppTable },
+ components: { AppList, AppForm, AppCheck },
template: html`
-
- 结算明细
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 发票重开
-
-
-
-
-
-
-
-
- 新建
- 导入
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 添加调整明细
-
-
-
-
-
-
-
-
-
-
-
-
- 导入调整明细
-
-
-
-
-
-
-
-
-
-
- `,
- styles: html` `,
+ `,
setup() {
- const fileList = ref([]);
- const openImportHandler = async () => {
- const url = "settleaccount/vmi/excel-to-json";
- const method = "POST";
- const formData = new FormData();
- if (config.query.schema.properties.businessType?.default) {
- formData.append("businessType", config.query.schema.properties.businessType.default);
- }
- for (let i = 0; i < fileList.value.length; i++) {
- formData.append(`files`, fileList.value[i].raw);
- }
- await post(url, formData, method);
- };
- //create
- const invoiceValue = ref([]);
- const addDialogVisible = ref(false);
- const importDialogVisible = ref(false);
- const dialogVisible = ref(false);
const config = useConfig();
- const drawer = ref(false);
- const loading = ref(false);
- const model = ref({
- invoicE_WAIT_DETAIL: [],
- invoicE_MAP_GROUP: [],
- invoicE_NOT_SETTLE: [],
- adJ_DETAIL: [],
- });
- const prop = ref("");
+ const visable = ref(false);
+ const data = ref(null);
const onCommand = async (item, rows) => {
- prop.value = item.path;
- drawer.value = true;
- loading.value = true;
- const data = { [item.path]: rows[0][item.path] };
- const response = await request("settleaccount/invoice_service/detail-query", data, { method: "POST" });
- model.value = response.data;
- loading.value = false;
- };
- const columns1 = [
- {
- dataKey: "version",
- title: "期间",
- },
- {
- dataKey: "invbillNum",
- title: "发票号",
- },
- {
- dataKey: "invGroupNum",
- title: "发票分组号",
- },
- {
- dataKey: "settleGroupNum",
- title: "结算分组号",
- },
- {
- dataKey: "amt",
- title: "金额",
- },
- ];
- const columns2 = [
- {
- key: "version",
- dataKey: "version",
- title: "期间",
- },
- {
- dataKey: "invbillNum",
- title: "发票号",
- },
- {
- dataKey: "invGroupNum",
- title: "发票分组号",
- },
- {
- dataKey: "lu",
- title: "零件号",
- },
- {
- dataKey: "price",
- title: "单价",
- },
- {
- dataKey: "qty",
- title: "数量",
- },
- {
- dataKey: "amt",
- title: "金额",
- },
- {
- dataKey: "bussiessType",
- title: "业务分类",
- },
- ];
- const columns3 = [
- {
- dataKey: "version",
- title: "期间",
- },
- {
- dataKey: "invGroupNum",
- title: "发票分组号",
- },
- {
- dataKey: "settleGroupNum",
- title: "结算分组号",
- },
- {
- dataKey: "lu",
- title: "可结算分组号",
- },
- {
- dataKey: "lu1",
- title: "不可结算分组号",
- },
- ];
- const columns4 = [
- {
- dataKey: "oldInvBillNum",
- title: "作废发票号",
- },
- {
- dataKey: "invBillNum",
- title: "发票号",
- },
- {
- dataKey: "settleDate",
- title: "下线日期",
- },
- {
- dataKey: "invGroupNum",
- title: "发票分组号",
- },
- {
- dataKey: "lu",
- title: "零件号",
- },
- {
- dataKey: "pn",
- title: "标识号",
- },
- {
- dataKey: "qty",
- title: "数量",
- },
- {
- dataKey: "groupNum",
- title: "结算分组",
- },
- ];
- const columns5 = columns4.filter((o) => o.dataKey !== "oldInvBillNum" && o.dataKey !== "invGroupNum");
- columns5.unshift({
- input: "selection",
- });
- //
- const setupRef = ref(1);
- const scrollRef = ref(null);
- const adjListRef = ref(null);
- const adjList = ref([]);
- const showSetupDialog = () => {
- adjList.value = [];
- for (let i = 0; i < 10; i++) {
- adjList.value.push({ invBillNum: i });
- }
- setupRef.value = 1;
- dialogVisible.value = true;
- };
- const deleteAdj = () => {
- const list = adjListRef.value.getSelection();
- if (list.length > 0) {
- for (let i = 0; i < list.length; i++) {
- adjList.value.splice(list[i] - i, 1);
- }
- nextTick(() => {
- adjListRef.value.clearSelection();
- scrollRef.value.update();
- });
- }
- };
- const adjSchema = {
- type: "object",
- properties: {
- invBillNum: {
- type: "string",
- title: "发票号",
- rules: [{ required: true }],
- },
- settleDate: {
- type: "string",
- title: "下线日期",
- input: "datetime",
- rules: [{ required: true }],
- },
- lu: {
- type: "string",
- title: "零件号",
- rules: [{ required: true }],
- },
- pn: {
- type: "string",
- title: "标识号",
- rules: [{ required: true }],
- },
- qty: {
- type: "string",
- title: "数量",
- input: "number",
- rules: [{ required: true }],
- },
- groupNum: {
- type: "string",
- title: "结算分组",
- rules: [{ required: true }],
- },
- },
- };
- const defaultAdjModel = schemaToModel(adjSchema);
- const adjModel = ref(Object.assign({}, defaultAdjModel));
- const addAdjFormRef = ref(null);
- const showAddAdjDialog = () => {
- adjModel.value = Object.assign({}, defaultAdjModel);
- addDialogVisible.value = true;
- };
- const addAdj = async () => {
- try {
- const valid = await addAdjFormRef.value.validate();
- if (valid) {
- adjList.value.unshift(adjModel.value);
- addDialogVisible.value = false;
- }
- } catch (error) {
- console.log(error);
- }
- };
- const importAdjFromRef = ref(null);
- const importAdjSchema = {
- type: "object",
- properties: {
- files: {
- title: "文件",
- type: "array",
- multiple: true,
- input: "file",
- accept: ".xlsx",
- default: [],
- limit: 1,
- size: 100 * 1024 * 1024,
- rules: [
- {
- required: true,
- trigger: "change",
- },
- ],
- },
- },
- };
- const defaultImportAdjModel = schemaToModel(importAdjSchema);
- const importAdjModel = ref(defaultImportAdjModel);
- const showImportAdjDialog = async () => {
- importAdjModel.value = Object.assign({}, defaultImportAdjModel);
- importDialogVisible.value = true;
- };
- const importAdj = async () => {
- try {
- const valid = await importAdjFromRef.value.validate();
- if (valid) {
- loading.value = true;
- const url = "settleaccount/vmi/excel-to-json";
- const formData = new FormData();
- formData.append("files", importAdjModel.value.files[0].raw);
- const result = await request(url, formData);
- if (!result.errors) {
- adjList.value = result.data;
- importDialogVisible.value = false;
- }
- }
- } catch (error) {
- console.log(error);
- } finally {
- loading.value = false;
- }
- };
- return {
- config,
- onCommand,
- drawer,
- loading,
- model,
- columns1,
- columns2,
- columns3,
- columns4,
- columns4,
- columns5,
- addDialogVisible,
- dialogVisible,
- prop,
- invoiceValue,
- importDialogVisible,
- openImportHandler,
- setupRef,
- showSetupDialog,
- adjList,
- adjListRef,
- deleteAdj,
- showAddAdjDialog,
- addAdj,
- addAdjFormRef,
- importAdjFromRef,
- adjSchema,
- adjModel,
- showImportAdjDialog,
- importAdjModel,
- importAdjSchema,
- importAdj,
- scrollRef,
+ data.value = { [item.path]: rows[0][item.path] };
+ visable.value = true;
+ console.log(item.path, item, rows);
};
+ return { config, onCommand, visable, data };
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/settlement/bbac_ba_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/settlement/bbac_ba_service.js
index 55a02496..26f8e4f3 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/settlement/bbac_ba_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/settlement/bbac_ba_service.js
@@ -1,16 +1,23 @@
import AppList from "../../../components/list/index.js";
import html from "html";
-import useConfig from "../../../models/jis-bbac/settlement/bbac_ba_service.js";
+import { ref } from "vue";
+import useConfig from "../../../models/pub_ba_service.js";
+import AppCheck from "../../_check.js";
export default {
- components: { AppList },
- template: html``,
+ components: { AppList, AppCheck },
+ template: html`
+ `,
setup() {
const config = useConfig();
+ const visable = ref(false);
+ const data = ref(null);
const onCommand = async (item, rows) => {
+ data.value = { [item.path]: rows[0][item.path] };
+ visable.value = true;
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default = "JisBBAC";
- return { config, onCommand };
+ return { config, onCommand, visable, data };
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/settlement/hbpo_ba_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/settlement/hbpo_ba_service.js
index a6cecca7..4acd8f80 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/settlement/hbpo_ba_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/settlement/hbpo_ba_service.js
@@ -1,16 +1,23 @@
import AppList from "../../../components/list/index.js";
import html from "html";
-import useConfig from "../../../models/jis-hbpo/settlement/hbpo_ba_service.js";
+import { ref } from "vue";
+import useConfig from "../../../models/pub_ba_service.js";
+import AppCheck from "../../_check.js";
export default {
- components: { AppList },
- template: html``,
+ components: { AppList, AppCheck },
+ template: html`
+ `,
setup() {
const config = useConfig();
+ const visable = ref(false);
+ const data = ref(null);
const onCommand = async (item, rows) => {
+ data.value = { [item.path]: rows[0][item.path] };
+ visable.value = true;
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default = "JisHBPO";
- return { config, onCommand };
+ return { config, onCommand, visable, data };
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_ba_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_ba_service.js
index ba1c9850..c66aaa62 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_ba_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/settlement/bbac_jit_pub_ba_service.js
@@ -1,16 +1,23 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
+import { ref } from "vue";
import useConfig from "../../../../models/pub_ba_service.js";
+import AppCheck from "../../../_check.js";
export default {
- components: { AppList },
- template: html``,
+ components: { AppList, AppCheck },
+ template: html`
+ `,
setup() {
const config = useConfig();
+ const visable = ref(false);
+ const data = ref(null);
const onCommand = async (item, rows) => {
+ data.value = { [item.path]: rows[0][item.path] };
+ visable.value = true;
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default = "ZhiGongJianBBAC";
- return { config, onCommand };
+ return { config, onCommand, visable, data };
},
-};
\ No newline at end of file
+};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_ba_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_ba_service.js
index aa37a9bf..5d261fed 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_ba_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/settlement/hbpo_jit_pub_ba_service.js
@@ -1,16 +1,23 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
+import { ref } from "vue";
import useConfig from "../../../../models/pub_ba_service.js";
+import AppCheck from "../../../_check.js";
export default {
- components: { AppList },
- template: html``,
+ components: { AppList, AppCheck },
+ template: html`
+ `,
setup() {
const config = useConfig();
+ const visable = ref(false);
+ const data = ref(null);
const onCommand = async (item, rows) => {
+ data.value = { [item.path]: rows[0][item.path] };
+ visable.value = true;
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default = "ZhiGongJianHBPO";
- return { config, onCommand };
+ return { config, onCommand, visable, data };
},
};
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_ba_service.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_ba_service.js
index 671cdd3c..29ecd5fb 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_ba_service.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/settlement/hbpo_md_pub_ba_service.js
@@ -1,16 +1,23 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
+import { ref } from "vue";
import useConfig from "../../../../models/pub_ba_service.js";
+import AppCheck from "../../../_check.js";
export default {
- components: { AppList },
- template: html``,
+ components: { AppList, AppCheck },
+ template: html`
+ `,
setup() {
const config = useConfig();
+ const visable = ref(false);
+ const data = ref(null);
const onCommand = async (item, rows) => {
+ data.value = { [item.path]: rows[0][item.path] };
+ visable.value = true;
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default = "MaiDanJianHBPO";
- return { config, onCommand };
+ return { config, onCommand, visable, data };
},
};
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs
index 71fc0975..20b9677e 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs
@@ -360,42 +360,6 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
}).ConfigureAwait(false);
}
- /////
- ///// 库存事务回滚
- /////
- //[NonAction]
- //[UnitOfWork]
- //public async Task UnDo(string groupId)
- //{
- // var logList = this._logRepository.Where(o => o.GroupId == groupId).AsNoTracking().OrderBy(o => o.ChangedTime);
- // foreach (var item in logList)
- // {
- // var balance = this._balanceRepository.FirstOrDefault(o => o.BillType == item.BillType &&
- // o.PartCode == item.PartCode &&
- // o.VinCode == item.VinCode &&
- // o.ErpToLoc == item.ErpToLoc &&
- // o.OrderNum == item.OrderNum);
- // if (balance == null)
- // {
- // balance = new VmiBalance(GuidGenerator.Create());
- // balance.InjectFrom(item);
- // await _balanceRepository.InsertAsync(balance).ConfigureAwait(false);
- // }
- // else
- // {
- // balance.Qty += item.ChangedQty;
- // this._balanceRepository.UpdateAsync(balance).Wait();
- // }
- // var log = new VmiLog();
- // log.InjectFrom(item);
- // log.LogType = VmiLogType.Type300;
- // log.ChangedType = VmiType.In;
- // log.ChangedTime = DateTime.Now;
- // log.ChangedBy = _currentUser.UserName;
- // await _logRepository.InsertAsync(log).ConfigureAwait(false);
- // }
- //}
-
///
/// 库存余额查询
///
@@ -491,6 +455,47 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
return new PagedResultDto(count, entities);
}
+ ///
+ /// 人工调整
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task EditBalance(VmiLog log)
+ {
+ if (log.Qty >= decimal.Zero)
+ {
+ log.LogType = VmiLogType.Type500;
+ log.ChangedType = VmiType.In;
+ var data = new VmiBalance();
+ data.InjectFrom(log);
+ await In(VmiLogType.Type500, null, data).ConfigureAwait(false);
+ }
+ else
+ {
+ log.LogType = VmiLogType.Type600;
+ log.ChangedType = VmiType.Out;
+ log.Qty = -log.Qty;
+ await this.Out(VmiLogType.Type600, null, log).ConfigureAwait(false);
+ }
+ }
+
+ ///
+ /// 库存调整导入
+ ///
+ ///
+ [HttpPost]
+ public async Task Import(List files)
+ {
+ using var ms = new MemoryStream();
+ await files.FirstOrDefault().OpenReadStream().CopyToAsync(ms).ConfigureAwait(false);
+ var list = this.ImportInternal(ms.ToArray());
+ foreach (var file in list)
+ {
+ await EditBalance(file).ConfigureAwait(false);
+ }
+ }
+
///
/// 快照列表
///
@@ -537,31 +542,6 @@ public class VmiAppService : ApplicationService, IVmiService, IJobService, ITran
return fileName;
}
- ///
- /// 人工调整
- ///
- ///
- ///
- [HttpPost]
- public async Task EditBalance(VmiLog log)
- {
- if (log.Qty >= decimal.Zero)
- {
- log.LogType = VmiLogType.Type500;
- log.ChangedType = VmiType.In;
- var data = new VmiBalance();
- data.InjectFrom(log);
- await In(VmiLogType.Type500, null, data).ConfigureAwait(false);
- }
- else
- {
- log.LogType = VmiLogType.Type600;
- log.ChangedType = VmiType.Out;
- log.Qty = -log.Qty;
- await this.Out(VmiLogType.Type600, null, log).ConfigureAwait(false);
- }
- }
-
private byte[] GetContent(List entities, string name = "sheet1")
{
using var workbook = new XLWorkbook();
From 8b032873b421a33e12962ad80b9771201edd59ea Mon Sep 17 00:00:00 2001
From: wanggang <76527413@qq.com>
Date: Sat, 12 Aug 2023 15:11:35 +0800
Subject: [PATCH 11/13] update
---
.../wwwroot/views/home.js | 122 +++++++++++++++++-
1 file changed, 121 insertions(+), 1 deletion(-)
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/home.js b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/home.js
index e3339215..189b7337 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/home.js
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/home.js
@@ -1,5 +1,125 @@
import html from "html";
export default {
- template: html`导入模板下载`,
+ template: html`导入模板下载
+
+ `,
+ setup() {
+ const page = "page";
+ const createRoute = (path, title, type = "group") => {
+ return {
+ path,
+ title,
+ meta: {
+ title,
+ type,
+ },
+ };
+ };
+ const createGroup = (input = 1, compare = 1, settle = 1) => {
+ const result = [];
+ if (input) {
+ result.push({
+ ...createRoute("input", "数据输入"),
+ children: [
+ { ...createRoute("jie-suan", "结算数据", page) },
+ { ...createRoute("fa-yun", "发运数据", page) },
+ { ...createRoute("edi", "EDI数据", page) },
+ ],
+ });
+ }
+ if (compare) {
+ result.push({
+ ...createRoute("compare", "数据比对"),
+ children: [
+ { ...createRoute("fa-yun", "EDI与发运数据", page) },
+ { ...createRoute("jie-suan", "EDI、发运与计算数据比对", page) },
+ ],
+ });
+ }
+ if (settle) {
+ result.push({
+ ...createRoute("settle", "结算开票"),
+ children: [
+ { ...createRoute("ke-jie-suan", "可结算单", page) },
+ { ...createRoute("bu-ke-jie-suan", "不可结算单", page) },
+ { ...createRoute("shang-wu", "商务审批", page) },
+ { ...createRoute("ku-cun", "寄售库库存扣减审批", page) },
+ ],
+ });
+ }
+ return result;
+ };
+ const list = [
+ {
+ ...createRoute("bbac", "BBAC"),
+ children: [
+ {
+ ...createRoute("jis", "JIS"),
+ children: createGroup(),
+ },
+ {
+ ...createRoute("zhi-gong", "直供件"),
+ children: createGroup(),
+ },
+ {
+ ...createRoute("yin-du", "印度件"),
+ children: createGroup(),
+ },
+ {
+ ...createRoute("bei-jian", "备件"),
+ children: createGroup(),
+ },
+ {
+ ...createRoute("mai-dan", "买单件"),
+ children: createGroup(1, 1, 0),
+ },
+ ],
+ },
+ {
+ ...createRoute("hbpo", "HBPO"),
+ children: [
+ {
+ ...createRoute("jis", "JIS"),
+ children: createGroup(),
+ },
+ {
+ ...createRoute("zhi-gong", "直供件"),
+ children: createGroup(),
+ },
+ // {
+ // ...createRoute("yin-du", "印度件"),
+ // children: createGroup(0, 0, 0),
+ // },
+ // {
+ // ...createRoute("bei-jian", "备件"),
+ // children: createGroup(0, 0, 0),
+ // },
+ {
+ ...createRoute("mai-dan", "买单件"),
+ children: createGroup(),
+ },
+ ],
+ },
+ ];
+ const props = {
+ label: (data) => {
+ return data.meta?.title;
+ },
+ };
+ const handleNodeClick = (a, b, c, d) => {
+ console.log(a);
+ console.log(b);
+ console.log(c);
+ console.log(d);
+ if (a.meta?.type === "page") {
+ console.log(a.path);
+ }
+ };
+ return {
+ list,
+ props,
+ handleNodeClick,
+ };
+ },
};
From dcbe7e9199411f9a444830ebf873f278da60edbc Mon Sep 17 00:00:00 2001
From: mahao
Date: Mon, 14 Aug 2023 11:34:51 +0800
Subject: [PATCH 12/13] =?UTF-8?q?=E7=BB=93=E7=AE=97=E4=BB=8E=E8=A1=A8?=
=?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../SettleAccount.HttpApi.Host/Startup.cs | 4 +-
.../Entities/BQ/Dtos/BBAC_SA_DTO.cs | 106 +++++++++++-
.../Entities/BQ/Dtos/HBPO_SA_DTO.cs | 104 ++++++++++++
.../Entities/BQ/Dtos/PUB_SA_DTO.cs | 158 +++++++++++++++++-
.../Entities/BQ/BBAC_SA_DETAIL_SERVICE.cs | 91 +++++++++-
.../Entities/BQ/BBAC_SA_SERVICE.cs | 15 +-
.../Entities/BQ/HBPO_SA_DETAIL_SERVICE.cs | 91 +++++++++-
.../Entities/BQ/HBPO_SA_SERVICE.cs | 34 ++--
.../Entities/BQ/PUB_SA_DETAIL_SERVICE.cs | 15 ++
.../Entities/BQ/PUB_SA_SERVICE.cs | 86 +++++-----
.../Entities/BQ/Syncs/BBACSeSyncAppService.cs | 36 ++--
.../Entities/BQ/Syncs/HBPOSeSyncAppService.cs | 117 ++++++++-----
.../BQ/Syncs/JisBBACSeEdiCompareAppService.cs | 50 +++++-
.../BQ/Syncs/JisHBPOSeEdiCompareAppService.cs | 24 ++-
.../Entities/BQ/Syncs/JitSeSyncAppService.cs | 19 +++
...ttleAccountApplicationAutoMapperProfile.cs | 156 +++++++++++------
.../Entities/BQ/BBAC_SE_DETAIL.cs | 13 +-
.../Entities/BQ/BBAC_SE_EDI.cs | 6 +
.../Entities/BQ/HBPO_SE_EDI.cs | 6 +
19 files changed, 930 insertions(+), 201 deletions(-)
diff --git a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs
index 71c6ceb6..93e27e85 100644
--- a/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs
+++ b/code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs
@@ -29,6 +29,7 @@ public class Startup
options.MimeTypes = ResponseCompressionDefaults.MimeTypes.Concat(new[] { "image/svg+xml" });
});
services.AddScheduler();
+ services.AddSingleton();
services.AddSingleton();
services.AddSignalR(o => o.EnableDetailedErrors = true);
JobHostdService.AddService(services);
@@ -57,7 +58,8 @@ public class Startup
app.UseEndpoints(endpoints => endpoints.MapHub("/api/hub"));
app.ApplicationServices.UseScheduler(scheduler =>
{
- scheduler.Schedule().EverySeconds(10);
+ scheduler.Schedule().EverySeconds(10);
+ //scheduler.Schedule().EverySeconds(10);
});
var contentTypeProvider = new FileExtensionContentTypeProvider();
contentTypeProvider.Mappings.Add(".mjs", "text/javascript");
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SA_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SA_DTO.cs
index 85ece7d0..9e0cfe70 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SA_DTO.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_SA_DTO.cs
@@ -53,6 +53,49 @@ public class BBAC_SA_DTO : EntityDto
public EnumBusinessType BusinessType { get; set; }
}
+///
+/// BBAC结算明细
+///
+public class BBAC_SA_DETAIL_DTO : EntityDto
+{
+ ///
+ /// 结算单
+ ///
+ public string BillNum { set; get; }
+ ///
+ /// 期间
+ ///
+ public int Version { set; get; }
+ ///
+ /// 结算分组号
+ ///
+ public string GroupNum { get; set; }
+ ///
+ /// 生产号
+ ///
+ public string PN { get; set; }
+ ///
+ /// 客户物料号
+ ///
+ public string LU { get; set; }
+ ///
+ /// 数量
+ ///
+ public string Qty { get; set; }
+ ///
+ /// 结算日期
+ ///
+ public DateTime SettleDate { set; get; }
+ ///
+ /// 单价
+ ///
+ public decimal Price { set; get; }
+ ///
+ /// 厂内物料号
+ ///
+ public string PartCode { get; set; }
+}
+
///
/// BBAC结算明细导入
///
@@ -79,7 +122,7 @@ public class BBAC_SA_DETAIL_IMPORT_DTO
[Display(Name = "Material")]
[Required(ErrorMessage = "{0}不能为空")]
[ImporterHeader(Name = "Material")]
- public string PartCode { get; set; }
+ public string LU { get; set; }
///
/// 数量
@@ -96,3 +139,64 @@ public class BBAC_SA_DETAIL_IMPORT_DTO
[ImporterHeader(Name = "External Call Number")]
public string PN { get; set; }
}
+
+///
+/// 结算明细导出请求
+///
+public class BBAC_SA_DETAIL_EXPORT_REQUEST_DTO
+{
+ ///
+ /// 结算单号
+ ///
+ [Display(Name = "结算单号")]
+ [Required(ErrorMessage = "{0}不能为空")]
+ public string BillNum { set; get; }
+}
+
+///
+/// 结算明细导出
+///
+public class BBAC_SA_DETAIL_EXPORT_DTO
+{
+ ///
+ /// 结算单号
+ ///
+ [Display(Name = "结算单号")]
+ [ExporterHeader(DisplayName = "结算单号")]
+ public string BillNum { set; get; }
+
+ ///
+ /// 结算日期
+ ///
+ [Display(Name = "结算日期")]
+ [ExporterHeader(DisplayName = "结算日期")]
+ public DateTime SettleDate { set; get; }
+
+ ///
+ /// 发货单号
+ ///
+ [Display(Name = "发货单号")]
+ [ExporterHeader(DisplayName = "发货单号")]
+ public string PN { get; set; }
+
+ ///
+ /// 零件号
+ ///
+ [Display(Name = "零件号")]
+ [ExporterHeader(DisplayName = "零件号")]
+ public string LU { get; set; }
+
+ ///
+ /// 数量
+ ///
+ [Display(Name = "数量")]
+ [ExporterHeader(DisplayName = "数量")]
+ public decimal Qty { get; set; }
+
+ ///
+ /// 结算分组
+ ///
+ [Display(Name = "结算分组")]
+ [ExporterHeader(DisplayName = "结算分组")]
+ public string GroupNum { get; set; }
+}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SA_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SA_DTO.cs
index 213832ce..bb31d34a 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SA_DTO.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_SA_DTO.cs
@@ -53,6 +53,49 @@ public class HBPO_SA_DTO : EntityDto
public EnumBusinessType BusinessType { get; set; }
}
+///
+/// HBPO结算明细
+///
+public class HBPO_SA_DETAIL_DTO : EntityDto
+{
+ ///
+ /// 结算单
+ ///
+ public string BillNum { set; get; }
+ ///
+ /// 期间
+ ///
+ public int Version { set; get; }
+ ///
+ /// 结算分组号
+ ///
+ public string GroupNum { get; set; }
+ ///
+ /// 生产号
+ ///
+ public string PN { get; set; }
+ ///
+ /// 客户物料号
+ ///
+ public string LU { get; set; }
+ ///
+ /// 数量
+ ///
+ public string Qty { get; set; }
+ ///
+ /// 结算日期
+ ///
+ public DateTime SettleDate { set; get; }
+ ///
+ /// 单价
+ ///
+ public decimal Price { set; get; }
+ ///
+ /// 厂内物料号
+ ///
+ public string PartCode { get; set; }
+}
+
///
/// HBPO结算明细导入
///
@@ -112,3 +155,64 @@ public class HBPO_SA_DETAIL_IMPORT_DTO
[ImporterHeader(Name = "productionNumber")]
public string PN { get; set; }
}
+
+///
+/// 结算明细导出请求
+///
+public class HBPO_SA_DETAIL_EXPORT_REQUEST_DTO
+{
+ ///
+ /// 结算单号
+ ///
+ [Display(Name = "结算单号")]
+ [Required(ErrorMessage = "{0}不能为空")]
+ public string BillNum { set; get; }
+}
+
+///
+/// 结算明细导出
+///
+public class HBPO_SA_DETAIL_EXPORT_DTO
+{
+ ///
+ /// 结算单号
+ ///
+ [Display(Name = "结算单号")]
+ [ExporterHeader(DisplayName = "结算单号")]
+ public string BillNum { set; get; }
+
+ ///
+ /// 结算日期
+ ///
+ [Display(Name = "结算日期")]
+ [ExporterHeader(DisplayName = "结算日期")]
+ public DateTime SettleDate { set; get; }
+
+ ///
+ /// 发货单号
+ ///
+ [Display(Name = "发货单号")]
+ [ExporterHeader(DisplayName = "发货单号")]
+ public string PN { get; set; }
+
+ ///
+ /// 零件号
+ ///
+ [Display(Name = "零件号")]
+ [ExporterHeader(DisplayName = "零件号")]
+ public string LU { get; set; }
+
+ ///
+ /// 数量
+ ///
+ [Display(Name = "数量")]
+ [ExporterHeader(DisplayName = "数量")]
+ public decimal Qty { get; set; }
+
+ ///
+ /// 结算分组
+ ///
+ [Display(Name = "结算分组")]
+ [ExporterHeader(DisplayName = "结算分组")]
+ public string GroupNum { get; set; }
+}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs
index e387b2f8..2fcd600e 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs
@@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Http;
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Application.Dtos;
+using Volo.Abp.Domain.Entities.Auditing;
namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
{
@@ -198,13 +199,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///
/// 备件导入
///
- public class BeiJianImportDto
+ public class BeiJianImportDto : BeiJianExtraImportDto
{
///
/// 结算日期
///
[Display(Name = "结算日期")]
- [ImporterHeader(IsIgnore = true)]
+ [ImporterHeader(Name = "开票日期")]
public DateTime SettleDate { set; get; }
///
@@ -237,6 +238,116 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[ImporterHeader(Name = "凭证号")]
[Required(ErrorMessage = "{0}不能为空")]
public string GroupNum { get; set; }
+
+ /////
+ ///// 备件扩展
+ /////
+ //[Display(Name = "备件扩展")]
+ //public BeiJianExtraImportDto beiJianExtraImportDto { get; set; }
+ }
+
+ ///
+ /// 备件扩展
+ ///
+ public class BeiJianExtraImportDto
+ {
+ ///
+ /// 交货号
+ ///
+ [Display(Name = "交货号")]
+ [ImporterHeader(Name = "交货号")]
+ public string DeliveryNumber { set; get; }
+
+ ///
+ /// 发票号
+ ///
+ [Display(Name = "发票号")]
+ [ImporterHeader(Name = "发票号")]
+ public string InvoiceNumber { set; get; }
+
+ ///
+ /// 供应商代码
+ ///
+ [Display(Name = "供应商代码")]
+ [ImporterHeader(Name = "供应商代码")]
+ public string VendorCode { set; get; }
+
+ ///
+ /// 供应商名称
+ ///
+ [Display(Name = "供应商名称")]
+ [ImporterHeader(Name = "供应商名称")]
+ public string VendorName { set; get; }
+
+ ///
+ /// 采购订单号
+ ///
+ [Display(Name = "采购订单号")]
+ [ImporterHeader(Name = "采购订单号")]
+ public string PurchaseOrderNumber { set; get; }
+
+ ///
+ /// 交付索引号
+ ///
+ [Display(Name = "交付索引号")]
+ [ImporterHeader(Name = "交付索引号")]
+ public string DeliveryIndexNumber { set; get; }
+
+ ///
+ /// 零件名称
+ ///
+ [Display(Name = "零件名称")]
+ [ImporterHeader(Name = "零件名称")]
+ public string PartName { set; get; }
+
+ ///
+ /// 价格
+ ///
+ [Display(Name = "价格")]
+ [ImporterHeader(Name = "价格")]
+ public decimal Price { set; get; }
+
+ ///
+ /// 金额
+ ///
+ [Display(Name = "金额")]
+ [ImporterHeader(Name = "金额")]
+ public decimal Amount { set; get; }
+
+ ///
+ /// 税额
+ ///
+ [Display(Name = "税额")]
+ [ImporterHeader(Name = "税额")]
+ public decimal Tallage { set; get; }
+
+ ///
+ /// 价税合计
+ ///
+ [Display(Name = "价税合计")]
+ [ImporterHeader(Name = "价税合计")]
+ public decimal Total { set; get; }
+
+ ///
+ /// 协议编号
+ ///
+ [Display(Name = "协议编号")]
+ [ImporterHeader(Name = "协议编号")]
+ public string ProtocolNumber { set; get; }
+
+ ///
+ /// 备注
+ ///
+ [Display(Name = "备注")]
+ [ImporterHeader(Name = "备注")]
+ public string Remark { set; get; }
+
+ ///
+ /// 商品组
+ ///
+ [Display(Name = "商品组")]
+ [ImporterHeader(Name = "商品组")]
+ public string CommodityGroup { set; get; }
}
///
@@ -283,6 +394,49 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public string GroupNum { get; set; }
}
+ ///
+ /// PUB结算明细
+ ///
+ public class PUB_SA_DETAIL_DTO : AuditedAggregateRoot
+ {
+ ///
+ /// 结算单
+ ///
+ public string BillNum { set; get; }
+ ///
+ /// 期间
+ ///
+ public int Version { set; get; }
+ ///
+ /// 结算分组号
+ ///
+ public string GroupNum { get; set; }
+ ///
+ /// 生产号
+ ///
+ public string PN { get; set; }
+ ///
+ /// 客户物料号
+ ///
+ public string LU { get; set; }
+ ///
+ /// 数量
+ ///
+ public string Qty { get; set; }
+ ///
+ /// 结算日期
+ ///
+ public DateTime SettleDate { set; get; }
+ ///
+ /// 单价
+ ///
+ public decimal Price { set; get; }
+ ///
+ /// 厂内物料号
+ ///
+ public string PartCode { get; set; }
+ }
+
///
/// 结算明细导出请求
///
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_DETAIL_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_DETAIL_SERVICE.cs
index a293d9ca..aacc4594 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_DETAIL_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_DETAIL_SERVICE.cs
@@ -1,7 +1,22 @@
using System;
+using System.Collections.Generic;
+using System.LinqAsync;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
+using SettleAccount.Domain.BQ;
+using Shouldly;
+using Volo.Abp;
+using Volo.Abp.Application.Dtos;
+using Volo.Abp.Caching;
+using Win.Abp.Snowflakes;
+using Win.Sfs.BaseData.ImportExcelCommon;
+using Win.Sfs.SettleAccount.CommonManagers;
+using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
+using Win.Sfs.SettleAccount.Entities.TaskJobs;
+using Win.Sfs.SettleAccount.ExcelImporter;
+using Win.Sfs.Shared.Filter;
+using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ;
@@ -10,8 +25,82 @@ namespace Win.Sfs.SettleAccount.Entities.BQ;
///
[AllowAnonymous]
[Route("api/settleaccount/[controller]/[action]")]
-public class BBAC_SA_DETAIL_SERVICE
+public class BBAC_SA_DETAIL_SERVICE : SettleAccountApplicationBase
{
+ ///
+ /// BBAC结算明细仓储
+ ///
+ private readonly INormalEfCoreRepository _bbacSaDetailRepository;
+
+ ///
+ /// BBAC结算仓储
+ ///
+ private readonly INormalEfCoreRepository _bbacSaRepository;
+
+ ///
+ /// 任务服务
+ ///
+ private readonly TaskJobService _taskJobService;
+
+ ///
+ /// 构造
+ ///
+ public BBAC_SA_DETAIL_SERVICE(INormalEfCoreRepository bbacSaDetailRepository,
+ INormalEfCoreRepository bbacSaRepository,
+ TaskJobService taskJobService,
+ IDistributedCache cache,
+ IExcelImportAppService excelImportService,
+ ISnowflakeIdGenerator snowflakeIdGenerator,
+ ICommonManager commonManager
+ ) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
+ {
+ _bbacSaDetailRepository = bbacSaDetailRepository;
+ _bbacSaRepository = bbacSaRepository;
+ _taskJobService = taskJobService;
+ }
+
+ #region 导出
+ ///
+ /// 导出
+ ///
+ [HttpPost]
+ public async Task ExportAsync(BBAC_SA_DETAIL_EXPORT_REQUEST_DTO input)
+ {
+ var pubSaEntity = await _bbacSaRepository.FirstOrDefaultAsync(t => t.BillNum == input.BillNum).ConfigureAwait(false);
+ if (pubSaEntity == null)
+ {
+ throw new UserFriendlyException($"导出失败,结算单号不存在!", "400");
+ }
+ string fileName = $"JisBBAC的结算数据_{Guid.NewGuid()}.xlsx";
+ List filters = new List();
+ filters.Add(new FilterCondition("BillNum", input.BillNum, EnumFilterAction.Equal, EnumFilterLogic.And));
+
+ var entities = await _bbacSaDetailRepository.GetListByFilterAsync(filters).ConfigureAwait(false);
+ var dtos = ObjectMapper.Map, List>(entities);
+
+ ExportImporter _exportImporter = new ExportImporter();
+ var result = await _exportImporter.ExcelExporter(dtos).ConfigureAwait(false);
+ result.ShouldNotBeNull();
+
+ await _excelImportService.SaveBlobAsync(new SaveExcelImportInputDto { Name = fileName, Content = result }).ConfigureAwait(false);
+ return fileName;
+ }
+ #endregion
+
+ #region CURD
+ ///
+ /// 获取列表
+ ///
+ [HttpPost]
+ public async Task> GetListAsync(RequestDto input)
+ {
+ var entities = await _bbacSaDetailRepository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true).ConfigureAwait(false);
+ var totalCount = await _bbacSaDetailRepository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false);
+ var dtos = ObjectMapper.Map, List>(entities);
+ return new PagedResultDto(totalCount, dtos);
+ }
+ #endregion
+
#region 对比
///
/// BBAC结算与发运比对
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 3ff82dcf..7790624d 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
@@ -312,13 +312,13 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase
bbacSaDetails.ForEach(bbacSaDetail =>
{
- List partCodes = bbacSaDetail.PartCode.Split(" ").ToList();
- bbacSaDetail.PartCode = partCodes[0].Replace(" ", "");
- if (partCodes.Count > 1)
+ List lus = bbacSaDetail.LU.Split(" ").ToList();
+ bbacSaDetail.LU = lus[0].Replace(" ", "");
+ if (lus.Count > 1)
{
- partCodes.RemoveAt(0);
- var partCodeAssemble = partCodes.Select(t => t.Replace(" ", ""));
- bbacSaDetail.PartCode += partCodeAssemble.Aggregate(" ", (current, index) => current + index);
+ lus.RemoveAt(0);
+ var luAssemble = lus.Select(t => t.Replace(" ", ""));
+ bbacSaDetail.LU += luAssemble.Aggregate(" ", (current, index) => current + index);
}
bbacSaDetail.BillNum = bbacSaBillNum;
@@ -351,8 +351,7 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase
var seAllMaterialRelationships = materialRelationshipEntitys.Union(materialRelationships);
bbacSaDetails.ForEach(bbacSaDetail =>
{
- bbacSaDetail.LU = seAllMaterialRelationships.FirstOrDefault(t => t.SettleMaterialCode == bbacSaDetail.PartCode)?.ErpMaterialCode ?? bbacSaDetail.PartCode.Replace(" ", "-");
- bbacSaDetail.KeyCode = bbacSaDetail.PN + bbacSaDetail.LU;
+ bbacSaDetail.PartCode = seAllMaterialRelationships.FirstOrDefault(t => t.SettleMaterialCode == bbacSaDetail.LU)?.ErpMaterialCode ?? bbacSaDetail.LU.Replace(" ", "-");
});
#endregion
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_DETAIL_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_DETAIL_SERVICE.cs
index 9cd66ac4..5f5a472d 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_DETAIL_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_DETAIL_SERVICE.cs
@@ -1,7 +1,22 @@
using System;
+using System.Collections.Generic;
+using System.LinqAsync;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
+using SettleAccount.Domain.BQ;
+using Shouldly;
+using Volo.Abp;
+using Volo.Abp.Application.Dtos;
+using Volo.Abp.Caching;
+using Win.Abp.Snowflakes;
+using Win.Sfs.BaseData.ImportExcelCommon;
+using Win.Sfs.SettleAccount.CommonManagers;
+using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
+using Win.Sfs.SettleAccount.Entities.TaskJobs;
+using Win.Sfs.SettleAccount.ExcelImporter;
+using Win.Sfs.Shared.Filter;
+using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ;
@@ -10,8 +25,82 @@ namespace Win.Sfs.SettleAccount.Entities.BQ;
///
[AllowAnonymous]
[Route("api/settleaccount/[controller]/[action]")]
-public class HBPO_SA_DETAIL_SERVICE
+public class HBPO_SA_DETAIL_SERVICE : SettleAccountApplicationBase
{
+ ///
+ /// HBPO结算明细仓储
+ ///
+ private readonly INormalEfCoreRepository _hbpoSaDetailRepository;
+
+ ///
+ /// HBPO结算仓储
+ ///
+ private readonly INormalEfCoreRepository _hbpoSaRepository;
+
+ ///
+ /// 任务服务
+ ///
+ private readonly TaskJobService _taskJobService;
+
+ ///
+ /// 构造
+ ///
+ public HBPO_SA_DETAIL_SERVICE(INormalEfCoreRepository hbpoSaDetailRepository,
+ INormalEfCoreRepository hbpoSaRepository,
+ TaskJobService taskJobService,
+ IDistributedCache cache,
+ IExcelImportAppService excelImportService,
+ ISnowflakeIdGenerator snowflakeIdGenerator,
+ ICommonManager commonManager
+ ) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
+ {
+ _hbpoSaDetailRepository = hbpoSaDetailRepository;
+ _hbpoSaRepository = hbpoSaRepository;
+ _taskJobService = taskJobService;
+ }
+
+ #region 导出
+ ///
+ /// 导出
+ ///
+ [HttpPost]
+ public async Task ExportAsync(HBPO_SA_DETAIL_EXPORT_REQUEST_DTO input)
+ {
+ var pubSaEntity = await _hbpoSaRepository.FirstOrDefaultAsync(t => t.BillNum == input.BillNum).ConfigureAwait(false);
+ if (pubSaEntity == null)
+ {
+ throw new UserFriendlyException($"导出失败,结算单号不存在!", "400");
+ }
+ string fileName = $"JisHBPO的结算数据_{Guid.NewGuid()}.xlsx";
+ List filters = new List();
+ filters.Add(new FilterCondition("BillNum", input.BillNum, EnumFilterAction.Equal, EnumFilterLogic.And));
+
+ var entities = await _hbpoSaDetailRepository.GetListByFilterAsync(filters).ConfigureAwait(false);
+ var dtos = ObjectMapper.Map, List>(entities);
+
+ ExportImporter _exportImporter = new ExportImporter();
+ var result = await _exportImporter.ExcelExporter(dtos).ConfigureAwait(false);
+ result.ShouldNotBeNull();
+
+ await _excelImportService.SaveBlobAsync(new SaveExcelImportInputDto { Name = fileName, Content = result }).ConfigureAwait(false);
+ return fileName;
+ }
+ #endregion
+
+ #region CURD
+ ///
+ /// 获取列表
+ ///
+ [HttpPost]
+ public async Task> GetListAsync(RequestDto input)
+ {
+ var entities = await _hbpoSaDetailRepository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true).ConfigureAwait(false);
+ var totalCount = await _hbpoSaDetailRepository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false);
+ var dtos = ObjectMapper.Map, List>(entities);
+ return new PagedResultDto(totalCount, dtos);
+ }
+ #endregion
+
#region 对比
///
/// HBPO结算与发运比对
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 460565f6..c907cfe4 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
@@ -319,30 +319,31 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase
#region 处理结算数据
//销售价格
- var priceListEntitys = await _priceListRepository.GetAllAsync();
+ var priceListEntitys = await _priceListRepository.GetAllAsync().ConfigureAwait(false);
hbpoSaDetails.ForEach(hbpoSaDetail =>
{
- List partCodes = hbpoSaDetail.PartCode.Split(" ").ToList();
- hbpoSaDetail.PartCode = partCodes[0].Replace(" ", "");
- if (partCodes.Count > 1)
+ List lus = hbpoSaDetail.LU.Split(" ").ToList();
+ hbpoSaDetail.LU = lus[0].Replace(" ", "");
+ if (lus.Count > 1)
{
- partCodes.RemoveAt(0);
- var partCodeAssemble = partCodes.Select(t => t.Replace(" ", ""));
- hbpoSaDetail.PartCode += partCodeAssemble.Aggregate(" ", (current, index) => current + index);
+ lus.RemoveAt(0);
+ var luAssemble = lus.Select(t => t.Replace(" ", ""));
+ hbpoSaDetail.LU += luAssemble.Aggregate(" ", (current, index) => current + index);
}
hbpoSaDetail.BillNum = hbpoSaBillNum;
+ hbpoSaDetail.KeyCode = hbpoSaDetail.PN + hbpoSaDetail.LU;
//根据物料号、结算日期获取价格
- var priceListEntity = priceListEntitys.Find(t => t.LU == hbpoSaDetail.PartCode && hbpoSaDetail.SettleDate > t.BeginTime && hbpoSaDetail.SettleDate < t.EndTime);
+ var priceListEntity = priceListEntitys.Find(t => t.LU == hbpoSaDetail.LU && hbpoSaDetail.SettleDate > t.BeginTime && hbpoSaDetail.SettleDate < t.EndTime);
hbpoSaDetail.Price = priceListEntity?.Price ?? default;
hbpoSaDetail.BusinessType = _businessType;
});
//导入的零件号集合
var importPubSaLUs = hbpoSaDetails.Select(t => t.LU).Distinct();
- var materialRelationshipEntitys = await _materialRelationshipRepository.GetListAsync(t => importPubSaLUs.Contains(t.SettleMaterialCode));
+ var materialRelationshipEntitys = await _materialRelationshipRepository.GetListAsync(t => importPubSaLUs.Contains(t.SettleMaterialCode)).ConfigureAwait(false);
var materialRelationshipEntitySettleMaterialCodes = materialRelationshipEntitys.Select(t => t.SettleMaterialCode).Distinct();
/*
@@ -361,8 +362,7 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase
var seAllMaterialRelationships = materialRelationshipEntitys.Union(materialRelationships);
hbpoSaDetails.ForEach(hbpoSaDetail =>
{
- hbpoSaDetail.LU = seAllMaterialRelationships.FirstOrDefault(t => t.SettleMaterialCode == hbpoSaDetail.PartCode)?.ErpMaterialCode ?? hbpoSaDetail.PartCode.Replace(" ", "-");
- hbpoSaDetail.KeyCode = hbpoSaDetail.PN + hbpoSaDetail.LU;
+ hbpoSaDetail.PartCode = seAllMaterialRelationships.FirstOrDefault(t => t.SettleMaterialCode == hbpoSaDetail.LU)?.ErpMaterialCode ?? hbpoSaDetail.LU.Replace(" ", "-");
});
#endregion
@@ -378,8 +378,8 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase
#endregion
#region 添加入库
- await _hbpoSaRepository.InsertAsync(hbpoSa);
- await _hbpoSaDetailRepository.InsertManyAsync(hbpoSaDetails);
+ await _hbpoSaRepository.InsertAsync(hbpoSa).ConfigureAwait(false);
+ await _hbpoSaDetailRepository.InsertManyAsync(hbpoSaDetails).ConfigureAwait(false);
if (hbpoCanSaDetails.Count > 0)
{
hbpoCanSa.InvGroupNum = hbpoCanSaDetails.Count.ToString();
@@ -389,8 +389,8 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase
hbpoCanSaDetail.BusinessType = _businessType;
});
- await _hbpoCanSaRepository.InsertAsync(hbpoCanSa);
- await _hbpoCanSaDetailRepository.InsertManyAsync(hbpoCanSaDetails);
+ await _hbpoCanSaRepository.InsertAsync(hbpoCanSa).ConfigureAwait(false);
+ await _hbpoCanSaDetailRepository.InsertManyAsync(hbpoCanSaDetails).ConfigureAwait(false);
}
if (hbpoNotSaDetails.Count > 0)
{
@@ -399,11 +399,11 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase
hbpoNotSaDetail.BusinessType = _businessType;
});
- await _hbpoNotSaDetailRepository.InsertManyAsync(hbpoNotSaDetails);
+ await _hbpoNotSaDetailRepository.InsertManyAsync(hbpoNotSaDetails).ConfigureAwait(false);
}
if (materialRelationships.Count > 0)
{
- await _materialRelationshipRepository.InsertManyAsync(materialRelationships);
+ await _materialRelationshipRepository.InsertManyAsync(materialRelationships).ConfigureAwait(false);
}
#endregion
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_DETAIL_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_DETAIL_SERVICE.cs
index c1c25efc..e73fa369 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_DETAIL_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_DETAIL_SERVICE.cs
@@ -11,6 +11,7 @@ using SettleAccount.Job.Services.Report;
using Shouldly;
using TaskJob.EventArgs;
using Volo.Abp;
+using Volo.Abp.Application.Dtos;
using Volo.Abp.Caching;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
@@ -99,6 +100,20 @@ public class PUB_SA_DETAIL_SERVICE : SettleAccountApplicationBase
}
#endregion
+ #region CURD
+ ///
+ /// 获取列表
+ ///
+ [HttpPost]
+ public async Task> GetListAsync(RequestDto input)
+ {
+ var entities = await _pubSaDetailRepository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true).ConfigureAwait(false);
+ var totalCount = await _pubSaDetailRepository.GetCountByFilterAsync(input.Filters).ConfigureAwait(false);
+ var dtos = ObjectMapper.Map, List>(entities);
+ return new PagedResultDto(totalCount, dtos);
+ }
+ #endregion
+
#region 对比
///
/// Pub结算与发运比对
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 372e884f..de1c8c62 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
@@ -125,21 +125,21 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase
case EnumBusinessType.JisHBPO:
break;
case EnumBusinessType.ZhiGongJianBBAC:
- result = await ImportZhiGongJianBBACAsync(pubSaImportRequestDto.Files);
+ result = await ImportZhiGongJianBBACAsync(pubSaImportRequestDto.Files).ConfigureAwait(false);
break;
case EnumBusinessType.ZhiGongJianHBPO:
- result = await ImportZhiGongJianHBPOAsync(pubSaImportRequestDto.Files);
+ result = await ImportZhiGongJianHBPOAsync(pubSaImportRequestDto.Files).ConfigureAwait(false);
break;
case EnumBusinessType.MaiDanJianBBAC:
break;
case EnumBusinessType.MaiDanJianHBPO:
- result = await ImportMaiDanJianHBPOAsync(pubSaImportRequestDto.Files);
+ result = await ImportMaiDanJianHBPOAsync(pubSaImportRequestDto.Files).ConfigureAwait(false);
break;
case EnumBusinessType.BeiJian:
- result = await ImportBeiJianAsync(pubSaImportRequestDto.Files);
+ result = await ImportBeiJianAsync(pubSaImportRequestDto.Files).ConfigureAwait(false);
break;
case EnumBusinessType.YinDuJian:
- result = await ImportYinDuJianAsync(pubSaImportRequestDto.Files);
+ result = await ImportYinDuJianAsync(pubSaImportRequestDto.Files).ConfigureAwait(false);
break;
default:
break;
@@ -285,20 +285,20 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase
{
#region 导入数据转换
ExportImporter _exportImporter = new ExportImporter();
- var importResults = await _exportImporter.UploadExcelImport(files, _excelImportService);
+ var importResults = await _exportImporter.UploadExcelImport(files, _excelImportService).ConfigureAwait(false);
var importPubSaDetails = ObjectMapper.Map, List>(importResults);
#endregion
#region 数据校验
- var checkList = await CheckAsync(importPubSaDetails);
+ var checkList = await CheckAsync(importPubSaDetails).ConfigureAwait(false);
if (checkList.Count > 0)
{
- string fileName = await ExportErrorReportAsync(checkList);
+ string fileName = await ExportErrorReportAsync(checkList).ConfigureAwait(false); ;
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, fileName = fileName });
}
#endregion
- return await SaDataHandleAsync(importPubSaDetails, EnumBusinessType.ZhiGongJianBBAC);
+ return await SaDataHandleAsync(importPubSaDetails, EnumBusinessType.ZhiGongJianBBAC).ConfigureAwait(false);
}
///
@@ -308,7 +308,7 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase
{
#region 导入数据转换
ExportImporter _exportImporter = new ExportImporter();
- var importResults = await _exportImporter.UploadExcelImport(files, _excelImportService);
+ var importResults = await _exportImporter.UploadExcelImport(files, _excelImportService).ConfigureAwait(false);
//截取结算分组前8位为结算日期
importResults.ForEach(importResult =>
@@ -328,7 +328,7 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase
}
#endregion
- return await SaDataHandleAsync(importPubSaDetails, EnumBusinessType.ZhiGongJianHBPO);
+ return await SaDataHandleAsync(importPubSaDetails, EnumBusinessType.ZhiGongJianHBPO).ConfigureAwait(false);
}
///
@@ -338,7 +338,7 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase
{
#region 导入数据转换
ExportImporter _exportImporter = new ExportImporter();
- var importResults = await _exportImporter.UploadExcelImport(files, _excelImportService);
+ var importResults = await _exportImporter.UploadExcelImport(files, _excelImportService).ConfigureAwait(false);
importResults.ForEach(importResult =>
{
@@ -357,7 +357,7 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase
}
#endregion
- return await SaDataHandleAsync(importPubSaDetails, EnumBusinessType.BeiJian);
+ return await SaDataHandleAsync(importPubSaDetails, EnumBusinessType.BeiJian).ConfigureAwait(false);
}
///
@@ -367,26 +367,20 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase
{
#region 导入数据转换
ExportImporter _exportImporter = new ExportImporter();
- var importResults = await _exportImporter.UploadExcelImport(files, _excelImportService);
-
- importResults.ForEach(importResult =>
- {
- importResult.SettleDate = DateTime.Now;
- });
-
+ var importResults = await _exportImporter.UploadExcelImport(files, _excelImportService).ConfigureAwait(false);
var importPubSaDetails = ObjectMapper.Map, List>(importResults);
#endregion
#region 数据校验
- var checkList = await CheckAsync(importPubSaDetails);
+ var checkList = await CheckAsync(importPubSaDetails).ConfigureAwait(false);
if (checkList.Count > 0)
{
- string fileName = await ExportErrorReportAsync(checkList);
+ string fileName = await ExportErrorReportAsync(checkList).ConfigureAwait(false);
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, fileName = fileName });
}
#endregion
- return await SaDataHandleAsync(importPubSaDetails, EnumBusinessType.BeiJian);
+ return await SaDataHandleAsync(importPubSaDetails, EnumBusinessType.BeiJian).ConfigureAwait(false);
}
///
@@ -401,15 +395,15 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase
#endregion
#region 数据校验
- var checkList = await CheckAsync(importPubSaDetails);
+ var checkList = await CheckAsync(importPubSaDetails).ConfigureAwait(false);
if (checkList.Count > 0)
{
- string fileName = await ExportErrorReportAsync(checkList);
+ string fileName = await ExportErrorReportAsync(checkList).ConfigureAwait(false);
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, fileName = fileName });
}
#endregion
- return await SaDataHandleAsync(importPubSaDetails, EnumBusinessType.YinDuJian);
+ return await SaDataHandleAsync(importPubSaDetails, EnumBusinessType.YinDuJian).ConfigureAwait(false);
}
///
@@ -445,31 +439,32 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase
#region 处理结算数据
//销售价格
- var priceListEntitys = await _priceListRepository.GetAllAsync();
+ var priceListEntitys = await _priceListRepository.GetAllAsync().ConfigureAwait(false);
pubSaDetails.ForEach(importPubSaDetail =>
{
- List partCodes = importPubSaDetail.PartCode.Split(" ").ToList();
- importPubSaDetail.PartCode = partCodes[0].Replace(" ", "");
- if (partCodes.Count > 1)
+ List lus = importPubSaDetail.LU.Split(" ").ToList();
+ importPubSaDetail.LU = lus[0].Replace(" ", "");
+ if (lus.Count > 1)
{
- partCodes.RemoveAt(0);
- var luAssemble = partCodes.Select(t => t.Replace(" ", ""));
- importPubSaDetail.PartCode += luAssemble.Aggregate(" ", (current, index) => current + index);
+ lus.RemoveAt(0);
+ var luAssemble = lus.Select(t => t.Replace(" ", ""));
+ importPubSaDetail.LU += luAssemble.Aggregate(" ", (current, index) => current + index);
}
+ importPubSaDetail.KeyCode = importPubSaDetail.PN + importPubSaDetail.LU;
importPubSaDetail.Version = _version;
importPubSaDetail.BusinessType = businessType;
importPubSaDetail.Site = "XX工厂";
//根据物料号、结算日期获取价格
- var priceListEntity = priceListEntitys.Find(t => t.LU == importPubSaDetail.PartCode && importPubSaDetail.SettleDate > t.BeginTime && importPubSaDetail.SettleDate < t.EndTime);
+ var priceListEntity = priceListEntitys.Find(t => t.LU == importPubSaDetail.LU && importPubSaDetail.SettleDate > t.BeginTime && importPubSaDetail.SettleDate < t.EndTime);
importPubSaDetail.Price = priceListEntity?.Price ?? 0;
});
//导入的零件号集合
- var importPubSaPartCodes = pubSaDetails.Select(t => t.PartCode).Distinct();
- var materialRelationshipEntitys = await _materialRelationshipRepository.GetListAsync(t => importPubSaPartCodes.Contains(t.SettleMaterialCode));
+ var importPubSaLUs = pubSaDetails.Select(t => t.LU).Distinct();
+ var materialRelationshipEntitys = await _materialRelationshipRepository.GetListAsync(t => importPubSaLUs.Contains(t.SettleMaterialCode)).ConfigureAwait(false); ;
var materialRelationshipEntitySettleMaterialCodes = materialRelationshipEntitys.Select(t => t.SettleMaterialCode).Distinct();
/*
@@ -477,7 +472,7 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase
* 转换为厂内零件号
* 转换规则6个空格替换成“-”
*/
- var noExistSettleMaterialCodes = importPubSaPartCodes.Except(materialRelationshipEntitySettleMaterialCodes);
+ var noExistSettleMaterialCodes = importPubSaLUs.Except(materialRelationshipEntitySettleMaterialCodes);
noExistSettleMaterialCodes.ForEach(t =>
{
@@ -488,16 +483,15 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase
var seAllMaterialRelationships = materialRelationshipEntitys.Union(materialRelationships);
pubSaDetails.ForEach(pubSaDetail =>
{
- pubSaDetail.LU = seAllMaterialRelationships.FirstOrDefault(t => t.SettleMaterialCode == pubSaDetail.PartCode)?.ErpMaterialCode ?? pubSaDetail.PartCode.Replace(" ", "-");
- pubSaDetail.KeyCode = pubSaDetail.PN + pubSaDetail.LU;
+ pubSaDetail.PartCode = seAllMaterialRelationships.FirstOrDefault(t => t.SettleMaterialCode == pubSaDetail.LU)?.ErpMaterialCode ?? pubSaDetail.LU.Replace(" ", "-");
});
#endregion
#region 添加入库
- await SeDataEntryAsync(pubSaDetails);
+ await SeDataEntryAsync(pubSaDetails).ConfigureAwait(false);
if (materialRelationships.Count > 0)
{
- await _materialRelationshipRepository.InsertManyAsync(materialRelationships);
+ await _materialRelationshipRepository.InsertManyAsync(materialRelationships).ConfigureAwait(false);
}
#endregion
@@ -586,13 +580,13 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase
//不可结算
List pubNotSaDetails = new List();
- var pubSaEntity = await _repository.FirstOrDefaultAsync(t => t.Id.Equals(id));
+ var pubSaEntity = await _repository.FirstOrDefaultAsync(t => t.Id.Equals(id)).ConfigureAwait(false);
if (pubSaEntity != null)
{
//结算单据
string pubSaBillNum = pubSaEntity.BillNum;
- pubCanSas = await _pubCanSaRepository.GetListAsync(t => t.SettleBillNum == pubSaBillNum);
+ pubCanSas = await _pubCanSaRepository.GetListAsync(t => t.SettleBillNum == pubSaBillNum).ConfigureAwait(false);
//验证可结算主表状态
if (pubCanSas.Any() && pubCanSas.Any(t => t.State != SettleBillState.未结状态))
{
@@ -600,9 +594,9 @@ public class PUB_SA_SERVICE : SettleAccountApplicationBase
}
pubSas.Add(pubSaEntity);
- pubSaDetails = await _pubSaDetailRepository.GetListAsync(t => t.BillNum == pubSaBillNum);
- pubCanSaDetails = await _pubCanSaDetailRepository.GetListAsync(t => t.SettleBillNum == pubSaBillNum);
- pubNotSaDetails = await _pubNotSaDetailRepository.GetListAsync(t => t.SettleBillNum == pubSaBillNum);
+ pubSaDetails = await _pubSaDetailRepository.GetListAsync(t => t.BillNum == pubSaBillNum).ConfigureAwait(false);
+ pubCanSaDetails = await _pubCanSaDetailRepository.GetListAsync(t => t.SettleBillNum == pubSaBillNum).ConfigureAwait(false);
+ pubNotSaDetails = await _pubNotSaDetailRepository.GetListAsync(t => t.SettleBillNum == pubSaBillNum).ConfigureAwait(false);
}
return (pubSas, pubSaDetails, pubCanSas, pubCanSaDetails, pubNotSaDetails);
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BBACSeSyncAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BBACSeSyncAppService.cs
index b38937f2..66125ae7 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BBACSeSyncAppService.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/BBACSeSyncAppService.cs
@@ -70,13 +70,7 @@ public class BBACSeSyncAppService : ApplicationService, IInvocable, IJobService
//同步表名称
var syncTableName = "JisBBACSeSync_Jit";
//BBAC类型集合
- var EnumDeliverSubBillTypes = new List
- {
- EnumDeliverSubBillType.保险杠BBAC,
- EnumDeliverSubBillType.买单件保险杠BBAC,
- EnumDeliverSubBillType.买单件小件BBAC,
- EnumDeliverSubBillType.小件BBAC
- };
+ var EnumDeliverSubBillTypes = GetDeliverSubBillTypes();
Expression> predicate = (t) => t.DeliverBillType == EnumDeliverBjBmpBillType.JIS件 && EnumDeliverSubBillTypes.Contains(t.DeliverSubBillType);
var syncPositionFlag = await _syncPositionFlagRepository.FindAsync(t => t.TableName == syncTableName);
@@ -91,7 +85,11 @@ public class BBACSeSyncAppService : ApplicationService, IInvocable, IJobService
var bbacSeDetails = ObjectMapper.Map, List>(wmsSeRecords);
if (bbacSeDetails.Any())
{
- bbacSeDetails.ForEach(bbacSeDetail => bbacSeDetail.KeyCode = bbacSeDetail.PN + bbacSeDetail.LU);
+ bbacSeDetails.ForEach(bbacSeDetail =>
+ {
+ bbacSeDetail.KeyCode = bbacSeDetail.PN + bbacSeDetail.LU;
+ bbacSeDetail.BusinessType = EnumBusinessType.JisBBAC;
+ });
await _bbacSeDetailRepository.InsertManyAsync(bbacSeDetails);
if (syncPositionFlag != null)
@@ -119,13 +117,7 @@ public class BBACSeSyncAppService : ApplicationService, IInvocable, IJobService
//同步表名称
var syncTableName = "JisBBACSeSync_Jis";
//BBAC类型集合
- var EnumDeliverSubBillTypes = new List
- {
- EnumDeliverSubBillType.保险杠BBAC,
- EnumDeliverSubBillType.买单件保险杠BBAC,
- EnumDeliverSubBillType.买单件小件BBAC,
- EnumDeliverSubBillType.小件BBAC
- };
+ var EnumDeliverSubBillTypes = GetDeliverSubBillTypes();
Expression> predicate = (t) => t.DeliverBillType == EnumDeliverBjBmpBillType.JIS件 && EnumDeliverSubBillTypes.Contains(t.DeliverSubBillType);
var syncPositionFlag = await _syncPositionFlagRepository.FindAsync(t => t.TableName == syncTableName);
if (syncPositionFlag != null)
@@ -158,4 +150,18 @@ public class BBACSeSyncAppService : ApplicationService, IInvocable, IJobService
}
}
}
+
+ ///
+ /// 获取BBAC类型集合
+ ///
+ private List GetDeliverSubBillTypes()
+ {
+ return new List
+ {
+ EnumDeliverSubBillType.保险杠BBAC,
+ EnumDeliverSubBillType.买单件保险杠BBAC,
+ EnumDeliverSubBillType.买单件小件BBAC,
+ EnumDeliverSubBillType.小件BBAC
+ };
+ }
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/HBPOSeSyncAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/HBPOSeSyncAppService.cs
index b1c1ca75..5934ffa8 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/HBPOSeSyncAppService.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/HBPOSeSyncAppService.cs
@@ -37,30 +37,40 @@ public class HBPOSeSyncAppService : ApplicationService, IInvocable, IJobService
///
private readonly INormalEfCoreRepository _hbpoSeDetailRepository;
+ ///
+ /// PUB发运数据仓储
+ ///
+ private readonly INormalEfCoreRepository _pubSeDetailRepository;
+
///
/// 构造
///
public HBPOSeSyncAppService(
WMSBJBMPTDbContext wmsBJBMPTContext,
INormalEfCoreRepository syncPositionFlagRepository,
- INormalEfCoreRepository hbpoSeDetailRepository)
+ INormalEfCoreRepository hbpoSeDetailRepository,
+ INormalEfCoreRepository pubSeDetailRepository)
{
_wmsBJBMPTContext = wmsBJBMPTContext;
_syncPositionFlagRepository = syncPositionFlagRepository;
_hbpoSeDetailRepository = hbpoSeDetailRepository;
+ _pubSeDetailRepository = pubSeDetailRepository;
}
[ApiExplorerSettings(IgnoreApi = true)]
public async Task Invoke(IServiceProvider serviceProvider)
{
- await this.Invoke();
+ await this.Invoke().ConfigureAwait(false);
}
+ ///
+ /// 执行
+ ///
[HttpPost]
public async Task Invoke()
{
- await SyncJitRecordAsync();
- await SyncJisRecordAsync();
+ await SyncJitRecordAsync().ConfigureAwait(false);
+ await SyncJisRecordAsync().ConfigureAwait(false);
}
///
@@ -71,42 +81,41 @@ public class HBPOSeSyncAppService : ApplicationService, IInvocable, IJobService
//同步表名称
var syncTableName = "JisHBPOSeSync_Jit";
//HBPO类型集合
- var EnumDeliverSubBillTypes = new List
- {
- EnumDeliverSubBillType.保险杠HBPO,
- EnumDeliverSubBillType.买单件保险杠HBPO,
- EnumDeliverSubBillType.买单件小件HBPO,
- EnumDeliverSubBillType.小件HBPO
- };
+ var EnumDeliverSubBillTypes = GetDeliverSubBillTypes();
Expression> predicate = (t) => t.DeliverBillType == EnumDeliverBjBmpBillType.JIS件 && EnumDeliverSubBillTypes.Contains(t.DeliverSubBillType);
- var syncPositionFlag = await _syncPositionFlagRepository.FindAsync(t => t.TableName == syncTableName);
+ var syncPositionFlag = await _syncPositionFlagRepository.FindAsync(t => t.TableName == syncTableName).ConfigureAwait(false);
if (syncPositionFlag != null)
{
predicate = (t) => t.UID > int.Parse(syncPositionFlag.Position) && t.DeliverBillType == EnumDeliverBjBmpBillType.JIS件 && EnumDeliverSubBillTypes.Contains(t.DeliverSubBillType);
}
//WMS发运数据
- var wmsRecords = _wmsBJBMPTContext.TM_BJBMPT_JIT_RECORD.Where(predicate).OrderBy(b => b.UID).ToList();
-
- var hbpoSeDetails = ObjectMapper.Map, List>(wmsRecords);
- if (hbpoSeDetails.Any())
+ var wmsSeRecords = _wmsBJBMPTContext.TM_BJBMPT_JIT_RECORD.Where(predicate).OrderBy(b => b.UID).ToList();
+ if (wmsSeRecords.Any())
{
- hbpoSeDetails.ForEach(hbpoSeDetail => hbpoSeDetail.KeyCode = hbpoSeDetail.PN + hbpoSeDetail.LU);
- await _hbpoSeDetailRepository.InsertManyAsync(hbpoSeDetails);
+ //JisHBPO发运
+ var hbpoWmsSeRecords = wmsSeRecords.FindAll(t => t.DeliverSubBillType == EnumDeliverSubBillType.保险杠HBPO || t.DeliverSubBillType == EnumDeliverSubBillType.小件HBPO);
+ //买单件HBPO发运
+ var maiDanHBPOWmsSeRecords = wmsSeRecords.FindAll(t => t.DeliverSubBillType == EnumDeliverSubBillType.买单件保险杠HBPO || t.DeliverSubBillType == EnumDeliverSubBillType.买单件小件HBPO);
+
+ var hbpoSeDetails = ObjectMapper.Map, List>(hbpoWmsSeRecords);
+ var maiDanHBPOSeDetails = ObjectMapper.Map, List>(maiDanHBPOWmsSeRecords);
+
+ await SaveSeDataAsync(hbpoSeDetails, maiDanHBPOSeDetails).ConfigureAwait(false);
if (syncPositionFlag != null)
{
- syncPositionFlag.Position = wmsRecords.Last().UID.ToString();
- await _syncPositionFlagRepository.UpdateAsync(syncPositionFlag);
+ syncPositionFlag.Position = wmsSeRecords.Last().UID.ToString();
+ await _syncPositionFlagRepository.UpdateAsync(syncPositionFlag).ConfigureAwait(false);
}
else
{
syncPositionFlag = new SyncPositionFlag()
{
TableName = syncTableName,
- Position = wmsRecords.Last().UID.ToString()
+ Position = wmsSeRecords.Last().UID.ToString()
};
- await _syncPositionFlagRepository.InsertAsync(syncPositionFlag);
+ await _syncPositionFlagRepository.InsertAsync(syncPositionFlag).ConfigureAwait(false); ;
}
}
}
@@ -119,43 +128,71 @@ public class HBPOSeSyncAppService : ApplicationService, IInvocable, IJobService
//同步表名称
var syncTableName = "JisHBPOSeSync_Jis";
//BBAC类型集合
- var EnumDeliverSubBillTypes = new List
- {
- EnumDeliverSubBillType.保险杠BBAC,
- EnumDeliverSubBillType.买单件保险杠BBAC,
- EnumDeliverSubBillType.买单件小件BBAC,
- EnumDeliverSubBillType.小件BBAC
- };
+ var EnumDeliverSubBillTypes = GetDeliverSubBillTypes();
Expression> predicate = (t) => t.DeliverBillType == EnumDeliverBjBmpBillType.JIS件 && EnumDeliverSubBillTypes.Contains(t.DeliverSubBillType);
- var syncPositionFlag = await _syncPositionFlagRepository.FindAsync(t => t.TableName == syncTableName);
+ var syncPositionFlag = await _syncPositionFlagRepository.FindAsync(t => t.TableName == syncTableName).ConfigureAwait(false);
if (syncPositionFlag != null)
{
predicate = (t) => t.UID > int.Parse(syncPositionFlag.Position) && t.DeliverBillType == EnumDeliverBjBmpBillType.JIS件 && EnumDeliverSubBillTypes.Contains(t.DeliverSubBillType);
}
//WMS发运数据
- var wmsRecords = _wmsBJBMPTContext.TM_BJBMPT_JIS_RECORD.Where(predicate).OrderBy(b => b.UID).ToList();
-
- var hbpoSeDetails = ObjectMapper.Map, List>(wmsRecords);
- if (hbpoSeDetails.Any())
+ var wmsSeRecords = _wmsBJBMPTContext.TM_BJBMPT_JIS_RECORD.Where(predicate).OrderBy(b => b.UID).ToList();
+ if (wmsSeRecords.Any())
{
- hbpoSeDetails.ForEach(hbpoSeDetail => hbpoSeDetail.KeyCode = hbpoSeDetail.PN + hbpoSeDetail.LU);
- await _hbpoSeDetailRepository.InsertManyAsync(hbpoSeDetails);
+ //JisHBPO发运
+ var hbpoWmsSeRecords = wmsSeRecords.FindAll(t => t.DeliverSubBillType == EnumDeliverSubBillType.保险杠HBPO || t.DeliverSubBillType == EnumDeliverSubBillType.小件HBPO);
+ //买单件HBPO发运
+ var maiDanHBPOWmsSeRecords = wmsSeRecords.FindAll(t => t.DeliverSubBillType == EnumDeliverSubBillType.买单件保险杠HBPO || t.DeliverSubBillType == EnumDeliverSubBillType.买单件小件HBPO);
+
+ var hbpoSeDetails = ObjectMapper.Map, List>(hbpoWmsSeRecords);
+ var maiDanHBPOSeDetails = ObjectMapper.Map, List>(maiDanHBPOWmsSeRecords);
+
+ await SaveSeDataAsync(hbpoSeDetails, maiDanHBPOSeDetails).ConfigureAwait(false);
if (syncPositionFlag != null)
{
- syncPositionFlag.Position = wmsRecords.Last().UID.ToString();
- await _syncPositionFlagRepository.UpdateAsync(syncPositionFlag);
+ syncPositionFlag.Position = wmsSeRecords.Last().UID.ToString();
+ await _syncPositionFlagRepository.UpdateAsync(syncPositionFlag).ConfigureAwait(false);
}
else
{
syncPositionFlag = new SyncPositionFlag()
{
TableName = syncTableName,
- Position = wmsRecords.Last().UID.ToString()
+ Position = wmsSeRecords.Last().UID.ToString()
};
- await _syncPositionFlagRepository.InsertAsync(syncPositionFlag);
+ await _syncPositionFlagRepository.InsertAsync(syncPositionFlag).ConfigureAwait(false);
}
}
}
+
+ ///
+ /// 获取HBPO类型集合
+ ///
+ private List GetDeliverSubBillTypes()
+ {
+ return new List
+ {
+ EnumDeliverSubBillType.保险杠HBPO,
+ EnumDeliverSubBillType.买单件保险杠HBPO,
+ EnumDeliverSubBillType.买单件小件HBPO,
+ EnumDeliverSubBillType.小件HBPO
+ };
+ }
+
+ ///
+ /// 保存发运树
+ ///
+ private async Task SaveSeDataAsync(List hbpoSeDetails, List maiDanHBPOSeDetails)
+ {
+ hbpoSeDetails.ForEach(hbpoSeDetail => hbpoSeDetail.KeyCode = hbpoSeDetail.PN + hbpoSeDetail.LU);
+ maiDanHBPOSeDetails.ForEach(maiDanHBPOSeDetail =>
+ {
+ maiDanHBPOSeDetail.KeyCode = maiDanHBPOSeDetail.PN + maiDanHBPOSeDetail.LU;
+ maiDanHBPOSeDetail.BusinessType = EnumBusinessType.MaiDanJianHBPO;
+ });
+ await _hbpoSeDetailRepository.InsertManyAsync(hbpoSeDetails).ConfigureAwait(false);
+ await _pubSeDetailRepository.InsertManyAsync(maiDanHBPOSeDetails).ConfigureAwait(false);
+ }
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs
index 314ed0a8..2b62a223 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs
@@ -28,17 +28,49 @@ public class JisBBACSeEdiCompareAppService : ApplicationService, IInvocable
///
public async Task Invoke()
{
+ await HandDelEdiDataAsync().ConfigureAwait(false);
+ //using var serviceScope = _serviceProvider.CreateScope();
+ //var db = serviceScope.ServiceProvider.GetRequiredService();
+ //var query = db.Set().Join(db.Set(), 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 && t.edi.IsDeleted == false);
+ //query.ForEach(t =>
+ //{
+ // t.edi.SeId = t.se.Id;
+ // t.edi.IsHaveSeData = true;
+ // t.se.IsHaveEdiData = true;
+ //});
+ //var ses = query.Select(t => t.se);
+ //var edis = query.Select(t => t.edi);
+
+ //db.Set().UpdateRange(ses);
+ //db.Set().UpdateRange(edis);
+ //await db.SaveChangesAsync().ConfigureAwait(false);
+ }
+
+ ///
+ /// 处理删除的EDI数据
+ ///
+ private async Task HandDelEdiDataAsync()
+ {
+ /*
+ * 处理有发运数据状态是删除的数据
+ * 获取对应的发运数据
+ * 设置发运数据状态为无EDI数据
+ * 设置EDI数据状态为无发运数据
+ */
using var serviceScope = _serviceProvider.CreateScope();
var db = serviceScope.ServiceProvider.GetRequiredService();
- var query = db.Set().Join(db.Set(), 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);
+ var query = db.Set().Join(db.Set(), a => a.SeId, b => b.Id, (edi, se) => new { se, edi }).Where(t => t.edi.IsDeleted == true && t.edi.IsHaveSeData == true);
+ //query.ForEach(t =>
+ //{
+ // t.edi.SeId = default;
+ // t.edi.IsHaveSeData = false;
+ // t.se.IsHaveEdiData = false;
+ //});
+ //var ses = query.Select(t => t.se);
+ //var edis = query.Select(t => t.edi);
- db.Set().UpdateRange(ses);
- db.Set().UpdateRange(edis);
- await db.SaveChangesAsync().ConfigureAwait(false);
+ //db.Set().UpdateRange(ses);
+ //db.Set().UpdateRange(edis);
+ //await db.SaveChangesAsync().ConfigureAwait(false);
}
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeEdiCompareAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeEdiCompareAppService.cs
index 427fc39f..04fdd8f3 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeEdiCompareAppService.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeEdiCompareAppService.cs
@@ -66,7 +66,7 @@ public class JisHBPOSeEdiCompareAppService : ApplicationService, IInvocable
// se,
// edi
// };
- var query = db.Set().Join(db.Set(), 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 query = db.Set().Join(db.Set(), 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 && t.edi.IsDeleted == false);
var ses = query.Select(t => t.se);
var edis = query.Select(t => t.edi);
@@ -79,4 +79,26 @@ public class JisHBPOSeEdiCompareAppService : ApplicationService, IInvocable
Debug.WriteLine($"处理数量:{query.Count()}");
}
+
+ ///
+ /// 处理删除的EDI数据
+ ///
+ private async Task HandDelEdiDataAsync()
+ {
+ using var serviceScope = _serviceProvider.CreateScope();
+ var db = serviceScope.ServiceProvider.GetRequiredService();
+ var query = db.Set().Join(db.Set(), a => a.SeId, b => b.Id, (edi, se) => new { se, edi }).Where(t => t.edi.IsDeleted == true && t.edi.IsHaveSeData == true);
+ query.ForEach(t =>
+ {
+ t.edi.SeId = default;
+ t.edi.IsHaveSeData = false;
+ t.se.IsHaveEdiData = false;
+ });
+ var ses = query.Select(t => t.se);
+ var edis = query.Select(t => t.edi);
+
+ db.Set().UpdateRange(ses);
+ db.Set().UpdateRange(edis);
+ await db.SaveChangesAsync().ConfigureAwait(false);
+ }
}
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JitSeSyncAppService.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JitSeSyncAppService.cs
index d06d4edb..81bf357d 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
@@ -9,6 +9,7 @@ using SettleAccount.Domain.BQ;
using Volo.Abp.Application.Services;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.SettleAccount.EntityFrameworkCore;
+using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ.Syncs;
@@ -34,6 +35,11 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
///
private readonly INormalEfCoreRepository _pubSeDetailRepository;
+ ///
+ /// 客户零件关系仓储
+ ///
+ private readonly INormalEfCoreRepository _materialRelationshipRepository;
+
private readonly IVmiService _vmiService;
///
@@ -84,6 +90,19 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
var pubSeDetails = ObjectMapper.Map, List>(wmsSeRecords);
if (pubSeDetails.Any())
{
+ //客户零件号和厂内零件号
+ var luRePartCodes = pubSeDetails.Select(t => new { t.LU, t.PartCode });
+
+ var haveLuRePartCodes = (await _materialRelationshipRepository.GetListAsync(t => luRePartCodes.Contains(new { LU = t.ErpMaterialCode, PartCode = t.SettleMaterialCode })).ConfigureAwait(false)).Select(t => new { LU = t.ErpMaterialCode, PartCode = t.SettleMaterialCode });
+
+ var noHaveLuRePartCodes = luRePartCodes.Except(haveLuRePartCodes);
+
+ if (noHaveLuRePartCodes.Any())
+ {
+ var materialRelationships = noHaveLuRePartCodes.Select(t => new MaterialRelationship(GuidGenerator.Create(), t.LU, "", t.PartCode, ""));
+ await _materialRelationshipRepository.InsertManyAsync(materialRelationships).ConfigureAwait(false);
+ }
+
pubSeDetails.ForEach(t =>
{
t.BusinessType = businessType;
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
index 80296cbf..7cd9b1af 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
@@ -1,65 +1,57 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Reflection;
using AutoMapper;
-using Win.Sfs.SettleAccount.EstimatedStockDiffReports;
+using Newtonsoft.Json;
+using SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Boms;
+using Win.Sfs.SettleAccount.BTNotConsignReports;
+using Win.Sfs.SettleAccount.BTSeqKBDiffReports;
+using Win.Sfs.SettleAccount.Entities;
using Win.Sfs.SettleAccount.Entities.Boms;
+using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
+using Win.Sfs.SettleAccount.Entities.BQ.Dtos.SettleAccount.Domain.BQ;
+using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
using Win.Sfs.SettleAccount.Entities.CodeSettings;
-using Win.Sfs.SettleAccount.FISes;
-using Win.Sfs.SettleAccount.Entities.Materials;
-using Win.Sfs.SettleAccount.Entities.SettleAccounts;
-
-using Win.Sfs.SettleAccount.Inventories;
-using Win.Sfs.SettleAccount.Items;
-using Win.Sfs.SettleAccount.MaterialRelationships;
-using Win.Sfs.SettleAccount.Entities.SettleAccountVersion;
-
-using Win.Sfs.SettleAccount.Prebatches;
using Win.Sfs.SettleAccount.Entities.Controls;
-using Win.Sfs.SettleAccount.SendUnsettledDiffReports;
-using Win.Sfs.SettleAccount.StockSettledDiffReports;
-using Win.Sfs.SettleAccount.StockUnsettledDiffReports;
-using Win.Sfs.SettleAccount.StockFisDiffReports;
-using Win.Sfs.SettleAccount.SecondaryActuralAdjustmentReports;
-using Win.Sfs.SettleAccount.SecondaryActuralDiffReports;
-using Win.Sfs.SettleAccount.Entities.StorageLocations;
-using Win.Sfs.SettleAccount.Entities.Inventories;
-using Win.Sfs.SettleAccount.Entities.InventoryDetialVersion;
+using Win.Sfs.SettleAccount.Entities.Errors;
using Win.Sfs.SettleAccount.Entities.Factories;
-using Win.Sfs.SettleAccount.SecondaryExportReports;
-using System;
-using Win.Sfs.SettleAccount.SupplierItemSetUps;
-
-using Win.Sfs.SettleAccount.BTSeqKBDiffReports;
-using Win.Sfs.SettleAccount.BTNotConsignReports;
-
-
-using Win.Sfs.SettleAccount.HQNotConsignReports;
-using Win.Sfs.SettleAccount.HQSPNotConsignReports;
-using Win.Sfs.SettleAccount.Reports.SendUnsettledDiffReports;
-using Win.Sfs.SettleAccount.Entities.ImportMap;
using Win.Sfs.SettleAccount.Entities.ImportColumnMaps;
+using Win.Sfs.SettleAccount.Entities.ImportMap;
+using Win.Sfs.SettleAccount.Entities.Inventories;
+using Win.Sfs.SettleAccount.Entities.InventoryDetialVersion;
using Win.Sfs.SettleAccount.Entities.Invoices;
using Win.Sfs.SettleAccount.Entities.Invoices.Win.Sfs.SettleAccount.Entities.Invoices;
-using Win.Sfs.SettleAccount.Reports.InvoiceSettledDiffs;
-using Win.Sfs.SettleAccount.Entities.Prices;
-using Win.Sfs.SettleAccount.Entities.MaterialRelationships;
-using Win.Sfs.SettleAccount.Entities.SettlementParts;
using Win.Sfs.SettleAccount.Entities.ItemInvoicePrices;
-using Win.Sfs.SettleAccount.Entities.SettlementPartss;
-using Win.Sfs.SettleAccount.Entities.SettlementPakAndSparePartss;
+using Win.Sfs.SettleAccount.Entities.MaterialRelationships;
+using Win.Sfs.SettleAccount.Entities.Materials;
+using Win.Sfs.SettleAccount.Entities.Prices;
using Win.Sfs.SettleAccount.Entities.SecMatch;
-using Win.Sfs.SettleAccount.Entities.VWKanBan;
-using Win.Sfs.SettleAccount.Entities.VWKanBanVersion;
-using Win.Sfs.SettleAccount.Entities;
+using Win.Sfs.SettleAccount.Entities.SettleAccounts;
+using Win.Sfs.SettleAccount.Entities.SettleAccountVersion;
+using Win.Sfs.SettleAccount.Entities.SettlementParts;
+using Win.Sfs.SettleAccount.Entities.StorageLocations;
using Win.Sfs.SettleAccount.Entities.UnHQSettleAccounts;
using Win.Sfs.SettleAccount.Entities.Wms.WmsSumOutput;
using Win.Sfs.SettleAccount.Errors;
-using Win.Sfs.SettleAccount.Entities.Errors;
-using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
-using SettleAccount.Domain.BQ;
-using System.ComponentModel.DataAnnotations;
-using System.Reflection;
-using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
-using Win.Sfs.SettleAccount.Entities.BQ.Dtos.SettleAccount.Domain.BQ;
+using Win.Sfs.SettleAccount.EstimatedStockDiffReports;
+using Win.Sfs.SettleAccount.FISes;
+using Win.Sfs.SettleAccount.HQNotConsignReports;
+using Win.Sfs.SettleAccount.HQSPNotConsignReports;
+using Win.Sfs.SettleAccount.Inventories;
+using Win.Sfs.SettleAccount.MaterialRelationships;
+using Win.Sfs.SettleAccount.Prebatches;
+using Win.Sfs.SettleAccount.Reports.InvoiceSettledDiffs;
+using Win.Sfs.SettleAccount.Reports.SendUnsettledDiffReports;
+using Win.Sfs.SettleAccount.SecondaryActuralAdjustmentReports;
+using Win.Sfs.SettleAccount.SecondaryActuralDiffReports;
+using Win.Sfs.SettleAccount.SecondaryExportReports;
+using Win.Sfs.SettleAccount.SendUnsettledDiffReports;
+using Win.Sfs.SettleAccount.StockFisDiffReports;
+using Win.Sfs.SettleAccount.StockSettledDiffReports;
+using Win.Sfs.SettleAccount.StockUnsettledDiffReports;
+using Win.Sfs.SettleAccount.SupplierItemSetUps;
namespace Win.Sfs.SettleAccount
{
@@ -344,7 +336,7 @@ namespace Win.Sfs.SettleAccount
CreateMap().ReverseMap();
CreateMap().ReverseMap();
//CreateMap().ReverseMap();
-
+
}
private void CreateMapHBPO_PD_DETAIL()
@@ -360,7 +352,7 @@ namespace Win.Sfs.SettleAccount
CreateMap().ReverseMap();
CreateMap().ReverseMap();
//CreateMap().ReverseMap();
-
+
}
private void CreateMapPUB_PD_DETAIL()
@@ -1025,13 +1017,14 @@ namespace Win.Sfs.SettleAccount
///
private void CreateMapBBAC_SA_DETAIL()
{
+ CreateMap();
CreateMap()
.ForMember(x => x.SettleBillNum, y => y.MapFrom(d => d.BillNum));
CreateMap()
.ForMember(x => x.SettleBillNum, y => y.MapFrom(d => d.BillNum));
+ CreateMap();
CreateMap();
- CreateMap();
}
///
@@ -1065,11 +1058,12 @@ namespace Win.Sfs.SettleAccount
///
private void CreateMapHBPO_SA_DETAIL()
{
+ CreateMap();
CreateMap()
.ForMember(x => x.SettleBillNum, y => y.MapFrom(d => d.BillNum));
CreateMap()
.ForMember(x => x.SettleBillNum, y => y.MapFrom(d => d.BillNum));
- //CreateMap();
+ CreateMap();
CreateMap();
}
@@ -1096,6 +1090,8 @@ namespace Win.Sfs.SettleAccount
///
private void CreateMapPUB_SA_DETAIL()
{
+
+ CreateMap();
CreateMap()
.ForMember(x => x.SettleBillNum, y => y.MapFrom(d => d.BillNum));
CreateMap()
@@ -1105,7 +1101,25 @@ namespace Win.Sfs.SettleAccount
CreateMap();
CreateMap();
CreateMap();
- CreateMap();
+ CreateMap()
+ .ForMember(x => x.ExtraProperties, y => y.MapFrom(d =>
+ new Dictionary()
+ {
+ { "DeliveryNumber", d.DeliveryNumber},
+ { "InvoiceNumber", d.InvoiceNumber},
+ { "VendorCode", d.VendorCode},
+ { "VendorName", d.VendorName},
+ { "PurchaseOrderNumber", d.PurchaseOrderNumber},
+ { "DeliveryIndexNumber", d.DeliveryIndexNumber},
+ { "PartName", d.PartName},
+ { "Price", d.Price},
+ { "Amount", d.Amount},
+ { "Tallage", d.Tallage},
+ { "Total", d.Total},
+ { "ProtocolNumber", d.ProtocolNumber},
+ { "Remark", d.Remark},
+ { "CommodityGroup", d.CommodityGroup}
+ }));
CreateMap();
}
@@ -1114,6 +1128,16 @@ namespace Win.Sfs.SettleAccount
///
private void CreateMapSeSync()
{
+ CreateMap()
+ .ForMember(x => x.SeqNumber, y => y.MapFrom(d => d.JISNum))
+ .ForMember(x => x.AssemblyCode, y => y.MapFrom(d => d.RealPartCode))
+ .ForMember(x => x.InjectionCode, y => y.MapFrom(d => d.DeliverCode))
+ .ForMember(x => x.BeginDate, y => y.MapFrom(d => d.BillTime))
+ .ForMember(x => x.ShippingDate, y => y.MapFrom(d => d.BillTime))
+ .ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum))
+ .ForMember(x => x.LU, y => y.MapFrom(d => d.PartCode))
+ .ForMember(x => x.PN, y => y.MapFrom(d => d.VinCode))
+ .ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
CreateMap()
.ForMember(x => x.SeqNumber, y => y.MapFrom(d => d.JISNum))
.ForMember(x => x.AssemblyCode, y => y.MapFrom(d => d.RealPartCode))
@@ -1124,7 +1148,24 @@ namespace Win.Sfs.SettleAccount
.ForMember(x => x.LU, y => y.MapFrom(d => d.PartCode))
.ForMember(x => x.PN, y => y.MapFrom(d => d.VinCode))
.ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
-
+ CreateMap()
+ .ForMember(x => x.BeginDate, y => y.MapFrom(d => d.BillTime))
+ .ForMember(x => x.ShippingDate, y => y.MapFrom(d => d.BillTime))
+ .ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum))
+ .ForMember(x => x.LU, y => y.MapFrom(d => d.PartCode))
+ .ForMember(x => x.PN, y => y.MapFrom(d => d.VinCode))
+ .ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
+
+ CreateMap()
+ .ForMember(x => x.SeqNumber, y => y.MapFrom(d => d.JISNum))
+ .ForMember(x => x.AssemblyCode, y => y.MapFrom(d => d.RealPartCode))
+ .ForMember(x => x.InjectionCode, y => y.MapFrom(d => d.DeliverCode))
+ .ForMember(x => x.BeginDate, y => y.MapFrom(d => d.BillTime))
+ .ForMember(x => x.ShippingDate, y => y.MapFrom(d => d.BillTime))
+ .ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum))
+ .ForMember(x => x.LU, y => y.MapFrom(d => d.PartCode))
+ .ForMember(x => x.PN, y => y.MapFrom(d => d.VinCode))
+ .ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
CreateMap()
.ForMember(x => x.SeqNumber, y => y.MapFrom(d => d.JISNum))
.ForMember(x => x.AssemblyCode, y => y.MapFrom(d => d.RealPartCode))
@@ -1135,6 +1176,13 @@ namespace Win.Sfs.SettleAccount
.ForMember(x => x.LU, y => y.MapFrom(d => d.PartCode))
.ForMember(x => x.PN, y => y.MapFrom(d => d.VinCode))
.ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
+ CreateMap()
+ .ForMember(x => x.BeginDate, y => y.MapFrom(d => d.BillTime))
+ .ForMember(x => x.ShippingDate, y => y.MapFrom(d => d.BillTime))
+ .ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum))
+ .ForMember(x => x.LU, y => y.MapFrom(d => d.PartCode))
+ .ForMember(x => x.PN, y => y.MapFrom(d => d.VinCode))
+ .ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
CreateMap()
.ForMember(x => x.BeginDate, y => y.MapFrom(d => d.DnBillTime))
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 3ecc0cde..8e7ca83d 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_DETAIL.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_DETAIL.cs
@@ -1,16 +1,19 @@
-using SettleAccount.Bases;
using System;
-using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
-
-
-
+using SettleAccount.Bases;
+using Win.Sfs.SettleAccount;
namespace SettleAccount.Domain.BQ;
[Display(Name = "BBAC发运单")]
public class BBAC_SE_DETAIL:SE_BASE
{
+ ///
+ /// 业务分类
+ ///
+ [Display(Name = "业务分类")]
+ public EnumBusinessType BusinessType { get; set; }
+
//[Display(Name = "LU+生产码")]
//public string KeyCode { get; set; } = null!;
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_EDI.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_EDI.cs
index b152d1ad..fa96e418 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_EDI.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SE_EDI.cs
@@ -50,6 +50,12 @@ public class BBAC_SE_EDI:FullAuditedAggregateRoot
[Display(Name = "是否有发运数据")]
public bool IsHaveSeData { get; set; }
+ ///
+ /// 发运Id
+ ///
+ [Display(Name = "是否有发运数据")]
+ public Guid SeId { get; set; }
+
public BBAC_SE_EDI()
{ }
public BBAC_SE_EDI(Guid guid, string keyCode, string version, string lU, string pN, string seqNumber, string assemblyCode, string injectionCode, decimal qty, DateTime beginDate
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SE_EDI.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SE_EDI.cs
index cf20f14d..e5979e91 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SE_EDI.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SE_EDI.cs
@@ -53,6 +53,12 @@ public class HBPO_SE_EDI :FullAuditedAggregateRoot
[Display(Name = "是否有发运数据")]
public bool IsHaveSeData { get; set; }
+ ///
+ /// 发运Id
+ ///
+ [Display(Name = "是否有发运数据")]
+ public Guid SeId { get; set; }
+
public HBPO_SE_EDI(Guid guid ,string keyCode, int version, string lU, string pN, string seqNumber, string assemblyCode, string injectionCode, decimal qty, DateTime beginDate, string site, string extend1, string extend2, string extend3, string extend4)
{
Id = guid;
From 43a19ec3afa00f0c5dd1b6486a2c75aae5f6a682 Mon Sep 17 00:00:00 2001
From: mahao
Date: Mon, 14 Aug 2023 13:05:17 +0800
Subject: [PATCH 13/13] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BB=93=E7=AE=97?=
=?UTF-8?q?=E4=BB=8E=E8=A1=A8=E5=AF=BC=E5=87=BA=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Entities/BQ/BBAC_SA_DETAIL_SERVICE.cs | 12 ------------
.../Entities/BQ/HBPO_SA_DETAIL_SERVICE.cs | 12 ------------
2 files changed, 24 deletions(-)
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_DETAIL_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_DETAIL_SERVICE.cs
index aacc4594..d13a83b2 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_DETAIL_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_DETAIL_SERVICE.cs
@@ -32,11 +32,6 @@ public class BBAC_SA_DETAIL_SERVICE : SettleAccountApplicationBase
private readonly INormalEfCoreRepository _bbacSaDetailRepository;
- ///
- /// BBAC结算仓储
- ///
- private readonly INormalEfCoreRepository _bbacSaRepository;
-
///
/// 任务服务
///
@@ -46,7 +41,6 @@ public class BBAC_SA_DETAIL_SERVICE : SettleAccountApplicationBase
public BBAC_SA_DETAIL_SERVICE(INormalEfCoreRepository bbacSaDetailRepository,
- INormalEfCoreRepository bbacSaRepository,
TaskJobService taskJobService,
IDistributedCache cache,
IExcelImportAppService excelImportService,
@@ -55,7 +49,6 @@ public class BBAC_SA_DETAIL_SERVICE : SettleAccountApplicationBase ExportAsync(BBAC_SA_DETAIL_EXPORT_REQUEST_DTO input)
{
- var pubSaEntity = await _bbacSaRepository.FirstOrDefaultAsync(t => t.BillNum == input.BillNum).ConfigureAwait(false);
- if (pubSaEntity == null)
- {
- throw new UserFriendlyException($"导出失败,结算单号不存在!", "400");
- }
string fileName = $"JisBBAC的结算数据_{Guid.NewGuid()}.xlsx";
List filters = new List();
filters.Add(new FilterCondition("BillNum", input.BillNum, EnumFilterAction.Equal, EnumFilterLogic.And));
diff --git a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_DETAIL_SERVICE.cs b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_DETAIL_SERVICE.cs
index 5f5a472d..faf92c40 100644
--- a/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_DETAIL_SERVICE.cs
+++ b/code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_DETAIL_SERVICE.cs
@@ -32,11 +32,6 @@ public class HBPO_SA_DETAIL_SERVICE : SettleAccountApplicationBase
private readonly INormalEfCoreRepository _hbpoSaDetailRepository;
- ///
- /// HBPO结算仓储
- ///
- private readonly INormalEfCoreRepository _hbpoSaRepository;
-
///
/// 任务服务
///
@@ -46,7 +41,6 @@ public class HBPO_SA_DETAIL_SERVICE : SettleAccountApplicationBase
public HBPO_SA_DETAIL_SERVICE(INormalEfCoreRepository hbpoSaDetailRepository,
- INormalEfCoreRepository hbpoSaRepository,
TaskJobService taskJobService,
IDistributedCache cache,
IExcelImportAppService excelImportService,
@@ -55,7 +49,6 @@ public class HBPO_SA_DETAIL_SERVICE : SettleAccountApplicationBase ExportAsync(HBPO_SA_DETAIL_EXPORT_REQUEST_DTO input)
{
- var pubSaEntity = await _hbpoSaRepository.FirstOrDefaultAsync(t => t.BillNum == input.BillNum).ConfigureAwait(false);
- if (pubSaEntity == null)
- {
- throw new UserFriendlyException($"导出失败,结算单号不存在!", "400");
- }
string fileName = $"JisHBPO的结算数据_{Guid.NewGuid()}.xlsx";
List filters = new List();
filters.Add(new FilterCondition("BillNum", input.BillNum, EnumFilterAction.Equal, EnumFilterLogic.And));