mahao 1 year ago
parent
commit
87e52ab404
  1. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
  2. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/code-setting.js
  3. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/ke-hu.js
  4. 1
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/role.js
  5. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/user.js
  6. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/version.js
  7. 1
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/edi.js
  8. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/cost.js
  9. 132
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/sum.js
  10. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  11. 44
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/sum.js
  12. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
  13. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_PD_SERVICE.cs
  14. 182
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
  15. 62
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs
  16. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PD_MNG.cs
  17. 131
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/TED_SA_INV.cs
  18. 32
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  19. 5870
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230904064849_202309040005.Designer.cs
  20. 246
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230904064849_202309040005.cs
  21. 139
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs

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

@ -91,7 +91,7 @@ export default {
</el-table-column> </el-table-column>
</template> </template>
<template v-else> <template v-else>
<template v-if="showColumn(item,key)"> <template v-if="!item.hideForList&&showColumn(item,key)">
<el-table-column :prop="key" sortable="custom" :sort-orders="['descending', 'ascending', null]" :filters="getFilters(item,key)"> <el-table-column :prop="key" sortable="custom" :sort-orders="['descending', 'ascending', null]" :filters="getFilters(item,key)">
<template #header="scope">{{item.title}}</template> <template #header="scope">{{item.title}}</template>
<template #default="scope"> <template #default="scope">
@ -411,7 +411,7 @@ export default {
const getColumns = (schema) => { const getColumns = (schema) => {
Object.keys(schema.properties).forEach((propertyName) => { Object.keys(schema.properties).forEach((propertyName) => {
const property = schema.properties[propertyName]; const property = schema.properties[propertyName];
if (property.showForList || (property.type !== "object" && property.type !== "array" && !property.hidden)) { if (!property.hideForList || (property.type !== "object" && property.type !== "array" && !property.hidden)) {
columns.value.push({ name: propertyName, title: property.title, checked: true }); columns.value.push({ name: propertyName, title: property.title, checked: true });
} }
}); });

3
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/code-setting.js

@ -6,7 +6,6 @@ const schema = {
title: "项目", title: "项目",
type: "string", type: "string",
readOnly: true, readOnly: true,
showForList: true,
rules: [ rules: [
{ {
required: true, required: true,
@ -17,7 +16,6 @@ const schema = {
title: "值", title: "值",
type: "string", type: "string",
readOnly: true, readOnly: true,
showForList: true,
rules: [ rules: [
{ {
required: true, required: true,
@ -28,7 +26,6 @@ const schema = {
title: "描述", title: "描述",
type: "string", type: "string",
input: "textarea", input: "textarea",
showForList: true,
rules: [ rules: [
{ {
required: true, required: true,

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/ke-hu.js

@ -6,7 +6,6 @@ const schema = {
title: "业务类别", title: "业务类别",
type: "string", type: "string",
readOnly: true, readOnly: true,
showForList: true,
rules: [ rules: [
{ {
required: true, required: true,
@ -17,7 +16,6 @@ const schema = {
title: "库位", title: "库位",
type: "string", type: "string",
readOnly: true, readOnly: true,
showForList: true,
rules: [ rules: [
{ {
required: true, required: true,

1
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/role.js

@ -6,7 +6,6 @@ const schema = {
name: { name: {
title: "角色名", title: "角色名",
type: "string", type: "string",
showForList: true,
readOnly: true, readOnly: true,
rules: [ rules: [
{ {

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/user.js

@ -7,7 +7,6 @@ const schema = {
title: "用户名", title: "用户名",
type: "string", type: "string",
readOnly: true, readOnly: true,
showForList: true,
rules: [ rules: [
{ {
required: true, required: true,
@ -37,7 +36,6 @@ const schema = {
name: { name: {
title: "姓名", title: "姓名",
type: "string", type: "string",
showForList: true,
rules: [ rules: [
{ {
required: true, required: true,
@ -48,7 +46,6 @@ const schema = {
phoneNumber: { phoneNumber: {
title: "电话", title: "电话",
type: "string", type: "string",
showForList: true,
rules: [ rules: [
{ {
required: true, required: true,
@ -59,7 +56,6 @@ const schema = {
email: { email: {
title: "邮箱", title: "邮箱",
type: "string", type: "string",
showForList: true,
rules: [{ required: true }, { pattern: "^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z]{2,4})+$", message: "%s必须是正确的格式" }], rules: [{ required: true }, { pattern: "^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z]{2,4})+$", message: "%s必须是正确的格式" }],
}, },
roleNames: { roleNames: {

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/base-data/version.js

@ -6,7 +6,6 @@ const schema = {
title: "年度", title: "年度",
type: "string", type: "string",
hidden: true, hidden: true,
showForList: true,
rules: [ rules: [
{ {
required: true, required: true,
@ -17,7 +16,6 @@ const schema = {
title: "期间", title: "期间",
type: "string", type: "string",
hidden: true, hidden: true,
showForList: true,
rules: [ rules: [
{ {
required: true, required: true,
@ -29,7 +27,6 @@ const schema = {
type: "string", type: "string",
input: "month", input: "month",
format: "YYYYMM", format: "YYYYMM",
showForList: true,
watch: "(model,value)=>{model.year=value.substr(0,4);model.period=value.substr(4,2);}", watch: "(model,value)=>{model.year=value.substr(0,4);model.period=value.substr(4,2);}",
rules: [ rules: [
{ {
@ -41,7 +38,6 @@ const schema = {
state: { state: {
title: "状态", title: "状态",
type: "boolean", type: "boolean",
showForList: true,
default: true, default: true,
rules: [ rules: [
{ {

1
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/edi.js

@ -41,7 +41,6 @@ const schema = {
id: { id: {
type: "string", type: "string",
hidden: true, hidden: true,
showForList: false,
}, },
}, },
}; };

3
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/cost.js

@ -6,7 +6,6 @@ const schema = {
title: "项目", title: "项目",
type: "string", type: "string",
readOnly: true, readOnly: true,
showForList: true,
rules: [ rules: [
{ {
required: true, required: true,
@ -17,7 +16,6 @@ const schema = {
title: "值", title: "值",
type: "string", type: "string",
readOnly: true, readOnly: true,
showForList: true,
rules: [ rules: [
{ {
required: true, required: true,
@ -28,7 +26,6 @@ const schema = {
title: "描述", title: "描述",
type: "string", type: "string",
input: "textarea", input: "textarea",
showForList: true,
rules: [ rules: [
{ {
required: true, required: true,

132
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/sum.js

@ -0,0 +1,132 @@
import useVmi from "./vmi.js";
const schema = Object.assign({}, useVmi());
Object.keys(schema.properties).forEach((o) => {
if (o !== "erpToLoc" && o !== "realPartCode" && o !== "qty") {
schema.properties[o].hideForList = true;
}
});
const baseUrl = "settleaccount/vmi";
const queryUrl = `${baseUrl}/balance-sum`;
const exportUrl = `${baseUrl}/balance-sum-export`;
const queryMethod = "POST";
const exportMethod = "POST";
export default function () {
return {
query: {
url: queryUrl,
method: queryMethod,
hasFilter: true,
schema: {
title: "寄售库存",
type: "object",
properties: {
filters: {
title: "项目",
type: "array",
hidden: true,
items: {
type: "object",
properties: {
logic: {
type: "int",
},
column: {
type: "string",
},
action: {
type: "int",
},
value: {
type: "string",
},
},
},
default: [
{
logic: "and",
column: "billTime",
action: "biggerThanOrEqual",
value: null,
readOnly: true,
title: "发运开始",
},
{
logic: "and",
column: "billTime",
action: "smallThan",
value: null,
readOnly: true,
title: "发运结束",
},
{
logic: "and",
column: "erpToLoc",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "realPartCode",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "custPartCode",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "vinCode",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "codeType",
action: "equal",
value: null,
readOnly: true,
},
{
logic: "and",
column: "deliverBillType",
action: "equal",
value: null,
readOnly: true,
},
],
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
sorting: {
hidden: true,
},
},
},
},
table: {
schema: schema,
},
edit: {
exportUrl,
exportMethod,
schema: schema,
},
};
}

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

@ -404,6 +404,10 @@ export default [
...createPage("balance", "title=库存余额查询"), ...createPage("balance", "title=库存余额查询"),
children: [createButton("query", "title=查询&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")], children: [createButton("query", "title=查询&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")],
}, },
{
...createPage("sum", "title=库存余额汇总"),
children: [createButton("query", "title=查询&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")],
},
{ {
...createPage("backup", "title=时点库存余额查询"), ...createPage("backup", "title=时点库存余额查询"),
children: [ children: [

44
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/sum.js

@ -0,0 +1,44 @@
import AppList from "../../components/list/index.js";
import html from "html";
import { ref, onMounted, onUnmounted } from "vue";
import { useRoute } from "vue-router";
import { ElNotification } from "element-plus";
import request from "../../request/index.js";
export default {
components: { AppList },
template: html`<app-list v-if="config" :config="config" @command="onCommand" />`,
setup() {
const config = ref(null);
const route = useRoute();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
};
const showMessage = async (data) => {
await ElNotification.closeAll();
ElNotification({
position: "bottom-right",
title: "提示",
message: `待同步库存数量: ${data}`,
duration: 0,
});
};
const event = "VmiBalance";
onMounted(async () => {
const model = "vmi/sum";
const useConfig = (await import(`../../models/${model}.js`)).default;
config.value = useConfig(route.meta?.businessType, route.meta);
const result = await request("settleaccount/vmi-async-message/get-message-count", null, { method: "POST" });
if (!result.errors) {
showMessage(result.data);
}
PubSub.subscribe(event, async (_, data) => {
if (route.path === "/vmi/sum") {
showMessage(data);
}
});
});
onUnmounted(() => PubSub.unsubscribe(event));
return { config, onCommand };
},
};

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

@ -75,10 +75,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
_invMng = invMng; _invMng = invMng;
} }
/// <summary> /// <summary>
/// 通过审核 /// 通过审核
/// </summary> /// </summary>
@ -286,7 +282,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
}; };
entity.INVOICE_NOT_SETTLE = notquery.ToList(); entity.INVOICE_NOT_SETTLE = notquery.ToList();
entity.INVOICE_MAP_GROUP = mquery.ToList(); entity.INVOICE_MAP_GROUP = mquery.ToList();
entity.ADJ_DETAIL = adjQuery.ToList(); entity.ADJ_DETAIL = adjQuery.ToList();
return entity; return entity;

3
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_PD_SERVICE.cs

@ -44,9 +44,6 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
List<CustomCondition> customConditionList = new List<CustomCondition>(); List<CustomCondition> customConditionList = new List<CustomCondition>();
customConditionList.Add(new CustomCondition() { Name = "BillNumList", Value = string.Join(",", p_list) }); customConditionList.Add(new CustomCondition() { Name = "BillNumList", Value = string.Join(",", p_list) });
var first=detailist.FirstOrDefault(); var first=detailist.FirstOrDefault();
customConditionList.Add(new CustomCondition() { Name = "Type", Value = first.BusinessType.ToString()}); customConditionList.Add(new CustomCondition() { Name = "Type", Value = first.BusinessType.ToString()});
customConditionList.Add(new CustomCondition() { Name = "IsOut", Value = "out" }); customConditionList.Add(new CustomCondition() { Name = "IsOut", Value = "out" });
var ls = _repository.Where(p => p_list.Contains(p.BillNum)).ToList(); var ls = _repository.Where(p => p_list.Contains(p.BillNum)).ToList();

182
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs

@ -38,57 +38,44 @@ public class PendingDeductionService : ApplicationService, ITransientDependency,
public PendingDeductionService( public PendingDeductionService(
SettleAccountDbContext dbcontext, SettleAccountDbContext dbcontext,
IEmailSender emailSender IEmailSender emailSender
) )
{ {
_emailSender = emailSender; _emailSender = emailSender;
_dbcontext = dbcontext; _dbcontext = dbcontext;
} }
[UnitOfWork(false)] [UnitOfWork(false)]
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property) public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property)
{ {
var billList = property.Where(p => p.Name == "BillNumList").FirstOrDefault().Value; var billList = property.Where(p => p.Name == "BillNumList").FirstOrDefault().Value;
var type = property.Where(p => p.Name == "Type").FirstOrDefault().Value; var type = property.Where(p => p.Name == "Type").FirstOrDefault().Value;
var isout = property.Where(p => p.Name == "IsOut").FirstOrDefault().Value; var isout = property.Where(p => p.Name == "IsOut").FirstOrDefault().Value;
var email = string.Empty; var email = string.Empty;
// property.Where(p => p.Name == "CurrentUserEmail").FirstOrDefault().Value;
// property.Where(p => p.Name == "CurrentUserEmail").FirstOrDefault().Value;
var list = billList.Split(","); var list = billList.Split(",");
var projectList = _dbcontext.Set<CodeSetting>().Where(p => p.Project == "库位"); var projectList = _dbcontext.Set<CodeSetting>().Where(p => p.Project == "库位");
if (type == "JisBBAC" || type == "ZhiGongJianBBAC" || type == "MaiDanJianBBAC" || type == "BeiJian")
//JisBBAC
//JisHBPO
//ZhiGongJianBBAC
//ZhiGongJianHBPO
//MaiDanJianBBAC
//MaiDanJianHBPO
//BeiJian
//YinDuJian
if (type == "JisBBAC" || type == "ZhiGongJianBBAC" || type == "MaiDanJianBBAC" || type== "BeiJian")
{ {
var jisdetail = _dbcontext.Set<BBAC_PD_DETAIL>().Where(p => list.Contains(p.BillNum) && p.BusinessType == EnumBusinessType.JisBBAC);//jis var jisdetail = _dbcontext.Set<BBAC_PD_DETAIL>().Where(p => list.Contains(p.BillNum) && p.BusinessType == EnumBusinessType.JisBBAC);//jis
if (jisdetail != null && jisdetail.Count() > 0) if (jisdetail != null && jisdetail.Count() > 0)
{ {
foreach (var itm in jisdetail) foreach (var itm in jisdetail)
{ {
if (itm.Site == "1040" && string.IsNullOrEmpty(itm.Extend2)) if (itm.Site == "1040" && string.IsNullOrEmpty(itm.Extend2))
{ {
itm.Extend2 = projectList.FirstOrDefault(p=>p.Value== "JisBBAC").Description; itm.Extend2 = projectList.FirstOrDefault(p => p.Value == "JisBBAC").Description;
} }
else else
{ {
itm.Extend2 = projectList.FirstOrDefault(p => p.Value == "JisBBAC顺义").Description; itm.Extend2 = projectList.FirstOrDefault(p => p.Value == "JisBBAC顺义").Description;
} }
} }
Sync(jisdetail.ToList(), EnumDeliverBjBmpBillType.JIS件,email ,isout == "out" ? true : false); Sync(jisdetail.ToList(), EnumDeliverBjBmpBillType.JIS件, email, isout == "out" ? true : false);
} }
//
var mdetail = _dbcontext.Set<BBAC_PD_DETAIL>().Where(p => list.Contains(p.BillNum) && p.BusinessType == EnumBusinessType.MaiDanJianBBAC);//买单件 var mdetail = _dbcontext.Set<BBAC_PD_DETAIL>().Where(p => list.Contains(p.BillNum) && p.BusinessType == EnumBusinessType.MaiDanJianBBAC);//买单件
if (mdetail !=null&&mdetail.Count() > 0) if (mdetail != null && mdetail.Count() > 0)
{ {
foreach (var itm in jisdetail) foreach (var itm in jisdetail)
{ {
@ -101,11 +88,11 @@ public class PendingDeductionService : ApplicationService, ITransientDependency,
itm.Extend2 = projectList.FirstOrDefault(p => p.Value == "JisBBAC顺义").Description; itm.Extend2 = projectList.FirstOrDefault(p => p.Value == "JisBBAC顺义").Description;
} }
} }
Sync(mdetail.ToList(), EnumDeliverBjBmpBillType.JIS件,email ,isout == "out" ? true : false); Sync(mdetail.ToList(), EnumDeliverBjBmpBillType.JIS件, email, isout == "out" ? true : false);
} }
var detailist1 = _dbcontext.Set<PUB_PD_DETAIL>().Where(p => list.Contains(p.BillNum) ).ToList(); var detailist1 = _dbcontext.Set<PUB_PD_DETAIL>().Where(p => list.Contains(p.BillNum)).ToList();
if (detailist1.Count > 0) if (detailist1.Count > 0)
{ {
var zgbbaclist = detailist1.Where(p => p.BusinessType == EnumBusinessType.ZhiGongJianBBAC).ToList(); var zgbbaclist = detailist1.Where(p => p.BusinessType == EnumBusinessType.ZhiGongJianBBAC).ToList();
@ -120,7 +107,7 @@ public class PendingDeductionService : ApplicationService, ITransientDependency,
itm.Extend2 = projectList.FirstOrDefault(p => p.Value == "ZhiGongJianBBAC顺义").Description; itm.Extend2 = projectList.FirstOrDefault(p => p.Value == "ZhiGongJianBBAC顺义").Description;
} }
} }
Sync(zgbbaclist, EnumDeliverBjBmpBillType.JIT直供件,email, isout == "out" ? true : false); Sync(zgbbaclist, EnumDeliverBjBmpBillType.JIT直供件, email, isout == "out" ? true : false);
var ydlist = detailist1.Where(p => p.BusinessType == EnumBusinessType.YinDuJian).ToList(); var ydlist = detailist1.Where(p => p.BusinessType == EnumBusinessType.YinDuJian).ToList();
if (ydlist.Count > 0) if (ydlist.Count > 0)
{ {
@ -131,7 +118,7 @@ public class PendingDeductionService : ApplicationService, ITransientDependency,
itm.Extend2 = projectList.FirstOrDefault(p => p.Value == "YinDuJian").Description; itm.Extend2 = projectList.FirstOrDefault(p => p.Value == "YinDuJian").Description;
} }
} }
Sync(ydlist, EnumDeliverBjBmpBillType., email,isout == "out" ? true : false); Sync(ydlist, EnumDeliverBjBmpBillType., email, isout == "out" ? true : false);
} }
var bjlist = detailist1.Where(p => p.BusinessType == EnumBusinessType.BeiJian).ToList(); var bjlist = detailist1.Where(p => p.BusinessType == EnumBusinessType.BeiJian).ToList();
if (bjlist.Count > 0) if (bjlist.Count > 0)
@ -143,7 +130,7 @@ public class PendingDeductionService : ApplicationService, ITransientDependency,
itm.Extend2 = projectList.FirstOrDefault(p => p.Value == "BeiJian").Description; itm.Extend2 = projectList.FirstOrDefault(p => p.Value == "BeiJian").Description;
} }
} }
Sync(bjlist, EnumDeliverBjBmpBillType.4S备件,email ,isout == "out" ? true : false); Sync(bjlist, EnumDeliverBjBmpBillType.4S备件, email, isout == "out" ? true : false);
} }
} }
} }
@ -152,12 +139,12 @@ public class PendingDeductionService : ApplicationService, ITransientDependency,
var detailist = _dbcontext.Set<HBPO_PD_DETAIL>().Where(p => list.Contains(p.BillNum) && p.BusinessType == EnumBusinessType.JisHBPO).ToList(); var detailist = _dbcontext.Set<HBPO_PD_DETAIL>().Where(p => list.Contains(p.BillNum) && p.BusinessType == EnumBusinessType.JisHBPO).ToList();
foreach (var itm in detailist) foreach (var itm in detailist)
{ {
if ( string.IsNullOrEmpty(itm.Extend2)) if (string.IsNullOrEmpty(itm.Extend2))
{ {
itm.Extend2 = "CC017"; itm.Extend2 = "CC017";
} }
} }
Sync(detailist, EnumDeliverBjBmpBillType.JIS件,email ,isout == "out" ? true : false); Sync(detailist, EnumDeliverBjBmpBillType.JIS件, email, isout == "out" ? true : false);
var mdetail = _dbcontext.Set<HBPO_PD_DETAIL>().Where(p => list.Contains(p.BillNum) && p.BusinessType == EnumBusinessType.MaiDanJianHBPO);//买单件 var mdetail = _dbcontext.Set<HBPO_PD_DETAIL>().Where(p => list.Contains(p.BillNum) && p.BusinessType == EnumBusinessType.MaiDanJianHBPO);//买单件
foreach (var itm in mdetail) foreach (var itm in mdetail)
{ {
@ -166,7 +153,7 @@ public class PendingDeductionService : ApplicationService, ITransientDependency,
itm.Extend2 = "CC017"; itm.Extend2 = "CC017";
} }
} }
Sync(mdetail.ToList(), EnumDeliverBjBmpBillType.JIS件,email ,isout == "out" ? true : false); Sync(mdetail.ToList(), EnumDeliverBjBmpBillType.JIS件, email, isout == "out" ? true : false);
var detailist1 = _dbcontext.Set<PUB_PD_DETAIL>().Where(p => list.Contains(p.BillNum)).ToList(); var detailist1 = _dbcontext.Set<PUB_PD_DETAIL>().Where(p => list.Contains(p.BillNum)).ToList();
var zgbbaclist = detailist1.Where(p => p.BusinessType == EnumBusinessType.ZhiGongJianHBPO).ToList(); var zgbbaclist = detailist1.Where(p => p.BusinessType == EnumBusinessType.ZhiGongJianHBPO).ToList();
foreach (var itm in zgbbaclist) foreach (var itm in zgbbaclist)
@ -176,9 +163,8 @@ public class PendingDeductionService : ApplicationService, ITransientDependency,
itm.Extend2 = "CC017"; itm.Extend2 = "CC017";
} }
} }
Sync(detailist, EnumDeliverBjBmpBillType.JIT直供件,email,isout == "out" ? true : false); Sync(detailist, EnumDeliverBjBmpBillType.JIT直供件, email, isout == "out" ? true : false);
} }
return id.ToString(); return id.ToString();
} }
//public List<T> GetPagedData<T>(List<T> dataList, int pageNumber, int pageSize) //public List<T> GetPagedData<T>(List<T> dataList, int pageNumber, int pageSize)
@ -197,37 +183,40 @@ public class PendingDeductionService : ApplicationService, ITransientDependency,
// return pageCount; // return pageCount;
//} //}
public void Sync<T>(List<T> p_ls, EnumDeliverBjBmpBillType bussinessType,string p_email ,bool flag=true) where T : PD_BASE,new() public void Sync<T>(List<T> p_ls, EnumDeliverBjBmpBillType bussinessType, string p_email, bool flag = true) where T : PD_BASE, new()
{ {
var query = from itm in p_ls var query = from itm in p_ls
select new VmiLog() select new VmiLog()
{ {
CodeType=string.Empty, CodeType = string.Empty,
BillTime = DateTime.Now, BillTime = DateTime.Now,
ChangedTime = DateTime.Now, ChangedTime = DateTime.Now,
Qty = itm.Qty, Qty = itm.Qty,
RealPartCode=itm.RELU,//替换件 结算数据 RealPartCode->RELU RealPartCode = itm.RELU,//替换件 结算数据 RealPartCode->RELU
RealCode=itm.RELU, RealCode = itm.RELU,
LogType = Entities.BQ.Vmi.VmiLogType.Type200, LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty =(flag==true)? -itm.Qty:itm.Qty, ChangedQty = (flag == true) ? -itm.Qty : itm.Qty,
ChangedType = VmiType.Out, ChangedType = VmiType.Out,
//SubBillType = EnumDeliverSubBillType.小件BBAC, //SubBillType = EnumDeliverSubBillType.小件BBAC,
//BillType = EnumDeliverBjBmpBillType.JIS件, //BillType = EnumDeliverBjBmpBillType.JIS件,
CustPartCode = itm.LU, CustPartCode = itm.LU,
SettlementVinCode = itm.PN, SettlementVinCode = itm.PN,
DeliverBillType=bussinessType, DeliverBillType = bussinessType,
VinCode = itm.PN, VinCode = itm.PN,
OrderNum = itm.GroupNum, OrderNum = itm.GroupNum,
ErpToLoc = itm.Extend2, //寄售库 ErpToLoc = itm.Extend2, //寄售库
}; };
var ls = query.ToList(); var ls = query.ToList();
foreach (var itm in ls) foreach (var itm in ls)
{ {
itm.SetId(GuidGenerator.Create()); itm.SetId(GuidGenerator.Create());
} }
var _first= p_ls.FirstOrDefault(); var _first = p_ls.FirstOrDefault();
using (var transaction =_dbcontext.Database.BeginTransaction())
bool issucess = true;
using (var transaction = _dbcontext.Database.BeginTransaction())
{ {
try try
{ {
@ -295,75 +284,88 @@ public class PendingDeductionService : ApplicationService, ITransientDependency,
} }
_dbcontext.BulkUpdate(hbpoList); _dbcontext.BulkUpdate(hbpoList);
} }
var invoiceList = _dbcontext.Set<INVOICE_GRP>().Where(p => billList.Contains(p.InvbillNum)).ToList();
if (invoiceList.Count > 0)
{
foreach (var item in invoiceList)
{
if (flag == true)
{
item.State = SettleBillState.;
}
}
_dbcontext.BulkUpdate(invoiceList);
}
} }
// _emailSender.SendAsync(e)
// _emailSender.SendAsync(e)
// 提交事务 // 提交事务
transaction.Commit(); transaction.Commit();
} }
catch (Exception) catch (Exception)
{ {
var billList = p_ls.Select(p => p.BillNum).Distinct().ToList(); issucess = false;
var pdList = _dbcontext.Set<PUB_PD>().Where(p => billList.Contains(p.BillNum)).ToList(); // 回滚事务
if (pdList.Count > 0) transaction.Rollback();
}
}
if (issucess ==false)
{
var billList = p_ls.Select(p => p.BillNum).Distinct().ToList();
var pdList = _dbcontext.Set<PUB_PD>().Where(p => billList.Contains(p.BillNum)).ToList();
if (pdList.Count > 0)
{
foreach (var item in pdList)
{ {
foreach (var item in pdList) if (flag == true)
{ {
if (flag == true) item.State = SettleBillState.;
{ }
item.State = SettleBillState.; else
} {
else item.State = SettleBillState.;
{
item.State = SettleBillState.;
}
} }
_dbcontext.BulkUpdate(pdList);
} }
var bbacList = _dbcontext.Set<BBAC_PD>().Where(p => billList.Contains(p.BillNum)).ToList(); _dbcontext.BulkUpdate(pdList);
if (bbacList.Count > 0) }
var bbacList = _dbcontext.Set<BBAC_PD>().Where(p => billList.Contains(p.BillNum)).ToList();
if (bbacList.Count > 0)
{
foreach (var item in bbacList)
{ {
foreach (var item in bbacList) if (flag == true)
{ {
if (flag == true) item.State = SettleBillState.;
{ }
item.State = SettleBillState.; else
} {
else item.State = SettleBillState.;
{
item.State = SettleBillState.;
}
} }
_dbcontext.BulkUpdate(bbacList);
} }
var hbpoList = _dbcontext.Set<HBPO_PD>().Where(p => billList.Contains(p.BillNum)).ToList(); _dbcontext.BulkUpdate(bbacList);
if (hbpoList.Count > 0) }
var hbpoList = _dbcontext.Set<HBPO_PD>().Where(p => billList.Contains(p.BillNum)).ToList();
if (hbpoList.Count > 0)
{
foreach (var item in hbpoList)
{ {
foreach (var item in hbpoList) if (flag == true)
{ {
if (flag == true) item.State = SettleBillState.;
{ }
item.State = SettleBillState.; else
} {
else item.State = SettleBillState.;
{
item.State = SettleBillState.;
}
} }
_dbcontext.BulkUpdate(hbpoList);
} }
// 回滚事务 _dbcontext.BulkUpdate(hbpoList);
transaction.Rollback();
throw;
} }
} }
} }

62
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs

@ -37,6 +37,7 @@ using Volo.Abp.Users;
using Volo.Abp.Validation; using Volo.Abp.Validation;
using Win.Sfs.BaseData.ImportExcelCommon; using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.Entities.BQ.Dtos; using Win.Sfs.SettleAccount.Entities.BQ.Dtos;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
using Win.Sfs.SettleAccount.Entities.BQ.Vmi; using Win.Sfs.SettleAccount.Entities.BQ.Vmi;
using Win.Sfs.Shared; using Win.Sfs.Shared;
using Win.Sfs.Shared.Filter; using Win.Sfs.Shared.Filter;
@ -169,7 +170,55 @@ public class VmiAppService : Controller, IApplicationService, IJobService, ITran
{ {
var entities = await _balanceRepository.GetListByFilterAsync(input.Filters).ConfigureAwait(false); var entities = await _balanceRepository.GetListByFilterAsync(input.Filters).ConfigureAwait(false);
var fileName = $"库存余额_{DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss")}.xlsx"; var fileName = $"库存余额_{DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss")}.xlsx";
var content = this.GetContent(entities, "库存备份"); var content = this.GetContent(entities, "库存余额");
await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false);
return fileName;
}
/// <summary>
/// 1.2库存余额汇总查询
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
public async Task<PagedResultDto<VmiBalanceSumDto>> BalanceSum(RequestDto input)
{
var connectionString = this._serviceProvider.GetRequiredService<IConfiguration>().GetConnectionString("SettleAccountService");
var options = new DbContextOptionsBuilder<SettleAccountDbContext>().UseSqlServer(connectionString).Options;
using var db = new SettleAccountDbContext(options);
var query = db.Set<VmiBalance>().FromSqlRaw("select * from Set_VmiBalance");
var filters = input.Filters.ToLambda<VmiBalance>();
if (input.Filters.Count > 0)
{
query = query.Where(input.Filters.ToLambda<VmiBalance>());
}
query = string.IsNullOrEmpty(input.Sorting) ? query : DynamicQueryableExtensions.OrderBy(query, input.Sorting);
var query2 = query.GroupBy(o => new { o.ErpToLoc, o.RealPartCode }).Select(o => new VmiBalanceSumDto { ErpToLoc = o.Key.ErpToLoc,RealPartCode = o.Key.RealPartCode, Qty = o.Sum(o => o.Qty) });
var totalCount = query2.Count();
var entities = await query2.PageBy(input.SkipCount, input.MaxResultCount).ToListAsync().ConfigureAwait(false);
return new PagedResultDto<VmiBalanceSumDto>(totalCount, entities);
}
/// <summary>
/// 1.2库存余额汇总导出
/// </summary>
[HttpPost]
public async Task<string> BalanceSumExport(RequestDto input)
{
var connectionString = this._serviceProvider.GetRequiredService<IConfiguration>().GetConnectionString("SettleAccountService");
var options = new DbContextOptionsBuilder<SettleAccountDbContext>().UseSqlServer(connectionString).Options;
using var db = new SettleAccountDbContext(options);
var query = db.Set<VmiBalance>().FromSqlRaw("select * from Set_VmiBalance");
var filters = input.Filters.ToLambda<VmiBalance>();
if (input.Filters.Count > 0)
{
query = query.Where(input.Filters.ToLambda<VmiBalance>());
}
query = string.IsNullOrEmpty(input.Sorting) ? query : DynamicQueryableExtensions.OrderBy(query, input.Sorting);
var query2 = query.GroupBy(o => new { o.ErpToLoc, o.RealPartCode }).Select(o => new VmiBalanceSumDto { ErpToLoc = o.Key.ErpToLoc, RealPartCode = o.Key.RealPartCode, Qty = o.Sum(o => o.Qty) });
var totalCount = query2.Count();
var entities = await query2.PageBy(input.SkipCount, input.MaxResultCount).ToListAsync().ConfigureAwait(false); var fileName = $"库存余额_{DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss")}.xlsx";
var content = this.GetContent(entities, "库存汇总");
await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false); await _fileContainer.SaveAsync(fileName, content, true).ConfigureAwait(false);
return fileName; return fileName;
} }
@ -602,3 +651,14 @@ public class LogRequestDto : RequestDto
{ {
public List<VmiLogType> LogTypes { get; set; } = new List<VmiLogType>(); public List<VmiLogType> LogTypes { get; set; } = new List<VmiLogType>();
} }
public class VmiBalanceSumDto
{
[Display(Name = "ERP库位", Order = 13)]
public string ErpToLoc { get; set; }
[Display(Name = "厂内零件号", Order = 6)]
public string RealPartCode { get; set; }//原始
[Display(Name = "数量", Order = 10)]
public decimal Qty { get; set; }
}

8
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PD_MNG.cs

@ -20,21 +20,15 @@ public class PD_MNG<TEntity,TEntityDetail>:DomainService
private readonly INormalEfCoreRepository<TEntity, Guid> _repository; private readonly INormalEfCoreRepository<TEntity, Guid> _repository;
private readonly INormalEfCoreRepository<TEntityDetail, Guid> _detailRepository; private readonly INormalEfCoreRepository<TEntityDetail, Guid> _detailRepository;
protected PD_MNG( protected PD_MNG(
INormalEfCoreRepository<TEntity, Guid> repository, INormalEfCoreRepository<TEntity, Guid> repository,
INormalEfCoreRepository<TEntityDetail, Guid> detailRepository INormalEfCoreRepository<TEntityDetail, Guid> detailRepository
) )
{ {
_repository = repository; _repository = repository;
_detailRepository = detailRepository; _detailRepository = detailRepository;
} }
public PD_MNG() public PD_MNG()

131
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/TED_SA_INV.cs

@ -0,0 +1,131 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities.Auditing;
namespace Win.Sfs.SettleAccount.Entities.BQ;
public class TED_SA_INV : AuditedAggregateRoot<Guid>
{
/// <summary>
/// 发票号
/// </summary>
public string invoiceNumber { set; get; }
/// <summary>
/// 结算系统发票号
/// </summary>
public string sasInvoiceNumber { set; get; }
/// <summary>
/// 客户代码
/// </summary>
public string Customer { set; get; }
/// <summary>
/// 开票至
/// </summary>
public string BillTo { set; get; }
/// <summary>
/// 发票日期
/// </summary>
public DateTime InvoiceDate { set; get; }
/// <summary>
/// 地点
/// </summary>
public string Site { set; get; }
/// <summary>
/// 单据类型
/// </summary>
public string TYPE { set; get; }
/// <summary>
/// 零件号
/// </summary>
public string PartNumber { set; get; }
/// <summary>
/// 发票数量
/// </summary>
public decimal InvoiceQuatity { set; get; }
/// <summary>
/// 发票价格
/// </summary>
public decimal Price { set; get; }
/// <summary>
/// 供应商
/// </summary>
public string Supplier { set; get; }
/// <summary>
/// 备注
/// </summary>
public string Remark { set; get; }
/// <summary>
/// 发票未税金额
/// </summary>
public decimal InvoiceNetAmount { set; get; }
/// <summary>
/// 发票税额
/// </summary>
public decimal InvoiceTaxAmount { set; get; }
/// <summary>
/// 税率
/// </summary>
public decimal TaxRate { set; get; }
/// <summary>
/// 库位
/// </summary>
public string Location { set; get; }
/// <summary>
/// 发票未税尾差
/// </summary>
public decimal InvoiceNet { set; get; }
/// <summary>
/// 发票税额尾差
/// </summary>
public decimal InvoiceTax { set; get; }
/// <summary>
/// 开始时间
/// </summary>
public DateTime begintime { set; get; }
/// <summary>
/// 结束时间
/// </summary>
public DateTime endtime { set; get; }
public TED_SA_INV(string invoiceNumber, string sasInvoiceNumber, string customer, string billTo, DateTime invoiceDate, string site, string tYPE, string partNumber, decimal invoiceQuatity, decimal price, string supplier, string remark, decimal invoiceNetAmount, decimal invoiceTaxAmount, decimal taxRate, string location, decimal invoiceNet, decimal invoiceTax, DateTime begintime, DateTime endtime)
{
this.invoiceNumber = invoiceNumber;
this.sasInvoiceNumber = sasInvoiceNumber;
Customer = customer;
BillTo = billTo;
InvoiceDate = invoiceDate;
Site = site;
TYPE = tYPE;
PartNumber = partNumber;
InvoiceQuatity = invoiceQuatity;
Price = price;
Supplier = supplier;
Remark = remark;
InvoiceNetAmount = invoiceNetAmount;
InvoiceTaxAmount = invoiceTaxAmount;
TaxRate = taxRate;
Location = location;
InvoiceNet = invoiceNet;
InvoiceTax = invoiceTax;
this.begintime = begintime;
this.endtime = endtime;
}
public TED_SA_INV()
{
}
}

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

@ -112,6 +112,9 @@ namespace Win.Sfs.SettleAccount
builder.ConfigureBBAC_PD(options); builder.ConfigureBBAC_PD(options);
builder.ConfigureHBPO_PD(options); builder.ConfigureHBPO_PD(options);
builder.ConfigurePUB_PD(options); builder.ConfigurePUB_PD(options);
builder.ConfigureTED_SA_INV(options);
//大众发票导入 //大众发票导入
//builder.ConfigureInvoice(options); //builder.ConfigureInvoice(options);
//builder.ConfigureInvoiceVersion(options); //builder.ConfigureInvoiceVersion(options);
@ -1258,6 +1261,35 @@ namespace Win.Sfs.SettleAccount
}); });
} }
private static void ConfigureTED_SA_INV(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{
builder.Entity<TED_SA_INV>(b =>
{
b.ToTable($"{options.TablePrefix}_TED_SA_INV", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.invoiceNumber).HasMaxLength(50);
b.Property(x => x.sasInvoiceNumber).HasMaxLength(50);
b.Property(x => x.Customer).HasMaxLength(50);
b.Property(x => x.BillTo).HasMaxLength(50);
b.Property(x => x.Site).HasMaxLength(50);
b.Property(x => x.TYPE).HasMaxLength(50);
b.Property(x => x.PartNumber).HasMaxLength(50);
b.Property(x => x.Supplier).HasMaxLength(50);
b.Property(x => x.Remark).HasMaxLength(50);
b.Property(x => x.Location).HasMaxLength(50);
b.Property(x => x.ConcurrencyStamp).HasMaxLength(50);
});
}
private static void ConfigureBBAC_ADJ_DETAIL(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options) private static void ConfigureBBAC_ADJ_DETAIL(this ModelBuilder builder, SettleAccountModelBuilderConfigurationOptions options)
{ {
//builder.Entity<BBAC_ADJ_DETAIL>(b => //builder.Entity<BBAC_ADJ_DETAIL>(b =>

5870
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230904064849_202309040005.Designer.cs

File diff suppressed because it is too large

246
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230904064849_202309040005.cs

@ -0,0 +1,246 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class _202309040005 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
//migrationBuilder.DropIndex(
// name: "IX_Set_VmiReplenished_ChangedTime",
// table: "Set_VmiReplenished");
//migrationBuilder.DropIndex(
// name: "IX_Set_VmiLog_ChangedTime",
// table: "Set_VmiLog");
migrationBuilder.AlterColumn<DateTime>(
name: "UpdatedTime",
table: "Set_VmiLog",
type: "datetime2",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "datetime2",
oldDefaultValueSql: "getdate()");
migrationBuilder.CreateTable(
name: "Set_TED_SA_INV",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
invoiceNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
sasInvoiceNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Customer = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
BillTo = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
InvoiceDate = table.Column<DateTime>(type: "datetime2", nullable: false),
Site = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
TYPE = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
PartNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
InvoiceQuatity = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
Price = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
Supplier = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Remark = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
InvoiceNetAmount = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
InvoiceTaxAmount = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
TaxRate = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
Location = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
InvoiceNet = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
InvoiceTax = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
begintime = table.Column<DateTime>(type: "datetime2", nullable: false),
endtime = table.Column<DateTime>(type: "datetime2", nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Set_TED_SA_INV", x => x.Id);
});
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
column: "ConcurrencyStamp",
value: "b9e638afef8b4de097fc683516354089");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
column: "ConcurrencyStamp",
value: "50529732e41e474cb6d6908a8ec88099");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
column: "ConcurrencyStamp",
value: "f25b1fe5c17a40d18e18752ce0009d65");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
column: "ConcurrencyStamp",
value: "e91d573f386b42ae8eb6bf32a38bc483");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
column: "ConcurrencyStamp",
value: "c5726eb21c9445de91546c7f1c71efac");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
column: "ConcurrencyStamp",
value: "d247508e91324e40ac5754ede500b1ac");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
column: "ConcurrencyStamp",
value: "2f60da6b559d48a19c1817213f1528d6");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
column: "ConcurrencyStamp",
value: "18ec8f18b9434fa4baaa2fcb5e24c41b");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
column: "ConcurrencyStamp",
value: "10aadf01ae724c359846cf31aab2b31b");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
column: "ConcurrencyStamp",
value: "0ebe68a46be34b078560896901dd380d");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
column: "ConcurrencyStamp",
value: "28715471b0bd426292d154ae294bcaf4");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Set_TED_SA_INV");
migrationBuilder.AlterColumn<DateTime>(
name: "UpdatedTime",
table: "Set_VmiLog",
type: "datetime2",
nullable: false,
defaultValueSql: "getdate()",
oldClrType: typeof(DateTime),
oldType: "datetime2");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
column: "ConcurrencyStamp",
value: "119eda96252e4bd58016d77b0bf1f43b");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
column: "ConcurrencyStamp",
value: "3bd216de9cdf423ab81dc6cf014f8616");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
column: "ConcurrencyStamp",
value: "24fd0b376e354409a5bcdec267b72b2d");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
column: "ConcurrencyStamp",
value: "7884254f65f7422da2abe11929da3f6b");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
column: "ConcurrencyStamp",
value: "229a34c072454e7d949556e07a9f1e1f");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
column: "ConcurrencyStamp",
value: "313eaf08e98642ec9b7531ac5e1575c9");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
column: "ConcurrencyStamp",
value: "1680a6235f8d40f092e576028cde752a");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
column: "ConcurrencyStamp",
value: "0464f68915234385b952314fefffc134");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
column: "ConcurrencyStamp",
value: "45a3d39659e34ef3bee5b93bb5781412");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
column: "ConcurrencyStamp",
value: "0c40557cb16c4c079fa836f5337875ed");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
column: "ConcurrencyStamp",
value: "9f16199bb6f34f14a193a7ae7fa700be");
migrationBuilder.CreateIndex(
name: "IX_Set_VmiReplenished_ChangedTime",
table: "Set_VmiReplenished",
column: "ChangedTime")
.Annotation("SqlServer:Clustered", true);
migrationBuilder.CreateIndex(
name: "IX_Set_VmiLog_ChangedTime",
table: "Set_VmiLog",
column: "ChangedTime")
.Annotation("SqlServer:Clustered", true);
}
}
}

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

@ -4407,6 +4407,113 @@ namespace Win.Sfs.SettleAccount.Migrations
b.ToTable("Set_SyncPositionFlag"); b.ToTable("Set_SyncPositionFlag");
}); });
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.TED_SA_INV", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<string>("BillTo")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<string>("Customer")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<DateTime>("InvoiceDate")
.HasColumnType("datetime2");
b.Property<decimal>("InvoiceNet")
.HasColumnType("decimal(18,2)");
b.Property<decimal>("InvoiceNetAmount")
.HasColumnType("decimal(18,2)");
b.Property<decimal>("InvoiceQuatity")
.HasColumnType("decimal(18,2)");
b.Property<decimal>("InvoiceTax")
.HasColumnType("decimal(18,2)");
b.Property<decimal>("InvoiceTaxAmount")
.HasColumnType("decimal(18,2)");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("Location")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("PartNumber")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<decimal>("Price")
.HasColumnType("decimal(18,2)");
b.Property<string>("Remark")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Site")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Supplier")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("TYPE")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<decimal>("TaxRate")
.HasColumnType("decimal(18,2)");
b.Property<DateTime>("begintime")
.HasColumnType("datetime2");
b.Property<DateTime>("endtime")
.HasColumnType("datetime2");
b.Property<string>("invoiceNumber")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("sasInvoiceNumber")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.HasKey("Id");
b.ToTable("Set_TED_SA_INV");
});
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.JobItem", b => modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.JobItem", b =>
{ {
b.Property<Guid>("Id") b.Property<Guid>("Id")
@ -4453,7 +4560,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new new
{ {
Id = new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"), Id = new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
ConcurrencyStamp = "0c40557cb16c4c079fa836f5337875ed", ConcurrencyStamp = "0ebe68a46be34b078560896901dd380d",
Cron = "0 0 8 26 *", Cron = "0 0 8 26 *",
IsDisabled = false, IsDisabled = false,
IsRunning = false, IsRunning = false,
@ -4463,7 +4570,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new new
{ {
Id = new Guid("185c5968-e02b-267e-db2f-225fccfc9716"), Id = new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
ConcurrencyStamp = "119eda96252e4bd58016d77b0bf1f43b", ConcurrencyStamp = "b9e638afef8b4de097fc683516354089",
Cron = "0 0/1 * * * ?", Cron = "0 0/1 * * * ?",
IsDisabled = false, IsDisabled = false,
IsRunning = false, IsRunning = false,
@ -4473,7 +4580,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new new
{ {
Id = new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"), Id = new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
ConcurrencyStamp = "3bd216de9cdf423ab81dc6cf014f8616", ConcurrencyStamp = "50529732e41e474cb6d6908a8ec88099",
Cron = "0 0/1 * * * ?", Cron = "0 0/1 * * * ?",
IsDisabled = false, IsDisabled = false,
IsRunning = false, IsRunning = false,
@ -4483,7 +4590,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new new
{ {
Id = new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"), Id = new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
ConcurrencyStamp = "1680a6235f8d40f092e576028cde752a", ConcurrencyStamp = "2f60da6b559d48a19c1817213f1528d6",
Cron = "0 0/30 * * * ? ", Cron = "0 0/30 * * * ? ",
IsDisabled = false, IsDisabled = false,
IsRunning = false, IsRunning = false,
@ -4493,7 +4600,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new new
{ {
Id = new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"), Id = new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
ConcurrencyStamp = "24fd0b376e354409a5bcdec267b72b2d", ConcurrencyStamp = "f25b1fe5c17a40d18e18752ce0009d65",
Cron = "0 0/30 * * * ? ", Cron = "0 0/30 * * * ? ",
IsDisabled = false, IsDisabled = false,
IsRunning = false, IsRunning = false,
@ -4503,7 +4610,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new new
{ {
Id = new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"), Id = new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
ConcurrencyStamp = "229a34c072454e7d949556e07a9f1e1f", ConcurrencyStamp = "c5726eb21c9445de91546c7f1c71efac",
Cron = "0 0/30 * * * ? ", Cron = "0 0/30 * * * ? ",
IsDisabled = false, IsDisabled = false,
IsRunning = false, IsRunning = false,
@ -4513,7 +4620,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new new
{ {
Id = new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"), Id = new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
ConcurrencyStamp = "7884254f65f7422da2abe11929da3f6b", ConcurrencyStamp = "e91d573f386b42ae8eb6bf32a38bc483",
Cron = "0 0/30 * * * ? ", Cron = "0 0/30 * * * ? ",
IsDisabled = false, IsDisabled = false,
IsRunning = false, IsRunning = false,
@ -4523,7 +4630,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new new
{ {
Id = new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"), Id = new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
ConcurrencyStamp = "9f16199bb6f34f14a193a7ae7fa700be", ConcurrencyStamp = "28715471b0bd426292d154ae294bcaf4",
Cron = "0 0/30 * * * ? ", Cron = "0 0/30 * * * ? ",
IsDisabled = false, IsDisabled = false,
IsRunning = false, IsRunning = false,
@ -4533,7 +4640,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new new
{ {
Id = new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"), Id = new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
ConcurrencyStamp = "313eaf08e98642ec9b7531ac5e1575c9", ConcurrencyStamp = "d247508e91324e40ac5754ede500b1ac",
Cron = "0 0/30 * * * ? ", Cron = "0 0/30 * * * ? ",
IsDisabled = false, IsDisabled = false,
IsRunning = false, IsRunning = false,
@ -4543,7 +4650,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new new
{ {
Id = new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"), Id = new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
ConcurrencyStamp = "45a3d39659e34ef3bee5b93bb5781412", ConcurrencyStamp = "10aadf01ae724c359846cf31aab2b31b",
Cron = "0 0/30 * * * ? ", Cron = "0 0/30 * * * ? ",
IsDisabled = false, IsDisabled = false,
IsRunning = false, IsRunning = false,
@ -4553,7 +4660,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new new
{ {
Id = new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"), Id = new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
ConcurrencyStamp = "0464f68915234385b952314fefffc134", ConcurrencyStamp = "18ec8f18b9434fa4baaa2fcb5e24c41b",
Cron = "0 0/30 * * * ? ", Cron = "0 0/30 * * * ? ",
IsDisabled = false, IsDisabled = false,
IsRunning = false, IsRunning = false,
@ -4786,9 +4893,7 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<DateTime>("UpdatedTime") b.Property<DateTime>("UpdatedTime")
.ValueGeneratedOnAddOrUpdate() .HasColumnType("datetime2");
.HasColumnType("datetime2")
.HasDefaultValueSql("getdate()");
b.Property<string>("VinCode") b.Property<string>("VinCode")
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
@ -4798,9 +4903,6 @@ namespace Win.Sfs.SettleAccount.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("ChangedTime")
.IsClustered();
b.ToTable("Set_VmiLog"); b.ToTable("Set_VmiLog");
}); });
@ -4936,9 +5038,6 @@ namespace Win.Sfs.SettleAccount.Migrations
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("ChangedTime")
.IsClustered();
b.ToTable("Set_VmiReplenished"); b.ToTable("Set_VmiReplenished");
}); });

Loading…
Cancel
Save