学 赵 1 year ago
parent
commit
983c3c9438
  1. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccountHttpApiHostModule.cs
  2. 1
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/assets/docs/home.md
  3. BIN
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/assets/导入模版.zip
  4. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
  5. 114
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/bom.js
  6. 95
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/material-relationship.js
  7. 99
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/material.js
  8. 99
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/tb_re-parts-relationship_service.js
  9. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-date.js
  10. 525
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  11. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bom.js
  12. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/material-relationship.js
  13. 15
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/tb_re-parts-relationship_service.js
  14. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/home.js
  15. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_SA_DTO.cs
  16. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/SettleAccount.Application.Contracts.csproj
  17. 127
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs
  18. 84
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Boms/BomAppService.cs
  19. 13
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipAppService.cs
  20. 7
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/MaterialRelationships/MaterialRelationship.cs
  21. 9
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  22. 4023
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230718010724_20230718-1.Designer.cs
  23. 163
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230718010724_20230718-1.cs
  24. 43
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs
  25. BIN
      docs/结算界面查询条件.xlsx

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/SettleAccountHttpApiHostModule.cs

@ -336,7 +336,7 @@ namespace Win.Sfs.SettleAccount
xmlapppath = Path.Combine(AppContext.BaseDirectory, "SettleAccount.Application.Contracts.xml");
if (File.Exists(xmlapppath))
{
options.IncludeXmlComments(xmlapppath);
options.IncludeXmlComments(xmlapppath, true);
}
options.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme
{

1
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/assets/docs/home.md

@ -0,0 +1 @@
[导入模板下载](/assets/导入模版.zip)

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

Binary file not shown.

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

@ -238,9 +238,9 @@ export default {
</template>
<template v-else-if="editFormMode==='import'">
<el-form :model="importModel" style="height:100%;">
<el-form-item :label="$t('导入模板')">
<!-- <el-form-item :label="$t('导入模板')">
<el-link type="primary" @click="getImportTemplate">{{$t('下载')}}</el-link>
</el-form-item>
</el-form-item> -->
<el-form-item label="选择工厂" label-width="80px">
<el-select v-model="importModel.version">
<el-option v-for="item in versions" :value="item.value" :label="item.label" />

114
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/bom.js

@ -0,0 +1,114 @@
const schema = {
title: "BOM结构",
type: "object",
properties: {
parentItemCode: {
title: "父物料编码",
type: "string",
},
parentItemDesc: {
title: "父物料描述",
type: "string",
},
childItemCode: {
title: "组件编码",
type: "string",
},
childItemDesc: {
title: "组件描述",
type: "string",
},
qty: {
title: "用量",
type: "number",
},
bomType: {
title: "结构类型",
type: "string",
},
effectiveTime: {
title: "生效时间",
type: "string",
input: "date",
},
effectiveTime: {
title: "失效时间",
type: "string",
input: "date",
},
},
};
const baseUrl = "settleaccount/bom";
const queryUrl = `${baseUrl}/get-list`;
const exportUrl = `${baseUrl}/export`;
const queryMethod = "POST";
const exportMethod = "POST";
export default function () {
return {
baseUrl,
query: {
url: queryUrl,
method: queryMethod,
hasFilter: true,
schema: {
title: "BOM结构",
type: "object",
properties: {
filters: {
type: "array",
hidden: true,
items: {
type: "object",
properties: {
logic: {
type: "int",
},
column: {
type: "string",
},
action: {
type: "int",
},
value: {
type: "string",
},
},
},
default: [
{
logic: "and",
column: "childItemCode",
action: "like",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
queryUrl,
exportUrl,
queryMethod,
exportMethod,
schema: schema,
},
};
}

95
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/material-relationship.js

@ -0,0 +1,95 @@
const schema = {
title: "客户零件关系",
type: "object",
properties: {
erpMaterialCode: {
title: "厂内零件号",
type: "string",
},
settleMaterialCode: {
title: "客户零件号",
type: "string",
},
materialDesc: {
title: "物料描述",
type: "string",
},
},
};
const baseUrl = "settleaccount/material-relationship";
const queryUrl = `${baseUrl}/get-list`;
const importUrl = `${baseUrl}/import`;
const exportUrl = `${baseUrl}/export`;
const queryMethod = "POST";
const importMethod = "POST";
const exportMethod = "POST";
export default function () {
return {
baseUrl,
query: {
url: queryUrl,
method: queryMethod,
schema: {
title: "客户零件关系",
type: "object",
properties: {
filters: {
type: "array",
hidden: true,
items: {
type: "object",
properties: {
logic: {
type: "int",
},
column: {
type: "string",
},
action: {
type: "int",
},
value: {
type: "string",
},
},
},
default: [
{
logic: "and",
column: "settleMaterialCode",
action: "like",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
queryUrl,
importUrl,
exportUrl,
queryMethod,
importMethod,
exportMethod,
schema: schema,
},
};
}

99
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/material.js

@ -0,0 +1,99 @@
const schema = {
title: "物料主数据",
type: "object",
properties: {
factory: {
title: "客户物料号",
type: "string",
},
materialCode: {
title: "厂内物料号",
type: "string",
},
materialDesc: {
title: "物料描述",
type: "string",
},
unit: {
title: "基本计量单位",
type: "string",
},
estimateType: {
title: "产品类型",
type: "string",
},
},
};
const baseUrl = "settleaccount/material";
const queryUrl = `${baseUrl}/get-list`;
const exportUrl = `${baseUrl}/export`;
const queryMethod = "POST";
const exportMethod = "POST";
export default function () {
return {
baseUrl,
query: {
url: queryUrl,
method: queryMethod,
schema: {
title: "物料主数据",
type: "object",
properties: {
filters: {
type: "array",
hidden: true,
items: {
type: "object",
properties: {
logic: {
type: "int",
},
column: {
type: "string",
},
action: {
type: "int",
},
value: {
type: "string",
},
},
},
default: [
{
logic: "and",
column: "materialCode",
action: "like",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
queryUrl,
exportUrl,
queryMethod,
exportMethod,
schema: schema,
},
};
}

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

@ -0,0 +1,99 @@
const schema = {
title: "客户替换件关系",
type: "object",
properties: {
lu: {
title: "零件号",
type: "string",
},
repLU: {
title: "替换零件号",
type: "string",
},
clientCode: {
title: "客户编码",
type: "string",
},
businessType: {
title: "业务类型",
type: "EnumBusinessType",
},
},
};
const baseUrl = "settleaccount/tb_re-parts-relationship_service";
const queryUrl = `${baseUrl}/get-list`;
const importUrl = `${baseUrl}/import`;
const exportUrl = `${baseUrl}/export`;
const queryMethod = "POST";
const importMethod = "POST";
const exportMethod = "POST";
export default function () {
return {
baseUrl,
query: {
url: queryUrl,
method: queryMethod,
schema: {
title: "客户替换件关系",
type: "object",
properties: {
filters: {
type: "array",
hidden: true,
items: {
type: "object",
properties: {
logic: {
type: "int",
},
column: {
type: "string",
},
action: {
type: "int",
},
value: {
type: "string",
},
},
},
default: [
{
logic: "and",
column: "lu",
action: "like",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
queryUrl,
importUrl,
exportUrl,
queryMethod,
importMethod,
exportMethod,
schema: schema,
},
};
}

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

@ -126,7 +126,7 @@ export default [
},
},
{
path: "query",
path: "export",
meta: {
type: "button",
title: "导出",

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

@ -24,7 +24,7 @@ export default [
},
},
{
path: "bbac_se_detail",
path: "bbac_se_detail_service",
meta: {
type: "page",
title: "JIS发运数据",
@ -32,7 +32,7 @@ export default [
},
},
{
path: "bbac_se_edi",
path: "bbac_se_edi_service",
meta: {
type: "page",
title: "EDI数据",
@ -41,37 +41,544 @@ export default [
},
],
},
{
path: "contrast",
meta: {
type: "group",
title: "数据对比",
icon: "folder",
},
children: [
{
path: "bbac_sa_detail_jobservice",
meta: {
type: "page",
title: "EDI与发运数据对比",
icon: "file",
},
},
{
path: "bbac_sa_detail_jobservice",
meta: {
type: "page",
title: "EDI、发运与结算比对",
icon: "file",
},
},
{
path: "bbac_sa_detail_jobservice",
meta: {
type: "page",
title: "发运与结算数据二次比对",
icon: "file",
},
},
{
path: "bbac_sa_detail_jobservice",
meta: {
type: "page",
title: "买单件发运与结算数据三次比对",
icon: "file",
},
},
],
},
{
path: "settlement",
meta: {
type: "group",
title: "结算开票",
icon: "folder",
},
children: [
{
path: "bbac_can_sa_service",
meta: {
type: "page",
title: "BBAC可结算单",
icon: "file",
},
},
{
path: "bbac_not_sa_service",
meta: {
type: "page",
title: "不可结算单",
icon: "file",
},
},
{
path: "bbac_ba_service",
meta: {
type: "page",
title: "商务审批",
icon: "file",
},
},
{
path: "bbac_pd_service",
meta: {
type: "page",
title: "寄售库库存扣减审批",
icon: "file",
},
},
],
},
],
/* path: "business",
},
{
path: "jis-hbpo",
meta: {
type: "group",
title: "JIS-HBPO",
icon: "folder",
},
path: "business",
children: [
{
path: "input",
meta: {
type: "group",
title: "数据输入",
icon: "folder",
},
children: [
{
path: "hbpo_sa_service",
meta: {
type: "page",
title: "JIS结算数据",
icon: "file",
},
},
{
path: "hbpo_se_detail_service",
meta: {
type: "page",
title: "JIS发运数据",
icon: "file",
},
},
{
path: "hbpo_se_edi_service",
meta: {
type: "page",
title: "EDI数据",
icon: "file",
},
},
],
},
{
path: "contrast",
meta: {
type: "group",
title: "数据对比",
icon: "folder",
},
children: [
{
path: "hbpo_sa_detail_jobservice",
meta: {
type: "page",
title: "EDI与发运数据对比",
icon: "file",
},
},
{
path: "hbpo_sa_detail_jobservice",
meta: {
type: "page",
title: "EDI、发运与结算比对",
icon: "file",
},
},
{
path: "hbpo_sa_detail_jobservice",
meta: {
type: "page",
title: "发运与结算数据二次比对",
icon: "file",
},
},
],
},
{
path: "settlement",
meta: {
type: "group",
title: "结算开票",
icon: "folder",
},
children: [
{
path: "hbpo_can_sa_service",
meta: {
type: "page",
title: "可结算单",
icon: "file",
},
},
{
path: "hbpo_not_sa_service",
meta: {
type: "page",
title: "不可结算单",
icon: "file",
},
},
{
path: "hbpo_ba_service",
meta: {
type: "page",
title: "商务审批",
icon: "file",
},
},
{
path: "hbpo_pd_service",
meta: {
type: "page",
title: "寄售库库存扣减审批",
icon: "file",
},
},
],
},
],
},
{
path: "jit",
meta: {
type: "group",
title: "直供件",
icon: "folder",
},
path: "business",
children: [
{
path: "input",
meta: {
type: "group",
title: "数据输入",
icon: "folder",
},
children: [
{
path: "pub_sa_service",
meta: {
type: "page",
title: "结算数据",
icon: "file",
},
},
{
path: "pub_se_detail_service",
meta: {
type: "page",
title: "发运数据",
icon: "file",
},
},
],
},
{
path: "contrast",
meta: {
type: "group",
title: "数据对比",
icon: "folder",
},
children: [
{
path: "pub_sa_detail_jobservice",
meta: {
type: "page",
title: "发运与结算比对",
icon: "file",
},
},
{
path: "pub_sa_detail_jobservice",
meta: {
type: "page",
title: "发运与结算二次比对",
icon: "file",
},
},
],
},
{
path: "settlement",
meta: {
type: "group",
title: "结算开票",
icon: "folder",
},
children: [
{
path: "pub_can_sa_service",
meta: {
type: "page",
title: "可结算单",
icon: "file",
},
},
{
path: "pub_not_sa_service",
meta: {
type: "page",
title: "不可结算单",
icon: "file",
},
},
{
path: "pub_ba_service",
meta: {
type: "page",
title: "商务审批",
icon: "file",
},
},
{
path: "pub_pd_service",
meta: {
type: "page",
title: "寄售库库存扣减审批",
icon: "file",
},
},
],
},
],
},
{
path: "bj",
meta: {
type: "group",
title: "备件",
icon: "folder",
},
path: "business",
children: [
{
path: "input",
meta: {
type: "group",
title: "数据输入",
icon: "folder",
},
children: [
{
path: "pub_sa_service",
meta: {
type: "page",
title: "结算数据",
icon: "file",
},
},
{
path: "pub_se_detail_service",
meta: {
type: "page",
title: "发运数据",
icon: "file",
},
},
],
},
{
path: "contrast",
meta: {
type: "group",
title: "数据对比",
icon: "folder",
},
children: [
{
path: "pub_sa_detail_jobservice",
meta: {
type: "page",
title: "发运与结算比对",
icon: "file",
},
},
{
path: "pub_sa_detail_jobservice",
meta: {
type: "page",
title: "发运与结算二次比对",
icon: "file",
},
},
],
},
{
path: "settlement",
meta: {
type: "group",
title: "结算开票",
icon: "folder",
},
children: [
{
path: "pub_can_sa_service",
meta: {
type: "page",
title: "可结算单",
icon: "file",
},
},
{
path: "pub_not_sa_service",
meta: {
type: "page",
title: "不可结算单",
icon: "file",
},
},
{
path: "pub_ba_service",
meta: {
type: "page",
title: "商务审批",
icon: "file",
},
},
{
path: "pub_pd_service",
meta: {
type: "page",
title: "寄售库库存扣减审批",
icon: "file",
},
},
],
},
],
},
{
path: "in",
meta: {
type: "group",
title: "印度件",
icon: "folder",
},
path: "business",
children: [
{
path: "input",
meta: {
type: "group",
title: "数据输入",
icon: "folder",
},
children: [
{
path: "pub_sa_service",
meta: {
type: "page",
title: "结算数据",
icon: "file",
},
},
{
path: "pub_se_detail_service",
meta: {
type: "page",
title: "发运数据",
icon: "file",
},
},
],
},
{
path: "contrast",
meta: {
type: "group",
title: "数据对比",
icon: "folder",
},
children: [
{
path: "pub_sa_detail_jobservice",
meta: {
type: "page",
title: "发运与结算比对",
icon: "file",
},
},
{
path: "pub_sa_detail_jobservice",
meta: {
type: "page",
title: "发运与结算二次比对",
icon: "file",
},
},
],
},
{
path: "settlement",
meta: {
type: "group",
title: "结算开票",
icon: "folder",
},
children: [
{
path: "pub_can_sa_service",
meta: {
type: "page",
title: "可结算单",
icon: "file",
},
},
{
path: "pub_not_sa_service",
meta: {
type: "page",
title: "不可结算单",
icon: "file",
},
},
{
path: "pub_ba_service",
meta: {
type: "page",
title: "商务审批",
icon: "file",
},
},
{
path: "pub_pd_service",
meta: {
type: "page",
title: "寄售库库存扣减审批",
icon: "file",
},
},
],
},
],
},
{
path: "inspect",
meta: {
type: "group",
title: "商务审核",
icon: "folder",
}, */
},
children: [
{
path: "invoice_grp_dto",
meta: {
type: "page",
title: "财务管理审核",
icon: "file",
},
},
],
},
];

15
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/bom.js

@ -0,0 +1,15 @@
import AppList from "../../components/list/index.js";
import html from "html";
import useConfig from "../../models/bom.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/base-data/material-relationship.js

@ -0,0 +1,15 @@
import AppList from "../../components/list/index.js";
import html from "html";
import useConfig from "../../models/material-relationship.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/base-data/tb_re-parts-relationship_service.js

@ -0,0 +1,15 @@
import AppList from "../../components/list/index.js";
import html from "html";
import useConfig from "../../models/tb_re-parts-relationship_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 };
},
};

8
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/home.js

@ -1,7 +1,7 @@
import html from 'html';
import Md from '../components/markdown/index.js'
import html from "html";
import Md from "../components/markdown/index.js";
export default {
components: { Md },
template: html`Home <md name="test"></md>`
}
template: html`<md name="home" />`,
};

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

@ -52,6 +52,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// <summary>
/// 结算日期
/// </summary>
[Display(Name = "结算日期")]
[ImporterHeader(Name = "Pstng Date")]
public DateTime SettleDate { set; get; }
@ -66,7 +67,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// <summary>
/// 生产号
/// </summary>
[Display(Name = "生产号")]
[ImporterHeader(Name = "External Delivery ID")]
[Required(ErrorMessage = "{0}不能为空")]
public string PN { get; set; }
///// <summary>
@ -80,13 +83,16 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
///// <summary>
/// 数量
/// </summary>
[Display(Name = "数量")]
[ImporterHeader(Name = "Quantity")]
public decimal Qty { get; set; }
/// <summary>
/// 结算分组号
/// </summary>
[Display(Name = "结算分组号")]
[ImporterHeader(Name = "Delivery")]
[Required(ErrorMessage = "{0}不能为空")]
public string GroupNum { get; set; }
/////// <summary>

1
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/SettleAccount.Application.Contracts.csproj

@ -7,6 +7,7 @@
<RootNamespace>Win.Sfs.SettleAccount</RootNamespace>
<Version>1.0.25</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">

127
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_SA_SERVICE.cs

@ -22,6 +22,8 @@ using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.Prices;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.SettleAccount.MaterialRelationships;
using Win.Sfs.Shared.RepositoryBase;
namespace Win.Sfs.SettleAccount.Entities.BQ
@ -63,15 +65,27 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// </summary>
private readonly INormalEfCoreRepository<PriceList, Guid> _priceListRepository;
/// <summary>
/// 客户零件关系仓储
/// </summary>
private readonly INormalEfCoreRepository<MaterialRelationship, Guid> _materialRelationshipRepository;
/// <summary>
/// 替换件关系仓储
/// </summary>
private readonly INormalEfCoreRepository<TB_RePartsRelationship, Guid> _tbRePartsRelationshipRepository;
/// <summary>
/// 构造
/// </summary>
public PUB_SA_SERVICE(INormalEfCoreRepository<PUB_SA, Guid> repository,
INormalEfCoreRepository<PUB_SA_DETAIL, Guid> pubSaDetailRepository,
INormalEfCoreRepository<PriceList, Guid> priceListRepository,
INormalEfCoreRepository<PUB_CAN_SA, Guid> pubCanSaRepository,
INormalEfCoreRepository<PUB_CAN_SA_DETAIL, Guid> pubCanSaDetailRepository,
INormalEfCoreRepository<PUB_NOT_SA_DETAIL, Guid> pubNotSaDetailRepository,
INormalEfCoreRepository<PriceList, Guid> priceListRepository,
INormalEfCoreRepository<MaterialRelationship, Guid> materialRelationshipRepository,
INormalEfCoreRepository<TB_RePartsRelationship, Guid> tbRePartsRelationshipRepository,
IDistributedCache<PUB_SA> cache,
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
@ -84,6 +98,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
_pubCanSaDetailRepository = pubCanSaDetailRepository;
_pubNotSaDetailRepository = pubNotSaDetailRepository;
_priceListRepository = priceListRepository;
_materialRelationshipRepository = materialRelationshipRepository;
_tbRePartsRelationshipRepository = tbRePartsRelationshipRepository;
}
#region 直供件
@ -97,8 +113,39 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
[HttpPost]
public async Task<string> ZGJImportAsync([FromForm] IFormFileCollection files)
{
//数据校验
var checkList = new List<ErrorExportDto>();
//类型(直供件)
EnumBusinessType businessType = EnumBusinessType.ZhiGongJian;
var businessType = EnumBusinessType.ZhiGongJian;
//结算单号
var pubSaBillNum = OrderNumberGenerator.GenerateOrderNumber("SA");
//结算主表
var pubSa = new PUB_SA()
{
BillNum = pubSaBillNum,
State = "1"
};
//结算明细
var pubSaDetails = new List<PUB_SA_DETAIL>();
//可算单号
var pubCanSaBillNum = OrderNumberGenerator.GenerateOrderNumber("C");
//可算主表
var pubCanSa = new PUB_CAN_SA()
{
BillNum = pubCanSaBillNum,
SettleBillNum = pubSaBillNum,
State = SettleBillState.,
BusinessType = businessType
};
//可结算明细
var pubCanSaDetails = new List<PUB_CAN_SA_DETAIL>();
//不可结算明细
var pubNotSaDetails = new List<PUB_NOT_SA_DETAIL>();
//客户零件关系
var materialRelationships = new List<MaterialRelationship>();
#region 导入数据转换、数据校验
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.UploadExcelImport<ZGJ_PUB_SA_DETAIL_IMPORT_DTO>(files, _excelImportService);
var importPubSaDetails = ObjectMapper.Map<List<ZGJ_PUB_SA_DETAIL_IMPORT_DTO>, List<PUB_SA_DETAIL>>(result);
@ -106,15 +153,27 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
//结算分组号
var pubSaGroupNums = importPubSaDetails.Select(t => t.GroupNum).Distinct();
//销售价格
var priceListEntitys = await _priceListRepository.GetAllAsync();
//已存在的结算分组号
var havPubSaGroupNums = (await _pubSaDetailRepository.GetListAsync(t => pubSaGroupNums.Contains(t.GroupNum))).Select(t => t.GroupNum).Distinct();
if (havPubSaGroupNums.Any() == true)
{
foreach (var item in havPubSaGroupNums)
{
checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, $"结算分组号{item}已存在", string.Empty));
}
//throw new UserFriendlyException($"导入失败,结算分组号({string.Join(",", havPubSaGroupNums)})已存在", "400");
}
var pubSaBillNum = OrderNumberGenerator.GenerateOrderNumber("SA");
var pubSa = new PUB_SA()
if (checkList.Count > 0)
{
BillNum = pubSaBillNum,
State = "1"
};
return await ExportErrorReportAsync(checkList);
}
#endregion
#region 处理结算数据
//销售价格
var priceListEntitys = await _priceListRepository.GetAllAsync();
importPubSaDetails.ForEach(importPubSaDetail =>
{
@ -136,28 +195,42 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
importPubSaDetail.Price = priceListEntity?.Price ?? 0;
});
//可结算
var pubCanSaBillNum = OrderNumberGenerator.GenerateOrderNumber("C");
var pubCanSa = new PUB_CAN_SA()
//导入的零件号集合
var importPubSaLUs = importPubSaDetails.Select(t => t.LU).Distinct();
var materialRelationshipEntitys = await _materialRelationshipRepository.GetListAsync(t => importPubSaLUs.Contains(t.SettleMaterialCode));
var materialRelationshipEntitySettleMaterialCodes = materialRelationshipEntitys.Select(t => t.SettleMaterialCode).Distinct();
/*
* ()
*
* 6-
*/
var noExistSettleMaterialCodes = importPubSaLUs.Except(materialRelationshipEntitySettleMaterialCodes);
noExistSettleMaterialCodes.ForEach(t =>
{
BillNum = pubCanSaBillNum,
SettleBillNum = pubSaBillNum,
State = SettleBillState.,
BusinessType = businessType
};
var materialRelationship = new MaterialRelationship(GuidGenerator.Create(), t.Replace(" ", "-"), "", t);
materialRelationships.Add(materialRelationship);
});
#endregion
#region 入库数据赋值
//结算明细
pubSaDetails = importPubSaDetails;
//不可结算 结算分组号码(根据价格区分结算、不可结算)
var pubNotSaGroupNums = importPubSaDetails.FindAll(t => t.Price == default(decimal)).Select(t => t.GroupNum).Distinct();
var pubSaDetailsCanSes = importPubSaDetails.FindAll(t => pubNotSaGroupNums.Contains(t.GroupNum) == false);
var pubSaDetailsNotCanSes = importPubSaDetails.FindAll(t => pubNotSaGroupNums.Contains(t.GroupNum) == true);
//可结算
var pubCanSaDetails = ObjectMapper.Map<List<PUB_SA_DETAIL>, List<PUB_CAN_SA_DETAIL>>(pubSaDetailsCanSes);
//不可结算
var pubNotSaDetails = ObjectMapper.Map<List<PUB_SA_DETAIL>, List<PUB_NOT_SA_DETAIL>>(pubSaDetailsNotCanSes);
//可结算明细
pubCanSaDetails = ObjectMapper.Map<List<PUB_SA_DETAIL>, List<PUB_CAN_SA_DETAIL>>(pubSaDetailsCanSes);
//不可结算明细
pubNotSaDetails = ObjectMapper.Map<List<PUB_SA_DETAIL>, List<PUB_NOT_SA_DETAIL>>(pubSaDetailsNotCanSes);
#endregion
//添加入库
#region 添加入库
await _repository.InsertAsync(pubSa);
await _pubSaDetailRepository.InsertManyAsync(importPubSaDetails);
if (pubCanSaDetails.Count > 0)
@ -182,6 +255,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
await _pubNotSaDetailRepository.InsertManyAsync(pubNotSaDetails);
}
if (materialRelationships.Count > 0)
{
await _materialRelationshipRepository.InsertManyAsync(materialRelationships);
}
#endregion
return ApplicationConsts.SuccessStr;
}
@ -245,7 +324,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
//验证可结算主表状态
if (pubCanSaDelEntitys.Any(t => t.State != SettleBillState.))
{
throw new UserFriendlyException($"该单据可结算单状态无法删除!");
throw new UserFriendlyException($"该单据可结算单状态无法删除!", "400");
}
pubSaDetailDelEntitys = await _pubSaDetailRepository.GetListAsync(t => t.BillNum == pubSaBillNum);

84
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/Boms/BomAppService.cs

@ -27,12 +27,12 @@ namespace Win.Sfs.SettleAccount.Boms
public class BomAppService : SettleAccountApplicationBase<Bom>
{
/// <summary>
/// BOM�ִ�
/// BOM仓储
/// </summary>
private readonly INormalEfCoreRepository<Bom, Guid> _repository;
/// <summary>
/// ����
/// 构造
/// </summary>
public BomAppService(
INormalEfCoreRepository<Bom, Guid> repository,
@ -40,14 +40,14 @@ namespace Win.Sfs.SettleAccount.Boms
IExcelImportAppService excelImportService,
ISnowflakeIdGenerator snowflakeIdGenerator,
ICommonManager commonManager
) : base(cache,excelImportService,snowflakeIdGenerator,commonManager)
) : base(cache, excelImportService, snowflakeIdGenerator, commonManager)
{
_repository = repository;
}
#region ����
#region 导出
/// <summary>
/// ����
/// 导出
/// </summary>
[HttpPost]
public virtual async Task<string> ExportAsync(BomRequestDto input)
@ -55,16 +55,16 @@ namespace Win.Sfs.SettleAccount.Boms
string _fileName = string.Format("BOM_{0}.xlsx", DateTime.Now.ToString("yyyyMMdd"));
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue,
0, true);
var dtoDetails = ObjectMapper.Map<List<Bom>, List<BomExportDto> >(entities);
var dtoDetails = ObjectMapper.Map<List<Bom>, List<BomExportDto>>(entities);
//������������
//声明导出容器
ExportImporter _exportImporter = new ExportImporter();
var result = await _exportImporter.ExcelExporter(dtoDetails);
result.ShouldNotBeNull();
//���浼���ļ�����������ɶ�����
//保存导出文件到服务器存成二进制
await _excelImportService.SaveBlobAsync(
new SaveExcelImportInputDto
{
@ -78,7 +78,7 @@ namespace Win.Sfs.SettleAccount.Boms
#region CURD
/// <summary>
/// ��ȡ�б�
/// 获取列表
/// </summary>
[HttpPost]
public async Task<PagedResultDto<BomDto>> GetListAsync(BomRequestDto input)
@ -90,13 +90,13 @@ namespace Win.Sfs.SettleAccount.Boms
}
#endregion
#region ԭ������������
// #region ���뵼������
#region 原方法(废弃)
// #region 导入导出功能
// /// <summary>
// /// ���빦��
// /// 导入功能
// /// </summary>
// /// <param name="files">�ϴ����ļ�(ǰ���Ѿ�����ֻ���ϴ�һ������)</param>
// /// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
// /// <returns></returns>
// [HttpPost]
// [Route("ExcelImport-Map")]
@ -121,7 +121,7 @@ namespace Win.Sfs.SettleAccount.Boms
// {
// if (itm.Count > 1)
// {
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("���ܵ��븸����{0},�ӱ���{1}���ظ�����", itm.ParentItmeCode, itm.ChildItemCode), string.Empty));
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("不能导入父编码{0},子编码{1}有重复数据", itm.ParentItmeCode, itm.ChildItemCode), string.Empty));
// }
// }
// var _id = GuidGenerator.Create();
@ -131,7 +131,7 @@ namespace Win.Sfs.SettleAccount.Boms
// {
// if (!_matList.Any(p => p.MaterialCode == itm.ParentItemCode))
// {
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, itm.ParentItemCode, string.Empty, string.Format("���������ݲ��������Ϻ�{0}��", itm.ParentItemCode), string.Empty));
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, itm.ParentItemCode, string.Empty, string.Format("物料主数据不存在物料号{0}!", itm.ParentItemCode), string.Empty));
// continue;
// }
// itm.SetValue(GuidGenerator.Create(), branchId, year, period, version, _id, factory);
@ -150,9 +150,9 @@ namespace Win.Sfs.SettleAccount.Boms
// /// <summary>
// /// ���빦��
// /// 导入功能
// /// </summary>
// /// <param name="files">�ϴ����ļ�(ǰ���Ѿ�����ֻ���ϴ�һ������)</param>
// /// <param name="files">上传的文件(前端已经限制只能上传一个附件)</param>
// /// <returns></returns>
// [HttpPost]
// [Route("ExcelImport")]
@ -176,7 +176,7 @@ namespace Win.Sfs.SettleAccount.Boms
// {
// if (itm.Count > 1)
// {
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("���ܵ��븸����{0},�ӱ���{1}���ظ�����", itm.ParentItmeCode, itm.ChildItemCode), string.Empty));
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("不能导入父编码{0},子编码{1}有重复数据", itm.ParentItmeCode, itm.ChildItemCode), string.Empty));
// }
// }
// var _id = GuidGenerator.Create();
@ -186,7 +186,7 @@ namespace Win.Sfs.SettleAccount.Boms
// {
// if (!_matList.Any(p => p.MaterialCode == itm.ParentItemCode))
// {
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, itm.ParentItemCode, string.Empty, string.Format("���������ݲ��������Ϻ�{0}��", itm.ParentItemCode), string.Empty));
// checkList.Add(new ErrorExportDto(version, customerCode, string.Empty, string.Empty, itm.ParentItemCode, string.Empty, string.Format("物料主数据不存在物料号{0}!", itm.ParentItemCode), string.Empty));
// continue;
// }
// itm.SetValue(GuidGenerator.Create(),branchId,year,period,version,_id,factory);
@ -201,7 +201,7 @@ namespace Win.Sfs.SettleAccount.Boms
// return ApplicationConsts.SuccessStr;
// }
// /// <summary>
// /// �����ļ�
// /// 导出文件
// /// </summary>
// /// <param name="input"></param>
// /// <returns></returns>
@ -212,7 +212,7 @@ namespace Win.Sfs.SettleAccount.Boms
// {
// IExporter _csv = new CsvExporter();
// IExporter _excel = new ExcelExporter();
// //�������ϰ汾��������������ȫ����
// //导出加上版本过滤条件,不能全导出
// if (input.ParentId != Guid.Empty)
// {
// input.Filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ParentId", Logic = EnumFilterLogic.And, Value = input.ParentId.ToString() });
@ -225,23 +225,23 @@ namespace Win.Sfs.SettleAccount.Boms
// 0, true);
// var dtoDetails = ObjectMapper.Map<List<Bom>, List<BomExportDto>>(entities);
// string _fileName = string.Empty;
// //������������
// //声明导出容器
// byte[] result = null;
// switch (input.FileType)
// {
// case 0:
// _fileName = string.Format("��Ʒ�ṹ_{0}.csv", input.UserId.ToString());
// _fileName = string.Format("产品结构_{0}.csv", input.UserId.ToString());
// result = await _csv.ExportAsByteArray(dtoDetails);
// break;
// case 1:
// _fileName = string.Format("��Ʒ�ṹ_{0}.xlsx", input.UserId.ToString());
// _fileName = string.Format("产品结构_{0}.xlsx", input.UserId.ToString());
// result = await _excel.ExportAsByteArray(dtoDetails);
// break;
// }
// result.ShouldNotBeNull();
// //���浼���ļ�����������ɶ�����
// //保存导出文件到服务器存成二进制
// await _excelImportService.SaveBlobAsync(
// new SaveExcelImportInputDto
// {
@ -254,13 +254,13 @@ namespace Win.Sfs.SettleAccount.Boms
// #endregion
// /// <summary>
// /// ��ID��ȡΨһʵ��
// /// 按ID获取唯一实体
// /// </summary>
// /// <remarks>
// /// ����ʵ��ȫ������
// /// 返回实体全部属性
// /// </remarks>
// /// <param name="id">ID</param>
// /// <returns>ʵ��DTO</returns>
// /// <returns>实体DTO</returns>
// [HttpGet]
// [Route("{id}")]
//[Authorize(SettleAccountPermissions.Boms.Default)]
@ -291,9 +291,9 @@ namespace Win.Sfs.SettleAccount.Boms
// }
// /// <summary>
// /// ��ȡʵ������
// /// 获取实体总数
// /// </summary>
// /// <returns>ʵ������</returns>
// /// <returns>实体总数</returns>
// [HttpGet]
// [Route("count")]
//[Authorize(SettleAccountPermissions.Boms.Default)]
@ -305,10 +305,10 @@ namespace Win.Sfs.SettleAccount.Boms
// /// <summary>
// /// ɾ��ʵ��
// /// 删除实体
// /// </summary>
// /// <param name="id">ID</param>
// /// <returns>��</returns>
// /// <returns></returns>
// [HttpDelete]
// [Route("{id}")]
//[Authorize(SettleAccountPermissions.Boms.Delete)]
@ -320,10 +320,10 @@ namespace Win.Sfs.SettleAccount.Boms
// }
// /// <summary>
// /// ��IDsɾ��ʵ���б�
// /// 按IDs删除实体列表
// /// </summary>
// /// <param name="ids">IDs</param>
// /// <returns>�Ƿ�ִ�гɹ�</returns>
// /// <returns>是否执行成功</returns>
// [HttpPost]
// [Route("delete")]
//[Authorize(SettleAccountPermissions.Boms.Delete)]
@ -342,13 +342,13 @@ namespace Win.Sfs.SettleAccount.Boms
// ///// <summary>
// /// <summary>
// /// ����ɸѡ������ȡʵ���б�
// /// 根据筛选条件获取实体列表
// /// </summary>
// /// <remarks>
// /// ������������:ɸѡ�����б�,��������,��������,ҳ��
// /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
// /// </remarks>
// /// <param name="input">��������</param>
// /// <returns>ʵ��DTO�б�</returns>
// /// <param name="input">请求条件</param>
// /// <returns>实体DTO列表</returns>
// [HttpPost]
// [Route("list")]
// [Authorize(SettleAccountPermissions.Boms.Default)]
@ -372,13 +372,13 @@ namespace Win.Sfs.SettleAccount.Boms
// ///// <summary>
// /// <summary>
// /// ����ɸѡ������ȡʵ���б�
// /// 根据筛选条件获取实体列表
// /// </summary>
// /// <remarks>
// /// ������������:ɸѡ�����б�,��������,��������,ҳ��
// /// 请求条件包括:筛选条件列表,排序条件,数据数量,页码
// /// </remarks>
// /// <param name="input">��������</param>
// /// <returns>ʵ��DTO�б�</returns>
// /// <param name="input">请求条件</param>
// /// <returns>实体DTO列表</returns>
// [HttpPost]
// [Route("listVersion")]
// [Authorize(SettleAccountPermissions.Boms.Default)]

