mahao 1 year ago
parent
commit
43b9a2fb57
  1. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs
  2. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/form/form-input.js
  3. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js
  4. 35
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/adjust.js
  5. 134
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/backup.js
  6. 21
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/balance.js
  7. 40
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/log.js
  8. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/vmi.js
  9. 10
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/request/index.js
  10. 10
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/business.js
  11. 6
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/styles/site.css
  12. 14
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js
  13. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_NOT_SA_DTO.cs
  14. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_NOT_SA_DTO.cs
  15. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
  16. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/PUB_NOT_SA_DTO.cs
  17. 11
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CAN_SA_SERVICE.cs
  18. 11
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
  19. 407
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
  20. 50
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAppService.cs
  21. 29
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAsyncBalanceService.cs
  22. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain.Shared/SettleAccount.Domain.Shared.csproj
  23. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/EntityBase.cs
  24. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_PD_DETAIL.cs
  25. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/HBPO_PD_DETAIL.cs
  26. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_CAN_SA_MNG.cs
  27. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs
  28. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_NOT_SA_MNG.cs
  29. 47
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs
  30. 11
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs
  31. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_PD_DETAIL.cs
  32. 6
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/SettleAccount.Domain.csproj
  33. 11
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContext.cs
  34. 11
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  35. 5872
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230826031830_202308260001.Designer.cs
  36. 266
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230826031830_202308260001.cs
  37. 5878
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230826032802_vmi17.Designer.cs
  38. 244
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230826032802_vmi17.cs
  39. 50
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs
  40. 6
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/PendingDeduction/PendingDeductionDapperRepository.cs
  41. 12
      code/src/Shared/Win.Sfs.Shared/Win.Sfs.Shared.csproj
  42. 2
      code/src/Shared/Win.Utils/Win.Utils.csproj

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/Startup.cs

@ -15,7 +15,7 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using SettleAccount.Job.SignalR;
using ShardingCore;
//using ShardingCore;
using Win.Sfs.SettleAccount.Entities.BQ;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
using Win.Sfs.SettleAccount.EntityFrameworkCore;
@ -55,7 +55,7 @@ public class Startup
services.AddSignalR(o => o.EnableDetailedErrors = true);
JobHostdService.AddService(services);
services.AddSingleton<JobHostdService>();
services.AddHostedService(o => o.GetRequiredService<JobHostdService>());
//services.AddHostedService(o => o.GetRequiredService<JobHostdService>());
services.AddRouting(options => options.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer));
services.AddMvc(options => options.Conventions.Add(new RouteTokenTransformerConvention(new SlugifyParameterTransformer())));
services.AddApplication<SettleAccountHttpApiHostModule>();

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

