学 赵 1 year ago
parent
commit
f1e3af8c75
  1. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
  2. 30
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
  3. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/index.html
  4. 132
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/bj/contrast/bj_pub_sa_detail_jobservice.js
  5. 132
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/bj/contrast/bj_second_pub_sa_detail_jobservice.js
  6. 132
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/in/contrast/in_pub_sa_detail_jobservice.js
  7. 132
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/in/contrast/in_second_pub_sa_detail_jobservice.js
  8. 137
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/contrast/first_bbac_sa_detail_jobservice.js
  9. 137
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/contrast/second_bbac_sa_detail_jobservice.js
  10. 137
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/contrast/third_bbac_sa_detail_jobservice.js
  11. 137
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/contrast/first_hbpo_sa_detail_service.js
  12. 137
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/contrast/hbpo_sa_detail_service.js
  13. 137
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/contrast/second_hbpo_sa_detail_service.js
  14. 132
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jit/contrast/jit_pub_sa_detail_jobservice.js
  15. 132
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jit/contrast/jit_second_pub_sa_detail_jobservice.js
  16. 79
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/job-service.js
  17. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/contrast/bj_pub_sa_detail_jobservice.js
  18. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/contrast/bj_second_pub_sa_detail_jobservice.js
  19. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/contrast/in_pub_sa_detail_jobservice.js
  20. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/contrast/in_second_pub_sa_detail_jobservice.js
  21. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/bbac_sa_detail_jobservice.js
  22. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/first_bbac_sa_detail_jobservice.js
  23. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/second_bbac_sa_detail_jobservice.js
  24. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/third_bbac_sa_detail_jobservice.js
  25. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/contrast/first_hbpo_sa_detail_jobservice.js
  26. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/contrast/hbpo_sa_detail_jobservice.js
  27. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/contrast/second_hbpo_sa_detail_jobservice.js
  28. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/contrast/jit_pub_sa_detail_jobservice.js
  29. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/contrast/jit_second_pub_sa_detail_jobservice.js
  30. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs
  31. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_DETAIL_SERVICE.cs
  32. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_DETAIL_SERVICE.cs
  33. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PURCHASE_PRICE_SERVICE.cs
  34. 33
      code/src/Modules/SettleAccount/src/SettleAccount.Domain.Shared/Enums/EnumPubSaSeCompareCategory.cs
  35. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Domain.Shared/SettleAccount.Domain.Shared.csproj
  36. 57
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiBalance.cs
  37. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiLog.cs
  38. 375
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/PubSaSeCompareDiff.cs
  39. 3
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  40. 4411
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230720012742_vmi2.Designer.cs
  41. 227
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230720012742_vmi2.cs
  42. 52
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs
  43. 4
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/PubSaSeCompareDapperRepository.cs
  44. 188
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/PubSaSeCompareExportService.cs
  45. 22
      code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobAutoMapperProfile.cs
  46. 9
      code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs

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

@ -127,7 +127,7 @@ export default {
value: o[props.schema.value],
label: o[props.schema.label],
}));
if (!props.schema.selected && options.value.length) {
if (props.schema.defaultSelected && options.value.length) {
model[props.prop] = options.value[0].value;
}
} catch (error) {

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

@ -1,6 +1,6 @@
import html, { getProp } from "html";
import request, { get, getUrl, post } from "../../request/index.js";
import { defineAsyncComponent, ref, reactive, onMounted } from "vue";
import { defineAsyncComponent, ref, reactive, onMounted, watch } from "vue";
import { useRoute, useRouter } from "vue-router";
import { useI18n } from "vue-i18n";
import { listToTree, schemaToModel, importFunction, format } from "../../utils/index.js";
@ -105,7 +105,12 @@ export default {
</template>
<template v-else>
<template v-if="showColumn(item,key)">
<el-table-column :prop="key" sortable="custom" :sort-orders="['descending', 'ascending', null]">
<el-table-column
:prop="key"
sortable="custom"
:sort-orders="['descending', 'ascending', null]"
:filters="getFilters(item,key)"
>
<template #header="scope">{{item.title}}</template>
<template #default="scope">
<app-form-input mode="details" :schema="item" :prop="key" v-model="scope.row" />
@ -384,7 +389,7 @@ export default {
const filterDrawer = ref(false);
const subDrawer = ref(false);
const subListQuery = ref({});
const tableLoading = ref(true);
const tableLoading = ref(false);
const selectedRows = ref([]);
const dialogVisible = ref(false);
const route = useRoute();
@ -396,7 +401,12 @@ export default {
// 添加下行代码暂停权限验证
const buttons = ref(props.buttons ?? route.meta.children);
const baseUrl = props.controller ?? `${route.meta.path}`;
const queryModel = ref({});
const queryModel = ref(schemaToModel(config.query.schema));
watch(queryModel.value, async (value, oldValue, a) => {
if (config.query.autoSubmit) {
await load();
}
});
const sortColumns = ref(new Map());
const querySchema = ref(props.querySchema);
const filterList = ref([]);
@ -465,6 +475,12 @@ export default {
const showColumn = (item, prop) => {
return columns.value.some((o) => o.name === prop && o.checked);
};
const getFilters = (item, prop) => {
if (item.input === "select" && item.options) {
return item.options.map((o) => ({ text: o.label, value: o.value }));
}
return null;
};
const handleSelectionChange = (rows) => (selectedRows.value = rows);
const load = async () => {
tableLoading.value = true;
@ -825,14 +841,15 @@ export default {
}
}
//
queryModel.value = schemaToModel(config.query.schema);
getSortModel(queryModel.value);
filterList.value = queryModel.value?.filters ?? [];
getColumns(config.table.schema);
if (props.query) {
Object.assign(queryModel.value.query, props.query);
}
await load();
if (!config.query.disableQueryOnLoad) {
await load();
}
});
context.expose({ load });
return {
@ -884,6 +901,7 @@ export default {
pushfilterList,
getOperators,
isNotJit,
getFilters,
};
},
};

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/index.html

@ -49,7 +49,7 @@
"html":"./utils/index.js",
"detect-it":"./lib/detect-it/detect-it.esm.js",
"lodash":"./lib/lodash/lodash.esm.js",
"vue": "./lib/vue/vue.esm-browser.js",
"vue": "./lib/vue/vue.esm-browser.prod.js",
"vue-router": "./lib/vue-router/vue-router.esm-browser.js",
"vue-i18n":"./lib/vue-i18n/vue-i18n.esm-browser.prod.js",
"pinia": "./lib/pinia/pinia.esm-browser.js",

132
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/bj/contrast/bj_pub_sa_detail_jobservice.js

@ -1,132 +0,0 @@
const schema = {
title: "通用代码",
type: "object",
properties: {
project: {
title: "项目",
type: "string",
readOnly: true,
showForList: true,
rules: [
{
required: true,
},
],
},
value: {
title: "值",
type: "string",
readOnly: true,
showForList: true,
rules: [
{
required: true,
},
],
},
description: {
title: "描述",
type: "string",
input: "textarea",
showForList: true,
rules: [
{
required: true,
},
{ max: 60 },
],
},
},
};
const baseUrl = "settleaccount/code-setting";
const queryUrl = `${baseUrl}/get-list`;
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 exportUrl = `${baseUrl}/export`;
const queryMethod = "POST";
const detailsMethod = "POST";
const createMethod = "POST";
const updateMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
const exportMethod = "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: "project",
action: "like",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
detailsUrl,
createUrl,
updateUrl,
deleteUrl,
importUrl,
exportUrl,
detailsMethod,
createMethod,
updateMethod,
deleteMethod,
importMethod,
exportMethod,
schema: schema,
},
};
}

132
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/bj/contrast/bj_second_pub_sa_detail_jobservice.js

@ -1,132 +0,0 @@
const schema = {
title: "通用代码",
type: "object",
properties: {
project: {
title: "项目",
type: "string",
readOnly: true,
showForList: true,
rules: [
{
required: true,
},
],
},
value: {
title: "值",
type: "string",
readOnly: true,
showForList: true,
rules: [
{
required: true,
},
],
},
description: {
title: "描述",
type: "string",
input: "textarea",
showForList: true,
rules: [
{
required: true,
},
{ max: 60 },
],
},
},
};
const baseUrl = "settleaccount/code-setting";
const queryUrl = `${baseUrl}/get-list`;
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 exportUrl = `${baseUrl}/export`;
const queryMethod = "POST";
const detailsMethod = "POST";
const createMethod = "POST";
const updateMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
const exportMethod = "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: "project",
action: "like",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
detailsUrl,
createUrl,
updateUrl,
deleteUrl,
importUrl,
exportUrl,
detailsMethod,
createMethod,
updateMethod,
deleteMethod,
importMethod,
exportMethod,
schema: schema,
},
};
}

