From ea9bdf217e8202a5fa475262dba1792decb05bcb Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期五, 13 九月 2024 15:36:00 +0800
Subject: [PATCH] 1
---
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/8d854c1d-3953-4118-905c-6e5e5a843136.vsidx | 0
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_DictionaryService.cs | 3
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/MaterielInfoService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_MenuService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs | 26 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs | 40 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/StockQuantityChangeRecordService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WIDESEA_TaskInfoService.csproj | 3
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3dfde05d-a5a2-4fcc-8f16-01b7d188fff6.vsidx | 0
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IWarehouseRepository.cs | 3
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_RoleAuthService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderDetailService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderService.cs | 3
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs | 204 ++++++++
代码管理/WMS/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue | 9
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs | 14
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs | 5
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder.cs | 8
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs | 6
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_RoleService.cs | 4
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Record/Dt_LocationStatusChangeRecord.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs | 39 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_DictionaryListService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs | 8
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_TenantService.cs | 3
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs | 3
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d8e0fc94-3eb1-4d2c-ac54-1343a3bbf1a6.vsidx | 0
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs | 12
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoRepository/ITaskRepository.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielInfoService.cs | 3
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/IService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/WIDESEA_OutboundService.csproj | 1
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IRecordService/IStockQuantityChangeRecordService.cs | 3
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/RoadwayInfoService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/LocationStatusChangeRecordSetvice.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IAreaInfoRepository.cs | 8
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IRecordService/ILocationStatusChangeRecordSetvice.cs | 3
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_MenuService.cs | 3
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs | 3
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_RoleAuthService.cs | 2
代码管理/WMS/WIDESEA_WMSClient/src/api/http.js | 2
代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue | 92 +++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IRoadwayInfoService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/AreaInfoService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ILocationInfoRepository.cs | 28 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryListService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs | 5
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_TenantService.cs | 3
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs | 131 ++++-
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs | 3
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs | 229 +++++++++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/SqlSugarAop.cs | 30
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IWarehouseService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_UserService.cs | 3
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs | 3
代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue | 17
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IAreaInfoService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoDetailService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 291 ------------
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoDetailService.cs | 3
/dev/null | 0
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderDetailService.cs | 9
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderDetailController.cs | 12
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderDetailService.cs | 3
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_RoleService.cs | 3
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_UserService.cs | 3
代码管理/WMS/WIDESEA_WMSClient/src/views/outbound/outboundOrderDetail.vue | 7
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs | 6
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/WarehouseService.cs | 2
73 files changed, 969 insertions(+), 377 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/api/http.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/api/http.js"
index b885aed..bd86d8b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/api/http.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/api/http.js"
@@ -19,7 +19,7 @@
}
else if (process.env.NODE_ENV == 'production') {
- axios.defaults.baseURL = 'http://127.0.0.1:8098/';
+ axios.defaults.baseURL = 'http://115.159.85.185:9291/';
}
if (!axios.defaults.baseURL.endsWith('/')) {
axios.defaults.baseURL+="/";
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue"
index 39cd9fe..16c7215 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue"
@@ -78,8 +78,12 @@
</el-table>
</div>
<template #footer>
- <el-button type="primary" size="small" @click="outbound">鐩存帴鍑哄簱</el-button>
- <el-button type="primary" size="small" @click="lockStock">閿佸畾搴撳瓨</el-button>
+ <el-button type="primary" size="small" @click="outbound"
+ >鐩存帴鍑哄簱</el-button
+ >
+ <el-button type="primary" size="small" @click="lockStock"
+ >閿佸畾搴撳瓨</el-button
+ >
<el-button type="danger" size="small" @click="showDetialBox = false"
>鍏抽棴</el-button
>
@@ -140,6 +144,13 @@
this.originalQuantity = this.row.lockQuantity;
this.selectionSum = this.row.lockQuantity;
this.getData();
+ if (this.selectionSum == this.row.orderQuantity) {
+ this.selectionClass = "equle-style";
+ } else if (this.selectionSum < this.row.orderQuantity) {
+ this.selectionClass = "less-style";
+ } else {
+ this.selectionClass = "more-style";
+ }
},
lockStock() {
this.http
@@ -157,7 +168,7 @@
});
});
},
- outbound(){
+ outbound() {
this.http
.post(
"api/Task/GenerateOutboundTask?id=" + this.row.id,
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue"
index b47fd63..da17d3b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue"
@@ -8,15 +8,36 @@
title="鍗曟嵁鏄庣粏淇℃伅"
>
<div class="box-head">
- <!-- <el-row>
- <el-col :span="24">
- <span>宸查�変腑 {{ true ? 1 : 0 }} 椤�</span>
- <el-divider direction="vertical"></el-divider>
- <el-button type="text" size="medium"
- ><i class="el-icon-edit">鍏抽棴</i
- ></el-button>
- </el-col>
- </el-row> -->
+ <el-alert :closable="false" style="width: 100%">
+ <el-row>
+ <el-col :span="16">
+ <span>宸查�変腑 {{ selection.length }} 椤�</span>
+ </el-col>
+ <el-col :span="8">
+ <el-link
+ type="primary"
+ size="small"
+ style="float: right; height: 20px"
+ @click="lockstocks"
+ >閿佸畾搴撳瓨</el-link
+ >
+ <el-link
+ type="primary"
+ size="small"
+ style="float: right; height: 20px; margin-right: 10px"
+ @click="outbound"
+ >鐩存帴鍑哄簱</el-link
+ >
+ <el-link
+ type="primary"
+ size="small"
+ style="float: right; height: 20px; margin-right: 10px"
+ @click="getData"
+ >鍒锋柊</el-link
+ ></el-col
+ >
+ </el-row>
+ </el-alert>
</div>
<div class="box-table" style="margin-top: 1%">
<el-table
@@ -26,7 +47,10 @@
highlight-current-row
@current-change="handleCurrentChange"
height="500px"
+ @row-click="handleRowClick"
+ @selection-change="handleSelectionChange"
>
+ <el-table-column type="selection" width="55"> </el-table-column>
<el-table-column
label="搴忓彿"
type="index"
@@ -79,6 +103,7 @@
showDetialBox: false,
flag: false,
currentRow: null,
+ selection: [],
tableData: [],
tableColumns: [
{
@@ -247,12 +272,43 @@
tableButtonClick(row, column) {
if (column.prop == "assignStock") {
this.$refs.child.open(row);
- }else{
+ } else {
this.$refs.selectedStock.open(row);
}
},
- assignStock() {},
- viewDetail() {},
+ lockstocks() {
+ if (this.selection.length === 0) {
+ return this.$message.error("璇烽�夋嫨鍗曟嵁鏄庣粏");
+ }
+ var keys = this.selection.map((item) => item.id); // 鑾峰彇閫変腑琛岀殑id
+ this.http
+ .post("api/OutboundOrderDetail/LockOutboundStocks", keys, "鏁版嵁澶勭悊涓�")
+ .then((x) => {
+ if (!x.status) return this.$message.error(x.message);
+ this.$message.success("鎿嶄綔鎴愬姛");
+ this.showDetialBox = false;
+ this.$emit("parentCall", ($vue) => {
+ $vue.getData();
+ });
+ });
+ },
+ outbound() {
+ if (this.selection.length === 0) {
+ return this.$message.error("璇烽�夋嫨鍗曟嵁鏄庣粏");
+ }
+ var keys = this.selection.map((item) => item.id); // 鑾峰彇閫変腑琛岀殑id
+
+ this.http
+ .post("api/Task/GenerateOutboundTasks", keys, "鏁版嵁澶勭悊涓�")
+ .then((x) => {
+ if (!x.status) return this.$message.error(x.message);
+ this.$message.success("鎿嶄綔鎴愬姛");
+ this.showDetialBox = false;
+ this.$emit("parentCall", ($vue) => {
+ $vue.getData();
+ });
+ });
+ },
setCurrent(row) {
this.$refs.singleTable.setCurrentRow(row);
},
@@ -261,7 +317,11 @@
},
getButtonEnable(propName, row) {
if (propName == "assignStock") {
- if (row.orderDetailStatus !== 0 && row.orderDetailStatus !== 60 && row.orderDetailStatus !== 70) {
+ if (
+ row.orderDetailStatus !== 0 &&
+ row.orderDetailStatus !== 60 &&
+ row.orderDetailStatus !== 70
+ ) {
return true;
} else {
return false;
@@ -275,6 +335,12 @@
}
fun(this);
},
+ handleRowClick(row) {
+ this.$refs.singleTable.toggleRowSelection(row);
+ },
+ handleSelectionChange(val) {
+ this.selection = val;
+ },
},
};
</script>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
index 5712ece..0f7617f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/outboundOrder.vue"
@@ -29,6 +29,7 @@
const editFormFields = ref({
orderType: "",
upperOrderNo: "",
+ orderStatus: "",
remark: "",
});
const editFormOptions = ref([
@@ -47,6 +48,14 @@
type: "string",
},
{
+ title: "鍗曟嵁鐘舵��",
+ field: "orderStatus",
+ type: "select",
+ dataKey: "inboundState",
+ data: [],
+ readonly: true,
+ },
+ {
title: "澶囨敞",
field: "remark",
type: "textarea",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/outboundOrderDetail.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/outboundOrderDetail.vue"
index 1425acd..e992c4c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/outboundOrderDetail.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/outbound/outboundOrderDetail.vue"
@@ -104,7 +104,6 @@
width: 90,
hidden: true,
readonly: true,
- require: true,
align: "left",
},
{
@@ -121,8 +120,6 @@
type: "string",
width: 150,
align: "left",
- edit: { type: "string" },
- required: true,
},
{
field: "materielName",
@@ -137,8 +134,6 @@
type: "decimal",
width: 90,
align: "left",
- edit: { type: "string" },
- required: true,
},
{
field: "orderQuantity",
@@ -146,8 +141,6 @@
type: "string",
width: 90,
align: "left",
- edit: { type: "number" },
- required: true,
},
{
field: "lockQuantity",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3dfde05d-a5a2-4fcc-8f16-01b7d188fff6.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3dfde05d-a5a2-4fcc-8f16-01b7d188fff6.vsidx"
new file mode 100644
index 0000000..53f1235
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/3dfde05d-a5a2-4fcc-8f16-01b7d188fff6.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/8d854c1d-3953-4118-905c-6e5e5a843136.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/8d854c1d-3953-4118-905c-6e5e5a843136.vsidx"
new file mode 100644
index 0000000..8d99cd0
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/8d854c1d-3953-4118-905c-6e5e5a843136.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/8f68f6b2-80bb-4d2f-ab81-67151e8aeeb3.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/8f68f6b2-80bb-4d2f-ab81-67151e8aeeb3.vsidx"
deleted file mode 100644
index cffec00..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/8f68f6b2-80bb-4d2f-ab81-67151e8aeeb3.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/c25c0959-7ed5-454b-8c7e-6d209867e5c4.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/c25c0959-7ed5-454b-8c7e-6d209867e5c4.vsidx"
deleted file mode 100644
index aa489d6..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/c25c0959-7ed5-454b-8c7e-6d209867e5c4.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d8e0fc94-3eb1-4d2c-ac54-1343a3bbf1a6.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d8e0fc94-3eb1-4d2c-ac54-1343a3bbf1a6.vsidx"
new file mode 100644
index 0000000..0420c48
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/d8e0fc94-3eb1-4d2c-ac54-1343a3bbf1a6.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/f32a6908-78df-435f-ab6a-bcc81d7efe7e.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/f32a6908-78df-435f-ab6a-bcc81d7efe7e.vsidx"
deleted file mode 100644
index d81d3f3..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/f32a6908-78df-435f-ab6a-bcc81d7efe7e.vsidx"
+++ /dev/null
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/AreaInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/AreaInfoService.cs"
index 7f7f36f..a6aedaa 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/AreaInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/AreaInfoService.cs"
@@ -15,5 +15,7 @@
public AreaInfoService(IAreaInfoRepository BaseDal) : base(BaseDal)
{
}
+
+ public IAreaInfoRepository Repository => BaseDal;
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs"
index 81bd0f6..5b0b8d9 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs"
@@ -30,6 +30,8 @@
{ nameof(Dt_LocationInfo.Row), OrderByType.Asc },
};
+ public ILocationInfoRepository Repository => BaseDal;
+
public LocationInfoService(ILocationInfoRepository BaseDal, IAreaInfoRepository areaInfoRepository, IWarehouseRepository warehouseRepository, IRoadwayInfoRepository roadwayInfoRepository) : base(BaseDal)
{
_areaInfoRepository = areaInfoRepository;
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/MaterielInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/MaterielInfoService.cs"
index e55d9bf..fc08d5c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/MaterielInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/MaterielInfoService.cs"
@@ -16,6 +16,8 @@
{
}
+ public IMaterielInfoRepository Repository => BaseDal;
+
public bool ExsitMateriel(string materielCode)
{
return BaseDal.QueryFirst(x => x.MaterielCode == materielCode) != null;
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/RoadwayInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/RoadwayInfoService.cs"
index 72b53b8..98016c2 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/RoadwayInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/RoadwayInfoService.cs"
@@ -15,5 +15,7 @@
public RoadwayInfoService(IRoadwayInfoRepository BaseDal) : base(BaseDal)
{
}
+
+ public IRoadwayInfoRepository Repository => BaseDal;
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/WarehouseService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/WarehouseService.cs"
index 1606e4f..1923d9f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/WarehouseService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/WarehouseService.cs"
@@ -15,5 +15,7 @@
public WarehouseService(IWarehouseRepository BaseDal) : base(BaseDal)
{
}
+
+ public IWarehouseRepository Repository => BaseDal;
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/SqlSugarAop.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/SqlSugarAop.cs"
index 330bb8b..31f4763 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/SqlSugarAop.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/SqlSugarAop.cs"
@@ -46,21 +46,25 @@
SequenceAttirbute? sequenceAttirbute = propertyInfo.GetCustomAttribute<SequenceAttirbute>();
if (sequenceAttirbute != null)
{
- SqlSugarClient sugarClient = new SqlSugarClient(new ConnectionConfig
+ if (propertyInfo.GetValue(entityInfo.EntityValue)?.ObjToInt() <= 0)
{
- ConfigId = MainDb.CurrentDbConnId,
- ConnectionString = DBContext.GetMainConnectionDb().Connection,
- IsAutoCloseConnection = true,
- DbType = MainDb.DbType,
- });
- int count = sugarClient.Ado.GetScalar($"SELECT COUNT(*) FROM sys.sequences WHERE name = '{sequenceAttirbute.SequenceName}'").ObjToInt();
- if (count == 0)
- {
- string sql = $"CREATE SEQUENCE {sequenceAttirbute.SequenceName} AS [int] START WITH {sequenceAttirbute.StartWith} INCREMENT BY {sequenceAttirbute.Increment} MINVALUE {sequenceAttirbute.SeqMinValue} MAXVALUE {sequenceAttirbute.SeqMaxValue} {(sequenceAttirbute.IsCycle ? "CYCLE" : "")} CACHE";
- sugarClient.Ado.ExecuteCommand(sql);
+ SqlSugarClient sugarClient = new SqlSugarClient(new ConnectionConfig
+ {
+ ConfigId = MainDb.CurrentDbConnId,
+ ConnectionString = DBContext.GetMainConnectionDb().Connection,
+ IsAutoCloseConnection = true,
+ DbType = MainDb.DbType,
+ });
+ int count = sugarClient.Ado.GetScalar($"SELECT COUNT(*) FROM sys.sequences WHERE name = '{sequenceAttirbute.SequenceName}'").ObjToInt();
+ if (count == 0)
+ {
+ string sql = $"CREATE SEQUENCE {sequenceAttirbute.SequenceName} AS [int] START WITH {sequenceAttirbute.StartWith} INCREMENT BY {sequenceAttirbute.Increment} MINVALUE {sequenceAttirbute.SeqMinValue} MAXVALUE {sequenceAttirbute.SeqMaxValue} {(sequenceAttirbute.IsCycle ? "CYCLE" : "")} CACHE";
+ sugarClient.Ado.ExecuteCommand(sql);
+ }
+ int seq = sugarClient.Ado.GetScalar($"SELECT NEXT VALUE FOR {sequenceAttirbute.SequenceName}").ObjToInt();
+ propertyInfo.SetValue(entityInfo.EntityValue, seq, null);
}
- int seq = sugarClient.Ado.GetScalar($"SELECT NEXT VALUE FOR {sequenceAttirbute.SequenceName}").ObjToInt();
- propertyInfo.SetValue(entityInfo.EntityValue, seq, null);
+
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/IService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/IService.cs"
index 763acef..a5cb22c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/IService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/IService.cs"
@@ -8,7 +8,7 @@
namespace WIDESEA_Core.BaseServices
{
- public interface IService<TEntity> : IDependency where TEntity : class
+ public interface IService<TEntity> : IDependency where TEntity : class, new()
{
ISqlSugarClient Db { get; }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs"
index 707c213..610c767 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs"
@@ -59,7 +59,6 @@
return pageGridData;
}
-
protected string ValidatePageOptions(PageDataOptions options)
{
options = options ?? new PageDataOptions();
@@ -358,7 +357,7 @@
{
return WebResponseContent.Instance.Error("浼犲弬閿欒,鍙傛暟涓嶈兘涓虹┖");
}
- string validResult = typeof(TEntity).ValidateDicInEntity(saveModel.MainData, false, TProperties, list?.ToArray());
+ string validResult = typeof(TEntity).ValidateDicInEntity(saveModel.MainData, false, TProperties, list?.ToArray() ?? null);
if (!string.IsNullOrEmpty(validResult))
{
@@ -376,7 +375,7 @@
List<string> listCol = new List<string>();
foreach (var item in saveModel.MainData)
{
- PropertyInfo propertyInfo = typeof(TEntity).GetProperty(item.Key);
+ PropertyInfo? propertyInfo = typeof(TEntity).GetProperty(item.Key);
if (propertyInfo == null)
{
propertyInfo = typeof(TEntity).GetProperty(item.Key.FirstLetterToLower());
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs"
index 2683b7b..7bce347 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs"
@@ -146,7 +146,7 @@
/// <param name="removeNotContains">绉婚櫎涓嶅瓨鍦ㄥ瓧娈�</param>
/// <param name="removerKey">绉婚櫎涓婚敭</param>
/// <returns></returns>
- public static string ValidateDicInEntity(this Type typeinfo, Dictionary<string, object> dic, bool removerKey, PropertyInfo[] propertyInfo, string[] ignoreFields = null)
+ public static string ValidateDicInEntity(this Type typeinfo, Dictionary<string, object> dic, bool removerKey, PropertyInfo[] propertyInfo, string[]? ignoreFields = null)
{
if (dic == null || dic.Count == 0) { return "鍙傛暟鏃犳晥"; }
@@ -168,15 +168,23 @@
foreach (PropertyInfo property in propertyInfo)
{
- SugarColumn sugarColumn = property.GetCustomAttribute<SugarColumn>();
+ SugarColumn? sugarColumn = property.GetCustomAttribute<SugarColumn>();
if (sugarColumn == null)
+ {
+ Navigate? navigate = property.GetCustomAttribute<Navigate>();
+ if(navigate != null)
+ {
+ continue;
+ }
return "璇烽厤缃甋ugarColumn灞炴��";
+ }
+
//蹇界暐涓庝富閿殑瀛楁涓嶅仛楠岃瘉
if (property.Name == keyName.FirstLetterToUpper() || (ignoreFields != null && ignoreFields.Contains(property.Name)) || sugarColumn.IsOnlyIgnoreInsert || sugarColumn.IsOnlyIgnoreUpdate || sugarColumn.IsIgnore)
continue;
//涓嶅湪缂栬緫涓殑鍒楋紝鏄惁涔熻蹇呭~
- if (!dic.ContainsKey(property.Name.FirstLetterToLower()))
+ if (!dic.ContainsKey(property.Name.FirstLetterToLower()) /*&& !dic.ContainsKey(property.Name.FirstLetterToUpper())*/)
{
if (!sugarColumn.IsNullable)
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IAreaInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IAreaInfoRepository.cs"
index 021f418..fa93ee3 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IAreaInfoRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IAreaInfoRepository.cs"
@@ -10,8 +10,16 @@
{
public interface IAreaInfoRepository : IRepository<Dt_AreaInfo>
{
+ /// <summary>
+ /// 鍚敤鐨勫尯鍩熶富閿泦鍚�
+ /// </summary>
public List<int> EnableAreaIds { get; }
+ /// <summary>
+ /// 浠撳簱閲岄潰鍚姩鐨勫尯鍩熶富閿泦鍚�
+ /// </summary>
+ /// <param name="enableWarehouseIds">浠撳簱涓婚敭闆嗗悎</param>
+ /// <returns></returns>
List<int> GetEnableAreaIds(List<int> enableWarehouseIds);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ILocationInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ILocationInfoRepository.cs"
index 922a94a..f3b6d7b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ILocationInfoRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ILocationInfoRepository.cs"
@@ -12,14 +12,42 @@
{
public interface ILocationInfoRepository : IRepository<Dt_LocationInfo>
{
+ /// <summary>
+ /// 鏍规嵁宸烽亾鑾峰彇鎵�鏈変竴娣便�佷簩娣卞搴旂殑涓�缁勮揣浣嶆暟鎹泦鍚�
+ /// </summary>
+ /// <param name="roadway">宸烽亾鍙�</param>
+ /// <returns></returns>
List<LocationGroupDTO> GetAllLocationGroups(string roadway);
+ /// <summary>
+ /// 鏍规嵁宸烽亾銆佷竴娣变綅璐т綅鐘舵�併�佷簩娣变綅璐т綅鐘舵�佽幏鍙栧搴旂殑涓�缁勮揣浣嶆暟鎹泦鍚�
+ /// </summary>
+ /// <param name="roadway">宸烽亾鍙�</param>
+ /// <param name="locationAStatus">涓�娣变綅璐т綅鐘舵��</param>
+ /// <param name="locationBStatus">浜屾繁浣嶈揣浣嶇姸鎬�</param>
+ /// <returns></returns>
List<LocationGroupDTO> GetLocationGroups(string roadway, LocationStatusEnum locationAStatus, LocationStatusEnum locationBStatus);
+ /// <summary>
+ /// 鏍规嵁宸烽亾鍙烽泦鍚堛�佸尯鍩熼泦鍚堣幏鍙栧彲鍑哄簱鐨勮揣浣嶇紪鍙烽泦鍚�
+ /// </summary>
+ /// <param name="roadways">宸烽亾鍙烽泦鍚�</param>
+ /// <param name="areaIds">鍖哄煙闆嗗悎</param>
+ /// <returns></returns>
List<string> GetCanOutLocationCodes(List<string> roadways, List<int> areaIds);
+ /// <summary>
+ /// 鏍规嵁璐т綅缂栧彿闆嗗悎鑾峰彇璐т綅瀹炰綋闆嗗悎
+ /// </summary>
+ /// <param name="locationCodes">璐т綅缂栧彿闆嗗悎</param>
+ /// <returns></returns>
List<Dt_LocationInfo> GetLocationInfos(List<string> locationCodes);
+ /// <summary>
+ /// 鎵归噺鏇存柊璐т綅鐘舵��
+ /// </summary>
+ /// <param name="locationInfos">璐т綅瀹炰綋闆嗗悎</param>
+ /// <param name="locationStatus">璐т綅鐘舵��</param>
void UpdateLocationStatus(List<Dt_LocationInfo> locationInfos, LocationStatusEnum locationStatus);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IWarehouseRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IWarehouseRepository.cs"
index 8b0391b..508ec8f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IWarehouseRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IWarehouseRepository.cs"
@@ -10,6 +10,9 @@
{
public interface IWarehouseRepository : IRepository<Dt_Warehouse>
{
+ /// <summary>
+ /// 鍚敤鐨勪粨搴撲富閿泦鍚�
+ /// </summary>
public List<int> EnableWarehouseIds { get; }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IAreaInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IAreaInfoService.cs"
index 594c049..b470d1b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IAreaInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IAreaInfoService.cs"
@@ -4,11 +4,13 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
+using WIDESEA_IBasicRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IBasicService
{
public interface IAreaInfoService : IService<Dt_AreaInfo>
{
+ IAreaInfoRepository Repository { get; }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs"
index aff94e6..d003d8c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs"
@@ -6,12 +6,15 @@
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_DTO.Basic;
+using WIDESEA_IBasicRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IBasicService
{
public interface ILocationInfoService : IService<Dt_LocationInfo>
{
+ ILocationInfoRepository Repository { get; }
+
WebResponseContent InitializationLocation(InitializationLocationDTO initializationLocationDTO);
Dt_LocationInfo AdjacentDepthLocation(string locationCode);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielInfoService.cs"
index c407cc8..709bdf7 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielInfoService.cs"
@@ -4,12 +4,15 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
+using WIDESEA_IBasicRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IBasicService
{
public interface IMaterielInfoService : IService<Dt_MaterielInfo>
{
+ IMaterielInfoRepository Repository { get; }
+
bool ExsitMateriel(string materielCode);
bool ExsitMateriels(List<string> materielCodes);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IRoadwayInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IRoadwayInfoService.cs"
index 5ae2a46..d68bef9 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IRoadwayInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IRoadwayInfoService.cs"
@@ -4,11 +4,13 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
+using WIDESEA_IBasicRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IBasicService
{
public interface IRoadwayInfoService : IService<Dt_RoadwayInfo>
{
+ IRoadwayInfoRepository Repository { get; }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IWarehouseService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IWarehouseService.cs"
index a5fdcac..79d4145 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IWarehouseService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IWarehouseService.cs"
@@ -4,11 +4,13 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
+using WIDESEA_IBasicRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IBasicService
{
public interface IWarehouseService : IService<Dt_Warehouse>
{
+ IWarehouseRepository Repository { get; }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderDetailService.cs"
index 928f6a2..e25fd55 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderDetailService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderDetailService.cs"
@@ -4,12 +4,15 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
+using WIDESEA_IInboundRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IInboundService
{
public interface IInboundOrderDetailService : IService<Dt_InboundOrderDetail>
{
+ IInboundOrderDetailRepository Repository { get; }
+
List<Dt_InboundOrderDetail> UpdateReceiptQuantity(List<Dt_InboundOrderDetail> inboundOrderDetails, decimal receiptQuantity);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs"
index f3715ed..e27698e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs"
@@ -6,12 +6,15 @@
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_DTO.Inbound;
+using WIDESEA_IInboundRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IInboundService
{
public interface IInboundOrderService : IService<Dt_InboundOrder>
{
+ IInboundOrderRepository Repository { get; }
+
WebResponseContent AddInboundOrder(InboundOrderAddDTO orderAddDTO);
WebResponseContent MaterielGroup(MaterielGroupDTO materielGroupDTO);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs"
index ceca076..eac800f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutStockLockInfoService.cs"
@@ -4,14 +4,20 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
+using WIDESEA_Core.Enums;
+using WIDESEA_IOutboundRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IOutboundService
{
public interface IOutStockLockInfoService : IService<Dt_OutStockLockInfo>
{
+ IOutStockLockInfoRepository Repository { get; }
+
List<Dt_OutStockLockInfo> GetOutStockLockInfos(Dt_OutboundOrder outboundOrder, Dt_OutboundOrderDetail outboundOrderDetail, List<Dt_StockInfo> outStocks, int? taskNum = null);
List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId);
+
+ List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId, OutStockStatus outStockStatus);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderDetailService.cs"
index c88ae7b..c72e63f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderDetailService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderDetailService.cs"
@@ -8,19 +8,24 @@
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Enums;
using WIDESEA_DTO.Stock;
+using WIDESEA_IOutboundRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IOutboundService
{
public interface IOutboundOrderDetailService : IService<Dt_OutboundOrderDetail>
{
+ IOutboundOrderDetailRepository Repository { get; }
+
WebResponseContent LockOutboundStock(int orderDetailId);
- (List<Dt_StockInfo>, Dt_OutboundOrderDetail, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(int orderDetailId, List<StockSelectViewDTO> stockSelectViews);
+ (List<Dt_StockInfo>, Dt_OutboundOrderDetail, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(Dt_OutboundOrderDetail outboundOrderDetail, List<StockSelectViewDTO> stockSelectViews);
WebResponseContent LockOutboundStock(int orderDetailId, List<StockSelectViewDTO> stockSelectViews);
- WebResponseContent LockOutboundStockDataUpdate(List<Dt_StockInfo> stockInfos, Dt_OutboundOrderDetail outboundOrderDetail, List<Dt_OutStockLockInfo> outStockLockInfos, List<Dt_LocationInfo> locationInfos, LocationStatusEnum locationStatus = LocationStatusEnum.Lock);
+ WebResponseContent LockOutboundStock(int[] keys);
+
+ WebResponseContent LockOutboundStockDataUpdate(List<Dt_StockInfo> stockInfos, List<Dt_OutboundOrderDetail> outboundOrderDetails, List<Dt_OutStockLockInfo> outStockLockInfos, List<Dt_LocationInfo> locationInfos, LocationStatusEnum locationStatus = LocationStatusEnum.Lock, List<Dt_Task>? tasks = null);
WebResponseContent RevokeLockOutboundStock(int orderDetailId);
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderService.cs"
index 0725279..49aadf2 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundOrderService.cs"
@@ -6,12 +6,15 @@
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_DTO.Outbound;
+using WIDESEA_IOutboundRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IOutboundService
{
public interface IOutboundOrderService : IService<Dt_OutboundOrder>
{
+ IOutboundOrderRepository Repository { get; }
+
WebResponseContent AddOutboundOrder(OutboundOrderAddDTO orderAddDTO);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IRecordService/ILocationStatusChangeRecordSetvice.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IRecordService/ILocationStatusChangeRecordSetvice.cs"
index b53b873..1263804 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IRecordService/ILocationStatusChangeRecordSetvice.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IRecordService/ILocationStatusChangeRecordSetvice.cs"
@@ -4,12 +4,15 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
+using WIDESEA_IRecordRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IRecordService
{
public interface ILocationStatusChangeRecordSetvice : IService<Dt_LocationStatusChangeRecord>
{
+ ILocationStatusChangeRecordRepository Repository { get; }
+
void AddLocationStatusChangeRecord(Dt_LocationInfo locationInfo, int lastStatus, int changeType, string orderNo, int? taskNum);
void AddLocationStatusChangeRecord(List<Dt_LocationInfo> locationInfos, int newStatus, int changeType, string? orderNo, List<int>? taskNums);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IRecordService/IStockQuantityChangeRecordService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IRecordService/IStockQuantityChangeRecordService.cs"
index acd6952..8fca34b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IRecordService/IStockQuantityChangeRecordService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IRecordService/IStockQuantityChangeRecordService.cs"
@@ -5,12 +5,15 @@
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Enums;
+using WIDESEA_IRecordRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IRecordService
{
public interface IStockQuantityChangeRecordService : IService<Dt_StockQuantityChangeRecord>
{
+ IStockQuantityChangeRecordRepository Repository { get; }
+
void AddStockChangeRecord(Dt_StockInfo stockInfo, List<Dt_StockInfoDetail> stockInfoDetails, decimal beforeQuantity, decimal totalQuantity, StockChangeType changeType);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoDetailService.cs"
index cb23e74..af8d936 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoDetailService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoDetailService.cs"
@@ -4,12 +4,15 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
+using WIDESEA_IStockRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IStockService
{
public interface IStockInfoDetailService : IService<Dt_StockInfoDetail>
{
+ IStockInfoDetailRepository Repository { get; }
+
bool ExistSerialNumber(string SerialNumber);
bool ExistSerialNumbers(List<string> SerialNumbers);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs"
index c3ebddd..823df49 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockInfoService.cs"
@@ -5,12 +5,15 @@
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
using WIDESEA_DTO.Stock;
+using WIDESEA_IStockRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_IStockService
{
public interface IStockInfoService : IService<Dt_StockInfo>
{
+ IStockInfoRepository Repository { get; }
+
Dt_StockInfo? GetStockByPalletCode(string palletCode);
void AddMaterielGroup(Dt_StockInfo stockInfo);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_DictionaryListService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_DictionaryListService.cs"
index 4da7e8d..1299a5d 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_DictionaryListService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_DictionaryListService.cs"
@@ -4,11 +4,13 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
+using WIDESEA_ISystemRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_ISystemService
{
public interface ISys_DictionaryListService : IService<Sys_DictionaryList>
{
+ ISys_DictionaryListRepository Repository { get; }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_DictionaryService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_DictionaryService.cs"
index 1aeff18..4696d74 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_DictionaryService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_DictionaryService.cs"
@@ -5,12 +5,15 @@
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
using WIDESEA_DTO.System;
+using WIDESEA_ISystemRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_ISystemService
{
public interface ISys_DictionaryService : IService<Sys_Dictionary>
{
+ ISys_DictionaryRepository Repository { get; }
+
List<VueDictionaryDTO> GetVueDictionary(string[] dicNos);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_MenuService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_MenuService.cs"
index 3de860e..9bc3c84 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_MenuService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_MenuService.cs"
@@ -6,12 +6,15 @@
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_DTO.System;
+using WIDESEA_ISystemRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_ISystemService
{
public interface ISys_MenuService : IService<Sys_Menu>
{
+ ISys_MenuRepository Repository { get; }
+
object GetCurrentMenuActionList();
List<MenuDTO> GetUserMenuList(int roleId);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_RoleAuthService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_RoleAuthService.cs"
index f8248ce..43ead43 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_RoleAuthService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_RoleAuthService.cs"
@@ -4,11 +4,13 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseServices;
+using WIDESEA_ISystemRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_ISystemService
{
public interface ISys_RoleAuthService : IService<Sys_RoleAuth>
{
+ ISys_RoleAuthRepository Repository { get; }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_RoleService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_RoleService.cs"
index 4440aac..8fa588e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_RoleService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_RoleService.cs"
@@ -8,12 +8,16 @@
using WIDESEA_Core.BaseServices;
using WIDESEA_Model.Models;
using WIDESEA_Model.Models.System;
+using WIDESEA_ISystemRepository;
namespace WIDESEA_ISystemService
{
public interface ISys_RoleService : IService<Sys_Role>
{
+ ISys_RoleRepository Repository { get; }
+
List<RoleNodes> GetAllChildren(int roleId);
+
WebResponseContent GetCurrentTreePermission();
WebResponseContent GetUserTreePermission(int role_Id);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_TenantService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_TenantService.cs"
index 50bd4fb..2d3c3d1 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_TenantService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_TenantService.cs"
@@ -5,12 +5,15 @@
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
+using WIDESEA_ISystemRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_ISystemService
{
public interface ISys_TenantService : IService<Sys_Tenant>
{
+ ISys_TenantRepository Repository { get; }
+
WebResponseContent InitTenantInfo(string tenantName, int tenantType);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_UserService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_UserService.cs"
index d10b8f4..cc46628 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_UserService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ISystemService/ISys_UserService.cs"
@@ -6,6 +6,7 @@
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
+using WIDESEA_ISystemRepository;
using WIDESEA_Model;
using WIDESEA_Model.Models;
@@ -13,6 +14,8 @@
{
public interface ISys_UserService : IService<Sys_User>
{
+ ISys_UserRepository Repository { get; }
+
WebResponseContent Login(LoginInfo loginInfo);
WebResponseContent GetCurrentUserInfo();
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoRepository/ITaskRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoRepository/ITaskRepository.cs"
index 6e91bbb..62bca91 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoRepository/ITaskRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoRepository/ITaskRepository.cs"
@@ -27,6 +27,6 @@
{
public interface ITaskRepository : IRepository<Dt_Task>
{
-
+ int GetTaskNum(string sequenceName);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
index 97eeb7d..1d6a01e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs"
@@ -26,16 +26,21 @@
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Enums;
using WIDESEA_DTO.Stock;
+using WIDESEA_ITaskInfoRepository;
using WIDESEA_Model.Models;
namespace WIDESEA_ITaskInfoService
{
public interface ITaskService : IService<Dt_Task>
{
+ ITaskRepository Repository { get; }
+
WebResponseContent GenerateInboundTask(string stationCode, int taskType, string palletCode);
WebResponseContent TaskCompleted(int taskNum);
WebResponseContent GenerateOutboundTask(int orderDetailId, List<StockSelectViewDTO> stockSelectViews);
+
+ WebResponseContent GenerateOutboundTask(int[] keys);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderDetailService.cs"
index 3a90abe..81e799e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderDetailService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderDetailService.cs"
@@ -14,6 +14,8 @@
{
public class InboundOrderDetailService : ServiceBase<Dt_InboundOrderDetail, IInboundOrderDetailRepository>, IInboundOrderDetailService
{
+ public IInboundOrderDetailRepository Repository => BaseDal;
+
public InboundOrderDetailService(IInboundOrderDetailRepository BaseDal) : base(BaseDal)
{
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
index 0ad089b..58da11f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
@@ -32,6 +32,8 @@
private readonly IInboundOrderDetailService _inboundOrderDetailService;
private readonly IUnitOfWorkManage _unitOfWorkManage;
+ public IInboundOrderRepository Repository => BaseDal;
+
public InboundOrderService(IInboundOrderRepository BaseDal, IMapper mapper, IMaterielInfoService materielInfoService, IStockInfoDetailService stockDetailService, IStockInfoService stockInfoService, ITaskRepository taskRepository, IInboundOrderDetailService inboundOrderDetailService, IUnitOfWorkManage unitOfWorkManage) : base(BaseDal)
{
_mapper = mapper;
@@ -43,6 +45,11 @@
_unitOfWorkManage = unitOfWorkManage;
}
+ /// <summary>
+ /// 娣诲姞鍗曟嵁
+ /// </summary>
+ /// <param name="saveModel"></param>
+ /// <returns></returns>
public override WebResponseContent AddData(SaveModel saveModel)
{
InboundOrderAddDTO orderAddDTO = saveModel.MainData.DicToModel<InboundOrderAddDTO>();
@@ -50,6 +57,11 @@
return AddInboundOrder(orderAddDTO);
}
+ /// <summary>
+ /// 娣诲姞鍗曟嵁
+ /// </summary>
+ /// <param name="orderAddDTO">鍗曟嵁娣诲姞DTO</param>
+ /// <returns></returns>
public WebResponseContent AddInboundOrder(InboundOrderAddDTO orderAddDTO)
{
WebResponseContent content = new();
@@ -76,6 +88,11 @@
return content;
}
+ /// <summary>
+ /// 楠岃瘉鍗曟嵁娣诲姞DTO瀵硅薄
+ /// </summary>
+ /// <param name="inboundOrderAddDTO">鍗曟嵁娣诲姞DTO</param>
+ /// <returns></returns>
private (bool, string, object?) CheckInboundOrderAddData(InboundOrderAddDTO inboundOrderAddDTO)
{
(bool, string, object?) result1 = ModelValidate.ValidateModelData(inboundOrderAddDTO);
@@ -103,6 +120,11 @@
return (true, "鎴愬姛", inboundOrderAddDTO);
}
+ /// <summary>
+ /// 鏍规嵁鍏ュ簱鍗曞彿鑾峰彇鍏ュ簱鍗�(鍚槑缁�)
+ /// </summary>
+ /// <param name="inboundOrderNo"></param>
+ /// <returns></returns>
public Dt_InboundOrder GetInboundOrder(string inboundOrderNo)
{
return BaseDal.Db.Queryable<Dt_InboundOrder>().Includes(x => x.Details).First(x => x.OrderNo == inboundOrderNo); ;
@@ -184,6 +206,13 @@
return content;
}
+ /// <summary>
+ /// 缁勭洏鏁版嵁鏇存柊
+ /// </summary>
+ /// <param name="inboundOrder">鍏ュ簱鍗�</param>
+ /// <param name="inboundOrderDetails">鍏ュ簱鍗曟槑缁�</param>
+ /// <param name="stockInfo">缁勭洏鏁版嵁</param>
+ /// <returns></returns>
public WebResponseContent MaterielGroupUpdateData(Dt_InboundOrder inboundOrder, List<Dt_InboundOrderDetail> inboundOrderDetails, Dt_StockInfo stockInfo)
{
try
@@ -202,6 +231,16 @@
}
}
+ /// <summary>
+ /// 楠岃瘉缁勭洏鏁版嵁
+ /// </summary>
+ /// <param name="materielGroupDTO">鐗╂枡缁勭洏DTO</param>
+ /// <param name="matSerialNumberDTOs">鎵爜搴忓垪鍙�</param>
+ /// <param name="materielInfos">鐗╂枡淇℃伅</param>
+ /// <param name="materielCodes">鐗╂枡缂栧彿</param>
+ /// <param name="inboundOrder">鍏ュ簱鍗曟嵁</param>
+ /// <param name="stockInfo">缁勭洏淇℃伅</param>
+ /// <returns></returns>
public (bool, string, object?) CheckMaterielGroupParam(MaterielGroupDTO materielGroupDTO, List<MatSerialNumberDTO> matSerialNumberDTOs, List<Dt_MaterielInfo> materielInfos, List<string> materielCodes, Dt_InboundOrder inboundOrder, Dt_StockInfo stockInfo)
{
(bool, string, object?) result = ModelValidate.ValidateModelData(materielGroupDTO);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder.cs"
index 3a879c5..2e0b0a1 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Outbound/Dt_OutboundOrder.cs"
@@ -16,19 +16,19 @@
public int Id { get; set; }
[CodeRule(WIDESEA_Core.Enums.RuleCode.OutboundOrderRule)]
- [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍗曟嵁缂栧彿")]
+ [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍗曟嵁缂栧彿", IsOnlyIgnoreUpdate = true)]
public string OrderNo { get; set; }
- [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "涓婃父鍗曟嵁缂栧彿")]
+ [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "涓婃父鍗曟嵁缂栧彿", IsOnlyIgnoreUpdate = true)]
public string UpperOrderNo { get; set; }
- [SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁绫诲瀷")]
+ [SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁绫诲瀷", IsOnlyIgnoreUpdate = true)]
public int OrderType { get; set; }
[SugarColumn(IsNullable = false, ColumnDescription = "鍗曟嵁鐘舵��")]
public int OrderStatus { get; set; }
- [SugarColumn(IsNullable = false, ColumnDescription = "鍒涘缓鏂瑰紡")]
+ [SugarColumn(IsNullable = false, ColumnDescription = "鍒涘缓鏂瑰紡", IsOnlyIgnoreUpdate = true)]
public int CreateType { get; set; }
[SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "澶囨敞")]
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Record/Dt_LocationStatusChangeRecord.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Record/Dt_LocationStatusChangeRecord.cs"
index 05e0899..6e040ac 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Record/Dt_LocationStatusChangeRecord.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Record/Dt_LocationStatusChangeRecord.cs"
@@ -9,7 +9,7 @@
namespace WIDESEA_Model.Models
{
[SugarTable(nameof(Dt_LocationStatusChangeRecord),"璐т綅鐘舵�佸彉鍔ㄨ褰�")]
- public class Dt_LocationStatusChangeRecord
+ public class Dt_LocationStatusChangeRecord : BaseEntity
{
[SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")]
public int Id { get; set; }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs"
index c00a308..663de64 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs"
@@ -109,6 +109,9 @@
[SugarColumn(IsNullable = false, ColumnDescription = "浼樺厛绾�")]
public int Grade { get; set; }
+ [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "婧愪富閿�")]
+ public int SourceKey { get; set; }
+
/// <summary>
/// 浠诲姟涓嬪彂鏃堕棿
/// </summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
index d8eefe1..bac59b1 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutStockLockInfoService.cs"
@@ -13,6 +13,8 @@
{
public class OutStockLockInfoService : ServiceBase<Dt_OutStockLockInfo, IOutStockLockInfoRepository>, IOutStockLockInfoService
{
+ public IOutStockLockInfoRepository Repository => BaseDal;
+
public OutStockLockInfoService(IOutStockLockInfoRepository BaseDal) : base(BaseDal)
{
}
@@ -44,10 +46,14 @@
return outStockLockInfos;
}
-
public List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId)
{
return BaseDal.QueryData(x => x.OrderDetailId == orderDetailId);
}
+
+ public List<Dt_OutStockLockInfo> GetByOrderDetailId(int orderDetailId, OutStockStatus outStockStatus)
+ {
+ return BaseDal.QueryData(x => x.OrderDetailId == orderDetailId && x.Status == outStockStatus.ObjToInt());
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs"
index 7fa06cc..1ff7cd0 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs"
@@ -12,8 +12,10 @@
using WIDESEA_Core.Helper;
using WIDESEA_DTO.Stock;
using WIDESEA_IBasicRepository;
+using WIDESEA_IBasicService;
using WIDESEA_IOutboundRepository;
using WIDESEA_IOutboundService;
+using WIDESEA_IRecordService;
using WIDESEA_IStockRepository;
using WIDESEA_IStockService;
using WIDESEA_Model.Models;
@@ -24,24 +26,24 @@
public class OutboundOrderDetailService : ServiceBase<Dt_OutboundOrderDetail, IOutboundOrderDetailRepository>, IOutboundOrderDetailService
{
private readonly IStockInfoService _stockInfoService;
- private readonly IStockInfoRepository _stockInfoRepository;
+ private readonly IStockInfoDetailService _stockInfoDetailService;
private readonly IOutStockLockInfoService _outStockLockInfoService;
- private readonly IOutboundOrderRepository _outboundOrderRepository;
- private readonly IStockInfoDetailRepository _stockInfoDetailRepository;
- private readonly IOutStockLockInfoRepository _outStockLockInfoRepository;
- private readonly ILocationInfoRepository _locationInfoRepository;
private readonly IUnitOfWorkManage _unitOfWorkManage;
+ private readonly ILocationStatusChangeRecordSetvice _locationStatusChangeRecordSetvice;
+ private readonly IOutboundOrderService _outboundOrderService;
+ private readonly ILocationInfoService _locationInfoService;
- public OutboundOrderDetailService(IOutboundOrderDetailRepository BaseDal, IStockInfoService stockInfoService, IStockInfoRepository stockInfoRepository, IOutStockLockInfoService outStockLockInfoService, IOutboundOrderRepository outboundOrderRepository, IStockInfoDetailRepository stockInfoDetailRepository, IOutStockLockInfoRepository outStockLockInfoRepository, ILocationInfoRepository locationInfoRepository, IUnitOfWorkManage unitOfWorkManage) : base(BaseDal)
+ public IOutboundOrderDetailRepository Repository => BaseDal;
+
+ public OutboundOrderDetailService(IOutboundOrderDetailRepository BaseDal, IStockInfoService stockInfoService, IOutStockLockInfoService outStockLockInfoService, IUnitOfWorkManage unitOfWorkManage, ILocationStatusChangeRecordSetvice locationStatusChangeRecordSetvice, IOutboundOrderService outboundOrderService, ILocationInfoService locationInfoService, IStockInfoDetailService stockInfoDetailService) : base(BaseDal)
{
_stockInfoService = stockInfoService;
- _stockInfoRepository = stockInfoRepository;
_outStockLockInfoService = outStockLockInfoService;
- _outboundOrderRepository = outboundOrderRepository;
- _stockInfoDetailRepository = stockInfoDetailRepository;
- _outStockLockInfoRepository = outStockLockInfoRepository;
- _locationInfoRepository = locationInfoRepository;
_unitOfWorkManage = unitOfWorkManage;
+ _locationStatusChangeRecordSetvice = locationStatusChangeRecordSetvice;
+ _outboundOrderService = outboundOrderService;
+ _locationInfoService = locationInfoService;
+ _stockInfoDetailService = stockInfoDetailService;
}
//
public WebResponseContent LockOutboundStock(int orderDetailId)
@@ -145,19 +147,26 @@
return (true, "鎴愬姛");
}
- public (List<Dt_StockInfo>, Dt_OutboundOrderDetail, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(int orderDetailId, List<StockSelectViewDTO> stockSelectViews)
+ public (List<Dt_StockInfo>, Dt_OutboundOrderDetail, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(Dt_OutboundOrderDetail outboundOrderDetail, List<StockSelectViewDTO> stockSelectViews)
{
- Dt_OutboundOrderDetail outboundOrderDetail = BaseDal.QueryFirst(x => x.Id == orderDetailId);
- (bool, string) result = CheckSelectStockDeital(outboundOrderDetail, stockSelectViews);
- if (!result.Item1) throw new Exception(result.Item2);
+ (bool, string) checkResult = CheckSelectStockDeital(outboundOrderDetail, stockSelectViews);
+ if (!checkResult.Item1) throw new Exception(checkResult.Item2);
- Dt_OutboundOrder outboundOrder = _outboundOrderRepository.QueryFirst(x => x.Id == outboundOrderDetail.OrderId);
+ Dt_OutboundOrder outboundOrder = _outboundOrderService.Repository.QueryFirst(x => x.Id == outboundOrderDetail.OrderId);
decimal originalNeedQuantity = outboundOrderDetail.OrderQuantity - outboundOrderDetail.LockQuantity;
decimal needQuantity = originalNeedQuantity;
- List<Dt_StockInfo> outStocks = _stockInfoRepository.GetStockInfosByPalletCodes(stockSelectViews.Select(x => x.PalletCode).ToList());
- decimal assignQuantity = stockSelectViews.Sum(x => x.UseableQuantity);
+ List<Dt_StockInfo> outStocks = _stockInfoService.Repository.GetStockInfosByPalletCodes(stockSelectViews.Select(x => x.PalletCode).ToList());
+ decimal assignQuantity = 0;
+ outStocks.ForEach(x =>
+ {
+ x.Details.ForEach(v =>
+ {
+ assignQuantity += v.StockQuantity - v.OutboundQuantity;
+ });
+ });
+
outboundOrderDetail.LockQuantity += assignQuantity;
outStocks.ForEach(x =>
{
@@ -183,7 +192,7 @@
List<Dt_OutStockLockInfo> outStockLockInfos = _outStockLockInfoService.GetOutStockLockInfos(outboundOrder, outboundOrderDetail, outStocks);
- List<Dt_LocationInfo> locationInfos = _locationInfoRepository.GetLocationInfos(outStocks.Select(x => x.LocationCode).ToList());
+ List<Dt_LocationInfo> locationInfos = _locationInfoService.Repository.GetLocationInfos(outStocks.Select(x => x.LocationCode).ToList());
return (outStocks, outboundOrderDetail, outStockLockInfos, locationInfos);
}
@@ -192,10 +201,14 @@
{
try
{
- (List<Dt_StockInfo>, Dt_OutboundOrderDetail, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = AssignStockOutbound(orderDetailId, stockSelectViews);
+ Dt_OutboundOrderDetail outboundOrderDetail = BaseDal.QueryFirst(x => x.Id == orderDetailId);
+ (bool, string) checkResult = CheckSelectStockDeital(outboundOrderDetail, stockSelectViews);
+ if (!checkResult.Item1) throw new Exception(checkResult.Item2);
+
+ (List<Dt_StockInfo>, Dt_OutboundOrderDetail, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = AssignStockOutbound(outboundOrderDetail, stockSelectViews);
_unitOfWorkManage.BeginTran();
- WebResponseContent content = LockOutboundStockDataUpdate(result.Item1, result.Item2, result.Item3, result.Item4);
+ WebResponseContent content = LockOutboundStockDataUpdate(result.Item1, new List<Dt_OutboundOrderDetail> { result.Item2 }, result.Item3, result.Item4);
if (content.Status)
{
_unitOfWorkManage.CommitTran();
@@ -213,26 +226,80 @@
}
}
- public WebResponseContent LockOutboundStockDataUpdate(List<Dt_StockInfo> stockInfos, Dt_OutboundOrderDetail outboundOrderDetail, List<Dt_OutStockLockInfo> outStockLockInfos, List<Dt_LocationInfo> locationInfos, LocationStatusEnum locationStatus = LocationStatusEnum.Lock)
+ public WebResponseContent LockOutboundStock(int[] keys)
{
try
{
- _stockInfoRepository.UpdateData(stockInfos);
+ List<StockSelectViewDTO> stockSelectViews = new List<StockSelectViewDTO>();
+ List<Dt_StockInfo> stockInfos = new List<Dt_StockInfo>();
+ List<Dt_OutboundOrderDetail> outboundOrderDetails = new List<Dt_OutboundOrderDetail>();
+ List<Dt_OutStockLockInfo> outStockLockInfos = new List<Dt_OutStockLockInfo>();
+ List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>();
+ foreach (var item in keys)
+ {
+ Dt_OutboundOrderDetail outboundOrderDetail = BaseDal.QueryFirst(x => x.Id == item);
+ (bool, string) checkResult = CheckSelectStockDeital(outboundOrderDetail, stockSelectViews);
+ if (!checkResult.Item1) throw new Exception(checkResult.Item2);
+
+ (List<Dt_StockInfo>, Dt_OutboundOrderDetail, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = AssignStockOutbound(outboundOrderDetail, stockSelectViews);
+ if (result.Item1.Count > 0)
+ {
+ stockInfos.AddRange(result.Item1);
+ outboundOrderDetails.Add(result.Item2);
+ outStockLockInfos.AddRange(result.Item3);
+ locationInfos.AddRange(result.Item4);
+ }
+ }
+
+ _unitOfWorkManage.BeginTran();
+ WebResponseContent content = LockOutboundStockDataUpdate(stockInfos, outboundOrderDetails, outStockLockInfos, locationInfos);
+ if (content.Status)
+ {
+ _unitOfWorkManage.CommitTran();
+ }
+ else
+ {
+ _unitOfWorkManage.RollbackTran();
+ }
+ return content;
+ }
+ catch (Exception ex)
+ {
+ _unitOfWorkManage.RollbackTran();
+ return WebResponseContent.Instance.Error(ex.Message);
+ }
+ }
+
+ public WebResponseContent LockOutboundStockDataUpdate(List<Dt_StockInfo> stockInfos, List<Dt_OutboundOrderDetail> outboundOrderDetails, List<Dt_OutStockLockInfo> outStockLockInfos, List<Dt_LocationInfo> locationInfos, LocationStatusEnum locationStatus = LocationStatusEnum.Lock, List<Dt_Task>? tasks = null)
+ {
+ try
+ {
+ _stockInfoService.Repository.UpdateData(stockInfos);
List<Dt_StockInfoDetail> stockInfoDetails = new List<Dt_StockInfoDetail>();
foreach (var item in stockInfos)
{
stockInfoDetails.AddRange(item.Details);
}
- _stockInfoDetailRepository.UpdateData(stockInfoDetails);
- BaseDal.UpdateData(outboundOrderDetail);
- _outStockLockInfoRepository.AddData(outStockLockInfos);
+ _stockInfoDetailService.Repository.UpdateData(stockInfoDetails);
+ BaseDal.UpdateData(outboundOrderDetails);
- _locationInfoRepository.UpdateLocationStatus(locationInfos, locationStatus);
+ List<Dt_OutStockLockInfo> addOutStockLockInfos = outStockLockInfos.Where(x => x.Id == 0).ToList();
+ if (addOutStockLockInfos != null && addOutStockLockInfos.Any())
+ {
+ _outStockLockInfoService.Repository.AddData(addOutStockLockInfos);
+ }
+ List<Dt_OutStockLockInfo> updateOutStockLockInfos = outStockLockInfos.Where(x => x.Id > 0).ToList();
+ if (updateOutStockLockInfos != null && updateOutStockLockInfos.Any())
+ {
+ _outStockLockInfoService.Repository.UpdateData(updateOutStockLockInfos);
+ }
+
+ _locationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfos, locationStatus.ObjToInt(), StockChangeType.Outbound.ObjToInt(), "", tasks?.Select(x => x.TaskNum).ToList());
+ _locationInfoService.Repository.UpdateLocationStatus(locationInfos, locationStatus);
return WebResponseContent.Instance.OK();
}
catch (Exception ex)
{
-
return WebResponseContent.Instance.Error(ex.Message);
}
}
@@ -260,10 +327,10 @@
(bool, string) result = CheckRevoke(outboundOrderDetail);
if (!result.Item1) return WebResponseContent.Instance.Error(result.Item2);
- List<Dt_OutStockLockInfo> outStockLockInfos = _outStockLockInfoService.GetByOrderDetailId(orderDetailId);
+ List<Dt_OutStockLockInfo> outStockLockInfos = _outStockLockInfoService.GetByOrderDetailId(orderDetailId, OutStockStatus.宸插垎閰�);
if (outStockLockInfos.Count > 0)
{
- List<Dt_StockInfo> stocks = _stockInfoRepository.GetStockInfosByPalletCodes(outStockLockInfos.Select(x => x.PalletCode).ToList());
+ List<Dt_StockInfo> stocks = _stockInfoService.Repository.GetStockInfosByPalletCodes(outStockLockInfos.Select(x => x.PalletCode).ToList());
if (stocks.Count > 0)
{
stocks.ForEach(x =>
@@ -282,9 +349,9 @@
x.Status = OutStockStatus.鎾ら攢.ObjToInt();
});
- List<Dt_LocationInfo> locationInfos = _locationInfoRepository.GetLocationInfos(stocks.Select(x => x.LocationCode).ToList());
+ List<Dt_LocationInfo> locationInfos = _locationInfoService.Repository.GetLocationInfos(stocks.Select(x => x.LocationCode).ToList());
- return LockOutboundStockDataUpdate(stocks, outboundOrderDetail, outStockLockInfos, locationInfos, LocationStatusEnum.InStock);
+ return LockOutboundStockDataUpdate(stocks, new List<Dt_OutboundOrderDetail> { outboundOrderDetail }, outStockLockInfos, locationInfos, LocationStatusEnum.InStock);
}
return WebResponseContent.Instance.Error("鏈壘鍒板簱瀛樹俊鎭�");
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs"
index 70b01da..3e529c7 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs"
@@ -1,4 +1,6 @@
锘縰sing AutoMapper;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -26,6 +28,8 @@
private readonly IStockInfoService _stockInfoService;
private readonly IStockInfoDetailService _stockDetailService;
+ public IOutboundOrderRepository Repository => BaseDal;
+
public OutboundOrderService(IOutboundOrderRepository BaseDal, IMapper mapper, IMaterielInfoService materielInfoService, IStockInfoDetailService stockDetailService, IStockInfoService stockInfoService) : base(BaseDal)
{
_mapper = mapper;
@@ -37,8 +41,38 @@
public override WebResponseContent AddData(SaveModel saveModel)
{
OutboundOrderAddDTO outboundOrder = saveModel.MainData.DicToModel<OutboundOrderAddDTO>();
- outboundOrder.Details = saveModel.DetailData.DicToIEnumerable<OutboundOrderDetailAddDTO>();
+ List<OutboundOrderDetailAddDTO> orderDetailAddDTOs = saveModel.DetailData.DicToIEnumerable<OutboundOrderDetailAddDTO>();
+ outboundOrder.Details = orderDetailAddDTOs.GroupBy(x => x.MaterielCode).Select(x => new OutboundOrderDetailAddDTO
+ {
+ BatchNo = x.FirstOrDefault()?.BatchNo ?? "",
+ MaterielCode = x.Key,
+ OrderQuantity = x.Sum(x => x.OrderQuantity),
+ Remark = x.FirstOrDefault(v => !string.IsNullOrEmpty(v.Remark))?.Remark ?? ""
+ }).ToList();
return AddOutboundOrder(outboundOrder);
+ }
+
+ public override WebResponseContent UpdateData(SaveModel saveModel)
+ {
+ List<Dt_OutboundOrderDetail> outboundOrderDetails = saveModel.DetailData.DicToIEnumerable<Dt_OutboundOrderDetail>();
+ if (outboundOrderDetails.GroupBy(x => x.MaterielCode).Select(x => x.Count()).Any(x => x > 1))
+ {
+ return WebResponseContent.Instance.Error("鐗╂枡閲嶅");
+ }
+ outboundOrderDetails = outboundOrderDetails.Where(x => (x.Id > 0 && x.OrderDetailStatus == OrderDetailStatusEnum.New.ObjToInt()) || x.Id == 0).ToList();
+
+ List<Dictionary<string, object>> dics = new List<Dictionary<string, object>>();
+ JsonSerializerSettings settings = new JsonSerializerSettings();
+ settings.ContractResolver = new CamelCasePropertyNamesContractResolver();
+ foreach (var item in outboundOrderDetails)
+ {
+ string str = JsonConvert.SerializeObject(item, settings);
+ Dictionary<string, object>? dic = JsonConvert.DeserializeObject<Dictionary<string, object>>(str);
+ if (dic != null)
+ dics.Add(dic);
+ }
+ saveModel.DetailData = dics;
+ return base.UpdateData(saveModel);
}
public WebResponseContent AddOutboundOrder(OutboundOrderAddDTO orderAddDTO)
@@ -101,13 +135,11 @@
{
}
- catch(Exception ex)
+ catch (Exception ex)
{
}
return content;
}
-
-
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/WIDESEA_OutboundService.csproj" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/WIDESEA_OutboundService.csproj"
index 003d1eb..b11d170 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/WIDESEA_OutboundService.csproj"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/WIDESEA_OutboundService.csproj"
@@ -9,6 +9,7 @@
<ItemGroup>
<ProjectReference Include="..\WIDESEA_IBasicService\WIDESEA_IBasicService.csproj" />
<ProjectReference Include="..\WIDESEA_IOutboundService\WIDESEA_IOutboundService.csproj" />
+ <ProjectReference Include="..\WIDESEA_IRecordService\WIDESEA_IRecordService.csproj" />
<ProjectReference Include="..\WIDESEA_IStockService\WIDESEA_IStockService.csproj" />
</ItemGroup>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/LocationStatusChangeRecordSetvice.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/LocationStatusChangeRecordSetvice.cs"
index 1d4fffd..a1d34b9 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/LocationStatusChangeRecordSetvice.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/LocationStatusChangeRecordSetvice.cs"
@@ -19,6 +19,8 @@
{
}
+ public ILocationStatusChangeRecordRepository Repository => BaseDal;
+
public void AddLocationStatusChangeRecord(Dt_LocationInfo locationInfo, int lastStatus, int changeType, string? orderNo, int? taskNum)
{
Dt_LocationStatusChangeRecord locationStatusChangeRecord = new Dt_LocationStatusChangeRecord()
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/StockQuantityChangeRecordService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/StockQuantityChangeRecordService.cs"
index 9b69481..8201fa2 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/StockQuantityChangeRecordService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/StockQuantityChangeRecordService.cs"
@@ -21,6 +21,8 @@
_mapper = mapper;
}
+ public IStockQuantityChangeRecordRepository Repository => BaseDal;
+
public void AddStockChangeRecord(Dt_StockInfo stockInfo, List<Dt_StockInfoDetail> stockInfoDetails, decimal beforeQuantity, decimal totalQuantity, StockChangeType changeType)
{
List<Dt_StockQuantityChangeRecord> stockQuantityChangeRecords = new List<Dt_StockQuantityChangeRecord>();
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoDetailService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoDetailService.cs"
index 49029ed..cb432c4 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoDetailService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoDetailService.cs"
@@ -16,6 +16,8 @@
{
}
+ public IStockInfoDetailRepository Repository => BaseDal;
+
public bool ExistSerialNumber(string SerialNumber)
{
return BaseDal.QueryFirst(x => x.SerialNumber == SerialNumber) != null;
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs"
index 102b6b7..df24206 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs"
@@ -30,6 +30,8 @@
private readonly IAreaInfoRepository _areaInfoRepository;
private readonly ILocationInfoRepository _locationInfoRepository;
+ public IStockInfoRepository Repository => BaseDal;
+
public StockInfoService(IStockInfoRepository BaseDal, IMapper mapper, IStockQuantityChangeRecordService stockQuantityChangeRecordService, IStockInfoDetailRepository stockInfoDetailRepository, IWarehouseRepository warehouseRepository, IRoadwayInfoRepository roadwayInfoRepository, IAreaInfoRepository areaInfoRepository, ILocationInfoRepository locationInfoRepository) : base(BaseDal)
{
_mapper = mapper;
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryListService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryListService.cs"
index 284014c..b69644f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryListService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryListService.cs"
@@ -15,5 +15,7 @@
public Sys_DictionaryListService(ISys_DictionaryListRepository BaseDal) : base(BaseDal)
{
}
+
+ public ISys_DictionaryListRepository Repository => BaseDal;
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs"
index 9e6fbdd..7ee22e0 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_DictionaryService.cs"
@@ -26,6 +26,8 @@
_unitOfWorkManage = unitOfWorkManage;
}
+ public ISys_DictionaryRepository Repository => BaseDal;
+
public List<VueDictionaryDTO> GetVueDictionary(string[] dicNos)
{
if (dicNos == null || dicNos.Count() == 0) return new List<VueDictionaryDTO>();
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_MenuService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_MenuService.cs"
index de5c9f2..327680c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_MenuService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_MenuService.cs"
@@ -21,6 +21,8 @@
{
private readonly IUnitOfWorkManage _unitOfWorkManage;
+ public ISys_MenuRepository Repository => BaseDal;
+
public Sys_MenuService(ISys_MenuRepository BaseDal, IUnitOfWorkManage unitOfWorkManage) : base(BaseDal)
{
_unitOfWorkManage = unitOfWorkManage;
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_RoleAuthService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_RoleAuthService.cs"
index 5c6b659..0ce0c7d 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_RoleAuthService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_RoleAuthService.cs"
@@ -15,5 +15,7 @@
public Sys_RoleAuthService(ISys_RoleAuthRepository BaseDal) : base(BaseDal)
{
}
+
+ public ISys_RoleAuthRepository Repository => BaseDal;
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_RoleService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_RoleService.cs"
index 0b29f9e..3372776 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_RoleService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_RoleService.cs"
@@ -24,6 +24,9 @@
private readonly ISys_MenuRepository _MenuRepository;
private readonly ISys_MenuService _MenuService;
private readonly ISys_RoleAuthRepository _RoleAuthRepository;
+
+ public ISys_RoleRepository Repository => BaseDal;
+
public Sys_RoleService(ISys_RoleRepository BaseDal, ISys_MenuRepository MenuRepository, ISys_MenuService MenuService, ISys_RoleAuthRepository roleAuthRepository, IUnitOfWorkManage unitOfWorkManage) : base(BaseDal)
{
_unitOfWorkManage = unitOfWorkManage;
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_TenantService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_TenantService.cs"
index 689d293..03e22c9 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_TenantService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_TenantService.cs"
@@ -20,6 +20,9 @@
public class Sys_TenantService : ServiceBase<Sys_Tenant, ISys_TenantRepository>, ISys_TenantService
{
private IUnitOfWorkManage _unitOfWorkManage;
+
+ public ISys_TenantRepository Repository => BaseDal;
+
public Sys_TenantService(ISys_TenantRepository BaseDal, IUnitOfWorkManage unitOfWorkManage) : base(BaseDal)
{
_unitOfWorkManage = unitOfWorkManage;
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_UserService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_UserService.cs"
index 167b1d1..ce2892d 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_UserService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_UserService.cs"
@@ -20,6 +20,9 @@
{
private readonly IUnitOfWorkManage _unitOfWorkManage;
private readonly ICacheService _cacheService;
+
+ public ISys_UserRepository Repository => BaseDal;
+
public Sys_UserService(ISys_UserRepository repository, IUnitOfWorkManage unitOfWorkManage, ICacheService cacheService) : base(repository)
{
_unitOfWorkManage = unitOfWorkManage;
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs"
index 8f9d98f..87598ea 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs"
@@ -20,7 +20,9 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using WIDESEA_Core.Attributes;
using WIDESEA_Core.BaseRepository;
+using WIDESEA_Core.Helper;
using WIDESEA_ITaskInfoRepository;
using WIDESEA_Model.Models;
@@ -32,5 +34,29 @@
{
}
+ public int GetTaskNum(string sequenceName)
+ {
+ return Db.Ado.GetScalar($"SELECT NEXT VALUE FOR {sequenceName}").ObjToInt();
+ }
+
+ public override int AddData(Dt_Task entity)
+ {
+ return base.AddData(entity);
+ }
+
+ public override int AddData(List<Dt_Task> listEntity)
+ {
+ if (listEntity.GroupBy(x => x.PalletCode).Select(x => x.Count()).Any(x => x > 1))
+ {
+ throw new Exception("浠诲姟鏁扮粍鏁版嵁鎵樼洏鍙烽噸澶�");
+ }
+
+ if (QueryFirst(x => listEntity.Select(v => v.PalletCode).Contains(x.PalletCode)) != null)
+ {
+ throw new Exception("鏈夐噸澶嶄换鍔�");
+ }
+
+ return base.AddData(listEntity);
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs"
new file mode 100644
index 0000000..d2c5191
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs"
@@ -0,0 +1,229 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.Enums;
+using WIDESEA_Core;
+using WIDESEA_Model.Models;
+using WIDESEA_Core.Helper;
+
+namespace WIDESEA_TaskInfoService
+{
+ public partial class TaskService
+ {
+ /// <summary>
+ /// PDA鐢宠鍏ュ簱--鍫嗗灈鏈虹珛搴撳叆搴�
+ /// </summary>
+ /// <param name="stationCode">璧峰鍦板潃</param>
+ /// <param name="taskType">浠诲姟绫诲瀷--鍏ョ┖锛屽叆鏂�</param>
+ /// <param name="palletCode">鎵樼洏缂栧彿</param>
+ /// <returns>杩斿洖澶勭悊缁撴灉</returns>
+ public WebResponseContent GenerateInboundTask(string stationCode, int taskType, string palletCode)
+ {
+ string? name = Enum.GetName(typeof(TaskTypeEnum), taskType);
+ MethodInfo? methodInfo = GetType().GetMethod(name + "Request");
+ if (methodInfo != null)
+ {
+ WebResponseContent? responseContent = (WebResponseContent?)methodInfo.Invoke(this, new object[] { stationCode, palletCode });
+ if (responseContent != null)
+ {
+ return responseContent;
+ }
+ }
+ else
+ {
+ return WebResponseContent.Instance.Error("鏈壘鍒拌浠诲姟绫诲瀷涓氬姟");
+ }
+ return WebResponseContent.Instance.Error("閿欒");
+ }
+
+ /// <summary>
+ /// 绌烘墭鐩樺叆搴�
+ /// </summary>
+ /// <param name="stationCode">璧峰鍦板潃</param>
+ /// <param name="palletCode">鎵樼洏缂栧彿</param>
+ /// <returns>杩斿洖澶勭悊缁撴灉</returns>
+ public WebResponseContent PalletInboundRequest(string stationCode, string palletCode)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ (bool, string) result = CheckRequestInbound(stationCode, palletCode, false);
+ if (!result.Item1) return content = WebResponseContent.Instance.Error(result.Item2);
+ content = AssignLocUpdateData(stationCode, TaskTypeEnum.PalletInbound.ObjToInt(), palletCode, false);
+ }
+ catch (Exception ex)
+ {
+ content = WebResponseContent.Instance.Error(ex.Message);
+ }
+ return content;
+ }
+
+ /// <summary>
+ /// 鐗╂枡鍏ュ簱
+ /// </summary>
+ /// <param name="stationCode">璧峰鍦板潃</param>
+ /// <param name="palletCode">鎵樼洏缂栧彿</param>
+ /// <returns>杩斿洖澶勭悊缁撴灉</returns>
+ public WebResponseContent InboundRequest(string stationCode, string palletCode)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ Dt_StockInfo stockInfo = _stockInfoService.Repository.GetStockInfo(palletCode);
+ (bool, string) result = CheckRequestInbound(stationCode, palletCode, true, stockInfo);
+ if (!result.Item1) return content = WebResponseContent.Instance.Error(result.Item2);
+ content = AssignLocUpdateData(stationCode, TaskTypeEnum.Inbound.ObjToInt(), palletCode, true, stockInfo);
+ }
+ catch (Exception ex)
+ {
+ content = WebResponseContent.Instance.Error(ex.Message);
+ }
+ return content;
+ }
+
+ /// <summary>
+ /// 鍏ュ簱鍒嗛厤璐т綅鍙婂鐞嗘暟鎹�
+ /// </summary>
+ /// <param name="stationCode">璧峰鍦板潃</param>
+ /// <param name="taskType">浠诲姟绫诲瀷</param>
+ /// <param name="palletCode">鎵樼洏缂栧彿</param>
+ /// <param name="isUpdateStock">鏄惁鏇存柊缁勭洏淇℃伅--鍖哄垎鐗╂枡鍏ュ簱鍜岀┖鎵樺叆搴�</param>
+ /// <param name="stockInfo">缁勭洏淇℃伅--鍙┖</param>
+ /// <param name="orderNo">璁㈠崟鍙�--鍙┖</param>
+ /// <returns>杩斿洖澶勭悊缁撴灉</returns>
+ private WebResponseContent AssignLocUpdateData(string stationCode, int taskType, string palletCode, bool isUpdateStock = true, Dt_StockInfo? stockInfo = null, string orderNo = "")
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ Dt_LocationInfo? locationInfo = _locationInfoService.AssignLocation(stationCode, taskType);
+ if (locationInfo != null)
+ {
+ Dt_Task task = new()
+ {
+ CurrentAddress = stationCode,
+ Grade = 0,
+ PalletCode = palletCode,
+ NextAddress = locationInfo.LocationCode,
+ Roadway = locationInfo.RoadwayNo,
+ SourceAddress = stationCode,
+ TargetAddress = locationInfo.LocationCode,
+ TaskStatus = InTaskStatusEnum.InNew.ObjToInt(),
+ TaskType = taskType,
+ };
+ BaseDal.AddData(task);
+ int beforeStatus = locationInfo.LocationStatus;
+
+ locationInfo.LocationStatus = LocationStatusEnum.PalletLock.ObjToInt();
+ if (isUpdateStock)
+ {
+ locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt();
+ if (stockInfo != null && stockInfo.Details != null && stockInfo.Details.Count > 0)
+ {
+ orderNo = stockInfo.Details.FirstOrDefault()?.OrderNo ?? "";
+
+ stockInfo.StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt();
+ _stockInfoService.Repository.UpdateData(stockInfo);
+ }
+ else
+ {
+ return content = WebResponseContent.Instance.Error("鏈壘鍒板簱瀛樹俊鎭�");
+ }
+ }
+ _locationInfoService.Repository.UpdateData(locationInfo);
+ _locationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), orderNo, task.TaskNum);
+
+ return content = WebResponseContent.Instance.OK();
+ }
+ return content = WebResponseContent.Instance.Error("鏈壘鍒板彲鍒嗛厤璐т綅");
+ }
+ catch (Exception ex)
+ {
+ content = WebResponseContent.Instance.Error(ex.Message);
+ }
+ return content;
+ }
+
+ /// <summary>
+ /// 楠岃瘉鏁版嵁
+ /// </summary>
+ /// <param name="stationCode">璧峰鍦板潃</param>
+ /// <param name="palletCode">鎵樼洏缂栧彿</param>
+ /// <param name="isCheckStock">鏄惁妫�鏌ョ粍鐩樹俊鎭�--鍖哄垎鐗╂枡鍏ュ簱鍜岀┖鎵樺叆搴�</param>
+ /// <param name="stockInfo">缁勭洏淇℃伅--鍙┖</param>
+ /// <returns>杩斿洖澶勭悊缁撴灉</returns>
+ private (bool, string) CheckRequestInbound(string stationCode, string palletCode, bool isCheckStock = true, Dt_StockInfo? stockInfo = null)
+ {
+ if (BaseDal.QueryFirst(x => x.PalletCode == palletCode) != null)
+ {
+ return (false, "璇ユ墭鐩樺彿宸叉湁浠诲姟");
+ }
+ if (BaseDal.QueryFirst(x => (x.SourceAddress == stationCode || x.CurrentAddress == stationCode) && x.TaskStatus == InTaskStatusEnum.InNew.ObjToInt()) != null)
+ {
+ return (false, "褰撳墠鍏ュ簱绔欏彴宸叉湁涓�鏉℃柊寤轰换鍔�");
+ }
+ if (isCheckStock)
+ {
+ if (stockInfo == null)
+ {
+ return (false, "鏈壘鍒扮粍鐩樹俊鎭�");
+ }
+ if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt())
+ {
+ return (false, "璇ョ粍鐩樼姸鎬佷笉鍙叆搴�");
+ }
+ if (!string.IsNullOrEmpty(stockInfo.LocationCode))
+ {
+ return (false, "璇ユ墭鐩樺凡缁戝畾璐т綅");
+ }
+ if (stockInfo.Details == null || stockInfo.Details.Count == 0)
+ {
+ return (false, "娌℃湁搴撳瓨鏄庣粏淇℃伅");
+ }
+ }
+ else
+ {
+ if (_stockInfoService.Repository.QueryFirst(x => x.PalletCode == palletCode) != null)
+ {
+ return (false, "璇ユ墭鐩樺凡瀛樺湪搴撳唴");
+ }
+ }
+
+ return (true, "鎴愬姛");
+ }
+
+ /// <summary>
+ /// 绌烘墭鐩樺叆搴撳畬鎴愬鐞�
+ /// </summary>
+ /// <param name="task">浠诲姟瀹炰綋瀵硅薄</param>
+ /// <returns>杩斿洖澶勭悊缁撴灉</returns>
+ public WebResponseContent PalletInboundTaskCompleted(Dt_Task task)
+ {
+ Dt_StockInfo stockInfo = new Dt_StockInfo()
+ {
+ PalletCode = task.PalletCode,
+ LocationCode = task.TargetAddress,
+ StockStatus = StockStatusEmun.宸插叆搴�.ObjToInt()
+ };
+ Dt_LocationInfo locationInfo = _locationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress);
+
+ CheckInboundCompleted(stockInfo, locationInfo);
+
+ _stockInfoService.Repository.AddData(stockInfo);
+
+ int beforeStatus = locationInfo.LocationStatus;
+ locationInfo.LocationStatus = LocationStatusEnum.Pallet.ObjToInt();
+ _locationInfoService.Repository.UpdateData(locationInfo);
+
+
+ BaseDal.DeleteData(task);
+
+ _locationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), "", task.TaskNum);
+
+ return WebResponseContent.Instance.OK();
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs"
new file mode 100644
index 0000000..924d427
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs"
@@ -0,0 +1,204 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.Enums;
+using WIDESEA_Core;
+using WIDESEA_DTO.Stock;
+using WIDESEA_Model.Models;
+using WIDESEA_Core.Helper;
+
+namespace WIDESEA_TaskInfoService
+{
+ public partial class TaskService
+ {
+ public List<Dt_Task> GetTasks(List<Dt_StockInfo> stockInfos)
+ {
+ List<Dt_Task> tasks = new List<Dt_Task>();
+ for (int i = 0; i < stockInfos.Count; i++)
+ {
+ Dt_StockInfo stockInfo = stockInfos[i];
+
+ if (stockInfo != null)
+ {
+ Dt_LocationInfo locationInfo = _locationInfoService.Repository.QueryFirst(x => x.LocationCode == stockInfo.LocationCode);
+ Dt_RoadwayInfo roadwayInfo = _roadwayInfoRepository.QueryFirst(x => x.RoadwayNo == locationInfo.RoadwayNo);
+ if (roadwayInfo != null)
+ {
+ Dt_Task task = new()
+ {
+ CurrentAddress = stockInfo.LocationCode,
+ Grade = 0,
+ PalletCode = stockInfo.PalletCode,
+ NextAddress = roadwayInfo.OutSCStationCode,
+ Roadway = locationInfo.RoadwayNo,
+ SourceAddress = stockInfo.LocationCode,
+ TargetAddress = roadwayInfo.OutStationCode,
+ TaskStatus = InTaskStatusEnum.InNew.ObjToInt(),
+ TaskType = TaskTypeEnum.Outbound.ObjToInt(),
+ TaskNum = BaseDal.GetTaskNum("SeqTaskNum")
+ };
+ tasks.Add(task);
+ }
+ }
+ }
+ return tasks;
+ }
+
+ public (List<Dt_Task>, List<Dt_StockInfo>?, List<Dt_OutboundOrderDetail>?, List<Dt_OutStockLockInfo>?, List<Dt_LocationInfo>?) OutboundTaskDataHandle(int orderDetailId, List<StockSelectViewDTO> stockSelectViews)
+ {
+ List<Dt_Task> tasks = new List<Dt_Task>();
+ Dt_OutboundOrderDetail outboundOrderDetail = _outboundOrderDetailService.Repository.QueryFirst(x => x.Id == orderDetailId);
+
+ if (outboundOrderDetail == null)
+ {
+ throw new Exception("鏈壘鍒板嚭搴撳崟鏄庣粏淇℃伅");
+ }
+
+ if (stockSelectViews.Sum(x => x.UseableQuantity) > outboundOrderDetail.OrderQuantity - outboundOrderDetail.LockQuantity)
+ {
+ throw new Exception("閫夋嫨鏁伴噺瓒呭嚭鍗曟嵁鏁伴噺");
+ }
+ List<Dt_StockInfo>? stockInfos = null;
+ Dt_OutboundOrderDetail? orderDetail = null;
+ List<Dt_OutStockLockInfo>? outStockLockInfos = null;
+ List<Dt_LocationInfo>? locationInfos = null;
+ if (outboundOrderDetail.OrderDetailStatus == OrderDetailStatusEnum.New.ObjToInt())
+ {
+ (List<Dt_StockInfo>, Dt_OutboundOrderDetail, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundOrderDetailService.AssignStockOutbound(outboundOrderDetail, stockSelectViews);
+ if (result.Item1 != null && result.Item1.Count > 0)
+ {
+ tasks = GetTasks(result.Item1);
+ result.Item2.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt();
+ result.Item3.ForEach(x =>
+ {
+ x.Status = OutStockStatus.鍑哄簱涓�.ObjToInt();
+ });
+
+ stockInfos = result.Item1;
+ orderDetail = result.Item2;
+ outStockLockInfos = result.Item3;
+ locationInfos = result.Item4;
+ }
+ else
+ {
+ throw new Exception("鏃犲簱瀛�");
+ }
+ }
+ else
+ {
+ List<Dt_OutStockLockInfo> stockLockInfos = _outStockLockInfoService.GetByOrderDetailId(outboundOrderDetail.OrderId);
+ if (stockLockInfos != null && stockLockInfos.Count > 0)
+ {
+ List<Dt_StockInfo> stocks = _stockInfoService.Repository.GetStockInfosByPalletCodes(stockLockInfos.Select(x => x.PalletCode).Distinct().ToList());
+ tasks = GetTasks(stocks);
+ }
+ }
+
+ return (tasks, stockInfos, orderDetail == null ? null : new List<Dt_OutboundOrderDetail> { orderDetail }, outStockLockInfos, locationInfos);
+ }
+
+ public WebResponseContent GenerateOutboundTask(int orderDetailId, List<StockSelectViewDTO> stockSelectViews)
+ {
+ try
+ {
+ (List<Dt_Task>, List<Dt_StockInfo>?, List<Dt_OutboundOrderDetail>?, List<Dt_OutStockLockInfo>?, List<Dt_LocationInfo>?) result = OutboundTaskDataHandle(orderDetailId, stockSelectViews);
+
+ WebResponseContent content = GenerateOutboundTaskDataUpdate(result.Item1, result.Item2, result.Item3, result.Item4, result.Item5);
+
+ return content;
+ }
+ catch (Exception ex)
+ {
+ return WebResponseContent.Instance.Error(ex.Message);
+ }
+ }
+
+ public WebResponseContent GenerateOutboundTaskDataUpdate(List<Dt_Task> tasks, List<Dt_StockInfo>? stockInfos = null, List<Dt_OutboundOrderDetail>? outboundOrderDetails = null, List<Dt_OutStockLockInfo>? outStockLockInfos = null, List<Dt_LocationInfo>? locationInfos = null)
+ {
+ try
+ {
+ _unitOfWorkManage.BeginTran();
+
+ BaseDal.AddData(tasks);
+ if (stockInfos != null && outboundOrderDetails != null && outStockLockInfos != null && locationInfos != null)
+ {
+ WebResponseContent content = _outboundOrderDetailService.LockOutboundStockDataUpdate(stockInfos, outboundOrderDetails, outStockLockInfos, locationInfos, tasks: tasks);
+
+ if (content.Status)
+ {
+ _unitOfWorkManage.CommitTran();
+ }
+ else
+ {
+ _unitOfWorkManage.RollbackTran();
+ }
+ return content;
+ }
+ else if (outboundOrderDetails != null && outboundOrderDetails.Count > 0)
+ {
+ outboundOrderDetails.ForEach(x =>
+ {
+ x.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt();
+ });
+
+ _outboundOrderDetailService.Repository.UpdateData(outboundOrderDetails);
+ }
+ _unitOfWorkManage.CommitTran();
+ return WebResponseContent.Instance.OK();
+ }
+ catch (Exception ex)
+ {
+ _unitOfWorkManage.RollbackTran();
+ return WebResponseContent.Instance.Error(ex.Message);
+ }
+
+ }
+
+ public WebResponseContent GenerateOutboundTask(int[] keys)
+ {
+ try
+ {
+ List<Dt_Task> tasks = new List<Dt_Task>();
+ List<StockSelectViewDTO> stockSelectViews = new List<StockSelectViewDTO>();
+ List<Dt_StockInfo> stockInfos = new List<Dt_StockInfo>();
+ List<Dt_OutboundOrderDetail> outboundOrderDetails = new List<Dt_OutboundOrderDetail>();
+ List<Dt_OutStockLockInfo> outStockLockInfos = new List<Dt_OutStockLockInfo>();
+ List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>();
+ foreach (int key in keys)
+ {
+ (List<Dt_Task>, List<Dt_StockInfo>?, List<Dt_OutboundOrderDetail>?, List<Dt_OutStockLockInfo>?, List<Dt_LocationInfo>?) result = OutboundTaskDataHandle(key, stockSelectViews);
+ if (result.Item2 != null && result.Item2.Count > 0)
+ {
+ stockInfos.AddRange(result.Item2);
+ }
+ if (result.Item3 != null && result.Item3.Count > 0)
+ {
+ outboundOrderDetails.AddRange(result.Item3);
+ }
+ if (result.Item4 != null && result.Item4.Count > 0)
+ {
+ outStockLockInfos.AddRange(result.Item4);
+ }
+ if (result.Item5 != null && result.Item5.Count > 0)
+ {
+ locationInfos.AddRange(result.Item5);
+ }
+ if (result.Item1 != null && result.Item1.Count > 0)
+ {
+ tasks.AddRange(result.Item1);
+ }
+ }
+
+ WebResponseContent content = GenerateOutboundTaskDataUpdate(tasks, stockInfos, outboundOrderDetails, outStockLockInfos, locationInfos);
+ return content;
+ }
+ catch (Exception ex)
+ {
+ _unitOfWorkManage.RollbackTran();
+ return WebResponseContent.Instance.Error(ex.Message);
+ }
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
index 469485b..4e92639 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
@@ -25,6 +25,7 @@
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Reflection;
+using System.Reflection.Metadata;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
@@ -36,9 +37,11 @@
using WIDESEA_DTO.Stock;
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
+using WIDESEA_IOutboundRepository;
using WIDESEA_IOutboundService;
using WIDESEA_IRecordService;
using WIDESEA_IStockRepository;
+using WIDESEA_IStockService;
using WIDESEA_ITaskInfoRepository;
using WIDESEA_ITaskInfoService;
using WIDESEA_Model.Models;
@@ -46,257 +49,46 @@
namespace WIDESEA_TaskInfoService
{
- public class TaskService : ServiceBase<Dt_Task, ITaskRepository>, ITaskService
+ public partial class TaskService : ServiceBase<Dt_Task, ITaskRepository>, ITaskService
{
private readonly IMapper _mapper;
private readonly IUnitOfWorkManage _unitOfWorkManage;
private readonly ILocationInfoService _locationInfoService;
- private readonly ILocationInfoRepository _locationInfoRepository;
- private readonly IStockInfoRepository _stockInfoRepository;
+ private readonly IStockInfoService _stockInfoService;
private readonly ILocationStatusChangeRecordSetvice _locationStatusChangeRecordSetvice;
private readonly IOutboundOrderDetailService _outboundOrderDetailService;
private readonly IRoadwayInfoRepository _roadwayInfoRepository;
+ private readonly IOutStockLockInfoService _outStockLockInfoService;
- public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, ILocationInfoService locationInfoService, ILocationInfoRepository locationInfoRepository, IStockInfoRepository stockInfoRepository, ILocationStatusChangeRecordSetvice locationStatusChangeRecordSetvice, IOutboundOrderDetailService outboundOrderDetailService, IRoadwayInfoRepository roadwayInfoRepository) : base(BaseDal)
+ public ITaskRepository Repository => BaseDal;
+
+ public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, ILocationInfoService locationInfoService, IStockInfoRepository stockInfoRepository, ILocationStatusChangeRecordSetvice locationStatusChangeRecordSetvice, IOutboundOrderDetailService outboundOrderDetailService, IRoadwayInfoRepository roadwayInfoRepository, IOutStockLockInfoService outStockLockInfoService, IStockInfoService stockInfoService) : base(BaseDal)
{
_mapper = mapper;
_locationInfoService = locationInfoService;
- _locationInfoRepository = locationInfoRepository;
- _stockInfoRepository = stockInfoRepository;
+ _stockInfoService = stockInfoService;
_locationStatusChangeRecordSetvice = locationStatusChangeRecordSetvice;
_outboundOrderDetailService = outboundOrderDetailService;
_roadwayInfoRepository = roadwayInfoRepository;
_unitOfWorkManage = unitOfWorkManage;
- }
-
- /// <summary>
- /// PDA鐢宠鍏ュ簱--鍫嗗灈鏈虹珛搴撳叆搴�
- /// </summary>
- /// <param name="stationCode">璧峰鍦板潃</param>
- /// <param name="taskType">浠诲姟绫诲瀷--鍏ョ┖锛屽叆鏂�</param>
- /// <param name="palletCode">鎵樼洏缂栧彿</param>
- /// <returns>杩斿洖澶勭悊缁撴灉</returns>
- public WebResponseContent GenerateInboundTask(string stationCode, int taskType, string palletCode)
- {
- string? name = Enum.GetName(typeof(TaskTypeEnum), taskType);
- MethodInfo? methodInfo = GetType().GetMethod(name + "Request");
- if (methodInfo != null)
- {
- WebResponseContent? responseContent = (WebResponseContent?)methodInfo.Invoke(this, new object[] { stationCode, palletCode });
- if (responseContent != null)
- {
- return responseContent;
- }
- }
- else
- {
- return WebResponseContent.Instance.Error("鏈壘鍒拌浠诲姟绫诲瀷涓氬姟");
- }
- return WebResponseContent.Instance.Error("閿欒");
- }
-
- /// <summary>
- /// 绌烘墭鐩樺叆搴�
- /// </summary>
- /// <param name="stationCode">璧峰鍦板潃</param>
- /// <param name="palletCode">鎵樼洏缂栧彿</param>
- /// <returns>杩斿洖澶勭悊缁撴灉</returns>
- public WebResponseContent PalletInboundRequest(string stationCode, string palletCode)
- {
- WebResponseContent content = new WebResponseContent();
- try
- {
- (bool, string) result = CheckRequestInbound(stationCode, palletCode, false);
- if (!result.Item1) return content = WebResponseContent.Instance.Error(result.Item2);
- content = AssignLocUpdateData(stationCode, TaskTypeEnum.PalletInbound.ObjToInt(), palletCode, false);
- }
- catch (Exception ex)
- {
- content = WebResponseContent.Instance.Error(ex.Message);
- }
- return content;
- }
-
- /// <summary>
- /// 鐗╂枡鍏ュ簱
- /// </summary>
- /// <param name="stationCode">璧峰鍦板潃</param>
- /// <param name="palletCode">鎵樼洏缂栧彿</param>
- /// <returns>杩斿洖澶勭悊缁撴灉</returns>
- public WebResponseContent InboundRequest(string stationCode, string palletCode)
- {
- WebResponseContent content = new WebResponseContent();
- try
- {
- Dt_StockInfo stockInfo = _stockInfoRepository.GetStockInfo(palletCode);
- (bool, string) result = CheckRequestInbound(stationCode, palletCode, true, stockInfo);
- if (!result.Item1) return content = WebResponseContent.Instance.Error(result.Item2);
- content = AssignLocUpdateData(stationCode, TaskTypeEnum.Inbound.ObjToInt(), palletCode, true, stockInfo);
- }
- catch (Exception ex)
- {
- content = WebResponseContent.Instance.Error(ex.Message);
- }
- return content;
- }
-
- /// <summary>
- /// 鍏ュ簱鍒嗛厤璐т綅鍙婂鐞嗘暟鎹�
- /// </summary>
- /// <param name="stationCode">璧峰鍦板潃</param>
- /// <param name="taskType">浠诲姟绫诲瀷</param>
- /// <param name="palletCode">鎵樼洏缂栧彿</param>
- /// <param name="isUpdateStock">鏄惁鏇存柊缁勭洏淇℃伅--鍖哄垎鐗╂枡鍏ュ簱鍜岀┖鎵樺叆搴�</param>
- /// <param name="stockInfo">缁勭洏淇℃伅--鍙┖</param>
- /// <param name="orderNo">璁㈠崟鍙�--鍙┖</param>
- /// <returns>杩斿洖澶勭悊缁撴灉</returns>
- private WebResponseContent AssignLocUpdateData(string stationCode, int taskType, string palletCode, bool isUpdateStock = true, Dt_StockInfo? stockInfo = null, string orderNo = "")
- {
- WebResponseContent content = new WebResponseContent();
- try
- {
- Dt_LocationInfo? locationInfo = _locationInfoService.AssignLocation(stationCode, taskType);
- if (locationInfo != null)
- {
- Dt_Task task = new()
- {
- CurrentAddress = stationCode,
- Grade = 0,
- PalletCode = palletCode,
- NextAddress = locationInfo.LocationCode,
- Roadway = locationInfo.RoadwayNo,
- SourceAddress = stationCode,
- TargetAddress = locationInfo.LocationCode,
- TaskStatus = InTaskStatusEnum.InNew.ObjToInt(),
- TaskType = taskType,
- };
- BaseDal.AddData(task);
- int beforeStatus = locationInfo.LocationStatus;
-
- locationInfo.LocationStatus = LocationStatusEnum.PalletLock.ObjToInt();
- if (isUpdateStock)
- {
- locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt();
- if (stockInfo != null && stockInfo.Details != null && stockInfo.Details.Count > 0)
- {
- orderNo = stockInfo.Details.FirstOrDefault()?.OrderNo ?? "";
-
- stockInfo.StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt();
- _stockInfoRepository.UpdateData(stockInfo);
- }
- else
- {
- return content = WebResponseContent.Instance.Error("鏈壘鍒板簱瀛樹俊鎭�");
- }
- }
- _locationInfoRepository.UpdateData(locationInfo);
- _locationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), orderNo, task.TaskNum);
-
- return content = WebResponseContent.Instance.OK();
- }
- return content = WebResponseContent.Instance.Error("鏈壘鍒板彲鍒嗛厤璐т綅");
- }
- catch (Exception ex)
- {
- content = WebResponseContent.Instance.Error(ex.Message);
- }
- return content;
- }
-
- /// <summary>
- /// 楠岃瘉鏁版嵁
- /// </summary>
- /// <param name="stationCode">璧峰鍦板潃</param>
- /// <param name="palletCode">鎵樼洏缂栧彿</param>
- /// <param name="isCheckStock">鏄惁妫�鏌ョ粍鐩樹俊鎭�--鍖哄垎鐗╂枡鍏ュ簱鍜岀┖鎵樺叆搴�</param>
- /// <param name="stockInfo">缁勭洏淇℃伅--鍙┖</param>
- /// <returns>杩斿洖澶勭悊缁撴灉</returns>
- private (bool, string) CheckRequestInbound(string stationCode, string palletCode, bool isCheckStock = true, Dt_StockInfo? stockInfo = null)
- {
- if (BaseDal.QueryFirst(x => x.PalletCode == palletCode) != null)
- {
- return (false, "璇ユ墭鐩樺彿宸叉湁浠诲姟");
- }
- if (BaseDal.QueryFirst(x => (x.SourceAddress == stationCode || x.CurrentAddress == stationCode) && x.TaskStatus == InTaskStatusEnum.InNew.ObjToInt()) != null)
- {
- return (false, "褰撳墠鍏ュ簱绔欏彴宸叉湁涓�鏉℃柊寤轰换鍔�");
- }
- if (isCheckStock)
- {
- if (stockInfo == null)
- {
- return (false, "鏈壘鍒扮粍鐩樹俊鎭�");
- }
- if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt())
- {
- return (false, "璇ョ粍鐩樼姸鎬佷笉鍙叆搴�");
- }
- if (!string.IsNullOrEmpty(stockInfo.LocationCode))
- {
- return (false, "璇ユ墭鐩樺凡缁戝畾璐т綅");
- }
- if (stockInfo.Details == null || stockInfo.Details.Count == 0)
- {
- return (false, "娌℃湁搴撳瓨鏄庣粏淇℃伅");
- }
- }
- else
- {
- if (_stockInfoRepository.QueryFirst(x => x.PalletCode == palletCode) != null)
- {
- return (false, "璇ユ墭鐩樺凡瀛樺湪搴撳唴");
- }
- }
-
- return (true, "鎴愬姛");
- }
-
- /// <summary>
- /// 绌烘墭鐩樺叆搴撳畬鎴愬鐞�
- /// </summary>
- /// <param name="task">浠诲姟瀹炰綋瀵硅薄</param>
- /// <returns>杩斿洖澶勭悊缁撴灉</returns>
- public WebResponseContent PalletInboundTaskCompleted(Dt_Task task)
- {
- Dt_StockInfo stockInfo = new Dt_StockInfo()
- {
- PalletCode = task.PalletCode,
- LocationCode = task.TargetAddress,
- StockStatus = StockStatusEmun.宸插叆搴�.ObjToInt()
- };
- Dt_LocationInfo locationInfo = _locationInfoRepository.QueryFirst(x => x.LocationCode == task.TargetAddress);
-
- CheckInboundCompleted(stockInfo, locationInfo);
-
- _stockInfoRepository.AddData(stockInfo);
-
- int beforeStatus = locationInfo.LocationStatus;
- locationInfo.LocationStatus = LocationStatusEnum.Pallet.ObjToInt();
- _locationInfoRepository.UpdateData(locationInfo);
-
-
- BaseDal.DeleteData(task);
-
- _locationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), "", task.TaskNum);
-
- return WebResponseContent.Instance.OK();
+ _outStockLockInfoService = outStockLockInfoService;
}
public WebResponseContent InboundTaskCompleted(Dt_Task task)
{
- Dt_StockInfo stockInfo = _stockInfoRepository.GetStockInfo(task.PalletCode);
+ Dt_StockInfo stockInfo = _stockInfoService.Repository.GetStockInfo(task.PalletCode);
- Dt_LocationInfo locationInfo = _locationInfoRepository.QueryFirst(x => x.LocationCode == task.TargetAddress);
+ Dt_LocationInfo locationInfo = _locationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress);
CheckInboundCompleted(stockInfo, locationInfo);
stockInfo.LocationCode = locationInfo.LocationCode;
stockInfo.StockStatus = StockStatusEmun.宸插叆搴�.ObjToInt();
- _stockInfoRepository.UpdateData(stockInfo);
+ _stockInfoService.Repository.UpdateData(stockInfo);
int beforeStatus = locationInfo.LocationStatus;
locationInfo.LocationStatus = LocationStatusEnum.Pallet.ObjToInt();
- _locationInfoRepository.UpdateData(locationInfo);
+ _locationInfoService.Repository.UpdateData(locationInfo);
BaseDal.DeleteData(task);
@@ -355,58 +147,5 @@
return WebResponseContent.Instance.Error();
}
- public WebResponseContent GenerateOutboundTask(int orderDetailId, List<StockSelectViewDTO> stockSelectViews)
- {
- try
- {
- List<Dt_Task> tasks = new List<Dt_Task>();
- (List<Dt_StockInfo>, Dt_OutboundOrderDetail, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundOrderDetailService.AssignStockOutbound(orderDetailId, stockSelectViews);
- for (int i = 0; i < result.Item1.Count; i++)
- {
- Dt_StockInfo stockInfo = result.Item1[i];
-
- if (stockInfo != null)
- {
- Dt_LocationInfo locationInfo = _locationInfoRepository.QueryFirst(x => x.LocationCode == stockInfo.LocationCode);
- Dt_RoadwayInfo roadwayInfo = _roadwayInfoRepository.QueryFirst(x => x.RoadwayNo == locationInfo.RoadwayNo);
- if (roadwayInfo != null)
- {
- Dt_Task task = new()
- {
- CurrentAddress = stockInfo.LocationCode,
- Grade = 0,
- PalletCode = stockInfo.PalletCode,
- NextAddress = roadwayInfo.OutSCStationCode,
- Roadway = locationInfo.RoadwayNo,
- SourceAddress = stockInfo.LocationCode,
- TargetAddress = roadwayInfo.OutStationCode,
- TaskStatus = InTaskStatusEnum.InNew.ObjToInt(),
- TaskType = TaskTypeEnum.Outbound.ObjToInt(),
- };
- tasks.Add(task);
- }
- }
- }
- result.Item2.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt();
- result.Item3.ForEach(x =>
- {
- x.Status = OutStockStatus.鍑哄簱涓�.ObjToInt();
- });
- List<Dt_LocationInfo> locationInfos = _locationInfoRepository.GetLocationInfos(result.Item3.Select(x => x.LocationCode).ToList());
-
- _unitOfWorkManage.BeginTran();
-
- BaseDal.AddData(tasks);
- _outboundOrderDetailService.LockOutboundStockDataUpdate(result.Item1, result.Item2, result.Item3, locationInfos);
- _locationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfos, LocationStatusEnum.Lock.ObjToInt(), StockChangeType.Outbound.ObjToInt(), "", tasks.Select(x => x.TaskNum).ToList());
- _unitOfWorkManage.CommitTran();
- return WebResponseContent.Instance.OK();
- }
- catch (Exception ex)
- {
- _unitOfWorkManage.RollbackTran();
- return WebResponseContent.Instance.Error(ex.Message);
- }
- }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WIDESEA_TaskInfoService.csproj" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WIDESEA_TaskInfoService.csproj"
index 1598a30..129d2e7 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WIDESEA_TaskInfoService.csproj"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WIDESEA_TaskInfoService.csproj"
@@ -1,4 +1,4 @@
-<Project Sdk="Microsoft.NET.Sdk">
+锘�<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
@@ -11,6 +11,7 @@
<ProjectReference Include="..\WIDESEA_IOutboundService\WIDESEA_IOutboundService.csproj" />
<ProjectReference Include="..\WIDESEA_IRecordService\WIDESEA_IRecordService.csproj" />
<ProjectReference Include="..\WIDESEA_IStockRepository\WIDESEA_IStockRepository.csproj" />
+ <ProjectReference Include="..\WIDESEA_IStockService\WIDESEA_IStockService.csproj" />
<ProjectReference Include="..\WIDESEA_ITaskInfoService\WIDESEA_ITaskInfoService.csproj" />
</ItemGroup>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderDetailController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderDetailController.cs"
index c41e0d5..a6582f4 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderDetailController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Outbound/OutboundOrderDetailController.cs"
@@ -28,16 +28,16 @@
return Service.LockOutboundStock(id, stockSelectViews);
}
+ [HttpPost, Route("LockOutboundStocks")]
+ public WebResponseContent LockOutboundStocks([FromBody] int[] keys)
+ {
+ return Service.LockOutboundStock(keys);
+ }
+
[HttpPost, Route("RevokeLockOutboundStock")]
public WebResponseContent RevokeLockOutboundStock(int id)
{
return Service.RevokeLockOutboundStock(id);
- }
-
- [HttpPost, Route("AssignStockOutbound")]
- public (List<Dt_StockInfo>, Dt_OutboundOrderDetail, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(int orderDetailId, [FromBody] List<StockSelectViewDTO> stockSelectViews)
- {
- return Service.AssignStockOutbound(orderDetailId, stockSelectViews);
}
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs"
index fa360fe..ed443cd 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs"
@@ -6,6 +6,7 @@
using WIDESEA_Core;
using WIDESEA_Core.Authorization;
using WIDESEA_Core.BaseController;
+using WIDESEA_Core.Caches;
using WIDESEA_Core.Const;
using WIDESEA_Core.Helper;
using WIDESEA_Core.HttpContextUser;
@@ -21,10 +22,12 @@
public class Sys_UserController : ApiBaseController<ISys_UserService, Sys_User>
{
private readonly IHttpContextAccessor _httpContextAccessor;
+ private readonly ICacheService _cacheService;
- public Sys_UserController(ISys_UserService userService, IHttpContextAccessor httpContextAccessor) : base(userService)
+ public Sys_UserController(ISys_UserService userService, IHttpContextAccessor httpContextAccessor, ICacheService cacheService) : base(userService)
{
_httpContextAccessor = httpContextAccessor;
+ _cacheService = cacheService;
}
[HttpPost, Route("login"), AllowAnonymous]
@@ -81,6 +84,7 @@
UserName = App.User.UserName
};
string newToken = JwtHelper.IssueJwt(tokenModelJwt);
+ _cacheService.AddOrUpdate(tokenModelJwt.UserId.ToString(), newToken);
return responseContent = WebResponseContent.Instance.OK(data: newToken);
}
catch (Exception ex)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
index 5e09d81..404b53f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/TaskInfo/TaskController.cs"
@@ -17,22 +17,28 @@
{
}
- [HttpPost, Route("GenerateInboundTask"), AllowAnonymous]
+ [HttpPost, Route("GenerateInboundTask")]
public WebResponseContent GenerateInboundTask(string stationCode, int inboundType, string palletCode)
{
return Service.GenerateInboundTask(stationCode, inboundType, palletCode);
}
- [HttpPost, Route("TaskCompleted"), AllowAnonymous]
+ [HttpPost, Route("TaskCompleted")]
public WebResponseContent TaskCompleted(int taskNum)
{
return Service.TaskCompleted(taskNum);
}
- [HttpPost, Route("GenerateOutboundTask"), AllowAnonymous]
+ [HttpPost, Route("GenerateOutboundTask")]
public WebResponseContent GenerateOutboundTask(int id, List<StockSelectViewDTO> stockSelectViews)
{
return Service.GenerateOutboundTask(id, stockSelectViews);
}
+
+ [HttpPost, Route("GenerateOutboundTasks")]
+ public WebResponseContent GenerateOutboundTasks([FromBody] int[] keys)
+ {
+ return Service.GenerateOutboundTask(keys);
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs"
index 80e6a5f..44530ed 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Program.cs"
@@ -40,7 +40,7 @@
builder.Services.AddAllOptionRegister();//读取配置文件
builder.Services.AddMemoryCacheSetup();//缓存
builder.Services.AddSqlsugarSetup();//SqlSugar 启动服务
-//builder.Services.AddInitializationHostServiceSetup();//应用初始化服务注入
+builder.Services.AddInitializationHostServiceSetup();//应用初始化服务注入
builder.Services.AddDbSetup();//Db 启动服务
builder.Services.AddAutoMapperSetup();
--
Gitblit v1.9.3