学 赵
1 year ago
81 changed files with 27220 additions and 1447 deletions
@ -1,5 +1,5 @@ |
|||||
export default { |
export default { |
||||
enableLocale: false, |
enableLocale: false, |
||||
//baseURL: "http://dev.ccwin-in.com:10582/api",
|
// baseURL: "http://dev.ccwin-in.com:16082/api",
|
||||
baseURL: "/api", |
baseURL: new URLSearchParams(location.search).get("api") ?? "/api", |
||||
}; |
}; |
||||
|
@ -1,13 +1,7 @@ |
|||||
import { createI18n } from "vue-i18n"; |
import { createI18n } from "vue-i18n"; |
||||
import { useAppStore } from "../store/index.js"; |
import { getLocalizationAsync } from "../api/site.js"; |
||||
|
|
||||
function useLocale() { |
const localization = await getLocalizationAsync(); |
||||
const appStore = useAppStore(); |
const i18n = createI18n(localization); |
||||
const i18n = createI18n({ |
|
||||
legacy: false, |
|
||||
...appStore.localization, |
|
||||
}); |
|
||||
return i18n; |
|
||||
} |
|
||||
|
|
||||
export default useLocale; |
export default i18n; |
||||
|
@ -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, |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
} |
@ -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, |
||||
|
}; |
||||
|
}, |
||||
|
}; |
@ -0,0 +1,45 @@ |
|||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Enums; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 结算、发运、Edi比对类型
|
||||
|
/// </summary>
|
||||
|
public enum EnumSaSeEdiCompareCategory |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 未定义
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "未定义")] |
||||
|
None = 0, |
||||
|
/// <summary>
|
||||
|
/// 有结算有发运(有EDI数据)
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "有结算有发运(有EDI数据")] |
||||
|
HaveSaHaveSeHaveEdi = 1, |
||||
|
/// <summary>
|
||||
|
/// 有结算有发运(无EDI数据)
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "有结算有发运(无EDI数据)")] |
||||
|
HaveSaHaveSeNotHaveEdi = 2, |
||||
|
/// <summary>
|
||||
|
/// 有结算无发运(有EDI数据)
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "有结算无发运(有EDI数据)")] |
||||
|
HaveSaNotHaveSeHaveEdi = 3, |
||||
|
/// <summary>
|
||||
|
/// 有结算无发运(无EDI数据)
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "有结算无发运(无EDI数据)")] |
||||
|
HaveSaNotHaveSeNotHaveEdi = 4, |
||||
|
/// <summary>
|
||||
|
/// 无结算有发运(有EDI数据)
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "无结算有发运(有EDI数据)")] |
||||
|
NotHaveSaHaveSeHaveEdi = 5, |
||||
|
/// <summary>
|
||||
|
/// 无结算有发运(无EDI数据)
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "无结算有发运(无EDI数据)")] |
||||
|
NotHaveSaHaveSeNotHaveEdi = 6 |
||||
|
} |
@ -0,0 +1,83 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Volo.Abp.Domain.Entities; |
||||
|
using Win.Sfs.SettleAccount.Entities.BQ.Syncs; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Entities.BQ.Vmi; |
||||
|
|
||||
|
public abstract class VmiBalanceBase : Entity<Guid> |
||||
|
{ |
||||
|
public VmiBalanceBase() |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
public VmiBalanceBase(Guid id) : base(id) |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
[Display(Name = "LU零件号", Order = 6)] |
||||
|
public string RealPartCode { get; set; } |
||||
|
|
||||
|
[Display(Name = "客户零件号", Order = 7)] |
||||
|
public string CustPartCode { get; set; } |
||||
|
|
||||
|
[Display(Name = "生产码类型", Order = 8)] |
||||
|
public string CodeType { get; set; } |
||||
|
|
||||
|
[Display(Name = "发货类型", Order = 9)] |
||||
|
public EnumDeliverBjBmpBillType? DeliverBillType { get; set; } |
||||
|
|
||||
|
[Display(Name = "数量", Order = 10)] |
||||
|
public decimal Qty { get; set; } |
||||
|
|
||||
|
[Display(Name = "发运日期", Order = 11)] |
||||
|
public DateTime? BillTime { get; set; } |
||||
|
|
||||
|
[Display(Name = "订单日期", Order = 12)] |
||||
|
public DateTime? AssembleData { get; set; } |
||||
|
|
||||
|
[Display(Name = "ERP库位", Order = 13)] |
||||
|
public string ErpToLoc { get; set; } |
||||
|
|
||||
|
[Display(Name = "EDI顺序号", Order = 14)] |
||||
|
public string Seq { get; set; } |
||||
|
|
||||
|
[Display(Name = "客户订单号", Order = 15)] |
||||
|
public string OrderNum { get; set; } |
||||
|
|
||||
|
[Display(Name = "塑件唯一码", Order = 16)] |
||||
|
public string UniqueCode { get; set; } |
||||
|
|
||||
|
[Display(Name = "EDI总成号", Order = 17)] |
||||
|
public string MatchNumber { get; set; } |
||||
|
|
||||
|
[Display(Name = "PJIS生产顺序号", Order = 18)] |
||||
|
public string PjsNum { get; set; } |
||||
|
|
||||
|
[Display(Name = "实际生产码", Order = 19)] |
||||
|
public string RealCode { get; set; } |
||||
|
|
||||
|
[Display(Name = "配置码", Order = 20)] |
||||
|
public string Configcode { get; set; } |
||||
|
|
||||
|
[Display(Name = "工厂", Order = 21)] |
||||
|
public string factory { get; set; } |
||||
|
|
||||
|
[Display(Name = "发货子类型", Order = 22)] |
||||
|
public EnumDeliverSubBillType? DeliverSubBillType { get; set; } |
||||
|
|
||||
|
[Display(Name = "EDI订单生产码", Order = 23)] |
||||
|
public string VinCode { get; set; } |
||||
|
|
||||
|
[Display(Name = "结算生产码", Order = 24)] |
||||
|
public string SettlementVinCode { get; set; } |
||||
|
|
||||
|
[Display(Name = "结算生产码", Order = 25)] |
||||
|
public string SettlementPartCode { get; set; } |
||||
|
|
||||
|
[Display(Name = "是否补货", Order = 26)] |
||||
|
public bool? IsReplenished { get; set; } |
||||
|
|
||||
|
[Display(Name = "备注", Order = 27)] |
||||
|
public string ReMark { get; set; } |
||||
|
} |
@ -0,0 +1,39 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Entities.BQ.Vmi; |
||||
|
|
||||
|
public class VmiReplenished : VmiBalanceBase |
||||
|
{ |
||||
|
public VmiReplenished() |
||||
|
{ |
||||
|
ConcurrencyStamp = Guid.NewGuid().ToString("N"); |
||||
|
} |
||||
|
|
||||
|
public VmiReplenished(Guid id) : base(id) |
||||
|
{ |
||||
|
ConcurrencyStamp = Guid.NewGuid().ToString("N"); |
||||
|
} |
||||
|
|
||||
|
[Display(Name = "库存事务分类", Order = 0)] |
||||
|
public VmiLogType LogType { get; set; } |
||||
|
|
||||
|
[Display(Name = "变动单号", Order = 1)] |
||||
|
public string ChangedNumber { get; set; } |
||||
|
|
||||
|
[Display(Name = "变动时间", Order = 2)] |
||||
|
public DateTime ChangedTime { get; set; } |
||||
|
|
||||
|
[Display(Name = "变动类型", Order = 3)] |
||||
|
public VmiType ChangedType { get; set; } |
||||
|
|
||||
|
[Display(Name = "便动人", Order = 4)] |
||||
|
public string ChangedBy { get; set; } |
||||
|
|
||||
|
[Display(Name = "库存变动", Order = 5)] |
||||
|
public decimal ChangedQty { get; set; } |
||||
|
|
||||
|
public string ConcurrencyStamp { get; set; } |
||||
|
public DateTime CreatedTime { get; set; } |
||||
|
public DateTime UpdatedTime { get; set; } |
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
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; } |
||||
|
public DateTime Start { get; set; } |
||||
|
public DateTime End { get; set; } |
||||
|
} |
@ -0,0 +1,327 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Magicodes.ExporterAndImporter.Core; |
||||
|
using Magicodes.ExporterAndImporter.Excel; |
||||
|
using Win.Sfs.SettleAccount.Enums; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Reports; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 结算、EDI、发运对比
|
||||
|
/// </summary>
|
||||
|
public class SaSeEdiCompareDiff |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 类型
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "类型")] |
||||
|
public EnumSaSeEdiCompareCategory Category { get; set; } |
||||
|
/// <summary>
|
||||
|
/// Wms发货单号
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "Wms发货单号")] |
||||
|
public string WmsBillNum { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 发货日期
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "发货日期")] |
||||
|
public DateTime? ShippingDate { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 日顺序号
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "日顺序号")] |
||||
|
public string SeqNumber { get; set; } |
||||
|
/// <summary>
|
||||
|
/// PJIS日顺序号
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "PJIS日顺序号")] |
||||
|
public string PJISSeqNumber { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 结算数据中的过账日期
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "客户下线时间")] |
||||
|
public DateTime? CustomerOfflineTime { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 结算数量
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "结算数量")] |
||||
|
public decimal? SAQty { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 发货数量
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "发货数量")] |
||||
|
public decimal? SEQty { get; set; } |
||||
|
/// <summary>
|
||||
|
/// Eid数量
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "Eid数量")] |
||||
|
public decimal? EdiQty { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 定价
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "定价")] |
||||
|
public decimal? FixPrice { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 生产号
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "生产号")] |
||||
|
public string PN { set; get; } |
||||
|
/// <summary>
|
||||
|
/// WMS目标库位
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "WMS目标库位")] |
||||
|
public string ToLocCode { get; set; } |
||||
|
/// <summary>
|
||||
|
/// ERP目标库位
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "ERP目标库位")] |
||||
|
public string ToErpLocCode { get; set; } |
||||
|
/// <summary>
|
||||
|
/// Edi客户物料号
|
||||
|
/// </summary>
|
||||
|
public string EdiCustomerPartCode { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 发运客户物料号
|
||||
|
/// </summary>
|
||||
|
public string SeCustomerPartCode { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 发运厂内物料号
|
||||
|
/// </summary>
|
||||
|
public string SeFactoryPartCode { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 结算客户物料号
|
||||
|
/// </summary>
|
||||
|
public string SaCustomerPartCode { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 结算厂内物料号
|
||||
|
/// </summary>
|
||||
|
public string SaFactoryPartCode { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 客户物料号
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "客户物料号")] |
||||
|
public string CustomerPartCode { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 物料描述
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "物料描述")] |
||||
|
public string PartCodeDesc { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 厂内物料号
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "厂内物料号")] |
||||
|
public string FactoryPartCode { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 替换厂内物料号
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "替换厂内物料号")] |
||||
|
public string ReplaceFactoryPartCode { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 是否替换了厂内零件号
|
||||
|
/// </summary>
|
||||
|
public bool IsReplace { get; set; } |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 结算、发运、Eid对比明细
|
||||
|
/// </summary>
|
||||
|
[ExcelExporter(MaxRowNumberOnASheet = 900000)] |
||||
|
public class SaSeEdiCompareDetailExport |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 结算、发运、Eid对比明细
|
||||
|
/// </summary>
|
||||
|
public interface ISaSeEdiCompareDetailExport |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 类别
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "类别")] |
||||
|
[ExporterHeader(DisplayName = "类别")] |
||||
|
[ValueMapping("有结算有发运(有EDI数据)", 1)] |
||||
|
[ValueMapping("有结算有发运(无EDI数据)", 2)] |
||||
|
[ValueMapping("有结算无发运(有EDI数据)", 3)] |
||||
|
[ValueMapping("有结算无发运(无EDI数据)", 4)] |
||||
|
[ValueMapping("无结算有发运(有EDI数据)", 5)] |
||||
|
[ValueMapping("无结算有发运(无EDI数据)", 6)] |
||||
|
public EnumSaSeEdiCompareCategory Category { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 零件描述
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "零件描述")] |
||||
|
[ExporterHeader(DisplayName = "物料描述")] |
||||
|
public string PartCodeDesc { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 替换厂内零件号
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "替换厂内零件号")] |
||||
|
[ExporterHeader(DisplayName = "替换厂内零件号")] |
||||
|
public string ReplaceFactoryPartCode { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 结算数量
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "结算数量")] |
||||
|
[ExporterHeader(DisplayName = "结算数量")] |
||||
|
public decimal SAQty { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 发货数量
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "发货数量")] |
||||
|
[ExporterHeader(DisplayName = "WMS发货数量")] |
||||
|
public decimal SEQty { get; set; } |
||||
|
/// <summary>
|
||||
|
/// Edi数量
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "Edi数量")] |
||||
|
[ExporterHeader(DisplayName = "Edi数量")] |
||||
|
public decimal EdiQty { get; set; } |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// JisBBAC结算、发运、Eid对比明细
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public class SaSeEdiCompareDetailExportJisBBAC : SaSeEdiCompareDetailExport, ISaSeEdiCompareDetailExport |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 类别
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "类别")] |
||||
|
[ExporterHeader(DisplayName = "类别")] |
||||
|
[ValueMapping("有结算有发运(有EDI数据)", 1)] |
||||
|
[ValueMapping("有结算有发运(无EDI数据)", 2)] |
||||
|
[ValueMapping("有结算无发运(有EDI数据)", 3)] |
||||
|
[ValueMapping("有结算无发运(无EDI数据)", 4)] |
||||
|
[ValueMapping("无结算有发运(有EDI数据)", 5)] |
||||
|
[ValueMapping("无结算有发运(无EDI数据)", 6)] |
||||
|
public EnumSaSeEdiCompareCategory Category { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 零件描述
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "零件描述")] |
||||
|
[ExporterHeader(DisplayName = "物料描述")] |
||||
|
public string PartCodeDesc { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 替换厂内零件号
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "替换厂内零件号")] |
||||
|
[ExporterHeader(DisplayName = "替换厂内零件号")] |
||||
|
public string ReplaceFactoryPartCode { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 结算数量
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "结算数量")] |
||||
|
[ExporterHeader(DisplayName = "结算数量")] |
||||
|
public decimal SAQty { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 发货数量
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "发货数量")] |
||||
|
[ExporterHeader(DisplayName = "WMS发货数量")] |
||||
|
public decimal SEQty { get; set; } |
||||
|
/// <summary>
|
||||
|
/// Edi数量
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "Edi数量")] |
||||
|
[ExporterHeader(DisplayName = "Edi数量")] |
||||
|
public decimal EdiQty { get; set; } |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// JisHBPO结算、发运、Eid对比明细
|
||||
|
/// </summary>
|
||||
|
public class SaSeEdiCompareDetailExportJisHBPO : SaSeEdiCompareDetailExport, ISaSeEdiCompareDetailExport |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 类别
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "类别")] |
||||
|
[ExporterHeader(DisplayName = "类别")] |
||||
|
[ValueMapping("有结算有发运(有EDI数据)", 1)] |
||||
|
[ValueMapping("有结算有发运(无EDI数据)", 2)] |
||||
|
[ValueMapping("有结算无发运(有EDI数据)", 3)] |
||||
|
[ValueMapping("有结算无发运(无EDI数据)", 4)] |
||||
|
[ValueMapping("无结算有发运(有EDI数据)", 5)] |
||||
|
[ValueMapping("无结算有发运(无EDI数据)", 6)] |
||||
|
public EnumSaSeEdiCompareCategory Category { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 零件描述
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "零件描述")] |
||||
|
[ExporterHeader(DisplayName = "物料描述")] |
||||
|
public string PartCodeDesc { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 替换厂内零件号
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "替换厂内零件号")] |
||||
|
[ExporterHeader(DisplayName = "替换厂内零件号")] |
||||
|
public string ReplaceFactoryPartCode { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 结算数量
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "结算数量")] |
||||
|
[ExporterHeader(DisplayName = "结算数量")] |
||||
|
public decimal SAQty { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 发货数量
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "发货数量")] |
||||
|
[ExporterHeader(DisplayName = "WMS发货数量")] |
||||
|
public decimal SEQty { get; set; } |
||||
|
/// <summary>
|
||||
|
/// Edi数量
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "Edi数量")] |
||||
|
[ExporterHeader(DisplayName = "Edi数量")] |
||||
|
public decimal EdiQty { get; set; } |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// PUB结算与发运对比汇总
|
||||
|
/// </summary>
|
||||
|
[ExcelExporter(MaxRowNumberOnASheet = 900000)] |
||||
|
public class SaSeEdiCompareSumExport |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 厂内物料号
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "厂内物料号")] |
||||
|
[ExporterHeader(DisplayName = "LU")] |
||||
|
public string FactoryPartCode { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 物料描述
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "物料描述")] |
||||
|
[ExporterHeader(DisplayName = "物料描述")] |
||||
|
public string PartCodeDesc { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 结算数量
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "结算数量")] |
||||
|
[ExporterHeader(DisplayName = "结算数量")] |
||||
|
public decimal SAQty { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 发货数量
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "发货数量")] |
||||
|
[ExporterHeader(DisplayName = "WMS发货数量")] |
||||
|
public decimal SEQty { get; set; } |
||||
|
/// <summary>
|
||||
|
/// Edi数量
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "Edi数量")] |
||||
|
[ExporterHeader(DisplayName = "Edi数量")] |
||||
|
public decimal EdiQty { get; set; } |
||||
|
/// <summary>
|
||||
|
/// 结算与EDI量差
|
||||
|
/// </summary>
|
||||
|
[ExporterHeader(DisplayName = "结算与EDI量差")] |
||||
|
public decimal SaEdiQty => SAQty - EdiQty; |
||||
|
/// <summary>
|
||||
|
/// WMS发货与EDI数量差
|
||||
|
/// </summary>
|
||||
|
[ExporterHeader(DisplayName = "WMS发货与EDI数量差")] |
||||
|
public decimal SeEdiQty => SEQty - EdiQty; |
||||
|
} |
File diff suppressed because it is too large
@ -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) }); |
||||
|
} |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
@ -0,0 +1,499 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Migrations |
||||
|
{ |
||||
|
public partial class vmi15 : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DeleteData( |
||||
|
table: "Set_VmiBalance", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("67c5b578-8110-4674-ac1e-c3da0814244a")); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "AssembleData", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "BillTime", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "CodeType", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "Configcode", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "CreatedTime", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "CustPartCode", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "DeliverBillType", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "DeliverSubBillType", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ErpToLoc", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "IsReplenished", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "MatchNumber", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "OrderNum", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "PjsNum", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "Qty", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ReMark", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "RealCode", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "RealPartCode", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "Seq", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "SettlementPartCode", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "SettlementVinCode", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "UniqueCode", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "UpdatedTime", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "VinCode", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "factory", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "4e46d864aae4482e8881952792c6825d"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "ed9901e7e6e9410586a3af9111d2bb59"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "964f6aa5b6304936a93f8504f317c82e"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "79faaa6f20934b64942a91a524a87af3"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "82ac7a04c0fe4c2992bd99c8a6e73be7"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("8e1cb5a9-8bcf-17fd-97e3-4c10532a5794"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "1c2bfef188904011b6aca9ed6af49f44"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "cc3b71fcf18245349951c249c5b56e86"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "c8069ed240614eb4a9872d260d8839b8"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "c273b5a9dcbd4fc4ba7d33f6ef464ed7"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "5c56e915398d4e8d92644d811a98c5df"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("c3fe2b66-28cc-c612-eca6-a362769ae90c"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "8069a183435141cfa0398fe295ec652c"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "e2266fce0ce94b9082a705bb6528b36c"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "54450a20639f479887d74e798aa0f00b"); |
||||
|
|
||||
|
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("9053e8f6-6f09-42ba-9502-2e7a2f9105c3"), null, null, null, "82e1f152724a4a9882aab30e6cc337cb", 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"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "ed9c903f9b4146aeb682f9e60ebff821"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_VmiSyncTask", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("b8ba69e3-f5a3-c95e-8f82-c9c2fec960b4"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "b84bb2ea7bf040368718c5d9063144bf"); |
||||
|
|
||||
|
migrationBuilder.AddForeignKey( |
||||
|
name: "FK_Set_VmiLog_Set_VmiBalance_Id", |
||||
|
table: "Set_VmiLog", |
||||
|
column: "Id", |
||||
|
principalTable: "Set_VmiBalance", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Restrict); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropForeignKey( |
||||
|
name: "FK_Set_VmiLog_Set_VmiBalance_Id", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DeleteData( |
||||
|
table: "Set_VmiBalance", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("9053e8f6-6f09-42ba-9502-2e7a2f9105c3")); |
||||
|
|
||||
|
migrationBuilder.AddColumn<DateTime>( |
||||
|
name: "AssembleData", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "datetime2", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<DateTime>( |
||||
|
name: "BillTime", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "datetime2", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "CodeType", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "Configcode", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<DateTime>( |
||||
|
name: "CreatedTime", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "datetime2", |
||||
|
nullable: false, |
||||
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "CustPartCode", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<int>( |
||||
|
name: "DeliverBillType", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "int", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<int>( |
||||
|
name: "DeliverSubBillType", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "int", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "ErpToLoc", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<bool>( |
||||
|
name: "IsReplenished", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "bit", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "MatchNumber", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "OrderNum", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "PjsNum", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<decimal>( |
||||
|
name: "Qty", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "decimal(18,2)", |
||||
|
nullable: false, |
||||
|
defaultValue: 0m); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "ReMark", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "RealCode", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "RealPartCode", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "Seq", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "SettlementPartCode", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "SettlementVinCode", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "UniqueCode", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<DateTime>( |
||||
|
name: "UpdatedTime", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "datetime2", |
||||
|
nullable: false, |
||||
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "VinCode", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "factory", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
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"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "09290251f9914e5385fbae2fa00c4734"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_VmiSyncTask", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("b8ba69e3-f5a3-c95e-8f82-c9c2fec960b4"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "cecf7d9ac9924ac99b3665395406b3af"); |
||||
|
} |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
@ -0,0 +1,849 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Migrations |
||||
|
{ |
||||
|
public partial class vmi16 : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropForeignKey( |
||||
|
name: "FK_Set_VmiLog_Set_VmiBalance_Id", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropForeignKey( |
||||
|
name: "FK_Set_VmiReplenished_Set_VmiLog_Id", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DeleteData( |
||||
|
table: "Set_VmiBalance", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("9053e8f6-6f09-42ba-9502-2e7a2f9105c3")); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "LastUpdate", |
||||
|
table: "Set_VmiBalance"); |
||||
|
|
||||
|
migrationBuilder.AddColumn<DateTime>( |
||||
|
name: "AssembleData", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "datetime2", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<DateTime>( |
||||
|
name: "BillTime", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "datetime2", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "ChangedBy", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "ChangedNumber", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<decimal>( |
||||
|
name: "ChangedQty", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "decimal(18,2)", |
||||
|
nullable: false, |
||||
|
defaultValue: 0m); |
||||
|
|
||||
|
migrationBuilder.AddColumn<DateTime>( |
||||
|
name: "ChangedTime", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "datetime2", |
||||
|
nullable: false, |
||||
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
||||
|
|
||||
|
migrationBuilder.AddColumn<int>( |
||||
|
name: "ChangedType", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "int", |
||||
|
nullable: false, |
||||
|
defaultValue: 0); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "CodeType", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "ConcurrencyStamp", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "Configcode", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<DateTime>( |
||||
|
name: "CreatedTime", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "datetime2", |
||||
|
nullable: false, |
||||
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "CustPartCode", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<int>( |
||||
|
name: "DeliverBillType", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "int", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<int>( |
||||
|
name: "DeliverSubBillType", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "int", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "ErpToLoc", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<bool>( |
||||
|
name: "IsReplenished", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "bit", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<int>( |
||||
|
name: "LogType", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "int", |
||||
|
nullable: false, |
||||
|
defaultValue: 0); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "MatchNumber", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "OrderNum", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "PjsNum", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<decimal>( |
||||
|
name: "Qty", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "decimal(18,2)", |
||||
|
nullable: false, |
||||
|
defaultValue: 0m); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "ReMark", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "RealCode", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "RealPartCode", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "Seq", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "SettlementPartCode", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "SettlementVinCode", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "UniqueCode", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<DateTime>( |
||||
|
name: "UpdatedTime", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "datetime2", |
||||
|
nullable: false, |
||||
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "VinCode", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "factory", |
||||
|
table: "Set_VmiReplenished", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<DateTime>( |
||||
|
name: "AssembleData", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "datetime2", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<DateTime>( |
||||
|
name: "BillTime", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "datetime2", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "CodeType", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "ConcurrencyStamp", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "Configcode", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<DateTime>( |
||||
|
name: "CreatedTime", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "datetime2", |
||||
|
nullable: false, |
||||
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "CustPartCode", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<int>( |
||||
|
name: "DeliverBillType", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "int", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<int>( |
||||
|
name: "DeliverSubBillType", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "int", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "ErpToLoc", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<bool>( |
||||
|
name: "IsReplenished", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "bit", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "MatchNumber", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "OrderNum", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "PjsNum", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<decimal>( |
||||
|
name: "Qty", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "decimal(18,2)", |
||||
|
nullable: false, |
||||
|
defaultValue: 0m); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "ReMark", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "RealCode", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "RealPartCode", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "Seq", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "SettlementPartCode", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "SettlementVinCode", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "UniqueCode", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<DateTime>( |
||||
|
name: "UpdatedTime", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "datetime2", |
||||
|
nullable: false, |
||||
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "VinCode", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "factory", |
||||
|
table: "Set_VmiLog", |
||||
|
type: "nvarchar(max)", |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "cda3828abfa24e43a7ff9dced0aceaeb"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "ebb669926c1d4ab988edfe14269e4b20"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "03159d6b06554bf99cfbbb15d476e386"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "73e9bf92fae34390a12c393f6ed8d163"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "b22b285ec9aa48c8b7ed2aa1f9dd7af6"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("8e1cb5a9-8bcf-17fd-97e3-4c10532a5794"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "12581a5c89da4c8587f2696f8b02ce62"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "456fe904f19a46349489730351148e28"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "15d1504855924d95abde0dc835de555d"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "f5d16790a44b4367aeeec82ab1a35fd4"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "11cf3dd1955c4da29aa430ed0b9bafdb"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("c3fe2b66-28cc-c612-eca6-a362769ae90c"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "cedf8a69b6474171b18c5fe227b78d26"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "87fd77d7f0e04c4da372a75168619afc"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "6cdaca1650424494980e906bb44eab0f"); |
||||
|
|
||||
|
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("f12dd04d-4189-4f24-9501-038a2846b84a"), null, null, null, "1200fe51a7b84cfda12141b184958098", 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: "b301dcf7075a41768ced27af9a124f2f"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_VmiSyncTask", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("b8ba69e3-f5a3-c95e-8f82-c9c2fec960b4"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "1606b33f2487461fb72fb38851576947"); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DeleteData( |
||||
|
table: "Set_VmiBalance", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("f12dd04d-4189-4f24-9501-038a2846b84a")); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "AssembleData", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "BillTime", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ChangedBy", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ChangedNumber", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ChangedQty", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ChangedTime", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ChangedType", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "CodeType", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ConcurrencyStamp", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "Configcode", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "CreatedTime", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "CustPartCode", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "DeliverBillType", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "DeliverSubBillType", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ErpToLoc", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "IsReplenished", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "LogType", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "MatchNumber", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "OrderNum", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "PjsNum", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "Qty", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ReMark", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "RealCode", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "RealPartCode", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "Seq", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "SettlementPartCode", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "SettlementVinCode", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "UniqueCode", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "UpdatedTime", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "VinCode", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "factory", |
||||
|
table: "Set_VmiReplenished"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "AssembleData", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "BillTime", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "CodeType", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ConcurrencyStamp", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "Configcode", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "CreatedTime", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "CustPartCode", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "DeliverBillType", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "DeliverSubBillType", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ErpToLoc", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "IsReplenished", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "MatchNumber", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "OrderNum", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "PjsNum", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "Qty", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "ReMark", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "RealCode", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "RealPartCode", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "Seq", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "SettlementPartCode", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "SettlementVinCode", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "UniqueCode", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "UpdatedTime", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "VinCode", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "factory", |
||||
|
table: "Set_VmiLog"); |
||||
|
|
||||
|
migrationBuilder.AddColumn<DateTime>( |
||||
|
name: "LastUpdate", |
||||
|
table: "Set_VmiBalance", |
||||
|
type: "datetime2", |
||||
|
nullable: false, |
||||
|
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "4e46d864aae4482e8881952792c6825d"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "ed9901e7e6e9410586a3af9111d2bb59"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "964f6aa5b6304936a93f8504f317c82e"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "79faaa6f20934b64942a91a524a87af3"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "82ac7a04c0fe4c2992bd99c8a6e73be7"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("8e1cb5a9-8bcf-17fd-97e3-4c10532a5794"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "1c2bfef188904011b6aca9ed6af49f44"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "cc3b71fcf18245349951c249c5b56e86"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "c8069ed240614eb4a9872d260d8839b8"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "c273b5a9dcbd4fc4ba7d33f6ef464ed7"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "5c56e915398d4e8d92644d811a98c5df"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("c3fe2b66-28cc-c612-eca6-a362769ae90c"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "8069a183435141cfa0398fe295ec652c"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "e2266fce0ce94b9082a705bb6528b36c"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "54450a20639f479887d74e798aa0f00b"); |
||||
|
|
||||
|
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("9053e8f6-6f09-42ba-9502-2e7a2f9105c3"), null, null, null, "82e1f152724a4a9882aab30e6cc337cb", 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"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "ed9c903f9b4146aeb682f9e60ebff821"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_VmiSyncTask", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("b8ba69e3-f5a3-c95e-8f82-c9c2fec960b4"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "b84bb2ea7bf040368718c5d9063144bf"); |
||||
|
|
||||
|
migrationBuilder.AddForeignKey( |
||||
|
name: "FK_Set_VmiLog_Set_VmiBalance_Id", |
||||
|
table: "Set_VmiLog", |
||||
|
column: "Id", |
||||
|
principalTable: "Set_VmiBalance", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Restrict); |
||||
|
|
||||
|
migrationBuilder.AddForeignKey( |
||||
|
name: "FK_Set_VmiReplenished_Set_VmiLog_Id", |
||||
|
table: "Set_VmiReplenished", |
||||
|
column: "Id", |
||||
|
principalTable: "Set_VmiLog", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Restrict); |
||||
|
} |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
@ -0,0 +1,310 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Migrations |
||||
|
{ |
||||
|
public partial class _202308251 : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DeleteData( |
||||
|
table: "Set_VmiBalance", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("f12dd04d-4189-4f24-9501-038a2846b84a")); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "CustomerPartCodeNoSpace", |
||||
|
table: "Set_PUB_SE_DETAIL", |
||||
|
type: "nvarchar(100)", |
||||
|
maxLength: 100, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "CustomerPartCodeNoSpace", |
||||
|
table: "Set_PUB_SA_DETAIL", |
||||
|
type: "nvarchar(100)", |
||||
|
maxLength: 100, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "CustomerPartCodeNoSpace", |
||||
|
table: "Set_HBPO_SE_DETAIL", |
||||
|
type: "nvarchar(100)", |
||||
|
maxLength: 100, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "CustomerPartCodeNoSpace", |
||||
|
table: "Set_HBPO_SA_DETAIL", |
||||
|
type: "nvarchar(100)", |
||||
|
maxLength: 100, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "CustomerPartCodeNoSpace", |
||||
|
table: "Set_BBAC_SE_DETAIL", |
||||
|
type: "nvarchar(100)", |
||||
|
maxLength: 100, |
||||
|
nullable: true); |
||||
|
|
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "CustomerPartCodeNoSpace", |
||||
|
table: "Set_BBAC_SA_DETAIL", |
||||
|
type: "nvarchar(100)", |
||||
|
maxLength: 100, |
||||
|
nullable: true); |
||||
|
|
||||
|
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"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "25685f349c47487f874b9ac5dc039190"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_VmiSyncTask", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("b8ba69e3-f5a3-c95e-8f82-c9c2fec960b4"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "2debe020ac9d4f37b62a52ff564577c2"); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DeleteData( |
||||
|
table: "Set_VmiBalance", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("73ceebb1-5b80-48b1-ac38-80334d1f345f")); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "CustomerPartCodeNoSpace", |
||||
|
table: "Set_PUB_SE_DETAIL"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "CustomerPartCodeNoSpace", |
||||
|
table: "Set_PUB_SA_DETAIL"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "CustomerPartCodeNoSpace", |
||||
|
table: "Set_HBPO_SE_DETAIL"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "CustomerPartCodeNoSpace", |
||||
|
table: "Set_HBPO_SA_DETAIL"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "CustomerPartCodeNoSpace", |
||||
|
table: "Set_BBAC_SE_DETAIL"); |
||||
|
|
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "CustomerPartCodeNoSpace", |
||||
|
table: "Set_BBAC_SA_DETAIL"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("185c5968-e02b-267e-db2f-225fccfc9716"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "cda3828abfa24e43a7ff9dced0aceaeb"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("1bb02f67-ed05-6cc1-1507-502e8f6c7a31"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "ebb669926c1d4ab988edfe14269e4b20"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("49b1da12-418c-544d-fe8b-be7e5b572452"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "03159d6b06554bf99cfbbb15d476e386"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("6f68fc8f-b058-c3f4-e07d-722c61f3f7fa"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "73e9bf92fae34390a12c393f6ed8d163"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("7a0dc087-a859-5863-eb6e-56f588bd779e"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "b22b285ec9aa48c8b7ed2aa1f9dd7af6"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("8e1cb5a9-8bcf-17fd-97e3-4c10532a5794"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "12581a5c89da4c8587f2696f8b02ce62"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("8f7dc23d-e2e9-3691-cfe9-545bb958e3f2"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "456fe904f19a46349489730351148e28"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("b9b9c79f-4894-474b-4f67-b1ec121c41e5"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "15d1504855924d95abde0dc835de555d"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("c09c23ea-815f-1b43-4476-2365a8d9a60b"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "f5d16790a44b4367aeeec82ab1a35fd4"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("c1f71240-1b81-0107-8b23-ddc9811a3efe"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "11cf3dd1955c4da29aa430ed0b9bafdb"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("c3fe2b66-28cc-c612-eca6-a362769ae90c"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "cedf8a69b6474171b18c5fe227b78d26"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("ef3d8e8a-a88e-ca1f-e615-714c6bc48824"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "87fd77d7f0e04c4da372a75168619afc"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_JobItem", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("f306b380-47e5-5c01-b902-67ca4113a8f4"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "6cdaca1650424494980e906bb44eab0f"); |
||||
|
|
||||
|
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("f12dd04d-4189-4f24-9501-038a2846b84a"), null, null, null, "1200fe51a7b84cfda12141b184958098", 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: "b301dcf7075a41768ced27af9a124f2f"); |
||||
|
|
||||
|
migrationBuilder.UpdateData( |
||||
|
table: "Set_VmiSyncTask", |
||||
|
keyColumn: "Id", |
||||
|
keyValue: new Guid("b8ba69e3-f5a3-c95e-8f82-c9c2fec960b4"), |
||||
|
column: "ConcurrencyStamp", |
||||
|
value: "1606b33f2487461fb72fb38851576947"); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -1,183 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Linq; |
|
||||
using System.Linq.Dynamic.Core; |
|
||||
using Magicodes.ExporterAndImporter.Excel; |
|
||||
using Microsoft.AspNetCore.SignalR; |
|
||||
using SettleAccount.Domain.BQ; |
|
||||
using SettleAccount.Job.SignalR; |
|
||||
using Shouldly; |
|
||||
using TaskJob.EventArgs; |
|
||||
using TaskJob.Interfaces; |
|
||||
using Volo.Abp.BlobStoring; |
|
||||
using Volo.Abp.DependencyInjection; |
|
||||
using Volo.Abp.ObjectMapping; |
|
||||
using Win.Sfs.BaseData.ImportExcelCommon; |
|
||||
using Win.Sfs.SettleAccount; |
|
||||
using Win.Sfs.SettleAccount.Reports; |
|
||||
|
|
||||
namespace SettleAccount.Job.Services.Report |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// BBAC结算、Edi、发运对比导出服务
|
|
||||
/// </summary>
|
|
||||
public class JisBBACSaEdiSeCompareExportService : ITransientDependency, IExportJob |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// HubContext
|
|
||||
/// </summary>
|
|
||||
private readonly IHubContext<PageHub> _hubContext; |
|
||||
/// <summary>
|
|
||||
/// 文件容器
|
|
||||
/// </summary>
|
|
||||
private readonly IBlobContainer<MyFileContainer> _fileContainer; |
|
||||
/// <summary>
|
|
||||
/// DbContext
|
|
||||
/// </summary>
|
|
||||
private readonly SettleAccountDbContext _settleAccountDbContext; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// 构造
|
|
||||
/// </summary>
|
|
||||
public JisBBACSaEdiSeCompareExportService( |
|
||||
IHubContext<PageHub> hubContext, |
|
||||
IBlobContainer<MyFileContainer> fileContainer, |
|
||||
IObjectMapper objectMapper, |
|
||||
SettleAccountDbContext settleAccountDbContext) |
|
||||
{ |
|
||||
_hubContext = hubContext; |
|
||||
_fileContainer = fileContainer; |
|
||||
_settleAccountDbContext = settleAccountDbContext; |
|
||||
} |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// 导出
|
|
||||
/// </summary>
|
|
||||
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property) |
|
||||
{ |
|
||||
var version = property.Where(p => p.Name == "Version").FirstOrDefault().Value; |
|
||||
var lu = property.Where(p => p.Name == "LU").FirstOrDefault().Value; |
|
||||
var pn = property.Where(p => p.Name == "PN").FirstOrDefault().Value; |
|
||||
var strSeStartDateTime = property.Where(p => p.Name == "SeStartDateTime").FirstOrDefault().Value; |
|
||||
var strSeEndDateTime = property.Where(p => p.Name == "SeEndDateTime").FirstOrDefault().Value; |
|
||||
|
|
||||
var seStartDateTime = DateTime.Parse(strSeStartDateTime); |
|
||||
var seEndDateTime = DateTime.Parse(strSeEndDateTime); |
|
||||
var filename = exportName.FirstOrDefault(); |
|
||||
|
|
||||
//有EDI无发运
|
|
||||
var haveEdiNotHaveSeList = _settleAccountDbContext.Set<BBAC_SE_EDI>().Where(t => t.IsHaveSeData == false) |
|
||||
.GroupBy(t => new { t.LU, t.PN }) |
|
||||
.Select(t => new JisBBACEidSeCompareExport() |
|
||||
{ |
|
||||
Category = "JIS", |
|
||||
CarModeCode = default, |
|
||||
LineStationcode = default, |
|
||||
SequenceNumber = t.Max(t => t.SeqNumber), |
|
||||
ParType = "01", |
|
||||
EdiQty = t.Sum(t => t.Qty), |
|
||||
AssemblyDate = default, |
|
||||
MatchNumber = default, |
|
||||
MateType = "否", |
|
||||
DiffDesc = "WMS漏发货EDI有订单" |
|
||||
}).ToList(); |
|
||||
//无EDI有发运
|
|
||||
var notHaveEdiHaveSeList = _settleAccountDbContext.Set<BBAC_SE_DETAIL>().Where(t => t.IsHaveEdiData == false) |
|
||||
.GroupBy(t => new { t.LU, t.PN }) |
|
||||
.Select(t => new JisBBACEidSeCompareExport() |
|
||||
{ |
|
||||
Category = "JIS", |
|
||||
WmsBillNum = t.Max(t => t.BillNum), |
|
||||
MESConfigCode = t.Max(t => t.MESConfigCode), |
|
||||
ShippingDate = t.Max(t => t.BillTime), |
|
||||
PN = t.Max(t => t.PN), |
|
||||
Seq = t.Max(t => t.Seq), |
|
||||
PjsNum = t.Max(t => t.PjsNum), |
|
||||
MaterialNumber = t.Max(t => t.CustPartCode), |
|
||||
MaterialDes = t.Max(t => t.PartDesc), |
|
||||
SEQty = t.Sum(t => t.Qty), |
|
||||
InjectionCode = t.Max(t => t.InjectionCode), |
|
||||
MateType = "否", |
|
||||
DiffDesc = "WMS有发货EDI无订单" |
|
||||
}).ToList(); |
|
||||
//有EDI有发运
|
|
||||
var ediGroup = from edi in _settleAccountDbContext.Set<BBAC_SE_EDI>() |
|
||||
where edi.IsDeleted == false && edi.IsHaveSeData == true |
|
||||
group edi by new { edi.PN, edi.LU } into groupItem |
|
||||
select new |
|
||||
{ |
|
||||
groupItem.Key.PN, |
|
||||
groupItem.Key.LU, |
|
||||
Qty = groupItem.Sum(t => t.Qty), |
|
||||
SeqNumber = groupItem.Max(t => t.SeqNumber) |
|
||||
}; |
|
||||
var seGroup = from se in _settleAccountDbContext.Set<BBAC_SE_DETAIL>() |
|
||||
where se.IsHaveEdiData == true && se.AssembleData >= seStartDateTime && se.AssembleData <= seEndDateTime |
|
||||
group se by new { se.PN, se.LU } into groupItem |
|
||||
select new |
|
||||
{ |
|
||||
groupItem.Key.PN, |
|
||||
groupItem.Key.LU, |
|
||||
Qty = groupItem.Sum(t => t.Qty), |
|
||||
BillNum = groupItem.Max(t => t.BillNum), |
|
||||
MESConfigCode = groupItem.Max(t => t.MESConfigCode), |
|
||||
BillTime = groupItem.Max(t => t.BillTime), |
|
||||
Seq = groupItem.Max(t => t.Seq), |
|
||||
PjsNum = groupItem.Max(t => t.PjsNum), |
|
||||
CustPartCode = groupItem.Max(t => t.CustPartCode), |
|
||||
PartDesc = groupItem.Max(t => t.PartDesc), |
|
||||
InjectionCode = groupItem.Max(t => t.InjectionCode) |
|
||||
}; |
|
||||
var haveEdiHaveSeList = (from edi in ediGroup |
|
||||
join se in seGroup |
|
||||
on new { edi.PN, edi.LU } equals new { se.PN, se.LU } |
|
||||
//where edi.IsDeleted == false && edi.IsHaveSeData == true && se.IsHaveEdiData == true
|
|
||||
select new JisBBACEidSeCompareExport() |
|
||||
{ |
|
||||
Category = "JIS", |
|
||||
WmsBillNum = se.BillNum, |
|
||||
CarModeCode = default, |
|
||||
LineStationcode = default, |
|
||||
SequenceNumber = edi.SeqNumber, |
|
||||
ParType = "01", |
|
||||
MESConfigCode = se.MESConfigCode, |
|
||||
ShippingDate = se.BillTime, |
|
||||
PN = se.PN, |
|
||||
Seq = se.Seq, |
|
||||
PjsNum = se.PjsNum, |
|
||||
MaterialNumber = se.CustPartCode, |
|
||||
MaterialDes = se.PartDesc, |
|
||||
SEQty = se.Qty, |
|
||||
EdiQty = edi.Qty, |
|
||||
AssemblyDate = default, |
|
||||
MatchNumber = default, |
|
||||
InjectionCode = se.InjectionCode, |
|
||||
MateType = se.Qty == edi.Qty ? "是" : "否", |
|
||||
DiffDesc = "WMS有发货EDI有订单" |
|
||||
}).ToList(); |
|
||||
|
|
||||
haveEdiNotHaveSeList.AddRange(haveEdiHaveSeList); |
|
||||
notHaveEdiHaveSeList.AddRange(haveEdiHaveSeList); |
|
||||
|
|
||||
ExcelExporter excelExporter = new ExcelExporter(); |
|
||||
excelExporter |
|
||||
.Append(haveEdiNotHaveSeList, $"BBACEDI数据和发货对比") |
|
||||
.SeparateBySheet() |
|
||||
.Append(notHaveEdiHaveSeList, $"BBAC发货和EDI数据对比"); |
|
||||
|
|
||||
var result = excelExporter.ExportAppendDataAsByteArray(); |
|
||||
result.ShouldNotBeNull(); |
|
||||
_fileContainer.SaveAsync(filename, result.Result, true); |
|
||||
|
|
||||
Notify(); |
|
||||
return id.ToString(); |
|
||||
} |
|
||||
|
|
||||
#region 私有方法
|
|
||||
private void Notify() |
|
||||
{ |
|
||||
this._hubContext.Clients.All.ServerToClient("SaSeCompare", "refresh", ""); |
|
||||
} |
|
||||
#endregion
|
|
||||
} |
|
||||
} |
|
@ -0,0 +1,180 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.Linq; |
||||
|
using System.Linq.Dynamic.Core; |
||||
|
using Microsoft.AspNetCore.SignalR; |
||||
|
using Microsoft.OpenApi.Extensions; |
||||
|
using SettleAccount.Domain.BQ; |
||||
|
using SettleAccount.Job.SignalR; |
||||
|
using Shouldly; |
||||
|
using TaskJob.EventArgs; |
||||
|
using TaskJob.Interfaces; |
||||
|
using Volo.Abp.BlobStoring; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Volo.Abp.ObjectMapping; |
||||
|
using Win.Sfs.BaseData.ImportExcelCommon; |
||||
|
using Win.Sfs.SettleAccount; |
||||
|
using Win.Sfs.SettleAccount.Reports; |
||||
|
|
||||
|
namespace SettleAccount.Job.Services.Report |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// BBAC结算、发运、Edi对比导出服务
|
||||
|
/// </summary>
|
||||
|
public class JisBBACSaSeEdiCompareExportService : SaSeEdiCompareExportBaseService, ITransientDependency, IExportJob |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 业务类型
|
||||
|
/// </summary>
|
||||
|
private readonly EnumBusinessType businessType = EnumBusinessType.JisBBAC; |
||||
|
/// <summary>
|
||||
|
/// 文件容器
|
||||
|
/// </summary>
|
||||
|
private readonly IBlobContainer<MyFileContainer> _fileContainer; |
||||
|
/// <summary>
|
||||
|
/// AutoMapper
|
||||
|
/// </summary>
|
||||
|
private readonly IObjectMapper _objectMapper; |
||||
|
/// <summary>
|
||||
|
/// DbContext
|
||||
|
/// </summary>
|
||||
|
private readonly SettleAccountDbContext _settleAccountDbContext; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 构造
|
||||
|
/// </summary>
|
||||
|
public JisBBACSaSeEdiCompareExportService( |
||||
|
IHubContext<PageHub> hubContext, |
||||
|
IBlobContainer<MyFileContainer> fileContainer, |
||||
|
IObjectMapper objectMapper, |
||||
|
SettleAccountDbContext settleAccountDbContext) : base(hubContext) |
||||
|
{ |
||||
|
_fileContainer = fileContainer; |
||||
|
_objectMapper = objectMapper; |
||||
|
_settleAccountDbContext = settleAccountDbContext; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 导出
|
||||
|
/// </summary>
|
||||
|
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property) |
||||
|
{ |
||||
|
var version = property.Where(p => p.Name == "Version").FirstOrDefault().Value; |
||||
|
var lu = property.Where(p => p.Name == "LU").FirstOrDefault().Value; |
||||
|
var pn = property.Where(p => p.Name == "PN").FirstOrDefault().Value; |
||||
|
var strSeStartDateTime = property.Where(p => p.Name == "SeStartDateTime").FirstOrDefault().Value; |
||||
|
var strSeEndDateTime = property.Where(p => p.Name == "SeEndDateTime").FirstOrDefault().Value; |
||||
|
|
||||
|
var businessTypeDisplayName = businessType.GetAttributeOfType<DisplayAttribute>()?.Name ?? businessType.ToString(); |
||||
|
var seStartDateTime = DateTime.Parse(strSeStartDateTime); |
||||
|
var seEndDateTime = DateTime.Parse(strSeEndDateTime); |
||||
|
var filename = exportName.FirstOrDefault(); |
||||
|
|
||||
|
var ediSeSaCompareDiffs = GetEdiSeSaCompareData(int.Parse(version), seStartDateTime, seEndDateTime); |
||||
|
|
||||
|
HandleSaSeEdiCompareDiffList(ediSeSaCompareDiffs); |
||||
|
|
||||
|
if (string.IsNullOrEmpty(lu) == false) |
||||
|
{ |
||||
|
ediSeSaCompareDiffs = ediSeSaCompareDiffs.FindAll(p => p.CustomerPartCode == lu); |
||||
|
} |
||||
|
if (string.IsNullOrEmpty(pn) == false) |
||||
|
{ |
||||
|
ediSeSaCompareDiffs = ediSeSaCompareDiffs.FindAll(p => p.PN == pn); |
||||
|
} |
||||
|
ediSeSaCompareDiffs = ediSeSaCompareDiffs.OrderBy(t => t.Category).ToList(); |
||||
|
|
||||
|
var items = _objectMapper.Map<List<SaSeEdiCompareDiff>, List<SaSeEdiCompareDetailExportJisBBAC>>(ediSeSaCompareDiffs); |
||||
|
var excelExporter = BindExcelExporter<SaSeEdiCompareDetailExportJisBBAC>(items, businessTypeDisplayName); |
||||
|
|
||||
|
var result = excelExporter.ExportAppendDataAsByteArray(); |
||||
|
result.ShouldNotBeNull(); |
||||
|
_fileContainer.SaveAsync(filename, result.Result, true); |
||||
|
|
||||
|
Notify(); |
||||
|
return id.ToString(); |
||||
|
} |
||||
|
|
||||
|
#region 私有方法
|
||||
|
/// <summary>
|
||||
|
/// 获取比对数据
|
||||
|
/// </summary>
|
||||
|
public List<SaSeEdiCompareDiff> GetEdiSeSaCompareData(int version, DateTime seStartDateTime, DateTime seEndDateTime) |
||||
|
{ |
||||
|
//结算
|
||||
|
var saGroup = from sa in _settleAccountDbContext.Set<BBAC_SA_DETAIL>() |
||||
|
where sa.BusinessType == businessType && sa.Version == version |
||||
|
group sa by new { sa.PN, sa.LU } into groupItem |
||||
|
select new |
||||
|
{ |
||||
|
groupItem.Key.PN, |
||||
|
groupItem.Key.LU, |
||||
|
Qty = groupItem.Sum(t => t.Qty), |
||||
|
Price = groupItem.Max(t => t.Price), |
||||
|
SettleDate = groupItem.Max(t => t.SettleDate), |
||||
|
PartCode = groupItem.Max(t => t.PartCode), |
||||
|
}; |
||||
|
//发运
|
||||
|
var seGroup = from se in _settleAccountDbContext.Set<BBAC_SE_DETAIL>() |
||||
|
where se.BusinessType == businessType && se.BillTime >= seStartDateTime && se.BillTime <= seEndDateTime |
||||
|
group se by new { se.PN, se.LU } into groupItem |
||||
|
select new |
||||
|
{ |
||||
|
groupItem.Key.PN, |
||||
|
groupItem.Key.LU, |
||||
|
Qty = groupItem.Sum(t => t.Qty), |
||||
|
WmsBillNum = groupItem.Max(t => t.WmsBillNum), |
||||
|
ShippingDate = groupItem.Max(t => t.ShippingDate), |
||||
|
FactoryPartCode = groupItem.Max(t => t.FactoryPartCode), |
||||
|
ToLoc = groupItem.Max(t => t.ToLoc), |
||||
|
ErpToLoc = groupItem.Max(t => t.ErpToLoc) |
||||
|
}; |
||||
|
var saSeCompareLeft = from sa in saGroup |
||||
|
join se in seGroup |
||||
|
on new { sa.PN, sa.LU } equals new { se.PN, se.LU } |
||||
|
into temp |
||||
|
from se in temp.DefaultIfEmpty() |
||||
|
select new SaSeEdiCompareDiff() |
||||
|
{ |
||||
|
WmsBillNum = se.WmsBillNum, |
||||
|
ShippingDate = se.ShippingDate, |
||||
|
CustomerOfflineTime = sa.SettleDate, |
||||
|
PN = sa.PN, |
||||
|
SAQty = sa.Qty, |
||||
|
SEQty = se.Qty, |
||||
|
FixPrice = sa.Price, |
||||
|
ToLocCode = se.ToLoc, |
||||
|
ToErpLocCode = se.ErpToLoc, |
||||
|
SeCustomerPartCode = se.LU, |
||||
|
SeFactoryPartCode = se.FactoryPartCode, |
||||
|
SaCustomerPartCode = sa.LU, |
||||
|
SaFactoryPartCode = sa.PartCode |
||||
|
}; |
||||
|
var saSeCompareRight = from se in seGroup |
||||
|
join sa in saGroup |
||||
|
on new { se.PN, se.LU } equals new { sa.PN, sa.LU } |
||||
|
into temp |
||||
|
from sa in temp.DefaultIfEmpty() |
||||
|
select new SaSeEdiCompareDiff() |
||||
|
{ |
||||
|
WmsBillNum = se.WmsBillNum, |
||||
|
ShippingDate = se.ShippingDate, |
||||
|
CustomerOfflineTime = sa.SettleDate, |
||||
|
PN = se.PN, |
||||
|
SAQty = sa.Qty, |
||||
|
SEQty = se.Qty, |
||||
|
FixPrice = sa.Price, |
||||
|
ToLocCode = se.ToLoc, |
||||
|
ToErpLocCode = se.ErpToLoc, |
||||
|
SeCustomerPartCode = se.LU, |
||||
|
SeFactoryPartCode = se.FactoryPartCode, |
||||
|
SaCustomerPartCode = sa.LU, |
||||
|
SaFactoryPartCode = sa.PartCode |
||||
|
}; |
||||
|
var saSeCompareFullJoin = saSeCompareLeft.Union(saSeCompareRight).ToList(); |
||||
|
return saSeCompareFullJoin; |
||||
|
} |
||||
|
#endregion
|
||||
|
} |
||||
|
} |
@ -1,183 +0,0 @@ |
|||||
using System; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Linq; |
|
||||
using Magicodes.ExporterAndImporter.Excel; |
|
||||
using Microsoft.AspNetCore.SignalR; |
|
||||
using SettleAccount.Domain.BQ; |
|
||||
using SettleAccount.Job.SignalR; |
|
||||
using Shouldly; |
|
||||
using TaskJob.EventArgs; |
|
||||
using TaskJob.Interfaces; |
|
||||
using Volo.Abp.BlobStoring; |
|
||||
using Volo.Abp.DependencyInjection; |
|
||||
using Win.Sfs.BaseData.ImportExcelCommon; |
|
||||
using Win.Sfs.SettleAccount; |
|
||||
using Win.Sfs.SettleAccount.Reports; |
|
||||
|
|
||||
namespace SettleAccount.Job.Services.Report |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// HBPO结算、Edi、发运对比导出服务
|
|
||||
/// </summary>
|
|
||||
public class JisHBPOSaEdiSeCompareExportService : ITransientDependency, IExportJob |
|
||||
{ |
|
||||
/// <summary>
|
|
||||
/// HubContext
|
|
||||
/// </summary>
|
|
||||
private readonly IHubContext<PageHub> _hubContext; |
|
||||
/// <summary>
|
|
||||
/// 文件容器
|
|
||||
/// </summary>
|
|
||||
private readonly IBlobContainer<MyFileContainer> _fileContainer; |
|
||||
/// <summary>
|
|
||||
/// DbContext
|
|
||||
/// </summary>
|
|
||||
private readonly SettleAccountDbContext _settleAccountDbContext; |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// 构造
|
|
||||
/// </summary>
|
|
||||
public JisHBPOSaEdiSeCompareExportService( |
|
||||
IBlobContainer<MyFileContainer> fileContainer, |
|
||||
SettleAccountDbContext settleAccountDbContext) |
|
||||
{ |
|
||||
_fileContainer = fileContainer; |
|
||||
_settleAccountDbContext = settleAccountDbContext; |
|
||||
} |
|
||||
|
|
||||
/// <summary>
|
|
||||
/// 导出
|
|
||||
/// </summary>
|
|
||||
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property) |
|
||||
{ |
|
||||
var version = property.Where(p => p.Name == "Version").FirstOrDefault().Value; |
|
||||
var lu = property.Where(p => p.Name == "LU").FirstOrDefault().Value; |
|
||||
var pn = property.Where(p => p.Name == "PN").FirstOrDefault().Value; |
|
||||
var strSeStartDateTime = property.Where(p => p.Name == "SeStartDateTime").FirstOrDefault().Value; |
|
||||
var strSeEndDateTime = property.Where(p => p.Name == "SeEndDateTime").FirstOrDefault().Value; |
|
||||
|
|
||||
var seStartDateTime = DateTime.Parse(strSeStartDateTime); |
|
||||
var seEndDateTime = DateTime.Parse(strSeEndDateTime); |
|
||||
var filename = exportName.FirstOrDefault(); |
|
||||
|
|
||||
//有EDI无发运
|
|
||||
var haveEdiNotHaveSeList = _settleAccountDbContext.Set<BBAC_SE_EDI>().Where(t => t.IsHaveSeData == false) |
|
||||
.GroupBy(t => new { t.LU, t.PN }) |
|
||||
.Select(t => new JisHBPOEidSeCompareExport() |
|
||||
{ |
|
||||
Category = "JIS", |
|
||||
CarModeCode = default, |
|
||||
LineStationcode = default, |
|
||||
SequenceNumber = t.Max(t => t.SeqNumber), |
|
||||
ParType = "01", |
|
||||
EdiQty = t.Sum(t => t.Qty), |
|
||||
AssemblyDate = default, |
|
||||
MatchNumber = default, |
|
||||
MateType = "否", |
|
||||
DiffDesc = "WMS漏发货EDI有订单" |
|
||||
}).ToList(); |
|
||||
//无EDI有发运
|
|
||||
var notHaveEdiHaveSeList = _settleAccountDbContext.Set<BBAC_SE_DETAIL>().Where(t => t.IsHaveEdiData == false) |
|
||||
.GroupBy(t => new { t.LU, t.PN }) |
|
||||
.Select(t => new JisHBPOEidSeCompareExport() |
|
||||
{ |
|
||||
Category = "JIS", |
|
||||
WmsBillNum = t.Max(t => t.BillNum), |
|
||||
MESConfigCode = t.Max(t => t.MESConfigCode), |
|
||||
ShippingDate = t.Max(t => t.BillTime), |
|
||||
PN = t.Max(t => t.PN), |
|
||||
Seq = t.Max(t => t.Seq), |
|
||||
PjsNum = t.Max(t => t.PjsNum), |
|
||||
ToLoc = t.Max(t => t.ToLoc), |
|
||||
ErpToLoc = t.Max(t => t.ErpToLoc), |
|
||||
MaterialNumber = t.Max(t => t.CustPartCode), |
|
||||
MaterialDes = t.Max(t => t.PartDesc), |
|
||||
SEQty = t.Sum(t => t.Qty), |
|
||||
InjectionCode = t.Max(t => t.InjectionCode), |
|
||||
MateType = "否", |
|
||||
DiffDesc = "WMS有发货EDI无订单" |
|
||||
}).ToList(); |
|
||||
//有EDI有发运
|
|
||||
var ediGroup = from edi in _settleAccountDbContext.Set<BBAC_SE_EDI>() |
|
||||
where edi.IsDeleted == false && edi.IsHaveSeData == true |
|
||||
group edi by new { edi.PN, edi.LU } into groupItem |
|
||||
select new |
|
||||
{ |
|
||||
groupItem.Key.PN, |
|
||||
groupItem.Key.LU, |
|
||||
Qty = groupItem.Sum(t => t.Qty), |
|
||||
SeqNumber = groupItem.Max(t => t.SeqNumber) |
|
||||
}; |
|
||||
var seGroup = from se in _settleAccountDbContext.Set<BBAC_SE_DETAIL>() |
|
||||
where se.IsHaveEdiData == true && se.AssembleData >= seStartDateTime && se.AssembleData <= seEndDateTime |
|
||||
group se by new { se.PN, se.LU } into groupItem |
|
||||
select new |
|
||||
{ |
|
||||
groupItem.Key.PN, |
|
||||
groupItem.Key.LU, |
|
||||
Qty = groupItem.Sum(t => t.Qty), |
|
||||
BillNum = groupItem.Max(t => t.BillNum), |
|
||||
MESConfigCode = groupItem.Max(t => t.MESConfigCode), |
|
||||
BillTime = groupItem.Max(t => t.BillTime), |
|
||||
Seq = groupItem.Max(t => t.Seq), |
|
||||
PjsNum = groupItem.Max(t => t.PjsNum), |
|
||||
ToLoc = groupItem.Max(t => t.ToLoc), |
|
||||
ErpToLoc = groupItem.Max(t => t.ErpToLoc), |
|
||||
CustPartCode = groupItem.Max(t => t.CustPartCode), |
|
||||
PartDesc = groupItem.Max(t => t.PartDesc), |
|
||||
InjectionCode = groupItem.Max(t => t.InjectionCode) |
|
||||
}; |
|
||||
var haveEdiHaveSeList = (from edi in ediGroup |
|
||||
join se in seGroup |
|
||||
on new { edi.PN, edi.LU } equals new { se.PN, se.LU } |
|
||||
select new JisHBPOEidSeCompareExport() |
|
||||
{ |
|
||||
Category = "JIS", |
|
||||
WmsBillNum = se.BillNum, |
|
||||
CarModeCode = default, |
|
||||
LineStationcode = default, |
|
||||
SequenceNumber = edi.SeqNumber, |
|
||||
ParType = "01", |
|
||||
MESConfigCode = se.MESConfigCode, |
|
||||
ShippingDate = se.BillTime, |
|
||||
PN = se.PN, |
|
||||
Seq = se.Seq, |
|
||||
PjsNum = se.PjsNum, |
|
||||
ToLoc = se.ToLoc, |
|
||||
ErpToLoc = se.ErpToLoc, |
|
||||
MaterialNumber = se.CustPartCode, |
|
||||
MaterialDes = se.PartDesc, |
|
||||
SEQty = se.Qty, |
|
||||
EdiQty = edi.Qty, |
|
||||
AssemblyDate = default, |
|
||||
MatchNumber = default, |
|
||||
InjectionCode = se.InjectionCode, |
|
||||
MateType = se.Qty == edi.Qty ? "是" : "否", |
|
||||
DiffDesc = "WMS有发货EDI有订单" |
|
||||
}).ToList(); |
|
||||
|
|
||||
haveEdiNotHaveSeList.AddRange(haveEdiHaveSeList); |
|
||||
notHaveEdiHaveSeList.AddRange(haveEdiHaveSeList); |
|
||||
|
|
||||
ExcelExporter excelExporter = new ExcelExporter(); |
|
||||
excelExporter |
|
||||
.Append(haveEdiNotHaveSeList, $"HBPOEDI数据和发货对比") |
|
||||
.SeparateBySheet() |
|
||||
.Append(notHaveEdiHaveSeList, $"HBPO发货和EDI数据对比"); |
|
||||
|
|
||||
var result = excelExporter.ExportAppendDataAsByteArray(); |
|
||||
result.ShouldNotBeNull(); |
|
||||
_fileContainer.SaveAsync(filename, result.Result, true); |
|
||||
|
|
||||
Notify(); |
|
||||
return id.ToString(); |
|
||||
} |
|
||||
|
|
||||
#region 私有方法
|
|
||||
private void Notify() |
|
||||
{ |
|
||||
this._hubContext.Clients.All.ServerToClient("SaSeCompare", "refresh", ""); |
|
||||
} |
|
||||
#endregion
|
|
||||
} |
|
||||
} |
|
@ -0,0 +1,179 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.Linq; |
||||
|
using Microsoft.AspNetCore.SignalR; |
||||
|
using Microsoft.OpenApi.Extensions; |
||||
|
using SettleAccount.Domain.BQ; |
||||
|
using SettleAccount.Job.SignalR; |
||||
|
using Shouldly; |
||||
|
using TaskJob.EventArgs; |
||||
|
using TaskJob.Interfaces; |
||||
|
using Volo.Abp.BlobStoring; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Volo.Abp.ObjectMapping; |
||||
|
using Win.Sfs.BaseData.ImportExcelCommon; |
||||
|
using Win.Sfs.SettleAccount; |
||||
|
using Win.Sfs.SettleAccount.Reports; |
||||
|
|
||||
|
namespace SettleAccount.Job.Services.Report |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// HBPO结算、发运、Edi对比导出服务
|
||||
|
/// </summary>
|
||||
|
public class JisHBPOSaSeEdiCompareExportService : SaSeEdiCompareExportBaseService, ITransientDependency, IExportJob |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 业务类型
|
||||
|
/// </summary>
|
||||
|
private readonly EnumBusinessType businessType = EnumBusinessType.JisHBPO; |
||||
|
/// <summary>
|
||||
|
/// 文件容器
|
||||
|
/// </summary>
|
||||
|
private readonly IBlobContainer<MyFileContainer> _fileContainer; |
||||
|
/// <summary>
|
||||
|
/// AutoMapper
|
||||
|
/// </summary>
|
||||
|
private readonly IObjectMapper _objectMapper; |
||||
|
/// <summary>
|
||||
|
/// DbContext
|
||||
|
/// </summary>
|
||||
|
private readonly SettleAccountDbContext _settleAccountDbContext; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 构造
|
||||
|
/// </summary>
|
||||
|
public JisHBPOSaSeEdiCompareExportService( |
||||
|
IHubContext<PageHub> hubContext, |
||||
|
IBlobContainer<MyFileContainer> fileContainer, |
||||
|
IObjectMapper objectMapper, |
||||
|
SettleAccountDbContext settleAccountDbContext) : base(hubContext) |
||||
|
{ |
||||
|
_fileContainer = fileContainer; |
||||
|
_objectMapper = objectMapper; |
||||
|
_settleAccountDbContext = settleAccountDbContext; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 导出
|
||||
|
/// </summary>
|
||||
|
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> property) |
||||
|
{ |
||||
|
var version = property.Where(p => p.Name == "Version").FirstOrDefault().Value; |
||||
|
var lu = property.Where(p => p.Name == "LU").FirstOrDefault().Value; |
||||
|
var pn = property.Where(p => p.Name == "PN").FirstOrDefault().Value; |
||||
|
var strSeStartDateTime = property.Where(p => p.Name == "SeStartDateTime").FirstOrDefault().Value; |
||||
|
var strSeEndDateTime = property.Where(p => p.Name == "SeEndDateTime").FirstOrDefault().Value; |
||||
|
|
||||
|
var businessTypeDisplayName = businessType.GetAttributeOfType<DisplayAttribute>()?.Name ?? businessType.ToString(); |
||||
|
var seStartDateTime = DateTime.Parse(strSeStartDateTime); |
||||
|
var seEndDateTime = DateTime.Parse(strSeEndDateTime); |
||||
|
var filename = exportName.FirstOrDefault(); |
||||
|
|
||||
|
var ediSeSaCompareDiffs = GetEdiSeSaCompareData(int.Parse(version), seStartDateTime, seEndDateTime); |
||||
|
|
||||
|
HandleSaSeEdiCompareDiffList(ediSeSaCompareDiffs); |
||||
|
|
||||
|
if (string.IsNullOrEmpty(lu) == false) |
||||
|
{ |
||||
|
ediSeSaCompareDiffs = ediSeSaCompareDiffs.FindAll(p => p.CustomerPartCode == lu); |
||||
|
} |
||||
|
if (string.IsNullOrEmpty(pn) == false) |
||||
|
{ |
||||
|
ediSeSaCompareDiffs = ediSeSaCompareDiffs.FindAll(p => p.PN == pn); |
||||
|
} |
||||
|
ediSeSaCompareDiffs = ediSeSaCompareDiffs.OrderBy(t => t.Category).ToList(); |
||||
|
|
||||
|
var items = _objectMapper.Map<List<SaSeEdiCompareDiff>, List<SaSeEdiCompareDetailExportJisBBAC>>(ediSeSaCompareDiffs); |
||||
|
var excelExporter = BindExcelExporter<SaSeEdiCompareDetailExportJisBBAC>(items, businessTypeDisplayName); |
||||
|
|
||||
|
var result = excelExporter.ExportAppendDataAsByteArray(); |
||||
|
result.ShouldNotBeNull(); |
||||
|
_fileContainer.SaveAsync(filename, result.Result, true); |
||||
|
|
||||
|
Notify(); |
||||
|
return id.ToString(); |
||||
|
} |
||||
|
|
||||
|
#region 私有方法
|
||||
|
/// <summary>
|
||||
|
/// 获取比对数据
|
||||
|
/// </summary>
|
||||
|
public List<SaSeEdiCompareDiff> GetEdiSeSaCompareData(int version, DateTime seStartDateTime, DateTime seEndDateTime) |
||||
|
{ |
||||
|
//结算
|
||||
|
var saGroup = from sa in _settleAccountDbContext.Set<HBPO_SA_DETAIL>() |
||||
|
where sa.BusinessType == businessType && sa.Version == version |
||||
|
group sa by new { sa.PN, sa.LU } into groupItem |
||||
|
select new |
||||
|
{ |
||||
|
groupItem.Key.PN, |
||||
|
groupItem.Key.LU, |
||||
|
Qty = groupItem.Sum(t => t.Qty), |
||||
|
Price = groupItem.Max(t => t.Price), |
||||
|
SettleDate = groupItem.Max(t => t.SettleDate), |
||||
|
PartCode = groupItem.Max(t => t.PartCode), |
||||
|
}; |
||||
|
//发运
|
||||
|
var seGroup = from se in _settleAccountDbContext.Set<HBPO_SE_DETAIL>() |
||||
|
where se.BusinessType == businessType && se.BillTime >= seStartDateTime && se.BillTime <= seEndDateTime |
||||
|
group se by new { se.PN, se.LU } into groupItem |
||||
|
select new |
||||
|
{ |
||||
|
groupItem.Key.PN, |
||||
|
groupItem.Key.LU, |
||||
|
Qty = groupItem.Sum(t => t.Qty), |
||||
|
WmsBillNum = groupItem.Max(t => t.WmsBillNum), |
||||
|
ShippingDate = groupItem.Max(t => t.ShippingDate), |
||||
|
FactoryPartCode = groupItem.Max(t => t.FactoryPartCode), |
||||
|
ToLoc = groupItem.Max(t => t.ToLoc), |
||||
|
ErpToLoc = groupItem.Max(t => t.ErpToLoc) |
||||
|
}; |
||||
|
var saSeCompareLeft = from sa in saGroup |
||||
|
join se in seGroup |
||||
|
on new { sa.PN, sa.LU } equals new { se.PN, se.LU } |
||||
|
into temp |
||||
|
from se in temp.DefaultIfEmpty() |
||||
|
select new SaSeEdiCompareDiff() |
||||
|
{ |
||||
|
WmsBillNum = se.WmsBillNum, |
||||
|
ShippingDate = se.ShippingDate, |
||||
|
CustomerOfflineTime = sa.SettleDate, |
||||
|
PN = sa.PN, |
||||
|
SAQty = sa.Qty, |
||||
|
SEQty = se.Qty, |
||||
|
FixPrice = sa.Price, |
||||
|
ToLocCode = se.ToLoc, |
||||
|
ToErpLocCode = se.ErpToLoc, |
||||
|
SeCustomerPartCode = se.LU, |
||||
|
SeFactoryPartCode = se.FactoryPartCode, |
||||
|
SaCustomerPartCode = sa.LU, |
||||
|
SaFactoryPartCode = sa.PartCode |
||||
|
}; |
||||
|
var saSeCompareRight = from se in seGroup |
||||
|
join sa in saGroup |
||||
|
on new { se.PN, se.LU } equals new { sa.PN, sa.LU } |
||||
|
into temp |
||||
|
from sa in temp.DefaultIfEmpty() |
||||
|
select new SaSeEdiCompareDiff() |
||||
|
{ |
||||
|
WmsBillNum = se.WmsBillNum, |
||||
|
ShippingDate = se.ShippingDate, |
||||
|
CustomerOfflineTime = sa.SettleDate, |
||||
|
PN = se.PN, |
||||
|
SAQty = sa.Qty, |
||||
|
SEQty = se.Qty, |
||||
|
FixPrice = sa.Price, |
||||
|
ToLocCode = se.ToLoc, |
||||
|
ToErpLocCode = se.ErpToLoc, |
||||
|
SeCustomerPartCode = se.LU, |
||||
|
SeFactoryPartCode = se.FactoryPartCode, |
||||
|
SaCustomerPartCode = sa.LU, |
||||
|
SaFactoryPartCode = sa.PartCode |
||||
|
}; |
||||
|
var saSeCompareFullJoin = saSeCompareLeft.Union(saSeCompareRight).ToList(); |
||||
|
return saSeCompareFullJoin; |
||||
|
} |
||||
|
#endregion
|
||||
|
} |
||||
|
} |
@ -0,0 +1,141 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using Magicodes.ExporterAndImporter.Excel; |
||||
|
using Microsoft.AspNetCore.SignalR; |
||||
|
using SettleAccount.Job.SignalR; |
||||
|
using Win.Sfs.SettleAccount.Enums; |
||||
|
using Win.Sfs.SettleAccount.Reports; |
||||
|
|
||||
|
namespace SettleAccount.Job.Services.Report |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 结算、发运、Eid比对导出基础服务
|
||||
|
/// </summary>
|
||||
|
public class SaSeEdiCompareExportBaseService |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// HubContext
|
||||
|
/// </summary>
|
||||
|
private readonly IHubContext<PageHub> _hubContext; |
||||
|
|
||||
|
public SaSeEdiCompareExportBaseService(IHubContext<PageHub> hubContext) |
||||
|
{ |
||||
|
_hubContext = hubContext; |
||||
|
} |
||||
|
|
||||
|
public virtual void HandleSaSeEdiCompareDiffList(List<SaSeEdiCompareDiff> ediSeSaCompareDiffs) |
||||
|
{ |
||||
|
ediSeSaCompareDiffs.ForEach(p => |
||||
|
{ |
||||
|
p.Category = (string.IsNullOrEmpty(p.SaCustomerPartCode), string.IsNullOrEmpty(p.SeCustomerPartCode), string.IsNullOrEmpty(p.EdiCustomerPartCode)) switch |
||||
|
{ |
||||
|
(false, false, false) => EnumSaSeEdiCompareCategory.HaveSaHaveSeHaveEdi, |
||||
|
(false, false, true) => EnumSaSeEdiCompareCategory.HaveSaHaveSeNotHaveEdi, |
||||
|
(false, true, false) => EnumSaSeEdiCompareCategory.HaveSaNotHaveSeHaveEdi, |
||||
|
(false, true, true) => EnumSaSeEdiCompareCategory.HaveSaNotHaveSeNotHaveEdi, |
||||
|
(true, false, false) => EnumSaSeEdiCompareCategory.NotHaveSaHaveSeHaveEdi, |
||||
|
(true, false, true) => EnumSaSeEdiCompareCategory.NotHaveSaHaveSeNotHaveEdi, |
||||
|
_ => EnumSaSeEdiCompareCategory.None, |
||||
|
}; |
||||
|
switch (p.Category) |
||||
|
{ |
||||
|
case EnumSaSeEdiCompareCategory.HaveSaHaveSeHaveEdi: |
||||
|
case EnumSaSeEdiCompareCategory.HaveSaHaveSeNotHaveEdi: |
||||
|
case EnumSaSeEdiCompareCategory.HaveSaNotHaveSeHaveEdi: |
||||
|
case EnumSaSeEdiCompareCategory.HaveSaNotHaveSeNotHaveEdi: |
||||
|
{ |
||||
|
p.CustomerPartCode = p.SaCustomerPartCode; |
||||
|
p.FactoryPartCode = p.SaFactoryPartCode; |
||||
|
p.ReplaceFactoryPartCode = p.SaFactoryPartCode; |
||||
|
} |
||||
|
break; |
||||
|
case EnumSaSeEdiCompareCategory.NotHaveSaHaveSeHaveEdi: |
||||
|
case EnumSaSeEdiCompareCategory.NotHaveSaHaveSeNotHaveEdi: |
||||
|
{ |
||||
|
p.CustomerPartCode = p.SeCustomerPartCode; |
||||
|
p.FactoryPartCode = p.SeFactoryPartCode; |
||||
|
p.ReplaceFactoryPartCode = p.SeFactoryPartCode; |
||||
|
} |
||||
|
break; |
||||
|
default: |
||||
|
break; |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 创建导出文件结构
|
||||
|
/// </summary>
|
||||
|
public ExcelExporter BindExcelExporter<T>(List<T> pubSaSeCompareDetailExports, string businessTypeDisplayName) where T : SaSeEdiCompareDetailExport, ISaSeEdiCompareDetailExport, new() |
||||
|
{ |
||||
|
//汇总
|
||||
|
var pubSaSeCompareSumExports = pubSaSeCompareDetailExports.GroupBy(p => p.ReplaceFactoryPartCode).Select(p => new SaSeEdiCompareSumExport() |
||||
|
{ |
||||
|
FactoryPartCode = p.Key, |
||||
|
PartCodeDesc = p.FirstOrDefault().PartCodeDesc, |
||||
|
SAQty = p.Sum(t => t.SAQty), |
||||
|
SEQty = p.Sum(t => t.SEQty), |
||||
|
EdiQty = p.Sum(t => t.EdiQty) |
||||
|
}).ToList(); |
||||
|
|
||||
|
//有结算有发运
|
||||
|
var haveSaHaveSeExports = pubSaSeCompareDetailExports.FindAll(t => new EnumSaSeEdiCompareCategory[] { EnumSaSeEdiCompareCategory.HaveSaHaveSeHaveEdi, EnumSaSeEdiCompareCategory.HaveSaHaveSeNotHaveEdi }.Contains(t.Category)); |
||||
|
//有结算有发运汇总
|
||||
|
var haveSaHaveSeSumExports = haveSaHaveSeExports.GroupBy(p => p.ReplaceFactoryPartCode).Select(p => new SaSeEdiCompareSumExport() |
||||
|
{ |
||||
|
FactoryPartCode = p.Key, |
||||
|
PartCodeDesc = p.FirstOrDefault().PartCodeDesc, |
||||
|
SAQty = p.Sum(t => t.SAQty), |
||||
|
SEQty = p.Sum(t => t.SEQty), |
||||
|
EdiQty = p.Sum(t => t.EdiQty) |
||||
|
}).ToList(); |
||||
|
//有结算无发运
|
||||
|
var haveSaNotHaveSeExports = pubSaSeCompareDetailExports.FindAll(t => new EnumSaSeEdiCompareCategory[] { EnumSaSeEdiCompareCategory.HaveSaNotHaveSeHaveEdi, EnumSaSeEdiCompareCategory.HaveSaNotHaveSeNotHaveEdi }.Contains(t.Category)); |
||||
|
//有结算无发运
|
||||
|
var haveSaNotHaveSeSumExports = haveSaNotHaveSeExports.GroupBy(p => p.ReplaceFactoryPartCode).Select(p => new SaSeEdiCompareSumExport() |
||||
|
{ |
||||
|
FactoryPartCode = p.Key, |
||||
|
PartCodeDesc = p.FirstOrDefault().PartCodeDesc, |
||||
|
SAQty = p.Sum(t => t.SAQty), |
||||
|
SEQty = p.Sum(t => t.SEQty), |
||||
|
EdiQty = p.Sum(t => t.EdiQty) |
||||
|
}).ToList(); |
||||
|
//无结算有发运
|
||||
|
var notHaveSaHaveSeExports = pubSaSeCompareDetailExports.FindAll(t => new EnumSaSeEdiCompareCategory[] { EnumSaSeEdiCompareCategory.NotHaveSaHaveSeHaveEdi, EnumSaSeEdiCompareCategory.NotHaveSaHaveSeNotHaveEdi }.Contains(t.Category)); |
||||
|
//无结算有发运
|
||||
|
var notHaveSaHaveSeSumExports = notHaveSaHaveSeExports.GroupBy(p => p.ReplaceFactoryPartCode).Select(p => new SaSeEdiCompareSumExport() |
||||
|
{ |
||||
|
FactoryPartCode = p.Key, |
||||
|
PartCodeDesc = p.FirstOrDefault().PartCodeDesc, |
||||
|
SAQty = p.Sum(t => t.SAQty), |
||||
|
SEQty = p.Sum(t => t.SEQty), |
||||
|
EdiQty = p.Sum(t => t.EdiQty) |
||||
|
}).ToList(); |
||||
|
|
||||
|
ExcelExporter excelExporter = new ExcelExporter(); |
||||
|
return excelExporter |
||||
|
.Append(pubSaSeCompareDetailExports, $"{businessTypeDisplayName}结算核对明细输出") |
||||
|
.SeparateBySheet() |
||||
|
.Append(pubSaSeCompareSumExports, $"{businessTypeDisplayName}结算核对汇总输出") |
||||
|
.SeparateBySheet() |
||||
|
|
||||
|
.Append(haveSaHaveSeExports, $"{businessTypeDisplayName}有结算有发货明细输出") |
||||
|
.SeparateBySheet() |
||||
|
.Append(haveSaHaveSeSumExports, $"{businessTypeDisplayName}有结算有发货汇总输出") |
||||
|
.SeparateBySheet() |
||||
|
|
||||
|
.Append(haveSaNotHaveSeExports, $"{businessTypeDisplayName}有结算无发货明细输出") |
||||
|
.SeparateBySheet() |
||||
|
.Append(haveSaNotHaveSeSumExports, $"{businessTypeDisplayName}有结算无发货汇总输出"); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 通知
|
||||
|
/// </summary>
|
||||
|
public virtual void Notify() |
||||
|
{ |
||||
|
_hubContext.Clients.All.ServerToClient("SaSeCompare", "refresh", ""); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
Loading…
Reference in new issue