学 赵
1 year ago
37 changed files with 7717 additions and 1674 deletions
@ -0,0 +1,32 @@ |
|||
import defaultVersion from "../version.js"; |
|||
|
|||
const version = Object.assign({}, defaultVersion); |
|||
|
|||
export default { |
|||
properties: { |
|||
version: Object.assign(version, { rules: [{ required: true }] }), |
|||
seDateTime: { |
|||
title: "发运日期", |
|||
type: "array", |
|||
input: "datetimerange", |
|||
}, |
|||
downLineDateTime: { |
|||
title: "下线日期", |
|||
type: "array", |
|||
input: "datetimerange", |
|||
}, |
|||
pn: { |
|||
title: "通用码", |
|||
type: "string", |
|||
input: "textarea", |
|||
columns: 1, |
|||
placeholder: "通用码", |
|||
}, |
|||
lu: { |
|||
title: "客户零件号", |
|||
type: "string", |
|||
input: "textarea", |
|||
placeholder: "客户零件号", |
|||
}, |
|||
}, |
|||
}; |
@ -0,0 +1,127 @@ |
|||
import version from "../version.js"; |
|||
import compareSchema from "./compare.js"; |
|||
|
|||
const stateName = { |
|||
title: "状态", |
|||
type: "string", |
|||
input: "select", |
|||
clearable: true, |
|||
options: [ |
|||
{ label: "执行完成(任务成功)", value: "Succeeded" }, |
|||
{ label: "执行完成(任务失败)", value: "Failed" }, |
|||
{ label: "执行中", value: "Processing" }, |
|||
{ label: "等待执行", value: "Enqueued" }, |
|||
], |
|||
}; |
|||
|
|||
const schema = { |
|||
title: "数据对比", |
|||
type: "object", |
|||
properties: { |
|||
type: { |
|||
title: "版本号", |
|||
type: "string", |
|||
}, |
|||
taskId: { |
|||
title: "单据流水号", |
|||
type: "string", |
|||
}, |
|||
email: { |
|||
title: "创建人", |
|||
type: "string", |
|||
}, |
|||
createdAt: { |
|||
title: "创建时间", |
|||
type: "DateTime", |
|||
}, |
|||
remark: { |
|||
title: "说明", |
|||
type: "string", |
|||
}, |
|||
stateName, |
|||
}, |
|||
}; |
|||
|
|||
export default function (compareService) { |
|||
const queryUrl = "settleaccount/Job/list"; |
|||
const deleteUrl = "settleaccount/Job/delete"; |
|||
const exportUrl = "settleaccount/pub_sa_detail_service/export"; |
|||
const compareUrl = `settleaccount/${compareService}`; |
|||
const queryMethod = "POST"; |
|||
const deleteMethod = "POST"; |
|||
const exportMethod = "POST"; |
|||
const compareMethod = "POST"; |
|||
|
|||
return { |
|||
query: { |
|||
url: queryUrl, |
|||
method: queryMethod, |
|||
autoSubmit: true, |
|||
disableQueryOnLoad: false, |
|||
schema: { |
|||
title: "数据对比", |
|||
type: "object", |
|||
properties: { |
|||
type: Object.assign({ defaultSelected: false }, version), |
|||
name: { |
|||
type: "string", |
|||
hidden: true, |
|||
}, |
|||
stateName, |
|||
businessType: { |
|||
type: "string", |
|||
hidden: true, |
|||
}, |
|||
filters: { |
|||
type: "array", |
|||
hidden: true, |
|||
items: { |
|||
type: "object", |
|||
properties: { |
|||
logic: { |
|||
type: "int", |
|||
}, |
|||
column: { |
|||
type: "string", |
|||
}, |
|||
action: { |
|||
type: "int", |
|||
}, |
|||
value: { |
|||
type: "string", |
|||
}, |
|||
}, |
|||
}, |
|||
default: [], |
|||
}, |
|||
skipCount: { |
|||
hidden: true, |
|||
default: 0, |
|||
}, |
|||
maxResultCount: { |
|||
hidden: true, |
|||
default: 10, |
|||
}, |
|||
sorting: { |
|||
hidden: true, |
|||
}, |
|||
}, |
|||
}, |
|||
}, |
|||
table: { |
|||
schema: schema, |
|||
}, |
|||
edit: { |
|||
deleteUrl, |
|||
exportUrl, |
|||
compareUrl, |
|||
deleteMethod, |
|||
exportMethod, |
|||
compareMethod, |
|||
schema: schema, |
|||
}, |
|||
compare: { |
|||
schema: compareSchema, |
|||
}, |
|||
}; |
|||
} |
@ -0,0 +1,118 @@ |
|||
import version from "../version.js"; |
|||
|
|||
const schema = { |
|||
title: "EDI数据", |
|||
type: "object", |
|||
properties: { |
|||
keyCode: { |
|||
title: "LU+生产码", |
|||
type: "string", |
|||
}, |
|||
version, |
|||
lu: { |
|||
title: "零件号", |
|||
type: "string", |
|||
}, |
|||
pn: { |
|||
title: "生产码", |
|||
type: "string", |
|||
}, |
|||
seqNumber: { |
|||
title: "日顺序号", |
|||
type: "string", |
|||
}, |
|||
assemblyCode: { |
|||
title: "小总成号", |
|||
type: "string", |
|||
}, |
|||
injectionCode: { |
|||
title: "注塑码", |
|||
type: "string", |
|||
}, |
|||
qty: { |
|||
title: "EDI数量", |
|||
type: "number", |
|||
}, |
|||
beginDate: { |
|||
title: "订货时间", |
|||
type: "string", |
|||
input: "datetime", |
|||
}, |
|||
id: { |
|||
type: "string", |
|||
hidden: true, |
|||
showForList: false, |
|||
}, |
|||
}, |
|||
}; |
|||
|
|||
export default function (service) { |
|||
const queryUrl = `settleaccount/${service}/get-list`; |
|||
const exportUrl = `settleaccount/${service}/export`; |
|||
const queryMethod = "POST"; |
|||
const exportMethod = "POST"; |
|||
|
|||
return { |
|||
query: { |
|||
url: queryUrl, |
|||
method: queryMethod, |
|||
hasFilter: true, |
|||
schema: { |
|||
title: "EDI数据", |
|||
type: "object", |
|||
properties: { |
|||
filters: { |
|||
title: "项目", |
|||
type: "array", |
|||
hidden: true, |
|||
items: { |
|||
type: "object", |
|||
properties: { |
|||
logic: { |
|||
type: "int", |
|||
}, |
|||
column: { |
|||
type: "string", |
|||
}, |
|||
action: { |
|||
type: "int", |
|||
}, |
|||
value: { |
|||
type: "string", |
|||
}, |
|||
}, |
|||
}, |
|||
default: [ |
|||
{ |
|||
logic: "and", |
|||
column: "version", |
|||
action: "equal", |
|||
value: null, |
|||
readOnly: true, |
|||
}, |
|||
], |
|||
}, |
|||
skipCount: { |
|||
hidden: true, |
|||
default: 0, |
|||
}, |
|||
maxResultCount: { |
|||
hidden: true, |
|||
default: 10, |
|||
}, |
|||
sorting: { |
|||
hidden: true, |
|||
}, |
|||
}, |
|||
}, |
|||
}, |
|||
table: { |
|||
schema: schema, |
|||
}, |
|||
edit: { |
|||
exportUrl, |
|||
exportMethod, |
|||
schema: schema, |
|||
}, |
|||
}; |
|||
} |
@ -0,0 +1,186 @@ |
|||
const schema = { |
|||
title: "JIS发运数据", |
|||
type: "object", |
|||
properties: { |
|||
wmsBillNum: { |
|||
title: "发货单号", |
|||
type: "string", |
|||
}, |
|||
num: { |
|||
title: "单据编号", |
|||
type: "string", |
|||
}, |
|||
billTime: { |
|||
title: "发货时间", |
|||
type: "string", |
|||
input: "datetime", |
|||
}, |
|||
oper: { |
|||
title: "发货人", |
|||
type: "string", |
|||
}, |
|||
orderNum: { |
|||
title: "排序单号", |
|||
type: "string", |
|||
}, |
|||
seq: { |
|||
title: "订单序号", |
|||
type: "string", |
|||
}, |
|||
realCode: { |
|||
title: "实际生产码", |
|||
type: "string", |
|||
}, |
|||
vinCode: { |
|||
title: "订单生产码", |
|||
type: "string", |
|||
}, |
|||
codeType: { |
|||
title: "生产码类型", |
|||
type: "string", |
|||
}, |
|||
realPartCode: { |
|||
title: "实际零件号", |
|||
type: "string", |
|||
}, |
|||
partCode: { |
|||
title: "零件号", |
|||
type: "string", |
|||
}, |
|||
batch: { |
|||
title: "批次", |
|||
type: "string", |
|||
}, |
|||
mesConfigCode: { |
|||
title: "MES配置码", |
|||
type: "string", |
|||
}, |
|||
fromLoc: { |
|||
title: "来源库位", |
|||
type: "string", |
|||
}, |
|||
toLoc: { |
|||
title: "目标库位", |
|||
type: "string", |
|||
}, |
|||
refVinCode: { |
|||
title: "参照订单生产码", |
|||
type: "string", |
|||
}, |
|||
billCharacter: { |
|||
title: "单据性质", |
|||
type: "string", |
|||
}, |
|||
refBillNum: { |
|||
title: "发货关联单号", |
|||
type: "string", |
|||
}, |
|||
erpToLoc: { |
|||
title: "Erp目标库位", |
|||
type: "string", |
|||
}, |
|||
origiCode: { |
|||
title: "原生产码", |
|||
type: "string", |
|||
}, |
|||
remark: { |
|||
title: "备注", |
|||
type: "string", |
|||
}, |
|||
uniqueCode: { |
|||
title: "塑件唯一码", |
|||
type: "string", |
|||
}, |
|||
pjsNum: { |
|||
title: "PJS顺序号", |
|||
type: "string", |
|||
}, |
|||
matchNumber: { |
|||
title: "虚拟小总成", |
|||
type: "string", |
|||
}, |
|||
deliverCode: { |
|||
title: "发货条码", |
|||
type: "string", |
|||
}, |
|||
position: { |
|||
title: "客户位置", |
|||
type: "string", |
|||
}, |
|||
}, |
|||
}; |
|||
|
|||
export default function (service, syncService) { |
|||
const queryUrl = `settleaccount/${service}/get-list`; |
|||
const exportUrl = `settleaccount/${service}/export`; |
|||
const syncUrl = `settleaccount/${syncService}`; |
|||
const queryMethod = "POST"; |
|||
const exportMethod = "POST"; |
|||
const syncMethod = "POST"; |
|||
|
|||
return { |
|||
query: { |
|||
url: queryUrl, |
|||
method: queryMethod, |
|||
hasFilter: true, |
|||
schema: { |
|||
title: "JIS发运数据", |
|||
type: "object", |
|||
properties: { |
|||
filters: { |
|||
title: "项目", |
|||
type: "array", |
|||
hidden: true, |
|||
items: { |
|||
type: "object", |
|||
properties: { |
|||
logic: { |
|||
type: "int", |
|||
}, |
|||
column: { |
|||
type: "string", |
|||
}, |
|||
action: { |
|||
type: "int", |
|||
}, |
|||
value: { |
|||
type: "string", |
|||
}, |
|||
}, |
|||
}, |
|||
default: [ |
|||
{ |
|||
logic: "and", |
|||
column: "wmsBillNum", |
|||
action: "like", |
|||
value: null, |
|||
readOnly: true, |
|||
}, |
|||
], |
|||
}, |
|||
skipCount: { |
|||
hidden: true, |
|||
default: 0, |
|||
}, |
|||
maxResultCount: { |
|||
hidden: true, |
|||
default: 10, |
|||
}, |
|||
sorting: { |
|||
hidden: true, |
|||
}, |
|||
}, |
|||
}, |
|||
}, |
|||
table: { |
|||
schema: schema, |
|||
}, |
|||
edit: { |
|||
exportUrl, |
|||
syncUrl, |
|||
exportMethod, |
|||
syncMethod, |
|||
schema: schema, |
|||
}, |
|||
}; |
|||
} |
File diff suppressed because it is too large
@ -0,0 +1,98 @@ |
|||
import AppList from "../../components/list/index.js"; |
|||
import AppForm from "../../components/form/index.js"; |
|||
import html from "html"; |
|||
import { useRoute } from "vue-router"; |
|||
import useConfig from "../../models/compare/fa-yun.js"; |
|||
import { ref, onMounted, onUnmounted } from "vue"; |
|||
import { schemaToModel } from "../../utils/index.js"; |
|||
import request from "../../request/index.js"; |
|||
|
|||
export default { |
|||
components: { AppList, AppForm }, |
|||
template: html`<app-list ref="appListRef" :config="config" @command="onCommand" />
|
|||
<el-dialog v-model="dialogVisable" align-center destroy-on-close style="width:40%;height:50%;"> |
|||
<template #header> <span class="el-dialog__title"> EDI与发运对比 </span> </template> |
|||
<el-scrollbar> |
|||
<app-form |
|||
ref="formRef" |
|||
:mode="create" |
|||
label-position="left" |
|||
:schema="schema" |
|||
v-model="model" |
|||
:hideButton="true" |
|||
@submit="submit" |
|||
/> |
|||
</el-scrollbar> |
|||
<template #footer> |
|||
<span class="dialog-footer"> |
|||
<el-button type="primary" @click="submit"> {{$t('confirm')}} </el-button> |
|||
</span> |
|||
</template> |
|||
</el-dialog>`, |
|||
styles: html`<style>
|
|||
.el-dialog__body { |
|||
height: calc(100% - 120px); |
|||
} |
|||
</style>`, |
|||
setup() { |
|||
const route = useRoute(); |
|||
const businessType = route.meta.businessType; |
|||
const dialogVisable = ref(false); |
|||
const loading = ref(false); |
|||
let config = null; |
|||
let name = null; |
|||
if (businessType === "JisBBAC") { |
|||
config = useConfig("edi-se-compare/bbacedi-se-compare"); |
|||
name = "JisBBACEDI与发运数据对比"; |
|||
} else if (businessType === "JisHBPO") { |
|||
config = useConfig("edi-se-compare/hbpoedi-se-compare"); |
|||
name = "JisHBPOEDI与发运数据对比"; |
|||
} |
|||
config.query.schema.properties.name.default = name; |
|||
const schema = config.compare.schema; |
|||
const defaultModel = schemaToModel(schema); |
|||
const model = ref(null); |
|||
const formRef = ref(null); |
|||
const onCommand = async (item, rows) => { |
|||
console.log(item.path, item, rows); |
|||
if (item.path === "compare") { |
|||
model.value = Object.assign({}, defaultModel); |
|||
dialogVisable.value = true; |
|||
} |
|||
}; |
|||
const submit = async () => { |
|||
try { |
|||
const valid = await formRef.value.validate(); |
|||
if (valid) { |
|||
loading.value = true; |
|||
} |
|||
const url = config.edit.compareUrl; |
|||
const data = Object.assign({ businessType, name }, model.value); |
|||
if (data.seDateTime?.length === 2) { |
|||
data.seStartDateTime = data.seDateTime[0]; |
|||
data.seEndDateTime = data.seDateTime[1]; |
|||
} |
|||
if (data.downLineDateTime?.length === 2) { |
|||
data.downLineStartDateTime = data.downLineDateTime[0]; |
|||
data.downLineEndDateTime = data.downLineDateTime[1]; |
|||
} |
|||
if (businessType) delete data["seDateTime"]; |
|||
delete data["downLineDateTime"]; |
|||
const result = await request(url, data, { method: "POST" }, true); |
|||
if (!result.errors) { |
|||
dialogVisable.value = false; |
|||
} |
|||
} catch (error) { |
|||
console.log(error); |
|||
} finally { |
|||
loading.value = false; |
|||
} |
|||
}; |
|||
//
|
|||
const appListRef = ref(null); |
|||
const event = "SaSeCompare"; |
|||
onMounted(() => PubSub.subscribe(event, async () => await appListRef.value.load())); |
|||
onUnmounted(() => PubSub.unsubscribe(event)); |
|||
return { config, onCommand, appListRef, dialogVisable, loading, schema, model, formRef, submit }; |
|||
}, |
|||
}; |
@ -0,0 +1,106 @@ |
|||
import AppList from "../../components/list/index.js"; |
|||
import AppForm from "../../components/form/index.js"; |
|||
import html from "html"; |
|||
import { useRoute } from "vue-router"; |
|||
import useConfig from "../../models/compare/fa-yun.js"; |
|||
import { ref, onMounted, onUnmounted } from "vue"; |
|||
import { schemaToModel } from "../../utils/index.js"; |
|||
import request from "../../request/index.js"; |
|||
|
|||
export default { |
|||
components: { AppList, AppForm }, |
|||
template: html`<app-list ref="appListRef" :config="config" @command="onCommand" />
|
|||
<el-dialog v-model="dialogVisable" align-center destroy-on-close style="width:40%;height:50%;"> |
|||
<template #header> <span class="el-dialog__title"> EDI、发运与发运对比 </span> </template> |
|||
<el-scrollbar> |
|||
<app-form |
|||
ref="formRef" |
|||
:mode="create" |
|||
label-position="left" |
|||
:schema="schema" |
|||
v-model="model" |
|||
:hideButton="true" |
|||
@submit="submit" |
|||
/> |
|||
</el-scrollbar> |
|||
<template #footer> |
|||
<span class="dialog-footer"> |
|||
<el-button type="primary" @click="submit"> {{$t('confirm')}} </el-button> |
|||
</span> |
|||
</template> |
|||
</el-dialog>`, |
|||
styles: html`<style>
|
|||
.el-dialog__body { |
|||
height: calc(100% - 120px); |
|||
} |
|||
</style>`, |
|||
setup() { |
|||
const route = useRoute(); |
|||
const businessType = route.meta.businessType; |
|||
const dialogVisable = ref(false); |
|||
const loading = ref(false); |
|||
const nameList = { |
|||
JisBBAC: "JisBBAC结算与发运数据对比", |
|||
JisHBPO: "JisHBPO结算与发运数据对比", |
|||
ZhiGongJianBBAC: "直供件BBAC结算与发运数据对比", |
|||
ZhiGongJianHBPO: "直供件HBPO结算与发运数据对比", |
|||
MaiDanJianBBAC: "买单件BBAC结算与发运数据对比", |
|||
MaiDanJianHBPO: "买单件HBPO结算与发运数据对比", |
|||
BeiJian: "备件结算与发运数据对比", |
|||
YinDuJian: "印度件结算与发运数据对比", |
|||
}; |
|||
let config = null; |
|||
let name = null; |
|||
if (businessType === "JisBBAC") { |
|||
config = useConfig("edi-se-compare/bbacedi-se-compare"); |
|||
} else if (businessType === "JisHBPO") { |
|||
config = useConfig("edi-se-compare/hbpoedi-se-compare"); |
|||
} else { |
|||
config = useConfig("pub_sa_detail_service/pub-sa-se-compare"); |
|||
name = nameList[businessType]; |
|||
} |
|||
config.query.schema.properties.businessType.default = businessType; |
|||
config.query.schema.properties.name.default = name; |
|||
const schema = config.compare.schema; |
|||
const defaultModel = schemaToModel(schema); |
|||
const model = ref(null); |
|||
const formRef = ref(null); |
|||
const onCommand = async (item, rows) => { |
|||
console.log(item.path, item, rows); |
|||
if (item.path === "compare") { |
|||
model.value = Object.assign({}, defaultModel); |
|||
dialogVisable.value = true; |
|||
} |
|||
}; |
|||
const submit = async () => { |
|||
try { |
|||
const valid = await formRef.value.validate(); |
|||
if (valid) { |
|||
loading.value = true; |
|||
} |
|||
const url = config.edit.compareUrl; |
|||
const data = Object.assign({}, model.value); |
|||
data.seStartDateTime = data.seDateTime[0]; |
|||
data.seEndDateTime = data.seDateTime[1]; |
|||
data.downLineStartDateTime = data.downLineDateTime[0]; |
|||
data.downLineEndDateTime = data.downLineDateTime[1]; |
|||
delete data["seDateTime"]; |
|||
delete data["downLineDateTime"]; |
|||
const result = await request(url, data, { method: "POST" }, true); |
|||
if (!result.errors) { |
|||
dialogVisable.value = false; |
|||
} |
|||
} catch (error) { |
|||
console.log(error); |
|||
} finally { |
|||
loading.value = false; |
|||
} |
|||
}; |
|||
//
|
|||
const appListRef = ref(null); |
|||
const event = "SaSeCompare"; |
|||
onMounted(() => PubSub.subscribe(event, async () => await appListRef.value.load())); |
|||
onUnmounted(() => PubSub.unsubscribe(event)); |
|||
return { config, onCommand, appListRef, dialogVisable, loading, schema, model, formRef, submit }; |
|||
}, |
|||
}; |
@ -0,0 +1,23 @@ |
|||
import AppList from "../../components/list/index.js"; |
|||
import html from "html"; |
|||
import { useRoute } from "vue-router"; |
|||
import useConfig from "../../models/input/edi.js"; |
|||
|
|||
export default { |
|||
components: { AppList }, |
|||
template: html`<app-list :config="config" @command="onCommand" />`, |
|||
setup() { |
|||
let config = null; |
|||
const route = useRoute(); |
|||
const businessType = route.meta.businessType; |
|||
if (businessType === "JisBBAC") { |
|||
config = useConfig("bbac_se_edi_service"); |
|||
} else if (businessType === "JisHBPO") { |
|||
config = useConfig("hbpo_se_edi_service"); |
|||
} |
|||
const onCommand = async (item, rows) => { |
|||
console.log(item.path, item, rows); |
|||
}; |
|||
return { config, onCommand }; |
|||
}, |
|||
}; |
@ -0,0 +1,31 @@ |
|||
import AppList from "../../components/list/index.js"; |
|||
import html from "html"; |
|||
import { useRoute } from "vue-router"; |
|||
import useConfig from "../../models/input/fa-yun.js"; |
|||
import request from "../../request/index.js"; |
|||
|
|||
export default { |
|||
components: { AppList }, |
|||
template: html`<app-list :config="config" @command="onCommand" />`, |
|||
setup() { |
|||
let config = null; |
|||
const route = useRoute(); |
|||
const businessType = route.meta.businessType; |
|||
if (businessType === "JisBBAC") { |
|||
config = useConfig("bbac_se_detail_service", "bbacse-sync/invoke"); |
|||
} else if (businessType === "JisHBPO") { |
|||
config = useConfig("hbpo_se_detail_service", "hbpose-sync/invoke"); |
|||
} else { |
|||
config = useConfig("pub_se_detail_service", "hand-se-sync/sync"); |
|||
} |
|||
const onCommand = async (item, rows) => { |
|||
console.log(item.path, item, rows); |
|||
if (item.path === "sync") { |
|||
const url = config.edit.syncUrl; |
|||
const method = config.edit.syncMethod; |
|||
await request(url, route.meta.businessType, { method }); |
|||
} |
|||
}; |
|||
return { config, onCommand }; |
|||
}, |
|||
}; |
@ -0,0 +1,43 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Threading.Tasks; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Volo.Abp.Domain.Services; |
|||
using Win.Sfs.SettleAccount.MaterialRelationships; |
|||
using Win.Sfs.Shared.RepositoryBase; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Entities.BQ.Managers; |
|||
/// <summary>
|
|||
/// 客户零件关系
|
|||
/// </summary>
|
|||
public class MaterialRelationshipManager : DomainService |
|||
{ |
|||
/// <summary>
|
|||
/// 客户零件关系仓储
|
|||
/// </summary>
|
|||
private readonly INormalEfCoreRepository<MaterialRelationship, Guid> _materialRelationshipRepository; |
|||
|
|||
public MaterialRelationshipManager(INormalEfCoreRepository<MaterialRelationship, Guid> materialRelationshipRepository) |
|||
{ |
|||
_materialRelationshipRepository = materialRelationshipRepository; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 添加零件关系
|
|||
/// </summary>
|
|||
public async Task AddNewMaterialRelationships(IEnumerable<MaterialRelationship> materialRelationships) |
|||
{ |
|||
//客户零件号和厂内零件号
|
|||
var luRePartCodes = materialRelationships.Select(t => new { t.ErpMaterialCode, t.SettleMaterialCode }).Distinct().ToList(); |
|||
var haveLuRePartCodes = materialRelationships.Join(_materialRelationshipRepository.AsNoTracking(), |
|||
a => new { a.ErpMaterialCode, a.SettleMaterialCode }, |
|||
b => new { b.ErpMaterialCode, b.SettleMaterialCode }, |
|||
(a, b) => a).ToList(); |
|||
var noHaveLuRePartCodes = materialRelationships.Except(haveLuRePartCodes).ToList(); |
|||
if (noHaveLuRePartCodes.Any()) |
|||
{ |
|||
await _materialRelationshipRepository.InsertManyAsync(noHaveLuRePartCodes).ConfigureAwait(false); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -0,0 +1,368 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _202308153 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DeleteData( |
|||
table: "Set_VmiBalance", |
|||
keyColumn: "Id", |
|||
keyValue: new Guid("75ce4934-06de-4cac-a1f0-536935975b38")); |
|||
|
|||
migrationBuilder.RenameColumn( |
|||
name: "Num", |
|||
table: "Set_HBPO_SE_DETAIL", |
|||
newName: "PartDesc"); |
|||
|
|||
migrationBuilder.RenameColumn( |
|||
name: "Num", |
|||
table: "Set_BBAC_SE_DETAIL", |
|||
newName: "PartDesc"); |
|||
|
|||
migrationBuilder.AlterColumn<DateTime>( |
|||
name: "BillTime", |
|||
table: "Set_HBPO_SE_DETAIL", |
|||
type: "datetime2", |
|||
nullable: true, |
|||
oldClrType: typeof(DateTime), |
|||
oldType: "datetime2"); |
|||
|
|||
migrationBuilder.AddColumn<DateTime>( |
|||
name: "AssembleData", |
|||
table: "Set_HBPO_SE_DETAIL", |
|||
type: "datetime2", |
|||
nullable: false, |
|||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "BillNum", |
|||
table: "Set_HBPO_SE_DETAIL", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "BillType", |
|||
table: "Set_HBPO_SE_DETAIL", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.AddColumn<DateTime>( |
|||
name: "CreateTime", |
|||
table: "Set_HBPO_SE_DETAIL", |
|||
type: "datetime2", |
|||
nullable: false, |
|||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "CustPartCode", |
|||
table: "Set_HBPO_SE_DETAIL", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "DeliverBillType", |
|||
table: "Set_HBPO_SE_DETAIL", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "DeliverSubBillType", |
|||
table: "Set_HBPO_SE_DETAIL", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Factory", |
|||
table: "Set_HBPO_SE_DETAIL", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "JISNum", |
|||
table: "Set_HBPO_SE_DETAIL", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "ProType", |
|||
table: "Set_HBPO_SE_DETAIL", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "State", |
|||
table: "Set_HBPO_SE_DETAIL", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "SubBillType", |
|||
table: "Set_HBPO_SE_DETAIL", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "TransType", |
|||
table: "Set_HBPO_SE_DETAIL", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.AlterColumn<DateTime>( |
|||
name: "BillTime", |
|||
table: "Set_BBAC_SE_DETAIL", |
|||
type: "datetime2", |
|||
nullable: true, |
|||
oldClrType: typeof(DateTime), |
|||
oldType: "datetime2"); |
|||
|
|||
migrationBuilder.AddColumn<DateTime>( |
|||
name: "AssembleData", |
|||
table: "Set_BBAC_SE_DETAIL", |
|||
type: "datetime2", |
|||
nullable: false, |
|||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "BillNum", |
|||
table: "Set_BBAC_SE_DETAIL", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "BillType", |
|||
table: "Set_BBAC_SE_DETAIL", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.AddColumn<DateTime>( |
|||
name: "CreateTime", |
|||
table: "Set_BBAC_SE_DETAIL", |
|||
type: "datetime2", |
|||
nullable: false, |
|||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "CustPartCode", |
|||
table: "Set_BBAC_SE_DETAIL", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "DeliverBillType", |
|||
table: "Set_BBAC_SE_DETAIL", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "DeliverSubBillType", |
|||
table: "Set_BBAC_SE_DETAIL", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Factory", |
|||
table: "Set_BBAC_SE_DETAIL", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "JISNum", |
|||
table: "Set_BBAC_SE_DETAIL", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "ProType", |
|||
table: "Set_BBAC_SE_DETAIL", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "State", |
|||
table: "Set_BBAC_SE_DETAIL", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "SubBillType", |
|||
table: "Set_BBAC_SE_DETAIL", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.AddColumn<int>( |
|||
name: "TransType", |
|||
table: "Set_BBAC_SE_DETAIL", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
|
|||
migrationBuilder.InsertData( |
|||
table: "Set_VmiBalance", |
|||
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" }, |
|||
values: new object[] { new Guid("c085a562-1da9-4dd3-8e65-85e4518f1383"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "4b83550d90bf425493e93dcd552a0bd1", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null }); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DeleteData( |
|||
table: "Set_VmiBalance", |
|||
keyColumn: "Id", |
|||
keyValue: new Guid("c085a562-1da9-4dd3-8e65-85e4518f1383")); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "AssembleData", |
|||
table: "Set_HBPO_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "BillNum", |
|||
table: "Set_HBPO_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "BillType", |
|||
table: "Set_HBPO_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "CreateTime", |
|||
table: "Set_HBPO_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "CustPartCode", |
|||
table: "Set_HBPO_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "DeliverBillType", |
|||
table: "Set_HBPO_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "DeliverSubBillType", |
|||
table: "Set_HBPO_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Factory", |
|||
table: "Set_HBPO_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "JISNum", |
|||
table: "Set_HBPO_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ProType", |
|||
table: "Set_HBPO_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "State", |
|||
table: "Set_HBPO_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "SubBillType", |
|||
table: "Set_HBPO_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "TransType", |
|||
table: "Set_HBPO_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "AssembleData", |
|||
table: "Set_BBAC_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "BillNum", |
|||
table: "Set_BBAC_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "BillType", |
|||
table: "Set_BBAC_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "CreateTime", |
|||
table: "Set_BBAC_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "CustPartCode", |
|||
table: "Set_BBAC_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "DeliverBillType", |
|||
table: "Set_BBAC_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "DeliverSubBillType", |
|||
table: "Set_BBAC_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Factory", |
|||
table: "Set_BBAC_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "JISNum", |
|||
table: "Set_BBAC_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ProType", |
|||
table: "Set_BBAC_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "State", |
|||
table: "Set_BBAC_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "SubBillType", |
|||
table: "Set_BBAC_SE_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "TransType", |
|||
table: "Set_BBAC_SE_DETAIL"); |
|||
|
|||
migrationBuilder.RenameColumn( |
|||
name: "PartDesc", |
|||
table: "Set_HBPO_SE_DETAIL", |
|||
newName: "Num"); |
|||
|
|||
migrationBuilder.RenameColumn( |
|||
name: "PartDesc", |
|||
table: "Set_BBAC_SE_DETAIL", |
|||
newName: "Num"); |
|||
|
|||
migrationBuilder.AlterColumn<DateTime>( |
|||
name: "BillTime", |
|||
table: "Set_HBPO_SE_DETAIL", |
|||
type: "datetime2", |
|||
nullable: false, |
|||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), |
|||
oldClrType: typeof(DateTime), |
|||
oldType: "datetime2", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<DateTime>( |
|||
name: "BillTime", |
|||
table: "Set_BBAC_SE_DETAIL", |
|||
type: "datetime2", |
|||
nullable: false, |
|||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), |
|||
oldClrType: typeof(DateTime), |
|||
oldType: "datetime2", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.InsertData( |
|||
table: "Set_VmiBalance", |
|||
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" }, |
|||
values: new object[] { new Guid("75ce4934-06de-4cac-a1f0-536935975b38"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "8e865c8947ea4381b1b48c3ee4d572b4", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null }); |
|||
} |
|||
} |
|||
} |
Loading…
Reference in new issue