13
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/MaterialRelationships/MaterialRelationshipAppService.cs

@ -12,6 +12,7 @@ using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.CommonManagers;
using Win.Sfs.SettleAccount.Constant;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.ExcelImporter;
using Win.Sfs.SettleAccount.ExportReports;
using Win.Sfs.SettleAccount.MaterialRelationships;
@ -72,6 +73,10 @@ namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships
checkList.Add(new ErrorExportDto(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Format("ERP物料号{0}有重复", itm.Key.ErpMaterialCode), string.Empty));
}
}
if (checkList.Count > 0)
{
return await ExportErrorReportAsync(checkList);
}
foreach (var itm in _ls)
{
var _first = _repository.FirstOrDefault(p => p.ErpMaterialCode == itm.ErpMaterialCode);
@ -85,10 +90,6 @@ namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships
await _repository.InsertAsync(itm);
}
}
if (checkList.Count > 0)
{
return await ExportErrorReportAsync(checkList);
}
return ApplicationConsts.SuccessStr;
}
@ -96,7 +97,7 @@ namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships
/// 导出
/// </summary>
[HttpPost]
public async Task<string> ExportAsync(RequestDtoBase input)
public async Task<string> ExportAsync(RequestDto input)
{
string fileName = $"客户零件关系_{Guid.NewGuid()}.xlsx";
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, int.MaxValue, 0, true);
@ -116,7 +117,7 @@ namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships
/// 获取列表
/// </summary>
[HttpPost]
public async Task<PagedResultDto<MaterialRelationshipDto>> GetListAsync(RequestDtoBase input)
public async Task<PagedResultDto<MaterialRelationshipDto>> GetListAsync(RequestDto input)
{
var entities = await _repository.GetListByFilterAsync(input.Filters, input.Sorting, input.MaxResultCount, input.SkipCount, true);
var totalCount = await _repository.GetCountByFilterAsync(input.Filters);

7
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/MaterialRelationships/MaterialRelationship.cs

@ -96,5 +96,12 @@ namespace Win.Sfs.SettleAccount.MaterialRelationships
ShipMaterailCode = shipMaterailCode;
AppraisalCategory = appraisalCategory;
}
public MaterialRelationship(Guid id, string erpMaterialCode, string materialDesc, string settlMaterialCode) : base(id)
{
ErpMaterialCode = erpMaterialCode;
MaterialDesc = materialDesc;
SettleMaterialCode = settlMaterialCode;
}
}
}

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

