mahao 1 year ago
parent
commit
1557e67ac3
  1. 18
      code/src/Modules/BaseService/BaseService.Application/UserManagement/UserAppService.cs
  2. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/api/site.js
  3. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
  4. 14
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/layouts/header.js
  5. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/layouts/logo.js
  6. 14
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/locale/index.js
  7. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/main.js
  8. 38
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/account.js
  9. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/commerce.js
  10. 27
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/inventory-detail.js
  11. 9
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/request/index.js
  12. 8
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/index.js
  13. 3
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/styles/site.css
  14. 17
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/utils/index.js
  15. 4
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/utils/validation.js
  16. 64
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/account.js
  17. 23
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/login.js
  18. 16
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/balance.js
  19. 18
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_PD_DTO.cs
  20. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
  21. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_CAN_SA_SERVICE.cs
  22. 9
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/JobHostdService.cs
  23. 10
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/VmiAsyncBalanceService.cs
  24. 9
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Bases/EntityBase.cs
  25. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_CAN_SA.cs
  26. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/BBAC_NOT_SA_MNG.cs
  27. 1
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/HBPO_NOT_SA_MNG.cs
  28. 59
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs
  29. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/PUB_NOT_SA_MNG.cs
  30. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/JobItem.cs
  31. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiAsyncTask.cs
  32. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiBalance.cs
  33. 2
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiMessage.cs
  34. 5
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiReplenished.cs
  35. 10
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiShardingRecord.cs
  36. 11
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/EntityFrameworkCore/SettleAccountDbContextModelCreatingExtensions.cs
  37. 5755
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230825011303_vmi14.Designer.cs
  38. 330
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230825011303_vmi14.cs
  39. 72
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs

18
code/src/Modules/BaseService/BaseService.Application/UserManagement/UserAppService.cs

@ -1,3 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BaseService.BaseData;
using BaseService.BaseData.Permissions.Dto;
using BaseService.RelationBaseData;
@ -6,10 +10,6 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Omu.ValueInjecter;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
@ -25,7 +25,6 @@ using IdentityUser = Volo.Abp.Identity.IdentityUser;
namespace BaseService.Systems.UserManagement
{
[Route("api/base/user")]
//[Authorize(IdentityPermissions.Users.Default)]
public class UserAppService : ApplicationService, IUserAppService
{
protected IdentityUserManager UserManager { get; }
@ -417,5 +416,14 @@ namespace BaseService.Systems.UserManagement
await UserManager.DeleteAsync(entity).ConfigureAwait(false);
return new OkResult();
}
[HttpPost]
[Route("{userId}/change-password")]
public async Task ChangePassword(Guid userId, ChangePasswordInput input)
{
var user = await UserManager.GetByIdAsync(userId).ConfigureAwait(false);
var result = await UserManager.ChangePasswordAsync(user, input.CurrentPassword, input.NewPassword).ConfigureAwait(false);
result.CheckErrors();
}
}
}

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/api/site.js

