学 赵 1 year ago
parent
commit
db992899ec
  1. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
  2. 7
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/index.js
  3. 28
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
  4. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/lib/element-plus/index.css
  5. 60
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan-detail.js
  6. 46
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js
  7. 11
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_ba_service.js
  8. 52
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_sa_detail_service.js
  9. 18
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_sa_service.js
  10. 655
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  11. 5
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/index.js
  12. 37
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/utils.js
  13. 1
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/styles/site.css
  14. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/input/bj_pub_sa_detail_service.js
  15. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/input/bj_pub_sa_service.js
  16. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/input/in_pub_sa_detail_service.js
  17. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/input/in_pub_sa_service.js
  18. 29
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/jie-suan.js
  19. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/input/bbac_sa_detail_service.js
  20. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/input/bbac_sa_service.js
  21. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/input/hbpo_sa_detail_service.js
  22. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/input/hbpo_sa_service.js
  23. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/input/bbac_jit_pub_sa_detail_service.js
  24. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/input/bbac_jit_pub_sa_service.js
  25. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/input/hbpo_jit_pub_sa_detail_service.js
  26. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/input/hbpo_jit_pub_sa_service.js
  27. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-bbac/input/bbac_md_pub_sa_detail_service.js
  28. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-bbac/input/bbac_md_pub_sa_service.js
  29. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/input/hbpo_md_pub_sa_detail_service.js
  30. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/input/hbpo_md_pub_sa_service.js
  31. 47
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/JisEdiSeCompareRequestDto.cs
  32. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs
  33. 46
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/EdiSeCompareService.cs
  34. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs
  35. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisBBACSeEdiCompareAppService.cs
  36. 18
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeEdiCompareAppService.cs
  37. 17
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JitSeSyncAppService.cs
  38. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs
  39. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/EntityBase.cs
  40. 13
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SA.cs
  41. 9
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SA.cs
  42. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_SA.cs
  43. 87
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_SE_DETAIL.cs
  44. 39
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIS_RECORD.cs
  45. 57
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIT_RECORD.cs
  46. 30
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_OTHER_RECORD.cs
  47. 147
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/JisBBACEidSeCompareReport.cs
  48. 5422
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230815013824_20230815-1.Designer.cs
  49. 87
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230815013824_20230815-1.cs
  50. 5425
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230815023057_20230815-2.Designer.cs
  51. 67
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230815023057_20230815-2.cs
  52. 28
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs
  53. 7
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountNormalEfCoreRepository.cs
  54. 46
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/BBACEdiSeCompareExportService.cs
  55. 294
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACEdiSeCompareExportService.cs
  56. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisHBPOEdiSeCompareExportService.cs
  57. 12
      code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs

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