@ -280,19 +280,10 @@ namespace Win.Sfs.SettleAccount
{
b.ToTable($"{options.TablePrefix}_relationship", options.Schema);
b.ConfigureByConvention();
//b.Property(x => x.SettleMaterialCode).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.MaterialProperty).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
//b.Property(x => x.ShipMaterailCode).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.Property(x => x.ErpMaterialCode).IsRequired().HasMaxLength(CommonConsts.MaxCodeLength);
b.HasIndex(x => new { x.ErpMaterialCode });
b.HasIndex(x => new { x.ErpMaterialCode }).IsUnique().HasFilter(IsDeletedFilter);
});
}

4023
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230718010724_20230718-1.Designer.cs

File diff suppressed because it is too large

163
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230718010724_20230718-1.cs

@ -0,0 +1,163 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class _202307181 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Site",
table: "Set_BBAC_CAN_SA");
migrationBuilder.AlterColumn<string>(
name: "MaterialProperty",
table: "Set_relationship",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(36)",
oldMaxLength: 36);
migrationBuilder.AddColumn<string>(
name: "Extend1",
table: "Set_PUB_PD_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Extend2",
table: "Set_PUB_PD_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Extend3",
table: "Set_PUB_PD_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Extend4",
table: "Set_PUB_PD_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Extend1",
table: "Set_HBPO_PD_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Extend2",
table: "Set_HBPO_PD_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Extend3",
table: "Set_HBPO_PD_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Extend4",
table: "Set_HBPO_PD_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Extend1",
table: "Set_BBAC_PD_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Extend2",
table: "Set_BBAC_PD_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Extend3",
table: "Set_BBAC_PD_DETAIL",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Extend4",
table: "Set_BBAC_PD_DETAIL",
type: "nvarchar(max)",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Extend1",
table: "Set_PUB_PD_DETAIL");
migrationBuilder.DropColumn(
name: "Extend2",
table: "Set_PUB_PD_DETAIL");
migrationBuilder.DropColumn(
name: "Extend3",
table: "Set_PUB_PD_DETAIL");
migrationBuilder.DropColumn(
name: "Extend4",
table: "Set_PUB_PD_DETAIL");
migrationBuilder.DropColumn(
name: "Extend1",
table: "Set_HBPO_PD_DETAIL");
migrationBuilder.DropColumn(
name: "Extend2",
table: "Set_HBPO_PD_DETAIL");
migrationBuilder.DropColumn(
name: "Extend3",
table: "Set_HBPO_PD_DETAIL");
migrationBuilder.DropColumn(
name: "Extend4",
table: "Set_HBPO_PD_DETAIL");
migrationBuilder.DropColumn(
name: "Extend1",
table: "Set_BBAC_PD_DETAIL");
migrationBuilder.DropColumn(
name: "Extend2",
table: "Set_BBAC_PD_DETAIL");
migrationBuilder.DropColumn(
name: "Extend3",
table: "Set_BBAC_PD_DETAIL");
migrationBuilder.DropColumn(
name: "Extend4",
table: "Set_BBAC_PD_DETAIL");
migrationBuilder.AlterColumn<string>(
name: "MaterialProperty",
table: "Set_relationship",
type: "nvarchar(36)",
maxLength: 36,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AddColumn<string>(
name: "Site",
table: "Set_BBAC_CAN_SA",
type: "nvarchar(max)",
nullable: true);
}
}
}

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