@ -2,6 +2,7 @@ async function getLocalizationAsync() {
// const url = "abp/application-configuration";
// const data = (await get(url, null, null, true, true)).data;
return {
legacy: false,
options: [
{
value: "zh",
@ -144,6 +145,9 @@ async function getLocalizationAsync() {
isOnline: "在线",
heartbeat: "心跳",
userAgent: "用户代理",
["Invalid username or password!"]: "用户名或密码错误",
["The user account has been locked out due to invalid login attempts. Please wait a while and try again."]: "用户已锁定,请稍后重试",
["Volo.Abp.Identity:PasswordMismatch"]: "密码错误",
},
en: {
application: "WTA Framework",

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

@ -330,7 +330,7 @@ export default {
const config = reactive(props.config);
// 分页
const pageModel = reactive({
sizeList: [1, 10, 50, 100],
sizeList: [10, 50, 100, 500],
pageIndex: 1,
pageSize: 10,
total: 0,

14
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/layouts/header.js

@ -41,13 +41,7 @@ export default {
v-model="searchModel"
:loading="searchLoading"
>
<el-option
v-for="item in searchOptions"
:key="item.meta.path"
:value="item.meta.path"
:label="item.meta.fullName"
@click="searchChange(item)"
/>
<el-option v-for="item in searchOptions" :key="item.meta.path" :value="item.meta.path" :label="item.meta.fullName" @click="searchChange(item)" />
</el-select>
<el-icon v-model="isDark" @click="toggleDark()" :size="18" class="cursor-pointer">
<ep-sunny v-if="isDark" />
@ -63,7 +57,7 @@ export default {
<img v-if="appStore.user.avatar" />
<ep-user v-else />
</el-icon>
{{ appStore.user.name }}
{{ appStore.user.userName }}
<el-icon class="el-icon--right">
<ep-arrow-down />
</el-icon>
@ -112,9 +106,7 @@ export default {
try {
searchLoading.value = true;
const menus = treeToList(router.getRoutes().find((o) => o.path === "/").children);
searchOptions.value = menus
.filter((o) => !o.children || o.children.length === 0)
.filter((o) => o.meta.fullName.indexOf(query) > -1);
searchOptions.value = menus.filter((o) => !o.children || o.children.length === 0).filter((o) => o.meta.fullName.indexOf(query) > -1);
} finally {
searchLoading.value = false;
}

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/layouts/logo.js

@ -1,8 +1,9 @@
import html from "html";
import { useAppStore } from "../store/index.js";
import { reload } from "../utils/index.js";
export default {
template: html`<a href="javascript:location.reload(true)" class="logo">
template: html`<a href="javascript:;" @click="reload" class="logo">
<div class="flex h-full items-center">
<img src="/assets/logo.svg" />
<h1 v-if="!appStore.isMenuCollapse">{{$t('application')}}</h1>
@ -12,6 +13,7 @@ export default {
const appStore = useAppStore();
return {
appStore,
reload,
};
},
};

14
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/locale/index.js

@ -1,13 +1,7 @@
import { createI18n } from "vue-i18n";
import { useAppStore } from "../store/index.js";
import { getLocalizationAsync } from "../api/site.js";
function useLocale() {
const appStore = useAppStore();
const i18n = createI18n({
legacy: false,
...appStore.localization,
});
return i18n;
}
const localization = await getLocalizationAsync();
const i18n = createI18n(localization);
export default useLocale;
export default i18n;

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

@ -5,12 +5,12 @@ import router from "./router/index.js";
import ElementPlus from "element-plus";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import App from "/app.js";
import useLocale from "./locale/index.js";
import i18n from "./locale/index.js";
const app = createApp(App);
app.use(store);
app.use(i18n);
await useAppStore().init();
app.use(useLocale());
app.use(router);
app.use(ElementPlus);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {

38
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/account.js

@ -0,0 +1,38 @@
export default function () {
return {
title: "登录",
type: "object",
properties: {
currentPassword: {
title: "当前密码",
type: "string",
input: "password",
rules: [
{
required: true,
},
],
},
newPassword: {
title: "新密码",
type: "string",
input: "password",
rules: [
{
required: true,
},
],
},
newPassword2: {
title: "确认新密码",
type: "string",
input: "password",
rules: [
{
required: true,
},
],
},
},
};
}

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/commerce.js

@ -65,7 +65,7 @@ export default function (businessType, type) {
service = "invoice_service";
}
const queryUrl = `settleaccount/${service}/main-query`;
const exportUrl = `settleaccount/${service}/export-detail`;
const exportUrl = `settleaccount/${service}/export`;
const invoiceUrl = `settleaccount/${service}/generate-invoice`;
const receivedUrl = `settleaccount/${service}/received`;
const rejectUrl = `settleaccount/${service}/reject`;

27
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/settle/inventory-detail.js

@ -6,23 +6,36 @@ const schema = {
type: "object",
properties: {
version,
state: state3,
billNum: {
title: "发票号",
type: "string",
link: true,
},
invGroupNum: {
title: "发票分组号",
type: "string",
},
groupNum: {
title: "结算分组号",
type: "string",
},
settleBillNum: {
title: "关联结算单号",
type: "string",
},
invGroupNum: {
title: "发票分组号",
lu: {
title: "厂内零件号",
type: "string",
},
pn: {
title: "生产码",
type: "string",
},
relu: {
title: "替换零件号",
type: "string",
link: true,
},
site: {
title: "地点",
extend4: {
title: "客户零件号",
type: "string",
},
},

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

@ -4,10 +4,7 @@ import { useAppStore } from "../store/index.js";
import { getFileName } from "../utils/index.js";
import settings from "../config/settings.js";
import { ElMessage, ElMessageBox } from "element-plus";
// const requestSettings = {
// baseURL: "/api",
// };
import i18n from "../locale/index.js";
async function addToken(options) {
if (await isLogin()) {
@ -57,7 +54,9 @@ async function getResult(response) {
result.errors = error;
console.log(error);
}
ElMessageBox.alert(`${result.errors?.error?.message ?? messages.get(response.status) ?? result.status}`, `${result.errors?.error?.code ?? "错误"}`);
const message = i18n.global.t(result.errors?.error?.code ?? "错误");
ElMessageBox({ title: "提示", message, type: "warning" });
}
return result;
}

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

@ -19,6 +19,14 @@ const routes = [
isHidden: true,
},
},
{
path: "/account",
component: () => import("../views/account.js"),
meta: {
title: "用户中心",
isHidden: true,
},
},
{
path: "/403",
component: () => import("../views/403.js"),

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

@ -144,7 +144,8 @@ a.logo {
display: none;
}
.el-aside *,
.el-header {
.el-header,
.el-header .el-dropdown-link {
background-color: #141414;
color: #e5eaf3;
}

17
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/utils/index.js

@ -137,16 +137,9 @@ async function importFunction(input) {
return result;
}
function reload() {
location.href = `${location.protocol}//${location.host}${location.pathname}`;
}
export default html;
export {
delay,
persentFormat,
bytesFormat,
format,
schemaToModel,
listToTree,
treeToList,
getProp,
getFileName,
importFunction,
};
export { delay, persentFormat, bytesFormat, format, schemaToModel, listToTree, treeToList, getProp, getFileName, importFunction, reload };

4
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/utils/validation.js

@ -118,9 +118,7 @@ const getRules = (parentSchema, property, data) => {
if (!property.rules) {
return null;
}
const rules = [...(Array.isArray(property.rules) ? property.rules : [property.rules])].map((o) =>
JSON.parse(JSON.stringify(o))
);
const rules = [...(Array.isArray(property.rules) ? property.rules : [property.rules])].map((o) => Object.assign({}, o));
Object.values(rules).forEach((rule) => {
rule.data = data;
rule.schema = parentSchema;

64
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/account.js

@ -0,0 +1,64 @@
import html, { schemaToModel } from "html";
import { reactive } from "vue";
import AppForm from "../components/form/index.js";
import { getUser, setAccessToken } from "../api/user.js";
import router, { refreshRouter } from "../router/index.js";
import request from "../request/index.js";
import LayoutLogo from "../layouts/logo.js";
import LayoutLocale from "../layouts/locale.js";
import LayoutFooter from "../layouts/footer.js";
import { useAppStore } from "../store/index.js";
import useConfig from "../models/account.js";
import { ElMessage } from "element-plus";
export default {
components: { AppForm, LayoutLogo, LayoutLocale, LayoutFooter },
template: html`<el-container>
<el-main class="flex justify-center">
<div>
<div class="flex items-center justify-center">
<layout-logo />
<layout-locale />
</div>
<el-card class="box-card" style="width:400px;">
<app-form :schema="schema" v-model="model" @submit="submit">
<template #submitText>确定</template>
</app-form>
</el-card>
<layout-footer />
</div>
</el-main>
</el-container>`,
setup() {
const schema = useConfig();
const model = reactive(schemaToModel(schema));
schema.properties.newPassword2.rules.push({
validator: (rule, value, callback) => {
if (value !== model.newPassword) {
callback(new Error("确认新密码和新密码必须一致"));
} else {
callback();
}
},
});
const submit = async (callback, loading) => {
try {
const appStore = useAppStore();
const url = `base/user/${appStore.user.id}/change-password`;
const result = await request(url, model, { method: "POST" });
if (!result.errors) {
ElMessage.success("密码修改成功");
}
} catch (error) {
console.log(error);
} finally {
loading.value = false;
}
};
return {
schema,
model,
submit,
};
},
};

23
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/login.js

@ -9,6 +9,8 @@ import LayoutLocale from "../layouts/locale.js";
import LayoutFooter from "../layouts/footer.js";
import { useAppStore } from "../store/index.js";
import useLoginModel from "../models/login.js";
import { ElMessage } from "element-plus";
import { useI18n } from "vue-i18n";
export default {
components: { AppForm, LayoutLogo, LayoutLocale, LayoutFooter },
@ -31,20 +33,25 @@ export default {
setup() {
const schema = reactive(useLoginModel());
const model = reactive(schemaToModel(schema));
const { t } = useI18n();
const submit = async (callback, loading) => {
try {
const url = "base/token";
const appStore = useAppStore();
const result = await request(url, model, { method: "POST" });
if (!result.errors) {
appStore.token = result.data.accessToken;
if (appStore.token) {
setAccessToken(appStore.token);
//setRefreshToken(result.data.refresh_token);
appStore.user = await getUser();
await refreshRouter();
const redirect = router.currentRoute.value.query?.redirect ?? "/";
router.push(redirect);
if (result.data?.accessToken) {
appStore.token = result.data.accessToken;
if (appStore.token) {
setAccessToken(appStore.token);
//setRefreshToken(result.data.refresh_token);
appStore.user = await getUser();
await refreshRouter();
const redirect = router.currentRoute.value.query?.redirect ?? "/";
router.push(redirect);
}
} else {
ElMessage.error(t(result.data.errorDescription));
}
}
callback(result.errors);

16
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/vmi/balance.js

@ -20,13 +20,15 @@ export default {
config.value = useConfig(route.meta?.businessType, route.meta);
let notify = null;
PubSub.subscribe(event, async (_, data) => {
notify?.close();
notify = ElNotification({
position: "bottom-right",
title: "待同步库存数量",
message: data,
duration: 0,
});
if (route.path === "/vmi/balance") {
notify?.close();
notify = ElNotification({
position: "bottom-right",
title: "待同步库存数量",
message: data,
duration: 0,
});
}
});
});
onUnmounted(() => PubSub.unsubscribe(event));

18
code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/BBAC_PD_DTO.cs

@ -136,22 +136,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// 替换生产码
/// </summary>
public string REPN { get; set; }
/// <summary>
/// 键值
/// </summary>
public string KeyCode { get; set; }
/// <summary>
/// 扩展字段1
/// </summary>
public string Extend1 { get; set; }
/// <summary>
/// 扩展字段2
/// </summary>
public string Extend2 { get; set; }
/// <summary>
/// 扩展字段3
/// </summary>
public string Extend3 { get; set; }
/// <summary>
/// 客户零件号
/// </summary>

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

@ -255,13 +255,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
/// <summary>
///零件号
/// </summary>
[Display(Name = "零件号")]
[Display(Name = "客户零件号")]
public string LU { get; set; }
/// <summary>
///零件号
/// </summary>
[Display(Name = "客户零件号")]
[Display(Name = "零件号")]
public string PartCode { get; set; }

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

@ -30,6 +30,7 @@ using Win.Abp.Snowflakes;
using Win.Sfs.SettleAccount.CommonManagers;
using Volo.Abp;
using Win.Sfs.SettleAccount.Entities.BQ.Temp;
using Volo.Abp.Uow;
namespace Win.Sfs.SettleAccount.Entities.BQ
{
@ -81,15 +82,13 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[UnitOfWork(false)]
public async override Task<IActionResult> GenerateInvoice([FromBody] string invbillNum)
{
var main =await _bbacMng.GetMainAsync(invbillNum);
if (main != null)
{
if (main.State != SettleBillState.)
{
return new JsonResult(new { Code = 400, Message = "已创建发票不能重复创建" });

9
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/JobHostdService.cs

@ -9,7 +9,6 @@ using System.Threading;
using System.Threading.Tasks;
using Cronos;
using Microsoft.AspNetCore.SignalR;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using SettleAccount.Job.SignalR;
@ -164,6 +163,10 @@ public class JobHostdService : BackgroundService, IApplicationService
}
}
}
catch(CronFormatException ex)
{
Console.WriteLine($"{job.Name},Cron解析失败:{ex.Message},{ex.ToString()}");
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
@ -254,7 +257,7 @@ public class JobHostdService : BackgroundService, IApplicationService
private JobItem GetJobItem(Guid id)
{
using var scope = this._serviceProvider.CreateScope();
return scope.ServiceProvider.GetRequiredService<SettleAccountDbContext>().Set<JobItem>().AsNoTracking().FirstOrDefault(o => o.Id == id);
return scope.ServiceProvider.GetRequiredService<SettleAccountDbContext>().Set<JobItem>().FirstOrDefault(o => o.Id == id);
}
private void JobItemHeartBeat(Guid id)
@ -298,7 +301,7 @@ public class JobHostdService : BackgroundService, IApplicationService
this._stoppingToken = stoppingToken;
using var scope = this._serviceProvider.CreateScope();
var db = scope.ServiceProvider.GetRequiredService<SettleAccountDbContext>();
var jobs = db.Set<JobItem>().AsNoTracking().ToList();
var jobs = db.Set<JobItem>().ToList();
jobs.ForEach(this.AddJob);
return Task.CompletedTask;
}

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

@ -84,12 +84,10 @@ public class VmiAsyncBalanceService : ApplicationService, IJobService, ITransien
}
if (logType == VmiLogType.Type100 && balance.Qty < decimal.Zero && log.Qty > 0)
{
//更新补货
var log2 = db.Set<VmiLog>().FirstOrDefault(o => o.Id == log.Id);
if (log2 != null)
{
log2.IsReplenished = true;
}
//添加负库存补货记录
var log2 = new VmiReplenished();
log2.InjectFrom(log);
await db.Set<VmiReplenished>().AddAsync(log2).ConfigureAwait(false);
}
}
message.isConsumed = true;

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

@ -69,7 +69,14 @@ namespace SettleAccount.Bases
public virtual string Site { get; set; }
public virtual void SetId(Guid guid)
{
Id = guid;
}
}

3
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/BBAC_CAN_SA.cs

@ -46,6 +46,9 @@ public class BBAC_CAN_SA : SA_CAN_BASE_MAIN
Site = site;
BusinessType = businessType;
}
}
[Display(Name = "BBAC可结算导入明细")]

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

@ -64,6 +64,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var billNumber = OrderNumberGenerator.GenerateOrderNumber("N");
var _entity = new BBAC_CAN_SA();
_entity.SetId(Guid.NewGuid());
_entity.BillNum = billNumber;
_entity.InvGroupNum = billNumber;
_entity.Version = DateTime.Now.Year + DateTime.Now.Month;

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

@ -76,6 +76,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
_entity.State = SettleBillState.;
_entity.SettleBillNum = string.Empty;
_entity.BusinessType = p_list.FirstOrDefault().BusinessType;
_entity.SetId(Guid.NewGuid());
var _entityList = new List<HBPO_CAN_SA_DETAIL>();
foreach (var itm in p_list)
{

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

@ -1282,14 +1282,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
}
if (invoiceMap.Keys.Count > 0)
{
var groupList = new List<INVOICE_MAP_GROUP>();
var notDetialList = new List<INVOICE_NOT_SETTLE>();
var detailList = new List<INVOICE_WAIT_DETAIL>();
var invlist = new List<INVOICE_GRP>();
var salist = new List<TDetail>();
var adjlist = new List<PUB_ADJ_DETAIL>();
foreach (var itm in invoiceMap)//分组影响和
{
var key = itm.Key;//发票票号
@ -1311,21 +1309,19 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
adjdetails.Add(detail);
}
}
var detailDtos = dtos.Where(p => ls.Contains(p.GroupNum)).GroupBy(p => new { p.InvGroupNum, p.PartCode, p.Price, p.BeginDate, p.EndDate, p.ContractDocID })
var detailDtos = dtos.Where(p => ls.Contains(p.GroupNum)).GroupBy(p => new { p.InvGroupNum, p.PartCode, p.Price, p.BeginDate, p.EndDate, p.ContractDocID,p.LU })
.Select(itm => new
{
PartCode = itm.Key.PartCode,
InvGroupNum = itm.Key.InvGroupNum,
LU = itm.Key.PartCode,
LU = itm.Key.LU,
ContactDocID = itm.Key.ContractDocID,
Price = itm.Key.Price,
Amt = Math.Round(itm.Sum(k => k.Qty) * itm.Key.Price, 2),
Qty = itm.Sum(k => k.Qty),
BeginDate = itm.Key.BeginDate,
EndDate = itm.Key.EndDate
})
.ToList();
}).ToList();
decimal amt = detailDtos.Sum(k => k.Amt);
decimal txtAmt = Math.Round(detailDtos.Sum(k => k.Amt), 2);
var mapList = new List<INVOICE_MAP_GROUP>();
@ -1373,10 +1369,29 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
detailList.AddRange(_entityDetailList);
}
var innotls = new List<INVOICE_NOT_SETTLE>();
var sq = dtos.Where(p => itm.Value.Contains(p.GroupNum)).GroupBy(p => new { p.LU, p.GroupNum })
.Select(p => new { version = p_version, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty), InvBillNum = itm.Key, GroupNum = p.Key.GroupNum });
foreach (var sitm in sq)
{
innotls.Add(new INVOICE_NOT_SETTLE(
guid: GuidGenerator.Create(),
version: p_version,
invGroupNum: p_InvGroupNum,
settleGroupNum: sitm.GroupNum,
lU: sitm.LU,
lU1: sitm.LU,
extend1: string.Empty,
extend2: string.Empty,
qty: sitm.Qty,
p_invbillnum: itm.Key
));
}
if (p_notlist != null && p_notlist.Count > 0)
{
var groupnum = itm.Value;
var notls = p_notlist.Where(p=>groupnum.Contains(p.GroupNum)).GroupBy(p => new { p.GroupNum, p.LU }).Select(p => new { GroupNum = p.Key.GroupNum, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty) });
var notls = p_notlist.Where(p => groupnum.Contains(p.GroupNum)).GroupBy(p => new { p.GroupNum, p.LU })
.Select(p => new { GroupNum = p.Key.GroupNum, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty), InvBillNum = itm.Key });
foreach (var nitm in notls)
{
innotls.Add(new INVOICE_NOT_SETTLE(
@ -1384,12 +1399,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
version: p_version,
invGroupNum: p_InvGroupNum,
settleGroupNum: nitm.GroupNum,
lU: string.Empty,
lU: nitm.LU,
lU1: nitm.LU,
extend1: string.Empty,
extend2: string.Empty,
qty: nitm.Qty,
p_invbillnum:itm.Key
p_invbillnum: itm.Key
));
}
if (innotls.Count > 0)
@ -1408,9 +1423,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
invGroupNum: p_InvGroupNum,
state: SettleBillState.,
invoiceBillState: InvoiceBillState.,
tax: 0,
parent: string.Empty,
preTaxDiff: 0,
tax: 0,
parent: string.Empty,
preTaxDiff: 0,
taxDiff: 0,
clientCode: string.Empty,
realAmt: 0
@ -1418,18 +1433,26 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
invlist.Add(invbill);
}
if (salist.Count > 0)
{
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 });
}
await _repository.DbContext.BulkInsertAsync(invlist);
await _repository.DbContext.BulkInsertAsync(groupList);
await _repository.DbContext.BulkInsertAsync(detailList);
if (salist.Count > 0)
{
await _repository.DbContext.BulkUpdateAsync(salist);
}
if (adjlist.Count > 0)
{
await _repository.DbContext.BulkUpdateAsync(adjlist);

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

@ -95,6 +95,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
}
var billNumber = OrderNumberGenerator.GenerateOrderNumber("N");
var _entity = new PUB_CAN_SA();
_entity.SetId(Guid.NewGuid());
_entity.BillNum = billNumber;
_entity.InvGroupNum = billNumber;
_entity.Version = DateTime.Now.Year + DateTime.Now.Month;
@ -134,6 +135,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
{
var billNumber = OrderNumberGenerator.GenerateOrderNumber("N");
var _entity = new PUB_CAN_SA();
_entity.SetId(Guid.NewGuid());
_entity.BillNum = billNumber;
_entity.InvGroupNum = billNumber;
_entity.Version = DateTime.Now.Year + DateTime.Now.Month;

2
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/JobItem.cs

@ -4,7 +4,7 @@ using Volo.Abp.Domain.Entities;
namespace Win.Sfs.SettleAccount.Entities.BQ.Vmi;
public class JobItem : Entity<Guid>, IHasConcurrencyStamp
public class JobItem : Entity<Guid>
{
public JobItem()
{

2
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiAsyncTask.cs

@ -3,7 +3,7 @@ using Volo.Abp.Domain.Entities;
namespace Win.Sfs.SettleAccount.Entities.BQ.Vmi;
public class VmiSyncTask : Entity<Guid>, IHasConcurrencyStamp
public class VmiSyncTask : Entity<Guid>
{
public VmiSyncTask()
{

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

@ -8,7 +8,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Vmi;
/// <summary>
/// ERP库位+零件号+生产码
/// </summary>
public class VmiBalance : Entity<Guid>, IHasConcurrencyStamp
public class VmiBalance : Entity<Guid>
{
public VmiBalance()
{

2
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiMessage.cs

@ -3,7 +3,7 @@ using Volo.Abp.Domain.Entities;
namespace Win.Sfs.SettleAccount.Entities.BQ.Vmi;
public class VmiMessage : Entity<Guid>, IHasConcurrencyStamp
public class VmiMessage : Entity<Guid>
{
public VmiMessage()
{

5
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiReplenished.cs

@ -0,0 +1,5 @@
namespace Win.Sfs.SettleAccount.Entities.BQ.Vmi;
public class VmiReplenished : VmiLog
{
}

10
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Vmi/VmiShardingRecord.cs

@ -0,0 +1,10 @@
using System;
using Volo.Abp.Domain.Entities;
namespace Win.Sfs.SettleAccount.Entities.BQ.Vmi;
public class VmiShardingRecord : Entity<Guid>
{
public string MainTable { get; set; }
public string ShardingTable { get; set; }
}

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

@ -1290,7 +1290,7 @@ namespace Win.Sfs.SettleAccount
b.HasIndex(o => o.Name).IsUnique();
b.Property(o => o.Service).HasMaxLength(100).IsRequired();
b.Property(o => o.Cron).HasMaxLength(50).IsRequired();
b.Property(x => x.ConcurrencyStamp).HasMaxLength(50);
b.Property(o => o.ConcurrencyStamp).HasMaxLength(50).IsConcurrencyToken();
});
builder.Entity<JobLog>(b =>
@ -1304,6 +1304,7 @@ namespace Win.Sfs.SettleAccount
b.ToTable($"{options.TablePrefix}_VmiMessage", options.Schema);
b.ConfigureByConvention();
b.Property(o => o.Number).ValueGeneratedOnAdd().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore);
b.Property(o => o.ConcurrencyStamp).HasMaxLength(50).IsConcurrencyToken();
});
builder.Entity((Action<EntityTypeBuilder<VmiBalance>>)(b =>
@ -1312,6 +1313,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.Property(o => o.ConcurrencyStamp).HasMaxLength(50).IsConcurrencyToken();
b.HasIndex(o => (new
{
o.DeliverBillType,
@ -1334,6 +1336,12 @@ namespace Win.Sfs.SettleAccount
b.Property(o => o.UpdatedTime).ValueGeneratedOnAddOrUpdate().Metadata.SetAfterSaveBehavior(PropertySaveBehavior.Ignore);
});
builder.Entity<VmiReplenished>(b =>
{
b.ToTable($"{options.TablePrefix}_VmiReplenished", options.Schema);
b.ConfigureByConvention();
});
builder.Entity<VmiSnapshot>(b =>
{
b.ToTable($"{options.TablePrefix}_VmiSnapshot", options.Schema);
@ -1344,6 +1352,7 @@ namespace Win.Sfs.SettleAccount
{
b.ToTable($"{options.TablePrefix}_VmiSyncTask", options.Schema);
b.ConfigureByConvention();
b.Property(o => o.ConcurrencyStamp).HasMaxLength(50).IsConcurrencyToken();
});
//seed

5755
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230825011303_vmi14.Designer.cs

File diff suppressed because it is too large

330
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230825011303_vmi14.cs

@ -0,0 +1,330 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class vmi14 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("eaaaf238-9865-4851-91d4-faa239bf6fca"));
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "Set_VmiSyncTask",
type: "nvarchar(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "Set_VmiMessage",
type: "nvarchar(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "Set_VmiBalance",
type: "nvarchar(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(40)",
oldMaxLength: 40,
oldNullable: true);
migrationBuilder.CreateTable(
name: "Set_VmiReplenished",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Set_VmiReplenished", x => x.Id);
table.ForeignKey(
name: "FK_Set_VmiReplenished_Set_VmiLog_Id",
column: x => x.Id,
principalTable: "Set_VmiLog",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
column: "ConcurrencyStamp",
value: "800892b9cac64cb69669dc937238d39d");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
column: "ConcurrencyStamp",
value: "4794bc4fa2ad409ea64cdd2404983475");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
column: "ConcurrencyStamp",
value: "0efcdccaa94d4e7fb550794d50efa9ab");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
column: "ConcurrencyStamp",
value: "1e3131d9f8454d96b0429796010752d3");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
column: "ConcurrencyStamp",
value: "5f427300bdfd44a19eaf54fddde31db1");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8e1cb5a9-8bcf-17fd-97e3-4c10532a5794"),
column: "ConcurrencyStamp",
value: "a4c7d3ff7e3b4578bc2332f114c7a6bb");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
column: "ConcurrencyStamp",
value: "3ab808a6104c483496414711259c375b");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
column: "ConcurrencyStamp",
value: "4d161eb0a7154f1db4cf7dcca4ffceea");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
column: "ConcurrencyStamp",
value: "9186efa28e7242bf94451f40834c2160");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
column: "ConcurrencyStamp",
value: "742b38d034d94d4685b7f074f35cd3ce");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c3fe2b66-28cc-c612-eca6-a362769ae90c"),
column: "ConcurrencyStamp",
value: "98dff4b93f1e4b0ba88a556ab20e7973");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
column: "ConcurrencyStamp",
value: "e25c06d5cdd34b2bbf909e8c655f94fc");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
column: "ConcurrencyStamp",
value: "602c85109f6743a6949bb260b3846ca7");
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "AssembleData", "BillTime", "CodeType", "ConcurrencyStamp", "Configcode", "CustPartCode", "DeliverBillType", "DeliverSubBillType", "ErpToLoc", "IsReplenished", "LastUpdate", "MatchNumber", "OrderNum", "PjsNum", "Qty", "ReMark", "RealCode", "RealPartCode", "Seq", "SettlementPartCode", "SettlementVinCode", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("67c5b578-8110-4674-ac1e-c3da0814244a"), null, null, null, "71adabfbf9a74d35985c08ecba2dd537", null, null, 1, null, "ErpToLoc", null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 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[] { "09290251f9914e5385fbae2fa00c4734", 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[] { "cecf7d9ac9924ac99b3665395406b3af", new DateTime(2023, 8, 20, 0, 0, 0, 0, DateTimeKind.Local) });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Set_VmiReplenished");
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("67c5b578-8110-4674-ac1e-c3da0814244a"));
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "Set_VmiSyncTask",
type: "nvarchar(40)",
maxLength: 40,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "Set_VmiMessage",
type: "nvarchar(40)",
maxLength: 40,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "Set_VmiBalance",
type: "nvarchar(40)",
maxLength: 40,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
column: "ConcurrencyStamp",
value: "fe58be3c510f477da0752ac73c40d681");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
column: "ConcurrencyStamp",
value: "5b04d6f48ea64f1594b4f54a57b74637");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
column: "ConcurrencyStamp",
value: "f31814e50b6f41f384278fb6f0af0998");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
column: "ConcurrencyStamp",
value: "0198660d53f34e529c1b72060251e05d");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
column: "ConcurrencyStamp",
value: "2c87caef446f428da6f3f243e8d7c3f9");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8e1cb5a9-8bcf-17fd-97e3-4c10532a5794"),
column: "ConcurrencyStamp",
value: "613b7650456c4c97a67bcff9c90a32d0");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
column: "ConcurrencyStamp",
value: "b4f16078aa6f43d49da98f03072c7ce9");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
column: "ConcurrencyStamp",
value: "6a28afa95d824c11adf073841328d4d7");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
column: "ConcurrencyStamp",
value: "cfd79a067c014e8fa2123fe3d3055af5");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
column: "ConcurrencyStamp",
value: "9df05934dd384f12a55d4469cad4ef08");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("c3fe2b66-28cc-c612-eca6-a362769ae90c"),
column: "ConcurrencyStamp",
value: "79a28a9f333543219b44e10b1c50d8ef");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
column: "ConcurrencyStamp",
value: "40066948ecb841e4849cfb928b117045");
migrationBuilder.UpdateData(
table: "Set_JobItem",
keyColumn: "Id",
keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
column: "ConcurrencyStamp",
value: "134d1d1587d64f3abd932d6bc86d8e57");
migrationBuilder.InsertData(
table: "Set_VmiBalance",
columns: new[] { "Id", "AssembleData", "BillTime", "CodeType", "ConcurrencyStamp", "Configcode", "CustPartCode", "DeliverBillType", "DeliverSubBillType", "ErpToLoc", "IsReplenished", "LastUpdate", "MatchNumber", "OrderNum", "PjsNum", "Qty", "ReMark", "RealCode", "RealPartCode", "Seq", "SettlementPartCode", "SettlementVinCode", "UniqueCode", "VinCode", "factory" },
values: new object[] { new Guid("eaaaf238-9865-4851-91d4-faa239bf6fca"), null, null, null, "506b3fdc042d453fb4ee16c3fc5fa518", null, null, 1, null, "ErpToLoc", null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 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[] { "f489e433f5f14309810179ef2498ec00", new DateTime(2023, 8, 18, 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[] { "93224b6dfb8347348e757dd7f828d28d", new DateTime(2023, 8, 18, 0, 0, 0, 0, DateTimeKind.Local) });
}
}
}

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