@ -31,7 +31,7 @@ export default {
</el-tabs>
</template>
<template v-else-if="getInput(schema)==='month'||getInput(schema)==='datetime'||getInput(schema)==='datetimerange'">
<el-date-picker v-model="model[prop]" :type="schema.input" :value-format="schema.format??'YYYY-MM-DD HH:mm:ss'" />
<el-date-picker v-model="model[prop]" :type="schema.input" :value-format="schema.format??'YYYY-MM-DD HH:mm:ss'" :clearable="!!schema.clearable" />
</template>
<template v-else-if="getInput(schema)==='number'">
<el-input :disabled="getDisabled()" :placeholder="schema.placeholder??schema.title" v-model="model[prop]" type="number" />

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/detail.js

@ -21,11 +21,11 @@ const schema = {
type: "string",
},
lu: {
title: "厂内零件号",
title: "客户零件号",
type: "string",
},
partCode: {
title: "客户零件号",
title: "厂内零件号",
type: "string",
},
materialDesc: {

35
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/adjust.js

@ -1,4 +1,5 @@
import { useLogSchema } from "./vmi.js";
import { dayjs } from "element-plus";
const schema = useLogSchema();
@ -51,6 +52,26 @@ export default function () {
},
},
default: [
{
logic: "and",
column: "changedTime",
action: "biggerThanOrEqual",
value: null,
readOnly: true,
title: "发运开始",
default: dayjs().startOf("day").format("YYYY-MM-DD HH:mm:ss"),
clearable: false,
},
{
logic: "and",
column: "changedTime",
action: "smallThan",
value: null,
readOnly: true,
title: "发运结束",
default: dayjs().add(1, "month").startOf("day").format("YYYY-MM-DD HH:mm:ss"),
clearable: false,
},
{
logic: "and",
column: "erpToLoc",
@ -93,20 +114,6 @@ export default function () {
value: null,
readOnly: true,
},
{
logic: "and",
column: "billTime",
action: "biggerThanOrEqual",
value: null,
readOnly: true,
},
{
logic: "and",
column: "billTime",
action: "smallThanOrEqual",
value: null,
readOnly: true,
},
],
},
skipCount: {

134
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/backup.js

@ -1,39 +1,11 @@
import useVmi from "./vmi.js";
const schema = useVmi();
const baseUrl = "settleaccount/vmi";
const queryUrl = `${baseUrl}/backup`;
const detailsUrl = `${baseUrl}/get/%s`;
const createUrl = `${baseUrl}/create`;
const updateUrl = `${baseUrl}/update/%s`;
const deleteUrl = `${baseUrl}/delete-list`;
const importUrl = `${baseUrl}/code-setting-upload-excel-import`;
const exportUrl = `${baseUrl}/backup-export`;
const invokeUrl = "settleaccount/vmi/invoke";
const queryMethod = "POST";
const detailsMethod = "POST";
const createMethod = "POST";
const updateMethod = "POST";
const deleteMethod = "POST";
const importMethod = "POST";
const exportMethod = "POST";
const invokeMethod = "POST";
import useBalance from "./balance.js";
export default function () {
return {
query: {
url: queryUrl,
method: queryMethod,
hasFilter: true,
autoSubmit: true,
disableQueryOnLoad: true,
schema: {
title: "时点库存余额查询",
type: "object",
properties: {
const result = useBalance();
result.query.schema.properties = Object.assign(
{
name: {
title: "时间",
title: "备份时间",
type: "string",
input: "select",
url: "settleaccount/vmi/snapshot",
@ -42,98 +14,8 @@ export default function () {
defaultSelected: true,
clearable: false,
},
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: "erpToLoc",
action: "like",
value: null,
readOnly: true,
},
{
logic: "and",
column: "realPartCode",
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: {
detailsUrl,
createUrl,
updateUrl,
deleteUrl,
importUrl,
exportUrl,
invokeUrl,
detailsMethod,
createMethod,
updateMethod,
deleteMethod,
importMethod,
exportMethod,
invokeMethod,
schema: schema,
},
};
result.query.schema.properties
);
return result;
}

21
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/balance.js

@ -1,4 +1,5 @@
import useVmi from "./vmi.js";
import { dayjs } from "element-plus";
const schema = useVmi();
@ -50,6 +51,26 @@ export default function () {
},
},
default: [
{
logic: "and",
column: "billTime",
action: "biggerThanOrEqual",
value: null,
readOnly: true,
title: "发运开始",
default: dayjs().startOf("day").format("YYYY-MM-DD HH:mm:ss"),
clearable: false,
},
{
logic: "and",
column: "billTime",
action: "smallThan",
value: null,
readOnly: true,
title: "发运结束",
default: dayjs().add(1, "month").startOf("day").format("YYYY-MM-DD HH:mm:ss"),
clearable: false,
},
{
logic: "and",
column: "erpToLoc",

40
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/vmi/log.js

@ -53,6 +53,26 @@ export default function () {
},
},
default: [
{
logic: "and",
column: "changedTime",
action: "biggerThanOrEqual",
value: null,
readOnly: true,
title: "事务开始",
default: dayjs().startOf("day").format("YYYY-MM-DD HH:mm:ss"),
clearable: false,
},
{
logic: "and",
column: "changedTime",
action: "smallThan",
value: null,
readOnly: true,
title: "事务结束",
default: dayjs().add(1, "month").startOf("day").format("YYYY-MM-DD HH:mm:ss"),
clearable: false,
},
{
logic: "and",
column: "erpToLoc",
@ -95,26 +115,6 @@ export default function () {
value: null,
readOnly: true,
},
{
logic: "and",
column: "billTime",
action: "biggerThanOrEqual",
value: null,
readOnly: true,
title: "发运开始",
default: dayjs().startOf("day").format("YYYY-MM-DD HH:mm:ss"),
clearable: false,
},
{
logic: "and",
column: "billTime",
action: "smallThan",
value: null,
readOnly: true,
title: "发运结束",
default: dayjs().add(1, "month").startOf("day").format("YYYY-MM-DD HH:mm:ss"),
clearable: false,
},
],
},
skipCount: {

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

@ -23,6 +23,7 @@ function useSchema() {
title: "发运日期",
type: "string",
input: "datetime",
clearable: false,
},
assembleData: {
title: "订单日期",
@ -79,7 +80,8 @@ function useSchema() {
}
function useLogSchema() {
return Object.assign(
const result = useSchema();
result.properties = Object.assign(
{
changedNumber: {
title: "变动单号",
@ -89,6 +91,7 @@ function useLogSchema() {
title: "变动时间",
type: "string",
input: "datetime",
clearable: false,
},
changedType: {
title: "变动类型",
@ -124,8 +127,9 @@ function useLogSchema() {
type: "string",
},
},
useSchema()
result.properties
);
return result;
}
export default useSchema;

10
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/request/index.js

@ -37,8 +37,8 @@ async function getResult(response) {
status: response.status,
message: messages.get(response.status),
};
if (response.status === 200 || response.status === 201 || response.status === 204) {
const contentType = response.headers.get("Content-Type");
if (response.status === 200 || response.status === 201 || response.status === 204) {
if (contentType?.indexOf("application/json") > -1) {
result.data = await response.json();
} else if (contentType?.indexOf("text/plain") > -1) {
@ -49,11 +49,16 @@ async function getResult(response) {
}
} else {
try {
if (contentType?.indexOf("application/json") > -1) {
result.errors = await response.json();
}
} catch (error) {
result.errors = error;
console.log(error);
}
if (!result.errors) {
result.errors = result.message;
}
}
return result;
}
@ -91,7 +96,8 @@ async function request(url, data, options, notify = false) {
result.errors = result.data.message ?? result.data.code;
}
if (result.errors) {
const message = i18n.global.t(result.errors?.error?.message ?? result.errors?.error?.code ?? result.errors ?? "错误");
const key = String(result.errors?.error?.message ?? result.errors?.error?.code ?? result.errors ?? "错误");
const message = i18n.global.t(key);
ElMessageBox({ title: "提示", message, type: "warning" });
} else if (notify && (!result.data?.code || result.data.code === 200)) {
ElMessage({

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

@ -405,20 +405,20 @@ export default [
children: [createButton("query", "title=查询&isTop=true"), createButton("export", "title=导出&isTop=true&pattern=paged")],
},
{
...createPage("log", "title=库存事务查询"),
path: "log",
...createPage("backup", "title=时点库存余额查询"),
children: [
createButton("query", "title=查询&isTop=true"),
createButton("export", "title=导出&isTop=true&pattern=paged"),
createButton("export-replenishment", "title=补货数据导出&isTop=true&pattern=paged"),
createButton("invoke", "title=手动备份&isTop=true"),
],
},
{
...createPage("backup", "title=时点库存余额查询"),
...createPage("log", "title=库存事务查询"),
path: "log",
children: [
createButton("query", "title=查询&isTop=true"),
createButton("export", "title=导出&isTop=true&pattern=paged"),
createButton("invoke", "title=手动备份&isTop=true"),
createButton("export-replenishment", "title=补货数据导出&isTop=true&pattern=paged"),
],
},
{

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

@ -146,12 +146,12 @@ a.logo {
.el-aside *,
.el-header,
.el-header .el-dropdown-link {
background-color: #141414;
background-color: #343a40;
color: #e5eaf3;
}
.el-aside *:hover,
.el-header *:hover {
background-color: #292218;
background-color: #343a40;
}
.el-aside .el-menu-item.is-active * {
@ -167,7 +167,7 @@ a.logo {
}
.el-header {
border-bottom-color: #4c4d4f;
border-bottom-color: #343a40;
}
.el-header .el-icon {
color: #e5eaf3 !important;

14
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js

@ -13,11 +13,9 @@ export default {
components: { AppForm, AppTable },
template: html`<el-drawer v-if="refreshRef" v-model="show" destroy-on-close size="50%" class="page-drawer" :close-on-click-modal="false">
<template #header> <span class="el-dialog__title"> 结算明细 </span> </template>
<el-row style="height:calc(100% - 160px);" v-loading="loading">
<el-col>
<el-tabs>
<el-tabs style="height:100%;">
<el-tab-pane :label="columns1.title" v-if="model.invoicE_MAP_GROUP.length">
<el-scrollbar>
<el-scrollbar style="height:100%;">
<app-table :data="model.invoicE_MAP_GROUP" :columns="columns1" />
</el-scrollbar>
</el-tab-pane>
@ -37,8 +35,6 @@ export default {
</el-scrollbar>
</el-tab-pane>
</el-tabs>
</el-col>
</el-row>
<template #footer>
<span class="dialog-footer">
<el-button type="primary" @click="show=false"> 返回 </el-button>
@ -155,14 +151,18 @@ export default {
</template>
</el-dialog>`,
styles: html` <style>
.page-drawer .el-tabs,
.page-drawer .el-tab-pane {
height: 100%;
}
.page-drawer .el-tabs__content {
width: 100%;
height: calc(100% - 160px);
}
.page-drawer .el-tabs__content,
.page-drawer .el-scrollbar {
width: 100%;
height: calc(100% - 160px - 40px);
height: calc(100% - 40px);
}
.re-open .el-dialog__footer {
display: flex;

4
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_NOT_SA_DTO.cs

@ -44,7 +44,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
public string InvGroupNum { get; set; }
/// <summary>
/// 零件号
/// 客户零件号
/// </summary>
public string LU { get; set; }
/// <summary>
@ -61,7 +61,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public string GroupNum { get; set; }
/// <summary>
/// 客户零件号
/// 厂内零件号
/// </summary>
public string PartCode { get; set; }

4
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/HBPO_NOT_SA_DTO.cs

@ -44,7 +44,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
public string InvGroupNum { get; set; }
/// <summary>
/// 零件号
/// 客户零件号
/// </summary>
public string LU { get; set; }
/// <summary>
@ -64,7 +64,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// </summary>
public string GroupNum { get; set; }
/// <summary>
/// 客户零件号
/// 厂内零件号
/// </summary>
public string PartCode { get; set; }

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

@ -436,13 +436,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// <summary>
///可结算零件号
/// </summary>
[Display(Name = "可结算零件号")]
[Display(Name = "零件号")]
public string LU { get; set; }
/// <summary>
///不可结算零件号
/// </summary>
[Display(Name = "不可结算零件号")]
public string LU1 { get; set; }
[Display(Name = "状态")]
public string Extend1 { get; set; }

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

@ -39,7 +39,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
public DateTime SettleDate { get; set; }
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; }
[Display(Name = "发票分组号")]
[Display(Name = "客户零件号")]
public string LU { get; set; }
[Display(Name = "发货单号、交付识别号")]
public string PN { get; set; }
@ -50,8 +50,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[Display(Name = "结算分组号")]
public string GroupNum { get; set; }
[Display(Name = "厂内零件号")]
public string PartCode { get; set; }
}

11
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/CAN_SA_SERVICE.cs

@ -23,6 +23,7 @@ using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Entities;
using Volo.Abp.ObjectMapping;
using Volo.Abp.TenantManagement.EntityFrameworkCore;
using Volo.Abp.Uow;
using Win.Abp.Snowflakes;
using Win.Sfs.BaseData.ImportExcelCommon;
using Win.Sfs.SettleAccount.CommonManagers;
@ -153,7 +154,7 @@ namespace Win.Sfs.SettleAccount.Bases
var dtos = ObjectMapper.Map<List<TEntity>, List<TEntityDto>>(entitys);
return new PagedResultDto<TEntityDto>(totalCount, dtos);
}
[UnitOfWork(false)]
/// <summary>
/// hbpo、jit、备件等
/// </summary>
@ -192,19 +193,16 @@ namespace Win.Sfs.SettleAccount.Bases
case EnumBusinessType.YinDuJian:
invlist = await _invmng.JITInvoice(p_list, p_adjlist, dtos, new List<TEMP_NOT_SA_DETAIL>(), p_version, p_InvGroupNum, string.Empty, businessType, true);//重开可以变多张发票
break;
}
//var ls= await _invmng.SecInvoice(p_list,p_adjlist,p_tmplist,p_version, p_InvGroupNum, p_parentInvBillNum, businessType);
if (invlist.Count > 0)
{
return true;
}
throw new BusinessException("8989", "生成失败,请检可结算单明细数据是否结算分组存在");
}
[UnitOfWork(false)]
/// <summary>
/// 第一次开票
/// </summary>
@ -217,9 +215,7 @@ namespace Win.Sfs.SettleAccount.Bases
/// <returns></returns>
protected async Task<bool> FirstInvoice<TDetail>(List<TDetail> p_list,List<PUB_ADJ_DETAIL> p_adjlist ,List<TEMP_CAN_SA_DETAIL> dtos, List<TEMP_NOT_SA_DETAIL> p_notlist, int p_version, string p_invGroupNum, string p_parentInvBillNum, EnumBusinessType businessType) where TDetail : SA_CAN_BASE
{
List<string> invlist = new List<string>();
switch (businessType)
{
case EnumBusinessType.MaiDanJianHBPO:
@ -252,7 +248,6 @@ namespace Win.Sfs.SettleAccount.Bases
return true;
}
throw new BusinessException("8989", "生成失败,请检可结算单明细数据是否结算分组存在");
}
/// <summary>

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

@ -209,16 +209,23 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var classDisplayName = typeof(INVOICE_GRP_DTO).GetCustomAttribute<DisplayAttribute>()?.Name ?? typeof(INVOICE_GRP_DTO).Name;
string _fileName = $"{classDisplayName}_{Guid.NewGuid().ToString()}.xlsx";
foreach (var itm in entities)
{
var invlist = detail.Where(p => p.InvbillNum == itm.InvbillNum).ToList();
var mgroup =m.Where(p => p.InvbillNum == itm.InvbillNum).ToList();
var adjp = adj.Where(p => p.InvBillNum == itm.InvbillNum).ToList();
var nolist = not.Where(p => p.InvBillNum == itm.InvbillNum).ToList();
_excel.Append(invlist, "发票号" + itm.InvbillNum).SeparateBySheet();
_excel.Append(mgroup, "发票结算分组对应" + itm.InvbillNum).SeparateBySheet();
_excel.Append(adj, "发票调整数据" + itm.InvbillNum).SeparateBySheet();
_excel.Append(adjp, "发票调整数据" + itm.InvbillNum).SeparateBySheet();
_excel.Append(nolist, "结算分组零件");
}
_excel.Append(not, "发票分组未结对应结算分组");
var result = _excel.ExportAppendDataAsByteArray();
result.ShouldNotBeNull();
//保存导出文件到服务器存成二进制

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

@ -3,9 +3,12 @@ using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Channels;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using EFCore.BulkExtensions;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Nito.AsyncEx;
using SettleAccount.Bases;
using SettleAccount.Domain.BQ;
using TaskJob.EventArgs;
using TaskJob.Interfaces;
@ -26,6 +29,7 @@ public class PendingDeductionService : ITransientDependency, IExportJob
protected readonly INormalEfCoreRepository<HBPO_PD_DETAIL, Guid> _hbpoRepository;
protected readonly INormalEfCoreRepository<PUB_PD_DETAIL, Guid> _pubRepository;
protected readonly INormalEfCoreRepository<CodeSetting, Guid> _codesetRepository;
protected readonly INormalEfCoreRepository<VmiLog, Guid> _vmiRepository;
public PendingDeductionService(
INormalEfCoreRepository<BBAC_SEC_DETAIL, Guid> bbacSecRepository,
@ -35,6 +39,7 @@ public class PendingDeductionService : ITransientDependency, IExportJob
INormalEfCoreRepository<HBPO_PD_DETAIL, Guid> hbpoRepository,
INormalEfCoreRepository<PUB_PD_DETAIL, Guid> pubRepository,
INormalEfCoreRepository<CodeSetting, Guid> codesetRepository,
INormalEfCoreRepository<VmiLog, Guid> vmiRepository,
VmiAppService vimservice
)
{
@ -46,6 +51,7 @@ public class PendingDeductionService : ITransientDependency, IExportJob
_pubSecRepository= pubSecRepository;
_vimservice =vimservice;
_codesetRepository = codesetRepository;
_vmiRepository = vmiRepository;
}
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property)
@ -54,360 +60,129 @@ public class PendingDeductionService : ITransientDependency, IExportJob
var type = property.Where(p => p.Name == "Type").FirstOrDefault().Value;
var list = billList.Split(",");
var projectList = _codesetRepository.Where(p => p.Project == "库位");
if (type == "JisBBAC")
{
var jisdetail = _bbacRepository.Where(p => list.Contains(p.BillNum) && p.IsMaiDan==false);
var mdetail = _bbacRepository.Where(p => list.Contains(p.BillNum) && p.IsMaiDan ==true);
var query = from itm in jisdetail
select
new
{
BillTime = DateTime.Now,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
DeliverTime = itm.CreationTime,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
//SubBillType = EnumDeliverSubBillType.小件BBAC,
//BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,
SettlementVinCode = itm.PN,
PartCode2 = itm.LU,
CustomerPartCode = string.IsNullOrEmpty(itm.Extend4) ? string.Empty : itm.Extend4,
VinCode = itm.PN,
OrderNum = itm.GroupNum,
//ErpToLoc = string.IsNullOrEmpty()
};
var ls=query.ToList();
if (ls != null && ls.Count > 0)
{
foreach (var itm in ls)
{
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
{
BillTime = itm.BillTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
AssembleData = itm.BillTime,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
//SubBillType = EnumDeliverSubBillType.小件BBAC,
//BillType = EnumDeliverBjBmpBillType.JIS件,
RealPartCode = itm.PartCode,
SettlementVinCode = itm.VinCode,
//PartCode2 = itm.PartCode2,
CustPartCode = itm.CustomerPartCode,
VinCode = itm.VinCode,
//OrderNum = itm.OrderNum,
ErpToLoc = "C0001"
}).ConfigureAwait(false);
}
}
var query1 = from itm in mdetail
select new
{
BillTime = DateTime.Now,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
DeliverTime = itm.CreationTime,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
//SubBillType = EnumDeliverSubBillType.小件BBAC,
//BillType = EnumDeliverBjBmpBillType.JIS件,
PartCode = itm.LU,
SettlementVinCode = itm.PN,
PartCode2 = itm.LU,
CustomerPartCode = string.IsNullOrEmpty(itm.Extend4) ? string.Empty : itm.Extend4,
VinCode = itm.PN,
OrderNum = itm.GroupNum,
ErpToLoc = "C0001"
};
var ls1 = query1.ToList();
if (ls1 != null && ls1.Count > 0)
{
foreach (var itm in ls1)
{
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
{
BillTime = itm.BillTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
//SubBillType = EnumDeliverSubBillType.小件BBAC,
//BillType = EnumDeliverBjBmpBillType.JIS件,
SettlementVinCode = itm.VinCode,
VinCode = itm.VinCode,
//OrderNum = itm.OrderNum,
ErpToLoc = "C0001"
}).ConfigureAwait(false);
}
}
var jisdetail = _bbacRepository.Where(p => list.Contains(p.BillNum) && p.BusinessType == EnumBusinessType.JisBBAC);//jis
Sync(jisdetail.ToList());
var mdetail = _bbacRepository.Where(p => list.Contains(p.BillNum) && p.BusinessType == EnumBusinessType.MaiDanJianBBAC);//买单件
Sync(mdetail.ToList());
}
else if (type == "JisHBPO")
{
var detailist = _hbpoRepository.Where(p => list.Contains(p.BillNum)).ToList();
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
{
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
RealPartCode = itm.LU,//客户
SettlementVinCode = itm.PN,
CustPartCode = itm.LU,
VinCode = itm.PN,
ErpToLoc = "C0001"
}).ConfigureAwait(false);
}
}
var detailist = _hbpoRepository.Where(p => list.Contains(p.BillNum) && p.BusinessType== EnumBusinessType.JisHBPO).ToList();
Sync(detailist);
var mdetail = _bbacRepository.Where(p => list.Contains(p.BillNum) && p.BusinessType == EnumBusinessType.MaiDanJianHBPO);//买单件
Sync(mdetail.ToList());
}
else
{
var detailist = _hbpoRepository.Where(p => list.Contains(p.BillNum)).ToList();
switch (type)
{
case "ZhiGongJianBBAC":
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
{
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
// DeliverTime = ,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件,
RealPartCode = itm.LU,//客户
SettlementVinCode = itm.PN,
//PartCode2 = itm.LU,//厂内
CustPartCode = itm.LU,
VinCode = itm.PN,
OrderNum = itm.PN,
ErpToLoc = "C0001"
}).ConfigureAwait(false);
Sync(detailist);
////switch (type)
////{
//// case "ZhiGongJianBBAC":
//// if (detailist != null && detailist.Count > 0)
//// {
//// }
//// break;
//// case "ZhiGongJianHBPO":
//// if (detailist != null && detailist.Count > 0)
//// {
//// }
//// break;
//// case "MaiDanJianBBAC":
//// if (detailist != null && detailist.Count > 0)
//// {
//// }
//// break;
//// case "MaiDanJianHBPO":
//// if (detailist != null && detailist.Count > 0)
//// {
//// }
//// break;
//// case "BeiJian":
//// if (detailist != null && detailist.Count > 0)
//// {
//// }
//// break;
//// case "YinDuJian":
//// if (detailist != null && detailist.Count > 0)
//// {
//// }
//// break;
////}
//if (detailist != null && detailist.Count > 0)
//{
// foreach (var itm in detailist)
// {
// }
//}
}
return id.ToString();
}
break;
case "ZhiGongJianHBPO":
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
public List<T> GetPagedData<T>(List<T> dataList, int pageNumber, int pageSize)
{
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
// DeliverTime = ,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件,
RealPartCode = itm.LU,//客户
SettlementVinCode = itm.PN,
//PartCode2 = itm.LU,//厂内
CustPartCode = itm.LU,
VinCode = itm.PN,
OrderNum = itm.PN,// 非JIS传ASN 交付识别号
ErpToLoc = "C0001"
}).ConfigureAwait(false);
}
}
break;
case "MaiDanJianBBAC":
int startIndex = (pageNumber - 1) * pageSize;
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
{
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
// DeliverTime = ,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件,
RealPartCode = itm.LU,//客户
SettlementVinCode = itm.PN,
//PartCode2 = itm.LU,//厂内
CustPartCode = itm.LU,
VinCode = itm.PN,
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
ErpToLoc = "C0001"
}).ConfigureAwait(false);
}
return dataList.Skip(startIndex).Take(pageSize).ToList();
}
break;
case "MaiDanJianHBPO":
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
public int CalculatePageCount(int totalCount, int pageSize)
{
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
int pageCount = totalCount / pageSize;
if (totalCount % pageSize != 0)
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
// DeliverTime = ,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件,
RealPartCode = itm.LU,//客户
SettlementVinCode = itm.PN,
//PartCode2 = itm.LU,//厂内
CustPartCode = itm.LU,
VinCode = itm.PN,
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
ErpToLoc = "C0001"
}).ConfigureAwait(false);
pageCount += 1;
}
return pageCount;
}
break;
case "BeiJian":
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
{
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
public void Sync<T>(List<T> p_ls) where T : PD_BASE,new()
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
// DeliverTime = ,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
// BillType = EnumDeliverBjBmpBillType.JIS件,
RealPartCode = itm.LU,//客户
SettlementVinCode = itm.PN,
//PartCode2 = itm.LU,//厂内
CustPartCode = itm.LU,
VinCode = itm.PN,
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
ErpToLoc = "C0001"
}).ConfigureAwait(false);
}
}
break;
case "YinDuJian":
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
{
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
var query = from itm in p_ls
select new
{
BillTime = itm.CreationTime,
BillTime = DateTime.Now,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
// DeliverTime = ,
DeliverTime = itm.CreationTime,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
// SubBillType = EnumDeliverSubBillType.保险杠HBPO,
//SubBillType = EnumDeliverSubBillType.小件BBAC,
//BillType = EnumDeliverBjBmpBillType.JIS件,
RealPartCode = itm.LU,//客户
PartCode = itm.LU,
SettlementVinCode = itm.PN,
//PartCode2 = itm.LU,//厂内
CustPartCode = itm.LU,
PartCode2 = itm.LU,
CustomerPartCode = string.IsNullOrEmpty(itm.Extend4) ? string.Empty : itm.Extend4,
VinCode = itm.PN,
// OrderNum = itm.GroupNum, 非JIS传ASN 交付识别号
ErpToLoc = "C0001"
}).ConfigureAwait(false);
}
}
OrderNum = itm.GroupNum,
ErpToLoc = itm.Extend2,
break;
}
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
};
var ls = query.ToList();
if (ls != null && ls.Count > 0)
{
_vimservice.Out(Entities.BQ.Vmi.VmiLogType.Type200, "1", new Entities.BQ.Vmi.VmiLog()
var count = CalculatePageCount(ls.Count, 2000);
for (int pagenumber = 0; pagenumber < count; pagenumber++)
{
BillTime = itm.CreationTime,
ChangedTime = DateTime.Now,
Qty = itm.Qty,
AssembleData = itm.CreationTime,
LogType = Entities.BQ.Vmi.VmiLogType.Type200,
ChangedQty = itm.Qty,
ChangedType = VmiType.Out,
DeliverSubBillType = EnumDeliverSubBillType.BBAC,
DeliverBillType = EnumDeliverBjBmpBillType.JIS件,
RealPartCode = itm.LU,
SettlementVinCode = itm.PN,
//PartCode2 = itm.LU,
CustPartCode = itm.LU,
VinCode = itm.PN,
OrderNum = itm.GroupNum,
ErpToLoc = "C0001"
}).ConfigureAwait(false);
ls = GetPagedData(ls, pagenumber, 2000);
_vmiRepository.DbContext.BulkInsert(ls);
Task.Delay(500);
}
}
}
return id.ToString();
}
}

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

@ -1,6 +1,8 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data.SqlClient;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
@ -137,7 +139,8 @@ public class VmiAppService : ApplicationService, IJobService, ITransientDependen
snapshot = new VmiSnapshot { Name = now.ToString("yyyy-MM-dd HH:mm:ss"), Start = now, Description = table };
db.Set<VmiSnapshot>().Add(snapshot);
db.SaveChanges();
var result = db.Database.ExecuteSqlRaw($"select * into {table} from Set_VmiBalance;");
db.Database.ExecuteSqlRaw($"select * into {table} from Set_VmiBalance;");
db.Database.ExecuteSqlRaw($"create clustered index IX_{table}_BillTime on {table} (BillTime)");
snapshot.End = DateTime.Now;
transaction.Commit();
return Task.CompletedTask;
@ -212,15 +215,42 @@ public class VmiAppService : ApplicationService, IJobService, ITransientDependen
[HttpPost]
public async Task<PagedResultDto<VmiLog>> Log(LogRequestDto input)
{
using var scope = this._serviceProvider.CreateScope();
var db = scope.ServiceProvider.GetRequiredService<SettleAccountDbContext>();
var format = "yyyy-MM-dd HH:mm:ssT";
var startValue = input.Filters.FirstOrDefault(o => o.Column == "billTime" && o.Action == EnumFilterAction.BiggerThanOrEqual).Value;
var endValue = input.Filters.FirstOrDefault(o => o.Column == "billTime" && o.Action == EnumFilterAction.BiggerThanOrEqual).Value;
var start = DateTime.Parse(startValue);
var end = DateTime.Parse(endValue);
var sql = $"select * from Set_VmiLog";
var query = db.Set<VmiLog>().FromSqlRaw(sql);
//按季度计算查询需要 union 的表名
var start = DateTime.Parse(input.Filters.FirstOrDefault(o => o.Column == "changedTime" && o.Action == EnumFilterAction.BiggerThanOrEqual).Value);
var end = DateTime.Parse(input.Filters.FirstOrDefault(o => o.Column == "changedTime" && o.Action == EnumFilterAction.SmallThan).Value);
var tables = new List<string>();
var connectionString = this._serviceProvider.GetRequiredService<IConfiguration>().GetConnectionString("SettleAccountService");
using var connection = new SqlConnection(connectionString);
connection.Open();
for (var time = start; time <= end; time = time.AddMonths(1))
{
var tableName = $"Set_VmiLog_{time.Year}_{(time.Month - 1) / 3 + 1}";
if (!tables.Contains(tableName))
{
var command = connection.CreateCommand();
command.CommandText = $"select OBJECT_ID('{tableName}', 'U')";
var result = command.ExecuteScalar().ToString();
if (result != string.Empty)
{
tables.Add(tableName);
}
else
{
Debug.WriteLine($"{tableName}不存在");
}
}
}
var options = new DbContextOptionsBuilder<SettleAccountDbContext>().UseSqlServer(connection).Options;
using var db = new SettleAccountDbContext(options);
var sql = string.Empty;
if (tables.Any())
{
//生成 union all 的 SQL使用 FromSqlRaw 查询,如果没有分表则使用原始表
sql = $"select * from {tables.First()}";
tables.Skip(1).ForEach(o => sql += $" union all select * from ${o}");
}
var query = string.IsNullOrEmpty(sql) ? db.Set<VmiLog>().AsQueryable() : db.Set<VmiLog>().FromSqlRaw(sql);
var filters = input.Filters.ToLambda<VmiLog>();
if (input.Filters.Count > 0)
{

29
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAsyncBalanceService.cs

@ -1,9 +1,12 @@
using System;
using System.Data.SqlClient;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Text.Json;
using System.Threading.Tasks;
using Magicodes.ExporterAndImporter.Core.Extension;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Omu.ValueInjecter;
using Volo.Abp.Application.Services;
@ -27,16 +30,36 @@ public class VmiAsyncBalanceService : ApplicationService, IJobService, ITransien
public async Task Invoke(IServiceProvider serviceProvider)
{
using var scope = _serviceProvider.CreateScope();
var db = scope.ServiceProvider.GetRequiredService<SettleAccountDbContext>();
using var transaction = db.Database.BeginTransaction();
var connectionString = serviceProvider.GetRequiredService<IConfiguration>().GetConnectionString("SettleAccountService");
using var connection = new SqlConnection(connectionString);
connection.Open();
using var transaction = connection.BeginTransaction();
try
{
var options = new DbContextOptionsBuilder<SettleAccountDbContext>().UseSqlServer(connection).Options;
using var db = new SettleAccountDbContext(options);
var messages = db.Set<VmiMessage>().Where(o => !o.isConsumed).OrderBy(o => o.Number).ToList();
var repo = db.Set<VmiBalance>();
foreach (var message in messages)
{
var log = JsonSerializer.Deserialize<VmiLog>(message.Message);
//插入分表
var tableName = $"Set_VmiLog_{log.ChangedTime.Year}_{(log.ChangedTime.Month - 1) / 3 + 1}";
var command = connection.CreateCommand();
command.Transaction = transaction;
command.CommandText = $"select OBJECT_ID('{tableName}', 'U')";
var result = command.ExecuteScalar().ToString();
if (result == string.Empty)
{
command.CommandText = $"select * into {tableName} from Set_VmiLog where 1=0;";
command.CommandText += $"create unique index IX_{tableName}_Id on {tableName} (Id);";
command.CommandText += $"create clustered index IX_{tableName}_ChangedTime on {tableName} (ChangedTime);";
command.ExecuteNonQuery();
}
//插入到分表
command.CommandText = $"insert into {tableName} select * from Set_VmiLog where id ='{log.Id}'";
//插入库存
var balance = db.Set<VmiBalance>().FirstOrDefault(
o => o.DeliverBillType == log.DeliverBillType &&
o.CodeType == log.CodeType &&

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

@ -16,7 +16,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Magicodes.IE.Excel" Version="2.5.4.6" />
<PackageReference Include="Magicodes.IE.Excel" Version="2.5.4.8" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
<PackageReference Include="NPOI" Version="2.5.4" />
<PackageReference Include="Shouldly" Version="4.0.3" />

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

@ -629,6 +629,11 @@ namespace SettleAccount.Bases
/// 结算分组号
/// </summary>
public string GroupNum { set; get; }
public EnumBusinessType BusinessType { set; get; }
/// <summary>
/// LU(零件号)
/// </summary>

8
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_PD_DETAIL.cs

@ -1,7 +1,7 @@
using SettleAccount.Bases;
using System;
using System.ComponentModel.DataAnnotations;
using Win.Sfs.SettleAccount;
namespace SettleAccount.Domain.BQ;
[Display(Name = "BBAC待扣减实体")]
@ -50,9 +50,9 @@ public class BBAC_PD_DETAIL:PD_BASE
public bool IsMaiDan { get; set; }
public BBAC_PD_DETAIL(Guid guid, string keyCode, int version, string billNum, string lU, string rELU, string pN, string rEPN, string site, decimal qty, decimal price, string invGroupNum, DateTime settleDate, string groupNum
,string extend1,string extend2,string extend3,string extend4
,string extend1,string extend2,string extend3,string extend4,EnumBusinessType p_businessType)
)
{
Id = guid;
KeyCode = keyCode;
@ -72,6 +72,8 @@ public class BBAC_PD_DETAIL:PD_BASE
Extend2 = extend2;
Extend3 = extend3;
Extend4 = extend4;
BusinessType = p_businessType;
}
public BBAC_PD_DETAIL()

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

@ -1,8 +1,7 @@
using SettleAccount.Bases;
using System;
using System.ComponentModel.DataAnnotations;
using Win.Sfs.SettleAccount;
namespace SettleAccount.Domain.BQ;
[Display(Name = "HBPO待扣减实体")]
@ -46,7 +45,7 @@ public class HBPO_PD_DETAIL :PD_BASE
//public string GroupNum { get; set; } = null!;
public HBPO_PD_DETAIL(Guid guid, string keyCode, int version, string billNum, string lU, string rELU, string pN, string rEPN, string site, decimal qty, decimal price, string invGroupNum,
DateTime settleDate, string groupNum, string extend1, string extend2, string extend3, string extend4
DateTime settleDate, string groupNum, string extend1, string extend2, string extend3, string extend4,EnumBusinessType p_businessType
)
{
Id = guid;
@ -67,6 +66,7 @@ public class HBPO_PD_DETAIL :PD_BASE
Extend2 = extend2;
Extend3 = extend3;
Extend4 = extend4;
BusinessType= p_businessType;
}

3
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_CAN_SA_MNG.cs

@ -121,7 +121,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
}
break;
}
await _repository.UpdateAsync(first);
await _repository.DbContext.BulkUpdateAsync(new List<BBAC_CAN_SA>{ first});
return true;

2
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs

@ -67,7 +67,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
_entity.SetId(Guid.NewGuid());
_entity.BillNum = billNumber;
_entity.InvGroupNum = billNumber;
_entity.Version = DateTime.Now.Year + DateTime.Now.Month;
_entity.Version = int.Parse(DateTime.Now.ToString("yyyyMM"));
_entity.State = SettleBillState.;
_entity.SettleBillNum = string.Empty;
_entity.BusinessType = EnumBusinessType.JisBBAC;

2
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_NOT_SA_MNG.cs

@ -72,7 +72,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var _entity = new HBPO_CAN_SA();
_entity.BillNum = billNumber;
_entity.InvGroupNum = billNumber;
_entity.Version = DateTime.Now.Year + DateTime.Now.Month;
_entity.Version = int.Parse(DateTime.Now.ToString("yyyyMM"));
_entity.State = SettleBillState.;
_entity.SettleBillNum = string.Empty;
_entity.BusinessType = p_list.FirstOrDefault().BusinessType;

47
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs

@ -546,7 +546,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
extend1: string.Empty,
extend2: string.Empty,
extend3: string.Empty,
extend4: itm.PartCode);//厂内实际零件号
extend4: itm.PartCode,
p_businessType:itm.BusinessType
);//厂内实际零件号
detail.RELU = itm.RealPartCode;//厂内替换零件号
detail.Extend2 = itm.ErpLoc;//ERP库位
@ -691,7 +694,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
extend1: string.Empty,
extend2: string.Empty,
extend3: string.Empty,
extend4: itm.PartCode
extend4: itm.PartCode,
p_businessType:itm.BusinessType
);
entity.RELU = itm.RealPartCode;//厂内替换零件号
entity.Extend2 = itm.ErpLoc;//ERP库位
@ -842,6 +849,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
extend2: string.Empty,
extend3: string.Empty,
extend4: itm.PartCode
);
entity.RELU = itm.RealPartCode;//厂内替换零件号
entity.Extend2 = itm.ErpLoc;//ERP库位
@ -1016,6 +1025,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
/// <param name="p_version">版本号</param>
/// <param name="p_InvGroupNum">发票分组</param>
/// <param name="p_parentInvBillNum">原发票号</param>
[UnitOfWork(false)]
public async Task<List<string>> SecInvoice<TDetail>(List<TDetail> p_list, List<PUB_ADJ_DETAIL> p_ajdlist, List<TEMP_CAN_SA_DETAIL> dtos, int p_version, string p_InvGroupNum, string p_parentInvBillNum, EnumBusinessType businessType)
where TDetail : SA_CAN_BASE
@ -1229,7 +1239,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
return _invls;
}
[UnitOfWork(false)]
public async Task<List<string>> FirstInvoice<TDetail>(List<TDetail> p_list, List<PUB_ADJ_DETAIL> p_adjlist, List<TEMP_CAN_SA_DETAIL> dtos, List<TEMP_NOT_SA_DETAIL> p_notlist, int p_version, string p_InvGroupNum, string p_parentInvBillNum, EnumBusinessType businessType)
where TDetail : SA_CAN_BASE
{
@ -1381,12 +1391,16 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
settleGroupNum: sitm.GroupNum,
lU: sitm.LU,
lU1: sitm.LU,
extend1: string.Empty,
extend1: "可结算",
extend2: string.Empty,
qty: sitm.Qty,
p_invbillnum: itm.Key
));
}
if (innotls.Count > 0)
{
notDetialList.AddRange(innotls);
}
if (p_notlist != null && p_notlist.Count > 0)
{
var groupnum = itm.Value;
@ -1401,7 +1415,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
settleGroupNum: nitm.GroupNum,
lU: nitm.LU,
lU1: nitm.LU,
extend1: string.Empty,
extend1: "不可结算",
extend2: string.Empty,
qty: nitm.Qty,
p_invbillnum: itm.Key
@ -1435,17 +1449,17 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
if (salist.Count > 0)
{
foreach (var itm in invoiceMap)//分组影响和
{
var key = itm.Key;//发票票号
var ls = itm.Value;//结算分组号列表
//foreach (var itm in invoiceMap)//分组影响和
//{
// var key = itm.Key;//发票票号
// var ls = itm.Value;//结算分组号列表
string str = $" EXEC [p_Invoice_generation_change] @invbillnum = {"'" + key + "'"},@groupNum = {"'" + string.Join(",", ls) + "'"},@businessType = NULL";
await _repository.DbContext.Database.ExecuteSqlRawAsync(str);
}
// await _repository.DbContext.BulkUpdateAsync(salist,new BulkConfig() { BatchSize=10000 });
// string str = $" EXEC [p_Invoice_generation_change] @invbillnum = {"'" + key + "'"},@groupNum = {"'" + string.Join(",", ls) + "'"},@businessType = NULL";
// await _repository.DbContext.Database.ExecuteSqlRawAsync(str);
//}
await _repository.DbContext.BulkUpdateAsync(salist,new BulkConfig() { BatchSize=10000 });
}
@ -1993,12 +2007,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
return false;
}
//foreach (var adj in p_adjlist)
//{
// adj.InvBillNum = string.Join(",", invlist);//调整单更新发票信息
//}
//_repository.DbContext.BulkUpdate(p_adjlist);
_repository.DbContext.BulkUpdate(new List<INVOICE_GRP> { inv });
return true;
@ -2157,7 +2166,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
groupList.AddRange(mapList);
}
List<INVOICE_WAIT_DETAIL> _entityDetailList = new List<INVOICE_WAIT_DETAIL>();
//var txt= JsonSerializer.Serialize(query.ToList());
foreach (var detail in query.ToList())
{

11
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs

@ -98,9 +98,10 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
_entity.SetId(Guid.NewGuid());
_entity.BillNum = billNumber;
_entity.InvGroupNum = billNumber;
_entity.Version = DateTime.Now.Year + DateTime.Now.Month;
_entity.Version = int.Parse(DateTime.Now.ToString("yyyyMM"));
_entity.State = SettleBillState.;
_entity.SettleBillNum = string.Empty;
_entity.BusinessType = first.BusinessType;
var _entityList = new List<PUB_CAN_SA_DETAIL>();
foreach (var itm in notlist)
{
@ -126,7 +127,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
_entityList.Add(_detailEntity);
}
await _notRepository.DbContext.BulkDeleteAsync(p_list);
await _repository.DbContext.BulkDeleteAsync(p_list);
await _repository.DbContext.BulkInsertAsync(new List<PUB_CAN_SA>() { _entity });
await _repository.DbContext.BulkInsertAsync(_entityList);
@ -138,7 +139,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
_entity.SetId(Guid.NewGuid());
_entity.BillNum = billNumber;
_entity.InvGroupNum = billNumber;
_entity.Version = DateTime.Now.Year + DateTime.Now.Month;
_entity.Version =int.Parse( DateTime.Now.ToString("yyyymm"));
_entity.State = SettleBillState.;
_entity.SettleBillNum = string.Empty;
var _entityList = new List<PUB_CAN_SA_DETAIL>();
@ -166,9 +167,11 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
_entityList.Add(_detailEntity);
}
await _notRepository.DbContext.BulkDeleteAsync(p_list);
// _repository.DbContext.Database.BeginTransaction();
await _repository.DbContext.BulkDeleteAsync(p_list);
await _repository.DbContext.BulkInsertAsync(new List<PUB_CAN_SA>() { _entity });
await _repository.DbContext.BulkInsertAsync(_entityList);
//_repository.DbContext.Database.CommitTransaction();
}
return errors;

1
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/PUB_PD_DETAIL.cs

@ -80,6 +80,7 @@ public class PUB_PD_DETAIL :PD_BASE
Extend4 = extend4;
}
public PUB_PD_DETAIL()

6
code/src/Modules/SettleAccount/src/SettleAccount.Domain/SettleAccount.Domain.csproj

@ -39,9 +39,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="EFCore.BulkExtensions" Version="5.2.8" />
<PackageReference Include="Magicodes.IE.Csv" Version="2.5.4.6" />
<PackageReference Include="Magicodes.IE.Excel" Version="2.5.4.6" />
<PackageReference Include="EFCore.BulkExtensions" Version="5.3.0" />
<PackageReference Include="Magicodes.IE.Csv" Version="2.5.4.8" />
<PackageReference Include="Magicodes.IE.Excel" Version="2.5.4.8" />
<PackageReference Include="Volo.Abp.AuditLogging.Domain" Version="4.3.3" />
<PackageReference Include="Volo.Abp.BackgroundJobs.HangFire" Version="4.3.3" />
<PackageReference Include="Volo.Abp.BlobStoring" Version="4.3.3" />

11
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContext.cs

@ -1,13 +1,11 @@
using Microsoft.EntityFrameworkCore;
using ShardingCore.Core.VirtualRoutes.TableRoutes.RouteTails.Abstractions;
using ShardingCore.Sharding.Abstractions;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
namespace Win.Sfs.SettleAccount
{
[ConnectionStringName("SettleAccountService")]
public class SettleAccountDbContext : AbpDbContext<SettleAccountDbContext>, ISettleAccountDbContext, IShardingDbContext, IShardingTableDbContext
public class SettleAccountDbContext : AbpDbContext<SettleAccountDbContext>, ISettleAccountDbContext
{
/* Add DbSet for each Aggregate Root here. Example:
* public DbSet<Question> Questions { get; set; }
@ -24,12 +22,5 @@ namespace Win.Sfs.SettleAccount
base.OnModelCreating(builder);
builder.ConfigureSettleAccount();
}
public IShardingDbContextExecutor GetShardingExecutor()
{
throw new System.NotImplementedException();
}
public IRouteTail RouteTail { get; set; }
}
}

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

@ -1314,6 +1314,7 @@ namespace Win.Sfs.SettleAccount
b.Property(o => o.CreatedTime).ValueGeneratedOnAdd().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore);
b.Property(o => o.UpdatedTime).ValueGeneratedOnAddOrUpdate().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore);
b.Property(o => o.ConcurrencyStamp).HasMaxLength(50).IsConcurrencyToken();
b.HasIndex(o => o.BillTime).IsClustered();
b.HasIndex(o => (new
{
o.DeliverBillType,
@ -1334,6 +1335,7 @@ namespace Win.Sfs.SettleAccount
b.ConfigureByConvention();
b.Property(o => o.CreatedTime).ValueGeneratedOnAdd().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore);
b.Property(o => o.UpdatedTime).ValueGeneratedOnAddOrUpdate().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore);
b.HasIndex(o => o.BillTime).IsClustered();
});
builder.Entity<VmiReplenished>(b =>
@ -1356,14 +1358,13 @@ namespace Win.Sfs.SettleAccount
});
//seed
builder.Entity<VmiSyncTask>().HasData(new VmiSyncTask("Set_VmiLog".ToGuid()) { Name = "库存事务备份", Number = "Set_VmiLog", LastUpdate = DateTime.Now.AddDays(-5).Date });
builder.Entity<VmiSyncTask>().HasData(new VmiSyncTask("Set_VmiBalance".ToGuid()) { Name = "库存余额备份", Number = "Set_VmiBalance", LastUpdate = DateTime.Now.AddDays(-5).Date });
builder.Entity<JobItem>().HasData(new JobItem("vmi".ToGuid()) { Name = "库存快照", Cron = "0 0 8 26 *", Service = "Win.Sfs.SettleAccount.Entities.BQ.VmiAppService" });
builder.Entity<JobItem>().HasData(new JobItem("vmi.balance".ToGuid()) { Name = "同步库存", Cron = "0 0/1 * * * ?", Service = "Win.Sfs.SettleAccount.Entities.BQ.VmiAsyncBalanceService" });
builder.Entity<JobItem>().HasData(new JobItem("vmi.message".ToGuid()) { Name = "消息监控", Cron = "0 0/1 * * * ?", Service = "Win.Sfs.SettleAccount.Entities.BQ.VmiAsyncMessageService" });
builder.Entity<JobItem>().HasData(new JobItem("vmi.log.sync".ToGuid()) { Name = "库存事务同步", Cron = "0 0/5 * * * ? *", Service = "Win.Sfs.SettleAccount.Entities.BQ.VmiAsyncMessageService" });
builder.Entity<JobItem>().HasData(new JobItem("vmi.balance.sync".ToGuid()) { Name = "库存余额同步", Cron = "0 0/5 * * * ? *", Service = "Win.Sfs.SettleAccount.Entities.BQ.VmiAsyncMessageService" });
//builder.Entity<VmiSyncTask>().HasData(new VmiSyncTask("Set_VmiLog".ToGuid()) { Name = "库存事务备份", Number = "Set_VmiLog", LastUpdate = DateTime.Now.AddDays(-5).Date });
//builder.Entity<VmiSyncTask>().HasData(new VmiSyncTask("Set_VmiBalance".ToGuid()) { Name = "库存余额备份", Number = "Set_VmiBalance", LastUpdate = DateTime.Now.AddDays(-5).Date });
//builder.Entity<JobItem>().HasData(new JobItem("vmi.log.sync".ToGuid()) { Name = "库存事务同步", Cron = "0 0/5 * * * ? *", Service = "Win.Sfs.SettleAccount.Entities.BQ.VmiAsyncMessageService" });
//builder.Entity<JobItem>().HasData(new JobItem("vmi.balance.sync".ToGuid()) { Name = "库存余额同步", Cron = "0 0/5 * * * ? *", Service = "Win.Sfs.SettleAccount.Entities.BQ.VmiAsyncMessageService" });
builder.Entity<JobItem>().HasData(new JobItem("JisBBACSeSync".ToGuid()) { Name = "JisBBAC发运数据同步", Cron = "0 0/30 * * * ? ", Service = "Win.Sfs.SettleAccount.Entities.BQ.Syncs.JisBBACSeSyncAppService" });
builder.Entity<JobItem>().HasData(new JobItem("JisHBPOSeSync".ToGuid()) { Name = "JisHBPO发运数据同步", Cron = "0 0/30 * * * ? ", Service = "Win.Sfs.SettleAccount.Entities.BQ.Syncs.JisHBPOSeSyncAppService" });
builder.Entity<JobItem>().HasData(new JobItem("MaiDanBBACSeSync".ToGuid()) { Name = "买单件BBAC发运数据同步", Cron = "0 0/30 * * * ? ", Service = "Win.Sfs.SettleAccount.Entities.BQ.Syncs.MaiDanBBACSeSyncAppService" });

5872
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230826031830_202308260001.Designer.cs

File diff suppressed because it is too large

266
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230826031830_202308260001.cs

@ -0,0 +1,266 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class _202308260001 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("73ceebb1-5b80-48b1-ac38-80334d1f345f"));
migrationBuilder.AddColumn<int>(
name: "BusinessType",
table: "Set_HBPO_PD_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "BusinessType",
table: "Set_BBAC_PD_DETAIL",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
column: "ConcurrencyStamp",
value: "ea72feb706ee4647a389e8fa8885c789");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
column: "ConcurrencyStamp",
value: "b09158cf21844c3ca0d32eb88b66dd92");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
column: "ConcurrencyStamp",
value: "72d392c6f7b14b89acc0fd36fb630fe2");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
column: "ConcurrencyStamp",
value: "2dca7aa23ae248dcb1069d943b21c99d");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
column: "ConcurrencyStamp",
value: "1b2cb1de8a7d43f988d6cb9fdcca9cd6");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8e1cb5a9-8bcf-17fd-97e3-4c10532a5794"),
column: "ConcurrencyStamp",
value: "2739ba9d71ab408980244325809e9e9a");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
column: "ConcurrencyStamp",
value: "99974c684112426983af9c18dfdcee50");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
column: "ConcurrencyStamp",
value: "f7db288e33ed47d08f954e941331aee7");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
column: "ConcurrencyStamp",
value: "10ad1bd82b5a47b3b98ebdffc8874523");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
column: "ConcurrencyStamp",
value: "4959265709d743a78b7a2572fba9232d");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c3fe2b66-28cc-c612-eca6-a362769ae90c"),
column: "ConcurrencyStamp",
value: "c49deeb577c64166995401304b6fe4ed");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
column: "ConcurrencyStamp",
value: "e4d1118466e248f191622adc929aeb17");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
column: "ConcurrencyStamp",
value: "ca648394d41f47398bba108ae78f1885");
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "AssembleData", "BillTime", "CodeType", "ConcurrencyStamp", "Configcode", "CustPartCode", "DeliverBillType", "DeliverSubBillType", "ErpToLoc", "IsReplenished", "MatchNumber", "OrderNum", "PjsNum", "Qty", "ReMark", "RealCode", "RealPartCode", "Seq", "SettlementPartCode", "SettlementVinCode", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("7c7efc94-540d-4c03-881d-fd5d8abc4053"), null, null, null, "092e0bfc20844efaa204f71f892c8fab", null, null, 1, null, "ErpToLoc", null, null, "OrderNum", null, 0m, null, null, "PartCode", null, null, null, null, "VinCode", null });
migrationBuilder.UpdateData(
table: "Set_VmiSyncTask",
keyColumn: "Id",
keyValue: new Guid("08de7a37-5ede-f524-cb3d-3c80888fd7d8"),
columns: new[] { "ConcurrencyStamp", "LastUpdate" },
values: new object[] { "11ae67087bac4f65b468ed17d54a63cb", new DateTime(2023, 8, 21, 0, 0, 0, 0, DateTimeKind.Local) });
migrationBuilder.UpdateData(
table: "Set_VmiSyncTask",
keyColumn: "Id",
keyValue: new Guid("b8ba69e3-f5a3-c95e-8f82-c9c2fec960b4"),
columns: new[] { "ConcurrencyStamp", "LastUpdate" },
values: new object[] { "1c1cb00d94ef4408896ab14bf4e5045d", new DateTime(2023, 8, 21, 0, 0, 0, 0, DateTimeKind.Local) });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("7c7efc94-540d-4c03-881d-fd5d8abc4053"));
migrationBuilder.DropColumn(
name: "BusinessType",
table: "Set_HBPO_PD_DETAIL");
migrationBuilder.DropColumn(
name: "BusinessType",
table: "Set_BBAC_PD_DETAIL");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
column: "ConcurrencyStamp",
value: "d6ba8aa579b04d55a23bd4bf24e6ed9f");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
column: "ConcurrencyStamp",
value: "72a5ae8256104547b6d5a41323c3ad84");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
column: "ConcurrencyStamp",
value: "03f4d0ab46de4dfa88a918fe2b3c48fa");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
column: "ConcurrencyStamp",
value: "143f0e0bf5b6446aafe7964aab5fcb1a");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
column: "ConcurrencyStamp",
value: "76e8e365e9ff48e1953f3b14e7e01fe7");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8e1cb5a9-8bcf-17fd-97e3-4c10532a5794"),
column: "ConcurrencyStamp",
value: "5bdbe6b8c451462983e460c4adcab0f1");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
column: "ConcurrencyStamp",
value: "955009a9778e4cd1b2dfde2aabebabfd");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
column: "ConcurrencyStamp",
value: "8f8d688a37e54d84aeca023750200e2f");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
column: "ConcurrencyStamp",
value: "041fcaa8b49347edb5b46fde3ab1032d");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
column: "ConcurrencyStamp",
value: "9ed27ee117aa41a681a8cdbfb30b2f25");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c3fe2b66-28cc-c612-eca6-a362769ae90c"),
column: "ConcurrencyStamp",
value: "b612ac27de904ec5b5fb5371cf427566");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
column: "ConcurrencyStamp",
value: "f8789477c42b476485bd7499b5facce4");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
column: "ConcurrencyStamp",
value: "1b569f48046046b2b908b1a3b327f104");
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "AssembleData", "BillTime", "CodeType", "ConcurrencyStamp", "Configcode", "CustPartCode", "DeliverBillType", "DeliverSubBillType", "ErpToLoc", "IsReplenished", "MatchNumber", "OrderNum", "PjsNum", "Qty", "ReMark", "RealCode", "RealPartCode", "Seq", "SettlementPartCode", "SettlementVinCode", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("73ceebb1-5b80-48b1-ac38-80334d1f345f"), null, null, null, "bfe48a54e65e4856bd2e768456026105", null, null, 1, null, "ErpToLoc", null, null, "OrderNum", null, 0m, null, null, "PartCode", null, null, null, null, "VinCode", null });
migrationBuilder.UpdateData(
table: "Set_VmiSyncTask",
keyColumn: "Id",
keyValue: new Guid("08de7a37-5ede-f524-cb3d-3c80888fd7d8"),
columns: new[] { "ConcurrencyStamp", "LastUpdate" },
values: new object[] { "25685f349c47487f874b9ac5dc039190", new DateTime(2023, 8, 20, 0, 0, 0, 0, DateTimeKind.Local) });
migrationBuilder.UpdateData(
table: "Set_VmiSyncTask",
keyColumn: "Id",
keyValue: new Guid("b8ba69e3-f5a3-c95e-8f82-c9c2fec960b4"),
columns: new[] { "ConcurrencyStamp", "LastUpdate" },
values: new object[] { "2debe020ac9d4f37b62a52ff564577c2", new DateTime(2023, 8, 20, 0, 0, 0, 0, DateTimeKind.Local) });
}
}
}

5878
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230826032802_vmi17.Designer.cs

File diff suppressed because it is too large

244
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230826032802_vmi17.cs

@ -0,0 +1,244 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class vmi17 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("62c9abbe-3e75-4a36-97c2-a1c79b12cb71"));
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
column: "ConcurrencyStamp",
value: "81072f462eba41b9914f4d4aea716611");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
column: "ConcurrencyStamp",
value: "ed944c8844f24f12b7dde63809c8efb4");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
column: "ConcurrencyStamp",
value: "6ff457ddc814405c9c517c0554d8fa7d");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
column: "ConcurrencyStamp",
value: "7622bd2d62f54b079835ce7a62bf95fe");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
column: "ConcurrencyStamp",
value: "b1285c03732a43fd87da115020b75c23");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8e1cb5a9-8bcf-17fd-97e3-4c10532a5794"),
column: "ConcurrencyStamp",
value: "7e294c644f7946db8b942f19392c4776");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
column: "ConcurrencyStamp",
value: "8c945bdfee354e9c88563c30b9396674");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
column: "ConcurrencyStamp",
value: "6c6d5badb49649a2a18d3decb6284fce");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
column: "ConcurrencyStamp",
value: "24f4ab4ebe854c7184e77ae0150e9659");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
column: "ConcurrencyStamp",
value: "f25821caa51d4bbf95187d3fdd95ce74");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c3fe2b66-28cc-c612-eca6-a362769ae90c"),
column: "ConcurrencyStamp",
value: "da5ea88f24154621ab2f8d9359cfa895");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
column: "ConcurrencyStamp",
value: "3ed217e9603d4496bdef3a001ab0ebec");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
column: "ConcurrencyStamp",
value: "4b3d04cc418647a99b64f9f52a100a87");
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "AssembleData", "BillTime", "CodeType", "ConcurrencyStamp", "Configcode", "CustPartCode", "DeliverBillType", "DeliverSubBillType", "ErpToLoc", "IsReplenished", "MatchNumber", "OrderNum", "PjsNum", "Qty", "ReMark", "RealCode", "RealPartCode", "Seq", "SettlementPartCode", "SettlementVinCode", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("ba5e008b-7d8e-4b5f-b404-9a57092fab41"), null, null, null, "ebb6e4f20f8c42e1862802982fd5331f", null, null, 1, null, "ErpToLoc", null, null, "OrderNum", null, 0m, null, null, "PartCode", null, null, null, null, "VinCode", null });
migrationBuilder.UpdateData(
table: "Set_VmiSyncTask",
keyColumn: "Id",
keyValue: new Guid("08de7a37-5ede-f524-cb3d-3c80888fd7d8"),
column: "ConcurrencyStamp",
value: "a3393ee4620443ac9a692157914f162e");
migrationBuilder.UpdateData(
table: "Set_VmiSyncTask",
keyColumn: "Id",
keyValue: new Guid("b8ba69e3-f5a3-c95e-8f82-c9c2fec960b4"),
column: "ConcurrencyStamp",
value: "b4ffe8f9e39f466a948d4f642593d0e9");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("ba5e008b-7d8e-4b5f-b404-9a57092fab41"));
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
column: "ConcurrencyStamp",
value: "2b23cc91f7b644438c0b08c4f9d98631");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
column: "ConcurrencyStamp",
value: "d5f388e6b037457a9a349ef7ea7fe874");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
column: "ConcurrencyStamp",
value: "4cd0917761d94e3bb8b205f2fb301d24");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
column: "ConcurrencyStamp",
value: "ded2be7458fd4676a1da41e939dc9a56");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
column: "ConcurrencyStamp",
value: "2b7aa628be2f42d4b4557f3c08f72c55");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8e1cb5a9-8bcf-17fd-97e3-4c10532a5794"),
column: "ConcurrencyStamp",
value: "48432a8073a240edabb4c22381d8210b");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
column: "ConcurrencyStamp",
value: "1551b0d4dbc24650940c58b623a8fedf");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
column: "ConcurrencyStamp",
value: "0e63d5f40d4b42efb3267a255de0a1e3");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
column: "ConcurrencyStamp",
value: "70e357aceffa4b27978c032592f9fbea");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
column: "ConcurrencyStamp",
value: "8b77ab73bdcb4cd99fd17b2c6ca1f4e4");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c3fe2b66-28cc-c612-eca6-a362769ae90c"),
column: "ConcurrencyStamp",
value: "5316e6a5c7c14b8faed431425365d50f");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
column: "ConcurrencyStamp",
value: "a43e7f480d8246359911073011b1d887");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
column: "ConcurrencyStamp",
value: "fa15c26a401940448b73baabc415a648");
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "AssembleData", "BillTime", "CodeType", "ConcurrencyStamp", "Configcode", "CustPartCode", "DeliverBillType", "DeliverSubBillType", "ErpToLoc", "IsReplenished", "MatchNumber", "OrderNum", "PjsNum", "Qty", "ReMark", "RealCode", "RealPartCode", "Seq", "SettlementPartCode", "SettlementVinCode", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("62c9abbe-3e75-4a36-97c2-a1c79b12cb71"), null, null, null, "b83b1353556f4cc9a22c6450f588f4e2", null, null, 1, null, "ErpToLoc", null, null, "OrderNum", null, 0m, null, null, "PartCode", null, null, null, null, "VinCode", null });
migrationBuilder.UpdateData(
table: "Set_VmiSyncTask",
keyColumn: "Id",
keyValue: new Guid("08de7a37-5ede-f524-cb3d-3c80888fd7d8"),
column: "ConcurrencyStamp",
value: "0a22a0a47b6c4be481074a951c8c426c");
migrationBuilder.UpdateData(
table: "Set_VmiSyncTask",
keyColumn: "Id",
keyValue: new Guid("b8ba69e3-f5a3-c95e-8f82-c9c2fec960b4"),
column: "ConcurrencyStamp",
value: "bad5183ed55c41e0b74d00013067855d");
}
}
}

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

@ -371,6 +371,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<int>("BusinessType")
.HasColumnType("int");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(50)
@ -1595,6 +1598,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<int>("BusinessType")
.HasColumnType("int");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(50)
@ -4439,7 +4445,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
ConcurrencyStamp = "f8789477c42b476485bd7499b5facce4",
ConcurrencyStamp = "3ed217e9603d4496bdef3a001ab0ebec",
Cron = "0 0 8 26 *",
IsDisabled = false,
IsRunning = false,
@ -4449,7 +4455,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
ConcurrencyStamp = "d6ba8aa579b04d55a23bd4bf24e6ed9f",
ConcurrencyStamp = "81072f462eba41b9914f4d4aea716611",
Cron = "0 0/1 * * * ?",
IsDisabled = false,
IsRunning = false,
@ -4459,7 +4465,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
ConcurrencyStamp = "72a5ae8256104547b6d5a41323c3ad84",
ConcurrencyStamp = "ed944c8844f24f12b7dde63809c8efb4",
Cron = "0 0/1 * * * ?",
IsDisabled = false,
IsRunning = false,
@ -4469,7 +4475,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("8e1cb5a9-8bcf-17fd-97e3-4c10532a5794"),
ConcurrencyStamp = "5bdbe6b8c451462983e460c4adcab0f1",
ConcurrencyStamp = "7e294c644f7946db8b942f19392c4776",
Cron = "0 0/5 * * * ? *",
IsDisabled = false,
IsRunning = false,
@ -4479,7 +4485,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("c3fe2b66-28cc-c612-eca6-a362769ae90c"),
ConcurrencyStamp = "b612ac27de904ec5b5fb5371cf427566",
ConcurrencyStamp = "da5ea88f24154621ab2f8d9359cfa895",
Cron = "0 0/5 * * * ? *",
IsDisabled = false,
IsRunning = false,
@ -4489,7 +4495,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
ConcurrencyStamp = "8f8d688a37e54d84aeca023750200e2f",
ConcurrencyStamp = "6c6d5badb49649a2a18d3decb6284fce",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4499,7 +4505,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
ConcurrencyStamp = "03f4d0ab46de4dfa88a918fe2b3c48fa",
ConcurrencyStamp = "6ff457ddc814405c9c517c0554d8fa7d",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4509,7 +4515,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
ConcurrencyStamp = "76e8e365e9ff48e1953f3b14e7e01fe7",
ConcurrencyStamp = "b1285c03732a43fd87da115020b75c23",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4519,7 +4525,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
ConcurrencyStamp = "143f0e0bf5b6446aafe7964aab5fcb1a",
ConcurrencyStamp = "7622bd2d62f54b079835ce7a62bf95fe",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4529,7 +4535,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
ConcurrencyStamp = "1b569f48046046b2b908b1a3b327f104",
ConcurrencyStamp = "4b3d04cc418647a99b64f9f52a100a87",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4539,7 +4545,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
ConcurrencyStamp = "955009a9778e4cd1b2dfde2aabebabfd",
ConcurrencyStamp = "8c945bdfee354e9c88563c30b9396674",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4549,7 +4555,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
ConcurrencyStamp = "9ed27ee117aa41a681a8cdbfb30b2f25",
ConcurrencyStamp = "f25821caa51d4bbf95187d3fdd95ce74",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4559,7 +4565,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
ConcurrencyStamp = "041fcaa8b49347edb5b46fde3ab1032d",
ConcurrencyStamp = "24f4ab4ebe854c7184e77ae0150e9659",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4686,6 +4692,9 @@ namespace Win.Sfs.SettleAccount.Migrations
b.HasKey("Id");
b.HasIndex("BillTime")
.IsClustered();
b.HasIndex("DeliverBillType", "CodeType", "RealPartCode", "VinCode", "ErpToLoc", "OrderNum", "factory", "Configcode")
.IsUnique()
.HasFilter("[DeliverBillType] IS NOT NULL AND [CodeType] IS NOT NULL AND [RealPartCode] IS NOT NULL AND [VinCode] IS NOT NULL AND [ErpToLoc] IS NOT NULL AND [OrderNum] IS NOT NULL AND [factory] IS NOT NULL AND [Configcode] IS NOT NULL");
@ -4695,8 +4704,8 @@ namespace Win.Sfs.SettleAccount.Migrations
b.HasData(
new
{
Id = new Guid("73ceebb1-5b80-48b1-ac38-80334d1f345f"),
ConcurrencyStamp = "bfe48a54e65e4856bd2e768456026105",
Id = new Guid("ba5e008b-7d8e-4b5f-b404-9a57092fab41"),
ConcurrencyStamp = "ebb6e4f20f8c42e1862802982fd5331f",
CreatedTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
DeliverBillType = 1,
ErpToLoc = "ErpToLoc",
@ -4811,6 +4820,9 @@ namespace Win.Sfs.SettleAccount.Migrations
b.HasKey("Id");
b.HasIndex("BillTime")
.IsClustered();
b.ToTable("Set_VmiLog");
});
@ -4999,16 +5011,16 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("08de7a37-5ede-f524-cb3d-3c80888fd7d8"),
ConcurrencyStamp = "25685f349c47487f874b9ac5dc039190",
LastUpdate = new DateTime(2023, 8, 20, 0, 0, 0, 0, DateTimeKind.Local),
ConcurrencyStamp = "a3393ee4620443ac9a692157914f162e",
LastUpdate = new DateTime(2023, 8, 21, 0, 0, 0, 0, DateTimeKind.Local),
Name = "库存事务备份",
Number = "Set_VmiLog"
},
new
{
Id = new Guid("b8ba69e3-f5a3-c95e-8f82-c9c2fec960b4"),
ConcurrencyStamp = "2debe020ac9d4f37b62a52ff564577c2",
LastUpdate = new DateTime(2023, 8, 20, 0, 0, 0, 0, DateTimeKind.Local),
ConcurrencyStamp = "b4ffe8f9e39f466a948d4f642593d0e9",
LastUpdate = new DateTime(2023, 8, 21, 0, 0, 0, 0, DateTimeKind.Local),
Name = "库存余额备份",
Number = "Set_VmiBalance"
});

6
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/PendingDeduction/PendingDeductionDapperRepository.cs

@ -176,7 +176,8 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
extend1: string.Empty,
extend2: string.Empty,
extend3: string.Empty,
extend4: string.Empty
extend4: string.Empty,
p_businessType:itm.BusinessType
);
var bbacDetail = query.ToList();
@ -286,7 +287,8 @@ namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob.Report
extend1: string.Empty,
extend2: string.Empty,
extend3: string.Empty,
extend4: string.Empty
extend4: string.Empty,
p_businessType:itm.BusinessType
);
var bbacDetail = query.ToList();

12
code/src/Shared/Win.Sfs.Shared/Win.Sfs.Shared.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp5</TargetFramework>
@ -13,11 +13,11 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
<PackageReference Include="Volo.Abp.Caching" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="4.0.0" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="4.0.0" />
<PackageReference Include="Volo.Abp.Caching" Version="4.3.3" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="4.3.3" />
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" Version="4.3.3" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="4.3.3" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="4.3.3" />
</ItemGroup>

2
code/src/Shared/Win.Utils/Win.Utils.csproj

@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NPOI" Version="2.5.2" />
<PackageReference Include="NPOI" Version="2.5.4" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="5.6.3" />
</ItemGroup>

Loading…
Cancel
Save