mahao 1 year ago
parent
commit
4adc9b073b
  1. 34
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/components/list/index.js
  2. 96
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/_options.js
  3. 287
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/fa-yun.js
  4. 2
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-data.js
  5. 19
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/role.js
  6. 43
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/user.js
  7. 89
      code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/settle/_check.js
  8. 10
      code/src/Modules/SettleAccount/src/SettleAccount.Application.Contracts/Entities/BQ/Dtos/INVOICE_GRP_DTO.cs
  9. 50
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/ADJ_SERVICE.cs
  10. 22
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs
  11. 25
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/INVOICE_SERVICE.cs
  12. 4
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs
  13. 61
      code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/Syncs/PendingDeductionService.cs
  14. 194
      code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs
  15. 7
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/INVOICE_NOT_SETTLE.cs
  16. 28
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG.cs
  17. 11
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Managers/INV_MNG_EXT.cs
  18. 8
      code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Temp/TempClass.cs
  19. 5524
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230818073659_202308180001.Designer.cs
  20. 44
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230818073659_202308180001.cs
  21. 7
      code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/SettleAccountDbContextModelSnapshot.cs
  22. 3
      code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQFactoryUnSettledDetailDiffExportService.cs
  23. 334
      code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs

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

@ -812,6 +812,39 @@ export default {
}
return postData;
}
const action = async (method, confirMmessage = "确认操作吗?", successMessage = "操作成功", reload = true) => {
try {
await ElMessageBox.confirm(confirMmessage, "提示", {
type: "warning",
});
tableLoading.value = true;
let result = null;
if (method.constructor.name == "AsyncFunction") {
result = await method();
} else {
result = method();
}
if (!result.errors) {
await ElMessage({
type: "info",
message: successMessage,
});
if (reload) {
pageModel.pageIndex = 1;
await load();
}
}
} catch (error) {
if (error === "cancel") {
ElMessage({
type: "info",
message: "操作取消",
});
}
} finally {
tableLoading.value = false;
}
};
onMounted(async () => {
if (route.meta.children?.length) {
for (const item of route.meta.children) {
@ -833,6 +866,7 @@ export default {
});
return {
load,
action,
config,
queryModel,
buildQuery,

96
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/_options.js

@ -36,6 +36,98 @@ const businessType = {
{ value: 8, label: "印度件" },
],
};
export default businessType;
export { version, state, state2, state3 };
const transType = {
title: "事务类型",
type: "string",
input: "select",
options: [
{ value: -1, label: "退货" },
{ value: 1, label: "发货" },
],
};
const deliverBillType = {
title: "发运主类型",
type: "string",
input: "select",
options: [
{ value: 0, label: "无" },
{ value: 1, label: "JIS件" },
{ value: 2, label: "JIT直供件" },
{ value: 3, label: "印度件" },
{ value: 4, label: "北汽4S备件" },
],
};
const deliverSubBillType = {
title: "发运子类型",
type: "string",
input: "select",
options: [
{ value: 0, label: "无" },
{ value: 1, label: "保险杠BBAC" },
{ value: 2, label: "保险杠HBPO" },
{ value: 3, label: "买单件保险杠BBAC" },
{ value: 4, label: "买单件保险杠HBPO" },
{ value: 5, label: "买单件小件BBAC" },
{ value: 6, label: "买单件小件HBPO" },
{ value: 7, label: "小件BBAC" },
{ value: 8, label: "小件HBPO" },
{ value: 9, label: "JIT直供件BBAC" },
{ value: 10, label: "JIT直供件HBPO" },
{ value: 11, label: "印度件BBAC" },
{ value: 12, label: "北汽4S备件BBAC" },
],
};
const proType = {
title: "业务类型",
type: "string",
input: "select",
options: [
{ value: 0, label: "无" },
{ value: 1, label: "Jit发货" },
{ value: 2, label: "Jit补发订单" },
{ value: 3, label: "Jit备件" },
{ value: 4, label: "Jit买单件" },
{ value: 5, label: "Jit匹配件" },
{ value: 6, label: "Jis发货" },
{ value: 7, label: "Jis备件" },
{ value: 8, label: "Jis买单件" },
{ value: 9, label: "Jis匹配件" },
{ value: 10, label: "Jis补发订单" },
{ value: 11, label: "Jis退货" },
{ value: 12, label: "Jis备件退货" },
{ value: 13, label: "Jis买单件退货" },
{ value: 14, label: "Jis匹配件退货" },
{ value: 15, label: "Jis补发订单退货" },
{ value: 16, label: "Jit退货" },
{ value: 17, label: "Jit备件退货" },
{ value: 18, label: "Jit买单件退货" },
{ value: 19, label: "Jit匹配件退货" },
{ value: 20, label: "Jit补发订单退货" },
{ value: 21, label: "北汽4S发货" },
{ value: 22, label: "HBPO发货" },
{ value: 23, label: "直供件发货" },
{ value: 24, label: "印度件发货" },
{ value: 25, label: "北汽4S退货" },
{ value: 26, label: "HBPO退货" },
{ value: 27, label: "直供件退货" },
{ value: 28, label: "印度件退货" },
],
};
const billState = {
title: "状态",
type: "string",
input: "select",
options: [
{ value: 0, label: "新建" },
{ value: 1, label: "部分执行" },
{ value: 2, label: "完成" },
],
};
export default businessType;
export { version, state, state2, state3, transType, deliverBillType, deliverSubBillType, proType, billState };

287
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/models/input/fa-yun.js

@ -1,92 +1,155 @@
const schema = {
title: "JIS发运数据",
import { version, transType, deliverBillType, deliverSubBillType, proType, billState } from "../_options.js";
const schema1 = {
title: "发运数据",
type: "object",
properties: {
wmsBillNum: {
title: "发货单号",
version,
shippingDate: {
title: "发货时间",
type: "string",
input: "datetime",
},
num: {
title: "单据编号",
wmsBillNum: {
title: "WMS发货单号",
type: "string",
},
billTime: {
title: "发货时间",
lu: {
title: "客户零件号",
type: "string",
input: "datetime",
},
oper: {
title: "发货人",
factoryPartCode: {
title: "厂内零件号",
type: "string",
},
orderNum: {
title: "排序单号",
pn: {
title: "生产号",
type: "string",
},
seq: {
title: "订单序号",
type: "string",
// 已废除
// keyCode: {
// hidden: true,
// },
qty: {
type: "number",
title: "数量",
},
realCode: {
title: "实际生产码",
jisNum: {
title: "JIT订单号",
type: "string",
},
vinCode: {
title: "订单生产码",
title: "JIT排序生产码",
type: "string",
},
codeType: {
title: "生产码类型",
type: "string",
},
realPartCode: {
title: "实际零件号",
title: "JIT排序生产码类型",
type: "string",
},
partCode: {
title: "零件号",
type: "string",
},
realPartCode: {
title: "真实零件号",
type: "string",
},
batch: {
title: "批次",
type: "string",
},
mesConfigCode: {
title: "MES配置码",
custPartCode: {
title: "客户零件号",
type: "string",
},
fromLoc: {
title: "来源库位",
seq: {
title: "订单序号",
type: "string",
},
toLoc: {
title: "目标库位",
assembleData: {
title: "订单时间",
type: "string",
input: "datetime",
},
refVinCode: {
title: "参照订单生产码",
deliverCode: {
title: "发货条码",
type: "string",
},
billCharacter: {
title: "单据性质",
billNum: {
title: "发货单号",
type: "string",
},
refBillNum: {
title: "发货关联单号",
billTime: {
title: "发货时间",
type: "string",
input: "datetime",
},
erpToLoc: {
title: "Erp目标库位",
oper: {
title: "发货人",
type: "string",
},
factory: {
title: "工厂",
type: "string",
},
mesConfigCode: {
title: "MES配置码",
type: "string",
},
toLoc: {
title: "目标库位",
type: "string",
},
// 已废除
// billType: {
// },
// 已废除
// subBillType: {,
// },
transType,
deliverBillType,
deliverSubBillType,
billCharacter: {
title: "单据性质",
type: "string",
},
origiCode: {
title: "原生产码",
type: "string",
},
partDesc: {
title: "描述",
type: "string",
},
remark: {
title: "备注",
type: "string",
},
proType,
orderNum: {
title: "JIS排序单号",
type: "string",
},
realCode: {
title: "JIS实际生产码",
type: "string",
},
fromLoc: {
title: "来源库位",
type: "string",
},
refVinCode: {
title: "参照订单生产码",
type: "string",
},
refBillNum: {
title: "发货关联单号",
type: "string",
},
erpToLoc: {
title: "Erp目标库位",
type: "string",
},
uniqueCode: {
title: "塑件唯一码",
type: "string",
@ -99,27 +162,167 @@ const schema = {
title: "虚拟小总成",
type: "string",
},
deliverCode: {
title: "发货条码",
state: billState,
createTime: {
title: "创建时间",
type: "string",
input: "datetime",
},
isHaveEdiData: {
title: "是否有EDI数据",
type: "boolean",
},
},
};
const schema2 = {
title: "发运数据",
type: "object",
properties: {
assembleData: {
title: "订单时间",
type: "string",
input: "datetime",
},
batch: {
title: "批次",
type: "string",
},
billNum: {
title: "发货单号",
type: "string",
},
billTime: {
title: "发货时间",
type: "string",
input: "datetime",
},
custId: {
title: "客户",
type: "string",
},
// 已废除
// billType: {
// },
createTime: {
title: "创建时间",
type: "string",
input: "datetime",
},
custPartCode: {
title: "客户零件号",
type: "string",
},
deliverBillType,
deliverSubBillType,
deliveryHose: {
title: "发货仓库",
type: "string",
},
deliveryIndex: {
title: "交付索引",
type: "string",
},
dnBillNum: {
title: "DN单据号",
type: "string",
},
dnBillTime: {
title: "DN单据时间",
type: "string",
input: "datetime",
},
dnOper: {
title: "DN单添加人",
type: "string",
},
position: {
title: "客户位置",
factoryPartCode: {
title: "厂内零件号",
type: "string",
},
fromErpLocCode: {
title: "来源ERP库存",
type: "string",
},
fromHose: {
title: "来源仓库",
type: "string",
},
fromLocCode: {
title: "来源库位",
type: "string",
},
// keyCode: {
// title: "组合键值",
// type: "string",
// },
lu: {
title: "客户零件号",
type: "string",
},
oper: {
title: "发货人",
type: "string",
},
partCode: {
title: "零件号",
type: "string",
},
pn: {
title: "生产号",
type: "string",
},
proType,
qty: {
title: "数量",
type: "number",
},
remark: {
title: "备注",
type: "string",
},
shippingDate: {
title: "发货时间",
type: "string",
input: "datetime",
},
state: billState,
//subBillType,
toErpLocCode: {
title: "目标Erp库位",
type: "string",
},
toHose: {
title: "目标仓库",
type: "string",
},
toLocCode: {
title: "目标库位",
type: "string",
},
transType,
version,
wmsBillNum: {
title: "WMS发货单号",
type: "string",
},
},
};
export default function (businessType) {
let schema = null;
let service = null;
let syncService = null;
if (businessType === "JisBBAC") {
schema = schema1;
service = "bbac_se_detail_service";
syncService = "bbacse-sync/invoke";
} else if (businessType === "JisHBPO") {
schema = schema1;
service = "hbpo_se_detail_service";
syncService = "hbpose-sync/invoke";
} else {
schema = schema2;
service = "pub_se_detail_service";
syncService = "hand-se-sync/sync";
}

2
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/router/base-data.js

@ -11,7 +11,7 @@ export default [
createButton("create", "title=新建&isTop=true"),
createButton("update", "title=编辑"),
createButton("delete", "title=删除&disabled=o=>o.userName==='admin'"),
createButton("%s/reset-password", "title=重置密码&method=PUT"),
createButton("reset-password", "title=重置密码&method=PUT"),
],
},
{

19
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/role.js

@ -1,17 +1,2 @@
import AppList from "../../components/list/index.js";
import html from "html";
import useConfig from "../../models/base-data/role.js";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
setup() {
// 变量定义
const config = useConfig();
// 函数定义
const onCommand = (item, rows) => {
console.log(item.path, item, rows);
};
return { config, onCommand };
},
};
import useList from "../_list.js";
export default useList("base-data/role");

43
code/src/Modules/SettleAccount/host/SettleAccount.HttpApi.Host/wwwroot/views/base-data/user.js

@ -2,45 +2,24 @@ import AppList from "../../components/list/index.js";
import html from "html";
import useConfig from "../../models/base-data/user.js";
import request from "../../request/index.js";
import { format } from "../../utils/index.js";
import { ElMessage, ElMessageBox } from "element-plus";
import { ref } from "vue";
export default {
components: { AppList },
template: html`<app-list :config="config" @command="onCommand" />`,
template: html`<app-list ref="appListRef" :config="config" @command="onCommand" />`,
setup() {
const appListRef = ref(null);
const config = useConfig();
const onCommand = async (item, rows) => {
console.log(item.path, item, rows);
if (item.path === "%s/reset-password") {
const url = format(item.path, rows[0].id);
await request(`base/user/${url}`, null, { method: item.meta.method });
try {
await ElMessageBox.confirm(format("是否重置用户%s密码", rows[0].userName), "提示", {
type: "warning",
});
await ElMessage({
type: "info",
message: "密码已经成功重置为123456",
});
const url = `${config.baseUrl}/${item.path}`;
await request(
url,
rows.map((o) => o.id),
{ method: "POST" }
);
console.log(context);
await load();
} catch (error) {
if (error === "cancel") {
ElMessage({
type: "info",
message: "操作取消",
});
}
}
if (item.path === "reset-password") {
const url = `base/user/${rows[0].id}/${item.path}`;
await appListRef.value.action(
async () => await request(url, null, { method: item.meta.method }),
`是否重置用户${rows[0].userName}密码`,
`${rows[0].userName}密码已经重置为123456`
);
}
};
return { config, onCommand };
return { appListRef, config, onCommand };
},
};

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

@ -50,7 +50,7 @@ export default {
<el-step title="发票明细对比" />
<el-step title="发票预览" />
</el-steps>
<div v-show="setupRef===1" style="height:100%;">
<div class="setup1" v-show="setupRef===1" style="height:calc(100% - 120px);">
<el-row style="padding:14px 0;height:60px;">
<el-col>
<el-button type="primary" @click="showAddAdjDialog">新建</el-button>
@ -60,27 +60,25 @@ export default {
</el-row>
<el-scrollbar ref="scrollRef">
<el-row style="height:100%;">
<el-col style="height:calc(100% - 180px);">
<el-col style="height:calc(100% - 60px);">
<app-table ref="adjListRef" :data="adjList" :columns="columns5" />
</el-col>
</el-row>
</el-scrollbar>
</div>
<div v-show="setupRef===2" style="height:100%;">
<el-row style="padding:14px 0;height:60px;">
<el-col>
<el-button type="primary" @click="showAddAdjDialog">新建</el-button>
<el-button type="primary" @click="showImportAdjDialog">导入</el-button>
<el-button type="primary" @click="deleteAdj">删除</el-button>
<div class="setup2" v-show="setupRef===2" style="height:calc(100% - 60px);background:#ebeef5;">
<el-row style="width:100%;height:100%;padding:10px;">
<el-col :span="12" style="height:100%;padding:0 5px 0 0;">
<el-scrollbar>
<app-table ref="setup2table1Ref" :data="model.invoicE_WAIT_DETAIL" :columns="columns2" />
</el-scrollbar>
</el-col>
<el-col :span="12" style="height:100%;padding:0 0 0 5px;">
<el-scrollbar>
<app-table ref="setup2table2Ref" :data="adjList" :columns="columns5" />
</el-scrollbar>
</el-col>
</el-row>
<el-scrollbar ref="scrollRef">
<el-row style="height:100%;">
<el-col style="height:calc(100% - 180px);">
<app-table ref="adjListRef" :data="adjList" :columns="columns5" />
</el-col>
</el-row>
</el-scrollbar>
</div>
<template #footer>
<span class="dialog-footer">
@ -107,7 +105,7 @@ export default {
</span>
</template>
</el-dialog>
<el-dialog style="width:380px;height:480px;" align-center destroy-on-close :close-on-click-modal="false" v-model="importDialogVisible">
<el-dialog style="width:480px;height:480px;" align-center destroy-on-close :close-on-click-modal="false" v-model="importDialogVisible">
<template #header>导入调整明细</template>
<el-scrollbar>
<el-row v-loading="loading">
@ -139,10 +137,11 @@ export default {
.el-dialog__body {
height: calc(100% - 120px);
}
/*
.re-open .el-scrollbar,
.re-open .el-scrollbar__view {
height: calc(100% - 120px);
}
} */
</style>`,
props: ["modelValue", "data", "isBusiness"],
emit: ["update:modelValue"],
@ -281,6 +280,24 @@ export default {
...columns4.properties,
},
};
const setup2columns = {
lu: {
type: "string",
title: "零件号",
},
price: {
type: "number",
title: "单价",
},
qty: {
type: "number",
title: "数量",
},
amt: {
type: "number",
title: "金额",
},
};
delete columns5.properties["oldInvBillNum"];
delete columns5.properties["invGroupNum"];
//显示重开发票对话框
@ -291,6 +308,8 @@ export default {
const adjListRef = ref(null);
const addDialogVisible = ref(false);
const importDialogVisible = ref(false);
const setup2table1Ref = ref(null);
const setup2table2Ref = ref(null);
const showSetupDialog = () => {
//重开发票号
//invBillNum=
@ -361,6 +380,9 @@ export default {
if (valid) {
adjList.value.unshift(adjModel.value);
addDialogVisible.value = false;
nextTick(() => {
scrollRef.value.update();
});
}
} catch (error) {
console.log(error);
@ -406,6 +428,9 @@ export default {
if (!result.errors) {
adjList.value = result.data;
importDialogVisible.value = false;
nextTick(() => {
scrollRef.value.update();
});
}
}
} catch (error) {
@ -417,21 +442,28 @@ export default {
const next = async () => {
if (setupRef.value === 1) {
try {
// const url = "settleaccount/adj_service/check-import";
// const result = await request(url, adjList.value, { method: "POST" });
// if (!result.errors) {
// if (result.data?.code === 200) {
// setupRef.value += 1;
// } else if (result.data?.code === 400 && result.data.fileName) {
// window.open(getUrl(`settleaccount/getblobfile/download/${result.data.fileName}`));
// }
// }
setupRef.value += 1;
//处理高亮
nextTick(() => {
console.log(setup2table1Ref.value);
console.log(setup2table2Ref.value);
});
} catch (e) {
console.log(e);
}
} else if (setupRef.value === 2) {
// const url = "settleaccount/adj_service/check-import";
// const result = await request(url, adjList.value, { method: "POST" });
// if (!result.errors) {
// if (result.data?.code === 200) {
// setupRef.value += 1;
// } else if (result.data?.code === 400 && result.data.fileName) {
// window.open(getUrl(`settleaccount/getblobfile/download/${result.data.fileName}`));
// }
// }
setupRef.value += 1;
} else {
setupRef += 1;
setupRef.value += 1;
}
};
const submitReOpen = async () => {};
@ -460,6 +492,7 @@ export default {
columns3,
columns4,
columns5,
setup2columns,
showSetupDialog,
setupRef,
setupDialogVisable,
@ -480,6 +513,8 @@ export default {
importAdj,
scrollRef,
next,
setup2table1Ref,
setup2table2Ref,
};
},
};

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

@ -257,6 +257,14 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[Display(Name = "价格结束日期")]
public DateTime EndDate { get; set; }
public Dictionary<string, object> ExtraProperties { get; set; }
}
public class INVOICE_WAIT_DETAIL_REQ_DTO : RequestInputBase
{
@ -403,6 +411,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Dtos
[Display(Name = "扩展字段2")]
public string Extend2 { get; set; }
public Dictionary<string, object> ExtraProperties { get; set; }
}

50
code/src/Modules/SettleAccount/src/SettleAccount.Application/Bases/ADJ_SERVICE.cs

@ -207,11 +207,9 @@ public class ADJ_SERVICE : BASE_SERVICE
switch (inv.BusinessType)
{
case EnumBusinessType.MaiDanJianHBPO:
break;
case EnumBusinessType.MaiDanJianBBAC:
break;
case EnumBusinessType.ZhiGongJianBBAC:
var errors1 = _pubRepository.Where(p => pnlist.Contains(p.PN));
@ -257,30 +255,11 @@ public class ADJ_SERVICE : BASE_SERVICE
errorList.Add(new ERR_EXP_DTO() { Message = $"不能结算数据中存在发货单{p.PN}数据,不能导入调整表" });
}
break;
}
}
//ExportImporter _exportImporter = new ExportImporter();
//var result = await _exportImporter.UploadExcelImport<PUB_ADJ_DETAIL_IMP_DTO>(files, _excelImportService);
//if (result.Count == 0)
//{
// throw new BusinessException("8989", "导入数据记录为0条");
//}
// var invs= p_list.Select(p => p.InvBillNum).ToList();//所有发票号
//var deletels = _repository.Where(p =>invs.Contains(p.OldInvBillNum) ).ToList();//所有关联发票号的调整表
// var invlist= _invRepository.Where(p => invs.Contains(p.InvbillNum)).ToList();//所有旧发票
// var dlists= deletels.Where(p=>string.IsNullOrEmpty(p.InvBillNum)).ToList();//所有新发票号不为空的调整记录
//foreach (var itm in dlists)
//{
// errorList.Add(new ERR_EXP_DTO() { ItemCode = $"{itm.LU}", Message = $"客户零件号{itm.LU}标识号{itm.PN}下线日期{itm.SettleDate}记录已经被重新开票,新发票号为:{itm.InvBillNum}" });
//}
//var first = deletels.FirstOrDefault();
//if (!string.IsNullOrEmpty(first.InvBillNum))
//{
// throw new BusinessException("8989", $"调整记录已经生成新发票号:{first.InvBillNum}");
//}
var entityList = ObjectMapper.Map<List<PUB_ADJ_DETAIL_DTO>, List<PUB_ADJ_DETAIL>>(p_list);
var codelist = entityList.Select(p => p.LU).ToList();
var errors = await _baseDomainService.CheckBase(codelist, new BASE_CONF() { IsRelationShip = true });
@ -302,32 +281,7 @@ public class ADJ_SERVICE : BASE_SERVICE
return new JsonResult(new { Code = ApplicationConsts.ImportFailCode, fileName = await ExportErrorReportAsync(errorList) });
}
//var query = from itm in entityList
// join itm1 in invlist
// on itm.InvBillNum equals itm1.InvbillNum
// select new PUB_ADJ_DETAIL(
// id: GuidGenerator.Create(),
// keyCode: itm.PN + itm.LU,
// version: itm.Version,
// settleBillNum: itm.SettleBillNum,
// lU: itm.LU,
// pN: itm.PN,
// site: itm.Site,
// qty: itm.Qty,
// extend1: string.Empty,
// price: 0,
// invGroupNum: itm1.InvGroupNum,
// settleDate: itm.SettleDate,
// businessType: itm1.BusinessType,
// groupNum: itm.GroupNum,
// oldinv: itm.InvBillNum,
// inv: string.Empty,
// partcode:itm.PartCode
// );
//await _repository.DbContext.BulkDeleteAsync(deletels);//删除发票下所有调整明细
//await _repository.DbContext.BulkInsertAsync(query.ToList());
return new JsonResult(new { Code = 200, Message = "校验成功" }); ;
}

22
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/BBAC_PD_SERVICE.cs

@ -49,15 +49,19 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
var detailist = _detailRepository.Where(p => p_list.Contains(p.BillNum)).ToList();
//List<CustomCondition> customConditionList = new List<CustomCondition>();
////customConditionList.Add(new CustomCondition() { Name = "Version", Value = input.Version });
////customConditionList.Add(new CustomCondition() { Name = "MaterialCode", Value = input.MaterialCode });
////customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
////customConditionList.Add(new CustomCondition() { Name = "State", Value = string.IsNullOrEmpty(input.State) ? string.Empty : input.State });
//var _taskid = await _service.ExportEnqueueAsync("出库单合计汇总输出", ExportExtentsion.Excel, input.Version, string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup, CurrentUser, typeof(WmsOutputSumExportService), customConditionList, (rs) =>
//{
//});
//return _taskid;
List<CustomCondition> customConditionList = new List<CustomCondition>();
//var billList = property.Where(p => p.Name == "BillNumList").FirstOrDefault().Value;
//var type = property.Where(p => p.Name == "Type").FirstOrDefault().Value;
customConditionList.Add(new CustomCondition() { Name = "BillNumList", Value =string.Join(",",p_list) });
customConditionList.Add(new CustomCondition() { Name = "Type", Value = EnumBusinessType.JisBBAC.ToString() });
//customConditionList.Add(new CustomCondition() { Name = "MaterialGroup", Value = string.IsNullOrEmpty(input.MaterialGroup) ? string.Empty : input.MaterialGroup });
//customConditionList.Add(new CustomCondition() { Name = "State", Value = string.IsNullOrEmpty(input.State) ? string.Empty : input.State });
var _taskid = await _service.ExportEnqueueAsync("BBAC待扣减任务", ExportExtentsion.Excel, DateTime.Now.ToString("yyyyMM"), string.Empty, CurrentUser, typeof(PendingDeductionService), customConditionList, (rs) =>
{
});
return _taskid;

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

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

4
code/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/BQ/PUB_CAN_SA_SERVICE.cs

@ -115,7 +115,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ
ContractDocID = "no",
BeginDate = p.BeginTime,
EndDate = p.EndTime,
PartCode=d.PartCode//客户零件号
PartCode=d.PartCode,//客户零件号
PoNum=""
};
var dtos = q.ToList();

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

@ -49,10 +49,20 @@ public class PendingDeductionService : ITransientDependency, IExportJob
{
var billList = property.Where(p => p.Name == "BillNumList").FirstOrDefault().Value;
var type = property.Where(p => p.Name == "Type").FirstOrDefault().Value;
var list=billList.Split(",");
if (type == "BBACJIS")
// /// </summary>
//[Display(Name = "JisBBAC")]
// JisBBAC = 1,
///// <summary>
///// JisHBPO
///// </summary>
//[Display(Name = "JisHBPO")]
// JisHBPO = 2,
if (type == "JisBBAC")
{
var jisdetail = _bbacRepository.Where(p => list.Contains(p.BillNum) && p.IsMaiDan==false);
var mdetail = _bbacRepository.Where(p => list.Contains(p.BillNum) && p.IsMaiDan ==true);
@ -108,10 +118,9 @@ public class PendingDeductionService : ITransientDependency, IExportJob
}
}
}
else if (type == "HBPOJIS")
else if (type == "JisHBPO")
{
var detailist = _hbpoRepository.Where(p => list.Contains(p.BillNum)).ToList();
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)
@ -143,6 +152,50 @@ public class PendingDeductionService : ITransientDependency, IExportJob
{
var detailist = _hbpoRepository.Where(p => list.Contains(p.BillNum)).ToList();
switch (type)
{
case "ZhiGongJianBBAC":
break;
case "ZhiGongJianHBPO":
break;
case "MaiDanJianBBAC":
break;
case "MaiDanJianHBPO":
break;
case "BeiJian":
break;
case "YinDuJian":
break;
}
if (detailist != null && detailist.Count > 0)
{
foreach (var itm in detailist)

194
code/src/Modules/SettleAccount/src/SettleAccount.Application/SettleAccountApplicationModule.cs

@ -13,6 +13,8 @@ using Volo.Abp.RabbitMQ;
using System;
using TaskJob.Interfaces;
using Win.Sfs.SettleAccount.Entities.BQ.Syncs;
using SettleAccount.Job.Services.Report;
using SettleAccount.Job.Services;
namespace Win.Sfs.SettleAccount
{
@ -47,7 +49,8 @@ namespace Win.Sfs.SettleAccount
ConfigureJson(context);
//context.Services.AddTransient(typeof(INormalEfCoreRepository<,>),
// typeof(SettleAccountNormalEfCoreRepository<,>));
//typeof(SettleAccountNormalEfCoreRepository<,>));
@ -55,22 +58,207 @@ namespace Win.Sfs.SettleAccount
{
Func<string, IExportJob> accesor = key =>
{
if (key.Equals(typeof(PubSaSeCompareExportService).FullName))
{
return implementationFactory.GetService<PubSaSeCompareExportService>();
}
if (key.Equals(typeof(JisBBACEdiSeCompareExportService).FullName))
{
return implementationFactory.GetService<JisBBACEdiSeCompareExportService>();
}
if (key.Equals(typeof(JisHBPOEdiSeCompareExportService).FullName))
{
return implementationFactory.GetService<JisHBPOEdiSeCompareExportService>();
}
if (key.Equals(typeof(PendingDeductionService).FullName))
{
return implementationFactory.GetService<PendingDeductionService>();
}
//if (key.Equals(typeof(InvoiceSettledDiffExportService).FullName))
//{
// return implementationFactory.GetService<InvoiceSettledDiffExportService>();
//}
//if (key.Equals(typeof(UnSettledExportService).FullName))
//{
// return implementationFactory.GetService<UnSettledExportService>();
//}
//if (key.Equals(typeof(fisUnsettledDiffReport).FullName))
//{//ERP总成开票报表
// return implementationFactory.GetService<fisUnsettledDiffReport>();
//}
//if (key.Equals(typeof(PriceQtyDifferenceExportService).FullName))
//{//量差和价差分析报表
// return implementationFactory.GetService<PriceQtyDifferenceExportService>();
//}
//if (key.Equals(typeof(SettledPartAndErpPartPriceDiffExportService).FullName))
//{
// return implementationFactory.GetService<SettledPartAndErpPartPriceDiffExportService>();
//}
//if (key.Equals(typeof(SecMatchBaseExportService).FullName))
//{
// return implementationFactory.GetService<SecMatchBaseExportService>();
//}
//if (key.Equals(typeof(SettleFisDiffExportService).FullName))
//{
// return implementationFactory.GetService<SettleFisDiffExportService>();
//}
////大众看板结算与交货核对明细表(有条码)
//if (key.Equals(typeof(SettleKBWithCodeExportService).FullName))
//{
// return implementationFactory.GetService<SettleKBWithCodeExportService>();
//}
////大众备件结算核对明细表
//if (key.Equals(typeof(SettleSparePartExportService).FullName))
//{
// return implementationFactory.GetService<SettleSparePartExportService>();
//}
////大众备件未结明细
//if (key.Equals(typeof(SettleUnSparePartExportService).FullName))
//{
// return implementationFactory.GetService<SettleUnSparePartExportService>();
//}
////大众备件90天核对明细
//if (key.Equals(typeof(SettleSparePart90ExportService).FullName))
//{
// return implementationFactory.GetService<SettleSparePart90ExportService>();
//}
//if (key.Equals(typeof(InvoiceSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<InvoiceSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(UnInvoiceSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<UnInvoiceSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(UnSettleDiffExportService).FullName))
//{
// return implementationFactory.GetService<UnSettleDiffExportService>();
//}
//if (key.Equals(typeof(SettleDoorPanelExportService).FullName))
//{
// return implementationFactory.GetService<SettleDoorPanelExportService>();
//}
//if (key.Equals(typeof(UnsettledDetailReportService).FullName))
//{
// return implementationFactory.GetService<UnsettledDetailReportService>();
//}
//if (key.Equals(typeof(SettleKBWithOutCodeExportService).FullName))
//{
// return implementationFactory.GetService<SettleKBWithOutCodeExportService>();
//}
//if (key.Equals(typeof(SharePartUnSettledExport).FullName))
//{
// return implementationFactory.GetService<SharePartUnSettledExport>();
//}
////红旗、一汽轿车结算报表
//if (key.Equals(typeof(HQFSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQFSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(HQFSharePartSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQFSharePartSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(HQMSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQMSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(HQMSharePartSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQMSharePartSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(HQHSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQHSettledDetailDiffExportService>();
//}
////红旗结算未结明细
//if (key.Equals(typeof(HQHUnSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQHUnSettledDetailDiffExportService>();
//}
////红旗未结核对
//if (key.Equals(typeof(HQFactoryUnSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQFactoryUnSettledDetailDiffExportService>();
//}
//if (key.Equals(typeof(HQHSharePartSettledDetailDiffExportService).FullName))
//{
// return implementationFactory.GetService<HQHSharePartSettledDetailDiffExportService>();
//}
////红旗、轿车发运报表
//if (key.Equals(typeof(HQMShippingExportService).FullName))
//{
// return implementationFactory.GetService<HQMShippingExportService>();
//}
//if (key.Equals(typeof(HQHShippingExportService).FullName))
//{
// return implementationFactory.GetService<HQHShippingExportService>();
//}
//if (key.Equals(typeof(HQFShippingExportService).FullName))
//{
// return implementationFactory.GetService<HQFShippingExportService>();
//}
//if (key.Equals(typeof(WmsOutputSumExportService).FullName))
//{
// return implementationFactory.GetService<WmsOutputSumExportService>();
//}
////大众看板未结输出
//if (key.Equals(typeof(KanBanUnSettledExport).FullName))
//{
// return implementationFactory.GetService<KanBanUnSettledExport>();
//}
//if (key.Equals(typeof(FisUpdateExportService).FullName))
//{
// return implementationFactory.GetService<FisUpdateExportService>();
//}
//if (key.Equals(typeof(FisOutputService).FullName))
//{
// return implementationFactory.GetService<FisOutputService>();
//}
else
{
throw new ArgumentException($"Not Support key:{key}");
}
};
return accesor;
}; return accesor;
});
//context.Services.AddTransient(implementationFactory =>
//{
// Func<string, IExportJob> accesor = key =>
// {
// if (key.Equals(typeof(PendingDeductionService).FullName))
// {
// return implementationFactory.GetService<PendingDeductionService>();
// }
// else
// {
// throw new ArgumentException($"Not Support key:{key}");
// }
// };
// return accesor;
//});
}

7
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/INVOICE_NOT_SETTLE.cs

@ -14,6 +14,10 @@ public class INVOICE_NOT_SETTLE : FullAuditedAggregateRoot<Guid>
[Display(Name = "发票分组号")]
public string InvGroupNum { get; set; } = null!;
[Display(Name = "发票号")]
public string InvBillNum { get; set; } = null!;
[Display(Name = "结算分组号")]
public string SettleGroupNum { get; set; } = null!;
@ -35,7 +39,7 @@ public class INVOICE_NOT_SETTLE : FullAuditedAggregateRoot<Guid>
public INVOICE_NOT_SETTLE(Guid guid, int version, string invGroupNum, string settleGroupNum, string lU, string lU1, string extend1, string extend2,decimal qty)
public INVOICE_NOT_SETTLE(Guid guid, int version, string invGroupNum, string settleGroupNum, string lU, string lU1, string extend1, string extend2,decimal qty,string p_invbillnum)
{
Id = guid;
Version = version;
@ -46,6 +50,7 @@ public class INVOICE_NOT_SETTLE : FullAuditedAggregateRoot<Guid>
Extend1 = extend1;
Extend2 = extend2;
Qty = qty;
InvBillNum = p_invbillnum;
}
public INVOICE_NOT_SETTLE()

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

@ -14,6 +14,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Auditing;
@ -21,6 +22,7 @@ using Volo.Abp.Data;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.Domain.Services;
using Volo.Abp.Json;
using Win.Sfs.SettleAccount.Bases;
using Win.Sfs.SettleAccount.Entities.BQ.Temp;
using Win.Sfs.SettleAccount.Entities.Prices;
@ -1348,7 +1350,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var innotls = new List<INVOICE_NOT_SETTLE>();
if (p_notlist != null && p_notlist.Count > 0)
{
var notls = p_notlist.GroupBy(p => new { p.GroupNum, p.LU }).Select(p => new { GroupNum = p.Key.GroupNum, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty) });
var groupnum = itm.Value;
var notls = p_notlist.Where(p=>groupnum.Contains(p.GroupNum)).GroupBy(p => new { p.GroupNum, p.LU }).Select(p => new { GroupNum = p.Key.GroupNum, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty) });
foreach (var nitm in notls)
{
innotls.Add(new INVOICE_NOT_SETTLE(
@ -1360,7 +1363,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
lU1: nitm.LU,
extend1: string.Empty,
extend2: string.Empty,
qty: nitm.Qty
qty: nitm.Qty,
p_invbillnum:itm.Key
));
}
if (innotls.Count > 0)
@ -1812,7 +1816,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var innotls = new List<INVOICE_NOT_SETTLE>();
if (p_notlist != null && p_notlist.Count > 0)
{
var notls = p_notlist.GroupBy(p => new { p.GroupNum, p.LU }).Select(p => new { GroupNum = p.Key.GroupNum, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty) });
var notls = p_notlist.Where(p=>ls.Contains(p.GroupNum)).GroupBy(p => new { p.GroupNum, p.LU }).Select(p => new { GroupNum = p.Key.GroupNum, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty) });
foreach (var nitm in notls)
{
innotls.Add(new INVOICE_NOT_SETTLE(
@ -1824,7 +1828,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
lU1: nitm.LU,
extend1: string.Empty,
extend2: string.Empty,
qty: nitm.Qty
qty: nitm.Qty,
p_invbillnum:key
));
}
if (innotls.Count > 0)
@ -2060,7 +2066,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var query = from inv1 in invdetails
join dto1 in dtos on
new { inv1.LU, inv1.PN } equals new { dto1.LU, dto1.PN }
new { inv1.LU,inv1.PartCode, inv1.PN } equals new { dto1.LU,dto1.PartCode, dto1.PN }
select new
{
PartCode = inv1.PartCode,
@ -2103,6 +2109,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
groupList.AddRange(mapList);
}
List<INVOICE_WAIT_DETAIL> _entityDetailList = new List<INVOICE_WAIT_DETAIL>();
//var txt= JsonSerializer.Serialize(query.ToList());
foreach (var detail in query.ToList())
{
@ -2123,12 +2131,12 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
partcode: detail.PartCode);
entity.SetProperty("DeliveryNumber", detail.DeliveryIndexNumber);//交货号
entity.SetProperty("VendorCode", detail.VendorCode);//供应商代码
entity.SetProperty("VendorName", detail.VendorName);//供应商名称
entity.SetProperty("PurchaseOrderNumber", "");//采购订单号
entity.SetProperty("DeliveryIndexNumber", "");//交付索引号
entity.SetProperty("PartName", "");//零件名称
entity.SetProperty("VendorName", detail.VendorName);//供应商名称
entity.SetProperty("PurchaseOrderNumber", "");//采购订单号
entity.SetProperty("DeliveryIndexNumber", "");//交付索引号
entity.SetProperty("PartName", "");//零件名称
_entityDetailList.Add( entity
_entityDetailList.Add( entity
);
}

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

@ -408,7 +408,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var innotls = new List<INVOICE_NOT_SETTLE>();
if (p_notlist != null && p_notlist.Count > 0)
{
var notls = p_notlist.GroupBy(p => new { p.GroupNum, p.LU }).Select(p => new { GroupNum = p.Key.GroupNum, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty) });
var notls = p_notlist.Where(p=>ls.Contains(p.GroupNum)).GroupBy(p => new { p.GroupNum, p.LU }).Select(p => new { GroupNum = p.Key.GroupNum, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty) });
foreach (var nitm in notls)
{
innotls.Add(new INVOICE_NOT_SETTLE(
@ -420,7 +420,9 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
lU1: nitm.LU,
extend1: string.Empty,
extend2: string.Empty,
qty: nitm.Qty
qty: nitm.Qty,
p_invbillnum:key
));
}
if (innotls.Count > 0)
@ -841,7 +843,7 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
var innotls = new List<INVOICE_NOT_SETTLE>();
if (p_notlist != null && p_notlist.Count > 0)
{
var notls = p_notlist.GroupBy(p => new { p.GroupNum, p.LU }).Select(p => new { GroupNum = p.Key.GroupNum, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty) });
var notls = p_notlist.Where(p=>ls.Contains(p.GroupNum)).GroupBy(p => new { p.GroupNum, p.LU }).Select(p => new { GroupNum = p.Key.GroupNum, LU = p.Key.LU, Qty = p.Sum(itm => itm.Qty) });
foreach (var nitm in notls)
{
innotls.Add(new INVOICE_NOT_SETTLE(
@ -853,7 +855,8 @@ namespace Win.Sfs.SettleAccount.Entities.BQ.Managers
lU1: nitm.LU,
extend1: string.Empty,
extend2: string.Empty,
qty: nitm.Qty
qty: nitm.Qty,
p_invbillnum:key
));
}
if (innotls.Count > 0)

8
code/src/Modules/SettleAccount/src/SettleAccount.Domain/Entities/BQ/Temp/TempClass.cs

@ -131,6 +131,14 @@ public class TEMP_CAN_SA_DETAIL
public string PartCode { get; set; }
/// <summary>
/// 订单号
/// </summary>
public string PoNum { get; set; }
}
public class TEMP_NOT_SA_DETAIL : SA_NOT_BASE
{

5524
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230818073659_202308180001.Designer.cs

File diff suppressed because it is too large

44
code/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Migrations/20230818073659_202308180001.cs

@ -0,0 +1,44 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Win.Sfs.SettleAccount.Migrations
{
public partial class _202308180001 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "Set_VmiBalance",
keyColumn: "Id",
keyValue: new Guid("ab6a3a74-bb4e-442c-84b5-d148f2cd99f6"));
migrationBuilder.AddColumn<string>(
name: "InvBillNum",
table: "Set_INVOICE_NOT_SETTLE",
type: "nvarchar(max)",
nullable: 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("d88ebd3a-5738-4f40-8a85-a08d08bbdfea"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "fd1676c11eee4c8b98e41eb8956d04ca", 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("d88ebd3a-5738-4f40-8a85-a08d08bbdfea"));
migrationBuilder.DropColumn(
name: "InvBillNum",
table: "Set_INVOICE_NOT_SETTLE");
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("ab6a3a74-bb4e-442c-84b5-d148f2cd99f6"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "6947bb1f686043fcb95d9db67c0ca6c8", 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 });
}
}
}

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

@ -2561,6 +2561,9 @@ namespace Win.Sfs.SettleAccount.Migrations
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<string>("InvBillNum")
.HasColumnType("nvarchar(max)");
b.Property<string>("InvGroupNum")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
@ -4540,10 +4543,10 @@ namespace Win.Sfs.SettleAccount.Migrations
b.HasData(
new
{
Id = new Guid("ab6a3a74-bb4e-442c-84b5-d148f2cd99f6"),
Id = new Guid("d88ebd3a-5738-4f40-8a85-a08d08bbdfea"),
BillTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
BillType = 1,
ConcurrencyStamp = "6947bb1f686043fcb95d9db67c0ca6c8",
ConcurrencyStamp = "fd1676c11eee4c8b98e41eb8956d04ca",
DeliverTime = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
ErpToLoc = "ErpToLoc",
OrderNum = "OrderNum",

3
code/src/Modules/SettleAccount/src/SettleAccount.Job/Services/Report/HQFactoryUnSettledDetailDiffExportService.cs

@ -1,4 +1,4 @@
using Magicodes.ExporterAndImporter.Excel;
using Magicodes.ExporterAndImporter.Excel;
using Shouldly;
using System;
using System.Collections.Generic;
@ -23,7 +23,6 @@ namespace SettleAccount.Job.Services.Report
private readonly HQFactorySettledDetailDapperRepository _dapperRepository;
private readonly ErpPartDapperRepository _erpdapperRepository;
private readonly IBlobContainer<MyFileContainer> _fileContainer;
private readonly OutputService _outputService;
private readonly InputService _inputService;

334
code/src/Modules/SettleAccount/src/SettleAccount.Job/SettleAccountJobModule.cs

@ -81,187 +81,187 @@ namespace Win.Sfs.SettleAccount
}
}; return accesor;
});
context.Services.AddTransient(implementationFactory =>
{
Func<string, IExportJob> accesor = key =>
{
if (key.Equals(typeof(PubSaSeCompareExportService).FullName))
{
return implementationFactory.GetService<PubSaSeCompareExportService>();
}
if (key.Equals(typeof(JisBBACEdiSeCompareExportService).FullName))
{
return implementationFactory.GetService<JisBBACEdiSeCompareExportService>();
}
if (key.Equals(typeof(JisHBPOEdiSeCompareExportService).FullName))
{
return implementationFactory.GetService<JisHBPOEdiSeCompareExportService>();
}
if (key.Equals(typeof(PD_SERVICE).FullName))
{
return implementationFactory.GetService<PD_SERVICE>();
}
//context.Services.AddTransient(implementationFactory =>
//{
// Func<string, IExportJob> accesor = key =>
// {
// if (key.Equals(typeof(PubSaSeCompareExportService).FullName))
// {
// return implementationFactory.GetService<PubSaSeCompareExportService>();
// }
// if (key.Equals(typeof(JisBBACEdiSeCompareExportService).FullName))
// {
// return implementationFactory.GetService<JisBBACEdiSeCompareExportService>();
// }
// if (key.Equals(typeof(JisHBPOEdiSeCompareExportService).FullName))
// {
// return implementationFactory.GetService<JisHBPOEdiSeCompareExportService>();
// }
// if (key.Equals(typeof(PD_SERVICE).FullName))
// {
// return implementationFactory.GetService<PD_SERVICE>();
// }
if (key.Equals(typeof(InvoiceSettledDiffExportService).FullName))
{
return implementationFactory.GetService<InvoiceSettledDiffExportService>();
}
if (key.Equals(typeof(UnSettledExportService).FullName))
{
return implementationFactory.GetService<UnSettledExportService>();
}
if (key.Equals(typeof(fisUnsettledDiffReport).FullName))
{//ERP总成开票报表
return implementationFactory.GetService<fisUnsettledDiffReport>();
}
if (key.Equals(typeof(PriceQtyDifferenceExportService).FullName))
{//量差和价差分析报表
return implementationFactory.GetService<PriceQtyDifferenceExportService>();
}
if (key.Equals(typeof(SettledPartAndErpPartPriceDiffExportService).FullName))
{
return implementationFactory.GetService<SettledPartAndErpPartPriceDiffExportService>();
}
if (key.Equals(typeof(SecMatchBaseExportService).FullName))
{
return implementationFactory.GetService<SecMatchBaseExportService>();
}
// if (key.Equals(typeof(InvoiceSettledDiffExportService).FullName))
// {
// return implementationFactory.GetService<InvoiceSettledDiffExportService>();
// }
// if (key.Equals(typeof(UnSettledExportService).FullName))
// {
// return implementationFactory.GetService<UnSettledExportService>();
// }
// if (key.Equals(typeof(fisUnsettledDiffReport).FullName))
// {//ERP总成开票报表
// return implementationFactory.GetService<fisUnsettledDiffReport>();
// }
// if (key.Equals(typeof(PriceQtyDifferenceExportService).FullName))
// {//量差和价差分析报表
// return implementationFactory.GetService<PriceQtyDifferenceExportService>();
// }
// if (key.Equals(typeof(SettledPartAndErpPartPriceDiffExportService).FullName))
// {
// return implementationFactory.GetService<SettledPartAndErpPartPriceDiffExportService>();
// }
// if (key.Equals(typeof(SecMatchBaseExportService).FullName))
// {
// return implementationFactory.GetService<SecMatchBaseExportService>();
// }
if (key.Equals(typeof(SettleFisDiffExportService).FullName))
{
return implementationFactory.GetService<SettleFisDiffExportService>();
}
// if (key.Equals(typeof(SettleFisDiffExportService).FullName))
// {
// return implementationFactory.GetService<SettleFisDiffExportService>();
// }
//大众看板结算与交货核对明细表(有条码)
if (key.Equals(typeof(SettleKBWithCodeExportService).FullName))
{
return implementationFactory.GetService<SettleKBWithCodeExportService>();
}
//大众备件结算核对明细表
if (key.Equals(typeof(SettleSparePartExportService).FullName))
{
return implementationFactory.GetService<SettleSparePartExportService>();
}
//大众备件未结明细
if (key.Equals(typeof(SettleUnSparePartExportService).FullName))
{
return implementationFactory.GetService<SettleUnSparePartExportService>();
}
//大众备件90天核对明细
if (key.Equals(typeof(SettleSparePart90ExportService).FullName))
{
return implementationFactory.GetService<SettleSparePart90ExportService>();
}
if (key.Equals(typeof(InvoiceSettledDetailDiffExportService).FullName))
{
return implementationFactory.GetService<InvoiceSettledDetailDiffExportService>();
}
if (key.Equals(typeof(UnInvoiceSettledDetailDiffExportService).FullName))
{
return implementationFactory.GetService<UnInvoiceSettledDetailDiffExportService>();
}
if (key.Equals(typeof(UnSettleDiffExportService).FullName))
{
return implementationFactory.GetService<UnSettleDiffExportService>();
}
// //大众看板结算与交货核对明细表(有条码)
// if (key.Equals(typeof(SettleKBWithCodeExportService).FullName))
// {
// return implementationFactory.GetService<SettleKBWithCodeExportService>();
// }
// //大众备件结算核对明细表
// if (key.Equals(typeof(SettleSparePartExportService).FullName))
// {
// return implementationFactory.GetService<SettleSparePartExportService>();
// }
// //大众备件未结明细
// if (key.Equals(typeof(SettleUnSparePartExportService).FullName))
// {
// return implementationFactory.GetService<SettleUnSparePartExportService>();
// }
// //大众备件90天核对明细
// if (key.Equals(typeof(SettleSparePart90ExportService).FullName))
// {
// return implementationFactory.GetService<SettleSparePart90ExportService>();
// }
// if (key.Equals(typeof(InvoiceSettledDetailDiffExportService).FullName))
// {
// return implementationFactory.GetService<InvoiceSettledDetailDiffExportService>();
// }
// if (key.Equals(typeof(UnInvoiceSettledDetailDiffExportService).FullName))
// {
// return implementationFactory.GetService<UnInvoiceSettledDetailDiffExportService>();
// }
// if (key.Equals(typeof(UnSettleDiffExportService).FullName))
// {
// return implementationFactory.GetService<UnSettleDiffExportService>();
// }
if (key.Equals(typeof(SettleDoorPanelExportService).FullName))
{
return implementationFactory.GetService<SettleDoorPanelExportService>();
}
if (key.Equals(typeof(UnsettledDetailReportService).FullName))
{
return implementationFactory.GetService<UnsettledDetailReportService>();
}
if (key.Equals(typeof(SettleKBWithOutCodeExportService).FullName))
{
return implementationFactory.GetService<SettleKBWithOutCodeExportService>();
}
if (key.Equals(typeof(SharePartUnSettledExport).FullName))
{
return implementationFactory.GetService<SharePartUnSettledExport>();
}
//红旗、一汽轿车结算报表
if (key.Equals(typeof(HQFSettledDetailDiffExportService).FullName))
{
return implementationFactory.GetService<HQFSettledDetailDiffExportService>();
}
if (key.Equals(typeof(HQFSharePartSettledDetailDiffExportService).FullName))
{
return implementationFactory.GetService<HQFSharePartSettledDetailDiffExportService>();
}
if (key.Equals(typeof(HQMSettledDetailDiffExportService).FullName))
{
return implementationFactory.GetService<HQMSettledDetailDiffExportService>();
}
if (key.Equals(typeof(HQMSharePartSettledDetailDiffExportService).FullName))
{
return implementationFactory.GetService<HQMSharePartSettledDetailDiffExportService>();
}
if (key.Equals(typeof(HQHSettledDetailDiffExportService).FullName))
{
return implementationFactory.GetService<HQHSettledDetailDiffExportService>();
}
//红旗结算未结明细
if (key.Equals(typeof(HQHUnSettledDetailDiffExportService).FullName))
{
return implementationFactory.GetService<HQHUnSettledDetailDiffExportService>();
}
//红旗未结核对
if (key.Equals(typeof(HQFactoryUnSettledDetailDiffExportService).FullName))
{
return implementationFactory.GetService<HQFactoryUnSettledDetailDiffExportService>();
}
if (key.Equals(typeof(HQHSharePartSettledDetailDiffExportService).FullName))
{
return implementationFactory.GetService<HQHSharePartSettledDetailDiffExportService>();
}
//红旗、轿车发运报表
if (key.Equals(typeof(HQMShippingExportService).FullName))
{
return implementationFactory.GetService<HQMShippingExportService>();
}
if (key.Equals(typeof(HQHShippingExportService).FullName))
{
return implementationFactory.GetService<HQHShippingExportService>();
}
if (key.Equals(typeof(HQFShippingExportService).FullName))
{
return implementationFactory.GetService<HQFShippingExportService>();
}
if (key.Equals(typeof(WmsOutputSumExportService).FullName))
{
return implementationFactory.GetService<WmsOutputSumExportService>();
}
//大众看板未结输出
if (key.Equals(typeof(KanBanUnSettledExport).FullName))
{
return implementationFactory.GetService<KanBanUnSettledExport>();
}
if (key.Equals(typeof(FisUpdateExportService).FullName))
{
return implementationFactory.GetService<FisUpdateExportService>();
}
if (key.Equals(typeof(FisOutputService).FullName))
{
return implementationFactory.GetService<FisOutputService>();
}
// if (key.Equals(typeof(SettleDoorPanelExportService).FullName))
// {
// return implementationFactory.GetService<SettleDoorPanelExportService>();
// }
// if (key.Equals(typeof(UnsettledDetailReportService).FullName))
// {
// return implementationFactory.GetService<UnsettledDetailReportService>();
// }
// if (key.Equals(typeof(SettleKBWithOutCodeExportService).FullName))
// {
// return implementationFactory.GetService<SettleKBWithOutCodeExportService>();
// }
// if (key.Equals(typeof(SharePartUnSettledExport).FullName))
// {
// return implementationFactory.GetService<SharePartUnSettledExport>();
// }
// //红旗、一汽轿车结算报表
// if (key.Equals(typeof(HQFSettledDetailDiffExportService).FullName))
// {
// return implementationFactory.GetService<HQFSettledDetailDiffExportService>();
// }
// if (key.Equals(typeof(HQFSharePartSettledDetailDiffExportService).FullName))
// {
// return implementationFactory.GetService<HQFSharePartSettledDetailDiffExportService>();
// }
// if (key.Equals(typeof(HQMSettledDetailDiffExportService).FullName))
// {
// return implementationFactory.GetService<HQMSettledDetailDiffExportService>();
// }
// if (key.Equals(typeof(HQMSharePartSettledDetailDiffExportService).FullName))
// {
// return implementationFactory.GetService<HQMSharePartSettledDetailDiffExportService>();
// }
// if (key.Equals(typeof(HQHSettledDetailDiffExportService).FullName))
// {
// return implementationFactory.GetService<HQHSettledDetailDiffExportService>();
// }
// //红旗结算未结明细
// if (key.Equals(typeof(HQHUnSettledDetailDiffExportService).FullName))
// {
// return implementationFactory.GetService<HQHUnSettledDetailDiffExportService>();
// }
// //红旗未结核对
// if (key.Equals(typeof(HQFactoryUnSettledDetailDiffExportService).FullName))
// {
// return implementationFactory.GetService<HQFactoryUnSettledDetailDiffExportService>();
// }
// if (key.Equals(typeof(HQHSharePartSettledDetailDiffExportService).FullName))
// {
// return implementationFactory.GetService<HQHSharePartSettledDetailDiffExportService>();
// }
// //红旗、轿车发运报表
// if (key.Equals(typeof(HQMShippingExportService).FullName))
// {
// return implementationFactory.GetService<HQMShippingExportService>();
// }
// if (key.Equals(typeof(HQHShippingExportService).FullName))
// {
// return implementationFactory.GetService<HQHShippingExportService>();
// }
// if (key.Equals(typeof(HQFShippingExportService).FullName))
// {
// return implementationFactory.GetService<HQFShippingExportService>();
// }
// if (key.Equals(typeof(WmsOutputSumExportService).FullName))
// {
// return implementationFactory.GetService<WmsOutputSumExportService>();
// }
// //大众看板未结输出
// if (key.Equals(typeof(KanBanUnSettledExport).FullName))
// {
// return implementationFactory.GetService<KanBanUnSettledExport>();
// }
// if (key.Equals(typeof(FisUpdateExportService).FullName))
// {
// return implementationFactory.GetService<FisUpdateExportService>();
// }
// if (key.Equals(typeof(FisOutputService).FullName))
// {
// return implementationFactory.GetService<FisOutputService>();
// }
else
{
throw new ArgumentException($"Not Support key:{key}");
}
// else
// {
// throw new ArgumentException($"Not Support key:{key}");
// }
}; return accesor;
});
// }; return accesor;
//});
Configure<AbpBlobStoringOptions>(options =>

Loading…
Cancel
Save