@ -14,7 +14,7 @@ export default {
<template v-else-if="schema.input==='date'">{{dayjs(model[prop]).format('YYYY-MM-DD')}}</template>
<template v-else-if="schema.input==='datetime'">{{dayjs(model[prop]).format('YYYY-MM-DD HH:mm:ss')}}</template>
<template v-else-if="schema.input==='password'">******</template>
<template v-else-if="schema.input==='select'">{{options[model[prop]]?.label}}</template>
<template v-else-if="schema.input==='select'||schema.input==='tabs'">{{options[model[prop]]?.label}}</template>
<template v-else>{{model[prop]}}</template>
</template>
</template>
@ -30,6 +30,13 @@ export default {
<el-option v-for="item in options" :key="item.key" :label="item.label" :value="item.value" />
</el-select>
</template>
<template v-else-if="getInput(schema)==='tabs'">
<el-tabs type="card" v-model="model[prop]" style="height:32px;margin:0;" class="form">
<el-tab-pane key="all" label="全部" :value="null" />
<el-tab-pane v-for="item in options" :key="item.key" :label="item.label" :name="item.value" />
</el-tabs>
<br />
</template>
<template v-else-if="getInput(schema)==='month'||getInput(schema)==='datetime'">
<el-date-picker
v-model="model[prop]"
@ -90,6 +97,12 @@ export default {
</template>
</template>
`,
styles: html`<style>
.form .el-tabs__header,
.form .el-tabs__item {
height: 32px;
}
</style>`,
props: ["modelValue", "schema", "prop", "isReadOnly", "mode"],
emit: ["update:modelValue"],
setup(props, context) {

7
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/index.js

@ -9,7 +9,7 @@ export default {
template: html`<div v-loading="loading">
<el-form ref="formRef" :model="model" label-width="auto" :inline="inline">
<template v-if="schema && schema.properties">
<template v-for="(value, prop) in schema.properties">
<template v-for="(value, prop) in getProperties(schema.properties)">
<app-form-item
:parentSchema="schema"
:schema="value"
@ -70,12 +70,15 @@ export default {
console.log(error);
}
};
// expose
const getProperties = (properties) => {
return Object.fromEntries(Object.entries(properties).sort(([, a], [, b]) => a.order - b.order));
};
context.expose({ validate, reset });
return {
model,
formRef,
loading,
getProperties,
errors,
reset,
submit,

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

@ -45,7 +45,7 @@ export default {
:class="item.meta.htmlClass??'el-button--primary'"
v-if="item.meta.isTop"
@click="click(item,selectedRows)"
:disabled="item.meta.disabled && item.meta.disabled(selectedRows)"
:disabled="item.meta.disabled && item.meta.disabled.constructor === Function && item.meta.disabled(selectedRows,queryModel)"
>
<el-icon v-if="item.meta.icon"><svg-icon :name="item.meta.icon" /></el-icon>
<span>{{item.meta.title}}</span>
@ -94,7 +94,7 @@ export default {
<template v-else-if="item.oneToMany">
<el-table-column :prop="key" :label="item.title">
<template #default="scope">
<el-link type="primary" @click="showList(scope.row[key],item.oneToMany)">
<el-link type="primary" @click="showList({[key]:scope.row[key]},item.oneToMany,item.config)">
<app-form-input mode="details" :schema="item" :prop="key" v-model="scope.row" />
</el-link>
</template>
@ -121,6 +121,12 @@ export default {
</template>
</el-table-column>
</template>
<template v-if="key==='extraProperties'">
<el-table-column v-for="item in scope.row['extraProperties']">
<template #header="scope">{{$t(item.key)??item.key}}</template>
<template #default="scope"> {{item.value}} </template>
</el-table-column>
</template>
</template>
</template>
<slot name="columns"></slot>
@ -627,6 +633,16 @@ export default {
}
} else if (item.meta.pattern === "file") {
window.open(getUrl(`settleaccount/getblobfile/download/${rows[0]["downFileName"]}`));
} else if ((item.meta.pattern = "row")) {
const url = config.edit.exportUrl;
const method = config.edit.exportMethod ?? "POST";
const postData = {
filters: [{ logic: "and", action: "equal", column: item.meta.key, value: rows[0][item.meta.key] }],
};
const response = await request(url, postData, { method });
if (!response.errors) {
window.open(getUrl(`settleaccount/getblobfile/download/${response.data}`));
}
} else {
console.log(item);
}
@ -744,9 +760,13 @@ export default {
dialogVisible.value = false;
}
};
const showList = (value, nav, config) => {
const showList = async (value, nav, config) => {
if (!subDrawer.value) {
const targetRoute = router.getRoutes().find((o) => o.meta?.path === nav);
const targetRoute = router.getRoutes().find((o) => o.path === nav);
if (config.constructor === String) {
const value = (await import(config)).default;
config = value.constructor === Function ? value() : value;
}
subListQuery.value = {
query: value,
buttons: targetRoute.meta.children,

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/lib/element-plus/index.css

File diff suppressed because one or more lines are too long

60
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-bbac/input/bbac_sa_service.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan-detail.js

@ -1,41 +1,43 @@
import version from "../../version.js";
import businessType from "../../businessType.js";
import version from "../version.js";
import state from "../state.js";
const schema = {
title: "JIS结算数据",
title: "结算数据",
type: "object",
properties: {
version,
billNum: {
title: "结算单据",
state,
settleDate: {
title: "结算日期",
type: "string",
input: "dateTime",
},
dnBillNum: {
title: "出库单号",
groupNum: {
title: "结算分组号",
type: "string",
},
state: {
title: "状态",
deliveryDate: {
title: "到货日期",
type: "string",
input: "dateTime",
},
recordCount: {
title: "明细记录行数",
lu: {
title: "客户零件号",
type: "string",
},
site: {
title: "工厂地点",
qty: {
title: "结算数量",
type: "number",
},
pn: {
title: "生产号",
type: "string",
},
businessType,
},
};
const queryUrl = "settleaccount/bbac_sa_service/get-list";
const deleteUrl = "settleaccount/bbac_sa_service/delete-list";
const importUrl = "settleaccount/bbac_sa_service/import";
const queryUrl = "settleaccount/pub_sa_detail_service/get-list";
const queryMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
export default function () {
return {
@ -44,7 +46,7 @@ export default function () {
method: queryMethod,
hasFilter: true,
schema: {
title: "JIS结算数据",
title: "结算数据",
type: "object",
properties: {
filters: {
@ -68,15 +70,7 @@ export default function () {
},
},
},
default: [
{
logic: "and",
column: "version",
action: "equal",
value: null,
readOnly: true,
},
],
default: [],
},
skipCount: {
hidden: true,
@ -89,6 +83,10 @@ export default function () {
sorting: {
hidden: true,
},
businessType: {
hidden: true,
default: 0,
},
},
},
},
@ -96,10 +94,6 @@ export default function () {
schema: schema,
},
edit: {
deleteUrl,
importUrl,
deleteMethod,
importMethod,
schema: schema,
},
};

46
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/jis-hbpo/input/hbpo_sa_service.js → code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/jie-suan.js

@ -1,48 +1,44 @@
import version from "../../version.js";
import businessType from "../../businessType.js";
import state from "../../state.js";
import version from "../version.js";
import state from "../state.js";
const schema = {
title: "JIS结算数据",
title: "结算数据",
type: "object",
properties: {
version,
billNum: {
title: "结算单据",
type: "string",
},
dnBillNum: {
title: "出库单号",
type: "string",
},
state,
recordCount: {
title: "明细记录行数",
billNum: {
title: "结算单号",
type: "string",
oneToMany: "/input/jie-suan/detail",
config: "/models/input/jie-suan-detail.js",
},
site: {
title: "工厂地点",
businessType: {
title: "业务类型",
type: "string",
hidden: true,
default: 0,
},
businessType,
},
};
const queryUrl = "settleaccount/hbpo_sa_service/get-list";
const deleteUrl = "settleaccount/hbpo_sa_service/delete-list";
const importUrl = "settleaccount/hbpo_sa_service/import";
export default function (service = "pub_sa_service", detailService = "pub_sa_detail_service") {
const queryUrl = `settleaccount/${service}/get-list`;
const deleteUrl = `settleaccount/${service}/delete-list`;
const importUrl = `settleaccount/${service}/import`;
const exportUrl = `settleaccount/${detailService}/export`;
const queryMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
const exportMethod = "POST";
export default function () {
return {
query: {
url: queryUrl,
method: queryMethod,
hasFilter: true,
schema: {
title: "JIS结算数据",
title: "结算数据",
type: "object",
properties: {
filters: {
@ -87,6 +83,10 @@ export default function () {
sorting: {
hidden: true,
},
businessType: {
hidden: true,
default: 0,
},
},
},
},
@ -96,8 +96,10 @@ export default function () {
edit: {
deleteUrl,
importUrl,
exportUrl,
deleteMethod,
importMethod,
exportMethod,
schema: schema,
},
};

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

@ -1,8 +1,10 @@
import version from "./version.js";
import { state2 as state, state3 } from "./state.js";
import { state2, state3 } from "./state.js";
import businessType from "./businessType.js";
import invoiceState from "./invoiceState.js";
const state = Object.assign({}, state2);
state.input = "tabs";
const schema = {
title: "商务审批",
type: "object",
@ -96,6 +98,13 @@ export default function () {
value: null,
readOnly: true,
},
{
logic: "and",
column: "state",
action: "equal",
value: null,
readOnly: true,
},
],
},
skipCount: {

52
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_sa_detail_service.js

@ -7,56 +7,30 @@ const schema = {
properties: {
version,
state,
keyCode: {
title: "LU+ASN单号",
type: "string",
},
billNum: {
title: "关联结算单号",
settleDate: {
title: "结算日期",
type: "string",
input: "dateTime",
},
lu: {
title: "零件号",
groupNum: {
title: "结算分组号",
type: "string",
},
pn: {
title: "发货单号",
deliveryDate: {
title: "到货日期",
type: "string",
input: "dateTime",
},
site: {
title: "工厂地点",
lu: {
title: "客户零件号",
type: "string",
},
qty: {
title: "结算数量",
type: "decimal",
},
price: {
title: "单价",
type: "decimal",
},
invGroupNum: {
title: "发票分组号",
type: "string",
type: "number",
},
settleDate: {
title: "结算日期(收货日期",
type: "Datetime",
},
extend1: {
title: "扩展字段1",
type: "string",
},
extend2: {
title: "扩展字段2",
type: "string",
},
extend3: {
title: "扩展字段3",
type: "string",
},
groupNum: {
title: "结算分组",
pn: {
title: "生产号",
type: "string",
},
},

18
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/pub_sa_service.js

@ -5,11 +5,11 @@ const schema = {
title: "结算数据",
type: "object",
properties: {
version,
state,
billNum: {
title: "结算单号",
type: "string",
oneToMany: "/input/jie-suan/detail",
config: "/models/input/jie-suan-detail.js",
},
businessType: {
title: "业务类型",
@ -17,6 +17,20 @@ const schema = {
hidden: true,
default: 0,
},
dnBillNum: {
title: "出库单号",
type: "string",
},
recordCount: {
title: "明细记录行数",
type: "string",
},
site: {
title: "工厂地点",
type: "string",
},
state,
version,
},
};

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

@ -1,87 +1,30 @@
import createRoute, { createPage, createButton } from "./utils.js";
function createJieSuanShuJu(path, business, client, title = "结算数据") {
return {
...createPage(path, `title=${title}&businessType=${business}&client=${client}`),
component: "/input/jie-suan",
children: [
createButton("query", "title=查询&isTop=true"),
createButton("import", "title=导入&isTop=true"),
createButton("export", "title=导出&pattern=row&key=billNum"),
createButton("delete", "title=删除&isTop=true"),
],
};
}
export default [
{
path: "jis-bbac",
meta: {
type: "group",
title: "JIS-BBAC",
icon: "folder",
},
children: [
{
path: "input",
meta: {
type: "group",
title: "数据输入",
icon: "folder",
...createPage("input/jie-suan/detail", "title=结算数据明细&isHidden=true"),
children: [createButton("query", "title=查询&isTop=true")],
},
children: [
{
path: "bbac_sa_service",
meta: {
type: "page",
title: "JIS结算数据",
icon: "file",
},
...createRoute("jis-bbac", "title=JIS-BBAC"),
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "import",
meta: {
type: "button",
title: "导入",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
],
},
{
path: "bbac_sa_detail_service",
meta: {
type: "page",
title: "JIS结算数据明细",
icon: "file",
isHidden: true,
},
...createRoute("input", "title=数据输入"),
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
createJieSuanShuJu("bbac_sa_service", "JisBBAC", "bbac"),
{
path: "bbac_se_detail_service",
meta: {
@ -402,6 +345,7 @@ export default [
title: "退回",
icon: "file",
isTop: true,
disabled: "(rows,query)=>true",
},
},
{
@ -549,73 +493,7 @@ export default [
icon: "folder",
},
children: [
{
path: "hbpo_sa_service",
meta: {
type: "page",
title: "JIS结算数据",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "import",
meta: {
type: "button",
title: "导入",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
],
},
{
path: "hbpo_sa_detail_service",
meta: {
type: "page",
title: "JIS结算数据明细",
icon: "file",
isHidden: true,
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
createJieSuanShuJu("hbpo_sa_service", "JisHBPO", "hbpo"),
{
path: "hbpo_se_detail_service",
meta: {
@ -1091,73 +969,7 @@ export default [
icon: "folder",
},
children: [
{
path: "bbac_jit_pub_sa_service",
meta: {
type: "page",
title: "BBAC结算数据",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "import",
meta: {
type: "button",
title: "导入",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
],
},
{
path: "bbac_jit_pub_sa_detail_service",
meta: {
type: "page",
title: "BBAC结算数据明细",
icon: "file",
isHidden: true,
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
createJieSuanShuJu("bbac_jit_pub_sa_service", "ZhiGongJianBBAC", "bbac"),
{
path: "bbac_jit_pub_se_detail_service",
meta: {
@ -1551,11 +1363,12 @@ export default [
icon: "folder",
},
children: [
createJieSuanShuJu("hbpo_jit_pub_sa_service", "ZhiGongJianHBPO", "hbpo"),
{
path: "hbpo_jit_pub_sa_service",
path: "hbpo_jit_pub_se_detail_service",
meta: {
type: "page",
title: "HBPO结算数据",
title: "HBPO发运数据",
icon: "file",
},
children: [
@ -1569,32 +1382,42 @@ export default [
},
},
{
path: "import",
path: "sync",
meta: {
type: "button",
title: "导入",
title: "手动同步",
icon: "file",
isTop: true,
},
},
{
path: "delete",
path: "export",
meta: {
type: "button",
title: "删除",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
],
},
{
path: "contrast",
meta: {
type: "group",
title: "数据对比",
icon: "folder",
},
children: [
{
path: "hbpo_jit_pub_sa_detail_service",
path: "hbpo_jit_pub_sa_detail_jobservice",
meta: {
type: "page",
title: "HBPO结算数据明细",
title: "HBPO发运与结算比对",
icon: "file",
isHidden: true,
},
children: [
{
@ -1607,39 +1430,28 @@ export default [
},
},
{
path: "export",
path: "compare",
meta: {
type: "button",
title: "导出",
title: "生成对比",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
{
path: "hbpo_jit_pub_se_detail_service",
meta: {
type: "page",
title: "HBPO发运数据",
icon: "file",
},
children: [
{
path: "query",
path: "delete",
meta: {
type: "button",
title: "查询",
title: "删除",
icon: "file",
isTop: true,
},
},
{
path: "sync",
path: "update-data",
meta: {
type: "button",
title: "手动同步",
title: "更新结算数据状态",
icon: "file",
isTop: true,
},
@ -1648,10 +1460,9 @@ export default [
path: "export",
meta: {
type: "button",
title: "导出",
title: "下载",
icon: "file",
isTop: true,
pattern: "paged",
pattern: "file",
},
},
],
@ -1659,80 +1470,15 @@ export default [
],
},
{
path: "contrast",
path: "settlement",
meta: {
type: "group",
title: "数据对比",
title: "结算开票",
icon: "folder",
},
children: [
{
path: "hbpo_jit_pub_sa_detail_jobservice",
meta: {
type: "page",
title: "HBPO发运与结算比对",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "compare",
meta: {
type: "button",
title: "生成对比",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
{
path: "update-data",
meta: {
type: "button",
title: "更新结算数据状态",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "下载",
icon: "file",
pattern: "file",
},
},
],
},
],
},
{
path: "settlement",
meta: {
type: "group",
title: "结算开票",
icon: "folder",
},
children: [
{
path: "hbpo_jit_pub_can_sa_service",
path: "hbpo_jit_pub_can_sa_service",
meta: {
type: "page",
title: "可结算单",
@ -2021,83 +1767,7 @@ export default [
icon: "file",
},
children: [
{
path: "bbac_md_pub_sa_service",
meta: {
type: "page",
title: "结算数据",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "import",
meta: {
type: "button",
title: "导入",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
{
path: "bbac_md_pub_sa_detail_service",
meta: {
type: "page",
title: "结算数据明细",
icon: "file",
isHidden: true,
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
createJieSuanShuJu("bbac_md_pub_sa_service", "MaiDanJianBBAC", "bbac"),
{
path: "bbac_md_pub_se_detail_service",
meta: {
@ -2221,83 +1891,7 @@ export default [
icon: "file",
},
children: [
{
path: "hbpo_md_pub_sa_service",
meta: {
type: "page",
title: "结算数据",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "import",
meta: {
type: "button",
title: "导入",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
{
path: "hbpo_md_pub_sa_detail_service",
meta: {
type: "page",
title: "结算数据明细",
icon: "file",
isHidden: true,
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
createJieSuanShuJu("hbpo_md_pub_sa_service", "MaiDanJianHBPO", "hbpo"),
{
path: "hbpo_md_pub_se_detail_service",
meta: {
@ -2693,73 +2287,7 @@ export default [
icon: "folder",
},
children: [
{
path: "bj_pub_sa_service",
meta: {
type: "page",
title: "结算数据",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "import",
meta: {
type: "button",
title: "导入",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
],
},
{
path: "bj_pub_sa_detail_service",
meta: {
type: "page",
title: "结算数据明细",
icon: "file",
isHidden: true,
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
createJieSuanShuJu("bj_pub_sa_service", "BeiJian", "bbac"),
{
path: "bj_pub_se_detail_service",
meta: {
@ -3124,73 +2652,7 @@ export default [
icon: "folder",
},
children: [
{
path: "in_pub_sa_service",
meta: {
type: "page",
title: "结算数据",
icon: "file",
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "import",
meta: {
type: "button",
title: "导入",
icon: "file",
isTop: true,
},
},
{
path: "delete",
meta: {
type: "button",
title: "删除",
icon: "file",
isTop: true,
},
},
],
},
{
path: "in_pub_sa_detail_service",
meta: {
type: "page",
title: "结算数据明细",
icon: "file",
isHidden: true,
},
children: [
{
path: "query",
meta: {
type: "button",
title: "查询",
icon: "file",
isTop: true,
},
},
{
path: "export",
meta: {
type: "button",
title: "导出",
icon: "file",
isTop: true,
pattern: "paged",
},
},
],
},
createJieSuanShuJu("in_pub_sa_service", "YinDuJian", "bbac"),
{
path: "in_pub_se_detail_service",
meta: {
@ -3665,7 +3127,6 @@ export default [
},
],
},
//实际采购成本,不知道起什么名
{
path: "cost",
meta: {

5
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/index.js

@ -101,10 +101,11 @@ const refreshRouter = async () => {
// component
if (o.meta?.type === "page") {
if (!o.component) {
o.component = o.path;
o.component = o.meta.path ?? o.path;
}
if (o.component.constructor === String) {
o.component = () => import(`../views${o.meta.path}.js`);
const name = o.component;
o.component = () => import(`../views${name}.js`);
}
}
// children

37
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/utils.js

@ -0,0 +1,37 @@
import qs from "../lib/qs/shim.js";
function createDefaultRoute(type = "group", icon = "folder", isHidden = false, isTop = false) {
return {
type,
icon,
isTop,
isHidden,
};
}
function createRoute(path, meta = null, component = null) {
return {
path,
component,
meta: Object.assign(createDefaultRoute(), qs.parse(meta)),
};
}
function createPage(path, meta = null, component = null) {
return {
path,
component,
meta: Object.assign(createDefaultRoute("page", "file"), qs.parse(meta)),
};
}
function createButton(path, meta = null, component = null) {
return {
path,
component,
meta: Object.assign(createDefaultRoute("button", "file"), qs.parse(meta)),
};
}
export default createRoute;
export { createPage, createButton };

1
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/styles/site.css

@ -97,6 +97,7 @@ a.logo {
.el-form--inline .el-form-item__content {
width: 192px;
height: 32px;
}
.el-table .cell {

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/input/bj_pub_sa_detail_service.js

@ -1,15 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_sa_detail_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default="BeiJian";
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/bj/input/bj_pub_sa_service.js

@ -1,16 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_sa_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default="BeiJian";
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/input/in_pub_sa_detail_service.js

@ -1,16 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_sa_detail_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default = "YinDuJian";
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/in/input/in_pub_sa_service.js

@ -1,16 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/pub_sa_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default = "YinDuJian";
return { config, onCommand };
},
};

29
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/input/jie-suan.js

@ -0,0 +1,29 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import { useRoute } from "vue-router";
import useConfig from "../../models/input/jie-suan.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
let config = null;
const route = useRoute();
const businessType = route.meta.businessType;
if (businessType === "JisBBAC") {
config = useConfig("bbac_sa_service", "bbac_sa_detail_service");
} else if (businessType === "JisHBPO") {
config = useConfig("hbpo_sa_service", "hbpo_sa_detail_service");
} else {
config = useConfig();
}
config.query.url = "settleaccount/bbac_sa_service/get-list";
config.edit.importUrl = "settleaccount/bbac_sa_service/import";
config.edit.exportUrl = "settleaccount/bbac_sa_detail_service/export";
config.edit.deleteUrl = "settleaccount/bbac_sa_service/delete-list";
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/input/bbac_sa_detail_service.js

@ -1,15 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/jis-bbac/input/bbac_sa_detail_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-bbac/input/bbac_sa_service.js

@ -1,15 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/jis-bbac/input/bbac_sa_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/input/hbpo_sa_detail_service.js

@ -1,15 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/jis-hbpo/input/hbpo_sa_detail_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jis-hbpo/input/hbpo_sa_service.js

@ -1,15 +0,0 @@
import AppList from "../../../components/list/index.js";
import html from "html";
import useConfig from "../../../models/jis-hbpo/input/hbpo_sa_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/input/bbac_jit_pub_sa_detail_service.js

@ -1,16 +0,0 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_sa_detail_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default = "ZhiGongJianBBAC";
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-bbac/input/bbac_jit_pub_sa_service.js

@ -1,16 +0,0 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_sa_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default = "ZhiGongJianBBAC";
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/input/hbpo_jit_pub_sa_detail_service.js

@ -1,16 +0,0 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_sa_detail_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default = "ZhiGongJianHBPO";
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/jit/jit-hbpo/input/hbpo_jit_pub_sa_service.js

@ -1,16 +0,0 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_sa_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default = "ZhiGongJianHBPO";
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-bbac/input/bbac_md_pub_sa_detail_service.js

@ -1,16 +0,0 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_sa_detail_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default = "MaiDanJianBBAC";
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-bbac/input/bbac_md_pub_sa_service.js

@ -1,16 +0,0 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_sa_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default = "MaiDanJianBBAC";
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/input/hbpo_md_pub_sa_detail_service.js

@ -1,16 +0,0 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_sa_detail_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default = "MaiDanJianHBPO";
return { config, onCommand };
},
};

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/md/md-hbpo/input/hbpo_md_pub_sa_service.js

@ -1,16 +0,0 @@
import AppList from "../../../../components/list/index.js";
import html from "html";
import useConfig from "../../../../models/pub_sa_service.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
config.query.schema.properties.businessType.default = "MaiDanJianHBPO";
return { config, onCommand };
},
};

47
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/JisEdiSeCompareRequestDto.cs

@ -0,0 +1,47 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos;
/// <summary>
/// Jis结算与发运对比请求Dto
/// </summary>
public class JisEdiSeCompareRequestDto
{
/// <summary>
/// 期间
/// </summary>
[Display(Name = "期间")]
[Required(ErrorMessage = "{0}不能为空")]
public string Version { get; set; }
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
public string LU { get; set; }
/// <summary>
/// 通用码
/// </summary>
[Display(Name = "通用码")]
public string PN { get; set; }
/// <summary>
/// 发运开始时间
/// </summary>
[Display(Name = "发运开始时间")]
public DateTime? SeStartDateTime { get; set; }
/// <summary>
/// 发运结束时间
/// </summary>
[Display(Name = "发运结束时间")]
public DateTime? SeEndDateTime { get; set; }
/// <summary>
/// 下线开始时间
/// </summary>
[Display(Name = "下线开始时间")]
public DateTime? DownLineStartDateTime { get; set; }
/// <summary>
/// 下线结束时间
/// </summary>
[Display(Name = "下线结束时间")]
public DateTime? DownLineEndDateTime { get; set; }
}

4
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_SA_SERVICE.cs

@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.LinqAsync;
using System.Security.Policy;
using System.Threading.Tasks;
using AutoMapper;
using Microsoft.AspNetCore.Authorization;
@ -288,6 +289,7 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase<BBAC_SA>
{
BillNum = bbacSaBillNum,
State = "1",
BusinessType = _businessType
};
//可结算单号
var bbacCanSaBillNum = OrderNumberGenerator.GenerateOrderNumber("C");
@ -327,7 +329,7 @@ public class BBAC_SA_SERVICE : SettleAccountApplicationBase<BBAC_SA>
//根据物料号、结算日期获取价格
var priceListEntity = priceListEntitys.Find(t => t.LU == bbacSaDetail.LU && bbacSaDetail.SettleDate > t.BeginTime && bbacSaDetail.SettleDate < t.EndTime);
bbacSaDetail.Price = priceListEntity?.Price ?? default;
bbacSaDetail.IsMaiDan = bbacSaDetail.PN.Contains("R0");
bbacSaDetail.BusinessType = bbacSaDetail.PN.Contains("R0") ? EnumBusinessType.MaiDanJianBBAC : _businessType;
});
//导入的零件号集合

46
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/EdiSeCompareService.cs

@ -34,26 +34,21 @@ public class EdiSeCompareService : ApplicationService
/// BBACEdi与发运比对
/// </summary>
[HttpPost]
public async Task<string> BBACEdiSeCompare(PubSaSeCompareRequestDto pubSaSeCompareRequestDto)
public async Task<string> BBACEdiSeCompare(JisEdiSeCompareRequestDto jisEdiSeCompareRequestDto)
{
var businessTypeDisplayName = pubSaSeCompareRequestDto.BusinessType.ToString();
DisplayAttribute attributeOfType = pubSaSeCompareRequestDto.BusinessType.GetAttributeOfType<DisplayAttribute>();
if (attributeOfType != null)
{
businessTypeDisplayName = attributeOfType.Name;
}
var projectName = $"{businessTypeDisplayName}结算与发运数据对比";
var projectName = $"JisBBACEDI与发运数据对比";
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 = "Version", Value = jisEdiSeCompareRequestDto.Version });
customConditionList.Add(new CustomCondition() { Name = "LU", Value = jisEdiSeCompareRequestDto.LU });
customConditionList.Add(new CustomCondition() { Name = "PN", Value = jisEdiSeCompareRequestDto.PN });
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = projectName });
customConditionList.Add(new CustomCondition() { Name = "SeStartDateTime", Value = jisEdiSeCompareRequestDto.SeStartDateTime?.ToString("yyyy-MM-dd 00:00:00") });
customConditionList.Add(new CustomCondition() { Name = "SeEndDateTime", Value = jisEdiSeCompareRequestDto.SeEndDateTime?.ToString("yyyy-MM-dd 23:59:59") });
var _taskid = await _taskJobService.ExportEnqueueAsync(projectName, ExportExtentsion.Excel, pubSaSeCompareRequestDto.Version, string.Empty, CurrentUser, typeof(BBACEdiSeCompareExportService), customConditionList, (rs) =>
var _taskid = await _taskJobService.ExportEnqueueAsync(projectName, ExportExtentsion.Excel, jisEdiSeCompareRequestDto.Version, string.Empty, CurrentUser, typeof(JisBBACEdiSeCompareExportService), customConditionList, (rs) =>
{
});
}).ConfigureAwait(false);
return _taskid;
}
@ -61,26 +56,21 @@ public class EdiSeCompareService : ApplicationService
/// HBPOEdi与发运比对
/// </summary>
[HttpPost]
public async Task<string> HBPOEdiSeCompare(PubSaSeCompareRequestDto pubSaSeCompareRequestDto)
public async Task<string> HBPOEdiSeCompare(JisEdiSeCompareRequestDto jisEdiSeCompareRequestDto)
{
var businessTypeDisplayName = pubSaSeCompareRequestDto.BusinessType.ToString();
DisplayAttribute attributeOfType = pubSaSeCompareRequestDto.BusinessType.GetAttributeOfType<DisplayAttribute>();
if (attributeOfType != null)
{
businessTypeDisplayName = attributeOfType.Name;
}
var projectName = $"{businessTypeDisplayName}结算与发运数据对比";
var projectName = $"JisHBPOEDI与发运数据对比结算与发运数据对比";
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 = "Version", Value = jisEdiSeCompareRequestDto.Version });
customConditionList.Add(new CustomCondition() { Name = "LU", Value = jisEdiSeCompareRequestDto.LU });
customConditionList.Add(new CustomCondition() { Name = "PN", Value = jisEdiSeCompareRequestDto.PN });
customConditionList.Add(new CustomCondition() { Name = "ProjectName", Value = projectName });
customConditionList.Add(new CustomCondition() { Name = "SeStartDateTime", Value = jisEdiSeCompareRequestDto.SeStartDateTime?.ToString("yyyy-MM-dd 00:00:00") });
customConditionList.Add(new CustomCondition() { Name = "SeEndDateTime", Value = jisEdiSeCompareRequestDto.SeEndDateTime?.ToString("yyyy-MM-dd 23:59:59") });
var _taskid = await _taskJobService.ExportEnqueueAsync(projectName, ExportExtentsion.Excel, pubSaSeCompareRequestDto.Version, string.Empty, CurrentUser, typeof(HBPOEdiSeCompareExportService), customConditionList, (rs) =>
var _taskid = await _taskJobService.ExportEnqueueAsync(projectName, ExportExtentsion.Excel, jisEdiSeCompareRequestDto.Version, string.Empty, CurrentUser, typeof(JisHBPOEdiSeCompareExportService), customConditionList, (rs) =>
{
});
}).ConfigureAwait(false);
return _taskid;
}
#endregion

6
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/HBPO_SA_SERVICE.cs

@ -386,7 +386,6 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase<HBPO_SA>
hbpoCanSaDetails.ForEach(hbpoCanSaDetail =>
{
hbpoCanSaDetail.BillNum = hbpoCanSaDetail.InvGroupNum = hbpoCanSaBillNum;
hbpoCanSaDetail.BusinessType = _businessType;
});
await _hbpoCanSaRepository.InsertAsync(hbpoCanSa).ConfigureAwait(false);
@ -394,11 +393,6 @@ public class HBPO_SA_SERVICE : SettleAccountApplicationBase<HBPO_SA>
}
if (hbpoNotSaDetails.Count > 0)
{
hbpoNotSaDetails.ForEach(hbpoNotSaDetail =>
{
hbpoNotSaDetail.BusinessType = _businessType;
});
await _hbpoNotSaDetailRepository.InsertManyAsync(hbpoNotSaDetails).ConfigureAwait(false);
}
if (materialRelationships.Count > 0)

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

@ -33,9 +33,9 @@ public class JisBBACSeEdiCompareAppService : ApplicationService, IInvocable
await HandDelEdiDataAsync().ConfigureAwait(false);
var seDetailGroup = db.Set<BBAC_SE_DETAIL>().Where(t => t.IsHaveEdiData == false).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU, Qty = t.Sum(t => t.Qty) });
var ediDetailGroup = db.Set<BBAC_SE_EDI>().Where(t => t.IsHaveSeData == false).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU, Qty = t.Sum(t => t.Qty) });
var keyCodes = seDetailGroup.Join(ediDetailGroup, a => new { a.PN, a.LU, a.Qty }, b => new { b.PN, b.LU, b.Qty }, (se, edi) => new { se.PN, se.LU });
var seDetailGroup = db.Set<BBAC_SE_DETAIL>().Where(t => t.IsHaveEdiData == false).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU });
var ediDetailGroup = db.Set<BBAC_SE_EDI>().Where(t => t.IsDeleted == false && t.IsHaveSeData == false).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU });
var keyCodes = seDetailGroup.Join(ediDetailGroup, a => new { a.PN, a.LU }, b => new { b.PN, b.LU }, (se, edi) => new { se.PN, se.LU });
var seDetails = db.Set<BBAC_SE_DETAIL>().Where(t => keyCodes.Contains(new { t.PN, t.LU }));
var ediDetails = db.Set<BBAC_SE_EDI>().Where(t => keyCodes.Contains(new { t.PN, t.LU }));
seDetails.ForEach(t => t.IsHaveEdiData = true);

18
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JisHBPOSeEdiCompareAppService.cs

@ -56,31 +56,29 @@ public class JisHBPOSeEdiCompareAppService : ApplicationService, IInvocable
where se.IsHaveEdiData == false
group se by new { se.PN, se.LU }
into a
select new { a.Key.PN, a.Key.LU, Qty = a.Sum(t => t.Qty) };
select new { a.Key.PN, a.Key.LU };
var ediDetailGroup = from edi in db.Set<HBPO_SE_EDI>()
where edi.IsHaveSeData == false
where edi.IsDeleted == false && edi.IsHaveSeData == false
group edi by new { edi.PN, edi.LU }
into a
select new { a.Key.PN, a.Key.LU, Qty = a.Sum(t => t.Qty) };
select new { a.Key.PN, a.Key.LU };
var keyCodes = from se in seDetailGroup
join edi in ediDetailGroup on new
{
se.PN,
se.LU,
se.Qty
se.LU
} equals new
{
edi.PN,
edi.LU,
edi.Qty
edi.LU
}
select new { se.PN, se.LU };
//var seDetailGroup2 = db.Set<HBPO_SE_DETAIL>().Where(t => t.IsHaveEdiData == false).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU, Qty = t.Sum(t => t.Qty) });
//var ediDetailGroup2 = db.Set<HBPO_SE_EDI>().Where(t => t.IsHaveSeData == false).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU, Qty = t.Sum(t => t.Qty) });
//var keyCodes2 = seDetailGroup2.Join(ediDetailGroup2, a => new { a.PN, a.LU, a.Qty }, b => new { b.PN, b.LU, b.Qty }, (se, edi) => new { se.PN, se.LU });
//var seDetailGroup2 = db.Set<HBPO_SE_DETAIL>().Where(t => t.IsHaveEdiData == false).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU });
//var ediDetailGroup2 = db.Set<HBPO_SE_EDI>().Where(t => t.IsHaveSeData == false).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU });
//var keyCodes2 = seDetailGroup2.Join(ediDetailGroup2, a => new { a.PN, a.LU }, b => new { b.PN, b.LU }, (se, edi) => new { se.PN, se.LU });
var seDetails = db.Set<HBPO_SE_DETAIL>().Where(t => keyCodes.Contains(new { t.PN, t.LU }));
var ediDetails = db.Set<HBPO_SE_EDI>().Where(t => keyCodes.Contains(new { t.PN, t.LU }));
seDetails.ForEach(t => t.IsHaveEdiData = true);

17
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/JitSeSyncAppService.cs

@ -79,7 +79,7 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
var businessType = SeSyncConfigInfo.BusinessType;
Expression<Func<TM_BJBMPT_OTHER_RECORD, bool>> predicate = (t) => t.DeliverBillType == deliverBillType && (!deliverSubBillTypes.Any() || deliverSubBillTypes.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.DeliverBillType == deliverBillType && t.UID > int.Parse(syncPositionFlag.Position) && (!deliverSubBillTypes.Any() || deliverSubBillTypes.Contains(t.DeliverSubBillType));
@ -88,6 +88,7 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
var wmsSeRecords = _wmsBJBMPTContext.TM_BJBMPT_OTHER_RECORD.Where(predicate).OrderBy(b => b.UID).ToList();
var pubSeDetails = ObjectMapper.Map<List<TM_BJBMPT_OTHER_RECORD>, List<PUB_SE_DETAIL>>(wmsSeRecords);
pubSeDetails.RemoveAll(t => !string.IsNullOrEmpty(t.LU) || !string.IsNullOrEmpty(t.PartCode));
if (pubSeDetails.Any())
{
//客户零件号和厂内零件号
@ -108,12 +109,12 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
t.BusinessType = businessType;
t.KeyCode = t.PN + t.LU;
});
await _pubSeDetailRepository.InsertManyAsync(pubSeDetails);
await _pubSeDetailRepository.InsertManyAsync(pubSeDetails).ConfigureAwait(false);
if (syncPositionFlag != null)
{
syncPositionFlag.Position = wmsSeRecords.Last().UID.ToString();
await _syncPositionFlagRepository.UpdateAsync(syncPositionFlag);
await _syncPositionFlagRepository.UpdateAsync(syncPositionFlag).ConfigureAwait(false);
}
else
{
@ -122,7 +123,7 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
TableName = syncTableName,
Position = wmsSeRecords.Last().UID.ToString()
};
await _syncPositionFlagRepository.InsertAsync(syncPositionFlag);
await _syncPositionFlagRepository.InsertAsync(syncPositionFlag).ConfigureAwait(false);
}
foreach (var pubSeDetail in pubSeDetails)
@ -138,10 +139,10 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
BillType = pubSeDetail.DeliverBillType,
Qty = pubSeDetail.Qty,
BillTime = pubSeDetail.BillTime,
DeliverTime = pubSeDetail.DnBillTime,
DeliverTime = pubSeDetail.AssembleData,
ErpToLoc = pubSeDetail.ToErpLocCode,
Seq = default,
OrderNum = pubSeDetail.DnBillNum,
OrderNum = pubSeDetail.DeliveryIndex,
UniqueCode = default,
MatchNumber = default,
PjsNum = default,
@ -151,7 +152,7 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
RealCode = default,
ReMark = pubSeDetail.Remark,
};
await _vmiService.In(logType: Vmi.VmiLogType.Type100, changedNumber: pubSeDetail.DnBillNum, data: vmiBalance);
await _vmiService.In(logType: Vmi.VmiLogType.Type100, changedNumber: pubSeDetail.DnBillNum, data: vmiBalance).ConfigureAwait(false);
}
else if (pubSeDetail.TransType == EnumDelTransType.退)
{
@ -177,7 +178,7 @@ public class JitSeSyncAppService : ApplicationService, IInvocable
RealCode = default,
ReMark = pubSeDetail.Remark,
};
await _vmiService.Out(VmiLogType.Type400, pubSeDetail.DnBillNum, vmiLog);
await _vmiService.Out(VmiLogType.Type400, pubSeDetail.DnBillNum, vmiLog).ConfigureAwait(false);
}
}
}

4
code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationAutoMapperProfile.cs

@ -1185,10 +1185,10 @@ namespace Win.Sfs.SettleAccount
.ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
CreateMap<TM_BJBMPT_OTHER_RECORD, PUB_SE_DETAIL>()
.ForMember(x => x.BeginDate, y => y.MapFrom(d => d.DnBillTime))
.ForMember(x => x.BeginDate, y => y.MapFrom(d => d.AssembleData))
.ForMember(x => x.ShippingDate, y => y.MapFrom(d => d.BillTime))
.ForMember(x => x.WmsBillNum, y => y.MapFrom(d => d.BillNum))
.ForMember(x => x.LU, y => y.MapFrom(d => d.PartCode))
.ForMember(x => x.LU, y => y.MapFrom(d => d.CustPartCode))
.ForMember(x => x.PN, y => y.MapFrom(d => d.BillNum))
.ForMember(x => x.Qty, y => y.MapFrom(d => d.Qty));
}

5
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/EntityBase.cs

@ -378,6 +378,11 @@ namespace SettleAccount.Bases
/// 厂内物料号
/// </summary>
public virtual string PartCode { get; set; }
/// <summary>
/// 业务分类
/// </summary>
[Display(Name = "业务分类")]
public EnumBusinessType BusinessType { get; set; }
}
public class SA_CAN_BASE : AuditedAggregateRoot<Guid>, ISA_BASE

13
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_SA.cs

@ -2,6 +2,7 @@ using SettleAccount.Bases;
using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Domain.Entities.Auditing;
using Win.Sfs.SettleAccount;
namespace SettleAccount.Domain.BQ;
@ -24,12 +25,16 @@ public class BBAC_SA : AuditedAggregateRoot<Guid>
/// </summary>
[Display(Name = "状态")]
public string State { get; set; } = null!;
/// <summary>
/// 选择工厂导入
/// </summary>
[Display(Name = "工厂地点")]
public string Site { get; set; } = null!;
/// <summary>
/// 业务类型
/// </summary>
[Display(Name = "业务类型")]
public EnumBusinessType BusinessType { get; set; }
public BBAC_SA(Guid guid, int version, string billNum, string dNBillNum, string state):base(guid)
{
@ -126,12 +131,6 @@ public class BBAC_SA_DETAIL:SA_BASE
//[Display(Name = "发票分组号")]
//public string InvGroupNum { get; set; } = null!;
/// <summary>
/// 是否是买单件
/// </summary>
[Display(Name = "是否是买单件")]
public bool IsMaiDan { get; set; }
public BBAC_SA_DETAIL(Guid p_guid, string keyCode, int version, string billNum, string lU, string pN, string site, decimal qty, decimal price, string category, string isReturn, DateTime settleDate, string groupNum, string invGroupNum):base(p_guid)
{

9
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_SA.cs

@ -35,8 +35,6 @@ public class HBPO_SA : AuditedAggregateRoot<Guid>
/// </summary>
[Display(Name = "工厂地点")]
public string Site { get; set; } = null!;
/// <summary>
/// 业务类型
/// </summary>
@ -121,16 +119,9 @@ public class HBPO_SA_DETAIL : SA_BASE
///// </summary>
//[Display(Name = "结算分组")]
//public string GroupNum { get; set; } = null!;
/// <summary>
/// 业务类型
/// </summary>
public EnumBusinessType BusinessType { get; set; }
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; } = null!;
public HBPO_SA_DETAIL(Guid guid, string keyCode, int version, string billNum, string lU, string pN, string site, decimal qty, decimal price, DateTime settleDate, string groupNum, string invGroupNum, EnumBusinessType businessType)
{
this.Id= guid;

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

@ -111,12 +111,6 @@ public class PUB_SA_DETAIL:SA_BASE
//[Display(Name = "结算分组")]
//public string GroupNum { get; set; } = null!;
/// <summary>
/// 业务分类
/// </summary>
[Display(Name = "业务分类")]
public EnumBusinessType BusinessType { get; set; }
public PUB_SA_DETAIL(Guid guid, string keyCode, int version, string billNum, string lU, string pN, string site, decimal qty, decimal price, string invGroupNum, DateTime settleDate, string extend1, string extend2, string extend3, string groupNum)
{
Id=guid;

87
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_SE_DETAIL.cs

@ -9,21 +9,6 @@ namespace SettleAccount.Domain.BQ;
[Display(Name = "PUB发运数据")]
public class PUB_SE_DETAIL :SE_BASE
{
//[Display(Name = "LU+生产码")]
//public string KeyCode { get; set; } = null!;
//[Display(Name = "期间")]
//public int Version { get; set; }
//[Display(Name = "零件号")]
//public string LU { get; set; } = null!;
//[Display(Name = "ASN单号")]
//public string PN { get; set; } = null!;
//[Display(Name = "发货数量")]
//public decimal Qty { get; set; }
[Display(Name = "扩展1")]
public string Extend1 { get; set; } = null!;
@ -42,150 +27,146 @@ public class PUB_SE_DETAIL :SE_BASE
[Display(Name = "订单时间")]
public DateTime BeginDate { get; set; }
//[Display(Name = "发货时间")]
//public DateTime ShippingDate { get; set; }
//[Display(Name = "Wms发货单号")]
//public string WmsBillNum { get; set; } = null!;
/// <summary>
/// 发货单号
/// </summary>
[Display(Name = "发货单号")]
public string BillNum { get; set; }
/// <summary>
/// 发货时间
/// </summary>
[Display(Name = "发货时间")]
public DateTime BillTime { get; set; }
/// <summary>
/// 订单时间
/// </summary>
[Display(Name = "订单时间")]
public DateTime AssembleData { get; set; }
/// <summary>
/// 零件号
/// </summary>
[Display(Name = "零件号")]
public string PartCode { get; set; }
/// <summary>
/// 批次
/// </summary>
[Display(Name = "批次")]
public string Batch { get; set; }
/// <summary>
/// 客户零件号
/// </summary>
[Display(Name = "客户零件号")]
public string CustPartCode { get; set; }
/// <summary>
/// 发货人
/// </summary>
[Display(Name = "发货人")]
public string Oper { get; set; }
/// <summary>
/// DN单据号
/// </summary>
[Display(Name = "DN单据号")]
public string DnBillNum { get; set; }
/// <summary>
/// DN单据时间
/// </summary>
[Display(Name = "DN单据时间")]
public DateTime DnBillTime { get; set; }
/// <summary>
/// DN单添加人
/// </summary>
[Display(Name = "DN单添加人")]
public string DnOper { get; set; }
/// <summary>
/// 交付索引
/// </summary>
[Display(Name = "交付索引")]
public string DeliveryIndex { get; set; }
/// <summary>
/// 客户
/// </summary>
[Display(Name = "客户")]
public string CustId { get; set; }
/// <summary>
/// 发货仓库
/// </summary>
[Display(Name = "发货仓库")]
public string DeliveryHose { get; set; }
/// <summary>
/// 来源库位
/// </summary>
[Display(Name = "来源库位")]
public string FromLocCode { get; set; }
/// <summary>
/// 来源仓库
/// </summary>
[Display(Name = "来源仓库")]
public string FromHose { get; set; }
/// <summary>
/// 来源ERP库存
/// </summary>
[Display(Name = "来源ERP库存")]
public string FromErpLocCode { get; set; }
/// <summary>
/// 目标库位
/// </summary>
[Display(Name = "目标库位")]
public string ToLocCode { get; set; }
/// <summary>
/// 目标仓库
/// </summary>
[Display(Name = "目标仓库")]
public string ToHose { get; set; }
/// <summary>
/// 目标Erp库位
/// </summary>
[Display(Name = "目标Erp库位")]
public string ToErpLocCode { get; set; }
/// <summary>
/// 目标仓库
/// 状态
/// </summary>
[Display(Name = "目标仓库")]
public string ToHose { get; set; }
[Display(Name = "状态")]
public EnumBillState State { get; set; }
/// <summary>
/// 备注
/// </summary>
[Display(Name = "备注")]
public string Remark { get; set; }
/// <summary>
/// 单据类型
/// </summary>
[DisplayName("单据类型")]
[Display(Name = "单据类型")]
public EnumBillType BillType { get; set; }
/// <summary>
/// 子单据类型
/// </summary>
[DisplayName("子单据类型")]
[Display(Name = "子单据类型")]
public EnumSubBillType SubBillType { get; set; }
/// <summary>
/// 业务类型
/// </summary>
[DisplayName("业务类型")]
[Display(Name = "业务类型")]
public EnumProTpe ProType { get; set; }
/// <summary>
/// 事务类型
/// </summary>
[DisplayName("事务类型")]
[Display(Name = "事务类型")]
public EnumDelTransType TransType { get; set; }
/// <summary>
/// 发运主类型
/// </summary>
[DisplayName("发运主类型")]
[Display(Name = "发运主类型")]
public EnumDeliverBjBmpBillType DeliverBillType { get; set; }
/// <summary>
/// 发运子类型
/// </summary>
[DisplayName("发运子类型")]
[Display(Name = "发运子类型")]
public EnumDeliverSubBillType DeliverSubBillType { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Display(Name = "创建时间")]
public DateTime CreateTime { get; set; }
public PUB_SE_DETAIL(Guid guid, string keyCode, int version, string lU, string pN, decimal qty, string extend1, string extend2, string extend3, EnumBusinessType businessType, DateTime beginDate, DateTime shippingDate, string wmsBillNum)
{

39
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIS_RECORD.cs

@ -35,35 +35,47 @@ public class TM_BJBMPT_JIS_RECORD
[DisplayName("JIS生产码类型")]
public string CodeType { get; set; }
[DisplayName("状态")]
public EnumBillState State { get; set; }
[DisplayName("订单零件号")]
public string RealPartCode { get; set; }
[DisplayName("父级零件号")]
public string PartCode { get; set; }
[DisplayName("批次")]
public string Batch { get; set; }
[DisplayName("客户零件号")]
public string CustPartCode { get; set; }
[DisplayName("数量")]
public decimal? Qty { get; set; }
public decimal Qty { get; set; }
[DisplayName("发货单号")]
public string BillNum { get; set; }
[DisplayName("MES配置码")]
public string MESConfigCode { get; set; }
[DisplayName("订单时间")]
public DateTime AssembleData { get; set; }
[DisplayName("来源库位")]
public string FromLoc { get; set; }
[DisplayName("目标库位")]
public string ToLoc { get; set; }
public string RealPartCode { get; set; }
public string Batch { get; set; }
[DisplayName("参照订单生产码")]
public string RefVinCode { get; set; }
//[DisplayName("单据类型")]
//public EnumBillType BillType { get; set; }
[DisplayName("单据类型")]
public EnumBillType BillType { get; set; }
//[DisplayName("子单据类型")]
//public EnumSubBillType SubBillType { get; set; }
[DisplayName("子单据类型")]
public EnumSubBillType SubBillType { get; set; }
[DisplayName("单据性质")]
public string BillCharacter { get; set; }
@ -98,10 +110,15 @@ public class TM_BJBMPT_JIS_RECORD
[DisplayName("虚拟小总成")]
public string MatchNumber { get; set; }
//[DisplayName("业务类型")]
//public EnumProTpe ProType { get; set; }
[DisplayName("业务类型")]
public EnumProTpe ProType { get; set; }
[DisplayName("发货条码")]
public string DeliverCode { get; set; }
[DisplayName("客户位置")]
public string Position { get; set; }
[DisplayName("创建时间")]
public DateTime CreateTime { get; set; }
}

57
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_JIT_RECORD.cs

@ -29,9 +29,18 @@ public class TM_BJBMPT_JIT_RECORD
[DisplayName("订单零件号")]
public string RealPartCode { get; set; }
[DisplayName("批次")]
public string Batch { get; set; }
[DisplayName("客户零件号")]
public string CustPartCode { get; set; }
[DisplayName("订单序号")]
public string Seq { get; set; }
[DisplayName("订单时间")]
public DateTime AssembleData { get; set; }
[DisplayName("发货条码")]
public string DeliverCode { get; set; }
@ -50,22 +59,20 @@ public class TM_BJBMPT_JIT_RECORD
[DisplayName("客户位置")]
public string Position { get; set; }
public string MESConfigCode { get; set; }
[DisplayName("工厂")]
public string Factory { get; set; }
[DisplayName("生产线")]
public string Line { get; set; }
[DisplayName("MES配置码")]
public string MESConfigCode { get; set; }
[DisplayName("目标库位")]
public string ToLoc { get; set; }
[DisplayName("备注")]
public string Remark { get; set; }
[DisplayName("单据类型")]
public EnumBillType BillType { get; set; }
//[DisplayName("单据类型")]
//public EnumBillType BillType { get; set; }
//[DisplayName("子单据类型")]
//public EnumSubBillType SubBillType { get; set; }
[DisplayName("子单据类型")]
public EnumSubBillType SubBillType { get; set; }
[DisplayName("事务类型")]
public EnumDelTransType TransType { get; set; }
@ -79,26 +86,50 @@ public class TM_BJBMPT_JIT_RECORD
[DisplayName("单据性质")]
public string BillCharacter { get; set; }
//[DisplayName("业务类型")]
//public EnumProTpe ProType { get; set; }
[DisplayName("原生产码")]
public string OrigiCode { get; set; }
[DisplayName("描述")]
public string PartDesc { get; set; }
[DisplayName("备注")]
public string Remark { get; set; }
[DisplayName("业务类型")]
public EnumProTpe ProType { get; set; }
[DisplayName("JIS排序单号")]
public string OrderNum { get; set; }
[DisplayName("JIS实际生产码")]
public string RealCode { get; set; }
[DisplayName("来源库位")]
public string FromLoc { get; set; }
[DisplayName("参照订单生产码")]
public string RefVinCode { get; set; }
[DisplayName("发货关联单号")]
public string RefBillNum { get; set; }
[DisplayName("Erp目标库位")]
public string ErpToLoc { get; set; }
[DisplayName("塑件唯一码")]
public string UniqueCode { get; set; }
[DisplayName("PJS顺序号")]
public string PjsNum { get; set; }
[DisplayName("虚拟小总成")]
public string MatchNumber { get; set; }
public string RefVinCode { get; set; }
[DisplayName("状态")]
public EnumBillState State { get; set; }
[DisplayName("创建时间")]
public DateTime CreateTime { get; set; }
}
public enum EnumProTpe

30
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Syncs/TM_BJBMPT_OTHER_RECORD.cs

@ -20,12 +20,18 @@ public class TM_BJBMPT_OTHER_RECORD
[DisplayName("发货时间")]
public DateTime? BillTime { get; set; }
[DisplayName("订单时间")]
public DateTime? AssembleData { get; set; }
[DisplayName("零件号")]
public string PartCode { get; set; }
[DisplayName("批次")]
public string Batch { get; set; }
[DisplayName("客户零件号")]
public string CustPartCode { get; set; }
[DisplayName("发货人")]
public string Oper { get; set; }
@ -65,14 +71,23 @@ public class TM_BJBMPT_OTHER_RECORD
[DisplayName("目标Erp库位")]
public string ToErpLocCode { get; set; }
//[DisplayName("状态")]
//public EnumBillState State { get; set; }
[DisplayName("数量")]
public decimal? Qty { get; set; }
//[DisplayName("单据类型")]
//public EnumBillType BillType { get; set; }
[DisplayName("备注")]
public string Remark { get; set; }
[DisplayName("单据类型")]
public EnumBillType BillType { get; set; }
[DisplayName("子单据类型")]
public EnumSubBillType SubBillType { get; set; }
//[DisplayName("子单据类型")]
//public EnumSubBillType SubBillType { get; set; }
[DisplayName("业务类型")]
public EnumProTpe ProType { get; set; }
[DisplayName("事务类型")]
public EnumDelTransType TransType { get; set; }
@ -83,9 +98,6 @@ public class TM_BJBMPT_OTHER_RECORD
[DisplayName("发运子类型")]
public EnumDeliverSubBillType DeliverSubBillType { get; set; }
//[DisplayName("业务类型")]
//public EnumProTpe ProType { get; set; }
[DisplayName("备注")]
public string Remark { get; set; }
[DisplayName("创建时间")]
public DateTime? CreateTime { get; set; }
}

147
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Reports/JisBBACEidSeCompareReport.cs

@ -0,0 +1,147 @@
using System;
using System.ComponentModel.DataAnnotations;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
namespace Win.Sfs.SettleAccount.Reports;
/// <summary>
/// JisBBAC Edi与发运对比
/// </summary>
public class JisBBACEidSeCompareReport
{
}
/// <summary>
/// JisBBAC Edi与发运对比导出
/// </summary>
[ExcelExporter(MaxRowNumberOnASheet = 900000)]
public class JisBBACEidSeCompareExport
{
/// <summary>
/// 类别
/// </summary>
[Display(Name = "类别")]
[ExporterHeader(DisplayName = "类别")]
public string Category { get; set; }
/// <summary>
/// 交货单号
/// </summary>
[Display(Name = "交货单号")]
[ExporterHeader(DisplayName = "交货单号")]
public string WmsBillNum { get; set; }
/// <summary>
/// CarModeCode
/// </summary>
[Display(Name = "CarModeCode")]
[ExporterHeader(DisplayName = "CarModeCode")]
public string CarModeCode { get; set; }
/// <summary>
/// LineStationcode
/// </summary>
[Display(Name = "LineStationcode")]
[ExporterHeader(DisplayName = "LineStationcode")]
public string LineStationcode { get; set; }
/// <summary>
/// SequenceNumber
/// </summary>
[Display(Name = "SequenceNumber")]
[ExporterHeader(DisplayName = "SequenceNumber")]
public string SequenceNumber { get; set; }
/// <summary>
/// ParType
/// </summary>
[Display(Name = "ParType")]
[ExporterHeader(DisplayName = "ParType")]
public string ParType { get; set; }
/// <summary>
/// 配置码
/// </summary>
[Display(Name = "配置码")]
[ExporterHeader(DisplayName = "配置码")]
public string MESConfigCode { get; set; }
/// <summary>
/// 发货日期
/// </summary>
[Display(Name = "发货日期")]
[ExporterHeader(DisplayName = "发货日期", Format = "yyyy-MM-dd")]
public DateTime ShippingDate { get; set; }
/// <summary>
/// 生产码
/// </summary>
[Display(Name = "生产码")]
[ExporterHeader(DisplayName = "生产码")]
public string PN { get; set; }
/// <summary>
/// 序列号
/// </summary>
[Display(Name = "序列号")]
[ExporterHeader(DisplayName = "序列号")]
public string { get; set; }
/// <summary>
/// PJIS日顺序号
/// </summary>
[Display(Name = "PJIS日顺序号")]
[ExporterHeader(DisplayName = "PJIS日顺序号")]
public string PJIS日顺序号 { 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>
/// WMS发货数量
/// </summary>
[Display(Name = "WMS发货数量")]
[ExporterHeader(DisplayName = "WMS发货数量")]
public decimal SEQty { get; set; }
/// <summary>
/// EDI数量
/// </summary>
[Display(Name = "EDI数量")]
[ExporterHeader(DisplayName = "EDI数量")]
public decimal EdiQty { get; set; }
/// <summary>
/// WMS发货与EDI数量差
/// </summary>
[Display(Name = "WMS发货与EDI数量差")]
[ExporterHeader(DisplayName = "WMS发货与EDI数量差")]
public decimal DiffQty { set; get; }
/// <summary>
/// 客户下线时间
/// </summary>
[Display(Name = "客户下线时间")]
[ExporterHeader(DisplayName = "客户下线时间")]
public DateTime AssemblyDate { get; set; }
/// <summary>
/// 小总成号
/// </summary>
[Display(Name = "小总成号")]
[ExporterHeader(DisplayName = "小总成号")]
public DateTime MatchNumber { get; set; }
/// <summary>
/// 注塑码
/// </summary>
[Display(Name = "注塑码")]
[ExporterHeader(DisplayName = "注塑码")]
public string InjectionCode { get; set; }
/// <summary>
/// 是否完全匹配
/// </summary>
[Display(Name = "是否完全匹配")]
[ExporterHeader(DisplayName = "是否完全匹配")]
public string MateType { get; set; }
/// <summary>
/// 差异说明
/// </summary>
[Display(Name = "差异说明")]
[ExporterHeader(DisplayName = "差异说明")]
public string DiffDesc { get; set; }
}

5422
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230815013824_20230815-1.Designer.cs

File diff suppressed because it is too large

87
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230815013824_20230815-1.cs

@ -0,0 +1,87 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class _202308151 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("27b08950-27f6-42ae-aeff-c7d19315b467"));
migrationBuilder.AddColumn<DateTime>(
name: "AssembleData",
table: "Set_PUB_SE_DETAIL",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "BillNum",
table: "Set_PUB_SE_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "CreateTime",
table: "Set_PUB_SE_DETAIL",
type: "datetime2",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<string>(
name: "CustPartCode",
table: "Set_PUB_SE_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "State",
table: "Set_PUB_SE_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("f4806a25-4884-41e5-a8d1-6039726b418a"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "56d140554b1f4a679568b60866a9750a", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("f4806a25-4884-41e5-a8d1-6039726b418a"));
migrationBuilder.DropColumn(
name: "AssembleData",
table: "Set_PUB_SE_DETAIL");
migrationBuilder.DropColumn(
name: "BillNum",
table: "Set_PUB_SE_DETAIL");
migrationBuilder.DropColumn(
name: "CreateTime",
table: "Set_PUB_SE_DETAIL");
migrationBuilder.DropColumn(
name: "CustPartCode",
table: "Set_PUB_SE_DETAIL");
migrationBuilder.DropColumn(
name: "State",
table: "Set_PUB_SE_DETAIL");
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("27b08950-27f6-42ae-aeff-c7d19315b467"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "86c4ebf001bf4993a0cca2af4216ba92", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null });
}
}
}

5425
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230815023057_20230815-2.Designer.cs

File diff suppressed because it is too large

67
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230815023057_20230815-2.cs

@ -0,0 +1,67 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class _202308152 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("f4806a25-4884-41e5-a8d1-6039726b418a"));
migrationBuilder.DropColumn(
name: "IsMaiDan",
table: "Set_BBAC_SA_DETAIL");
migrationBuilder.AddColumn<int>(
name: "BusinessType",
table: "Set_BBAC_SA_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "BusinessType",
table: "Set_BBAC_SA",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("75ce4934-06de-4cac-a1f0-536935975b38"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "8e865c8947ea4381b1b48c3ee4d572b4", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("75ce4934-06de-4cac-a1f0-536935975b38"));
migrationBuilder.DropColumn(
name: "BusinessType",
table: "Set_BBAC_SA_DETAIL");
migrationBuilder.DropColumn(
name: "BusinessType",
table: "Set_BBAC_SA");
migrationBuilder.AddColumn<bool>(
name: "IsMaiDan",
table: "Set_BBAC_SA_DETAIL",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("f4806a25-4884-41e5-a8d1-6039726b418a"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "56d140554b1f4a679568b60866a9750a", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null });
}
}
}

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

@ -470,6 +470,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<int>("BusinessType")
.HasColumnType("int");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(50)
@ -525,6 +528,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<int>("BusinessType")
.HasColumnType("int");
b.Property<string>("Category")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
@ -551,9 +557,6 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<bool>("IsMaiDan")
.HasColumnType("bit");
b.Property<string>("IsReturn")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
@ -3399,12 +3402,18 @@ namespace Win.Sfs.SettleAccount.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("AssembleData")
.HasColumnType("datetime2");
b.Property<string>("Batch")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("BeginDate")
.HasColumnType("datetime2");
b.Property<string>("BillNum")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("BillTime")
.HasColumnType("datetime2");
@ -3421,6 +3430,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("nvarchar(50)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreateTime")
.HasColumnType("datetime2");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
@ -3432,6 +3444,9 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("CustId")
.HasColumnType("nvarchar(max)");
b.Property<string>("CustPartCode")
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
@ -3530,6 +3545,9 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<DateTime>("ShippingDate")
.HasColumnType("datetime2");
b.Property<int>("State")
.HasColumnType("int");
b.Property<int>("SubBillType")
.HasColumnType("int");
@ -4396,10 +4414,10 @@ namespace Win.Sfs.SettleAccount.Migrations
b.HasData(
new
{
Id = new Guid("27b08950-27f6-42ae-aeff-c7d19315b467"),
Id = new Guid("75ce4934-06de-4cac-a1f0-536935975b38"),
BillTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
BillType = 1,
ConcurrencyStamp = "86c4ebf001bf4993a0cca2af4216ba92",
ConcurrencyStamp = "8e865c8947ea4381b1b48c3ee4d572b4",
DeliverTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
ErpToLoc = "ErpToLoc",
OrderNum = "OrderNum",

7
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountNormalEfCoreRepository.cs

@ -5,6 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Domain.Entities;
using Volo.Abp.EntityFrameworkCore;
using Win.Sfs.Shared.Filter;
@ -42,7 +43,6 @@ namespace Win.Sfs.SettleAccount.Repository
public virtual async Task<long> GetCountByFilterAsync(List<FilterCondition> filters, CancellationToken cancellationToken = default)
{
return await this.GetQueryable()
.WhereIf(filters?.Count != 0, filters.ToLambda<TEntity>())
.LongCountAsync(GetCancellationToken(cancellationToken));
@ -54,6 +54,11 @@ namespace Win.Sfs.SettleAccount.Repository
{
var query = includeDetails ? this.WithDetails() : this.GetQueryable();
if (typeof(ISoftDelete).IsAssignableFrom(typeof(TEntity)))
{
query = (IQueryable<TEntity>)query.WhereIf(DataFilter.IsEnabled<ISoftDelete>(), e => ((ISoftDelete)e).IsDeleted == false);
}
var entities = query.WhereIf(filters?.Count != 0, filters.ToLambda<TEntity>());
entities = GetSortingQueryable(entities, sorting);

46
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/BBACEdiSeCompareExportService.cs

@ -1,46 +0,0 @@
using System;
using System.Collections.Generic;
using TaskJob.EventArgs;
using TaskJob.Interfaces;
using Volo.Abp.BlobStoring;
using Volo.Abp.DependencyInjection;
using Volo.Abp.ObjectMapping;
using Win.Sfs.BaseData.ImportExcelCommon;
namespace SettleAccount.Job.Services.Report
{
/// <summary>
/// BBACEdi与发运对比导出服务
/// </summary>
public class BBACEdiSeCompareExportService : ITransientDependency, IExportJob
{
/// <summary>
/// 文件容器
/// </summary>
private readonly IBlobContainer<MyFileContainer> _fileContainer;
/// <summary>
/// AutoMapper
/// </summary>
private readonly IObjectMapper _objectMapper;
/// <summary>
/// 构造
/// </summary>
public BBACEdiSeCompareExportService(
IBlobContainer<MyFileContainer> fileContainer,
IObjectMapper objectMapper)
{
_fileContainer = fileContainer;
_objectMapper = objectMapper;
}
/// <summary>
/// 导出
/// </summary>
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property)
{
return "";
}
}
}

294
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisBBACEdiSeCompareExportService.cs

@ -0,0 +1,294 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Linq.Dynamic.Core;
using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.DependencyInjection;
using SettleAccount.Domain.BQ;
using SettleAccount.Job.SignalR;
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.SettleAccount;
using Win.Sfs.SettleAccount.Entities.BQ;
using Win.Sfs.SettleAccount.Enums;
using Win.Sfs.SettleAccount.Reports;
namespace SettleAccount.Job.Services.Report
{
/// <summary>
/// BBACEdi与发运对比导出服务
/// </summary>
public class JisBBACEdiSeCompareExportService : ITransientDependency, IExportJob
{
/// <summary>
/// HubContext
/// </summary>
private readonly IHubContext<PageHub> _hubContext;
/// <summary>
/// 文件容器
/// </summary>
private readonly IBlobContainer<MyFileContainer> _fileContainer;
/// <summary>
/// AutoMapper
/// </summary>
private readonly IObjectMapper _objectMapper;
/// <summary>
/// AutoMapper
/// </summary>
private readonly SettleAccountDbContext _settleAccountDbContext;
/// <summary>
/// 构造
/// </summary>
public JisBBACEdiSeCompareExportService(
IHubContext<PageHub> hubContext,
IBlobContainer<MyFileContainer> fileContainer,
IObjectMapper objectMapper,
SettleAccountDbContext settleAccountDbContext)
{
_hubContext = hubContext;
_fileContainer = fileContainer;
_objectMapper = objectMapper;
_settleAccountDbContext = settleAccountDbContext;
}
/// <summary>
/// 导出
/// </summary>
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property)
{
var version = property.Where(p => p.Name == "Version").FirstOrDefault().Value;
var lu = property.Where(p => p.Name == "LU").FirstOrDefault().Value;
var pn = property.Where(p => p.Name == "PN").FirstOrDefault().Value;
var seStartDateTime = property.Where(p => p.Name == "SeStartDateTime").FirstOrDefault().Value;
var seEndDateTime = property.Where(p => p.Name == "SeEndDateTime").FirstOrDefault().Value;
//有EDI的发运数据
var haveEidSes = _settleAccountDbContext.Set<BBAC_SE_DETAIL>().Where(t => t.IsHaveEdiData == true);
//有发运的EDI数据
//var haveSeEids = _settleAccountDbContext.Set<BBAC_SE_EDI>().Where(t => t.IsDeleted == false && t.IsHaveSeData == true && haveEidSes.Select(t => new { t.PN, t.LU }).Contains(new { t.PN, t.LU }));
var haveSeEids = _settleAccountDbContext.Set<BBAC_SE_EDI>().Where(t => t.IsDeleted == false && t.IsHaveSeData == true).Join(haveEidSes, a => new { a.PN, a.LU }, b => new { b.PN, b.LU }, (edi, se) => edi);
//无EDI的发运数据
var notHaveEidSes = _settleAccountDbContext.Set<BBAC_SE_DETAIL>().Where(t => t.IsHaveEdiData == false);
//无发运的EDI数据
var notHaveSeEids = _settleAccountDbContext.Set<BBAC_SE_EDI>().Where(t => t.IsDeleted == false && t.IsHaveSeData == false);
//有EDI有发运
var haveEdiHaveSes = haveEidSes.ToList();
var dsdddd = haveSeEids.ToList();
//有EDI无发运
var haveEdiNotHaveSes = notHaveEidSes.ToList();
//无EDI有发运
var notHaveEdiHaveSes = notHaveSeEids.ToList();
var ids = id.ToString();
//var seDetailGroup = _settleAccountDbContext.Set<BBAC_SE_DETAIL>().Where(t => t.IsHaveEdiData == true).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU, Qty = t.Sum(t => t.Qty) });
//var ediDetailGroup = _settleAccountDbContext.Set<BBAC_SE_EDI>().Where(t => t.IsDeleted == false && t.IsHaveSeData == true).GroupBy(t => new { t.PN, t.LU }).Select(t => new { t.Key.PN, t.Key.LU, Qty = t.Sum(t => t.Qty) });
//var keyCodes = seDetailGroup.Join(ediDetailGroup, a => new { a.PN, a.LU, a.Qty }, b => new { b.PN, b.LU, b.Qty }, (se, edi) => new { se.PN, se.LU });
//var seDetails = _settleAccountDbContext.Set<BBAC_SE_DETAIL>().Where(t => keyCodes.Contains(new { t.PN, t.LU }));
//var ediDetails = _settleAccountDbContext.Set<BBAC_SE_EDI>().Where(t => keyCodes.Contains(new { t.PN, t.LU }));
////有EDI有发运
//var haveSaHaveSes = pubSaSeCompareDiffs.FindAll(t => t.Category == EnumPubSaSeCompareCategory.HaveSaHaveSe);
////有EDI无发运
//var haveSaNotHaveSes = pubSaSeCompareDiffs.FindAll(t => t.Category == EnumPubSaSeCompareCategory.HaveSaNotHaveSe);
////无EDI有发运
//var notHaveSaHaveSes = pubSaSeCompareDiffs.FindAll(t => t.Category == EnumPubSaSeCompareCategory.NotHaveSaHaveSe);
//seDetails.ForEach(t => t.IsHaveEdiData = true);
//ediDetails.ForEach(t => t.IsHaveSeData = true);
//db.Set<BBAC_SE_DETAIL>().UpdateRange(seDetails);
//db.Set<BBAC_SE_EDI>().UpdateRange(ediDetails);
//await db.SaveChangesAsync().ConfigureAwait(false);
//EnumBusinessType businessType = (EnumBusinessType)Enum.Parse(typeof(EnumBusinessType), strBusinessType);
//var businessTypeDisplayName = businessType.ToString();
//DisplayAttribute attributeOfType = businessType.GetAttributeOfType<DisplayAttribute>();
//if (attributeOfType != null)
//{
// businessTypeDisplayName = attributeOfType.Name;
//}
//var filename = exportName.FirstOrDefault();
//var pubSaSeCompareDiffs = _pubSaSeCompareDapperRepository.GetDetailDiffReportList(strBusinessType, version, seStartDateTime, seEndDateTime);
//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 haveSaHaveSes = pubSaSeCompareDiffs.FindAll(t => t.Category == EnumPubSaSeCompareCategory.HaveSaHaveSe);
////有结算无发运
//var haveSaNotHaveSes = pubSaSeCompareDiffs.FindAll(t => t.Category == EnumPubSaSeCompareCategory.HaveSaNotHaveSe);
////无结算有发运
//var notHaveSaHaveSes = pubSaSeCompareDiffs.FindAll(t => t.Category == EnumPubSaSeCompareCategory.NotHaveSaHaveSe);
////二次匹配上的记录
//var secondMatchHaveSaHaveSes = new List<PubSaSeCompareDiff>();
//haveSaHaveSes.ForEach(t => t.PrimitiveLU = t.ReplaceLU = t.SaLU);
//haveSaNotHaveSes.ForEach(t => t.PrimitiveLU = t.ReplaceLU = t.SaLU);
//notHaveSaHaveSes.ForEach(t => t.PrimitiveLU = t.ReplaceLU = t.SeLU);
//#region 二次对比
////二次对比(替换零件号)
//var repLUs = notHaveSaHaveSes.Select(t => t.SeLU).Distinct().ToList();
//var tbRePartsRelationships = _tbRePartsRelationshipRepository.GetListAsync(t => repLUs.Contains(t.RepLU) && t.BusinessType == businessType).Result;
//tbRePartsRelationships.ForEach(tbRePartsRelationship =>
//{
// notHaveSaHaveSes.FindAll(t => t.SeLU == tbRePartsRelationship.RepLU).ForEach(t =>
// {
// t.ReplaceLU = tbRePartsRelationship.LU;
// });
//});
//var haveSaNotHaveSeLUPNs = haveSaNotHaveSes.Select(t => new { t.ReplaceLU, t.PN });
//var notHaveSaHaveSeLUPNs = notHaveSaHaveSes.Select(t => new { t.ReplaceLU, t.PN });
////二次匹配 匹配上的零件号
//var secondMatchLUPNs = haveSaNotHaveSeLUPNs.Intersect(notHaveSaHaveSeLUPNs);
//if (secondMatchLUPNs.Any() == true)
//{
// pubSaSeCompareDiffs.RemoveAll<PubSaSeCompareDiff>(t => secondMatchLUPNs.Contains(new { t.ReplaceLU, t.PN }));
// foreach (var secondMatchLUPN in secondMatchLUPNs)
// {
// var haveSaNotHaveSe = haveSaNotHaveSes.FirstOrDefault(t => t.ReplaceLU == secondMatchLUPN.ReplaceLU && t.PN == secondMatchLUPN.PN);
// var notHaveSaHaveSe = notHaveSaHaveSes.FirstOrDefault(t => t.ReplaceLU == secondMatchLUPN.ReplaceLU && t.PN == secondMatchLUPN.PN);
// secondMatchHaveSaHaveSes.Add(new PubSaSeCompareDiff()
// {
// WmsBillNum = notHaveSaHaveSe.WmsBillNum,
// ShippingDate = notHaveSaHaveSe.ShippingDate,
// SeqNumber = notHaveSaHaveSe.SeqNumber,
// PJISSeqNumber = notHaveSaHaveSe.PJISSeqNumber,
// MaterialNumber = haveSaNotHaveSe.MaterialNumber,
// MaterialDes = haveSaNotHaveSe.MaterialDes,
// CustomerOfflineTime = haveSaNotHaveSe.CustomerOfflineTime,
// SAQty = haveSaNotHaveSe.SAQty,
// SEQty = notHaveSaHaveSe.SEQty,
// MateType = haveSaNotHaveSe.MateType,
// FixPrice = haveSaNotHaveSe.FixPrice,
// PrimitiveLU = haveSaNotHaveSe.PrimitiveLU,
// ReplaceLU = haveSaNotHaveSe.ReplaceLU,
// SeLU = notHaveSaHaveSe.SeLU,
// SaLU = haveSaNotHaveSe.SaLU,
// PN = haveSaNotHaveSe.PN,
// Category = EnumPubSaSeCompareCategory.HaveSaHaveSe,
// IsRemove = false
// });
// }
//}
////二次对比比对上的数据入库
//if (secondMatchHaveSaHaveSes.Count > 0)
//{
// pubSaSeCompareDiffs.AddRange(secondMatchHaveSaHaveSes);
// var pubSeCDetailEntitys = _objectMapper.Map<List<PubSaSeCompareDiff>, List<PUB_SEC_DETAIL>>(secondMatchHaveSaHaveSes);
// _pubSeCDetailRepository.InsertManyAsync(pubSeCDetailEntitys);
//}
//#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.PN == 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();
//ExcelExporter excelExporter = new ExcelExporter();
//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();
//var result = excelExporter.ExportAppendDataAsByteArray();
//result.ShouldNotBeNull();
//_fileContainer.SaveAsync(filename, result.Result, true);
//Notify();
return id.ToString();
}
#region 私有方法
private void Notify()
{
this._hubContext.Clients.All.ServerToClient("SaSeCompare", "refresh", "");
}
#endregion
}
}

4
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HBPOEdiSeCompareExportService.cs → code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/JisHBPOEdiSeCompareExportService.cs

@ -12,7 +12,7 @@ namespace SettleAccount.Job.Services.Report
/// <summary>
/// HBPOEdi与发运对比导出服务
/// </summary>
public class HBPOEdiSeCompareExportService : ITransientDependency, IExportJob
public class JisHBPOEdiSeCompareExportService : ITransientDependency, IExportJob
{
/// <summary>
/// 文件容器
@ -27,7 +27,7 @@ namespace SettleAccount.Job.Services.Report
/// <summary>
/// 构造
/// </summary>
public HBPOEdiSeCompareExportService(
public JisHBPOEdiSeCompareExportService(
IBlobContainer<MyFileContainer> fileContainer,
IObjectMapper objectMapper)
{

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

@ -40,8 +40,8 @@ namespace Win.Sfs.SettleAccount
GlobalJobFilters.Filters.Add(new AutomaticRetryAttribute{ Attempts = 0});
context.Services.AddTransient<PubSaSeCompareExportService>();
context.Services.AddTransient<BBACEdiSeCompareExportService>();
context.Services.AddTransient<HBPOEdiSeCompareExportService>();
context.Services.AddTransient<JisBBACEdiSeCompareExportService>();
context.Services.AddTransient<JisHBPOEdiSeCompareExportService>();
context.Services.AddTransient<SettleAccountImportService>();
@ -89,13 +89,13 @@ namespace Win.Sfs.SettleAccount
{
return implementationFactory.GetService<PubSaSeCompareExportService>();
}
if (key.Equals(typeof(BBACEdiSeCompareExportService).FullName))
if (key.Equals(typeof(JisBBACEdiSeCompareExportService).FullName))
{
return implementationFactory.GetService<BBACEdiSeCompareExportService>();
return implementationFactory.GetService<JisBBACEdiSeCompareExportService>();
}
if (key.Equals(typeof(HBPOEdiSeCompareExportService).FullName))
if (key.Equals(typeof(JisHBPOEdiSeCompareExportService).FullName))
{
return implementationFactory.GetService<HBPOEdiSeCompareExportService>();
return implementationFactory.GetService<JisHBPOEdiSeCompareExportService>();
}
if (key.Equals(typeof(PD_SERVICE).FullName))
{

Loading…
Cancel
Save