@ -4378,8 +4378,7 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasColumnName("ConcurrencyStamp");
.HasColumnType("nvarchar(50)");
b.Property<string>("Cron")
.IsRequired()
@ -4416,7 +4415,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"),
ConcurrencyStamp = "40066948ecb841e4849cfb928b117045",
ConcurrencyStamp = "e25c06d5cdd34b2bbf909e8c655f94fc",
Cron = "0 0 8 26 *",
IsDisabled = false,
IsRunning = false,
@ -4426,7 +4425,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("185c5968-e02b-267e-db2f-225fccfc9716"),
ConcurrencyStamp = "fe58be3c510f477da0752ac73c40d681",
ConcurrencyStamp = "800892b9cac64cb69669dc937238d39d",
Cron = "0 0/1 * * * ?",
IsDisabled = false,
IsRunning = false,
@ -4436,7 +4435,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"),
ConcurrencyStamp = "5b04d6f48ea64f1594b4f54a57b74637",
ConcurrencyStamp = "4794bc4fa2ad409ea64cdd2404983475",
Cron = "0 0/1 * * * ?",
IsDisabled = false,
IsRunning = false,
@ -4446,7 +4445,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("8e1cb5a9-8bcf-17fd-97e3-4c10532a5794"),
ConcurrencyStamp = "613b7650456c4c97a67bcff9c90a32d0",
ConcurrencyStamp = "a4c7d3ff7e3b4578bc2332f114c7a6bb",
Cron = "0 0/5 * * * ? *",
IsDisabled = false,
IsRunning = false,
@ -4456,7 +4455,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("c3fe2b66-28cc-c612-eca6-a362769ae90c"),
ConcurrencyStamp = "79a28a9f333543219b44e10b1c50d8ef",
ConcurrencyStamp = "98dff4b93f1e4b0ba88a556ab20e7973",
Cron = "0 0/5 * * * ? *",
IsDisabled = false,
IsRunning = false,
@ -4466,7 +4465,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"),
ConcurrencyStamp = "6a28afa95d824c11adf073841328d4d7",
ConcurrencyStamp = "4d161eb0a7154f1db4cf7dcca4ffceea",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4476,7 +4475,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"),
ConcurrencyStamp = "f31814e50b6f41f384278fb6f0af0998",
ConcurrencyStamp = "0efcdccaa94d4e7fb550794d50efa9ab",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4486,7 +4485,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"),
ConcurrencyStamp = "2c87caef446f428da6f3f243e8d7c3f9",
ConcurrencyStamp = "5f427300bdfd44a19eaf54fddde31db1",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4496,7 +4495,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"),
ConcurrencyStamp = "0198660d53f34e529c1b72060251e05d",
ConcurrencyStamp = "1e3131d9f8454d96b0429796010752d3",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4506,7 +4505,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"),
ConcurrencyStamp = "134d1d1587d64f3abd932d6bc86d8e57",
ConcurrencyStamp = "602c85109f6743a6949bb260b3846ca7",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4516,7 +4515,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"),
ConcurrencyStamp = "b4f16078aa6f43d49da98f03072c7ce9",
ConcurrencyStamp = "3ab808a6104c483496414711259c375b",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4526,7 +4525,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"),
ConcurrencyStamp = "9df05934dd384f12a55d4469cad4ef08",
ConcurrencyStamp = "742b38d034d94d4685b7f074f35cd3ce",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4536,7 +4535,7 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"),
ConcurrencyStamp = "cfd79a067c014e8fa2123fe3d3055af5",
ConcurrencyStamp = "9186efa28e7242bf94451f40834c2160",
Cron = "0 0/30 * * * ? ",
IsDisabled = false,
IsRunning = false,
@ -4593,9 +4592,8 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Configcode")
.HasColumnType("nvarchar(450)");
@ -4676,8 +4674,8 @@ namespace Win.Sfs.SettleAccount.Migrations
b.HasData(
new
{
Id = new Guid("eaaaf238-9865-4851-91d4-faa239bf6fca"),
ConcurrencyStamp = "506b3fdc042d453fb4ee16c3fc5fa518",
Id = new Guid("67c5b578-8110-4674-ac1e-c3da0814244a"),
ConcurrencyStamp = "71adabfbf9a74d35985c08ecba2dd537",
CreatedTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
DeliverBillType = 1,
ErpToLoc = "ErpToLoc",
@ -4801,9 +4799,8 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<DateTime>("CreatedTime")
.HasColumnType("datetime2");
@ -4855,9 +4852,8 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<DateTime>("LastUpdate")
.HasColumnType("datetime2");
@ -4876,16 +4872,16 @@ namespace Win.Sfs.SettleAccount.Migrations
new
{
Id = new Guid("08de7a37-5ede-f524-cb3d-3c80888fd7d8"),
ConcurrencyStamp = "f489e433f5f14309810179ef2498ec00",
LastUpdate = new DateTime(2023, 8, 18, 0, 0, 0, 0, DateTimeKind.Local),
ConcurrencyStamp = "09290251f9914e5385fbae2fa00c4734",
LastUpdate = new DateTime(2023, 8, 20, 0, 0, 0, 0, DateTimeKind.Local),
Name = "库存事务备份",
Number = "Set_VmiLog"
},
new
{
Id = new Guid("b8ba69e3-f5a3-c95e-8f82-c9c2fec960b4"),
ConcurrencyStamp = "93224b6dfb8347348e757dd7f828d28d",
LastUpdate = new DateTime(2023, 8, 18, 0, 0, 0, 0, DateTimeKind.Local),
ConcurrencyStamp = "cecf7d9ac9924ac99b3665395406b3af",
LastUpdate = new DateTime(2023, 8, 20, 0, 0, 0, 0, DateTimeKind.Local),
Name = "库存余额备份",
Number = "Set_VmiBalance"
});
@ -5725,6 +5721,13 @@ namespace Win.Sfs.SettleAccount.Migrations
b.ToTable("Set_relationship");
});
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiReplenished", b =>
{
b.HasBaseType("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiLog");
b.ToTable("Set_VmiReplenished");
});
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.JobLog", b =>
{
b.HasOne("Win.Sfs.SettleAccount.Entities.BQ.Vmi.JobItem", "Job")
@ -5735,6 +5738,15 @@ namespace Win.Sfs.SettleAccount.Migrations
b.Navigation("Job");
});
modelBuilder.Entity("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiReplenished", b =>
{
b.HasOne("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiLog", null)
.WithOne()
.HasForeignKey("Win.Sfs.SettleAccount.Entities.BQ.Vmi.VmiReplenished", "Id")
.OnDelete(DeleteBehavior.ClientCascade)
.IsRequired();
});
#pragma warning restore 612, 618
}
}

Loading…
Cancel
Save