132
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/in/contrast/in_pub_sa_detail_jobservice.js

@ -1,132 +0,0 @@
const schema = {
title: "通用代码",
type: "object",
properties: {
project: {
title: "项目",
type: "string",
readOnly: true,
showForList: true,
rules: [
{
required: true,
},
],
},
value: {
title: "值",
type: "string",
readOnly: true,
showForList: true,
rules: [
{
required: true,
},
],
},
description: {
title: "描述",
type: "string",
input: "textarea",
showForList: true,
rules: [
{
required: true,
},
{ max: 60 },
],
},
},
};
const baseUrl = "settleaccount/code-setting";
const queryUrl = `${baseUrl}/get-list`;
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 exportUrl = `${baseUrl}/export`;
const queryMethod = "POST";
const detailsMethod = "POST";
const createMethod = "POST";
const updateMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
const exportMethod = "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: "project",
action: "like",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
detailsUrl,
createUrl,
updateUrl,
deleteUrl,
importUrl,
exportUrl,
detailsMethod,
createMethod,
updateMethod,
deleteMethod,
importMethod,
exportMethod,
schema: schema,
},
};
}

132
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/in/contrast/in_second_pub_sa_detail_jobservice.js

@ -1,132 +0,0 @@
const schema = {
title: "通用代码",
type: "object",
properties: {
project: {
title: "项目",
type: "string",
readOnly: true,
showForList: true,
rules: [
{
required: true,
},
],
},
value: {
title: "值",
type: "string",
readOnly: true,
showForList: true,
rules: [
{
required: true,
},
],
},
description: {
title: "描述",
type: "string",
input: "textarea",
showForList: true,
rules: [
{
required: true,
},
{ max: 60 },
],
},
},
};
const baseUrl = "settleaccount/code-setting";
const queryUrl = `${baseUrl}/get-list`;
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 exportUrl = `${baseUrl}/export`;
const queryMethod = "POST";
const detailsMethod = "POST";
const createMethod = "POST";
const updateMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
const exportMethod = "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: "project",
action: "like",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
detailsUrl,
createUrl,
updateUrl,
deleteUrl,
importUrl,
exportUrl,
detailsMethod,
createMethod,
updateMethod,
deleteMethod,
importMethod,
exportMethod,
schema: schema,
},
};
}

137
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/contrast/first_bbac_sa_detail_jobservice.js