@ -79,9 +79,6 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Site")
.HasColumnType("nvarchar(max)");
b.Property<int>("State")
.HasMaxLength(50)
.HasColumnType("int");
@ -328,6 +325,18 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<string>("Extend1")
.HasColumnType("nvarchar(max)");
b.Property<string>("Extend2")
.HasColumnType("nvarchar(max)");
b.Property<string>("Extend3")
.HasColumnType("nvarchar(max)");
b.Property<string>("Extend4")
.HasColumnType("nvarchar(max)");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
@ -1258,6 +1267,18 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<string>("Extend1")
.HasColumnType("nvarchar(max)");
b.Property<string>("Extend2")
.HasColumnType("nvarchar(max)");
b.Property<string>("Extend3")
.HasColumnType("nvarchar(max)");
b.Property<string>("Extend4")
.HasColumnType("nvarchar(max)");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
@ -2668,6 +2689,18 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<string>("Extend1")
.HasColumnType("nvarchar(max)");
b.Property<string>("Extend2")
.HasColumnType("nvarchar(max)");
b.Property<string>("Extend3")
.HasColumnType("nvarchar(max)");
b.Property<string>("Extend4")
.HasColumnType("nvarchar(max)");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
@ -3963,9 +3996,7 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("nvarchar(max)");
b.Property<string>("MaterialProperty")
.IsRequired()
.HasMaxLength(36)
.HasColumnType("nvarchar(36)");
.HasColumnType("nvarchar(max)");
b.Property<string>("Remark")
.HasColumnType("nvarchar(max)");

BIN
docs/结算界面查询条件.xlsx

Binary file not shown.
Loading…
Cancel
Save