From d1a2afa67032339c2eb1019a02c6b6d036c0bdb1 Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期一, 23 九月 2024 09:09:40 +0800
Subject: [PATCH] 1
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/RepositoryBase.cs | 104 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/BasicRepository.cs | 37
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/PageDataOptions.cs | 97 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs | 107 +
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/21e966d8-e44a-432b-8c0b-3c4e5e7c05fd.vsidx | 0
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockInfoRepository.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_SystemService/Sys_MenuService.cs | 1
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderService.cs | 4
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_AGV.cs | 179 +++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WIDESEA_TaskInfoService.csproj | 2
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/79eb5ca9-e241-4647-98b5-bb5bc7256530.vsidx | 0
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Middlewares/ApiLogMiddleware.cs | 144 +-
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs | 43
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/f65c354a-0e46-42e0-8d03-b1244d9e8a93.vsidx | 0
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Outbound.cs | 103 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/PDAController.cs | 46
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/AreaRouterService.cs | 21
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs | 25
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IAreaRouterService.cs | 16
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_AreaRouter.cs | 53
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/AreaInfoController.cs | 14
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Common/AGVTaskFeedBackModel.cs | 15
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/AreaRouterRepository.cs | 18
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs | 222 +++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs | 9
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/RecordService.cs | 22
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundRepository/InboundRepository.cs | 22
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs | 6
代码管理/WMS/WIDESEA_WMSClient/src/views/basic/locationInfo.vue | 19
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockService.cs | 16
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IAreaRouterRepository.cs | 14
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockInfoRepository.cs | 27
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/ManageEnum.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IBasicRepository.cs | 26
代码管理/WMS/WIDESEA_WMSClient/src/views/system/Sys_Menu.vue | 195 ++-
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs | 58
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/CachePointRepository.cs | 28
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/IRepository.cs | 5
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundOrderService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/HttpContextUser/IUser.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/WIDESEA_WMSServer.csproj | 4
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IMaterielInfoService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockViewController.cs | 20
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ICachePointService.cs | 23
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/LocationInfoRepository.cs | 11
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ILocationInfoService.cs | 1
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/CachePointService.cs | 73 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundRepository/IInboundRepository.cs | 16
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ICachePointRepository.cs | 17
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/RoadwayInfoRepository.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/HttpContextUser/AspNetUser.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_RecordRepository/RecordRepository.cs | 22
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_SystemRepository/Sys_MenuRepository.cs | 9
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IRoadwayInfoService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/AreaInfoService.cs | 5
代码管理/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue | 339 +++++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundService.cs | 16
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskServiceExtendFunc.cs | 15
代码管理/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js | 58 +
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs | 112 -
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundOrderDetailService.cs | 49
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs | 41
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/SequenceEnum.cs | 13
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/ModelValidate.cs | 12
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs | 6
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IWarehouseService.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/CachePointGroupDTO.cs | 35
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task.cs | 3
代码管理/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/StockSelect.vue | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IBasicService.cs | 71 +
代码管理/WMS/WIDESEA_WMSClient/src/router/viewGird.js | 4
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task_Hty.cs | 169 ++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IAreaInfoService.cs | 3
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockViewService.cs | 18
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_LocationInfo.cs | 2
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/LocationInfoService.cs | 50
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IRecordRepository/IRecordRepository.cs | 16
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/System/Sys_Menu.cs | 6
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 166 ++
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs | 34
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/OutboundRepository.cs | 25
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockRepository.cs | 22
/dev/null | 0
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs | 22
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/TaskEnum.cs | 56
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IRecordService/IRecordService.cs | 16
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_RoadwayInfo.cs | 4
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IOutboundRepository.cs | 18
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs | 22
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockRepository.cs | 16
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs | 18
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_CachePoint.cs | 44
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/System/Sys_UserController.cs | 1
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs | 11
94 files changed, 2,917 insertions(+), 515 deletions(-)
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 16c7215..a02362a 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"
@@ -3,7 +3,7 @@
<vol-box
v-model="showDetialBox"
:lazy="true"
- width="75%"
+ width="60%"
:padding="15"
title="鎸囧畾搴撳瓨"
>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js"
new file mode 100644
index 0000000..a39e193
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockView.js"
@@ -0,0 +1,58 @@
+
+//姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
+
+let extension = {
+ components: {
+ //鏌ヨ鐣岄潰鎵╁睍缁勪欢
+ gridHeader: '',
+ gridBody: '',
+ gridFooter: '',
+ //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
+ modelHeader: '',
+ modelBody: '',
+ modelFooter: ''
+ },
+ tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓)
+ buttons: { view: [], box: [], detail: [] }, //鎵╁睍鐨勬寜閽�
+ methods: {
+ //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
+ onInit() {
+ },
+ onInited() {
+ //妗嗘灦鍒濆鍖栭厤缃悗
+ //濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔
+ //this.detailOptions.columns.forEach(column=>{ });
+ },
+ searchBefore(param) {
+ //鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟
+ //杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ
+ return true;
+ },
+ searchAfter(result) {
+ //鏌ヨ鍚庯紝result杩斿洖鐨勬煡璇㈡暟鎹�,鍙互鍦ㄦ樉绀哄埌琛ㄦ牸鍓嶅鐞嗚〃鏍肩殑鍊�
+ return true;
+ },
+ addBefore(formData) {
+ //鏂板缓淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛紝鍙互缁欑粰琛ㄥ崟璁剧疆鍊硷紝鑷繁杈撳嚭鐪媐ormData鐨勫��
+ return true;
+ },
+ updateBefore(formData) {
+ //缂栬緫淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛ㄣ�佸垹闄よ鐨処d
+ return true;
+ },
+ rowClick({ row, column, event }) {
+ //鏌ヨ鐣岄潰鐐瑰嚮琛屼簨浠�
+ // this.$refs.table.$refs.table.toggleRowSelection(row); //鍗曞嚮琛屾椂閫変腑褰撳墠琛�;
+ },
+ modelOpenAfter(row) {
+ //鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁
+ //(1)鍒ゆ柇鏄紪杈戣繕鏄柊寤烘搷浣滐細 this.currentAction=='Add';
+ //(2)缁欏脊鍑烘璁剧疆榛樿鍊�
+ //(3)this.editFormFields.瀛楁='xxx';
+ //濡傛灉闇�瑕佺粰涓嬫媺妗嗚缃粯璁ゅ�硷紝璇烽亶鍘唗his.editFormOptions鎵惧埌瀛楁閰嶇疆瀵瑰簲data灞炴�х殑key鍊�
+ //鐪嬩笉鎳傚氨鎶婅緭鍑虹湅锛歝onsole.log(this.editFormOptions)
+ }
+ }
+ };
+ export default extension;
+
\ No newline at end of file
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/router/viewGird.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/router/viewGird.js"
index 6bec015..904ba08 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/router/viewGird.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/router/viewGird.js"
@@ -81,6 +81,10 @@
path: '/task',
name: 'task',
component: () => import('@/views/taskinfo/task.vue')
+ }, {
+ path: '/stockView',
+ name: 'stockView',
+ component: () => import('@/views/stock/stockView.vue')
}]
export default viewgird
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/locationInfo.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/locationInfo.vue"
index cdde3cd..32a449a 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/locationInfo.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/basic/locationInfo.vue"
@@ -64,7 +64,12 @@
},
],
[
- { title: "璐т綅绫诲瀷", required: true, field: "locationType", type: "string" },
+ {
+ title: "璐т綅绫诲瀷",
+ required: true,
+ field: "locationType",
+ type: "string",
+ },
{
title: "璐т綅鐘舵��",
required: true,
@@ -85,13 +90,13 @@
},
],
[
- {
+ {
title: "宸烽亾缂栧彿",
required: true,
field: "roadwayNo",
type: "string",
},
- ]
+ ],
]);
const searchFormFields = ref({
locationCode: "",
@@ -125,14 +130,14 @@
field: "locationCode",
title: "璐т綅缂栧彿",
type: "string",
- width: 150,
+ width: 180,
align: "left",
},
{
field: "locationName",
title: "璐т綅鍚嶇О",
type: "string",
- width: 150,
+ width: 220,
align: "left",
},
{
@@ -148,6 +153,7 @@
type: "string",
width: 90,
align: "left",
+ hidden: true,
},
{
field: "column",
@@ -155,6 +161,7 @@
type: "int",
width: 120,
align: "left",
+ hidden: true,
},
{
field: "layer",
@@ -162,6 +169,7 @@
type: "string",
width: 200,
align: "left",
+ hidden: true,
},
{
field: "depth",
@@ -169,6 +177,7 @@
type: "string",
width: 180,
align: "left",
+ hidden: true,
},
{
field: "locationType",
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue"
new file mode 100644
index 0000000..9799193
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue"
@@ -0,0 +1,339 @@
+
+<template>
+ <view-grid
+ ref="grid"
+ :columns="columns"
+ :detail="detail"
+ :editFormFields="editFormFields"
+ :editFormOptions="editFormOptions"
+ :searchFormFields="searchFormFields"
+ :searchFormOptions="searchFormOptions"
+ :table="table"
+ :extend="extend"
+ >
+ </view-grid>
+</template>
+ <script>
+import extend from "@/extension/stock/stockView.js";
+import { ref, defineComponent } from "vue";
+export default defineComponent({
+ setup() {
+ const table = ref({
+ key: "stockId",
+ footer: "Foots",
+ cnName: "搴撳瓨瑙嗗浘",
+ name: "stockView",
+ url: "/stockView/",
+ sortName: "stockId",
+ });
+ const editFormFields = ref({
+ palletCode: "",
+ locationCode: "",
+ locationName: "",
+ });
+ const editFormOptions = ref([
+ [
+ {
+ title: "鎵樼洏缂栧彿",
+ required: true,
+ field: "palletCode",
+ type: "string",
+ },
+ {
+ title: "璐т綅缂栧彿",
+ required: true,
+ field: "locationCode",
+ type: "string",
+ },
+ {
+ title: "璐т綅鍚嶇О",
+ required: true,
+ field: "locationName",
+ type: "string",
+ },
+ ],
+ ]);
+ const searchFormFields = ref({
+ palletCode: "",
+ locationCode: "",
+ });
+ const searchFormOptions = ref([
+ [
+ { title: "鎵樼洏缂栧彿", field: "palletCode" },
+ { title: "璐т綅缂栧彿", field: "locationCode" },
+ ],
+ ]);
+ const columns = ref([
+ {
+ field: "stockId",
+ title: "Id",
+ type: "int",
+ width: 90,
+ hidden: true,
+ readonly: true,
+ require: true,
+ align: "left",
+ },
+ {
+ field: "palletCode",
+ title: "鎵樼洏缂栧彿",
+ type: "string",
+ width: 150,
+ link: true,
+ align: "left",
+ },
+ {
+ field: "locationCode",
+ title: "璐т綅缂栧彿",
+ type: "string",
+ width: 180,
+ align: "left",
+ },
+ {
+ field: "locationName",
+ title: "璐т綅鍚嶇О",
+ type: "string",
+ width: 220,
+ align: "left",
+ },
+ {
+ field: "roadwayNo",
+ title: "宸烽亾缂栧彿",
+ type: "decimal",
+ width: 90,
+ align: "left",
+ },
+ {
+ field: "row",
+ title: "璐т綅琛�",
+ type: "string",
+ width: 90,
+ align: "left",
+ hidden: true,
+ },
+ {
+ field: "column",
+ title: "璐т綅鍒�",
+ type: "int",
+ width: 120,
+ align: "left",
+ hidden: true,
+ },
+ {
+ field: "layer",
+ title: "璐т綅灞�",
+ type: "string",
+ width: 200,
+ align: "left",
+ hidden: true,
+ },
+ {
+ field: "depth",
+ title: "璐т綅娣卞害",
+ type: "string",
+ width: 180,
+ align: "left",
+ hidden: true,
+ },
+ {
+ field: "stockStatus",
+ title: "搴撳瓨鐘舵��",
+ type: "string",
+ width: 200,
+ align: "left",
+ },
+ {
+ field: "locationType",
+ title: "璐т綅绫诲瀷",
+ type: "string",
+ width: 120,
+ align: "left",
+ },
+ {
+ field: "locationStatus",
+ title: "璐т綅鐘舵��",
+ type: "string",
+ width: 200,
+ align: "left",
+ },
+ {
+ field: "enalbeStatus",
+ title: "绂佺敤鐘舵��",
+ type: "string",
+ width: 180,
+ align: "left",
+ },
+ {
+ field: "isFull",
+ title: "鏄惁婊$洏",
+ type: "string",
+ width: 150,
+ align: "left",
+ hidden: true,
+ },
+ {
+ field: "creater",
+ title: "鍒涘缓浜�",
+ type: "string",
+ width: 90,
+ align: "left",
+ },
+ {
+ field: "createDate",
+ title: "鍒涘缓鏃堕棿",
+ type: "datetime",
+ width: 160,
+ align: "left",
+ },
+ {
+ field: "modifier",
+ title: "淇敼浜�",
+ type: "string",
+ width: 100,
+ align: "left",
+ },
+ {
+ field: "modifyDate",
+ title: "淇敼鏃堕棿",
+ type: "datetime",
+ width: 160,
+ align: "left",
+ },
+ {
+ field: "remark",
+ title: "澶囨敞",
+ type: "string",
+ width: 100,
+ align: "left",
+ },
+ ]);
+ const detail = ref({
+ cnName: "搴撳瓨鏄庣粏淇℃伅",
+ table: "StockInfoDetail",
+ columns: [
+ {
+ field: "id",
+ title: "Id",
+ type: "int",
+ width: 90,
+ hidden: true,
+ readonly: true,
+ require: true,
+ align: "left",
+ },
+ {
+ field: "stockId",
+ title: "搴撳瓨淇℃伅涓婚敭",
+ type: "string",
+ width: 90,
+ align: "left",
+ },
+ {
+ field: "materielCode",
+ title: "鐗╂枡缂栧彿",
+ type: "string",
+ width: 150,
+ align: "left",
+ },
+ {
+ field: "materielName",
+ title: "鐗╂枡鍚嶇О",
+ type: "string",
+ width: 150,
+ align: "left",
+ },
+ {
+ field: "orderNo",
+ title: "鍗曟嵁缂栧彿",
+ type: "decimal",
+ width: 90,
+ align: "left",
+ },
+ {
+ field: "batchNo",
+ title: "鎵规鍙�",
+ type: "string",
+ width: 90,
+ align: "left",
+ },
+ {
+ field: "serialNumber",
+ title: "搴忓垪鍙�",
+ type: "int",
+ width: 120,
+ align: "left",
+ },
+ {
+ field: "stockQuantity",
+ title: "搴撳瓨鏁伴噺",
+ type: "string",
+ width: 200,
+ align: "left",
+ },
+ {
+ field: "outboundQuantity",
+ title: "鍑哄簱鏁伴噺",
+ type: "string",
+ width: 180,
+ align: "left",
+ },
+ {
+ field: "status",
+ title: "搴撳瓨鏄庣粏鐘舵��",
+ type: "string",
+ width: 120,
+ align: "left",
+ },
+ {
+ field: "creater",
+ title: "鍒涘缓浜�",
+ type: "string",
+ width: 90,
+ align: "left",
+ },
+ {
+ field: "createDate",
+ title: "鍒涘缓鏃堕棿",
+ type: "datetime",
+ width: 160,
+ align: "left",
+ },
+ {
+ field: "modifier",
+ title: "淇敼浜�",
+ type: "string",
+ width: 100,
+ align: "left",
+ },
+ {
+ field: "modifyDate",
+ title: "淇敼鏃堕棿",
+ type: "datetime",
+ width: 160,
+ align: "left",
+ },
+ {
+ field: "remark",
+ title: "澶囨敞",
+ type: "string",
+ width: 100,
+ align: "left",
+ },
+ ],
+ sortName: "id",
+ key: "id",
+ });
+ return {
+ table,
+ extend,
+ editFormFields,
+ editFormOptions,
+ searchFormFields,
+ searchFormOptions,
+ columns,
+ detail,
+ };
+ },
+});
+</script>
+
\ No newline at end of file
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/system/Sys_Menu.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/system/Sys_Menu.vue"
index 93feed5..7b1485d 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/system/Sys_Menu.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/views/system/Sys_Menu.vue"
@@ -1,14 +1,32 @@
<template>
<div class="menu-container">
<!-- <el-input/> -->
- <vol-box :width="940" :mask="true" :height="500" title="鍥炬爣鍒楄〃" v-model="model">
+ <vol-box
+ :width="940"
+ :mask="true"
+ :height="500"
+ title="鍥炬爣鍒楄〃"
+ v-model="model"
+ >
<Icons :onSelect="onSelect"></Icons>
<template #footer>
- <el-button type="primary" size="mini" @click="model = false">纭� 璁�</el-button>
+ <el-button type="primary" size="mini" @click="model = false"
+ >纭� 璁�</el-button
+ >
</template>
</vol-box>
- <vol-box :width="600" :mask="true" :height="270" title="鍏朵粬鏉冮檺" v-model="actionModel">
- <vol-form ref="actionForm" :formRules="actionOptions" :formFields="actionFields">
+ <vol-box
+ :width="600"
+ :mask="true"
+ :height="270"
+ title="鍏朵粬鏉冮檺"
+ v-model="actionModel"
+ >
+ <vol-form
+ ref="actionForm"
+ :formRules="actionOptions"
+ :formFields="actionFields"
+ >
<template #header>
<div>
<el-alert show-icon type="success">
@@ -20,7 +38,9 @@
</template>
</vol-form>
<template #footer>
- <el-button type="primary" size="mini" @click="otherAction">纭� 璁�</el-button>
+ <el-button type="primary" size="mini" @click="otherAction"
+ >纭� 璁�</el-button
+ >
</template>
</vol-box>
@@ -28,12 +48,21 @@
<div class="menu-left">
<div class="m-title"><i class="el-icon-warning-outline"></i>鑿滃崟鍒楄〃</div>
<el-scrollbar style="height: 100%; width: 200px">
- <VolMenu :onSelect="getTreeItem" :list="tree" :isCollapse="false"></VolMenu>
+ <VolMenu
+ :onSelect="getTreeItem"
+ :list="tree"
+ :isCollapse="false"
+ ></VolMenu>
</el-scrollbar>
</div>
<div class="menu-right">
<el-scrollbar style="height: 100%">
- <el-alert title="鑿滃崟閰嶇疆璇存槑" type="warning" :closable="false" show-icon>
+ <el-alert
+ title="鑿滃崟閰嶇疆璇存槑"
+ type="warning"
+ :closable="false"
+ show-icon
+ >
<div>
1銆佸鏋滄槸鐢ㄤ唬鐮佺敓鍣ㄧ敓鎴愮殑Vue椤甸潰,Url涓篤ue椤圭洰涓璼rc->router->viewGrid.js瀵瑰簲琛ㄥ悕鐨刾ath灞炴��
</div>
@@ -42,31 +71,56 @@
</div>
</el-alert>
<div style="padding: 0px 30px 0 20px">
- <vol-form class="form-content" ref="form" :formRules="options" :formFields="fields">
+ <vol-form
+ class="form-content"
+ ref="form"
+ :formRules="options"
+ :formFields="fields"
+ >
</vol-form>
<div>
<div class="auth-group">
<label style="width: 100px">鏉冮檺鎸夐挳锛�</label>
<div class="ck">
<el-checkbox-group v-model="actions">
- <el-checkbox v-for="(item, index) in action" :key="index" :label="item.value">{{ item.text + "(" +
- item.value + ")" }}</el-checkbox>
+ <el-checkbox
+ v-for="(item, index) in action"
+ :key="index"
+ :label="item.value"
+ >{{ item.text + "(" + item.value + ")" }}</el-checkbox
+ >
</el-checkbox-group>
</div>
</div>
</div>
<div style="padding-left: 100px">
- <el-button @click="handleCheckAll" size="mini" type="success" plain><i class="el-icon-check"></i>鍏�
- 閫�</el-button>
- <el-button @click="actionModel = true" size="mini" type="primary" plain><i
- class="el-icon-plus"></i>鍏朵粬鏉冮檺</el-button>
+ <el-button @click="handleCheckAll" size="mini" type="success" plain
+ ><i class="el-icon-check"></i>鍏� 閫�</el-button
+ >
+ <el-button
+ @click="actionModel = true"
+ size="mini"
+ type="primary"
+ plain
+ ><i class="el-icon-plus"></i>鍏朵粬鏉冮檺</el-button
+ >
</div>
<div class="m-btn">
- <el-button type="primary" @click="save"><i class="el-icon-check"></i>淇濆瓨</el-button>
- <el-button type="success" @click="add"><i class="el-icon-plus"></i>鏂板缓</el-button>
- <el-button type="warning" @click="addChild"><i class="el-icon-plus"></i>娣诲姞瀛愮骇</el-button>
- <el-button type="primary" plain @click="addBrother"><i class="el-icon-circle-plus"></i> 娣诲姞鍚岀骇</el-button>
- <el-button type="warning" plain @click="delMenu"><i class="el-icon-delete"></i> 鍒犻櫎鑿滃崟</el-button>
+ <el-button type="primary" @click="save"
+ ><i class="el-icon-check"></i>淇濆瓨</el-button
+ >
+ <el-button type="success" @click="add"
+ ><i class="el-icon-plus"></i>鏂板缓</el-button
+ >
+ <el-button type="warning" @click="addChild"
+ ><i class="el-icon-plus"></i>娣诲姞瀛愮骇</el-button
+ >
+ <el-button type="primary" plain @click="addBrother"
+ ><i class="el-icon-circle-plus"></i> 娣诲姞鍚岀骇</el-button
+ >
+ <el-button type="warning" plain @click="delMenu"
+ ><i class="el-icon-delete"></i> 鍒犻櫎鑿滃崟</el-button
+ >
</div>
</div>
</el-scrollbar>
@@ -176,7 +230,11 @@
tigger = true;
let menuId = this.fields.menuId;
this.http
- .post("/api/Sys_Menu/delMenu?menuId=" + menuId, {}, "姝e湪鍒犻櫎鏁版嵁....")
+ .post(
+ "/api/Sys_Menu/delMenu?menuId=" + menuId,
+ {},
+ "姝e湪鍒犻櫎鏁版嵁...."
+ )
.then((x) => {
if (!x.status) return this.$Message.error(x.message);
this.$refs.form.reset();
@@ -227,7 +285,7 @@
orderNo: this.fields.orderNo,
parentId: this.fields.parentId,
});
- console.log(this.tree)
+ console.log(this.tree);
});
});
},
@@ -246,11 +304,9 @@
onOpenChange(node) {
if (node.length == 0) return;
this.getTreeItem(node[node.length > 1 ? node.length - 1 : 0]);
- }
+ },
},
- created(){
-
- },
+ created() {},
setup() {
const tree = ref([]);
const actionValues = ref([]);
@@ -270,10 +326,10 @@
});
const initTree = () => {
http.post("/api/Sys_Menu/getMenu", {}, true).then((x) => {
- x.forEach(item => {
- item.icon = 'el-icon-menu';
- })
-
+ x.forEach((item) => {
+ item.icon = "el-icon-menu";
+ });
+
tree.value = x;
});
};
@@ -294,9 +350,7 @@
icon: "",
orderNo: "",
enable: 1,
- createDate: "",
- creator: "",
- modifyDate: "",
+ menuType: 0,
});
const actionFields = ref({
@@ -379,19 +433,18 @@
{ key: 0, value: "绂佺敤" },
],
},
- // {
- // // 2022.03.26澧炵Щ鍔ㄧ鍔犺彍鍗曠被鍨�
- // title: "鑿滃崟绫诲瀷",
- // field: "menuType",
- // required: true,
- // type: "select",
- // colSize: 4,
- // data: [
- // { key: 1, value: "WCS鑿滃崟" },
- // { key: 0, value: "WMS鑿滃崟" },
- // { key: 99, value: "鍏辩敤" }
- // ],
- // },
+ {
+ // 2022.03.26澧炵Щ鍔ㄧ鍔犺彍鍗曠被鍨�
+ title: "鑿滃崟绫诲瀷",
+ field: "menuType",
+ required: true,
+ type: "select",
+ colSize: 4,
+ data: [
+ { key: 0, value: "PC绔彍鍗�" },
+ { key: 1, value: "绉诲姩绔彍鍗�" },
+ ],
+ },
{
title: "鍥炬爣Icon",
field: "icon",
@@ -426,33 +479,35 @@
]);
const refForm = ref();
const getTreeItem = (node) => {
- http.post("api/Sys_Menu/getTreeItem?menuId=" + node, {}, true).then((x) => {
- try {
- fields.value.icon = x.icon;
- if (x.auth) {
- x.auth = JSON.parse(x.auth);
- action.value.splice(8, action.value.length);
+ http
+ .post("api/Sys_Menu/getTreeItem?menuId=" + node, {}, true)
+ .then((x) => {
+ try {
+ fields.value.icon = x.icon;
+ if (x.auth) {
+ x.auth = JSON.parse(x.auth);
+ action.value.splice(8, action.value.length);
- actions.value = x.auth.map((element) => {
- if (actionValues.value.indexOf(element.value) == -1) {
- action.value.push(element);
- }
- return element.value;
- });
- } else {
- action.value.splice(8, action.value.length);
+ actions.value = x.auth.map((element) => {
+ if (actionValues.value.indexOf(element.value) == -1) {
+ action.value.push(element);
+ }
+ return element.value;
+ });
+ } else {
+ action.value.splice(8, action.value.length);
+ x.auth = [];
+ fields.value.icon = "";
+ actions.value = [];
+ }
+ } catch (error) {
+ console.log("鑿滃崟鍔熻兘鏉冮檺杞崲鎴怞SON澶辫触:" + x.auth);
x.auth = [];
- fields.value.icon = "";
+ // this.icon = "";
actions.value = [];
}
- } catch (error) {
- console.log("鑿滃崟鍔熻兘鏉冮檺杞崲鎴怞SON澶辫触:" + x.auth);
- x.auth = [];
- // this.icon = "";
- actions.value = [];
- }
- refForm.value.reset(x);
- });
+ refForm.value.reset(x);
+ });
};
return {
tree,
@@ -468,7 +523,7 @@
actionOptions,
options,
form: refForm,
- getTreeItem
+ getTreeItem,
};
},
data() {
@@ -521,7 +576,7 @@
margin-top: 1px;
}
- >div {
+ > div {
float: left;
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/21e966d8-e44a-432b-8c0b-3c4e5e7c05fd.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/21e966d8-e44a-432b-8c0b-3c4e5e7c05fd.vsidx"
new file mode 100644
index 0000000..8d49e9a
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/21e966d8-e44a-432b-8c0b-3c4e5e7c05fd.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/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"
deleted file mode 100644
index 53f1235..0000000
--- "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"
+++ /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/79eb5ca9-e241-4647-98b5-bb5bc7256530.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/79eb5ca9-e241-4647-98b5-bb5bc7256530.vsidx"
new file mode 100644
index 0000000..8cb6306
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/79eb5ca9-e241-4647-98b5-bb5bc7256530.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"
deleted file mode 100644
index 8d99cd0..0000000
--- "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"
+++ /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"
deleted file mode 100644
index 0420c48..0000000
--- "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"
+++ /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/f65c354a-0e46-42e0-8d03-b1244d9e8a93.vsidx" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/f65c354a-0e46-42e0-8d03-b1244d9e8a93.vsidx"
new file mode 100644
index 0000000..173e40a
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/f65c354a-0e46-42e0-8d03-b1244d9e8a93.vsidx"
Binary files differ
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/AreaRouterRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/AreaRouterRepository.cs"
new file mode 100644
index 0000000..b641e87
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/AreaRouterRepository.cs"
@@ -0,0 +1,18 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.BaseRepository;
+using WIDESEA_IBasicRepository;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_BasicRepository
+{
+ public class AreaRouterRepository : RepositoryBase<Dt_AreaRouter>, IAreaRouterRepository
+ {
+ public AreaRouterRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
+ {
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/BasicRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/BasicRepository.cs"
new file mode 100644
index 0000000..b5c95f8
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/BasicRepository.cs"
@@ -0,0 +1,37 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_IBasicRepository;
+
+namespace WIDESEA_BasicRepository
+{
+ public class BasicRepository : IBasicRepository
+ {
+ public IAreaInfoRepository AreaInfoRepository { get; }
+
+ public ILocationInfoRepository LocationInfoRepository { get; }
+
+ public IMaterielInfoRepository MaterielInfoRepository { get; }
+
+ public IRoadwayInfoRepository RoadwayInfoRepository { get; }
+
+ public IWarehouseRepository WarehouseRepository { get; }
+
+ public IAreaRouterRepository AreaRouterRepository { get; }
+
+ public ICachePointRepository CachePointRepository { get; }
+
+ public BasicRepository(IAreaInfoRepository areaInfoRepository, ILocationInfoRepository locationInfoRepository, IMaterielInfoRepository materielInfoRepository, IRoadwayInfoRepository roadwayInfoRepository, IWarehouseRepository warehouseRepository, IAreaRouterRepository areaRouterRepository, ICachePointRepository cachePointRepository)
+ {
+ AreaInfoRepository = areaInfoRepository;
+ LocationInfoRepository = locationInfoRepository;
+ MaterielInfoRepository = materielInfoRepository;
+ RoadwayInfoRepository = roadwayInfoRepository;
+ WarehouseRepository = warehouseRepository;
+ AreaRouterRepository = areaRouterRepository;
+ CachePointRepository = cachePointRepository;
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/CachePointRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/CachePointRepository.cs"
new file mode 100644
index 0000000..f8006f8
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/CachePointRepository.cs"
@@ -0,0 +1,28 @@
+锘�
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.BaseRepository;
+using WIDESEA_Core.Enums;
+using WIDESEA_Core.Helper;
+using WIDESEA_DTO.Basic;
+using WIDESEA_IBasicRepository;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_BasicRepository
+{
+ public class CachePointRepository : RepositoryBase<Dt_CachePoint>, ICachePointRepository
+ {
+ public CachePointRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
+ {
+ }
+
+ public List<CachePointGroupDTO> GetCachePointGroups(int areaId, LocationStatusEnum locationAStatus, LocationStatusEnum locationBStatus)
+ {
+ return Db.Queryable<Dt_CachePoint>().Where(a => a.Depth == 1 && a.AreaId == areaId && a.PointStatus == locationAStatus.ObjToInt() && a.PointStatus == locationAStatus.ObjToInt()).InnerJoin(Db.Queryable<Dt_CachePoint>().Where(b => b.Depth == 2 && b.AreaId == areaId && b.PointStatus == locationBStatus.ObjToInt() && b.PointStatus == locationBStatus.ObjToInt()), (a, b) => a.Column == b.Column && a.AreaId == b.AreaId && a.Row != b.Row && SqlFunc.Abs(a.Row - b.Row) == 1).Select((a, b) => new CachePointGroupDTO { DepthA = a.Depth, DepthB = b.Depth, EnableStatusA = a.EnableStatus, EnableStatusB = b.EnableStatus, IdA = a.Id, IdB = b.Id, PointCodeA = a.PointCode, PointCodeB = b.PointCode, PointStatusA = a.PointStatus, PointStatusB = b.PointStatus, PointTypeA = a.PointType, PointTypeB = b.PointType }).ToList();
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/LocationInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/LocationInfoRepository.cs"
index 9aa9d6f..1663761 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/LocationInfoRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/LocationInfoRepository.cs"
@@ -22,12 +22,17 @@
public List<LocationGroupDTO> GetAllLocationGroups(string roadway)
{
- return QueryTabs<Dt_LocationInfo, Dt_LocationInfo, LocationGroupDTO>((a, b) => a.Column == b.Column && a.Layer == b.Layer && a.Row != b.Row && SqlFunc.Abs(a.Row - b.Row) == 1, (a, b) => new LocationGroupDTO { DepthA = a.Depth, DepthB = b.Depth, EnableStatusA = a.EnalbeStatus, EnableStatusB = b.EnalbeStatus, IdA = a.Id, IdB = b.Id, LocationCodeA = a.LocationCode, LocationCodeB = b.LocationCode, LocationStatusA = a.LocationStatus, LocationStatusB = b.LocationStatus, LocationTypeA = a.LocationType, LocationTypeB = b.LocationType }, a => a.Depth == 1 && a.RoadwayNo == roadway, b => b.Depth == 2 && b.RoadwayNo == roadway, x => true);
+ return QueryTabs<Dt_LocationInfo, Dt_LocationInfo, LocationGroupDTO>((a, b) => a.Column == b.Column && a.Layer == b.Layer && a.Row != b.Row && SqlFunc.Abs(a.Row - b.Row) == 1, (a, b) => new LocationGroupDTO { DepthA = a.Depth, DepthB = b.Depth, EnableStatusA = a.EnableStatus, EnableStatusB = b.EnableStatus, IdA = a.Id, IdB = b.Id, LocationCodeA = a.LocationCode, LocationCodeB = b.LocationCode, LocationStatusA = a.LocationStatus, LocationStatusB = b.LocationStatus, LocationTypeA = a.LocationType, LocationTypeB = b.LocationType }, a => a.Depth == 1 && a.RoadwayNo == roadway, b => b.Depth == 2 && b.RoadwayNo == roadway, x => true);
}
public List<LocationGroupDTO> GetLocationGroups(string roadway, LocationStatusEnum locationAStatus, LocationStatusEnum locationBStatus)
{
- return QueryTabs<Dt_LocationInfo, Dt_LocationInfo, LocationGroupDTO>((a, b) => a.Column == b.Column && a.Layer == b.Layer && a.Row != b.Row && SqlFunc.Abs(a.Row - b.Row) == 1, (a, b) => new LocationGroupDTO { DepthA = a.Depth, DepthB = b.Depth, EnableStatusA = a.EnalbeStatus, EnableStatusB = b.EnalbeStatus, IdA = a.Id, IdB = b.Id, LocationCodeA = a.LocationCode, LocationCodeB = b.LocationCode, LocationStatusA = a.LocationStatus, LocationStatusB = b.LocationStatus, LocationTypeA = a.LocationType, LocationTypeB = b.LocationType }, a => a.Depth == 1 && a.RoadwayNo == roadway && a.LocationStatus == locationAStatus.ObjToInt(), b => b.Depth == 2 && b.RoadwayNo == roadway && b.LocationStatus == locationBStatus.ObjToInt(), x => true);
+ return QueryTabs<Dt_LocationInfo, Dt_LocationInfo, LocationGroupDTO>(
+ (a, b) => a.Column == b.Column && a.Layer == b.Layer && a.Row != b.Row && SqlFunc.Abs(a.Row - b.Row) == 1,
+ (a, b) => new LocationGroupDTO { DepthA = a.Depth, DepthB = b.Depth, EnableStatusA = a.EnableStatus, EnableStatusB = b.EnableStatus, IdA = a.Id, IdB = b.Id, LocationCodeA = a.LocationCode, LocationCodeB = b.LocationCode, LocationStatusA = a.LocationStatus, LocationStatusB = b.LocationStatus, LocationTypeA = a.LocationType, LocationTypeB = b.LocationType },
+ a => a.Depth == 1 && a.RoadwayNo == roadway && a.LocationStatus == locationAStatus.ObjToInt(),
+ b => b.Depth == 2 && b.RoadwayNo == roadway && b.LocationStatus == locationBStatus.ObjToInt(),
+ x => true);
}
public override bool UpdateData(Dt_LocationInfo entity)
@@ -37,7 +42,7 @@
public List<string> GetCanOutLocationCodes(List<string> roadways, List<int> areaIds)
{
- return QueryData(x => x.LocationCode, x => roadways.Contains(x.RoadwayNo) && (areaIds.Contains(x.AreaId) || x.AreaId == 0) && x.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnalbeStatus == LocationEnalbeStatusEnum.OnlyOut.ObjToInt() || x.EnalbeStatus == LocationEnalbeStatusEnum.Normal.ObjToInt())).Distinct().ToList();
+ return QueryData(x => x.LocationCode, x => roadways.Contains(x.RoadwayNo) && (areaIds.Contains(x.AreaId) || x.AreaId == 0) && x.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == LocationEnalbeStatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == LocationEnalbeStatusEnum.Normal.ObjToInt())).Distinct().ToList();
}
public List<Dt_LocationInfo> GetLocationInfos(List<string> locationCodes)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/RoadwayInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/RoadwayInfoRepository.cs"
index fc8acad..edeab42 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/RoadwayInfoRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicRepository/RoadwayInfoRepository.cs"
@@ -20,6 +20,6 @@
/// <summary>
/// 鍙嚭搴撶殑宸烽亾缂栧彿闆嗗悎
/// </summary>
- public List<string> CanOutRoadwayNos => QueryData(x => x.RoadwayNo, x => x.EnalbeStatus == RoadwayStatusEnum.Normal.ObjToInt() || x.EnalbeStatus == RoadwayStatusEnum.OnlyOut.ObjToInt()).Distinct().ToList();
+ public List<string> CanOutRoadwayNos => QueryData(x => x.RoadwayNo, x => x.EnableStatus == RoadwayStatusEnum.Normal.ObjToInt() || x.EnableStatus == RoadwayStatusEnum.OnlyOut.ObjToInt()).Distinct().ToList();
}
}
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 a6aedaa..3d498d1 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"
@@ -3,7 +3,10 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
+using WIDESEA_Core.Enums;
+using WIDESEA_Core.Helper;
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
using WIDESEA_Model.Models;
@@ -17,5 +20,7 @@
}
public IAreaInfoRepository Repository => BaseDal;
+
+
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/AreaRouterService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/AreaRouterService.cs"
new file mode 100644
index 0000000..65952e5
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/AreaRouterService.cs"
@@ -0,0 +1,21 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.BaseServices;
+using WIDESEA_IBasicRepository;
+using WIDESEA_IBasicService;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_BasicService
+{
+ public class AreaRouterService : ServiceBase<Dt_AreaRouter, IAreaRouterRepository>, IAreaRouterService
+ {
+ public AreaRouterService(IAreaRouterRepository BaseDal) : base(BaseDal)
+ {
+ }
+
+ public IAreaRouterRepository Repository => BaseDal;
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs"
new file mode 100644
index 0000000..72c4f21
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/BasicService.cs"
@@ -0,0 +1,222 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.BaseRepository;
+using WIDESEA_Core.Enums;
+using WIDESEA_Core;
+using WIDESEA_IBasicService;
+using WIDESEA_Model.Models;
+using WIDESEA_Core.Helper;
+
+namespace WIDESEA_BasicService
+{
+ public class BasicService : IBasicService
+ {
+ public IAreaInfoService AreaInfoService { get; }
+
+ public ILocationInfoService LocationInfoService { get; }
+
+ public IMaterielInfoService MaterielInfoService { get; }
+
+ public IRoadwayInfoService RoadwayInfoService { get; }
+
+ public IWarehouseService WarehouseService { get; }
+
+ public IAreaRouterService AreaRouterService { get; }
+
+ public ICachePointService CachePointService { get; }
+
+ public BasicService(IAreaInfoService areaInfoService, ILocationInfoService locationInfoService, IMaterielInfoService materielInfoService, IRoadwayInfoService roadwayInfoService, IWarehouseService warehouseService, IAreaRouterService areaRouterService, ICachePointService cachePointService)
+ {
+ AreaInfoService = areaInfoService;
+ LocationInfoService = locationInfoService;
+ MaterielInfoService = materielInfoService;
+ RoadwayInfoService = roadwayInfoService;
+ WarehouseService = warehouseService;
+ AreaRouterService = areaRouterService;
+ CachePointService = cachePointService;
+ }
+
+ #region AreaInfo
+ public WebResponseContent AreaEnableStatus(int[] keys)
+ {
+ List<Dt_AreaInfo> areaInfos = AreaInfoService.Repository.QueryData(x => keys.Contains(x.Id));
+ areaInfos.ForEach(x =>
+ {
+ x.AreaStatus = EnableEnum.Enable.ObjToInt();
+ });
+ AreaInfoService.Repository.UpdateData(areaInfos);
+
+ return WebResponseContent.Instance.OK();
+ }
+
+ public WebResponseContent AreaDisableStatus(int[] keys)
+ {
+ List<Dt_AreaInfo> areaInfos = AreaInfoService.Repository.QueryData(x => keys.Contains(x.Id));
+ areaInfos.ForEach(x =>
+ {
+ x.AreaStatus = EnableEnum.Disable.ObjToInt();
+ });
+ AreaInfoService.Repository.UpdateData(areaInfos);
+
+ return WebResponseContent.Instance.OK();
+ }
+
+ public WebResponseContent AreaEnableStatus(int key)
+ {
+ return AreaEnableStatus(new int[] { key });
+ }
+
+ public WebResponseContent AreaDisableStatus(int key)
+ {
+ return AreaDisableStatus(new int[] { key });
+ }
+ #endregion
+
+ #region CachePoint
+ public WebResponseContent CachePointEnableStatus(int[] keys)
+ {
+ List<Dt_CachePoint> cachePoints = CachePointService.Repository.QueryData(x => keys.Contains(x.Id));
+ cachePoints.ForEach(x =>
+ {
+ x.EnableStatus = EnableEnum.Enable.ObjToInt();
+ });
+ CachePointService.Repository.UpdateData(cachePoints);
+
+ return WebResponseContent.Instance.OK();
+ }
+
+ public WebResponseContent CachePointDisableStatus(int[] keys)
+ {
+ List<Dt_CachePoint> cachePoints = CachePointService.Repository.QueryData(x => keys.Contains(x.Id));
+ cachePoints.ForEach(x =>
+ {
+ x.EnableStatus = EnableEnum.Disable.ObjToInt();
+ });
+ CachePointService.Repository.UpdateData(cachePoints);
+
+ return WebResponseContent.Instance.OK();
+ }
+
+ public WebResponseContent CachePointEnableStatus(int key)
+ {
+ return CachePointEnableStatus(new int[] { key });
+ }
+
+ public WebResponseContent CachePointDisableStatus(int key)
+ {
+ return CachePointDisableStatus(new int[] { key });
+ }
+ #endregion
+
+ #region LocationInfo
+ public WebResponseContent LocationEnableStatus(int[] keys)
+ {
+ List<Dt_LocationInfo> locationInfos = LocationInfoService.Repository.QueryData(x => keys.Contains(x.Id));
+ locationInfos.ForEach(x =>
+ {
+ x.EnableStatus = EnableEnum.Enable.ObjToInt();
+ });
+ LocationInfoService.Repository.UpdateData(locationInfos);
+
+ return WebResponseContent.Instance.OK();
+ }
+
+ public WebResponseContent LocationDisableStatus(int[] keys)
+ {
+ List<Dt_LocationInfo> locationInfos = LocationInfoService.Repository.QueryData(x => keys.Contains(x.Id));
+ locationInfos.ForEach(x =>
+ {
+ x.EnableStatus = EnableEnum.Disable.ObjToInt();
+ });
+ LocationInfoService.Repository.UpdateData(locationInfos);
+
+ return WebResponseContent.Instance.OK();
+ }
+
+ public WebResponseContent LocationEnableStatus(int key)
+ {
+ return LocationEnableStatus(new int[] { key });
+ }
+
+ public WebResponseContent LocationDisableStatus(int key)
+ {
+ return LocationDisableStatus(new int[] { key });
+ }
+ #endregion
+
+ #region RoadwayInfo
+ public WebResponseContent RoadwayEnableStatus(int[] keys)
+ {
+ List<Dt_RoadwayInfo> roadwayInfos = RoadwayInfoService.Repository.QueryData(x => keys.Contains(x.Id));
+ roadwayInfos.ForEach(x =>
+ {
+ x.EnableStatus = EnableEnum.Enable.ObjToInt();
+ });
+ RoadwayInfoService.Repository.UpdateData(roadwayInfos);
+
+ return WebResponseContent.Instance.OK();
+ }
+
+ public WebResponseContent RoadwayDisableStatus(int[] keys)
+ {
+ List<Dt_RoadwayInfo> roadwayInfos = RoadwayInfoService.Repository.QueryData(x => keys.Contains(x.Id));
+ roadwayInfos.ForEach(x =>
+ {
+ x.EnableStatus = EnableEnum.Disable.ObjToInt();
+ });
+ RoadwayInfoService.Repository.UpdateData(roadwayInfos);
+
+ return WebResponseContent.Instance.OK();
+ }
+
+ public WebResponseContent RoadwayEnableStatus(int key)
+ {
+ return RoadwayEnableStatus(new int[] { key });
+ }
+
+ public WebResponseContent RoadwayDisableStatus(int key)
+ {
+ return RoadwayDisableStatus(new int[] { key });
+ }
+ #endregion
+
+ #region Warehouse
+ public WebResponseContent WarehouseEnableStatus(int[] keys)
+ {
+ List<Dt_Warehouse> warehouses = WarehouseService.Repository.QueryData(x => keys.Contains(x.Id));
+ warehouses.ForEach(x =>
+ {
+ x.WarehouseStatus = EnableEnum.Enable.ObjToInt();
+ });
+ WarehouseService.Repository.UpdateData(warehouses);
+
+ return WebResponseContent.Instance.OK();
+ }
+
+ public WebResponseContent WarehouseDisableStatus(int[] keys)
+ {
+ List<Dt_Warehouse> warehouses = WarehouseService.Repository.QueryData(x => keys.Contains(x.Id));
+ warehouses.ForEach(x =>
+ {
+ x.WarehouseStatus = EnableEnum.Disable.ObjToInt();
+ });
+ WarehouseService.Repository.UpdateData(warehouses);
+
+ return WebResponseContent.Instance.OK();
+ }
+
+ public WebResponseContent WarehouseEnableStatus(int key)
+ {
+ return WarehouseEnableStatus(new int[] { key });
+ }
+
+ public WebResponseContent WarehouseDisableStatus(int key)
+ {
+ return WarehouseDisableStatus(new int[] { key });
+ }
+ #endregion
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/CachePointService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/CachePointService.cs"
new file mode 100644
index 0000000..a9bd2be
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/CachePointService.cs"
@@ -0,0 +1,73 @@
+锘縰sing SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core;
+using WIDESEA_Core.BaseServices;
+using WIDESEA_Core.Enums;
+using WIDESEA_Core.Helper;
+using WIDESEA_DTO.Basic;
+using WIDESEA_IBasicRepository;
+using WIDESEA_IBasicService;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_BasicService
+{
+ public class CachePointService : ServiceBase<Dt_CachePoint, ICachePointRepository>, ICachePointService
+ {
+ public CachePointService(ICachePointRepository BaseDal) : base(BaseDal)
+ {
+ }
+
+ public ICachePointRepository Repository => BaseDal;
+
+ private readonly Dictionary<string, OrderByType> _emptyAssignOrderBy = new()
+ {
+ { nameof(Dt_CachePoint.Depth), OrderByType.Desc },
+ { nameof(Dt_CachePoint.Column), OrderByType.Asc },
+ { nameof(Dt_CachePoint.Row), OrderByType.Asc },
+ };
+
+ public Dt_CachePoint? AssignCachePoint(int areaId)
+ {
+ List<CachePointGroupDTO> cachePointGroups = Repository.GetCachePointGroups(areaId, LocationStatusEnum.InStock, LocationStatusEnum.Free);
+ if (cachePointGroups != null && cachePointGroups.Count > 0)
+ {
+ CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusB == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusB == LocationEnalbeStatusEnum.Normal.ObjToInt());
+ int id = pointGroupDTO?.IdB ?? 0;
+ return BaseDal.QueryFirst(x => x.Id == id);
+ }
+ cachePointGroups = Repository.GetCachePointGroups(areaId, LocationStatusEnum.Free, LocationStatusEnum.Free);
+ if (cachePointGroups != null && cachePointGroups.Count > 0)
+ {
+ CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusA == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusA == LocationEnalbeStatusEnum.Normal.ObjToInt());
+ int id = pointGroupDTO?.IdA ?? 0;
+ return BaseDal.QueryFirst(x => x.Id == id);
+ }
+
+ return BaseDal.QueryFirst(x => x.PointStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == LocationEnalbeStatusEnum.Normal.ObjToInt() && x.AreaId == areaId), _emptyAssignOrderBy);
+ }
+
+ public Dt_CachePoint? GetIbStockCachePoint(int areaId)
+ {
+ List<CachePointGroupDTO> cachePointGroups = Repository.GetCachePointGroups(areaId, LocationStatusEnum.InStock, LocationStatusEnum.Free);
+ if (cachePointGroups != null && cachePointGroups.Count > 0)
+ {
+ CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusA == LocationEnalbeStatusEnum.OnlyOut.ObjToInt() || x.EnableStatusA == LocationEnalbeStatusEnum.Normal.ObjToInt());
+ int id = pointGroupDTO?.IdA ?? 0;
+ return BaseDal.QueryFirst(x => x.Id == id);
+ }
+ cachePointGroups = Repository.GetCachePointGroups(areaId, LocationStatusEnum.InStock, LocationStatusEnum.InStock);
+ if (cachePointGroups != null && cachePointGroups.Count > 0)
+ {
+ CachePointGroupDTO? pointGroupDTO = cachePointGroups.FirstOrDefault(x => x.EnableStatusB == LocationEnalbeStatusEnum.OnlyOut.ObjToInt() || x.EnableStatusB == LocationEnalbeStatusEnum.Normal.ObjToInt());
+ int id = pointGroupDTO?.IdB ?? 0;
+ return BaseDal.QueryFirst(x => x.Id == id);
+ }
+
+ return BaseDal.QueryFirst(x => x.PointStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == LocationEnalbeStatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == LocationEnalbeStatusEnum.Normal.ObjToInt() && x.AreaId == areaId), _emptyAssignOrderBy);
+ }
+ }
+}
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 5b0b8d9..1a043f5 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"
@@ -18,9 +18,7 @@
{
public class LocationInfoService : ServiceBase<Dt_LocationInfo, ILocationInfoRepository>, ILocationInfoService
{
- private readonly IAreaInfoRepository _areaInfoRepository;
- private readonly IWarehouseRepository _warehouseRepository;
- private readonly IRoadwayInfoRepository _roadwayInfoRepository;
+ private readonly IBasicRepository _basicRepository;
private Dictionary<string, OrderByType> _emptyAssignOrderBy = new Dictionary<string, OrderByType>()
{
@@ -32,11 +30,9 @@
public ILocationInfoRepository Repository => BaseDal;
- public LocationInfoService(ILocationInfoRepository BaseDal, IAreaInfoRepository areaInfoRepository, IWarehouseRepository warehouseRepository, IRoadwayInfoRepository roadwayInfoRepository) : base(BaseDal)
+ public LocationInfoService(ILocationInfoRepository BaseDal, IBasicRepository basicRepository) : base(BaseDal)
{
- _areaInfoRepository = areaInfoRepository;
- _warehouseRepository = warehouseRepository;
- _roadwayInfoRepository = roadwayInfoRepository;
+ _basicRepository = basicRepository;
}
public override WebResponseContent AddData(SaveModel saveModel)
@@ -48,17 +44,17 @@
{
try
{
- Dt_RoadwayInfo roadwayInfo = _roadwayInfoRepository.QueryFirst(x => x.InStationCode == stationCode) ?? throw new Exception("鏈壘鍒拌绔欏彴瀵瑰簲鐨勫贩閬擄紝璇锋鏌ュ熀纭�閰嶇疆淇℃伅");
- if (roadwayInfo.EnalbeStatus != RoadwayStatusEnum.Normal.ObjToInt() && roadwayInfo.EnalbeStatus != RoadwayStatusEnum.OnlyIn.ObjToInt())
+ Dt_RoadwayInfo roadwayInfo = _basicRepository.RoadwayInfoRepository.QueryFirst(x => x.InStationCode == stationCode) ?? throw new Exception("鏈壘鍒拌绔欏彴瀵瑰簲鐨勫贩閬擄紝璇锋鏌ュ熀纭�閰嶇疆淇℃伅");
+ if (roadwayInfo.EnableStatus != RoadwayStatusEnum.Normal.ObjToInt() && roadwayInfo.EnableStatus != RoadwayStatusEnum.OnlyIn.ObjToInt())
{
throw new Exception("璇ュ贩閬撲笉鍙叆搴擄紝璇锋鏌ュ贩閬撶鐢ㄤ俊鎭�");
}
- if (roadwayInfo.WarehouseId > 0)
+ if (roadwayInfo.AreaId > 0)
{
- Dt_Warehouse warehouse = _warehouseRepository.QueryFirst(x => x.Id == roadwayInfo.WarehouseId);
- if (warehouse != null && warehouse.WarehouseStatus == EnableEnum.Disable.ObjToInt())
+ Dt_AreaInfo areaInfo = _basicRepository.AreaInfoRepository.QueryFirst(x => x.Id == roadwayInfo.AreaId);
+ if (areaInfo != null && areaInfo.AreaStatus == EnableEnum.Disable.ObjToInt())
{
- throw new Exception("浠撳簱琚鐢紝涓嶅彲鍏ュ簱");
+ throw new Exception("鍖哄煙琚鐢紝涓嶅彲鍏ュ簱");
}
}
if (inboundType == TaskTypeEnum.PalletInbound.ObjToInt())//绌虹洏鍏ュ簱鍒嗛厤閫昏緫
@@ -80,34 +76,42 @@
private Dt_LocationInfo EmptyAssignLocation(string roadway)
{
- List<LocationGroupDTO> locationGroups = BaseDal.GetLocationGroups(roadway, LocationStatusEnum.Free, LocationStatusEnum.Pallet);
+ List<LocationGroupDTO> locationGroups = BaseDal.GetLocationGroups(roadway, LocationStatusEnum.Pallet, LocationStatusEnum.Free);
if (locationGroups != null && locationGroups.Count > 0)
{
- return BaseDal.QueryFirst(x => x.Id == locationGroups.FirstOrDefault().IdA);
+ LocationGroupDTO? locationGroup = locationGroups.FirstOrDefault(x => x.EnableStatusA == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusA == LocationEnalbeStatusEnum.Normal.ObjToInt());
+ int id = locationGroup?.IdA ?? 0;
+ return BaseDal.QueryFirst(x => x.Id == id);
}
locationGroups = BaseDal.GetLocationGroups(roadway, LocationStatusEnum.Free, LocationStatusEnum.Free);
if (locationGroups != null && locationGroups.Count > 0)
{
- return BaseDal.QueryFirst(x => x.Id == locationGroups.FirstOrDefault().IdB);
+ LocationGroupDTO? locationGroup = locationGroups.FirstOrDefault(x => x.EnableStatusB == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusB == LocationEnalbeStatusEnum.Normal.ObjToInt());
+ int id = locationGroup?.IdB ?? 0;
+ return BaseDal.QueryFirst(x => x.Id == id);
}
- return BaseDal.QueryFirst(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnalbeStatus == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnalbeStatus == LocationEnalbeStatusEnum.Normal.ObjToInt() && x.RoadwayNo == roadway), _emptyAssignOrderBy);
+ return BaseDal.QueryFirst(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == LocationEnalbeStatusEnum.Normal.ObjToInt() && x.RoadwayNo == roadway), _emptyAssignOrderBy);
}
private Dt_LocationInfo StoredAssignLocation(string roadway)
{
- List<LocationGroupDTO> locationGroups = BaseDal.GetLocationGroups(roadway, LocationStatusEnum.Free, LocationStatusEnum.InStock);
- if (locationGroups != null && locationGroups.Count > 0)
+ List<LocationGroupDTO> locationGroups = BaseDal.GetLocationGroups(roadway, LocationStatusEnum.InStock, LocationStatusEnum.Free);
+ if (locationGroups != null)
{
- return BaseDal.QueryFirst(x => x.Id == locationGroups.FirstOrDefault().IdA);
+ LocationGroupDTO? locationGroup = locationGroups.FirstOrDefault(x => x.EnableStatusA == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusA == LocationEnalbeStatusEnum.Normal.ObjToInt());
+ int id = locationGroup?.IdA ?? 0;
+ return BaseDal.QueryFirst(x => x.Id == id);
}
locationGroups = BaseDal.GetLocationGroups(roadway, LocationStatusEnum.Free, LocationStatusEnum.Free);
if (locationGroups != null && locationGroups.Count > 0)
{
- return BaseDal.QueryFirst(x => x.Id == locationGroups.FirstOrDefault().IdB);
+ LocationGroupDTO? locationGroup = locationGroups.FirstOrDefault(x => x.EnableStatusB == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnableStatusB == LocationEnalbeStatusEnum.Normal.ObjToInt());
+ int id = locationGroup?.IdB ?? 0;
+ return BaseDal.QueryFirst(x => x.Id == id);
}
- return BaseDal.QueryFirst(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnalbeStatus == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnalbeStatus == LocationEnalbeStatusEnum.Normal.ObjToInt() && x.RoadwayNo == roadway), _emptyAssignOrderBy);
+ return BaseDal.QueryFirst(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && (x.EnableStatus == LocationEnalbeStatusEnum.OnlyIn.ObjToInt() || x.EnableStatus == LocationEnalbeStatusEnum.Normal.ObjToInt() && x.RoadwayNo == roadway), _emptyAssignOrderBy);
}
public Dt_LocationInfo AdjacentDepthLocation(string locationCode)
@@ -140,7 +144,7 @@
{
AreaId = 0,
Column = j + 1,
- EnalbeStatus = LocationEnalbeStatusEnum.Normal.ObjToInt(),
+ EnableStatus = LocationEnalbeStatusEnum.Normal.ObjToInt(),
Layer = k + 1,
LocationStatus = LocationStatusEnum.Free.ObjToInt(),
LocationType = LocationTypeEnum.Cube.ObjToInt(),
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/AGVTaskFeedBackModel.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/AGVTaskFeedBackModel.cs"
new file mode 100644
index 0000000..ce6e3ec
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Common/AGVTaskFeedBackModel.cs"
@@ -0,0 +1,15 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEA_Common
+{
+ public class AGVTaskFeedBackModel
+ {
+ public string Task_id { get; set; }
+
+ public string Task_status { get; set; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/PageDataOptions.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/PageDataOptions.cs"
index bffe798..5ce5196 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/PageDataOptions.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/PageDataOptions.cs"
@@ -1,8 +1,13 @@
-锘縰sing System;
+锘縰sing SqlSugar;
+using 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.Helper;
+using WIDESEA_Core.Utilities;
namespace WIDESEA_Core
{
@@ -24,6 +29,96 @@
/// 鏌ヨ鏉′欢
/// </summary>
public List<SearchParameters> Filter { get; set; }
+
+ public string ValidatePageOptions(PropertyInfo[] entityProperties)
+ {
+ string where = string.Empty;
+ List<SearchParameters> searchParametersList = new List<SearchParameters>();
+ if (this.Filter != null && this.Filter.Count > 0)
+ {
+ searchParametersList.AddRange(Filter);
+ }
+ else if (!string.IsNullOrEmpty(Wheres))
+ {
+ try
+ {
+ searchParametersList = Wheres.DeserializeObject<List<SearchParameters>>();
+ Filter = searchParametersList;
+ }
+ catch { }
+ }
+ for (int i = 0; i < searchParametersList.Count; i++)
+ {
+ if (string.IsNullOrEmpty(searchParametersList[i].Value))
+ {
+ continue;
+ }
+
+ PropertyInfo? property = entityProperties.Where(c => c.Name.ToUpper() == searchParametersList[i].Name.ToUpper()).FirstOrDefault();
+
+ if (property == null) continue;
+
+ List<(bool, string, object)> results = property.ValidationValueForDbType(searchParametersList[i].Value.Split(',')).ToList();
+ if (results == null || results.Count() == 0)
+ {
+ continue;
+ }
+ for (int j = 0; j < results.Count(); j++)
+ {
+ if (j == 0)
+ {
+ where += "(";
+ }
+ LinqExpressionType expressionType = searchParametersList[i].DisplayType.GetLinqCondition();
+ if (expressionType == LinqExpressionType.Equal)
+ {
+ where += $"{searchParametersList[i].Name} = '{results[j].Item3}'";
+ }
+ else
+ {
+ where += $"{searchParametersList[i].Name} {searchParametersList[i].DisplayType} '{results[j].Item3}'";
+ }
+
+ if (j == results.Count() - 1)
+ {
+ where += ")";
+ }
+ else
+ {
+ where += " or ";
+ }
+ }
+ if (i < searchParametersList.Count - 1)
+ where += " and ";
+ }
+ return where;
+ }
+
+
+ public Dictionary<string, OrderByType> GetPageDataSort(PropertyInfo[] propertyInfo)
+ {
+ if (!string.IsNullOrEmpty(Sort))
+ {
+ if (Sort.Contains(","))
+ {
+ List<string> sortArr = Sort.Split(",").Where(x => propertyInfo.Any(p => p.Name == x)).ToList();
+ Dictionary<string, OrderByType> sortDic = new Dictionary<string, OrderByType>();
+ foreach (var item in sortArr)
+ {
+ sortDic[item] = Order?.ToLower() == OrderByType.Asc.ToString() ? OrderByType.Asc : OrderByType.Desc;
+ }
+ return sortDic;
+ }
+ else if (propertyInfo.Any(x => x.Name == Sort.FirstLetterToLower() || x.Name == Sort.FirstLetterToUpper()))
+ {
+ return new Dictionary<string, OrderByType> {
+ {
+ Sort,Order?.ToLower() == OrderByType.Asc.ToString() ? OrderByType.Asc : OrderByType.Desc
+ } };
+ }
+ }
+ return new Dictionary<string, OrderByType> { { "CreateDate", Order?.ToLower() == OrderByType.Asc.ToString() ? OrderByType.Asc : OrderByType.Desc } };
+ }
}
public class SearchParameters
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/IRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/IRepository.cs"
index 4def7b8..5f57b15 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/IRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/IRepository.cs"
@@ -7,6 +7,7 @@
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
+using WIDESEA_Core.Enums;
namespace WIDESEA_Core.BaseRepository
{
@@ -70,6 +71,10 @@
Task<bool> DeleteDataByIdAsync(object id);
+ bool DeleteAndMoveIntoHty(TEntity entity, OperateType operateType);
+
+ bool DeleteAndMoveIntoHty(List<TEntity> entities, OperateType operateType);
+
/// <summary>
/// 閫氳繃涓婚敭鏁版嵁鍒犻櫎澶氭潯鏁版嵁
/// </summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/RepositoryBase.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/RepositoryBase.cs"
index 9346461..681b8e3 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/RepositoryBase.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/RepositoryBase.cs"
@@ -16,6 +16,11 @@
using WIDESEA_Core.Const;
using WIDESEA_Core.AOP;
using OfficeOpenXml.FormulaParsing.ExpressionGraph;
+using WIDESEA_Core.Enums;
+using WIDESEA_Core.Utilities;
+using Microsoft.AspNetCore.Mvc.RazorPages;
+using NetTaste;
+using WIDESEA_Core.DB.Models;
namespace WIDESEA_Core.BaseRepository
{
@@ -537,7 +542,7 @@
public virtual List<TResult> QueryTabs<T, T2, TResult>(
Expression<Func<T, T2, object[]>> joinExpression,
Expression<Func<T, T2, TResult>> selectExpression,
- Expression<Func<T,T2, bool>> whereExpressionT1,
+ Expression<Func<T, T2, bool>> whereExpressionT1,
Expression<Func<TResult, bool>> whereExpression)
{
List<TResult> list = _db.Queryable(joinExpression).WhereIF(whereExpressionT1 != null, whereExpressionT1)
@@ -859,6 +864,103 @@
.WhereIF(whereExpression != null, whereExpression).ToListAsync();
}
+ public bool DeleteAndMoveIntoHty(TEntity entity, OperateType operateType)
+ {
+ Type type = entity.GetType();
+ Assembly assembly = type.Assembly;
+ Type? htyType = assembly.GetType(type.FullName + "_Hty");
+ if (htyType != null)
+ {
+ object? obj = Activator.CreateInstance(htyType);
+ PropertyInfo keyPro = typeof(TEntity).GetKeyProperty();
+ PropertyInfo? operateTypePro = htyType.GetProperty(nameof(OperateType));
+ PropertyInfo? sourceIdPro = htyType.GetProperty("SourceId");
+ if (obj != null && keyPro != null && operateTypePro != null && sourceIdPro != null)
+ {
+ operateTypePro.SetValue(obj, operateType.ToString());
+ sourceIdPro.SetValue(obj, keyPro.GetValue(entity));
+
+ List<PropertyInfo> propertyInfos = htyType.GetProperties().Where(x => x.Name != operateTypePro.Name && x.Name != sourceIdPro.Name && x.Name != keyPro.Name).ToList();
+
+ for (int i = 0; i < propertyInfos.Count; i++)
+ {
+ PropertyInfo propertyInfo = propertyInfos[i];
+ PropertyInfo? property = type.GetProperty(propertyInfo.Name);
+
+ if (property != null)
+ {
+ if (propertyInfo.Name == nameof(BaseEntity.Modifier))
+ {
+ propertyInfo.SetValue(obj, App.User.UserId > 0 ? App.User.UserName : App.User.UserId.ToString());
+ }
+ else if (propertyInfo.Name == nameof(BaseEntity.ModifyDate))
+ {
+ propertyInfo.SetValue(obj, DateTime.Now);
+ }
+ else
+ {
+ propertyInfo.SetValue(obj, property.GetValue(entity));
+ }
+ }
+ }
+ _db.InsertableByObject(obj).AS(type.Name + "_Hty").ExecuteCommand();
+ }
+ }
+ return DeleteData(entity);
+ }
+
+ public bool DeleteAndMoveIntoHty(List<TEntity> entities, OperateType operateType)
+ {
+ Type type = typeof(TEntity);
+ Assembly assembly = type.Assembly;
+ Type? htyType = assembly.GetType(type.FullName + "_Hty");
+ if (htyType != null)
+ {
+ object? obj2 = Activator.CreateInstance(htyType);
+ PropertyInfo keyPro = typeof(TEntity).GetKeyProperty();
+ PropertyInfo? operateTypePro = htyType.GetProperty(nameof(OperateType));
+ PropertyInfo? sourceIdPro = htyType.GetProperty("SourceId");
+ if (obj2 != null && keyPro != null && operateTypePro != null && sourceIdPro != null)
+ {
+ List<PropertyInfo> propertyInfos = htyType.GetProperties().Where(x => x.Name != operateTypePro.Name && x.Name != sourceIdPro.Name && x.Name != keyPro.Name).ToList();
+ List<object> list = new List<object>();
+ foreach (var item in entities)
+ {
+ object? obj = Activator.CreateInstance(htyType);
+ if (obj != null)
+ {
+ operateTypePro.SetValue(obj, operateType.ToString());
+ sourceIdPro.SetValue(obj, keyPro.GetValue(item));
+ for (int i = 0; i < propertyInfos.Count; i++)
+ {
+ PropertyInfo propertyInfo = propertyInfos[i];
+ PropertyInfo? property = type.GetProperty(propertyInfo.Name);
+
+ if (property != null)
+ {
+ if (propertyInfo.Name == nameof(BaseEntity.Modifier))
+ {
+ propertyInfo.SetValue(obj, App.User.UserId > 0 ? App.User.UserName : App.User.UserId.ToString());
+ }
+ else if (propertyInfo.Name == nameof(BaseEntity.ModifyDate))
+ {
+ propertyInfo.SetValue(obj, DateTime.Now);
+ }
+ else
+ {
+ propertyInfo.SetValue(obj, property.GetValue(item));
+ }
+ }
+ }
+ list.Add(obj);
+ }
+ }
+ _db.InsertableByObject(list).AS(type.Name + "_Hty").ExecuteCommand();
+
+ }
+ }
+ return DeleteData(entities);
+ }
//List<TResult> QueryMuch<T, T2, T3, TResult>(
// Expression<Func<T, T2, T3, object[]>> joinExpression,
// Expression<Func<T, T2, T3, TResult>> selectExpression,
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 610c767..6de637e 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"
@@ -34,7 +34,7 @@
public ISqlSugarClient Db => BaseDal.Db;
private PropertyInfo[] _propertyInfo { get; set; } = null;
- private PropertyInfo[] TProperties
+ public PropertyInfo[] TProperties
{
get
{
@@ -49,112 +49,14 @@
public virtual PageGridData<TEntity> GetPageData(PageDataOptions options)
{
- string wheres = ValidatePageOptions(options);
+ string wheres = options.ValidatePageOptions(TProperties);
//鑾峰彇鎺掑簭瀛楁
- Dictionary<string, OrderByType> orderbyDic = GetPageDataSort(options, TProperties);
+ Dictionary<string, OrderByType> orderbyDic = options.GetPageDataSort(TProperties);
PageGridData<TEntity> pageGridData = new PageGridData<TEntity>();
pageGridData = BaseDal.QueryPage(wheres, options.Page, options.Rows, orderbyDic);
return pageGridData;
- }
-
- protected string ValidatePageOptions(PageDataOptions options)
- {
- options = options ?? new PageDataOptions();
- string where = "";
- List<SearchParameters> searchParametersList = new List<SearchParameters>();
- if (options.Filter != null && options.Filter.Count > 0)
- {
- searchParametersList.AddRange(options.Filter);
- }
- else if (!string.IsNullOrEmpty(options.Wheres))
- {
- try
- {
- searchParametersList = options.Wheres.DeserializeObject<List<SearchParameters>>();
- options.Filter = searchParametersList;
- }
- catch { }
- }
- QueryRelativeList?.Invoke(searchParametersList);
-
- for (int i = 0; i < searchParametersList.Count; i++)
- {
- if (string.IsNullOrEmpty(searchParametersList[i].Value))
- {
- continue;
- }
-
- PropertyInfo property = TProperties.Where(c => c.Name.ToUpper() == searchParametersList[i].Name.ToUpper()).FirstOrDefault();
-
- if (property == null) continue;
-
- List<(bool, string, object)> results = property.ValidationValueForDbType(searchParametersList[i].Value.Split(',')).ToList();
- if (results == null || results.Count() > 0)
- {
- continue;
- }
- for (int j = 0; j < results.Count(); j++)
- {
- if (j == 0)
- {
- where += "(";
- }
- LinqExpressionType expressionType = searchParametersList[i].DisplayType.GetLinqCondition();
- if (expressionType == LinqExpressionType.Equal)
- {
- where += $"{searchParametersList[i].Name} = '{results[j].Item3}'";
- }
- else
- {
- where += $"{searchParametersList[i].Name} {searchParametersList[i].DisplayType} '{results[j].Item3}'";
- }
-
- if (j == results.Count() - 1)
- {
- where += ")";
- }
- else
- {
- where += " or ";
- }
- }
- if (i < searchParametersList.Count - 1)
- where += " and ";
- }
- return where;
- }
-
- /// <summary>
- /// 鑾峰彇鎺掑簭瀛楁
- /// </summary>
- /// <param name="pageData"></param>
- /// <param name="propertyInfo"></param>
- /// <returns></returns>
- private Dictionary<string, OrderByType> GetPageDataSort(PageDataOptions pageData, PropertyInfo[] propertyInfo)
- {
- if (!string.IsNullOrEmpty(pageData.Sort))
- {
- if (pageData.Sort.Contains(","))
- {
- List<string> sortArr = pageData.Sort.Split(",").Where(x => propertyInfo.Any(p => p.Name == x)).ToList();
- Dictionary<string, OrderByType> sortDic = new Dictionary<string, OrderByType>();
- foreach (var item in sortArr)
- {
- sortDic[item] = pageData.Order?.ToLower() == OrderByType.Asc.ToString() ? OrderByType.Asc : OrderByType.Desc;
- }
- return sortDic;
- }
- else if (propertyInfo.Any(x => x.Name == pageData.Sort.FirstLetterToLower() || x.Name == pageData.Sort.FirstLetterToUpper()))
- {
- return new Dictionary<string, OrderByType> {
- {
- pageData.Sort,pageData.Order?.ToLower() == OrderByType.Asc.ToString() ? OrderByType.Asc : OrderByType.Desc
- } };
- }
- }
- return new Dictionary<string, OrderByType> { { "CreateDate", pageData.Order?.ToLower() == OrderByType.Asc.ToString() ? OrderByType.Asc : OrderByType.Desc } };
}
public virtual object GetDetailPage(PageDataOptions pageData)
@@ -242,8 +144,8 @@
}
else if (keyPro.PropertyType == typeof(int) || keyPro.PropertyType == typeof(long))
{
- SugarColumn sugarColumn = keyPro.GetCustomAttribute<SugarColumn>();
- if (sugarColumn.IsIdentity)
+ SugarColumn? sugarColumn = keyPro.GetCustomAttribute<SugarColumn>();
+ if (sugarColumn?.IsIdentity ?? true)
{
saveModel.MainData.Remove(keyPro.Name.FirstLetterToUpper());
saveModel.MainData.Remove(keyPro.Name.FirstLetterToLower());
@@ -603,9 +505,9 @@
string savePath = AppDomain.CurrentDomain.BaseDirectory + $"ExcelExport";
IExporter exporter = new ExcelExporter();
- string wheres = ValidatePageOptions(options);
+ string wheres = options.ValidatePageOptions(TProperties);
//鑾峰彇鎺掑簭瀛楁
- Dictionary<string, OrderByType> orderbyDic = GetPageDataSort(options, TProperties);
+ Dictionary<string, OrderByType> orderbyDic = options.GetPageDataSort(TProperties);
List<TEntity> entities = BaseDal.QueryData(wheres, orderbyDic);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/ManageEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/ManageEnum.cs"
index fb1d6c4..f3afbf0 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/ManageEnum.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/ManageEnum.cs"
@@ -38,7 +38,7 @@
#endregion 搴撳瓨鐘舵��
- public enum OperateTypeEnum
+ public enum OperateType
{
浜哄伐鍒犻櫎 = 1,
鑷姩鍒犻櫎 = 2,
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/SequenceEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/SequenceEnum.cs"
new file mode 100644
index 0000000..51cc259
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/SequenceEnum.cs"
@@ -0,0 +1,13 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEA_Core.Enums
+{
+ public enum SequenceEnum
+ {
+ SeqTaskNum
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/TaskEnum.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/TaskEnum.cs"
index 60e7659..2ca34c9 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/TaskEnum.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Enums/TaskEnum.cs"
@@ -14,8 +14,6 @@
/// </summary>
public enum TaskTypeEnum
{
-
-
/// <summary>
/// 鍑哄簱 =100
/// </summary>
@@ -89,7 +87,9 @@
/// <summary>
/// 搴撳绉诲簱
/// </summary>
- RelocationOut = 302
+ RelocationOut = 302,
+
+ AGVCarry = 500,
}
#endregion 浠诲姟绫诲瀷
@@ -105,27 +105,6 @@
/// 鏂板缓鍏ュ簱浠诲姟
/// </summary>
InNew = 200,
-
- /// <summary>
- /// AGV鍏ュ簱鎵ц涓�
- /// </summary>
- AGV_InExecuting = 210,
-
- /// <summary>
- /// AGV鍏ュ簱瀹屾垚
- /// </summary>
- AGV_InFinish = 215,
-
- /// <summary>
- /// 杈撻�佺嚎鍏ュ簱鎵ц涓�
- /// </summary>
- Line_InExecuting = 220,
-
- /// <summary>
- /// 杈撻�佺嚎鍏ュ簱瀹屾垚
- /// </summary>
- Line_InFinish = 225,
-
/// <summary>
/// 鍫嗗灈鏈哄叆搴撴墽琛屼腑
/// </summary>
@@ -168,27 +147,6 @@
/// 鏂板缓浠诲姟
/// </summary>
OutNew = 100,
-
- /// <summary>
- /// AGV鎵ц涓�
- /// </summary>
- AGV_OutExecuting = 110,
-
- /// <summary>
- /// AGV鍑哄簱瀹屾垚
- /// </summary>
- AGV_OutFinish = 115,
-
- /// <summary>
- /// 杈撻�佺嚎鍑哄簱鎵ц涓�
- /// </summary>
- Line_OutExecuting = 120,
-
- /// <summary>
- /// 杈撻�佺嚎鍑哄簱瀹屾垚
- /// </summary>
- Line_OutFinish = 125,
-
/// <summary>
/// 鍫嗗灈鏈哄嚭搴撴墽琛屼腑
/// </summary>
@@ -225,4 +183,12 @@
OutException = 199
}
+ public enum AGVTaskStatusEnum
+ {
+ AGV_New = 500,
+
+ AGV_Executing = 510,
+
+ AGV_Finish = 520
+ }
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/HttpContextUser/AspNetUser.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/HttpContextUser/AspNetUser.cs"
index 76d4af1..1bf7f75 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/HttpContextUser/AspNetUser.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/HttpContextUser/AspNetUser.cs"
@@ -42,6 +42,8 @@
public string Token => GetToken();
+ public int MenuType => (_accessor.HttpContext?.Request.Headers.ContainsKey("uniapp") ?? false) ? 1 : 0;
+
public bool IsAuthenticated()
{
return _accessor.HttpContext?.User?.Identity?.IsAuthenticated ?? false;
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/HttpContextUser/IUser.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/HttpContextUser/IUser.cs"
index 9bea2d2..1c3acbe 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/HttpContextUser/IUser.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/HttpContextUser/IUser.cs"
@@ -28,6 +28,8 @@
string Token { get; }
+ int MenuType { get; }
+
void UpdateToke(string token);
/// <summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Middlewares/ApiLogMiddleware.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Middlewares/ApiLogMiddleware.cs"
index ee5aea4..ee5bdd9 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Middlewares/ApiLogMiddleware.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Middlewares/ApiLogMiddleware.cs"
@@ -5,6 +5,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using System.Text.RegularExpressions;
using System.Threading.Tasks;
using WIDESEA_Core.Helper;
using WIDESEA_Core.LogHelper;
@@ -20,94 +21,117 @@
///
/// </summary>
private readonly RequestDelegate _next;
- private readonly ILogger<ApiLogMiddleware> _logger;
- public ApiLogMiddleware(RequestDelegate next, ILogger<ApiLogMiddleware> logger)
+ public ApiLogMiddleware(RequestDelegate next)
{
_next = next;
- _logger = logger;
}
//todo
public async Task InvokeAsync(HttpContext context)
{
- //if (AppSettings.app("Middleware", "RequestResponseLog", "Enabled").ObjToBool())
+ // 杩囨护锛屽彧鏈夋帴鍙�
+ if (context.Request.Path.Value?.Contains("api") ?? false)
{
- // 杩囨护锛屽彧鏈夋帴鍙�
- if (context.Request.Path.Value.Contains("api"))
- {
- context.Request.EnableBuffering();
- //Stream originalBody = context.Response.Body;
+ context.Request.EnableBuffering();
+ Stream originalBody = context.Response.Body;
+ try
+ {
try
{
// 瀛樺偍璇锋眰鏁版嵁
- //string requestParam = GetRequestData(context);
- //DateTime beginDate = DateTime.Now;
+ await RequestDataLog(context);
+ context.Request.Body.Position = 0;
+ }
+ catch { }
+ using MemoryStream ms = new();
+ context.Response.Body = ms;
- //using var ms = new MemoryStream();
- //context.Response.Body = ms;
+ await _next(context);
- await _next(context);
-
+ try
+ {
// 瀛樺偍鍝嶅簲鏁版嵁
- //DateTime endDate = DateTime.Now;
- //string responseParam = GetResponsetData(context);
+ ResponseDataLog(context.Response, ms);
+ }
+ catch { }
- //context.Response.Body.Position = 0;
- //await context.Response.Body.CopyToAsync(originalBody);
+ ms.Position = 0;
+ await ms.CopyToAsync(originalBody);
- //Logger.WriteApiLog2DB(context,requestParam, beginDate, responseParam, endDate, context.Response.StatusCode == 200 ? LoggerStatus.Success : LoggerStatus.Error);
- }
- catch (Exception ex)
- {
- // 璁板綍寮傚父
- _logger.LogError(ex.Message + "" + ex.InnerException);
- }
- finally
- {
- //context.Response.Body = originalBody;
- }
}
- //else
- //{
- // await _next(context);
- //}
+ catch (Exception ex)
+ {
+ // 璁板綍寮傚父
+
+ }
+ finally
+ {
+ context.Response.Body = originalBody;
+ }
}
- //else
- //{
- // await _next(context);
- //}
- }
-
- private string GetRequestData(HttpContext context)
- {
- try
+ else
{
- using StreamReader sr = new StreamReader(context.Request.Body);
- string request = JsonConvert.SerializeObject(sr.ReadToEnd()); ;
- context.Request.Body.Position = 0;
- return request;
- }
- catch (Exception ex)
- {
- return $"璇锋眰鍙傛暟鑾峰彇閿欒,{ex.Message}";
+ await _next(context);
}
}
- private string GetResponsetData(HttpContext context)
+
+ private async Task RequestDataLog(HttpContext context)
{
- try
+ var request = context.Request;
+ var sr = new StreamReader(request.Body);
+ //long length = request.Body.Length;
+ RequestLogInfo requestResponse = new RequestLogInfo()
{
- using StreamReader sr = new StreamReader(context.Response.Body);
- string response = JsonConvert.SerializeObject(sr.ReadToEnd()); ;
- context.Response.Body.Position = 0;
- return response;
- }
- catch (Exception ex)
+ Path = request.Path,
+ QueryString = request.QueryString.ToString(),
+ BodyData = await sr.ReadToEndAsync()
+ };
+ var content = JsonConvert.SerializeObject(requestResponse);
+ if (!string.IsNullOrEmpty(content))
{
- return $"鍝嶅簲鍙傛暟鑾峰彇閿欒,{ex.Message}";
+ LogLock.OutLogAOP("鎺ュ彛鏃ュ織", new string[] { "璇锋眰鏁版嵁 - 璇锋眰鏁版嵁绫诲瀷:" + requestResponse.GetType().ToString(), content });
+ request.Body.Position = 0;
}
}
+
+ private void ResponseDataLog(HttpResponse response, MemoryStream ms)
+ {
+ ms.Position = 0;
+ var responseBody = new StreamReader(ms).ReadToEnd();
+
+ // 鍘婚櫎 Html
+ var reg = "<[^>]+>";
+ var isHtml = Regex.IsMatch(responseBody, reg);
+
+ if (!string.IsNullOrEmpty(responseBody))
+ {
+ Parallel.For(0, 1, e =>
+ {
+ LogLock.OutLogAOP("鎺ュ彛鏃ュ織", new string[] { "鍝嶅簲鏁版嵁 - 鍝嶅簲鏁版嵁绫诲瀷:" + responseBody.GetType().ToString(), responseBody });
+
+ });
+ }
+ }
+ }
+
+ public class RequestLogInfo
+ {
+ /// <summary>
+ /// 璇锋眰鍦板潃
+ /// </summary>
+ public string Path { get; set; }
+
+ /// <summary>
+ /// 璇锋眰鍙傛暟
+ /// </summary>
+ public string QueryString { get; set; }
+
+ /// <summary>
+ /// Body鍙傛暟
+ /// </summary>
+ public string BodyData { get; set; }
}
}
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 7bce347..c351b8b 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"
@@ -228,9 +228,12 @@
{
foreach (PropertyInfo property in properties)
{
- SugarColumn sugarColumn = property.GetCustomAttribute<SugarColumn>();
- if (sugarColumn.IsPrimaryKey)
- return property.Name;
+ SugarColumn? sugarColumn = property.GetCustomAttribute<SugarColumn>();
+ if (sugarColumn != null)
+ {
+ if (sugarColumn.IsPrimaryKey)
+ return property.Name;
+ }
}
return null;
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/ModelValidate.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/ModelValidate.cs"
index 1f75580..af87398 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/ModelValidate.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/ModelValidate.cs"
@@ -162,15 +162,19 @@
Type[] types = propertyInfo.PropertyType.GenericTypeArguments;
if (types.Length == 1)
{
- string str = value.Serialize();
- if (str == "[]")
+ if (tempValue.ChangeType(property.PropertyType).ToString() == propertyAttribute.NotNullAndEmptyWithPropertyAndValue[1].ChangeType(property.PropertyType).ToString())
{
- return (false, $"銆恵property.Name}銆戝睘鎬х殑鍊间负銆恵propertyAttribute.NotNullAndEmptyWithPropertyAndValue[1]}銆戞椂銆恵propertyInfo.Name}銆戝睘鎬х殑鍊间笉鍙负绌�", data);
+ string str = value.Serialize();
+ if (str == "[]")
+ {
+ return (false, $"銆恵property.Name}銆戝睘鎬х殑鍊间负銆恵propertyAttribute.NotNullAndEmptyWithPropertyAndValue[1]}銆戞椂銆恵propertyInfo.Name}銆戝睘鎬х殑鍊间笉鍙负绌�", data);
+ }
}
+
}
else if (types.Length == 0)
{
- if (tempValue.ChangeType(property.PropertyType) != propertyAttribute.NotNullAndEmptyWithPropertyAndValue[1].ChangeType(property.PropertyType) && value == null && string.IsNullOrEmpty(value.ToString()))
+ if (tempValue.ChangeType(property.PropertyType).ToString() == propertyAttribute.NotNullAndEmptyWithPropertyAndValue[1].ChangeType(property.PropertyType).ToString() && value == null && string.IsNullOrEmpty(value.ToString()))
{
return (false, $"銆恵property.Name}銆戝睘鎬х殑鍊间负銆恵propertyAttribute.NotNullAndEmptyWithPropertyAndValue[1]}銆戞椂銆恵propertyInfo.Name}銆戝睘鎬х殑鍊间笉鍙负绌�", data);
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/CachePointGroupDTO.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/CachePointGroupDTO.cs"
new file mode 100644
index 0000000..edd66c5
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/CachePointGroupDTO.cs"
@@ -0,0 +1,35 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEA_DTO.Basic
+{
+ public class CachePointGroupDTO
+ {
+ public int IdA { get; set; }
+
+ public int IdB { get; set; }
+
+ public string PointCodeA { get; set; }
+
+ public string PointCodeB { get; set; }
+
+ public int PointTypeA { get; set; }
+
+ public int PointTypeB { get; set; }
+
+ public int PointStatusA { get; set; }
+
+ public int PointStatusB { get; set; }
+
+ public int DepthA { get; set; }
+
+ public int DepthB { get; set; }
+
+ public int EnableStatusA { get; set; }
+
+ public int EnableStatusB { get; set; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs"
index b9516fb..ae06f8b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs"
@@ -1,4 +1,5 @@
锘�
+using Magicodes.ExporterAndImporter.Core;
using SqlSugar;
using System;
using System.Collections.Generic;
@@ -9,8 +10,31 @@
namespace WIDESEA_DTO.Stock
{
- public class StockViewDTO : Dt_LocationInfo
+ public class StockViewDTO
{
+ public int AreaId { get; set; }
+
+ public string LocationCode { get; set; }
+
+ public string LocationName { get; set; }
+
+ public int Column { get; set; }
+
+ public int Row { get; set; }
+
+ public int Layer { get; set; }
+
+ public int Depth { get; set; }
+
+ public int LocationStatus { get; set; }
+
+ public int LocationType { get; set; }
+
+ public string RoadwayNo { get; set; }
+
+ public int EnalbeStatus { get; set; }
+
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")]
public int StockId { get; set; }
public string PalletCode { get; set; }
@@ -21,6 +45,14 @@
public string StockRemark { get; set; }
+ public string Creater { get; set; }
+
+ public DateTime CreateDate { get; set; }
+
+ public string Modifier { get; set; }
+
+ public DateTime? ModifyDate { get; set; }
+
[Navigate(NavigateType.OneToMany, nameof(Dt_StockInfoDetail.StockId), nameof(StockId))]
public List<Dt_StockInfoDetail> Details { get; set; }
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IAreaRouterRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IAreaRouterRepository.cs"
new file mode 100644
index 0000000..29d3150
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IAreaRouterRepository.cs"
@@ -0,0 +1,14 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.BaseRepository;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_IBasicRepository
+{
+ public interface IAreaRouterRepository : IRepository<Dt_AreaRouter>
+ {
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IBasicRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IBasicRepository.cs"
new file mode 100644
index 0000000..dc7218e
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/IBasicRepository.cs"
@@ -0,0 +1,26 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core;
+
+namespace WIDESEA_IBasicRepository
+{
+ public interface IBasicRepository : IDependency
+ {
+ IAreaInfoRepository AreaInfoRepository { get; }
+
+ ILocationInfoRepository LocationInfoRepository { get; }
+
+ IMaterielInfoRepository MaterielInfoRepository { get; }
+
+ IRoadwayInfoRepository RoadwayInfoRepository { get; }
+
+ IWarehouseRepository WarehouseRepository { get; }
+
+ IAreaRouterRepository AreaRouterRepository { get; }
+
+ ICachePointRepository CachePointRepository { get; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ICachePointRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ICachePointRepository.cs"
new file mode 100644
index 0000000..a399b4e
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicRepository/ICachePointRepository.cs"
@@ -0,0 +1,17 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.BaseRepository;
+using WIDESEA_Core.Enums;
+using WIDESEA_DTO.Basic;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_IBasicRepository
+{
+ public interface ICachePointRepository : IRepository<Dt_CachePoint>
+ {
+ List<CachePointGroupDTO> GetCachePointGroups(int areaId, LocationStatusEnum locationAStatus, LocationStatusEnum locationBStatus);
+ }
+}
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 b470d1b..8e14a76 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"
@@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_IBasicRepository;
using WIDESEA_Model.Models;
@@ -11,6 +12,6 @@
{
public interface IAreaInfoService : IService<Dt_AreaInfo>
{
- IAreaInfoRepository Repository { get; }
+ IAreaInfoRepository Repository { get; }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IAreaRouterService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IAreaRouterService.cs"
new file mode 100644
index 0000000..21d7efd
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IAreaRouterService.cs"
@@ -0,0 +1,16 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.BaseServices;
+using WIDESEA_IBasicRepository;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_IBasicService
+{
+ public interface IAreaRouterService : IService<Dt_AreaRouter>
+ {
+ IAreaRouterRepository Repository { get; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IBasicService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IBasicService.cs"
new file mode 100644
index 0000000..c685b73
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/IBasicService.cs"
@@ -0,0 +1,71 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core;
+
+namespace WIDESEA_IBasicService
+{
+ public interface IBasicService: IDependency
+ {
+ IAreaInfoService AreaInfoService { get; }
+
+ ILocationInfoService LocationInfoService { get; }
+
+ IMaterielInfoService MaterielInfoService { get; }
+
+ IRoadwayInfoService RoadwayInfoService { get; }
+
+ IWarehouseService WarehouseService { get; }
+
+ IAreaRouterService AreaRouterService { get; }
+
+ ICachePointService CachePointService { get; }
+
+
+ WebResponseContent AreaEnableStatus(int[] keys);
+
+ WebResponseContent AreaDisableStatus(int[] keys);
+
+ WebResponseContent AreaEnableStatus(int key);
+
+ WebResponseContent AreaDisableStatus(int key);
+
+
+ WebResponseContent CachePointEnableStatus(int[] keys);
+
+ WebResponseContent CachePointDisableStatus(int[] keys);
+
+ WebResponseContent CachePointEnableStatus(int key);
+
+ WebResponseContent CachePointDisableStatus(int key);
+
+
+ WebResponseContent LocationEnableStatus(int[] keys);
+
+ WebResponseContent LocationDisableStatus(int[] keys);
+
+ WebResponseContent LocationEnableStatus(int key);
+
+ WebResponseContent LocationDisableStatus(int key);
+
+
+ WebResponseContent RoadwayEnableStatus(int[] keys);
+
+ WebResponseContent RoadwayDisableStatus(int[] keys);
+
+ WebResponseContent RoadwayEnableStatus(int key);
+
+ WebResponseContent RoadwayDisableStatus(int key);
+
+
+ WebResponseContent WarehouseEnableStatus(int[] keys);
+
+ WebResponseContent WarehouseDisableStatus(int[] keys);
+
+ WebResponseContent WarehouseEnableStatus(int key);
+
+ WebResponseContent WarehouseDisableStatus(int key);
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ICachePointService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ICachePointService.cs"
new file mode 100644
index 0000000..72f6837
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IBasicService/ICachePointService.cs"
@@ -0,0 +1,23 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core;
+using WIDESEA_Core.BaseServices;
+using WIDESEA_IBasicRepository;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_IBasicService
+{
+ public interface ICachePointService : IService<Dt_CachePoint>
+ {
+ ICachePointRepository Repository { get; }
+
+ Dt_CachePoint? AssignCachePoint(int areaId);
+
+ Dt_CachePoint? GetIbStockCachePoint(int areaId);
+
+
+ }
+}
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 d003d8c..b8e9d3b 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"
@@ -20,5 +20,6 @@
Dt_LocationInfo AdjacentDepthLocation(string locationCode);
Dt_LocationInfo? AssignLocation(string stationCode, int inboundType);
+
}
}
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 709bdf7..15acaf7 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"
@@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_IBasicRepository;
using WIDESEA_Model.Models;
@@ -20,5 +21,6 @@
Dt_MaterielInfo GetMaterielInfo(string materielCode);
List<Dt_MaterielInfo> GetMaterielInfos(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 d68bef9..5967bcf 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"
@@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_IBasicRepository;
using WIDESEA_Model.Models;
@@ -12,5 +13,6 @@
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 79d4145..0a0dfd0 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"
@@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
using WIDESEA_IBasicRepository;
using WIDESEA_Model.Models;
@@ -12,5 +13,6 @@
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_IInboundRepository/IInboundRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundRepository/IInboundRepository.cs"
new file mode 100644
index 0000000..cd77bda
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundRepository/IInboundRepository.cs"
@@ -0,0 +1,16 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core;
+
+namespace WIDESEA_IInboundRepository
+{
+ public interface IInboundRepository : IDependency
+ {
+ IInboundOrderDetailRepository InboundOrderDetailRepository { get; }
+
+ IInboundOrderRepository InboundOrderRepository { get; }
+ }
+}
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 e27698e..7679ad9 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"
@@ -18,5 +18,7 @@
WebResponseContent AddInboundOrder(InboundOrderAddDTO orderAddDTO);
WebResponseContent MaterielGroup(MaterielGroupDTO materielGroupDTO);
+
+ WebResponseContent QueryOrderInfo(int pageNo, string orderNo);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundService.cs"
new file mode 100644
index 0000000..a70183e
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IInboundService/IInboundService.cs"
@@ -0,0 +1,16 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core;
+
+namespace WIDESEA_IInboundService
+{
+ public interface IInboundService:IDependency
+ {
+ IInboundOrderDetailService InboundOrderDetailService { get; }
+
+ IInboundOrderService InbounOrderService { get; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IOutboundRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IOutboundRepository.cs"
new file mode 100644
index 0000000..4a7d1be
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundRepository/IOutboundRepository.cs"
@@ -0,0 +1,18 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core;
+
+namespace WIDESEA_IOutboundRepository
+{
+ public interface IOutboundRepository : IDependency
+ {
+ IOutboundOrderDetailRepository OutboundOrderDetailRepository { get; }
+
+ IOutboundOrderRepository OutboundOrderRepository { get; }
+
+ IOutStockLockInfoRepository OutboundStockLockInfoRepository { get; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs"
new file mode 100644
index 0000000..7e86e2f
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IOutboundService/IOutboundService.cs"
@@ -0,0 +1,18 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core;
+
+namespace WIDESEA_IOutboundService
+{
+ public interface IOutboundService:IDependency
+ {
+ IOutboundOrderDetailService OutboundOrderDetailService { get; }
+
+ IOutboundOrderService OutboundOrderService { get; }
+
+ IOutStockLockInfoService OutboundStockLockInfoService { get; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IRecordRepository/IRecordRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IRecordRepository/IRecordRepository.cs"
new file mode 100644
index 0000000..aa89557
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IRecordRepository/IRecordRepository.cs"
@@ -0,0 +1,16 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core;
+
+namespace WIDESEA_IRecordRepository
+{
+ public interface IRecordRepository : IDependency
+ {
+ ILocationStatusChangeRecordRepository LocationStatusChangeRecordRepository { get; }
+
+ IStockQuantityChangeRecordRepository StockQuantityChangeRecordRepository { get; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IRecordService/IRecordService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IRecordService/IRecordService.cs"
new file mode 100644
index 0000000..6fd0066
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IRecordService/IRecordService.cs"
@@ -0,0 +1,16 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core;
+
+namespace WIDESEA_IRecordService
+{
+ public interface IRecordService : IDependency
+ {
+ ILocationStatusChangeRecordSetvice LocationStatusChangeRecordSetvice { get; }
+
+ IStockQuantityChangeRecordService StockQuantityChangeRecordService { get; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockInfoRepository.cs"
index 76cceed..2cdd70c 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockInfoRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockInfoRepository.cs"
@@ -26,5 +26,7 @@
List<Dt_StockInfo> GetStockInfosExclude(string materielCode, List<string> palletCodes);
bool UpdateDataWithDetail(Dt_StockInfo stockInfo);
+
+ Dt_StockInfo GetPalletStockInfo(string roadwayNo);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockRepository.cs"
new file mode 100644
index 0000000..f3826a3
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockRepository/IStockRepository.cs"
@@ -0,0 +1,16 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core;
+
+namespace WIDESEA_IStockRepository
+{
+ public interface IStockRepository : IDependency
+ {
+ IStockInfoDetailRepository StockInfoDetailRepository { get; }
+
+ IStockInfoRepository StockInfoRepository { get; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockService.cs"
new file mode 100644
index 0000000..1a48a24
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockService.cs"
@@ -0,0 +1,16 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core;
+
+namespace WIDESEA_IStockService
+{
+ public interface IStockService:IDependency
+ {
+ IStockInfoDetailService StockInfoDetailService { get; }
+
+ IStockInfoService StockInfoService { get; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockViewService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockViewService.cs"
new file mode 100644
index 0000000..4dbc93f
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockViewService.cs"
@@ -0,0 +1,18 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core;
+using WIDESEA_Core.BaseServices;
+using WIDESEA_DTO.Stock;
+
+namespace WIDESEA_IStockService
+{
+ public interface IStockViewService : IDependency
+ {
+ PageGridData<StockViewDTO> GetPageData(PageDataOptions options);
+
+ object GetDetailPage(PageDataOptions pageData);
+ }
+}
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 1d6a01e..6f54d1b 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"
@@ -42,5 +42,11 @@
WebResponseContent GenerateOutboundTask(int orderDetailId, List<StockSelectViewDTO> stockSelectViews);
WebResponseContent GenerateOutboundTask(int[] keys);
+
+ WebResponseContent PalletOutboundTask(string roadwayNo, string endStation);
+
+ WebResponseContent CallMateriel(string endPoint);
+
+ WebResponseContent MaterielCarry(string startPoint);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundRepository/InboundRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundRepository/InboundRepository.cs"
new file mode 100644
index 0000000..511585a
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundRepository/InboundRepository.cs"
@@ -0,0 +1,22 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_IInboundRepository;
+
+namespace WIDESEA_InboundRepository
+{
+ public class InboundRepository : IInboundRepository
+ {
+ public IInboundOrderDetailRepository InboundOrderDetailRepository { get; }
+
+ public IInboundOrderRepository InboundOrderRepository { get; }
+
+ public InboundRepository(IInboundOrderDetailRepository inboundOrderDetailRepository, IInboundOrderRepository inboundOrderRepository)
+ {
+ InboundOrderDetailRepository = inboundOrderDetailRepository;
+ InboundOrderRepository = inboundOrderRepository;
+ }
+ }
+}
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 58da11f..0342543 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"
@@ -1,4 +1,5 @@
锘縰sing AutoMapper;
+using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -25,24 +26,23 @@
public class InboundOrderService : ServiceBase<Dt_InboundOrder, IInboundOrderRepository>, IInboundOrderService
{
private readonly IMapper _mapper;
- private readonly IMaterielInfoService _materielInfoService;
- private readonly IStockInfoService _stockInfoService;
- private readonly IStockInfoDetailService _stockDetailService;
- private readonly ITaskRepository _taskRepository;
- private readonly IInboundOrderDetailService _inboundOrderDetailService;
private readonly IUnitOfWorkManage _unitOfWorkManage;
+ private readonly ITaskRepository _taskRepository;
+
+ private IBasicService _basicService;
+ private IStockService _stockService;
+ private IInboundOrderDetailService _inboundOrderDetailService;
public IInboundOrderRepository Repository => BaseDal;
- public InboundOrderService(IInboundOrderRepository BaseDal, IMapper mapper, IMaterielInfoService materielInfoService, IStockInfoDetailService stockDetailService, IStockInfoService stockInfoService, ITaskRepository taskRepository, IInboundOrderDetailService inboundOrderDetailService, IUnitOfWorkManage unitOfWorkManage) : base(BaseDal)
+ public InboundOrderService(IInboundOrderRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, ITaskRepository taskRepository, IBasicService basicService, IStockService stockService, IInboundOrderDetailService inboundOrderDetailService) : base(BaseDal)
{
_mapper = mapper;
- _materielInfoService = materielInfoService;
- _stockDetailService = stockDetailService;
- _stockInfoService = stockInfoService;
- _taskRepository = taskRepository;
- _inboundOrderDetailService = inboundOrderDetailService;
_unitOfWorkManage = unitOfWorkManage;
+ _taskRepository = taskRepository;
+ _basicService = basicService;
+ _stockService = stockService;
+ _inboundOrderDetailService = inboundOrderDetailService;
}
/// <summary>
@@ -108,7 +108,7 @@
}
List<string> materielCodes = inboundOrderAddDTO.Details.Select(x => x.MaterielCode).ToList();
- if (!_materielInfoService.ExsitMateriels(materielCodes))
+ if (!_basicService.MaterielInfoService.ExsitMateriels(materielCodes))
{
return (false, "鏈夌墿鏂欎俊鎭湭褰曞叆锛岃褰曞叆鐗╂枡淇℃伅", inboundOrderAddDTO);
}
@@ -146,12 +146,12 @@
List<string> materielCodes = matSerialNumberDTOs.GroupBy(x => x.MaterielCode).Select(x => x.Key).ToList();
- List<Dt_MaterielInfo> materielInfos = _materielInfoService.GetMaterielInfos(materielCodes);
+ List<Dt_MaterielInfo> materielInfos = _basicService.MaterielInfoService.GetMaterielInfos(materielCodes);
Dt_InboundOrder inboundOrder = GetInboundOrder(materielGroupDTO.OrderNo);
- Dt_StockInfo? stockInfo = _stockInfoService.GetStockByPalletCode(materielGroupDTO.PalletCode);
+ Dt_StockInfo? stockInfo = _stockService.StockInfoService.GetStockByPalletCode(materielGroupDTO.PalletCode);
(bool, string, object?) result = CheckMaterielGroupParam(materielGroupDTO, matSerialNumberDTOs, materielInfos, materielCodes, inboundOrder, stockInfo);
if (!result.Item1) return content = WebResponseContent.Instance.Error(result.Item2);
@@ -220,7 +220,7 @@
_unitOfWorkManage.BeginTran();
UpdateData(inboundOrder);
_inboundOrderDetailService.UpdateData(inboundOrderDetails);
- _stockInfoService.AddMaterielGroup(stockInfo);
+ _stockService.StockInfoService.AddMaterielGroup(stockInfo);
_unitOfWorkManage.CommitTran();
return WebResponseContent.Instance.OK();
}
@@ -256,7 +256,7 @@
return (false, "宸蹭笂鏋剁殑鎵樼洏涓嶈兘鍐嶆缁勭洏", materielGroupDTO);
}
- if (_stockDetailService.ExistSerialNumbers(materielGroupDTO.SerialNumbers))
+ if (_stockService.StockInfoDetailService.ExistSerialNumbers(materielGroupDTO.SerialNumbers))
{
return (false, "鏈夊簭鍒楀彿鍦ㄥ簱瀛樹腑宸插瓨鍦�", materielGroupDTO);
}
@@ -307,5 +307,31 @@
return (true, "鎴愬姛", materielGroupDTO);
}
+
+ public WebResponseContent QueryOrderInfo(int pageNo, string orderNo)
+ {
+ if (string.IsNullOrEmpty(orderNo))
+ {
+ object obj = Repository.QueryPage(x => true, pageNo, 10, new Dictionary<string, OrderByType> { { nameof(Dt_InboundOrder.CreateDate), OrderByType.Desc } }).Rows.Select(x => new
+ {
+ x.OrderNo,
+ x.UpperOrderNo,
+ x.CreateDate,
+ x.Creater
+ });
+ return WebResponseContent.Instance.OK(data: obj);
+ }
+ else
+ {
+ object obj = Repository.QueryPage(x => x.OrderNo == orderNo, pageNo, 10, new Dictionary<string, OrderByType> { { nameof(Dt_InboundOrder.CreateDate), OrderByType.Desc } }).Rows.Select(x => new
+ {
+ x.OrderNo,
+ x.UpperOrderNo,
+ x.CreateDate,
+ x.Creater
+ });
+ return WebResponseContent.Instance.OK(data: obj);
+ }
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs"
new file mode 100644
index 0000000..97a2766
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs"
@@ -0,0 +1,22 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_IInboundService;
+
+namespace WIDESEA_InboundService
+{
+ public class InboundService : IInboundService
+ {
+ public IInboundOrderDetailService InboundOrderDetailService { get; }
+
+ public IInboundOrderService InbounOrderService { get; }
+
+ public InboundService(IInboundOrderDetailService inboundOrderDetailService, IInboundOrderService inbounOrderService)
+ {
+ InboundOrderDetailService = inboundOrderDetailService;
+ InbounOrderService = inbounOrderService;
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_AreaRouter.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_AreaRouter.cs"
new file mode 100644
index 0000000..0803b4a
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_AreaRouter.cs"
@@ -0,0 +1,53 @@
+锘縰sing Magicodes.ExporterAndImporter.Core;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.DB.Models;
+
+namespace WIDESEA_Model.Models
+{
+ [SugarTable(nameof(Dt_AreaRouter))]
+ public class Dt_AreaRouter : BaseEntity
+ {
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")]
+ public int Id { get; set; }
+
+ /// <summary>
+ /// 璧风偣鍖哄煙
+ /// </summary>
+ [ImporterHeader(Name = "璧风偣")]
+ [ExporterHeader(DisplayName = "璧风偣")]
+ [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "璧风偣")]
+ public string StartArea { get; set; }
+
+ /// <summary>
+ /// 缁堢偣鍖哄煙
+ /// </summary>
+ [ImporterHeader(Name = "缁堢偣")]
+ [ExporterHeader(DisplayName = "缁堢偣")]
+ [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "缁堢偣")]
+ public string NextArea { get; set; }
+
+ [SugarColumn(IsNullable = false, ColumnDescription = "璺敱绫诲瀷")]
+ public int RouterType { get; set; }
+
+ /// <summary>
+ /// 鏄惁鏄渶缁堢偣
+ /// </summary>
+ [ImporterHeader(Name = "鏄惁鏄渶缁堢偣")]
+ [ExporterHeader(DisplayName = "鏄惁鏄渶缁堢偣")]
+ [SugarColumn(IsNullable = false, ColumnDescription = "鏄惁鏄渶缁堢偣")]
+ public bool IsEnd { get; set; }
+
+ /// <summary>
+ /// 澶囨敞
+ /// </summary>
+ [ImporterHeader(Name = "澶囨敞")]
+ [ExporterHeader(DisplayName = "澶囨敞")]
+ [SugarColumn(IsNullable = true, ColumnDescription = "澶囨敞")]
+ public string Remark { get; set; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_CachePoint.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_CachePoint.cs"
new file mode 100644
index 0000000..e294ec3
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_CachePoint.cs"
@@ -0,0 +1,44 @@
+锘縰sing SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.DB.Models;
+
+namespace WIDESEA_Model.Models
+{
+ [SugarTable(nameof(Dt_CachePoint), "缂撳瓨鐐逛綅")]
+ public class Dt_CachePoint : BaseEntity
+ {
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")]
+ public int Id { get; set; }
+
+ [SugarColumn(IsNullable = false, ColumnDescription = "鍖哄煙涓婚敭")]
+ public int AreaId { get; set; }
+
+ [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "缂撳瓨鐐圭紪鍙�")]
+ public string PointCode { get; set; }
+
+ [SugarColumn(IsNullable = false, ColumnDescription = "缂撳瓨鐐圭姸鎬�")]
+ public int PointStatus { get; set; }
+
+ [SugarColumn(IsNullable = false, ColumnDescription = "缂撳瓨鐐瑰惎鐢ㄧ姸鎬�")]
+ public int EnableStatus { get; set; }
+
+ [SugarColumn(IsNullable = false, ColumnDescription = "璐т綅琛�")]
+ public int Row { get; set; }
+
+ [SugarColumn(IsNullable = false, ColumnDescription = "璐т綅鍒�")]
+ public int Column { get; set; }
+
+ [SugarColumn(IsNullable = false, ColumnDescription = "璐т綅娣卞害")]
+ public int Depth { get; set; }
+
+ [SugarColumn(IsNullable = false, ColumnDescription = "缂撳瓨鐐圭被鍨�")]
+ public int PointType { get; set; }
+
+ [SugarColumn(IsNullable = true, Length = 500, ColumnDescription = "澶囨敞")]
+ public string Remark { get; set; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_LocationInfo.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_LocationInfo.cs"
index f95e590..0ffb0ab 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_LocationInfo.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_LocationInfo.cs"
@@ -48,7 +48,7 @@
public int LocationStatus { get; set; }
[SugarColumn(IsNullable = false, ColumnDescription = "绂佺敤鐘舵��")]
- public int EnalbeStatus { get; set; }
+ public int EnableStatus { get; set; }
[SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "澶囨敞")]
public string Remark { get; set; }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_RoadwayInfo.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_RoadwayInfo.cs"
index 0b8ab5c..c651a54 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_RoadwayInfo.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Basic/Dt_RoadwayInfo.cs"
@@ -18,10 +18,10 @@
public string RoadwayNo { get; set; }
[SugarColumn(IsNullable = false, ColumnDescription = "浠撳簱涓婚敭")]
- public int WarehouseId { get; set; }
+ public int AreaId { get; set; }
[SugarColumn(IsNullable = false, ColumnDescription = "绂佺敤鐘舵��")]
- public int EnalbeStatus { get; set; }
+ public int EnableStatus { get; set; }
[SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "璁惧缂栧彿")]
public string DeviceNo { get; set; }
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/System/Sys_Menu.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/System/Sys_Menu.cs"
index ff956ec..5daaa1b 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/System/Sys_Menu.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/System/Sys_Menu.cs"
@@ -75,11 +75,9 @@
/// <summary>
/// 鑿滃崟绫诲瀷
/// </summary>
- [SugarColumn(IsNullable = true, ColumnDescription = "鑿滃崟绫诲瀷")]
- public int? MenuType { get; set; }
+ [SugarColumn(IsNullable = false, ColumnDescription = "鑿滃崟绫诲瀷")]
+ public int MenuType { get; set; }
- [Navigate(NavigateType.OneToMany, nameof(ParentId), nameof(MenuId)), SugarColumn(IsIgnore = true, IsNullable = true)]
- public List<Sys_Menu> Menus { 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 663de64..2350e4a 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"
@@ -7,6 +7,7 @@
using System.Threading.Tasks;
using WIDESEA_Core.Attributes;
using WIDESEA_Core.DB.Models;
+using WIDESEA_Core.Enums;
namespace WIDESEA_Model.Models
{
@@ -26,7 +27,7 @@
/// </summary>
[ImporterHeader(Name = "浠诲姟鍙�")]
[ExporterHeader(DisplayName = "浠诲姟鍙�")]
- [SugarColumn(IsNullable = false, ColumnDescription = "浠诲姟鍙�"), SequenceAttirbute("SeqTaskNum", 6000)]
+ [SugarColumn(IsNullable = false, ColumnDescription = "浠诲姟鍙�"), SequenceAttirbute(nameof(SequenceEnum.SeqTaskNum), 6000)]
public int TaskNum { get; set; }
/// <summary>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task_Hty.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task_Hty.cs"
new file mode 100644
index 0000000..526416c
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/TaskInfo/Dt_Task_Hty.cs"
@@ -0,0 +1,169 @@
+锘縰sing Magicodes.ExporterAndImporter.Core;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core.Attributes;
+using WIDESEA_Core.Enums;
+
+namespace WIDESEA_Model.Models
+{
+ [SugarTable(nameof(Dt_Task_Hty), "浠诲姟淇℃伅鍘嗗彶")]
+ public class Dt_Task_Hty
+ {
+ /// <summary>
+ /// 涓婚敭
+ /// </summary>
+ [ImporterHeader(Name = "涓婚敭")]
+ [ExporterHeader(DisplayName = "涓婚敭")]
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "涓婚敭")]
+ public int TaskId { get; set; }
+
+ /// <summary>
+ /// 浠诲姟鍙�
+ /// </summary>
+ [ImporterHeader(Name = "浠诲姟鍙�")]
+ [ExporterHeader(DisplayName = "浠诲姟鍙�")]
+ [SugarColumn(IsNullable = false, ColumnDescription = "浠诲姟鍙�"), SequenceAttirbute(nameof(SequenceEnum.SeqTaskNum), 6000)]
+ public int TaskNum { get; set; }
+
+ /// <summary>
+ /// 鎵樼洏缂栧彿
+ /// </summary>
+ [ImporterHeader(Name = "鎵樼洏缂栧彿")]
+ [ExporterHeader(DisplayName = "鎵樼洏缂栧彿")]
+ [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鎵樼洏缂栧彿")]
+ public string PalletCode { get; set; }
+
+ /// <summary>
+ /// 宸烽亾鍙�
+ /// </summary>
+ [ImporterHeader(Name = "宸烽亾鍙�")]
+ [ExporterHeader(DisplayName = "宸烽亾鍙�")]
+ [SugarColumn(IsNullable = false, Length = 10, ColumnDescription = "宸烽亾鍙�")]
+ public string Roadway { get; set; }
+
+ /// <summary>
+ /// 浠诲姟绫诲瀷
+ /// </summary>
+ [ImporterHeader(Name = "浠诲姟绫诲瀷")]
+ [ExporterHeader(DisplayName = "浠诲姟绫诲瀷")]
+ [SugarColumn(IsNullable = false, ColumnDescription = "浠诲姟绫诲瀷")]
+ public int TaskType { get; set; }
+
+ /// <summary>
+ /// 浠诲姟鐘舵��
+ /// </summary>
+ [ImporterHeader(Name = "浠诲姟鐘舵��")]
+ [ExporterHeader(DisplayName = "浠诲姟鐘舵��")]
+ [SugarColumn(IsNullable = false, ColumnDescription = "浠诲姟鐘舵��")]
+ public int TaskStatus { get; set; }
+
+ /// <summary>
+ /// 璧峰鍦板潃
+ /// </summary>
+ [ImporterHeader(Name = "璧峰鍦板潃")]
+ [ExporterHeader(DisplayName = "璧峰鍦板潃")]
+ [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "璧峰鍦板潃")]
+ public string SourceAddress { get; set; }
+
+ /// <summary>
+ /// 鐩爣鍦板潃
+ /// </summary>
+ [ImporterHeader(Name = "鐩爣鍦板潃")]
+ [ExporterHeader(DisplayName = "鐩爣鍦板潃")]
+ [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "鐩爣鍦板潃")]
+ public string TargetAddress { get; set; }
+
+ /// <summary>
+ /// 褰撳墠浣嶇疆
+ /// </summary>
+ [ImporterHeader(Name = "褰撳墠浣嶇疆")]
+ [ExporterHeader(DisplayName = "褰撳墠浣嶇疆")]
+ [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "褰撳墠浣嶇疆")]
+ public string CurrentAddress { get; set; }
+
+ /// <summary>
+ /// 涓嬩竴鍦板潃
+ /// </summary>
+ [ImporterHeader(Name = "涓嬩竴鍦板潃")]
+ [ExporterHeader(DisplayName = "涓嬩竴鍦板潃")]
+ [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "涓嬩竴鍦板潃")]
+ public string NextAddress { get; set; }
+
+ /// <summary>
+ /// 寮傚父淇℃伅
+ /// </summary>
+ [ImporterHeader(Name = "鍗曟嵁缂栧彿")]
+ [ExporterHeader(DisplayName = "鍗曟嵁缂栧彿")]
+ [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "鍗曟嵁缂栧彿")]
+ public string? OrderNo { get; set; }
+
+ /// <summary>
+ /// 浼樺厛绾�
+ /// </summary>
+ [ImporterHeader(Name = "浼樺厛绾�")]
+ [ExporterHeader(DisplayName = "浼樺厛绾�")]
+ [SugarColumn(IsNullable = false, ColumnDescription = "浼樺厛绾�")]
+ public int Grade { get; set; }
+
+ [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "婧愪富閿�")]
+ public int SourceKey { get; set; }
+
+ /// <summary>
+ /// 浠诲姟涓嬪彂鏃堕棿
+ /// </summary>
+ [ImporterHeader(Name = "浠诲姟涓嬪彂鏃堕棿")]
+ [ExporterHeader(DisplayName = "浠诲姟涓嬪彂鏃堕棿")]
+ [SugarColumn(IsNullable = true, ColumnDescription = "浠诲姟涓嬪彂鏃堕棿")]
+ public DateTime? Dispatchertime { get; set; }
+
+ /// <summary>
+ /// 澶囨敞
+ /// </summary>
+ [ImporterHeader(Name = "澶囨敞")]
+ [ExporterHeader(DisplayName = "澶囨敞")]
+ [SugarColumn(IsNullable = true, Length = 255, ColumnDescription = "澶囨敞")]
+ public string Remark { get; set; }
+
+ [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "婧愪富閿�")]
+ public int SourceId { get; set; }
+
+ [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "澶囨敞")]
+ public string OperateType { get; set; }
+
+ /// <summary>
+ /// 鍒涘缓浜�
+ /// </summary>
+ [ImporterHeader(Name = "鍒涘缓浜�")]
+ [ExporterHeader(DisplayName = "鍒涘缓浜�")]
+ [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍒涘缓浜�")]
+ public string Creater { get; set; }
+
+ /// <summary>
+ /// 鍒涘缓鏃堕棿
+ /// </summary>
+ [ImporterHeader(Name = "鍒涘缓鏃堕棿")]
+ [ExporterHeader(DisplayName = "鍒涘缓鏃堕棿")]
+ [SugarColumn(IsNullable = false, ColumnDescription = "鍒涘缓鏃堕棿")]
+ public DateTime CreateDate { get; set; } = DateTime.Now;
+
+ /// <summary>
+ /// 鏇存柊鑰�
+ /// </summary>
+ [ImporterHeader(Name = "淇敼浜�")]
+ [ExporterHeader(DisplayName = "淇敼浜�")]
+ [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "淇敼浜�")]
+ public string Modifier { get; set; }
+
+ /// <summary>
+ /// 淇敼鏃ユ湡
+ /// </summary>
+ [ImporterHeader(Name = "淇敼鏃ユ湡")]
+ [ExporterHeader(DisplayName = "淇敼鏃ユ湡")]
+ [SugarColumn(IsNullable = true, ColumnDescription = "淇敼鏃ユ湡")]
+ public DateTime? ModifyDate { get; set; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/OutboundRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/OutboundRepository.cs"
new file mode 100644
index 0000000..8114089
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundRepository/OutboundRepository.cs"
@@ -0,0 +1,25 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_IOutboundRepository;
+
+namespace WIDESEA_OutboundRepository
+{
+ public class OutboundRepository : IOutboundRepository
+ {
+ public IOutboundOrderDetailRepository OutboundOrderDetailRepository { get; }
+
+ public IOutboundOrderRepository OutboundOrderRepository { get; }
+
+ public IOutStockLockInfoRepository OutboundStockLockInfoRepository { get; }
+
+ public OutboundRepository(IOutboundOrderDetailRepository outboundOrderDetailRepository, IOutboundOrderRepository outboundOrderRepository, IOutStockLockInfoRepository outboundStockLockInfoRepository)
+ {
+ OutboundOrderDetailRepository = outboundOrderDetailRepository;
+ OutboundOrderRepository = outboundOrderRepository;
+ OutboundStockLockInfoRepository = outboundStockLockInfoRepository;
+ }
+ }
+}
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 1ff7cd0..8f1a8d3 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"
@@ -25,25 +25,24 @@
{
public class OutboundOrderDetailService : ServiceBase<Dt_OutboundOrderDetail, IOutboundOrderDetailRepository>, IOutboundOrderDetailService
{
- private readonly IStockInfoService _stockInfoService;
- private readonly IStockInfoDetailService _stockInfoDetailService;
- private readonly IOutStockLockInfoService _outStockLockInfoService;
private readonly IUnitOfWorkManage _unitOfWorkManage;
- private readonly ILocationStatusChangeRecordSetvice _locationStatusChangeRecordSetvice;
- private readonly IOutboundOrderService _outboundOrderService;
- private readonly ILocationInfoService _locationInfoService;
+
+ private readonly IStockService _stockService;
+ private readonly IBasicService _basicService;
+ private readonly IRecordService _recordService;
+ private readonly IOutboundRepository _outboundRepository;
+ private readonly IOutStockLockInfoService _outStockLockInfoService;
public IOutboundOrderDetailRepository Repository => BaseDal;
- public OutboundOrderDetailService(IOutboundOrderDetailRepository BaseDal, IStockInfoService stockInfoService, IOutStockLockInfoService outStockLockInfoService, IUnitOfWorkManage unitOfWorkManage, ILocationStatusChangeRecordSetvice locationStatusChangeRecordSetvice, IOutboundOrderService outboundOrderService, ILocationInfoService locationInfoService, IStockInfoDetailService stockInfoDetailService) : base(BaseDal)
+ public OutboundOrderDetailService(IOutboundOrderDetailRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, IStockService stockService, IBasicService basicService, IRecordService recordService, IOutboundRepository outboundRepository, IOutStockLockInfoService outStockLockInfoService) : base(BaseDal)
{
- _stockInfoService = stockInfoService;
- _outStockLockInfoService = outStockLockInfoService;
_unitOfWorkManage = unitOfWorkManage;
- _locationStatusChangeRecordSetvice = locationStatusChangeRecordSetvice;
- _outboundOrderService = outboundOrderService;
- _locationInfoService = locationInfoService;
- _stockInfoDetailService = stockInfoDetailService;
+ _stockService = stockService;
+ _basicService = basicService;
+ _recordService = recordService;
+ _outboundRepository = outboundRepository;
+ _outStockLockInfoService = outStockLockInfoService;
}
//
public WebResponseContent LockOutboundStock(int orderDetailId)
@@ -56,7 +55,7 @@
List<Dt_StockInfo> outStock = new List<Dt_StockInfo>();
- List<Dt_StockInfo> stockInfos = _stockInfoService.GetUseableStocks(outboundOrderDetail.MaterielCode);
+ List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(outboundOrderDetail.MaterielCode);
decimal stockTotalQuantity = stockInfos.Select(x => x.Details.Sum(v => v.StockQuantity - v.OutboundQuantity)).Sum(x => x);
if (stockTotalQuantity >= needQuantity)//搴撳瓨澶�
{
@@ -152,12 +151,12 @@
(bool, string) checkResult = CheckSelectStockDeital(outboundOrderDetail, stockSelectViews);
if (!checkResult.Item1) throw new Exception(checkResult.Item2);
- Dt_OutboundOrder outboundOrder = _outboundOrderService.Repository.QueryFirst(x => x.Id == outboundOrderDetail.OrderId);
+ Dt_OutboundOrder outboundOrder = _outboundRepository.OutboundOrderRepository.QueryFirst(x => x.Id == outboundOrderDetail.OrderId);
decimal originalNeedQuantity = outboundOrderDetail.OrderQuantity - outboundOrderDetail.LockQuantity;
decimal needQuantity = originalNeedQuantity;
- List<Dt_StockInfo> outStocks = _stockInfoService.Repository.GetStockInfosByPalletCodes(stockSelectViews.Select(x => x.PalletCode).ToList());
+ List<Dt_StockInfo> outStocks = _stockService.StockInfoService.Repository.GetStockInfosByPalletCodes(stockSelectViews.Select(x => x.PalletCode).ToList());
decimal assignQuantity = 0;
outStocks.ForEach(x =>
{
@@ -178,9 +177,9 @@
needQuantity -= assignQuantity;
if (outboundOrderDetail.OrderQuantity > outboundOrderDetail.LockQuantity)
{
- List<Dt_StockInfo> stockInfos = _stockInfoService.GetUseableStocks(outboundOrderDetail.MaterielCode);
+ List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(outboundOrderDetail.MaterielCode);
stockInfos = stockInfos.Where(x => !stockSelectViews.Select(v => v.PalletCode).Contains(x.PalletCode)).ToList();
- List<Dt_StockInfo> autoAssignStocks = _stockInfoService.GetOutboundStocks(stockInfos, outboundOrderDetail.MaterielCode, needQuantity, out decimal residueQuantity);
+ List<Dt_StockInfo> autoAssignStocks = _stockService.StockInfoService.GetOutboundStocks(stockInfos, outboundOrderDetail.MaterielCode, needQuantity, out decimal residueQuantity);
outboundOrderDetail.LockQuantity += needQuantity - residueQuantity;
outStocks.AddRange(autoAssignStocks);
outboundOrderDetail.OrderDetailStatus = OrderDetailStatusEnum.AssignOver.ObjToInt();
@@ -192,7 +191,7 @@
List<Dt_OutStockLockInfo> outStockLockInfos = _outStockLockInfoService.GetOutStockLockInfos(outboundOrder, outboundOrderDetail, outStocks);
- List<Dt_LocationInfo> locationInfos = _locationInfoService.Repository.GetLocationInfos(outStocks.Select(x => x.LocationCode).ToList());
+ List<Dt_LocationInfo> locationInfos = _basicService.LocationInfoService.Repository.GetLocationInfos(outStocks.Select(x => x.LocationCode).ToList());
return (outStocks, outboundOrderDetail, outStockLockInfos, locationInfos);
}
@@ -274,13 +273,13 @@
{
try
{
- _stockInfoService.Repository.UpdateData(stockInfos);
+ _stockService.StockInfoService.Repository.UpdateData(stockInfos);
List<Dt_StockInfoDetail> stockInfoDetails = new List<Dt_StockInfoDetail>();
foreach (var item in stockInfos)
{
stockInfoDetails.AddRange(item.Details);
}
- _stockInfoDetailService.Repository.UpdateData(stockInfoDetails);
+ _stockService.StockInfoDetailService.Repository.UpdateData(stockInfoDetails);
BaseDal.UpdateData(outboundOrderDetails);
List<Dt_OutStockLockInfo> addOutStockLockInfos = outStockLockInfos.Where(x => x.Id == 0).ToList();
@@ -294,8 +293,8 @@
_outStockLockInfoService.Repository.UpdateData(updateOutStockLockInfos);
}
- _locationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfos, locationStatus.ObjToInt(), StockChangeType.Outbound.ObjToInt(), "", tasks?.Select(x => x.TaskNum).ToList());
- _locationInfoService.Repository.UpdateLocationStatus(locationInfos, locationStatus);
+ _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfos, locationStatus.ObjToInt(), StockChangeType.Outbound.ObjToInt(), "", tasks?.Select(x => x.TaskNum).ToList());
+ _basicService.LocationInfoService.Repository.UpdateLocationStatus(locationInfos, locationStatus);
return WebResponseContent.Instance.OK();
}
catch (Exception ex)
@@ -330,7 +329,7 @@
List<Dt_OutStockLockInfo> outStockLockInfos = _outStockLockInfoService.GetByOrderDetailId(orderDetailId, OutStockStatus.宸插垎閰�);
if (outStockLockInfos.Count > 0)
{
- List<Dt_StockInfo> stocks = _stockInfoService.Repository.GetStockInfosByPalletCodes(outStockLockInfos.Select(x => x.PalletCode).ToList());
+ List<Dt_StockInfo> stocks = _stockService.StockInfoService.Repository.GetStockInfosByPalletCodes(outStockLockInfos.Select(x => x.PalletCode).ToList());
if (stocks.Count > 0)
{
stocks.ForEach(x =>
@@ -349,7 +348,7 @@
x.Status = OutStockStatus.鎾ら攢.ObjToInt();
});
- List<Dt_LocationInfo> locationInfos = _locationInfoService.Repository.GetLocationInfos(stocks.Select(x => x.LocationCode).ToList());
+ List<Dt_LocationInfo> locationInfos = _basicService.LocationInfoService.Repository.GetLocationInfos(stocks.Select(x => x.LocationCode).ToList());
return LockOutboundStockDataUpdate(stocks, new List<Dt_OutboundOrderDetail> { outboundOrderDetail }, outStockLockInfos, locationInfos, LocationStatusEnum.InStock);
}
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 3e529c7..9e96bee 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"
@@ -25,7 +25,7 @@
{
private readonly IMapper _mapper;
private readonly IMaterielInfoService _materielInfoService;
- private readonly IStockInfoService _stockInfoService;
+ private readonly IStockInfoService _stockService;
private readonly IStockInfoDetailService _stockDetailService;
public IOutboundOrderRepository Repository => BaseDal;
@@ -35,7 +35,7 @@
_mapper = mapper;
_materielInfoService = materielInfoService;
_stockDetailService = stockDetailService;
- _stockInfoService = stockInfoService;
+ _stockService = stockInfoService;
}
public override WebResponseContent AddData(SaveModel saveModel)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
new file mode 100644
index 0000000..4b48024
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
@@ -0,0 +1,25 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_IOutboundService;
+
+namespace WIDESEA_OutboundService
+{
+ public class OutboundService : IOutboundService
+ {
+ public IOutboundOrderDetailService OutboundOrderDetailService { get; }
+
+ public IOutboundOrderService OutboundOrderService { get; }
+
+ public IOutStockLockInfoService OutboundStockLockInfoService { get; }
+
+ public OutboundService(IOutboundOrderDetailService outboundOrderDetailService, IOutboundOrderService outboundOrderService, IOutStockLockInfoService outboundStockLockInfoService)
+ {
+ OutboundOrderDetailService = outboundOrderDetailService;
+ OutboundOrderService = outboundOrderService;
+ OutboundStockLockInfoService = outboundStockLockInfoService;
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_RecordRepository/RecordRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_RecordRepository/RecordRepository.cs"
new file mode 100644
index 0000000..4fd9b12
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_RecordRepository/RecordRepository.cs"
@@ -0,0 +1,22 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_IRecordRepository;
+
+namespace WIDESEA_RecordRepository
+{
+ public class RecordRepository : IRecordRepository
+ {
+ public ILocationStatusChangeRecordRepository LocationStatusChangeRecordRepository { get; }
+
+ public IStockQuantityChangeRecordRepository StockQuantityChangeRecordRepository { get; }
+
+ public RecordRepository(ILocationStatusChangeRecordRepository locationStatusChangeRecordRepository, IStockQuantityChangeRecordRepository stockQuantityChangeRecordRepository)
+ {
+ LocationStatusChangeRecordRepository = locationStatusChangeRecordRepository;
+ StockQuantityChangeRecordRepository = stockQuantityChangeRecordRepository;
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/RecordService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/RecordService.cs"
new file mode 100644
index 0000000..5586293
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_RecordService/RecordService.cs"
@@ -0,0 +1,22 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_IRecordService;
+
+namespace WIDESEA_RecordService
+{
+ public class RecordService : IRecordService
+ {
+ public ILocationStatusChangeRecordSetvice LocationStatusChangeRecordSetvice { get; }
+
+ public IStockQuantityChangeRecordService StockQuantityChangeRecordService { get; }
+
+ public RecordService(ILocationStatusChangeRecordSetvice locationStatusChangeRecordSetvice, IStockQuantityChangeRecordService stockQuantityChangeRecordService)
+ {
+ LocationStatusChangeRecordSetvice = locationStatusChangeRecordSetvice;
+ StockQuantityChangeRecordService = stockQuantityChangeRecordService;
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockInfoRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockInfoRepository.cs"
index 404a6f3..d49d154 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockInfoRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockInfoRepository.cs"
@@ -1,11 +1,13 @@
锘縰sing Org.BouncyCastle.Crypto;
using SqlSugar;
+using SqlSugar.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core.BaseRepository;
+using WIDESEA_Core.Enums;
using WIDESEA_DTO.Stock;
using WIDESEA_IBasicRepository;
using WIDESEA_IStockRepository;
@@ -15,10 +17,8 @@
{
public class StockInfoRepository : RepositoryBase<Dt_StockInfo>, IStockInfoRepository
{
- private readonly ILocationInfoRepository _locationInfoRepository;
- public StockInfoRepository(IUnitOfWorkManage unitOfWorkManage, ILocationInfoRepository locationInfoRepository) : base(unitOfWorkManage)
+ public StockInfoRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
{
- _locationInfoRepository = locationInfoRepository;
}
public List<StockViewDTO> GetAllStockViews()
@@ -31,24 +31,22 @@
AreaId = a.AreaId,
LocationCode = b.LocationCode,
Column = a.Column,
- CreateDate = a.CreateDate,
- Creater = a.Creater,
+ CreateDate = b.CreateDate,
+ Creater = b.Creater,
Depth = a.Depth,
- EnalbeStatus = a.EnalbeStatus,
- Id = a.Id,
+ EnalbeStatus = a.EnableStatus,
IsFull = b.IsFull,
Layer = a.Layer,
LocationName = a.LocationName,
LocationStatus = a.LocationStatus,
LocationType = a.LocationType,
- Modifier = a.Modifier,
- ModifyDate = a.ModifyDate,
+ Modifier = b.Modifier,
+ ModifyDate = b.ModifyDate,
PalletCode = b.PalletCode,
- Remark = a.Remark,
+ StockRemark = b.Remark,
RoadwayNo = a.RoadwayNo,
Row = a.Row,
StockId = b.Id,
- StockRemark = b.Remark,
StockStatus = b.StockStatus,
Details = b.Details,
}).Includes(x => x.Details).ToList();
@@ -96,5 +94,12 @@
{
return Db.UpdateNav(stockInfo).Include(x => x.Details).ExecuteCommand();
}
+
+ public Dt_StockInfo GetPalletStockInfo(string roadwayNo)
+ {
+ //ISugarQueryable<string> locationCodes = Db.Queryable<Dt_LocationInfo>().Where(x => x.RoadwayNo == roadwayNo && x.LocationStatus == LocationStatusEnum.Pallet.ObjToInt() && (x.EnalbeStatus == LocationEnalbeStatusEnum.OnlyOut.ObjToInt() || LocationEnalbeStatusEnum.Normal.ObjToInt() == x.EnalbeStatus)).Select(x => x.LocationCode);
+
+ return Db.Queryable<Dt_StockInfo>().Where(x => x.StockStatus == StockStatusEmun.宸插叆搴�.ObjToInt() && SqlFunc.Subqueryable<Dt_LocationInfo>().Where(v => v.LocationCode == x.LocationCode && v.RoadwayNo == roadwayNo && v.LocationStatus == LocationStatusEnum.Pallet.ObjToInt() && (v.EnableStatus == LocationEnalbeStatusEnum.OnlyOut.ObjToInt() || LocationEnalbeStatusEnum.Normal.ObjToInt() == v.EnableStatus)).Any()).OrderBy(x => x.ModifyDate).First();
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockRepository.cs"
new file mode 100644
index 0000000..d400d0e
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockRepository/StockRepository.cs"
@@ -0,0 +1,22 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_IStockRepository;
+
+namespace WIDESEA_StockRepository
+{
+ public class StockRepository : IStockRepository
+ {
+ public IStockInfoDetailRepository StockInfoDetailRepository { get; }
+
+ public IStockInfoRepository StockInfoRepository { get; }
+
+ public StockRepository(IStockInfoDetailRepository stockInfoDetailRepository, IStockInfoRepository stockInfoRepository)
+ {
+ StockInfoDetailRepository = stockInfoDetailRepository;
+ StockInfoRepository = stockInfoRepository;
+ }
+ }
+}
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 df24206..ca20254 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"
@@ -23,24 +23,19 @@
public class StockInfoService : ServiceBase<Dt_StockInfo, IStockInfoRepository>, IStockInfoService
{
private readonly IMapper _mapper;
- private readonly IStockQuantityChangeRecordService _stockQuantityChangeRecordService;
- private readonly IStockInfoDetailRepository _stockInfoDetailRepository;
- private readonly IWarehouseRepository _warehouseRepository;
- private readonly IRoadwayInfoRepository _roadwayInfoRepository;
- private readonly IAreaInfoRepository _areaInfoRepository;
- private readonly ILocationInfoRepository _locationInfoRepository;
+
+ private readonly IBasicRepository _basicRepository;
+ private readonly IStockRepository _stockRepository;
+ private readonly IRecordService _recordService;
public IStockInfoRepository Repository => BaseDal;
- public StockInfoService(IStockInfoRepository BaseDal, IMapper mapper, IStockQuantityChangeRecordService stockQuantityChangeRecordService, IStockInfoDetailRepository stockInfoDetailRepository, IWarehouseRepository warehouseRepository, IRoadwayInfoRepository roadwayInfoRepository, IAreaInfoRepository areaInfoRepository, ILocationInfoRepository locationInfoRepository) : base(BaseDal)
+ public StockInfoService(IStockInfoRepository BaseDal, IMapper mapper, IBasicRepository basicRepository, IStockRepository stockRepository,IRecordService recordService) : base(BaseDal)
{
_mapper = mapper;
- _stockQuantityChangeRecordService = stockQuantityChangeRecordService;
- _stockInfoDetailRepository = stockInfoDetailRepository;
- _warehouseRepository = warehouseRepository;
- _roadwayInfoRepository = roadwayInfoRepository;
- _areaInfoRepository = areaInfoRepository;
- _locationInfoRepository = locationInfoRepository;
+ _basicRepository = basicRepository;
+ _stockRepository = stockRepository;
+ _recordService = recordService;
}
public Dt_StockInfo? GetStockByPalletCode(string palletCode)
@@ -48,7 +43,7 @@
Dt_StockInfo stockInfo = BaseDal.QueryFirst(x => x.PalletCode == palletCode);
if (stockInfo != null)
{
- stockInfo.Details = _stockInfoDetailRepository.QueryData(x => x.StockId == stockInfo.Id);
+ stockInfo.Details = _stockRepository.StockInfoDetailRepository.QueryData(x => x.StockId == stockInfo.Id);
}
return stockInfo;
}
@@ -78,7 +73,7 @@
{
if (stockInfo.Details[i].Id == 0)
{
- details.Add(_stockInfoDetailRepository.Db.Insertable(stockInfo.Details[i]).ExecuteReturnEntity());
+ details.Add(_stockRepository.StockInfoDetailRepository.Db.Insertable(stockInfo.Details[i]).ExecuteReturnEntity());
}
}
@@ -97,31 +92,31 @@
}
//_stockQuantityChangeRecordRepository.AddData(stockQuantityChangeRecords);
stockInfo.Details = details;
- _stockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfo.Details, beforeQuantity, stockInfo.Details.Sum(x => x.StockQuantity) + beforeQuantity, StockChangeType.MaterielGroup);
+ _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfo.Details, beforeQuantity, stockInfo.Details.Sum(x => x.StockQuantity) + beforeQuantity, StockChangeType.MaterielGroup);
}
public List<Dt_StockInfo> GetUseableStocks(string materielCode)
{
- List<string> roadways = _roadwayInfoRepository.CanOutRoadwayNos;
+ List<string> roadways = _basicRepository.RoadwayInfoRepository.CanOutRoadwayNos;
- List<int> warehouseIds = _warehouseRepository.EnableWarehouseIds;
+ List<int> warehouseIds = _basicRepository.WarehouseRepository.EnableWarehouseIds;
- List<int> areaIds = _areaInfoRepository.GetEnableAreaIds(warehouseIds);
+ List<int> areaIds = _basicRepository.AreaInfoRepository.GetEnableAreaIds(warehouseIds);
- List<string> locationCodes = _locationInfoRepository.GetCanOutLocationCodes(roadways, areaIds);
+ List<string> locationCodes = _basicRepository.LocationInfoRepository.GetCanOutLocationCodes(roadways, areaIds);
return BaseDal.GetStockInfos(materielCode, locationCodes);
}
public List<StockSelectViewDTO> GetStockSelectViews(string materielCode)
{
- List<string> roadways = _roadwayInfoRepository.CanOutRoadwayNos;
+ List<string> roadways = _basicRepository.RoadwayInfoRepository.CanOutRoadwayNos;
- List<int> warehouseIds = _warehouseRepository.EnableWarehouseIds;
+ List<int> warehouseIds = _basicRepository.WarehouseRepository.EnableWarehouseIds;
- List<int> areaIds = _areaInfoRepository.GetEnableAreaIds(warehouseIds);
+ List<int> areaIds = _basicRepository.AreaInfoRepository.GetEnableAreaIds(warehouseIds);
- List<string> locationCodes = _locationInfoRepository.GetCanOutLocationCodes(roadways, areaIds);
+ List<string> locationCodes = _basicRepository.LocationInfoRepository.GetCanOutLocationCodes(roadways, areaIds);
return BaseDal.QueryTabs<Dt_StockInfo, Dt_StockInfoDetail, StockSelectViewDTO>((a, b) => a.Id == b.StockId, (a, b) => new StockSelectViewDTO
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs"
new file mode 100644
index 0000000..4f74111
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockSerivce.cs"
@@ -0,0 +1,22 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_IStockService;
+
+namespace WIDESEA_StockService
+{
+ public class StockSerivce:IStockService
+ {
+ public IStockInfoDetailService StockInfoDetailService { get; }
+
+ public IStockInfoService StockInfoService { get; }
+
+ public StockSerivce(IStockInfoDetailService stockInfoDetailService, IStockInfoService stockInfoService)
+ {
+ StockInfoDetailService = stockInfoDetailService;
+ StockInfoService = stockInfoService;
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs"
new file mode 100644
index 0000000..01fc23f
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/StockViewService.cs"
@@ -0,0 +1,107 @@
+锘�
+using Microsoft.AspNetCore.Http;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Drawing.Printing;
+using System.Dynamic;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core;
+using WIDESEA_Core.BaseRepository;
+using WIDESEA_Core.BaseServices;
+using WIDESEA_Core.Enums;
+using WIDESEA_Core.Helper;
+using WIDESEA_Core.Utilities;
+using WIDESEA_DTO.Stock;
+using WIDESEA_IStockRepository;
+using WIDESEA_IStockService;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_StockService
+{
+ public class StockViewService : IStockViewService
+ {
+ private readonly IUnitOfWorkManage _unitOfWorkManage;
+ private readonly SqlSugarClient _dbBase;
+
+ public StockViewService(IUnitOfWorkManage unitOfWorkManage)
+ {
+ _unitOfWorkManage = unitOfWorkManage;
+ _dbBase = unitOfWorkManage.GetDbClient();
+ }
+
+ public virtual PageGridData<StockViewDTO> GetPageData(PageDataOptions options)
+ {
+ string where = options.ValidatePageOptions(typeof(StockViewDTO).GetProperties());
+ //鑾峰彇鎺掑簭瀛楁
+ //Dictionary<string, OrderByType> orderbyDic = options.GetPageDataSort(typeof(StockViewDTO).GetProperties());
+ //List<OrderByModel> orderByModels = new List<OrderByModel>();
+ //foreach (var item in orderbyDic)
+ //{
+ // OrderByModel orderByModel = new OrderByModel()
+ // {
+ // FieldName = item.Key,
+ // OrderByType = item.Value
+ // };
+ // orderByModels.Add(orderByModel);
+ //}
+ int totalCount = 0;
+
+ ISugarQueryable<Dt_StockInfo> sugarQueryable1 = _dbBase.Queryable<Dt_StockInfo>();
+ ISugarQueryable<Dt_LocationInfo> sugarQueryable = _dbBase.Queryable<Dt_LocationInfo>();
+
+ List<StockViewDTO> list = sugarQueryable1.InnerJoin(sugarQueryable, (b, a) => a.LocationCode == b.LocationCode).WhereIF(!string.IsNullOrEmpty(where), where).Select((b, a) => new StockViewDTO
+ {
+ AreaId = a.AreaId,
+ LocationCode = b.LocationCode,
+ Column = a.Column,
+ CreateDate = b.CreateDate,
+ Creater = b.Creater,
+ Depth = a.Depth,
+ EnalbeStatus = a.EnableStatus,
+ IsFull = b.IsFull,
+ Layer = a.Layer,
+ LocationName = a.LocationName,
+ LocationStatus = a.LocationStatus,
+ LocationType = a.LocationType,
+ Modifier = b.Modifier,
+ ModifyDate = b.ModifyDate,
+ PalletCode = b.PalletCode,
+ StockRemark = b.Remark,
+ RoadwayNo = a.RoadwayNo,
+ Row = a.Row,
+ StockId = b.Id,
+ StockStatus = b.StockStatus,
+ Details = b.Details,
+ }).ToPageList(options.Page, options.Rows, ref totalCount);
+ return new PageGridData<StockViewDTO>(totalCount, list);
+
+ }
+
+ public virtual object GetDetailPage(PageDataOptions pageData)
+ {
+ Type t = typeof(StockViewDTO);
+
+ if (pageData.Value == null) return new PageGridData<object>(total: 0, null);
+ string keyName = t.GetKeyName();
+ ////鐢熸垚鏌ヨ鏉′欢
+ //Expression<Func<TEntity, bool>> whereExpression = keyName.CreateExpression<TEntity>(pageData.Value, LinqExpressionType.Equal);
+ int totalCount = 0;
+ PropertyInfo? propertyInfo = t.GetProperties().FirstOrDefault(x => x.GetCustomAttribute<Navigate>() != null);
+ if (propertyInfo != null)
+ {
+ Type detailType = propertyInfo.PropertyType.GetGenericArguments()[0];
+ Navigate? navigate = propertyInfo.GetCustomAttribute<Navigate>();
+ if (navigate != null)
+ {
+ List<ExpandoObject> list = _dbBase.Queryable(detailType.Name, "detail").Where(navigate.GetName(), "=", pageData.Value).ToPageList(pageData.Page, pageData.Rows, ref totalCount);
+ return new PageGridData<ExpandoObject>(totalCount, list);
+ }
+ }
+ return new PageGridData<object>(total: 0, null);
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemRepository/Sys_MenuRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemRepository/Sys_MenuRepository.cs"
index 3f3b7d8..adfc65f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemRepository/Sys_MenuRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_SystemRepository/Sys_MenuRepository.cs"
@@ -27,11 +27,10 @@
public List<MenuDTO> GetAllMenu()
{
- List<Sys_Menu> menus = base.QueryData(x => x.Enable == 1 || x.Enable == 2).OrderByDescending(a => a.OrderNo).ThenByDescending(q => q.ParentId).ToList();
+ List<Sys_Menu> menus = base.QueryData(x => (x.Enable == 1 || x.Enable == 2) && x.MenuType == App.User.MenuType).OrderByDescending(a => a.OrderNo).ThenByDescending(q => q.ParentId).ToList();
List<MenuDTO> _menus = _mapper.Map<List<MenuDTO>>(menus);
_menus.ForEach(x =>
{
- x.MenuType ??= 0;
if (!string.IsNullOrEmpty(x.Auth) && x.Auth.Length > 10)
{
try
@@ -99,7 +98,7 @@
ParentId = a.ParentId,
TableName = (a.TableName ?? "").ToLower(),
UserAuth = a.Auth,
- MenuType = a.MenuType ?? 0
+ MenuType = a.MenuType
}).ToList();
return MenuActionToArray(permissions);
}
@@ -111,7 +110,7 @@
{
//娌℃湁redis/memory缂撳瓨瑙掕壊鐨勭増鏈彿鎴栦笌褰撳墠鏈嶅姟鍣ㄧ殑瑙掕壊鐗堟湰鍙蜂笉鍚屾椂锛屽埛鏂扮紦瀛�
- List<Permissions> _permissions = QueryTabs<Sys_Menu, Sys_RoleAuth, Permissions>((a, b) => new object[] { JoinType.Inner, a.MenuId == b.MenuId }, (a, b) => new Permissions { MenuId = a.MenuId, ParentId = a.ParentId, TableName = (a.TableName ?? "").ToLower(), MenuAuth = a.Auth, UserAuth = b.AuthValue ?? "", MenuType = a.MenuType ?? 0 }, (a, b) => b.RoleId == roleId, x => true);
+ List<Permissions> _permissions = QueryTabs<Sys_Menu, Sys_RoleAuth, Permissions>((a, b) => new object[] { JoinType.Inner, a.MenuId == b.MenuId }, (a, b) => new Permissions { MenuId = a.MenuId, ParentId = a.ParentId, TableName = (a.TableName ?? "").ToLower(), MenuAuth = a.Auth, UserAuth = b.AuthValue ?? "", MenuType = a.MenuType }, (a, b) => b.RoleId == roleId, x => true);
ActionToArray(_permissions);
@@ -194,7 +193,7 @@
p.Icon,
p.Enable,
// 2022.03.26澧炵Щ鍔ㄧ鍔犺彍鍗曠被鍨�
- MenuType = p.MenuType ?? 0,
+ p.MenuType,
p.CreateDate,
p.Creater,
p.TableName,
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 327680c..8bed7e3 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"
@@ -135,7 +135,6 @@
Sys_Menu sysMenu = BaseDal.QueryFirst(x => x.TableName == menu.TableName);
if (sysMenu != null)
{
- sysMenu.MenuType ??= 0;
if (sysMenu.MenuType == menu.MenuType)
{
if ((menu.MenuId > 0 && sysMenu.MenuId != menu.MenuId)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_AGV.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_AGV.cs"
new file mode 100644
index 0000000..b3d50db
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_AGV.cs"
@@ -0,0 +1,179 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Common;
+using WIDESEA_Core;
+using WIDESEA_Core.Enums;
+using WIDESEA_Core.Helper;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_TaskInfoService
+{
+ public partial class TaskService
+ {
+ /// <summary>
+ /// 绔嬪簱鍑哄簱AGV鎼繍
+ /// </summary>
+ /// <param name="outTask"></param>
+ /// <returns></returns>
+ public WebResponseContent ShelfOutboundCarry(Dt_Task outTask)
+ {
+ Dt_CachePoint cachePoint = GetCachePointByStartPoint(outTask.TargetAddress);
+
+ Dt_Task task = new()
+ {
+ CurrentAddress = outTask.TargetAddress,
+ Grade = 0,
+ NextAddress = cachePoint.PointCode,
+ OrderNo = outTask.OrderNo,
+ PalletCode = outTask.PalletCode + "-AGV",
+ Roadway = "",
+ SourceAddress = outTask.TargetAddress,
+ TargetAddress = cachePoint.PointCode,
+ SourceKey = outTask.TaskId,
+ TaskNum = outTask.TaskNum,
+ TaskStatus = AGVTaskStatusEnum.AGV_New.ObjToInt(),
+ TaskType = TaskTypeEnum.AGVCarry.ObjToInt(),
+ };
+ cachePoint.PointStatus = LocationStatusEnum.Lock.ObjToInt();
+
+ _basicService.CachePointService.Repository.UpdateData(cachePoint);
+ Repository.AddData(task);
+ return WebResponseContent.Instance.OK();
+ }
+
+ /// <summary>
+ /// 鍙枡
+ /// </summary>
+ /// <param name="endPoint"></param>
+ /// <returns></returns>
+ public WebResponseContent CallMateriel(string endPoint)
+ {
+ Dt_CachePoint cachePoint = GetCachePointByEndPoint(endPoint);
+
+ Dt_Task task = new Dt_Task()
+ {
+ CurrentAddress = cachePoint.PointCode,
+ Grade = 0,
+ NextAddress = endPoint,
+ OrderNo = "",
+ PalletCode = cachePoint.Remark,
+ Roadway = "",
+ SourceAddress = cachePoint.PointCode,
+ TargetAddress = endPoint,
+ SourceKey = 0,
+ TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
+ TaskStatus = AGVTaskStatusEnum.AGV_New.ObjToInt(),
+ TaskType = TaskTypeEnum.AGVCarry.ObjToInt(),
+ };
+ cachePoint.PointStatus = LocationStatusEnum.Lock.ObjToInt();
+
+ _basicService.CachePointService.Repository.UpdateData(cachePoint);
+ Repository.AddData(task);
+ return WebResponseContent.Instance.OK();
+ }
+
+ /// <summary>
+ /// 鐗╂枡鎼繍
+ /// </summary>
+ /// <param name="startPoint"></param>
+ /// <returns></returns>
+ public WebResponseContent MaterielCarry(string startPoint)
+ {
+ Dt_CachePoint cachePoint = GetCachePointByStartPoint(startPoint);
+
+ Dt_Task task = new()
+ {
+ CurrentAddress = startPoint,
+ Grade = 0,
+ NextAddress = cachePoint.PointCode,
+ OrderNo = "",
+ PalletCode = startPoint + "-AGV",
+ Roadway = "",
+ SourceAddress = startPoint,
+ TargetAddress = cachePoint.PointCode,
+ SourceKey = 0,
+ TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
+ TaskStatus = AGVTaskStatusEnum.AGV_New.ObjToInt(),
+ TaskType = TaskTypeEnum.AGVCarry.ObjToInt(),
+ };
+ cachePoint.PointStatus = LocationStatusEnum.Lock.ObjToInt();
+
+ _basicService.CachePointService.Repository.UpdateData(cachePoint);
+ Repository.AddData(task);
+ return WebResponseContent.Instance.OK();
+ }
+
+ private Dt_CachePoint GetCachePointByStartPoint(string startPoint)
+ {
+ Dt_AreaRouter areaRouter = _basicService.AreaRouterService.Repository.QueryFirst(x => x.StartArea == startPoint);
+ if (areaRouter == null)
+ {
+ throw new Exception("鏈壘鍒拌矾鐢变俊鎭�");
+ }
+ Dt_AreaInfo areaInfo = _basicService.AreaInfoService.Repository.QueryFirst(x => x.AreaCode == areaRouter.NextArea);
+ if (areaInfo == null)
+ {
+ throw new Exception("鏈壘鍒颁笅涓�鍖哄煙淇℃伅");
+ }
+
+ Dt_CachePoint? cachePoint = _basicService.CachePointService.AssignCachePoint(areaInfo.Id);
+ if (cachePoint == null)
+ {
+ throw new Exception("鏈壘鍒扮┖闂茬紦瀛樼偣");
+ }
+
+ return cachePoint;
+ }
+
+ private Dt_CachePoint GetCachePointByEndPoint(string endPoint)
+ {
+ Dt_AreaRouter areaRouter = _basicService.AreaRouterService.Repository.QueryFirst(x => x.NextArea == endPoint);
+ if (areaRouter == null)
+ {
+ throw new Exception("鏈壘鍒拌矾鐢变俊鎭�");
+ }
+ Dt_AreaInfo areaInfo = _basicService.AreaInfoService.Repository.QueryFirst(x => x.AreaCode == areaRouter.StartArea);
+ if (areaInfo == null)
+ {
+ throw new Exception("鏈壘鍒拌捣鐐圭紦瀛樺尯鍩熶俊鎭�");
+ }
+
+ Dt_CachePoint? cachePoint = _basicService.CachePointService.GetIbStockCachePoint(areaInfo.Id);
+ if (cachePoint == null)
+ {
+ throw new Exception("鏈壘鍒版湁璐х紦瀛樼偣");
+ }
+ return cachePoint;
+ }
+
+ public object AGVTaskFeedBack(AGVTaskFeedBackModel model)
+ {
+ Dt_Task task = BaseDal.QueryFirst(x => x.TaskId == Convert.ToInt32(model.Task_id));
+ if (task == null)
+ {
+ return new { code = 404, message = "鏈壘鍒拌浠诲姟" };
+ }
+
+ Dt_CachePoint startCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == task.SourceAddress);
+ if (startCachePoint != null)
+ {
+ startCachePoint.PointStatus = LocationStatusEnum.Free.ObjToInt();
+ _basicService.CachePointService.Repository.UpdateData(startCachePoint);
+ }
+
+ Dt_CachePoint endCachePoint = _basicService.CachePointService.Repository.QueryFirst(x => x.PointCode == task.TargetAddress);
+ if (endCachePoint != null)
+ {
+ endCachePoint.PointStatus = LocationStatusEnum.InStock.ObjToInt();
+ _basicService.CachePointService.Repository.UpdateData(endCachePoint);
+ }
+
+ BaseDal.DeleteData(task);
+
+ return new { code = 200, message = "鎴愬姛" };
+ }
+ }
+}
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"
index d2c5191..51ee5d1 100644
--- "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"
@@ -72,7 +72,7 @@
WebResponseContent content = new WebResponseContent();
try
{
- Dt_StockInfo stockInfo = _stockInfoService.Repository.GetStockInfo(palletCode);
+ Dt_StockInfo stockInfo = _stockService.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);
@@ -99,7 +99,7 @@
WebResponseContent content = new WebResponseContent();
try
{
- Dt_LocationInfo? locationInfo = _locationInfoService.AssignLocation(stationCode, taskType);
+ Dt_LocationInfo? locationInfo = _basicService.LocationInfoService.AssignLocation(stationCode, taskType);
if (locationInfo != null)
{
Dt_Task task = new()
@@ -126,15 +126,15 @@
orderNo = stockInfo.Details.FirstOrDefault()?.OrderNo ?? "";
stockInfo.StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt();
- _stockInfoService.Repository.UpdateData(stockInfo);
+ _stockService.StockInfoService.Repository.UpdateData(stockInfo);
}
else
{
return content = WebResponseContent.Instance.Error("鏈壘鍒板簱瀛樹俊鎭�");
}
}
- _locationInfoService.Repository.UpdateData(locationInfo);
- _locationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), orderNo, task.TaskNum);
+ _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
+ _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), orderNo, task.TaskNum);
return content = WebResponseContent.Instance.OK();
}
@@ -186,7 +186,7 @@
}
else
{
- if (_stockInfoService.Repository.QueryFirst(x => x.PalletCode == palletCode) != null)
+ if (_stockService.StockInfoService.Repository.QueryFirst(x => x.PalletCode == palletCode) != null)
{
return (false, "璇ユ墭鐩樺凡瀛樺湪搴撳唴");
}
@@ -195,35 +195,6 @@
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"
index 924d427..4bb2787 100644
--- "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"
@@ -13,6 +13,12 @@
{
public partial class TaskService
{
+
+ /// <summary>
+ /// 搴撳瓨鏁版嵁杞嚭搴撲换鍔�
+ /// </summary>
+ /// <param name="stockInfos"></param>
+ /// <returns></returns>
public List<Dt_Task> GetTasks(List<Dt_StockInfo> stockInfos)
{
List<Dt_Task> tasks = new List<Dt_Task>();
@@ -22,8 +28,8 @@
if (stockInfo != null)
{
- Dt_LocationInfo locationInfo = _locationInfoService.Repository.QueryFirst(x => x.LocationCode == stockInfo.LocationCode);
- Dt_RoadwayInfo roadwayInfo = _roadwayInfoRepository.QueryFirst(x => x.RoadwayNo == locationInfo.RoadwayNo);
+ Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == stockInfo.LocationCode);
+ Dt_RoadwayInfo roadwayInfo = _basicService.RoadwayInfoService.Repository.QueryFirst(x => x.RoadwayNo == locationInfo.RoadwayNo);
if (roadwayInfo != null)
{
Dt_Task task = new()
@@ -35,9 +41,9 @@
Roadway = locationInfo.RoadwayNo,
SourceAddress = stockInfo.LocationCode,
TargetAddress = roadwayInfo.OutStationCode,
- TaskStatus = InTaskStatusEnum.InNew.ObjToInt(),
+ TaskStatus = OutTaskStatusEnum.OutNew.ObjToInt(),
TaskType = TaskTypeEnum.Outbound.ObjToInt(),
- TaskNum = BaseDal.GetTaskNum("SeqTaskNum")
+ TaskNum = BaseDal.GetTaskNum(nameof(SequenceEnum.SeqTaskNum))
};
tasks.Add(task);
}
@@ -46,10 +52,17 @@
return tasks;
}
+ /// <summary>
+ /// 鍑哄簱浠诲姟鏁版嵁澶勭悊
+ /// </summary>
+ /// <param name="orderDetailId"></param>
+ /// <param name="stockSelectViews"></param>
+ /// <returns></returns>
+ /// <exception cref="Exception"></exception>
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);
+ Dt_OutboundOrderDetail outboundOrderDetail = _outboundService.OutboundOrderDetailService.Repository.QueryFirst(x => x.Id == orderDetailId);
if (outboundOrderDetail == null)
{
@@ -66,7 +79,7 @@
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);
+ (List<Dt_StockInfo>, Dt_OutboundOrderDetail, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.OutboundOrderDetailService.AssignStockOutbound(outboundOrderDetail, stockSelectViews);
if (result.Item1 != null && result.Item1.Count > 0)
{
tasks = GetTasks(result.Item1);
@@ -88,10 +101,10 @@
}
else
{
- List<Dt_OutStockLockInfo> stockLockInfos = _outStockLockInfoService.GetByOrderDetailId(outboundOrderDetail.OrderId);
+ List<Dt_OutStockLockInfo> stockLockInfos = _outboundService.OutboundStockLockInfoService.GetByOrderDetailId(outboundOrderDetail.OrderId);
if (stockLockInfos != null && stockLockInfos.Count > 0)
{
- List<Dt_StockInfo> stocks = _stockInfoService.Repository.GetStockInfosByPalletCodes(stockLockInfos.Select(x => x.PalletCode).Distinct().ToList());
+ List<Dt_StockInfo> stocks = _stockService.StockInfoService.Repository.GetStockInfosByPalletCodes(stockLockInfos.Select(x => x.PalletCode).Distinct().ToList());
tasks = GetTasks(stocks);
}
}
@@ -99,6 +112,12 @@
return (tasks, stockInfos, orderDetail == null ? null : new List<Dt_OutboundOrderDetail> { orderDetail }, outStockLockInfos, locationInfos);
}
+ /// <summary>
+ /// 鐢熸垚鍑哄簱浠诲姟
+ /// </summary>
+ /// <param name="orderDetailId"></param>
+ /// <param name="stockSelectViews"></param>
+ /// <returns></returns>
public WebResponseContent GenerateOutboundTask(int orderDetailId, List<StockSelectViewDTO> stockSelectViews)
{
try
@@ -115,6 +134,15 @@
}
}
+ /// <summary>
+ /// 鐢熸垚鍑哄簱浠诲姟鍚庢暟鎹洿鏂板埌鏁版嵁搴�
+ /// </summary>
+ /// <param name="tasks"></param>
+ /// <param name="stockInfos"></param>
+ /// <param name="outboundOrderDetails"></param>
+ /// <param name="outStockLockInfos"></param>
+ /// <param name="locationInfos"></param>
+ /// <returns></returns>
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
@@ -124,7 +152,7 @@
BaseDal.AddData(tasks);
if (stockInfos != null && outboundOrderDetails != null && outStockLockInfos != null && locationInfos != null)
{
- WebResponseContent content = _outboundOrderDetailService.LockOutboundStockDataUpdate(stockInfos, outboundOrderDetails, outStockLockInfos, locationInfos, tasks: tasks);
+ WebResponseContent content = _outboundService.OutboundOrderDetailService.LockOutboundStockDataUpdate(stockInfos, outboundOrderDetails, outStockLockInfos, locationInfos, tasks: tasks);
if (content.Status)
{
@@ -143,7 +171,7 @@
x.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt();
});
- _outboundOrderDetailService.Repository.UpdateData(outboundOrderDetails);
+ _outboundService.OutboundOrderDetailService.Repository.UpdateData(outboundOrderDetails);
}
_unitOfWorkManage.CommitTran();
return WebResponseContent.Instance.OK();
@@ -156,6 +184,11 @@
}
+ /// <summary>
+ /// 鐢熸垚鍑哄簱浠诲姟
+ /// </summary>
+ /// <param name="keys"></param>
+ /// <returns></returns>
public WebResponseContent GenerateOutboundTask(int[] keys)
{
try
@@ -200,5 +233,55 @@
return WebResponseContent.Instance.Error(ex.Message);
}
}
+
+ /// <summary>
+ /// 绌烘墭鐩樺嚭搴撲换鍔�
+ /// </summary>
+ /// <param name="inTask"></param>
+ /// <returns></returns>
+ public WebResponseContent PalletOutboundTask(string roadwayNo, string endStation)
+ {
+ try
+ {
+ Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetPalletStockInfo(roadwayNo);
+ if (stockInfo == null)
+ {
+ return WebResponseContent.Instance.Error("鏈壘鍒扮┖鎵樼洏搴撳瓨");
+ }
+ Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == stockInfo.LocationCode && x.RoadwayNo == roadwayNo);
+ if (locationInfo == null)
+ {
+ return WebResponseContent.Instance.Error("鏈壘鍒扮┖鎵樼洏搴撳瓨瀵瑰簲鐨勮揣浣嶄俊鎭�");
+ }
+ Dt_RoadwayInfo roadwayInfo = _basicService.RoadwayInfoService.Repository.QueryFirst(x => x.InStationCode == endStation && x.RoadwayNo == roadwayNo);
+ if (roadwayInfo == null)
+ {
+ return WebResponseContent.Instance.Error("鏈壘鍒扮粓鐐瑰贩閬撲俊鎭�");
+ }
+ Dt_Task task = new Dt_Task()
+ {
+ CurrentAddress = stockInfo.LocationCode,
+ Grade = 0,
+ NextAddress = endStation,
+ PalletCode = stockInfo.PalletCode,
+ Roadway = roadwayNo,
+ SourceAddress = stockInfo.LocationCode,
+ TargetAddress = endStation,
+ TaskStatus = OutTaskStatusEnum.OutNew.ObjToInt(),
+ TaskType = TaskTypeEnum.PalletOutbound.ObjToInt(),
+ };
+
+ _unitOfWorkManage.BeginTran();
+ stockInfo.StockStatus = StockStatusEmun.鍑哄簱閿佸畾.ObjToInt();
+ locationInfo.LocationStatus = LocationStatusEnum.Lock.ObjToInt();
+ BaseDal.AddData(task);
+ _unitOfWorkManage.CommitTran();
+ return WebResponseContent.Instance.OK();
+ }
+ catch (Exception ex)
+ {
+ 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 4e92639..e0ba81d 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"
@@ -37,6 +37,7 @@
using WIDESEA_DTO.Stock;
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
+using WIDESEA_IInboundService;
using WIDESEA_IOutboundRepository;
using WIDESEA_IOutboundService;
using WIDESEA_IRecordService;
@@ -53,46 +54,108 @@
{
private readonly IMapper _mapper;
private readonly IUnitOfWorkManage _unitOfWorkManage;
- private readonly ILocationInfoService _locationInfoService;
- private readonly IStockInfoService _stockInfoService;
- private readonly ILocationStatusChangeRecordSetvice _locationStatusChangeRecordSetvice;
- private readonly IOutboundOrderDetailService _outboundOrderDetailService;
- private readonly IRoadwayInfoRepository _roadwayInfoRepository;
- private readonly IOutStockLockInfoService _outStockLockInfoService;
+
+ private readonly IBasicService _basicService;
+ private readonly IOutboundService _outboundService;
+ private readonly IInboundService _inboundService;
+ private readonly IRecordService _recordService;
+ private readonly IStockService _stockService;
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)
+ public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IBasicService basicService, IOutboundService outboundService, IInboundService inboundService, IRecordService recordService, IStockService stockService) : base(BaseDal)
{
_mapper = mapper;
- _locationInfoService = locationInfoService;
- _stockInfoService = stockInfoService;
- _locationStatusChangeRecordSetvice = locationStatusChangeRecordSetvice;
- _outboundOrderDetailService = outboundOrderDetailService;
- _roadwayInfoRepository = roadwayInfoRepository;
_unitOfWorkManage = unitOfWorkManage;
- _outStockLockInfoService = outStockLockInfoService;
+ _basicService = basicService;
+ _outboundService = outboundService;
+ _inboundService = inboundService;
+ _recordService = recordService;
+ _stockService = stockService;
+ }
+
+ /// <summary>
+ /// 浠诲姟瀹屾垚
+ /// </summary>
+ /// <param name="taskNum">浠诲姟鍙�</param>
+ /// <returns>杩斿洖澶勭悊缁撴灉</returns>
+ public WebResponseContent TaskCompleted(int taskNum)
+ {
+ try
+ {
+ Dt_Task task = BaseDal.QueryFirst(x => x.TaskNum == taskNum);
+ if (task == null)
+ {
+ return WebResponseContent.Instance.Error("鏈壘鍒颁换鍔′俊鎭�");
+ }
+ MethodInfo? methodInfo = GetType().GetMethod(((TaskTypeEnum)task.TaskType) + "TaskCompleted");
+ if (methodInfo != null)
+ {
+ WebResponseContent? responseContent = (WebResponseContent?)methodInfo.Invoke(this, new object[] { task });
+ if (responseContent != null)
+ {
+ return responseContent;
+ }
+ }
+ return WebResponseContent.Instance.Error("鏈壘鍒颁换鍔$被鍨嬪搴斾笟鍔″鐞嗛�昏緫");
+ }
+ catch (Exception ex)
+ {
+ return WebResponseContent.Instance.Error(ex.Message);
+ }
+
}
public WebResponseContent InboundTaskCompleted(Dt_Task task)
{
- Dt_StockInfo stockInfo = _stockInfoService.Repository.GetStockInfo(task.PalletCode);
+ Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(task.PalletCode);
- Dt_LocationInfo locationInfo = _locationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress);
+ Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress);
- CheckInboundCompleted(stockInfo, locationInfo);
+ CheckCompleted(stockInfo, locationInfo);
stockInfo.LocationCode = locationInfo.LocationCode;
stockInfo.StockStatus = StockStatusEmun.宸插叆搴�.ObjToInt();
- _stockInfoService.Repository.UpdateData(stockInfo);
+ _stockService.StockInfoService.Repository.UpdateData(stockInfo);
int beforeStatus = locationInfo.LocationStatus;
- locationInfo.LocationStatus = LocationStatusEnum.Pallet.ObjToInt();
- _locationInfoService.Repository.UpdateData(locationInfo);
+ locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt();
+ _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
BaseDal.DeleteData(task);
- _locationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum);
+ _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum);
+
+ return WebResponseContent.Instance.OK();
+ }
+
+ /// <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 = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress);
+
+ CheckCompleted(stockInfo, locationInfo);
+
+ _stockService.StockInfoService.Repository.AddData(stockInfo);
+
+ int beforeStatus = locationInfo.LocationStatus;
+ locationInfo.LocationStatus = LocationStatusEnum.Pallet.ObjToInt();
+ _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
+
+
+ BaseDal.DeleteData(task);
+
+ _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), "", task.TaskNum);
return WebResponseContent.Instance.OK();
}
@@ -103,7 +166,7 @@
/// <param name="stockInfo"></param>
/// <param name="locationInfo"></param>
/// <returns></returns>
- private (bool, string) CheckInboundCompleted(Dt_StockInfo stockInfo, Dt_LocationInfo locationInfo, bool isCheckStockDetail = true)
+ private (bool, string) CheckCompleted(Dt_StockInfo stockInfo, Dt_LocationInfo locationInfo, bool isCheckStockDetail = true)
{
if (stockInfo == null)
{
@@ -123,29 +186,48 @@
return (true, "鎴愬姛");
}
- /// <summary>
- /// 浠诲姟瀹屾垚
- /// </summary>
- /// <param name="taskNum">浠诲姟鍙�</param>
- /// <returns>杩斿洖澶勭悊缁撴灉</returns>
- public WebResponseContent TaskCompleted(int taskNum)
+ public WebResponseContent OutboundTaskCompleted(Dt_Task task)
{
- Dt_Task task = BaseDal.QueryFirst(x => x.TaskNum == taskNum);
- if (task == null)
- {
- return WebResponseContent.Instance.Error("鏈壘鍒颁换鍔′俊鎭�");
- }
- MethodInfo? methodInfo = GetType().GetMethod(((TaskTypeEnum)task.TaskType) + "TaskCompleted");
- if (methodInfo != null)
- {
- WebResponseContent? responseContent = (WebResponseContent?)methodInfo.Invoke(this, new object[] { task });
- if (responseContent != null)
- {
- return responseContent;
- }
- }
- return WebResponseContent.Instance.Error();
+ Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(task.PalletCode);
+
+ Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.SourceAddress);
+
+ CheckCompleted(stockInfo, locationInfo);
+
+ stockInfo.LocationCode = locationInfo.LocationCode;
+ stockInfo.StockStatus = StockStatusEmun.鍑哄簱瀹屾垚.ObjToInt();
+ _stockService.StockInfoService.Repository.UpdateData(stockInfo);
+
+ int beforeStatus = locationInfo.LocationStatus;
+ locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt();
+ _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
+
+ BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateType.鑷姩瀹屾垚 : OperateType.浜哄伐瀹屾垚);
+
+ _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", task.TaskNum);
+
+ return OnOutboundTaskCompleted?.Invoke(task) ?? WebResponseContent.Instance.OK();
}
+ public WebResponseContent PalletOutboundTaskCompleted(Dt_Task task)
+ {
+ Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(task.PalletCode);
+
+ Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.SourceAddress);
+
+ CheckCompleted(stockInfo, locationInfo);
+
+ _stockService.StockInfoService.Repository.DeleteData(stockInfo);
+
+ int beforeStatus = locationInfo.LocationStatus;
+ locationInfo.LocationStatus = LocationStatusEnum.Free.ObjToInt();
+ _basicService.LocationInfoService.Repository.UpdateData(locationInfo);
+
+ BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateType.鑷姩瀹屾垚 : OperateType.浜哄伐瀹屾垚);
+
+ _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, beforeStatus, StockChangeType.Inbound.ObjToInt(), stockInfo.Details.FirstOrDefault()?.OrderNo ?? "", 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/TaskServiceExtendFunc.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskServiceExtendFunc.cs"
new file mode 100644
index 0000000..b16c148
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskServiceExtendFunc.cs"
@@ -0,0 +1,15 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEA_Core;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_TaskInfoService
+{
+ public partial class TaskService
+ {
+ public Func<Dt_Task, WebResponseContent>? OnOutboundTaskCompleted => ShelfOutboundCarry;
+ }
+}
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 129d2e7..5272e9b 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"
@@ -8,9 +8,9 @@
<ItemGroup>
<ProjectReference Include="..\WIDESEA_IBasicService\WIDESEA_IBasicService.csproj" />
+ <ProjectReference Include="..\WIDESEA_IInboundService\WIDESEA_IInboundService.csproj" />
<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/Basic/AreaInfoController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/AreaInfoController.cs"
index bae6002..ff6f607 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/AreaInfoController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/AreaInfoController.cs"
@@ -1,9 +1,12 @@
锘縰sing Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
+using Swashbuckle.AspNetCore.Annotations;
using WIDESEA_Core.BaseController;
+using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.Helper;
using WIDESEA_DTO;
+using WIDESEA_DTO.Basic;
using WIDESEA_IBasicService;
using WIDESEA_Model.Models;
@@ -13,9 +16,18 @@
[ApiController]
public class AreaInfoController : ApiBaseController<IAreaInfoService, Dt_AreaInfo>
{
- public AreaInfoController(IAreaInfoService service) : base(service)
+ private readonly IBasicService _basicService;
+ public AreaInfoController(IAreaInfoService service,IBasicService basicService) : base(service)
{
+ _basicService = basicService;
}
+ [HttpPost, Route("GetAllLocationGroups"), AllowAnonymous]
+
+ public List<LocationGroupDTO> GetAllLocationGroups(string roadway)
+ {
+ List<LocationGroupDTO> locations = _basicService.LocationInfoService.Repository.GetAllLocationGroups(roadway);
+ return locations;
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs"
index 069a764..fd5789a 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Inbound/InboundOrderController.cs"
@@ -23,10 +23,6 @@
return Service.AddInboundOrder(orderAddDTO);
}
- [HttpPost, Route("MaterielGroup")]
- public WebResponseContent MaterielGroup([FromBody] MaterielGroupDTO materielGroupDTO)
- {
- return Service.MaterielGroup(materielGroupDTO);
- }
+
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/PDAController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/PDAController.cs"
new file mode 100644
index 0000000..ef4b831
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/PDAController.cs"
@@ -0,0 +1,46 @@
+锘縰sing Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using WIDESEA_Core;
+using WIDESEA_Core.BaseController;
+using WIDESEA_DTO.Inbound;
+using WIDESEA_IInboundService;
+using WIDESEA_ITaskInfoService;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_WMSServer.Controllers
+{
+ [Route("api/PDA")]
+ [ApiController]
+ public class PDAController : ApiBaseController<ITaskService, Dt_Task>
+ {
+ private readonly IInboundService _inboundService;
+ public PDAController(ITaskService service, IInboundService inboundService) : base(service)
+ {
+ _inboundService = inboundService;
+ }
+
+ [HttpPost, Route("CallMateriel")]
+ public WebResponseContent CallMateriel(string endPoint)
+ {
+ return Service.CallMateriel(endPoint);
+ }
+
+ [HttpPost, Route("MaterielCarry")]
+ public WebResponseContent MaterielCarry(string startPoint)
+ {
+ return Service.MaterielCarry(startPoint);
+ }
+
+ [HttpPost, Route("MaterielGroup")]
+ public WebResponseContent MaterielGroup([FromBody] MaterielGroupDTO materielGroupDTO)
+ {
+ return _inboundService.InbounOrderService.MaterielGroup(materielGroupDTO);
+ }
+
+ [HttpPost, Route("QueryOrderInfo")]
+ public WebResponseContent QueryOrderInfo(int pageNo, string orderNo)
+ {
+ return _inboundService.InbounOrderService.QueryOrderInfo(pageNo, orderNo);
+ }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs"
index 3846217..086702d 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs"
@@ -14,16 +14,14 @@
[ApiController]
public class StockInfoController : ApiBaseController<IStockInfoService, Dt_StockInfo>
{
- private readonly IStockInfoRepository _stockInfoRepository;
- public StockInfoController(IStockInfoService service, IStockInfoRepository stockInfoRepository) : base(service)
+ public StockInfoController(IStockInfoService service) : base(service)
{
- _stockInfoRepository = stockInfoRepository;
}
[HttpPost, Route("GetAllStockViews"), AllowAnonymous]
public List<StockViewDTO> GetAllStockViews()
{
- return _stockInfoRepository.GetAllStockViews();
+ return Service.Repository.GetAllStockViews();
}
[HttpPost, Route("GetStockSelectViews"), AllowAnonymous]
@@ -31,5 +29,10 @@
{
return Service.GetStockSelectViews(materielCode);
}
+ [HttpPost, Route("GetPalletStockInfo"), AllowAnonymous]
+ public Dt_StockInfo GetPalletStockInfo(string roadwayNo)
+ {
+ return Service.Repository.GetPalletStockInfo(roadwayNo);
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockViewController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockViewController.cs"
new file mode 100644
index 0000000..a0b5e6e
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockViewController.cs"
@@ -0,0 +1,20 @@
+锘縰sing Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using WIDESEA_Core.BaseController;
+using WIDESEA_DTO.Stock;
+using WIDESEA_IStockService;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_WMSServer.Controllers.Stock
+{
+ [Route("api/StockView")]
+ [ApiController]
+ public class StockViewController : ApiBaseController<IStockViewService, StockViewDTO>
+ {
+ public StockViewController(IStockViewService service) : base(service)
+ {
+ }
+
+
+ }
+}
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 ed443cd..47d63c8 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"
@@ -35,6 +35,7 @@
{
return Json(Service.Login(loginInfo));
}
+
[HttpPost, Route("getCurrentUserInfo")]
public WebResponseContent GetCurrentUser()
{
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/WIDESEA_WMSServer.csproj" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/WIDESEA_WMSServer.csproj"
index 41c3154..abd859e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/WIDESEA_WMSServer.csproj"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/WIDESEA_WMSServer.csproj"
@@ -43,6 +43,10 @@
</ItemGroup>
<ItemGroup>
+ <PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.7.3" />
+ </ItemGroup>
+
+ <ItemGroup>
<ProjectReference Include="..\WIDESEA_BasicService\WIDESEA_BasicService.csproj" />
<ProjectReference Include="..\WIDESEA_InboundService\WIDESEA_InboundService.csproj" />
<ProjectReference Include="..\WIDESEA_OutboundService\WIDESEA_OutboundService.csproj" />
--
Gitblit v1.9.3