@ -1,137 +0,0 @@
const schema = {
title: "期间设置",
type: "object",
properties: {
year: {
title: "年度",
type: "string",
hidden: true,
showForList: true,
rules: [
{
required: true,
},
],
},
period: {
title: "期间",
type: "string",
hidden: true,
showForList: true,
rules: [
{
required: true,
},
],
},
version: {
title: "版本",
type: "string",
input: "month",
format: "YYYYMM",
showForList: true,
watch: "(model,value)=>{model.year=value.substr(0,4);model.period=value.substr(4,2);}",
rules: [
{
required: true,
trigger: "blur",
},
],
},
state: {
title: "状态",
type: "boolean",
showForList: true,
default: true,
rules: [
{
required: true,
},
],
},
},
};
const baseUrl = "settleaccount/centralized-control";
const queryUrl = `${baseUrl}/get-list`;
const detailsUrl = `${baseUrl}/get/%s`;
const createUrl = `${baseUrl}/create`;
const updateUrl = `${baseUrl}/update/%s`;
const deleteUrl = `${baseUrl}/delete-list`;
const queryMethod = "POST";
const detailsMethod = "POST";
const createMethod = "POST";
const updateMethod = "POST";
const deleteMethod = "POST";
export default function () {
return {
baseUrl,
query: {
url: queryUrl,
method: queryMethod,
hasFilter: true,
schema: {
title: "期间设置",
type: "object",
properties: {
filters: {
type: "array",
hidden: true,
items: {
type: "object",
properties: {
logic: {
type: "int",
},
column: {
type: "string",
},
action: {
type: "int",
},
value: {
type: "string",
},
},
},
default: [
{
logic: "and",
column: "year",
action: "like",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
detailsUrl,
createUrl,
updateUrl,
deleteUrl,
detailsMethod,
createMethod,
updateMethod,
deleteMethod,
schema: schema,
},
};
}

137
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/contrast/second_bbac_sa_detail_jobservice.js

@ -1,137 +0,0 @@
const schema = {
title: "期间设置",
type: "object",
properties: {
year: {
title: "年度",
type: "string",
hidden: true,
showForList: true,
rules: [
{
required: true,
},
],
},
period: {
title: "期间",
type: "string",
hidden: true,
showForList: true,
rules: [
{
required: true,
},
],
},
version: {
title: "版本",
type: "string",
input: "month",
format: "YYYYMM",
showForList: true,
watch: "(model,value)=>{model.year=value.substr(0,4);model.period=value.substr(4,2);}",
rules: [
{
required: true,
trigger: "blur",
},
],
},
state: {
title: "状态",
type: "boolean",
showForList: true,
default: true,
rules: [
{
required: true,
},
],
},
},
};
const baseUrl = "settleaccount/centralized-control";
const queryUrl = `${baseUrl}/get-list`;
const detailsUrl = `${baseUrl}/get/%s`;
const createUrl = `${baseUrl}/create`;
const updateUrl = `${baseUrl}/update/%s`;
const deleteUrl = `${baseUrl}/delete-list`;
const queryMethod = "POST";
const detailsMethod = "POST";
const createMethod = "POST";
const updateMethod = "POST";
const deleteMethod = "POST";
export default function () {
return {
baseUrl,
query: {
url: queryUrl,
method: queryMethod,
hasFilter: true,
schema: {
title: "期间设置",
type: "object",
properties: {
filters: {
type: "array",
hidden: true,
items: {
type: "object",
properties: {
logic: {
type: "int",
},
column: {
type: "string",
},
action: {
type: "int",
},
value: {
type: "string",
},
},
},
default: [
{
logic: "and",
column: "year",
action: "like",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
detailsUrl,
createUrl,
updateUrl,
deleteUrl,
detailsMethod,
createMethod,
updateMethod,
deleteMethod,
schema: schema,
},
};
}

137
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/contrast/third_bbac_sa_detail_jobservice.js

@ -1,137 +0,0 @@
const schema = {
title: "期间设置",
type: "object",
properties: {
year: {
title: "年度",
type: "string",
hidden: true,
showForList: true,
rules: [
{
required: true,
},
],
},
period: {
title: "期间",
type: "string",
hidden: true,
showForList: true,
rules: [
{
required: true,
},
],
},
version: {
title: "版本",
type: "string",
input: "month",
format: "YYYYMM",
showForList: true,
watch: "(model,value)=>{model.year=value.substr(0,4);model.period=value.substr(4,2);}",
rules: [
{
required: true,
trigger: "blur",
},
],
},
state: {
title: "状态",
type: "boolean",
showForList: true,
default: true,
rules: [
{
required: true,
},
],
},
},
};
const baseUrl = "settleaccount/centralized-control";
const queryUrl = `${baseUrl}/get-list`;
const detailsUrl = `${baseUrl}/get/%s`;
const createUrl = `${baseUrl}/create`;
const updateUrl = `${baseUrl}/update/%s`;
const deleteUrl = `${baseUrl}/delete-list`;
const queryMethod = "POST";
const detailsMethod = "POST";
const createMethod = "POST";
const updateMethod = "POST";
const deleteMethod = "POST";
export default function () {
return {
baseUrl,
query: {
url: queryUrl,
method: queryMethod,
hasFilter: true,
schema: {
title: "期间设置",
type: "object",
properties: {
filters: {
type: "array",
hidden: true,
items: {
type: "object",
properties: {
logic: {
type: "int",
},
column: {
type: "string",
},
action: {
type: "int",
},
value: {
type: "string",
},
},
},
default: [
{
logic: "and",
column: "year",
action: "like",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
detailsUrl,
createUrl,
updateUrl,
deleteUrl,
detailsMethod,
createMethod,
updateMethod,
deleteMethod,
schema: schema,
},
};
}

137
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/contrast/first_hbpo_sa_detail_service.js

@ -1,137 +0,0 @@
const schema = {
title: "期间设置",
type: "object",
properties: {
year: {
title: "年度",
type: "string",
hidden: true,
showForList: true,
rules: [
{
required: true,
},
],
},
period: {
title: "期间",
type: "string",
hidden: true,
showForList: true,
rules: [
{
required: true,
},
],
},
version: {
title: "版本",
type: "string",
input: "month",
format: "YYYYMM",
showForList: true,
watch: "(model,value)=>{model.year=value.substr(0,4);model.period=value.substr(4,2);}",
rules: [
{
required: true,
trigger: "blur",
},
],
},
state: {
title: "状态",
type: "boolean",
showForList: true,
default: true,
rules: [
{
required: true,
},
],
},
},
};
const baseUrl = "settleaccount/centralized-control";
const queryUrl = `${baseUrl}/get-list`;
const detailsUrl = `${baseUrl}/get/%s`;
const createUrl = `${baseUrl}/create`;
const updateUrl = `${baseUrl}/update/%s`;
const deleteUrl = `${baseUrl}/delete-list`;
const queryMethod = "POST";
const detailsMethod = "POST";
const createMethod = "POST";
const updateMethod = "POST";
const deleteMethod = "POST";
export default function () {
return {
baseUrl,
query: {
url: queryUrl,
method: queryMethod,
hasFilter: true,
schema: {
title: "期间设置",
type: "object",
properties: {
filters: {
type: "array",
hidden: true,
items: {
type: "object",
properties: {
logic: {
type: "int",
},
column: {
type: "string",
},
action: {
type: "int",
},
value: {
type: "string",
},
},
},
default: [
{
logic: "and",
column: "year",
action: "like",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
detailsUrl,
createUrl,
updateUrl,
deleteUrl,
detailsMethod,
createMethod,
updateMethod,
deleteMethod,
schema: schema,
},
};
}

137
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/contrast/hbpo_sa_detail_service.js

@ -1,137 +0,0 @@
const schema = {
title: "期间设置",
type: "object",
properties: {
year: {
title: "年度",
type: "string",
hidden: true,
showForList: true,
rules: [
{
required: true,
},
],
},
period: {
title: "期间",
type: "string",
hidden: true,
showForList: true,
rules: [
{
required: true,
},
],
},
version: {
title: "版本",
type: "string",
input: "month",
format: "YYYYMM",
showForList: true,
watch: "(model,value)=>{model.year=value.substr(0,4);model.period=value.substr(4,2);}",
rules: [
{
required: true,
trigger: "blur",
},
],
},
state: {
title: "状态",
type: "boolean",
showForList: true,
default: true,
rules: [
{
required: true,
},
],
},
},
};
const baseUrl = "settleaccount/centralized-control";
const queryUrl = `${baseUrl}/get-list`;
const detailsUrl = `${baseUrl}/get/%s`;
const createUrl = `${baseUrl}/create`;
const updateUrl = `${baseUrl}/update/%s`;
const deleteUrl = `${baseUrl}/delete-list`;
const queryMethod = "POST";
const detailsMethod = "POST";
const createMethod = "POST";
const updateMethod = "POST";
const deleteMethod = "POST";
export default function () {
return {
baseUrl,
query: {
url: queryUrl,
method: queryMethod,
hasFilter: true,
schema: {
title: "期间设置",
type: "object",
properties: {
filters: {
type: "array",
hidden: true,
items: {
type: "object",
properties: {
logic: {
type: "int",
},
column: {
type: "string",
},
action: {
type: "int",
},
value: {
type: "string",
},
},
},
default: [
{
logic: "and",
column: "year",
action: "like",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
detailsUrl,
createUrl,
updateUrl,
deleteUrl,
detailsMethod,
createMethod,
updateMethod,
deleteMethod,
schema: schema,
},
};
}

137
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/contrast/second_hbpo_sa_detail_service.js

@ -1,137 +0,0 @@
const schema = {
title: "期间设置",
type: "object",
properties: {
year: {
title: "年度",
type: "string",
hidden: true,
showForList: true,
rules: [
{
required: true,
},
],
},
period: {
title: "期间",
type: "string",
hidden: true,
showForList: true,
rules: [
{
required: true,
},
],
},
version: {
title: "版本",
type: "string",
input: "month",
format: "YYYYMM",
showForList: true,
watch: "(model,value)=>{model.year=value.substr(0,4);model.period=value.substr(4,2);}",
rules: [
{
required: true,
trigger: "blur",
},
],
},
state: {
title: "状态",
type: "boolean",
showForList: true,
default: true,
rules: [
{
required: true,
},
],
},
},
};
const baseUrl = "settleaccount/centralized-control";
const queryUrl = `${baseUrl}/get-list`;
const detailsUrl = `${baseUrl}/get/%s`;
const createUrl = `${baseUrl}/create`;
const updateUrl = `${baseUrl}/update/%s`;
const deleteUrl = `${baseUrl}/delete-list`;
const queryMethod = "POST";
const detailsMethod = "POST";
const createMethod = "POST";
const updateMethod = "POST";
const deleteMethod = "POST";
export default function () {
return {
baseUrl,
query: {
url: queryUrl,
method: queryMethod,
hasFilter: true,
schema: {
title: "期间设置",
type: "object",
properties: {
filters: {
type: "array",
hidden: true,
items: {
type: "object",
properties: {
logic: {
type: "int",
},
column: {
type: "string",
},
action: {
type: "int",
},
value: {
type: "string",
},
},
},
default: [
{
logic: "and",
column: "year",
action: "like",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
detailsUrl,
createUrl,
updateUrl,
deleteUrl,
detailsMethod,
createMethod,
updateMethod,
deleteMethod,
schema: schema,
},
};
}

132
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jit/contrast/jit_pub_sa_detail_jobservice.js

@ -1,132 +0,0 @@
const schema = {
title: "通用代码",
type: "object",
properties: {
project: {
title: "项目",
type: "string",
readOnly: true,
showForList: true,
rules: [
{
required: true,
},
],
},
value: {
title: "值",
type: "string",
readOnly: true,
showForList: true,
rules: [
{
required: true,
},
],
},
description: {
title: "描述",
type: "string",
input: "textarea",
showForList: true,
rules: [
{
required: true,
},
{ max: 60 },
],
},
},
};
const baseUrl = "settleaccount/code-setting";
const queryUrl = `${baseUrl}/get-list`;
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 exportUrl = `${baseUrl}/export`;
const queryMethod = "POST";
const detailsMethod = "POST";
const createMethod = "POST";
const updateMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
const exportMethod = "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: "project",
action: "like",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
detailsUrl,
createUrl,
updateUrl,
deleteUrl,
importUrl,
exportUrl,
detailsMethod,
createMethod,
updateMethod,
deleteMethod,
importMethod,
exportMethod,
schema: schema,
},
};
}

132
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jit/contrast/jit_second_pub_sa_detail_jobservice.js

@ -1,132 +0,0 @@
const schema = {
title: "通用代码",
type: "object",
properties: {
project: {
title: "项目",
type: "string",
readOnly: true,
showForList: true,
rules: [
{
required: true,
},
],
},
value: {
title: "值",
type: "string",
readOnly: true,
showForList: true,
rules: [
{
required: true,
},
],
},
description: {
title: "描述",
type: "string",
input: "textarea",
showForList: true,
rules: [
{
required: true,
},
{ max: 60 },
],
},
},
};
const baseUrl = "settleaccount/code-setting";
const queryUrl = `${baseUrl}/get-list`;
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 exportUrl = `${baseUrl}/export`;
const queryMethod = "POST";
const detailsMethod = "POST";
const createMethod = "POST";
const updateMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
const exportMethod = "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: "project",
action: "like",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
detailsUrl,
createUrl,
updateUrl,
deleteUrl,
importUrl,
exportUrl,
detailsMethod,
createMethod,
updateMethod,
deleteMethod,
importMethod,
exportMethod,
schema: schema,
},
};
}

79
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/contrast/bbac_sa_detail_jobservice.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/job-service.js

@ -1,62 +1,47 @@
import version from "../../../models/version.js";
import version from "./version.js";
const stateName = {
title: "状态",
type: "string",
input: "select",
options: [
{ label: "执行完成(任务成功)", value: "Succeeded" },
{ label: "执行完成(任务失败)", value: "Failed" },
{ label: "执行中", value: "Processing" },
{ label: "等待执行", value: "Enqueued" },
],
};
const schema = {
title: "期间设置",
type: "object",
properties: {
year: {
title: "年度",
type: {
title: "版本号",
type: "string",
hidden: true,
showForList: true,
rules: [
{
required: true,
},
],
},
period: {
title: "期间",
taskId: {
title: "单据流水号",
type: "string",
hidden: true,
showForList: true,
rules: [
{
required: true,
},
],
},
version: {
title: "版本",
email: {
title: "创建人",
type: "string",
input: "month",
format: "YYYYMM",
showForList: true,
watch: "(model,value)=>{model.year=value.substr(0,4);model.period=value.substr(4,2);}",
rules: [
{
required: true,
trigger: "blur",
},
],
},
state: {
title: "状态",
type: "boolean",
showForList: true,
default: true,
rules: [
{
required: true,
},
],
createdAt: {
title: "创建时间",
type: "DateTime",
},
remark: {
title: "说明",
type: "string",
},
stateName,
},
};
const baseUrl = "settleaccount/centralized-control";
const queryUrl = "settleaccount/Job/list";
const deleteUrl = `${baseUrl}/delete-list`;
const deleteUrl = "settleaccount/Job/delete";
const exportUrl = "settleaccount/pub_sa_detail_service/export";
const compareUrl = "settleaccount/pub_sa_detail_service/pub-sa-se-compare";
const queryMethod = "POST";
@ -66,21 +51,23 @@ const compareMethod = "POST";
export default function () {
return {
baseUrl,
query: {
url: queryUrl,
method: queryMethod,
hasFilter: true,
autoSubmit: true,
disableQueryOnLoad: true,
schema: {
title: "期间设置",
type: "object",
properties: {
type: version,
type: Object.assign({ defaultSelected: true }, version),
name: {
type: "string",
default: null,
hidden: true,
},
stateName,
filters: {
type: "array",
hidden: true,

3
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/contrast/bj_pub_sa_detail_jobservice.js

@ -1,12 +1,13 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/bj/contrast/bj_pub_sa_detail_jobservice.js";
import useConfig from "../../../models/job-service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
config.query.schema.title = "发运与结算对比";
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};

3
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/contrast/bj_second_pub_sa_detail_jobservice.js

@ -1,12 +1,13 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/bj/contrast/bj_second_pub_sa_detail_jobservice.js";
import useConfig from "../../../models/job-service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
config.query.schema.title = "发运与结算二次对比";
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};

3
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/contrast/in_pub_sa_detail_jobservice.js

@ -1,12 +1,13 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/in/contrast/in_pub_sa_detail_jobservice.js";
import useConfig from "../../../models/job-service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
config.query.schema.title = "发运与结算对比";
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};

3
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/contrast/in_second_pub_sa_detail_jobservice.js

@ -1,12 +1,13 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/in/contrast/in_second_pub_sa_detail_jobservice.js";
import useConfig from "../../../models/job-service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
config.query.schema.title = "发运与结算二次对比";
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};

3
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/bbac_sa_detail_jobservice.js

@ -1,12 +1,13 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/jis-bbac/contrast/bbac_sa_detail_jobservice.js";
import useConfig from "../../../models/job-service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
config.query.schema.title = "EDI与发运数据对比";
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};

3
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/first_bbac_sa_detail_jobservice.js

@ -1,12 +1,13 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/jis-bbac/contrast/first_bbac_sa_detail_jobservice.js";
import useConfig from "../../../models/job-service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
config.query.schema.title = "EDI、发运与结算对比";
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};

3
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/second_bbac_sa_detail_jobservice.js

@ -1,12 +1,13 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/jis-bbac/contrast/second_bbac_sa_detail_jobservice.js";
import useConfig from "../../../models/job-service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
config.query.schema.title = "发运与结算数据二次对比";
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};

3
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/contrast/third_bbac_sa_detail_jobservice.js

@ -1,12 +1,13 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/jis-bbac/contrast/third_bbac_sa_detail_jobservice.js";
import useConfig from "../../../models/job-service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
config.query.schema.title = "买单件发运与结算数据三次对比";
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};

3
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/contrast/first_hbpo_sa_detail_jobservice.js

@ -1,12 +1,13 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/jis-hbpo/contrast/first_hbpo_sa_detail_service.js";
import useConfig from "../../../models/job-service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
config.query.schema.title = "EDI、发运与结算对比";
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};

3
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/contrast/hbpo_sa_detail_jobservice.js

@ -1,12 +1,13 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/jis-hbpo/contrast/hbpo_sa_detail_service.js";
import useConfig from "../../../models/job-service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
config.query.schema.title = "EDI与发运数据对比";
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};

3
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/contrast/second_hbpo_sa_detail_jobservice.js

@ -1,12 +1,13 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/jis-hbpo/contrast/second_hbpo_sa_detail_service.js";
import useConfig from "../../../models/job-service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
config.query.schema.title = "发运与结算数据二次对比";
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};

3
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/contrast/jit_pub_sa_detail_jobservice.js

@ -1,12 +1,13 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/jit/contrast/jit_pub_sa_detail_jobservice.js";
import useConfig from "../../../models/job-service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
config.query.schema.title = "发运与结算对比";
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};

3
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/contrast/jit_second_pub_sa_detail_jobservice.js

@ -1,12 +1,13 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/jit/contrast/jit_second_pub_sa_detail_jobservice.js";
import useConfig from "../../../models/job-service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
config.query.schema.title = "发运与结算二次对比";
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};

2
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs

@ -179,14 +179,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// 零件号
/// </summary>
[Display(Name = "零件号")]
[Required(ErrorMessage = "{0}不能为空")]
public string LU { get; set; }
/// <summary>
/// 通用码
/// </summary>
[Display(Name = "通用码")]
[Required(ErrorMessage = "{0}不能为空")]
public string PN { get; set; }
/// <summary>

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_DETAIL_SERVICE.cs

@ -17,7 +17,7 @@ public class HBPO_SA_DETAIL_SERVICE
/// HBPO结算与发运比对
/// </summary>
[HttpPost]
public async Task<string> BBACSaSeCompare(JisSaSeCompareRequestDto jisSaSeCompareRequestDto)
public async Task<string> HBPOSaSeCompare(JisSaSeCompareRequestDto jisSaSeCompareRequestDto)
{
await Task.CompletedTask;
throw new NotImplementedException();

2
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_DETAIL_SERVICE.cs

@ -120,6 +120,8 @@ public class PUB_SA_DETAIL_SERVICE : SettleAccountApplicationBase<PUB_SA_DETAIL>
List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "Version", Value = pubSaSeCompareRequestDto.Version });
customConditionList.Add(new CustomCondition() { Name = "BusinessType", Value = ((int)pubSaSeCompareRequestDto.BusinessType).ToString() });
customConditionList.Add(new CustomCondition() { Name = "LU", Value = pubSaSeCompareRequestDto.LU });
customConditionList.Add(new CustomCondition() { Name = "PN", Value = pubSaSeCompareRequestDto.PN });
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = projectName });
var _taskid = await _taskJobService.ExportEnqueueAsync(projectName, ExportExtentsion.Excel, pubSaSeCompareRequestDto.Version, string.Empty, CurrentUser, typeof(PubSaSeCompareExportService), customConditionList, (rs) =>

5
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PURCHASE_PRICE_SERVICE.cs

@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SettleAccount.Domain.BQ;
@ -48,7 +48,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// 导入
/// </summary>
[HttpPost]
[Route("Import")]
public async Task<string> ImportAsync([FromForm] IFormFileCollection files)
{
ExportImporter _exportImporter = new ExportImporter();
@ -94,7 +93,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// 导出
/// </summary>
[HttpPost]
[Route("Export")]
public async Task<string> ExportAsync(RequestDto input)
{
string fileName = $"采购价格单_{Guid.NewGuid()}.xlsx";
@ -115,7 +113,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// 获取列表
/// </summary>
[HttpPost]
[Route("list")]
public async Task<PagedResultDto<PURCHASE_PRICE_DTO>> GetListAsync(RequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);

33
code/src/Modules/SettleAccount/src/SettleAccount.Domain.Shared/Enums/EnumPubSaSeCompareCategory.cs

@ -0,0 +1,33 @@
using System.ComponentModel.DataAnnotations;
namespace Win.Sfs.SettleAccount.Enums;
/// <summary>
/// Pub结算与发运比对类型
/// </summary>
public enum EnumPubSaSeCompareCategory
{
/// <summary>
/// 未定义
/// </summary>
[Display(Name = "未定义")]
None = 0,
/// <summary>
/// 有结算有发运
/// </summary>
[Display(Name = "有结算有发运")]
HaveSaHaveSe = 1,
/// <summary>
/// 有结算无发运
/// </summary>
[Display(Name = "有结算无发运")]
HaveSaNotHaveSe = 2,
/// <summary>
/// 无结算有发运
/// </summary>
[Display(Name = "无结算有发运")]
NotHaveSaHaveSe = 3
}

4
code/src/Modules/SettleAccount/src/SettleAccount.Domain.Shared/SettleAccount.Domain.Shared.csproj

@ -34,8 +34,4 @@
<Content Remove="Localization\SettleAccount\*.json" />
</ItemGroup>
<ItemGroup>
<Folder Include="Enums\" />
</ItemGroup>
</Project>

57
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiBalance.cs

@ -1,35 +1,56 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Domain.Entities;
namespace Win.Sfs.SettleAccount.Entities.BQ.Vmi;
public class VmiBalance : Entity<Guid>
{
/// <summary>
/// LU零件号:BBAC发运单BBAC_SE_DETAIL.LU
/// </summary>
[Display(Name = "Erp目标库位", Description = "Key")]
public string ErpToLoc { get; set; }
[Display(Name = "LU零件号", Description = "Key")]
public string LU { get; set; }
/// <summary>
/// 生产码:BBAC发运单BBAC_SE_DETAIL.PN
/// </summary>
public string PN { get; set; }
[Display(Name = "客户零件号")]
public string PartCode { get; set; }
[Display(Name = "生产码", Description = "Key")]
public string VinCode { get; set; }
/// <summary>
/// 生产码类型(01前保、02后保、03门槛等)
/// </summary>
public int PNType { get; set; }
[Display(Name = "生产码类型")]
public string CodeType { get; set; }
/// <summary>
/// 发货类型???
/// </summary>
public string Type { get; set; }
[Display(Name = "发货类型")]
public string ProType { get; set; }
/// <summary>
/// 数量
/// </summary>
[Display(Name = "数量")]
public decimal Qty { get; set; }
[Display(Name = "发运日期")]
public DateTime ShippingDate { get; set; }
[Display(Name = "订单日期")]
public DateTime CreationTime { get; set; }
[Display(Name = "EDI顺序号")]
public string SeqNumber { get; set; }
[Display(Name = "客户订单号")]
public string Tmpe4 { get; set; }
[Display(Name = "塑件唯一码")]
public string UniqueCode { get; set; }
[Display(Name = "EDI总成号")]
public string MatchNumber { get; set; }
[Display(Name = "PJIS生产顺序号")]
public string PjsNum { get; set; }
[Display(Name = "备注")]
public string Desc { get; set; }
public List<VmiLog> Logs { get; set; } = new List<VmiLog>();
}

3
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiLog.cs

@ -16,6 +16,9 @@ public class VmiLog : Entity<Guid>
/// </summary>
public string SessionId { get; set; }
public string OrderNumber { get; set; }
public DateTime CreatedDate { get; set; } = DateTime.Now;
public string CreatedBy { get; set; }
public VmiOperatorType Type { get; set; }
public VmiCategory Category { get; set; }
public VmiBalance Balance { get; set; }

375
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/PubSaSeCompareDiff.cs

@ -2,15 +2,300 @@ using System.ComponentModel.DataAnnotations;
using System;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using Win.Sfs.SettleAccount.Enums;
namespace Win.Sfs.SettleAccount.Reports;
[ExcelExporter(MaxRowNumberOnASheet = 900000)]
/// <summary>
/// PUB结算与发运对比
/// </summary>
public class PubSaSeCompareDiff
{
//[Display(Name = "LU+ASN单号")]
//public string KeyCode { get; set; } = null!;
/// <summary>
/// Wms发货单号
/// </summary>
[Display(Name = "Wms发货单号")]
public string WmsBillNum { get; set; }
/// <summary>
/// 发货日期
/// </summary>
[Display(Name = "发货日期")]
public DateTime ShippingDate { get; set; }
/// <summary>
/// 日顺序号
/// </summary>
[Display(Name = "日顺序号")]
public string SeqNumber { get; set; }
/// <summary>
/// PJIS日顺序号
/// </summary>
[Display(Name = "PJIS日顺序号")]
public string PJISSeqNumber { get; set; }
/// <summary>
/// 物料号
/// </summary>
[Display(Name = "物料号")]
public string MaterialNumber { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[Display(Name = "物料描述")]
public string MaterialDes { get; set; }
/// <summary>
/// 结算数据中的过账日期
/// </summary>
[Display(Name = "客户下线时间")]
public DateTime CustomerOfflineTime { get; set; }
/// <summary>
/// 结算数量
/// </summary>
[Display(Name = "结算数量")]
public decimal SAQty { get; set; }
/// <summary>
/// 发货数量
/// </summary>
[Display(Name = "发货数量")]
public decimal SEQty { get; set; }
/// <summary>
/// 差异数量
/// </summary>
[ExporterHeader(DisplayName = "差异数量")]
public decimal DiffQty { set; get; }
[Display(Name = "匹配类型")]
public string MateType { get; set; }
/// <summary>
/// 定价
/// </summary>
[Display(Name = "定价")]
public decimal FixPrice { get; set; }
/// <summary>
/// 原始零件号
/// </summary>
[Display(Name = "原始零件号")]
public string PrimitiveLU { get; set; }
/// <summary>
/// 替换零件号
/// </summary>
[Display(Name = "替换零件号")]
public string ReplaceLU { get; set; }
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
public string SeLU { set; get; }
/// <summary>
/// 生产号
/// </summary>
[Display(Name = "生产号")]
public string SePN { set; get; }
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
public string SaLU { set; get; }
/// <summary>
/// 生产号
/// </summary>
[Display(Name = "生产号")]
public string SaPN { set; get; }
/// <summary>
/// 类型
/// </summary>
[Display(Name = "类型")]
public EnumPubSaSeCompareCategory Category { get; set; }
/// <summary>
/// 是否已经移除
/// </summary>
public bool IsRemove { get; set; }
}
/// <summary>
/// PUB结算与发运对比明细
/// </summary>
[ExcelExporter(MaxRowNumberOnASheet = 900000)]
public class PubSaSeCompareDetailExport
{
/// <summary>
/// 类别
/// 有结算有发运
/// 有结算无发运
/// 无结算有发运
/// </summary>
[Display(Name = "类别")]
[ExporterHeader(DisplayName = "类别")]
[ValueMapping("有结算有发运", 1)]
[ValueMapping("有结算无发运", 2)]
[ValueMapping("无结算有发运", 3)]
public EnumPubSaSeCompareCategory Category { get; set; }
/// <summary>
/// Wms发货单号
/// </summary>
[Display(Name = "Wms发货单号")]
[ExporterHeader(DisplayName = "交货单号")]
public string WmsBillNum { get; set; }
/// <summary>
///
/// </summary>
[Display(Name = "发货日期")]
[ExporterHeader(DisplayName = "发货日期", Format = "yyyy-MM-dd")]
public DateTime ShippingDate { get; set; }
/// <summary>
/// 生产码
/// </summary>
[Display(Name = "生产码")]
[ExporterHeader(DisplayName = "ASN发货单号")]
public string PN { get; set; }
/// <summary>
/// 物料号
/// </summary>
[Display(Name = "物料号")]
[ExporterHeader(DisplayName = "厂内物料号")]
public string MaterialNumber { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[Display(Name = "物料描述")]
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDes { get; set; }
/// <summary>
/// 原始LU
/// </summary>
[Display(Name = "原始LU")]
[ExporterHeader(DisplayName = "原始LU")]
public string PrimitiveLU { get; set; }
/// <summary>
///替换LU
/// </summary>
[Display(Name = "替换LU")]
[ExporterHeader(DisplayName = "替换LU")]
public string ReplaceLU { get; set; }
/// <summary>
/// 结算数据中的过账日期
/// </summary>
[Display(Name = "客户下线时间")]
[ExporterHeader(DisplayName = "客户下线时间")]
public DateTime CustomerOfflineTime { get; set; }
/// <summary>
/// 结算数量
/// </summary>
[Display(Name = "结算数量")]
[ExporterHeader(DisplayName = "结算数量")]
public decimal SAQty { get; set; }
/// <summary>
/// 发货数量
/// </summary>
[Display(Name = "发货数量")]
[ExporterHeader(DisplayName = "WMS发货数量")]
public decimal SEQty { get; set; }
/// <summary>
/// 差异数量
/// </summary>
[ExporterHeader(DisplayName = "差异数量")]
public decimal DiffQty { set; get; }
/// <summary>
/// 匹配类型
/// </summary>
[Display(Name = "匹配类型")]
[ExporterHeader(DisplayName = "是否完全匹配")]
public string MateType { get; set; }
/// <summary>
/// 定价
/// </summary>
[Display(Name = "定价")]
[ExporterHeader(DisplayName = "定价")]
public decimal FixPrice { get; set; }
/// <summary>
/// 日顺序号
/// </summary>
[Display(Name = "日顺序号")]
[ExporterHeader(DisplayName = "日顺序号")]
public string SeqNumber { get; set; }
/// <summary>
/// PJIS日顺序号
/// </summary>
[Display(Name = "PJIS日顺序号")]
[ExporterHeader(DisplayName = "PJIS日顺序号")]
public string PJISSeqNumber { get; set; }
}
/// <summary>
/// PUB结算与发运对比汇总
/// </summary>
[ExcelExporter(MaxRowNumberOnASheet = 900000)]
public class PubSaSeCompareSumExport
{
/// <summary>
/// LU
/// </summary>
[Display(Name = "LU")]
[ExporterHeader(DisplayName = "LU")]
public string LU { get; set; }
/// <summary>
/// 物料描述
/// </summary>
[Display(Name = "物料描述")]
[ExporterHeader(DisplayName = "物料描述")]
public string MaterialDes { get; set; }
/// <summary>
/// 结算数量
/// </summary>
[Display(Name = "结算数量")]
[ExporterHeader(DisplayName = "结算数量")]
public decimal SAQty { get; set; }
/// <summary>
/// 发货数量
/// </summary>
[Display(Name = "发货数量")]
[ExporterHeader(DisplayName = "WMS发货数量")]
public decimal SEQty { get; set; }
/// <summary>
/// 差异数量
/// </summary>
[ExporterHeader(DisplayName = "差异数量")]
public decimal DiffQty => SAQty - SEQty;
}
[ExcelExporter(MaxRowNumberOnASheet = 900000)]
public class PubSaSeCompareDiffExport222
{
/// <summary>
/// 有结算无发货(无EDI数据)
///有结算无发货(有EDI数据)
@ -23,31 +308,28 @@ public class PubSaSeCompareDiff
///有结算有发货(WMS多发)
/// </summary>
[Display(Name = "类别")]
public string Category { get; set; } = null!;
//[Display(Name = "Wms发货单号")]
//public string WmsBillNum { get; set; } = null!;
public string Category { get; set; }
//[Display(Name = "发货时间")]
//public DateTime ShippingDate { get; set; }
[Display(Name = "Wms发货单号")]
public string WmsBillNum { get; set; }
//[Display(Name = "生产码")]
//public string PN { get; set; } = null!;
[Display(Name = "发货日期")]
public DateTime ShippingDate { get; set; }
[Display(Name = "日顺序号")]
public string SeqNumber { get; set; } = null!;
[Display(Name = "PJIS日顺序号")]
public string PJISSeqNumber { get; set; } = null!;
[Display(Name = "生产码")]
public string PN { get; set; }
[Display(Name = "物料号")]
public string MaterialNumber { get; set; } = null!;
public string MaterialNumber { get; set; }
[Display(Name = "物料描述")]
public string MaterialDes { get; set; } = null!;
public string MaterialDes { get; set; }
//[Display(Name = "零件号")]
//public string LU { get; set; } = null!;
[Display(Name = "原始LU")]
public string PrimitiveLU { get; set; }
[Display(Name = "替换LU")]
public string ReplaceLU { get; set; }
/// <summary>
/// 结算数据中的过账日期
@ -55,24 +337,59 @@ public class PubSaSeCompareDiff
[Display(Name = "客户下线时间")]
public DateTime CustomerOfflineTime { get; set; }
[Display(Name = "小总成号")]
public string AssemblyCode { get; set; }
[Display(Name = "注塑码")]
public string InjectionCode { get; set; }
[Display(Name = "结算数量")]
public decimal SAQty { get; set; }
[Display(Name = "发货数量")]
public decimal SEQty { get; set; }
/// <summary>
/// 差异数量
/// </summary>
[ExporterHeader(DisplayName = "差异数量")]
public decimal DiffQty { set; get; }
[Display(Name = "匹配类型")]
public string MateType { get; set; }
[Display(Name = "定价")]
public decimal FixPrice { get; set; }
[Display(Name = "PJIS日顺序号")]
public string PJISSeqNumber { get; set; }
[Display(Name = "日顺序号")]
public string SeqNumber { get; set; }
//[Display(Name = "零件号")]
//public string LU { get; set; } = null!;
[Display(Name = "小总成号")]
public string AssemblyCode { get; set; }
[Display(Name = "注塑码")]
public string InjectionCode { get; set; }
[Display(Name = "期间")]
public int Version { get; set; }
@ -116,9 +433,5 @@ public class PubSaSeCompareDiff
[ExporterHeader(DisplayName = "发运数量")]
public decimal SeQty { set; get; }
/// <summary>
/// 差异数量
/// </summary>
[ExporterHeader(DisplayName = "差异数量")]
public decimal DiffQty { set; get; }
}

3
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs

@ -59,6 +59,7 @@ namespace Win.Sfs.SettleAccount
#endregion 基础数据
#region 北汽结算
builder.ConfigureTaskJob(options);
builder.ConfigureBBAC_CAN_SA(options);
builder.ConfigureBBAC_CAN_SA_DETAIL(options);
@ -1114,7 +1115,7 @@ namespace Win.Sfs.SettleAccount
{
b.ToTable($"{options.TablePrefix}_VmiBalance", options.Schema);
b.ConfigureByConvention();
b.HasAlternateKey(o => new { o.PN, o.LU });
b.HasAlternateKey(o => new { o.ErpToLoc, o.PartCode, o.LU });
});
builder.Entity<VmiLog>(b =>

4411
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230720012742_vmi2.Designer.cs

File diff suppressed because it is too large

227
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230720012742_vmi2.cs

@ -0,0 +1,227 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class vmi2 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropUniqueConstraint(
name: "AK_Set_VmiBalance_PN_LU",
table: "Set_VmiBalance");
migrationBuilder.DeleteData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("6efe1947-a242-4d20-b633-20b0f716a782"));
migrationBuilder.DropColumn(
name: "PNType",
table: "Set_VmiBalance");
migrationBuilder.RenameColumn(
name: "Type",
table: "Set_VmiBalance",
newName: "VinCode");
migrationBuilder.RenameColumn(
name: "PN",
table: "Set_VmiBalance",
newName: "PartCode");
migrationBuilder.AddColumn<string>(
name: "CreatedBy",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "CreatedDate",
table: "Set_VmiLog",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "OrderNumber",
table: "Set_VmiLog",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "CodeType",
table: "Set_VmiBalance",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "CreationTime",
table: "Set_VmiBalance",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "Desc",
table: "Set_VmiBalance",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ErpToLoc",
table: "Set_VmiBalance",
type: "nvarchar(450)",
nullable: false,
defaultValue: "");
migrationBuilder.AddColumn<string>(
name: "MatchNumber",
table: "Set_VmiBalance",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "PjsNum",
table: "Set_VmiBalance",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ProType",
table: "Set_VmiBalance",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "SeqNumber",
table: "Set_VmiBalance",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "ShippingDate",
table: "Set_VmiBalance",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "Tmpe4",
table: "Set_VmiBalance",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "UniqueCode",
table: "Set_VmiBalance",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddUniqueConstraint(
name: "AK_Set_VmiBalance_ErpToLoc_PartCode_LU",
table: "Set_VmiBalance",
columns: new[] { "ErpToLoc", "PartCode", "LU" });
migrationBuilder.InsertData(
table: "Set_JobItem",
columns: new[] { "Id", "ConcurrencyStamp", "Cron", "IsRunning", "Name", "Service" },
values: new object[] { new Guid("579e2b8d-c9ec-4754-9520-e4475aea2a73"), null, "0 0 8 26 *", false, "库存快照", "Win.Sfs.SettleAccount.Entities.BQ.VmiService" });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropUniqueConstraint(
name: "AK_Set_VmiBalance_ErpToLoc_PartCode_LU",
table: "Set_VmiBalance");
migrationBuilder.DeleteData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("579e2b8d-c9ec-4754-9520-e4475aea2a73"));
migrationBuilder.DropColumn(
name: "CreatedBy",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "CreatedDate",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "OrderNumber",
table: "Set_VmiLog");
migrationBuilder.DropColumn(
name: "CodeType",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "CreationTime",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "Desc",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "ErpToLoc",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "MatchNumber",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "PjsNum",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "ProType",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "SeqNumber",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "ShippingDate",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "Tmpe4",
table: "Set_VmiBalance");
migrationBuilder.DropColumn(
name: "UniqueCode",
table: "Set_VmiBalance");
migrationBuilder.RenameColumn(
name: "VinCode",
table: "Set_VmiBalance",
newName: "Type");
migrationBuilder.RenameColumn(
name: "PartCode",
table: "Set_VmiBalance",
newName: "PN");
migrationBuilder.AddColumn<int>(
name: "PNType",
table: "Set_VmiBalance",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddUniqueConstraint(
name: "AK_Set_VmiBalance_PN_LU",
table: "Set_VmiBalance",
columns: new[] { "PN", "LU" });
migrationBuilder.InsertData(
table: "Set_JobItem",
columns: new[] { "Id", "ConcurrencyStamp", "Cron", "IsRunning", "Name", "Service" },
values: new object[] { new Guid("6efe1947-a242-4d20-b633-20b0f716a782"), null, "0 0 8 26 *", false, "库存快照", "Win.Sfs.SettleAccount.Entities.BQ.VmiService" });
}
}
}

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

@ -3319,7 +3319,7 @@ namespace Win.Sfs.SettleAccount.Migrations
b.HasData(
new
{
Id = new Guid("6efe1947-a242-4d20-b633-20b0f716a782"),
Id = new Guid("579e2b8d-c9ec-4754-9520-e4475aea2a73"),
Cron = "0 0 8 26 *",
IsRunning = false,
Name = "库存快照",
@ -3361,26 +3361,57 @@ namespace Win.Sfs.SettleAccount.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("CodeType")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2");
b.Property<string>("Desc")
.HasColumnType("nvarchar(max)");
b.Property<string>("ErpToLoc")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<string>("LU")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<string>("PN")
b.Property<string>("MatchNumber")
.HasColumnType("nvarchar(max)");
b.Property<string>("PartCode")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<int>("PNType")
.HasColumnType("int");
b.Property<string>("PjsNum")
.HasColumnType("nvarchar(max)");
b.Property<string>("ProType")
.HasColumnType("nvarchar(max)");
b.Property<decimal>("Qty")
.HasColumnType("decimal(18,2)");
b.Property<string>("Type")
b.Property<string>("SeqNumber")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("ShippingDate")
.HasColumnType("datetime2");
b.Property<string>("Tmpe4")
.HasColumnType("nvarchar(max)");
b.Property<string>("UniqueCode")
.HasColumnType("nvarchar(max)");
b.Property<string>("VinCode")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasAlternateKey("PN", "LU");
b.HasAlternateKey("ErpToLoc", "PartCode", "LU");
b.ToTable("Set_VmiBalance");
});
@ -3424,6 +3455,15 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<Guid>("CategoryId")
.HasColumnType("uniqueidentifier");
b.Property<string>("CreatedBy")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreatedDate")
.HasColumnType("datetime2");
b.Property<string>("OrderNumber")
.HasColumnType("nvarchar(max)");
b.Property<string>("SessionId")
.HasColumnType("nvarchar(max)");

4
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Report/PubSaSeCompareDapperRepository.cs

@ -47,8 +47,8 @@ public class PubSaSeCompareDapperRepository : DapperRepository<SettleAccountDbCo
'' MateType,
B.Price FixPrice
FROM
(SELECT SUM(QTY) SEQty,LU,PN,WmsBillNum,ShippingDate FROM Set_PUB_SE_DETAIL WHERE BusinessType = {businessType} GROUP BY LU,PN,WmsBillNum,ShippingDate) A
FULL JOIN (SELECT SUM(QTY) SAQty,LU,PN,Price,SettleDate FROM Set_PUB_SA_DETAIL WHERE BusinessType = {businessType} GROUP BY LU,PN,Price,SettleDate) B ON A.LU= B.LU AND A.PN= B.PN
(SELECT SUM(QTY) SEQty,LU,PN,MAX(WmsBillNum) WmsBillNum,MAX(ShippingDate) ShippingDate FROM Set_PUB_SE_DETAIL WHERE BusinessType = {businessType} GROUP BY LU,PN) A
FULL JOIN (SELECT SUM(QTY) SAQty,LU,PN,MAX(Price) Price,MAX(SettleDate) SettleDate FROM Set_PUB_SA_DETAIL WHERE BusinessType = {businessType} GROUP BY LU,PN) B ON A.LU= B.LU AND A.PN= B.PN
ORDER BY B.SettleDate DESC;
";
return DbConnection.Query<PubSaSeCompareDiff>(strSqlText, null, null, true, 1200, null).ToList();

188
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/PubSaSeCompareExportService.cs

@ -1,20 +1,27 @@
using System;
using System.Collections.Generic;
using Magicodes.ExporterAndImporter.Excel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using EmptyFiles;
using Magicodes.ExporterAndImporter.Excel;
using Microsoft.OpenApi.Extensions;
using NetTopologySuite.Operation.Buffer;
using OfficeOpenXml.FormulaParsing.Excel.Functions.DateTime;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
using SettleAccount.Domain.BQ;
using Shouldly;
using TaskJob.EventArgs;
using TaskJob.Interfaces;
using Volo.Abp.BlobStoring;
using Volo.Abp.DependencyInjection;
using Volo.Abp.ObjectMapping;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.Shared.RepositoryBase;
using SettleAccount.Domain.BQ;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
using Shouldly;
using Volo.Abp.BlobStoring;
using Win.Sfs.SettleAccount.Reports;
using Newtonsoft.Json.Schema;
using Win.Sfs.SettleAccount;
using Win.Sfs.SettleAccount.Entities.Prices;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Enums;
using Win.Sfs.SettleAccount.Reports;
using Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report;
using Win.Sfs.Shared.RepositoryBase;
namespace SettleAccount.Job.Services.Report
{
@ -42,6 +49,8 @@ namespace SettleAccount.Job.Services.Report
private readonly IBlobContainer<MyFileContainer> _fileContainer;
private readonly IObjectMapper _objectMapper;
/// <summary>
/// 构造
/// </summary>
@ -49,51 +58,178 @@ namespace SettleAccount.Job.Services.Report
INormalEfCoreRepository<PUB_SE_DETAIL, Guid> pubSeDetailRepository,
INormalEfCoreRepository<TB_RePartsRelationship, Guid> tbRePartsRelationshipRepository,
PubSaSeCompareDapperRepository pubSaSeCompareDapperRepository,
IBlobContainer<MyFileContainer> fileContainer)
IBlobContainer<MyFileContainer> fileContainer,
IObjectMapper objectMapper)
{
_pubSaDetailRepository = pubSaDetailRepository;
_pubSeDetailRepository = pubSeDetailRepository;
_tbRePartsRelationshipRepository = tbRePartsRelationshipRepository;
_pubSaSeCompareDapperRepository = pubSaSeCompareDapperRepository;
_fileContainer = fileContainer;
_objectMapper = objectMapper;
}
/// <summary>
/// 导出
/// 输出报表
/// 结算核对明细输出
/// 结算核对汇总输出
/// 有结算有发货明细输出
/// 有结算有发货汇总输出
/// 有结算无发货明细输出
/// 有结算无发货汇总输出
/// </summary>
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property)
{
var version = property.Where(p => p.Name == "Version").FirstOrDefault().Value;
var businessType = property.Where(t => t.Name == "BusinessType").FirstOrDefault().Value;
var lu = property.Where(p => p.Name == "LU").FirstOrDefault().Value;
var pn = property.Where(p => p.Name == "PN").FirstOrDefault().Value;
var businessTypeDisplayName = businessType.ToString();
DisplayAttribute attributeOfType = ((EnumBusinessType)Enum.Parse(typeof(EnumBusinessType), businessType)).GetAttributeOfType<DisplayAttribute>();
if (attributeOfType != null)
{
businessTypeDisplayName = attributeOfType.Name;
}
var filename = exportName.FirstOrDefault();
var pubSaSeCompareDiffs = _pubSaSeCompareDapperRepository.GetDetailDiffReportList(businessType);
pubSaSeCompareDiffs.ForEach(p =>
{
p.Category = (string.IsNullOrEmpty(p.SaLU), string.IsNullOrEmpty(p.SeLU)) switch
{
(false, false) => EnumPubSaSeCompareCategory.HaveSaHaveSe,
(false, true) => EnumPubSaSeCompareCategory.HaveSaNotHaveSe,
(true, false) => EnumPubSaSeCompareCategory.NotHaveSaHaveSe,
_ => EnumPubSaSeCompareCategory.None,
};
});
//有结算有发运
var haveSaHaveSe = new List<PubSaSeCompareDiff>();
var haveSaHaveSe = pubSaSeCompareDiffs.FindAll(t => t.Category == EnumPubSaSeCompareCategory.HaveSaHaveSe);
//有结算无发运
var haveSaNotHaveSe = new List<PubSaSeCompareDiff>();
var haveSaNotHaveSe = pubSaSeCompareDiffs.FindAll(t => t.Category == EnumPubSaSeCompareCategory.HaveSaNotHaveSe);
//无结算有发运
var notHaveSaHaveSe = new List<PubSaSeCompareDiff>();
var notHaveSaHaveSe = pubSaSeCompareDiffs.FindAll(t => t.Category == EnumPubSaSeCompareCategory.NotHaveSaHaveSe);
haveSaHaveSe = pubSaSeCompareDiffs.FindAll(t => !string.IsNullOrEmpty(t.SaLU) && !string.IsNullOrEmpty(t.SeLU));
haveSaNotHaveSe = pubSaSeCompareDiffs.FindAll(t => !string.IsNullOrEmpty(t.SaLU) && string.IsNullOrEmpty(t.SeLU));
notHaveSaHaveSe = pubSaSeCompareDiffs.FindAll(t => string.IsNullOrEmpty(t.SaLU) && !string.IsNullOrEmpty(t.SeLU));
haveSaHaveSe.ForEach(t => t.PrimitiveLU = t.ReplaceLU = t.SaLU);
haveSaNotHaveSe.ForEach(t => t.PrimitiveLU = t.ReplaceLU = t.SaLU);
notHaveSaHaveSe.ForEach(t => t.PrimitiveLU = t.ReplaceLU = t.SaLU);
#region 二次对比
//二次对比(替换零件号)
var repLUs = notHaveSaHaveSe.Select(t => t.SeLU).Distinct().ToList();
var tbRePartsRelationships = _tbRePartsRelationshipRepository.GetListAsync(t => repLUs.Contains(t.RepLU) && ((int)t.BusinessType).ToString() == businessType).Result;
var tbRePartsRelationships = _tbRePartsRelationshipRepository.GetListAsync(t => repLUs.Contains(t.RepLU) && ((int)t.BusinessType).ToString() == businessType).Result;
tbRePartsRelationships.ForEach(tbRePartsRelationship =>
{
notHaveSaHaveSe.FindAll(t => t.SeLU == tbRePartsRelationship.RepLU).ForEach(t =>
{
t.RepLU = t.SeLU;
t.SeLU = tbRePartsRelationship.LU;
t.ReplaceLU = tbRePartsRelationship.LU;
});
});
var haveSaNotHaveSeReplaceLU = haveSaNotHaveSe.Select(t => t.ReplaceLU);
var notHaveSaHaveSeReplaceLU = notHaveSaHaveSe.Select(t => t.ReplaceLU);
//此次匹配上的零件号
var secondMatchReplaceLU = notHaveSaHaveSeReplaceLU.Intersect(notHaveSaHaveSeReplaceLU);
//if (secondMatchReplaceLU)
//{
//}
#endregion
if (string.IsNullOrEmpty(lu) == false)
{
pubSaSeCompareDiffs = pubSaSeCompareDiffs.FindAll(p => p.SaLU == lu || p.SeLU == lu);
}
if (string.IsNullOrEmpty(pn) == false)
{
pubSaSeCompareDiffs = pubSaSeCompareDiffs.FindAll(p => p.SaPN == pn || p.SePN == pn);
}
//结算核对明细
var pubSaSeCompareDetailExports = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PubSaSeCompareDetailExport>>(pubSaSeCompareDiffs);
//结算核对汇总
var pubSaSeCompareSumExports = pubSaSeCompareDetailExports.GroupBy(p => p.ReplaceLU).Select(p => new PubSaSeCompareSumExport()
{
LU = p.Key,
MaterialDes = p.FirstOrDefault().MaterialDes,
SAQty = p.Sum(t => t.SAQty),
SEQty = p.Sum(t => t.SEQty)
}).ToList();
//有结算有发运
var haveSaHaveSeExports = pubSaSeCompareDetailExports.FindAll(t => t.Category == EnumPubSaSeCompareCategory.HaveSaHaveSe);
//有结算有发运汇总
var haveSaHaveSeSumExports = haveSaHaveSeExports.GroupBy(p => p.ReplaceLU).Select(p => new PubSaSeCompareSumExport()
{
LU = p.Key,
MaterialDes = p.FirstOrDefault().MaterialDes,
SAQty = p.Sum(t => t.SAQty),
SEQty = p.Sum(t => t.SEQty)
}).ToList();
//有结算无发运
var haveSaNotHaveSeExports = pubSaSeCompareDetailExports.FindAll(t => t.Category == EnumPubSaSeCompareCategory.HaveSaNotHaveSe);
//有结算无发运
var haveSaNotHaveSeSumExports = haveSaHaveSeExports.GroupBy(p => p.ReplaceLU).Select(p => new PubSaSeCompareSumExport()
{
LU = p.Key,
MaterialDes = p.FirstOrDefault().MaterialDes,
SAQty = p.Sum(t => t.SAQty),
SEQty = p.Sum(t => t.SEQty)
}).ToList();
//无结算有发运
var notHaveSaHaveSeExports = pubSaSeCompareDetailExports.FindAll(t => t.Category == EnumPubSaSeCompareCategory.NotHaveSaHaveSe);
//无结算有发运
var notHaveSaHaveSeSumExports = haveSaHaveSeExports.GroupBy(p => p.ReplaceLU).Select(p => new PubSaSeCompareSumExport()
{
LU = p.Key,
MaterialDes = p.FirstOrDefault().MaterialDes,
SAQty = p.Sum(t => t.SAQty),
SEQty = p.Sum(t => t.SEQty)
}).ToList();
#region MyRegion
#endregion
ExcelExporter excelExporter = new ExcelExporter();
var result = excelExporter
.Append(pubSaSeCompareDetailExports, $"{businessTypeDisplayName}结算核对明细输出")
.SeparateBySheet()
.Append(pubSaSeCompareSumExports, $"{businessTypeDisplayName}结算核对汇总输出")
.SeparateBySheet()
.Append(haveSaHaveSeExports, $"{businessTypeDisplayName}有结算有发货明细输出")
.SeparateBySheet()
.Append(haveSaHaveSeSumExports, $"{businessTypeDisplayName}有结算有发货汇总输出")
.SeparateBySheet()
.Append(haveSaNotHaveSeExports, $"{businessTypeDisplayName}有结算无发货明细输出")
.SeparateBySheet()
.Append(haveSaNotHaveSeSumExports, $"{businessTypeDisplayName}有结算无发货汇总输出")
.SeparateBySheet()
.ExportAppendDataAsByteArray();
result.ShouldNotBeNull();
_fileContainer.SaveAsync(filename, result.Result, true);
return id.ToString();
//var add = from item1 in pubSaSeCompareDiffs
// join item2 in pubSaSeCompareDiffs
// on new { item1.SaLU, item1.SaPN }
// equals new { item2.SeLU, item2.SePN }
// into temp
// from itm3 in temp.DefaultIfEmpty()
// where itm3 == null
// select item1;
@ -115,20 +251,8 @@ namespace SettleAccount.Job.Services.Report
//var query = BlobProviderSelectorExtensions
ExcelExporter excelExporter = new ExcelExporter();
var result = excelExporter
.Append(pubSaSeCompareDiffs, "汇总表")
.SeparateBySheet()
.Append(haveSaHaveSe, "有结算有发运")
.SeparateBySheet()
.Append(haveSaNotHaveSe, "有结算无发运")
.SeparateBySheet()
.Append(notHaveSaHaveSe, "无结算有发运")
.ExportAppendDataAsByteArray();
result.ShouldNotBeNull();
//_fileContainer.SaveAsync(filename, result.Result, true);
return id.ToString();
//结算

22
code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobAutoMapperProfile.cs

@ -0,0 +1,22 @@
using AutoMapper;
using Win.Sfs.SettleAccount.Reports;
namespace SettleAccount.Job
{
public class SettleAccountJobAutoMapperProfile : Profile
{
public SettleAccountJobAutoMapperProfile()
{
CreateMapPubSaSeCompare();
}
/// <summary>
/// Pub结算与发运对比
/// </summary>
private void CreateMapPubSaSeCompare()
{
CreateMap<PubSaSeCompareDiff, PubSaSeCompareDetailExport>()
.ForMember(x => x.ReplaceLU, y => y.MapFrom(y => y.ReplaceLU));
}
}
}

9
code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs

@ -36,6 +36,7 @@ namespace Win.Sfs.SettleAccount
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
ConfigureAutoMapper();
GlobalJobFilters.Filters.Add(new AutomaticRetryAttribute{ Attempts = 0});
context.Services.AddTransient<PubSaSeCompareExportService>();
@ -263,5 +264,13 @@ namespace Win.Sfs.SettleAccount
});
}
/// <summary>
/// AutoMapper
/// </summary>
private void ConfigureAutoMapper()
{
Configure<AbpAutoMapperOptions>(options => { options.AddMaps<SettleAccountJobModule>(); });
}
}
}

Loading…
Cancel
Save