From 2f8fc989f339a936b01092caebd4c46e6109da1b Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期二, 16 十二月 2025 11:29:37 +0800
Subject: [PATCH] 代码提交
---
WMS/WIDESEA_WMSClient/src/components/basic/ViewGrid/methods.js | 1
WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/WebResponseContent.cs | 2
WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/System/Sys_RoleDataPermission.cs | 27
WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoRowController.cs | 105 +++
WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json | 74 +-
吉安PDA/pages/stash/TakeStockOrder.vue | 143 +++-
WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs | 8
WMS/WIDESEA_WMSClient/src/views/Home.vue | 388 ++++++++++++
WMS/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue | 43 +
WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs | 8
WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockViewService.cs | 2
WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs | 2
WMS/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue | 45
WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/TakeStockOrderService.cs | 4
WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockViewService.cs | 169 +++++
WMS/WIDESEA_WMSClient/src/views/stock/stockInfo.vue | 10
WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Service/OutboundOrderDetailService.cs | 13
WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 348 ++++++++++-
WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs | 28
WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/ConveyorLineJob_BC.cs | 20
WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockViewController.cs | 30 +
WMS/WIDESEA_WMSServer/WIDESEA_SystemRepository/Sys_RoleDataPermissionRepository.cs | 18
WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/板材仓/RGVJob_BC.cs | 53 +
WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs | 22
WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue | 135 +--
WMS/WIDESEA_WMSServer/WIDESEA_ISystemRepository/ISys_RoleDataPermissionRepository.cs | 14
WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/LocationArea.cs | 60 ++
27 files changed, 1,461 insertions(+), 311 deletions(-)
diff --git "a/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs" "b/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs"
index f85e773..4b35cfb 100644
--- "a/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs"
+++ "b/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/ConveyorLineJob_BC.cs"
@@ -148,7 +148,7 @@
}
else
{
- Dt_Task task = _taskRepository.QueryFirst(x => x.SourceAddress == item.StationCode && x.DeviceCode == item.StationDeviceCode && x.TaskState == TaskStatusEnum.RGV_Finish.ObjToInt());
+ Dt_Task task = _taskRepository.QueryFirst(x => x.SourceAddress == item.StationCode && x.DeviceCode == item.StationDeviceCode && x.TaskState == TaskStatusEnum.RGV_Finish.ObjToInt() && x.TaskNum == conveyorLineInfoRead.TaskNo);
if (task != null)
{
_taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, deviceCode: task.Roadway, sourceAddress: item.StackerCraneStationCode);
@@ -212,12 +212,20 @@
if (!conveyorLineSignalRead3.STB && !conveyorLineSignalRead3.ACK && conveyorLineStatus3.Online && conveyorLineStatus3.Free && !conveyorLineStatus3.Goods && !conveyorLineStatus3.Alarm && !STB && !ACK)//鍒ゆ柇鍑哄簱鍙f槸鍚︾┖闂�
{
- Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.DeviceCode == device.DeviceCode && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt());
- if (task != null)
+ Dt_Task outTask = _taskRepository.QueryFirst(x => x.TaskType >= TaskTypeEnum.Outbound.ObjToInt() && x.TaskType <= TaskTypeEnum.Inbound.ObjToInt() && (x.TaskState == TaskStatusEnum.RGV_Executing.ObjToInt()|| x.TaskState == TaskStatusEnum.RGV_Execute.ObjToInt()));
+ if (outTask == null)
{
- _taskService.UpdateTask(task, TaskStatusEnum.RGV_Execute, sourceAddress: item.StationCode, targetAddress: routers.NextPosi, nextAddress: routers.NextPosi);
- Thread.Sleep(100);
- device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
+ Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.DeviceCode == device.DeviceCode && x.TaskState == TaskStatusEnum.Line_Execute.ObjToInt());
+ if (task != null)
+ {
+ _taskService.UpdateTask(task, TaskStatusEnum.RGV_Execute, sourceAddress: item.StationCode, targetAddress: routers.NextPosi, nextAddress: routers.NextPosi);
+ Thread.Sleep(100);
+ for (int i = 0; i < 3; i++)
+ {
+ device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
+ }
+ WriteDebug("鏉挎潗杈撻�佸嚭搴撳彛", $"鍑哄簱杈撻�佺嚎ACK淇″彿{item.StationCode}宸插啓鍏ワ紝浠诲姟鍙穥task.TaskNum}");
+ }
}
}
}
diff --git "a/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/RGVJob_BC.cs" "b/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/RGVJob_BC.cs"
index 7b640ff..5711323 100644
--- "a/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/RGVJob_BC.cs"
+++ "b/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/\346\235\277\346\235\220\344\273\223/RGVJob_BC.cs"
@@ -100,37 +100,52 @@
_taskService.TaskCompleted(task.TaskNum);
}
- device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
+ for (int i = 0; i < 3; i++)
+ {
+ device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode);
+ Thread.Sleep(100);
+ }
}
}
+ WriteDebug("RGV鐘舵�佽鍙栨棩蹇�", $"鑱旀満锛�:{device.GetValue<R_ConveyorLineDB, bool>(R_ConveyorLineDB.Online)}锛岀┖闂诧紵{device.GetValue<R_ConveyorLineDB, bool>(R_ConveyorLineDB.Free)}锛屾棤璐э紵{!device.GetValue<R_ConveyorLineDB, bool>(R_ConveyorLineDB.Goods)}锛屼换鍔″彿涓�0锛焮device.GetValue<R_ConveyorLineDB, int>(R_ConveyorLineDB.TaskNum) == 0}锛屾棤鏁呴殰{!device.GetValue<R_ConveyorLineDB, bool>(R_ConveyorLineDB.Alarm)}");
if (device.GetValue<R_ConveyorLineDB, bool>(R_ConveyorLineDB.Online) && device.GetValue<R_ConveyorLineDB, bool>(R_ConveyorLineDB.Free) && !device.GetValue<R_ConveyorLineDB, bool>(R_ConveyorLineDB.Goods) && device.GetValue<R_ConveyorLineDB, int>(R_ConveyorLineDB.TaskNum) == 0 && !device.GetValue<R_ConveyorLineDB, bool>(R_ConveyorLineDB.Alarm))
{
Dt_Task task = _taskRepository.QueryFirst(x => x.TaskType >= TaskTypeEnum.Inbound.ObjToInt() && x.TaskState == TaskStatusEnum.RGV_NEW.ObjToInt());
if (task != null)
{
- //鍐欏叆RGV浠诲姟
- device.SetValue(W_ConveyorLineDB.TaskNo, task.TaskNum, item.StationCode);
- device.SetValue(W_ConveyorLineDB.StartPos, task.SourceAddress, item.StationCode);
- device.SetValue(W_ConveyorLineDB.TaskType, 2, item.StationCode);
- device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode);
- device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode);
- _taskService.UpdateTask(task, TaskStatusEnum.RGV_Executing);
+ //鍐欏叆RGV鍏ュ簱浠诲姟
+ for (int i = 0; i < 3; i++)
+ {
+ device.SetValue(W_ConveyorLineDB.TaskNo, task.TaskNum, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.StartPos, task.SourceAddress, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.TaskType, 2, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.EndPos, task.NextAddress, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode);
+ _taskService.UpdateTask(task, TaskStatusEnum.RGV_Executing);
+ }
WriteDebug(device.DeviceName, $"鍏ュ簱RGV浠诲姟鍙穥task.TaskNum}宸插啓鍏�");
}
- Dt_Task task1 = _taskRepository.QueryFirst(x => x.TaskType >= TaskTypeEnum.Outbound.ObjToInt()&& x.TaskType <= TaskTypeEnum.Inbound.ObjToInt() && x.TaskState == TaskStatusEnum.RGV_Execute.ObjToInt());
- if (task1 != null)
+ else
{
- //鍐欏叆RGV浠诲姟
- device.SetValue(W_ConveyorLineDB.TaskNo, task1.TaskNum, item.StationCode);
- device.SetValue(W_ConveyorLineDB.StartPos, task1.SourceAddress, item.StationCode);
- device.SetValue(W_ConveyorLineDB.TaskType, 2, item.StationCode);
- device.SetValue(W_ConveyorLineDB.EndPos, task1.NextAddress, item.StationCode);
- device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode);
-
- _taskService.UpdateTask(task1, TaskStatusEnum.RGV_Executing);
- WriteDebug(device.DeviceName, $"鍑哄簱RGV浠诲姟鍙穥task1.TaskNum}宸插啓鍏�");
+ Dt_Task task1 = _taskRepository.QueryFirst(x => x.TaskType >= TaskTypeEnum.Outbound.ObjToInt() && x.TaskType <= TaskTypeEnum.Inbound.ObjToInt() && x.TaskState == TaskStatusEnum.RGV_Execute.ObjToInt());
+ //鍐欏叆RGV鍑哄簱浠诲姟
+ if (task1 != null)
+ {
+ for (int i = 0; i < 3; i++)
+ {
+ device.SetValue(W_ConveyorLineDB.TaskNo, task1.TaskNum, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.StartPos, task1.SourceAddress, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.TaskType, 2, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.EndPos, task1.NextAddress, item.StationCode);
+ device.SetValue(W_ConveyorLineDB.STB, true, item.StationCode);
+ }
+ _taskService.UpdateTask(task1, TaskStatusEnum.RGV_Executing);
+ WriteDebug(device.DeviceName, $"鍑哄簱RGV浠诲姟鍙穥task1.TaskNum}宸插啓鍏�");
+ }
}
+
+
}
if (device.GetValue<R_ConveyorLineDB, bool>(R_ConveyorLineDB.ACK))
diff --git a/WMS/WIDESEA_WMSClient/src/components/basic/ViewGrid/methods.js b/WMS/WIDESEA_WMSClient/src/components/basic/ViewGrid/methods.js
index fa02eca..e4cbfe4 100644
--- a/WMS/WIDESEA_WMSClient/src/components/basic/ViewGrid/methods.js
+++ b/WMS/WIDESEA_WMSClient/src/components/basic/ViewGrid/methods.js
@@ -867,6 +867,7 @@
this.modelOpenProcess(row);
},
setContinueAdd(isAdd) {
+ console.log(this.boxButtons)
if (!this.continueAdd) return;
var _button = this.boxButtons.find((x) => {
return x.value == 'save';
diff --git a/WMS/WIDESEA_WMSClient/src/views/Home.vue b/WMS/WIDESEA_WMSClient/src/views/Home.vue
index 820437a..9815ad5 100644
--- a/WMS/WIDESEA_WMSClient/src/views/Home.vue
+++ b/WMS/WIDESEA_WMSClient/src/views/Home.vue
@@ -1,24 +1,392 @@
<template>
- <div class="title"></div>
+ <div class="container">
+ <div class="header">
+ <h2 class="title">璐т綅鎺掑浘</h2>
+ </div>
+
+ <div class="content-wrapper">
+ <!-- 鎺у埗闈㈡澘鍖哄煙 -->
+ <div class="control-panel">
+ <div class="form-group">
+ <label>鍖哄煙锛�</label>
+ <el-select
+ size="mini"
+ filterable
+ v-model="Area.shelf_code"
+ placeholder="璇烽�夋嫨"
+ class="full-width"
+ >
+ <el-option
+ v-for="item in slectData"
+ :value="item.shelf_code"
+ :label="item.house_name"
+ :key="item.house_name"
+ ></el-option>
+ </el-select>
+ </div>
+
+ <div class="form-group">
+ <label>鎺掞細</label>
+ <el-select
+ size="mini"
+ clearable
+ filterable
+ @change="SCChange"
+ v-model="Area.tunnel"
+ placeholder="璇烽�夋嫨"
+ class="full-width"
+ >
+ <el-option
+ v-for="item in scList"
+ :value="item"
+ :label="item"
+ :key="item"
+ ></el-option>
+ </el-select>
+ </div>
+
+ <el-button type="success" class="refresh-btn" @click="GetViewData">
+ 鍒锋柊
+ </el-button>
+
+ <div class="legend-section">
+ <h4>璇存槑</h4>
+ <div class="legend-grid">
+ <div
+ class="legend-item"
+ v-for="item in infoMsg"
+ :key="item.bgcolor"
+ >
+ <span
+ class="color-box"
+ :style="{ 'background-color': item.bgcolor }"
+ ></span>
+ <span class="legend-label">{{ item.msg }}</span>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <!-- 璐т綅灞曠ず鍖哄煙 -->
+ <div class="location-view">
+ <div
+ class="layer-container"
+ v-for="layer in locationData"
+ :key="layer.index"
+ >
+ <h3 class="layer-title">绗瑊{ layer.index }}灞�</h3>
+ <div class="row" v-for="row in layer.rows" :key="row.index">
+ <div
+ class="location-cell"
+ :style="{ 'background-color': GetBgColor(col) }"
+ v-for="col in row.cols"
+ :key="col.index"
+ @mouseenter="showTooltip(col, $event)"
+ @mouseleave="hideTooltip"
+ >
+ {{ row.index }}-{{ col.index }}-{{ layer.index }}
+ </div>
+ </div>
+ </div>
+ </div>
+ <!-- 鎮诞鎻愮ず妗� -->
+ <div
+ v-if="showTooltipFlag"
+ class="location-tooltip"
+ :style="{
+ left: tooltipPosition.x + 'px',
+ top: tooltipPosition.y + 'px',
+ }"
+ >
+ <div v-if="currentLocation">
+ <p><strong>璐т綅鍙�:</strong>{{ currentLocation.locationCode }}</p>
+ <p>
+ <strong>璐т綅鎺掑垪灞�:</strong> {{ currentLocation.row }}鎺抺{
+ currentLocation.index
+ }}鍒梴{ currentLocation.layer }}灞�
+ </p>
+ <p><strong>鐘舵��:</strong> {{ getStatusText(currentLocation) }}</p>
+ <p>
+ <strong>绂佺敤:</strong>
+ {{ currentLocation.location_lock == 3 ? "鏄�" : "鍚�" }}
+ </p>
+ <!-- 鎭㈠鐗╂枡淇℃伅鏄剧ず锛岄�傞厤鏈夎揣鐘舵�� -->
+ <p v-if="currentLocation.location_state === 2">
+ <strong>鐗╂枡缂栫爜:</strong>
+ {{ currentLocation.material_code || "鏃�" }}
+ </p>
+ <p v-if="currentLocation.location_state === 2">
+ <strong>鏁伴噺:</strong> {{ currentLocation.quantity || "鏃�" }}
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
</template>
<script>
-import { ref, reactive } from 'vue'
+import { ElButton } from "element-plus";
export default {
- setup() {
+ data() {
return {
+ slectData: [],
+ scList: [],
+ Area: { house_name: "", tunnel: "", shelf_code: "" },
+ mian_height: "",
+ infoMsg: [
+ { bgcolor: "lightgreen", msg: "绌鸿揣浣�", state: 0 },
+ { bgcolor: "orange", msg: "鏈夎揣", state: 2 }, // 鍏抽敭鏀癸細state浠�100鈫�2
+ { bgcolor: "#2BB3D5", msg: "閿佸畾", state: "InAssigned" },
+ { bgcolor: "#ccc", msg: "绂佺敤", state: 3 },
+ { bgcolor: "#b7ba6b", msg: "鍏跺畠", state: "else" },
+ ],
+ locationData: [],
+ showTooltipFlag: false,
+ currentLocation: null,
+ tooltipPosition: { x: 0, y: 0 },
+ };
+ },
+ computed: {
+ GetBgColor() {
+ return (col) => {
+ var bgColor = "#b7ba6b";
+ //浼樺厛鏄剧ず绂佺敤鐘舵��
+ if (col.location_lock == 3) {
+ this.infoMsg.forEach((el) => {
+ if (el.state == col.location_lock) {
+ bgColor = el.bgcolor;
+ }
+ });
+ } else {
+ this.infoMsg.forEach((el) => {
+ // 鍏抽敭鏀癸細鍖归厤鏈夎揣鐘舵�侊紙2锛夛紝鑰岄潪100
+ if (col.location_state === 2) {
+ bgColor = this.infoMsg.find(item => item.state === 2).bgcolor;
+ }
+ // 閿佸畾鐘舵�侊紙1/10/20/99锛夐�昏緫淇濇寔涓嶅彉
+ else if (col.location_state > 0 && col.location_state < 100) {
+ if (el.state == "InAssigned") {
+ bgColor = el.bgcolor;
+ }
+ }
+ // 绌鸿揣浣嶏紙0锛夐�昏緫淇濇寔涓嶅彉
+ else if (el.state == col.location_state) {
+ bgColor = el.bgcolor;
+ }
+ });
+ }
+ return bgColor;
+ };
+ },
+ },
+ watch: {
+ //鍒囨崲搴撳尯
+ "Area.shelf_code"(newValue, oldValue) {
+ this.scList = [];
+ this.slectData.forEach((e) => {
+ if (e.shelf_code == newValue) {
+ this.Area.tunnel = e.tunnel[0];
+ this.scList = e.tunnel;
+ }
+ });
+ this.GetViewData();
+ },
+ },
+ methods: {
+ GetViewData() {
+ var _this = this;
+ this.http
+ .post("/api/LocationInfoRow/GetLocationStatu", _this.Area, "鏌ヨ涓�")
+ .then((x) => {
+ _this.locationData = x;
+ console.log("鍚庣杩斿洖:", x);
+ });
+ },
+ // 鍒囨崲鎺�
+ SCChange() {
+ this.GetViewData();
+ },
+ showTooltip(location, event) {
+ this.currentLocation = location;
+ this.showTooltipFlag = true;
- }
- }
-}
+ // 璁剧疆鎻愮ず妗嗕綅缃紝绋嶅井鍋忕Щ閬垮厤閬尅榧犳爣
+ this.tooltipPosition = {
+ x: event.clientX + 10,
+ y: event.clientY + 10,
+ };
+ },
+
+ hideTooltip() {
+ this.showTooltipFlag = false;
+ this.currentLocation = null;
+ },
+
+ getStatusText(location) {
+ // 鍏抽敭鏀癸細鏄庣‘鍖归厤鏈夎揣鐘舵�侊紙2锛�
+ if (location.location_state === 2) return "鏈夎揣";
+ if (location.location_state === 0) return "绌鸿揣浣�";
+ if (location.location_state === 1) return "閿佸畾";
+ if (location.location_state === 10) return "鏈夎揣閿佸畾";
+ if (location.location_state === 20) return "绌洪棽閿佸畾";
+ if (location.location_state === 99) return "澶ф墭鐩橀攣瀹�";
+ return "鍏朵粬";
+ },
+ },
+ mounted() {
+ var mainHeight = document.getElementById("vol-main");
+ this.mian_height = mainHeight.offsetHeight - 40 + "px";
+ var _this = this;
+ //鍔犺浇涓嬫媺閫夐」
+ this.http.get("/api/LocationInfoRow/GetArea", {}, "鏌ヨ涓�").then((x) => {
+ _this.slectData = x;
+ //鍔犺浇绗竴涓尯鍩燂紝绗竴鎺�
+ _this.Area.shelf_code = _this.slectData[0].shelf_code;
+ _this.scList = _this.slectData[0].tunnel;
+ });
+ },
+ components: { ElButton },
+};
</script>
<style scoped>
-.title {
- line-height: 70vh;
+/* 鏍峰紡閮ㄥ垎鏃犱慨鏀癸紝淇濇寔鍘熼�昏緫 */
+.container {
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+ padding: 10px;
+}
+
+.header {
text-align: center;
- font-size: 28px;
- color: orange;
+ margin-bottom: 20px;
+}
+
+.title {
+ font-size: 20px;
+ font-weight: bold;
+ margin: 0;
+}
+
+.content-wrapper {
+ display: flex;
+ flex: 1;
+ min-height: 0;
+}
+
+.control-panel {
+ width: 220px;
+ padding: 15px;
+ background-color: #f5f7fa;
+ border-radius: 4px;
+ margin-right: 15px;
+ display: flex;
+ flex-direction: column;
+}
+
+.form-group {
+ margin-bottom: 15px;
+}
+
+.full-width {
+ width: 100%;
+}
+
+.refresh-btn {
+ margin-top: 10px;
+ width: 100%;
+}
+
+.legend-section {
+ margin-top: 30px;
+}
+
+.legend-section h4 {
+ margin-bottom: 10px;
+}
+
+.legend-grid {
+ display: grid;
+ grid-template-columns: 1fr;
+ gap: 8px;
+}
+
+.legend-item {
+ display: flex;
+ align-items: center;
+}
+
+.color-box {
+ display: inline-block;
+ width: 20px;
+ height: 20px;
+ margin-right: 8px;
+ border-radius: 3px;
+}
+
+.legend-label {
+ font-size: 13px;
+}
+
+.location-view {
+ flex: 1;
+ overflow: auto;
+ padding: 10px;
+ background-color: white;
+ border-radius: 4px;
+}
+
+.layer-container {
+ margin-bottom: 25px;
+}
+
+.layer-title {
+ margin: 0 0 10px 0;
+ font-size: 16px;
+ color: #333;
+}
+
+.row {
+ display: flex;
+ flex-wrap: wrap;
+ margin-bottom: 8px;
+ cursor: pointer;
+}
+
+.location-cell {
+ width: 66px;
+ height: 38px;
+ margin: 3px;
+ text-align: center;
+ font-size: 14px;
+ border-radius: 3px;
+ line-height: 38px;
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
+}
+
+.location-tooltip {
+ position: fixed;
+ z-index: 9999;
+ background-color: white;
+ border: 1px solid #ddd;
+ border-radius: 4px;
+ padding: 10px;
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
+ pointer-events: none;
+ max-width: 250px;
+}
+
+.location-tooltip p {
+ margin: 5px 0;
+ font-size: 13px;
+ line-height: 1.4;
+}
+
+.location-tooltip strong {
+ display: inline-block;
+ width: 70px;
+ color: #666;
}
</style>
\ No newline at end of file
diff --git a/WMS/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue b/WMS/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue
index ff69a6f..04bddb0 100644
--- a/WMS/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue
+++ b/WMS/WIDESEA_WMSClient/src/views/inbound/inboundOrder.vue
@@ -28,7 +28,7 @@
});
const editFormFields = ref({
orderType: "",
- orderNo:"",
+ orderNo: "",
upperOrderNo: "",
remark: "",
});
@@ -46,16 +46,16 @@
field: "warehouseId",
title: "浠撳簱ID",
type: "select",
- dataKey:"warehouses",
- data:[]
+ dataKey: "warehouses",
+ data: [],
},
{
field: "orderNo",
title: "鍗曟嵁缂栧彿",
type: "string",
- readonly:true
+ readonly: true,
},
- {
+ {
title: "鍗曟嵁鐘舵��",
field: "orderStatus",
type: "select",
@@ -66,9 +66,8 @@
title: "涓婃父鍗曟嵁缂栧彿",
field: "upperOrderNo",
type: "string",
- readonly:true
+ readonly: true,
},
-
],
[
{
@@ -82,6 +81,20 @@
title: "澶囨敞",
field: "remark",
type: "textarea",
+ },
+ {
+ field: "inoutType",
+ title: "鍑哄叆搴撶被鍨�",
+ type: "select",
+ dataKey:"inoutTypeEnum",
+ data:[],
+ readonly:true
+ },
+ {
+ field: "system",
+ title: "鍗曟嵁鏉ユ簮",
+ type: "string",
+ readonly:true
},
],
]);
@@ -158,9 +171,9 @@
type: "string",
width: 120,
align: "left",
- bind:{key:"warehouses",data:[]}
+ bind: { key: "warehouses", data: [] },
},
-
+
{
field: "orderNo",
title: "鍗曟嵁缂栧彿",
@@ -204,9 +217,16 @@
field: "createType",
title: "鍒涘缓鏂瑰紡",
type: "string",
- width: 90,
+ width: 120,
align: "left",
bind: { key: "createType", data: [] },
+ },
+ {
+ field: "system",
+ title: "鍗曟嵁鏉ユ簮",
+ type: "string",
+ width: 90,
+ align: "left",
},
{
field: "creater",
@@ -297,8 +317,7 @@
type: "string",
width: 130,
align: "left",
- readonly:true,
-
+ readonly: true,
},
{
field: "orderQuantity",
diff --git a/WMS/WIDESEA_WMSClient/src/views/stock/stockInfo.vue b/WMS/WIDESEA_WMSClient/src/views/stock/stockInfo.vue
index 9fd1442..fbad817 100644
--- a/WMS/WIDESEA_WMSClient/src/views/stock/stockInfo.vue
+++ b/WMS/WIDESEA_WMSClient/src/views/stock/stockInfo.vue
@@ -98,13 +98,14 @@
dataKey: "stockStatusEmun",
data: [],
},
- { title: "搴撳瓨缂栧彿",
+ { title: "鍏宠仈搴撳瓨缂栧彿",
field: "id",
type: "like",
},
+ { title: "鍒涘缓鏃堕棿", field: "createDate", type: "datetime" },
],
[
- { title: "鍒涘缓鏃堕棿", field: "createDate", type: "datetime" },
+
]
]);
const columns = ref([
@@ -131,7 +132,7 @@
field: "palletCode",
title: "鎵樼洏缂栧彿",
type: "string",
- width: 90,
+ width: 150,
align: "left",
//sort:true,
},
@@ -148,7 +149,7 @@
field: "locationCode",
title: "璐т綅缂栧彿",
type: "string",
- width: 150,
+ width: 200,
align: "left",
//sort:true,
},
@@ -193,6 +194,7 @@
width: 150,
align: "left",
// sort:true,
+ hidden:true,
},{
field: "remark",
title: "澶囨敞",
diff --git a/WMS/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue b/WMS/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue
index 8df3cba..bbb00a2 100644
--- a/WMS/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue
+++ b/WMS/WIDESEA_WMSClient/src/views/stock/stockInfoDetail.vue
@@ -66,10 +66,12 @@
{ title: "鐗╂枡缂栧彿", field: "materielCode",type :"like"},
{ title: "鐗╂枡鍚嶇О", field: "materielName",type :"like"},
{ title: "鍗曟嵁缂栧彿", field: "orderNo",type :"like"},
+ { title: "鍏宠仈搴撳瓨缂栧彿", field: "stockId",type :"int"},
],
[
{ title: "鎵规鍙�", field: "batchNo",type :"like"},
{title: "搴撳瓨鏄庣粏鐘舵��",field: "status",type: "select",dataKey:"stockStatusEmun", data: []},
+ { title: "渚涘簲鍟嗘壒娆�", field: "supplierBatch",type :"like"},
{ title: "鍒涘缓鏃ユ湡",field: "createDate",type: "datetime"},
],
]);
@@ -109,14 +111,6 @@
// sort:true,
},
{
- field: "orderNo",
- title: "鐗╂枡璇︽儏",
- type: "decimal",
- width: 90,
- align: "left",
- // sort:true,
- },
- {
field: "batchNo",
title: "鐗╂枡鎵规",
type: "string",
@@ -124,29 +118,27 @@
align: "left",
// sort:true,
},
- // {
- // field: "serialNumber",
- // title: "鍖呭彿",
- // type: "string",
- // width: 50,
- // align: "left",
- // sort:true,
- // },
- // {
- // field: "batchNoName",
- // title: "鐗╂枡鎵规璇︽儏",
- // type: "int",
- // width: 120,
- // align: "left",
- // // sort:true,
- // },
+ {
+ field: "orderNo",
+ title: "鍗曟嵁缂栧彿",
+ type: "string",
+ width: 180,
+ align: "left",
+
+ },
+ {
+ field: "supplierBatch",
+ title: "渚涘簲鍟嗘壒娆�",
+ type: "string",
+ width: 150,
+ align: "left",
+ },
{
field: "stockQuantity",
- title: "閲嶉噺",
+ title: "鐗╂枡鏁伴噺",
type: "string",
width: 80,
align: "left",
- // sort:true,
},
{
field: "status",
@@ -154,7 +146,6 @@
type: "string",
width: 120,
align: "left",
- // sort:true,
bind: { key: "stockStatusEmun", data: [] },
},
{
diff --git a/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue b/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue
index b35fb25..9cec1aa 100644
--- a/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue
+++ b/WMS/WIDESEA_WMSClient/src/views/stock/stockView.vue
@@ -31,27 +31,43 @@
locationCode: "",
locationName: "",
});
- const editFormOptions = ref([
-
- ]);
+ const editFormOptions = ref([]);
const searchFormFields = ref({
palletCode: "",
// locationCode: "",
- materielCode:"",
- batchNo:""
+ materielCode: "",
+ batchNo: "",
});
const searchFormOptions = ref([
[
- { title: "鎵樼洏缂栧彿", field: "palletCode",type: "like" },
- { title: "璐т綅缂栧彿", field: "locationCode",type: "like" },
- { title: "璐т綅鐘舵��", field: "locationStatus" ,type: "selectList",dataKey: "locationStatusEnum",data: [],},
- { title: "搴撳瓨鐘舵��", field: "stockStatus",type: "select",dataKey: "stockStatusEmun",data: [],},
+ { title: "鎵樼洏缂栧彿", field: "palletCode", type: "like" },
+ { title: "璐т綅缂栧彿", field: "locationCode", type: "like" },
+ {
+ title: "璐т綅鐘舵��",
+ field: "locationStatus",
+ type: "selectList",
+ dataKey: "locationStatusEnum",
+ data: [],
+ },
+ {
+ title: "搴撳瓨鐘舵��",
+ field: "stockStatus",
+ type: "select",
+ dataKey: "stockStatusEmun",
+ data: [],
+ },
],
[
- { title: "鐗╂枡缂栧彿", field: "materielCode",type: "like"},
- { title: "鎵规鍙�", field: "batchNo",type: "like"},
- { title: "鎵�灞炰粨搴�", field: "warehouseId",type: "select",dataKey: "warehouses",data: [],},
- { title: "搴撳瓨鍒涘缓鏃堕棿",field: "createDate",type: "datetime"},
+ { title: "鐗╂枡缂栧彿", field: "materielCode", type: "like" },
+ { title: "鎵规鍙�", field: "batchNo", type: "like" },
+ {
+ title: "鎵�灞炰粨搴�",
+ field: "warehouseId",
+ type: "select",
+ dataKey: "warehouses",
+ data: [],
+ },
+ { title: "搴撳瓨鍒涘缓鏃堕棿", field: "createDate", type: "datetime" },
],
]);
const columns = ref([
@@ -101,7 +117,7 @@
type: "decimal",
width: 100,
align: "left",
- hidden:true
+ hidden: true,
},
{
field: "materielCode",
@@ -115,7 +131,7 @@
title: "鎵�鍚墿鏂欐壒娆�",
type: "string",
width: 200,
- align: "left"
+ align: "left",
},
{
field: "sumStock",
@@ -171,7 +187,7 @@
type: "string",
width: 100,
align: "left",
- bind:{key: "locationTypeEnum", data: []}
+ bind: { key: "locationTypeEnum", data: [] },
},
{
field: "locationStatus",
@@ -223,7 +239,7 @@
type: "string",
width: 100,
align: "left",
- hidden:true
+ hidden: true,
},
]);
const detail = ref({
@@ -241,89 +257,48 @@
align: "left",
},
{
- field: "stockId",
- title: "搴撳瓨淇℃伅涓婚敭",
- type: "string",
- width: 90,
- align: "left",
- hidden: true
- },
- {
field: "materielCode",
title: "鐗╂枡缂栧彿",
type: "string",
- width: 110,
+ width: 150,
align: "left",
+ // sort:true,
},
{
field: "materielName",
title: "鐗╂枡鍚嶇О",
type: "string",
- width: 130,
+ width: 150,
align: "left",
+ // sort:true,
+ },
+ {
+ field: "batchNo",
+ title: "鐗╂枡鎵规",
+ type: "string",
+ width: 120,
+ align: "left",
+ // sort:true,
},
{
field: "orderNo",
title: "鍗曟嵁缂栧彿",
- type: "decimal",
- width: 130,
- align: "left",
- },
- {
- field: "batchNo",
- title: "鎵规鍙�",
type: "string",
width: 180,
align: "left",
},
{
- field: "materielSpec",
- title: "瑙勬牸鍨嬪彿",
+ field: "supplierBatch",
+ title: "渚涘簲鍟嗘壒娆�",
type: "string",
- width: 180,
+ width: 150,
align: "left",
- },
- {
- field: "serialNumber",
- title: "搴忓垪鍙�",
- type: "int",
- width: 120,
- align: "left",
- hidden: true,
},
{
field: "stockQuantity",
- title: "搴撳瓨鏁伴噺",
+ title: "鐗╂枡鏁伴噺",
type: "string",
width: 80,
- align: "left",
- },
- {
- field: "outboundQuantity",
- title: "鍑哄簱鏁伴噺",
- type: "string",
- width: 80,
- align: "left",
- },
- {
- field: "unit",
- title: "鍗曚綅",
- type: "string",
- width: 50,
- align: "left",
- },
- {
- field: "productionDate",
- title: "鐢熶骇鏃ユ湡",
- type: "string",
- width: 120,
- align: "left",
- },
- {
- field: "effectiveDate",
- title: "鏈夋晥鏃ユ湡",
- type: "string",
- width: 120,
align: "left",
},
{
@@ -332,7 +307,7 @@
type: "string",
width: 120,
align: "left",
- bind: { key: "stockStatusEmun", data: [] }
+ bind: { key: "stockStatusEmun", data: [] },
},
{
field: "creater",
@@ -340,7 +315,7 @@
type: "string",
width: 90,
align: "left",
- hidden: true
+ // sort:true,
},
{
field: "createDate",
@@ -348,7 +323,7 @@
type: "datetime",
width: 160,
align: "left",
- hidden: true
+ sort: true,
},
{
field: "modifier",
@@ -356,7 +331,7 @@
type: "string",
width: 100,
align: "left",
- hidden: true
+ hidden: true,
},
{
field: "modifyDate",
@@ -364,7 +339,7 @@
type: "datetime",
width: 160,
align: "left",
- hidden: true
+ hidden: true,
},
{
field: "remark",
@@ -372,7 +347,7 @@
type: "string",
width: 100,
align: "left",
- hidden: true
+ hidden: true,
},
],
sortName: "id",
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/WebResponseContent.cs b/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/WebResponseContent.cs
index 0d7acaa..e3a678b 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/WebResponseContent.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseModels/WebResponseContent.cs
@@ -19,6 +19,8 @@
public int Code { get; set; }
+ public string msg { get; set; }
+
public string Message { get; set; }
public object Data { get; set; }
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/LocationArea.cs b/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/LocationArea.cs
new file mode 100644
index 0000000..ee5e1a0
--- /dev/null
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/LocationArea.cs
@@ -0,0 +1,60 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WIDESEA_DTO.Basic
+{
+ public class LocationArea
+ {
+ /// <summary>
+ /// 搴撳尯鍚嶇О
+ /// </summary>
+ public string house_name { get; set; }
+
+ /// <summary>
+ /// 搴撳尯缂栧彿
+ /// </summary>
+ public int shelf_code { get; set; }
+
+ /// <summary>
+ ///
+ /// </summary>
+ public int tunnel { get; set; }
+ }
+
+
+ public class LocationLayer
+ {
+ public int index { get; set; }
+ public List<LocationRow> rows { get; set; }
+ }
+ public class LocationRow
+ {
+ public int index { get; set; }
+ public List<LocationCol> cols { get; set; }
+ }
+
+ public class LocationCol
+ {
+ public string locationCode { get; set; }
+ public int row { get; set; }
+ public int layer { get; set; }
+
+ public int index { get; set; }
+ /// <summary>
+ /// 妫�娴嬫煖鐘舵��
+ /// </summary>
+ public string remark { get; set; }
+ /// <summary>
+ /// 璐т綅鐘舵��
+ /// </summary>
+ public int location_state { get; set; }
+ /// <summary>
+ /// 閿佸畾鐘舵��
+ /// </summary>
+ public int location_lock { get; set; }
+ }
+
+}
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs b/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs
index b61cf36..0a86612 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Stock/StockViewDTO.cs
@@ -118,8 +118,14 @@
/// <summary>
/// 鐗╂枡鎵瑰彿
/// </summary>
- [ExporterHeader(DisplayName = "鐗╂枡鎵瑰彿")]
+ [ExporterHeader(DisplayName = "鐗╂枡鍐呴儴鎵瑰彿")]
public string BatchNo { get; set; }
+
+ /// <summary>
+ ///渚涘簲鍟嗘壒鍙�
+ /// </summary>
+ [ExporterHeader(DisplayName = "渚涘簲鍟嗘壒娆�")]
+ public string SupplierBatch { get; set; }
/// <summary>
/// 搴撳瓨鏁伴噺
/// </summary>
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockViewService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockViewService.cs
index 4dbc93f..1771317 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockViewService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_IStockService/IStockViewService.cs
@@ -14,5 +14,7 @@
PageGridData<StockViewDTO> GetPageData(PageDataOptions options);
object GetDetailPage(PageDataOptions pageData);
+
+ WebResponseContent Export(PageDataOptions options);
}
}
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_ISystemRepository/ISys_RoleDataPermissionRepository.cs b/WMS/WIDESEA_WMSServer/WIDESEA_ISystemRepository/ISys_RoleDataPermissionRepository.cs
new file mode 100644
index 0000000..5dbada6
--- /dev/null
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_ISystemRepository/ISys_RoleDataPermissionRepository.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_ISystemRepository
+{
+ public interface ISys_RoleDataPermissionRepository : IRepository<Sys_RoleDataPermission>
+ {
+ }
+}
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs
index 442ccc1..179006e 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_ITaskInfoService/ITaskService.cs
@@ -58,7 +58,7 @@
WebResponseContent IsRelocations(int TaskNum, string SourceAddress);
WebResponseContent Cancelinventory(int taskNum);
WebResponseContent InboundTaskCompleted(int taskNum);
- WebResponseContent OutboundTaskCompleted(int taskNum);
+ WebResponseContent OutboundTaskCompleted(int taskNum);
WebResponseContent AddOutboundOrders(Houseounbound orderAddDTO);
WebResponseContent InventoryOut(HouseCancelOut houseInventoryOut);
WebResponseContent InventoryIn(string name, int qty);
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs
index 5166513..52c6eee 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs
@@ -203,11 +203,11 @@
}
else
{
- if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt())
- {
- return WebResponseContent.Instance.Error($"鎵樼洏鍙烽噸澶�");
- }
- beforeQuantity = stockInfo.Details.Sum(x => x.StockQuantity);
+ //if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt())
+ //{
+ return WebResponseContent.Instance.Error($"鎵樼洏鍙烽噸澶�,璇ユ墭鐩樺凡缁勮繃鐗╂枡");
+ //}
+ //beforeQuantity = stockInfo.Details.Sum(x => x.StockQuantity);
}
if (warehouse.WarehouseCode == WarehouseEnum.SC01_BC.ToString())
@@ -438,9 +438,10 @@
if (inboundOrderOld != null)
{
- if (inboundOrderOld.OrderStatus != OrderDetailStatusEnum.New.ObjToInt())
+ if (inboundOrderOld.OrderStatus == InOrderStatusEnum.鍏ュ簱瀹屾垚.ObjToInt())
{
- return content.Error($"{model.AsnNo}鍗曟嵁宸插紑濮�!");
+ inboundOrderOld.OrderStatus = InOrderStatusEnum.鍏ュ簱涓�.ObjToInt();
+ _inboundRepository.InboundOrderRepository.UpdateData(inboundOrderOld);
}
Dt_InboundOrderDetail orderDetail1 = BaseDal.Db.Queryable<Dt_InboundOrderDetail>().Where(x => x.OrderId == inboundOrderOld.Id).First();
Dt_InboundOrderDetail? inboundOrderDetailOld = inboundOrderOld.Details?.FirstOrDefault(x => x.LinId == item.LinId && x.MaterielCode == item.MaterielCode);
@@ -809,12 +810,23 @@
.Db.Queryable<Dt_InboundOrderDetail>()
.Where(d => d.OrderId == inboundOrder.Id)
.Count();
-
+ //妫�鏌ユ槑缁嗗畬鎴愮殑涓暟
+ int overCount = _inboundRepository.InboundOrderDetailRepository
+ .Db.Queryable<Dt_InboundOrderDetail>()
+ .Where(d => d.OrderId == inboundOrder.Id && d.OrderDetailStatus == OrderDetailStatusEnum.Over.ObjToInt())
+ .Count();
// 濡傛灉娌℃湁鍓╀綑鏄庣粏锛屽啀鍒犻櫎涓昏鍗�
if (remainingDetailsCount == 0)
{
_inboundRepository.InboundOrderRepository.DeleteAndMoveIntoHty(inboundOrder, OperateType.浜哄伐鍙栨秷);
}
+ //濡傛灉鍙栨秷浠ュ悗鏄庣粏宸茬粡鍏ㄩ儴瀹屾垚
+ if (remainingDetailsCount == overCount)
+ {
+ inboundOrder.OrderStatus = InOrderStatusEnum.鍏ュ簱瀹屾垚.ObjToInt();
+ _inboundRepository.InboundOrderRepository.UpdateData(inboundOrder);
+ }
+
_unitOfWorkManage.CommitTran();
return WebResponseContent.Instance.OK();
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/TakeStockOrderService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/TakeStockOrderService.cs
index 43e088b..ec32cc9 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/TakeStockOrderService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/TakeStockOrderService.cs
@@ -82,11 +82,11 @@
List<Dt_TakeStockOrder> takeStockOrders = new List<Dt_TakeStockOrder>();
if (string.IsNullOrEmpty(orderNo))
{
- takeStockOrders = Db.Queryable<Dt_TakeStockOrder>().Where(x => x.TakeStockStatus < TakeStockStatusEnum.鐩樼偣瀹屾垚.ObjToInt() && x.WarehouseId == warehouseId).ToPageList(pageNo, 5);
+ takeStockOrders = Db.Queryable<Dt_TakeStockOrder>().Where(x => x.TakeStockStatus < TakeStockStatusEnum.鐩樼偣瀹屾垚.ObjToInt() && x.WarehouseId == warehouseId).Includes(x=>x.Details).ToPageList(pageNo, 5);
}
else
{
- takeStockOrders = Db.Queryable<Dt_TakeStockOrder>().Where(x => (x.OrderNo.Contains(orderNo) && x.TakeStockStatus < TakeStockStatusEnum.鐩樼偣瀹屾垚.ObjToInt() && x.WarehouseId == warehouseId)).ToPageList(pageNo, 5);
+ takeStockOrders = Db.Queryable<Dt_TakeStockOrder>().Where(x => (x.OrderNo.Contains(orderNo) && x.TakeStockStatus < TakeStockStatusEnum.鐩樼偣瀹屾垚.ObjToInt() && x.WarehouseId == warehouseId)).Includes(x=>x.Details).ToPageList(pageNo, 5);
}
content.OK(data: takeStockOrders);
}
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/System/Sys_RoleDataPermission.cs b/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/System/Sys_RoleDataPermission.cs
new file mode 100644
index 0000000..02dc7f0
--- /dev/null
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/System/Sys_RoleDataPermission.cs
@@ -0,0 +1,27 @@
+锘縰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(Sys_RoleDataPermission))]
+ public class Sys_RoleDataPermission : BaseEntity
+ {
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+ public int Id { get; set; }
+
+ public int RoleId { get; set; }
+
+ [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "瑙掕壊鍚嶇О")]
+ public string RoleName { get; set; }
+
+ public int WarehouseId { get; set; }
+
+ [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "")]
+ public string WarehouseName { get; set; }
+ }
+}
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Service/OutboundOrderDetailService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Service/OutboundOrderDetailService.cs
index b103c2a..a60e0fb 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Service/OutboundOrderDetailService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_OutboundService/Service/OutboundOrderDetailService.cs
@@ -498,7 +498,6 @@
{
ids = item.LinId;
var postContent = new MultipartFormDataContent();
- postContent.Headers.Add("ContentType", $"multipart/form-data");
postContent.Add(new StringContent(ids), "ids");
string result = string.Empty;
HttpClient client = null;
@@ -506,13 +505,13 @@
{
using (client = new HttpClient())
{
- HttpResponseMessage response = client.PostAsync(ToCancelOutFeedbackERP, postContent)
- .ConfigureAwait(false).GetAwaiter().GetResult();
+ // 2. 鍙戦�佽姹�
+ var response = HttpHelper.Post<WebResponseContent>(ToCancelOutFeedbackERP, postContent, "鍑哄簱鏄庣粏鍙栨秷鍥炰紶ERP");
- // 纭繚鍝嶅簲鎴愬姛
- response.EnsureSuccessStatusCode();
- result = response.Content.ReadAsStringAsync()
- .ConfigureAwait(false).GetAwaiter().GetResult();
+ if (response.Code !=0)
+ {
+ throw new Exception($"鎿嶄綔澶辫触: {response.msg ?? "鏈彁渚涢敊璇俊鎭�"}");
+ }
}
_unitOfWorkManage.BeginTran();
_outboundRepository.OutboundOrderDetailRepository.DeleteAndMoveIntoHty(outboundOrderDetails, OperateType.浜哄伐鍙栨秷);
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockViewService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockViewService.cs
index 8f4b3b5..02b3a7e 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockViewService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Base/StockViewService.cs
@@ -1,4 +1,6 @@
锘�
+using Magicodes.ExporterAndImporter.Core;
+using Magicodes.ExporterAndImporter.Excel;
using Microsoft.AspNetCore.Http;
using SqlSugar;
using System;
@@ -52,6 +54,13 @@
{
switch (param.Name)
{
+ case var name when name == nameof(Dt_StockInfo.PalletCode).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable1 = sugarQueryable1
+ .Where(x=>x.PalletCode.Contains(param.Value.ToString()));
+ }
+ break;
case var name when name == nameof(Dt_StockInfoDetail.MaterielCode).FirstLetterToLower():
if (!string.IsNullOrEmpty(param.Value?.ToString()))
{
@@ -71,7 +80,7 @@
if (!string.IsNullOrEmpty(param.Value?.ToString()))
{
sugarQueryable1 = sugarQueryable1
- .Where(x => x.LocationCode == param.Value.ToString());
+ .Where(x => x.LocationCode.Contains(param.Value.ToString()));
}
break;
case var name when name == nameof(Dt_LocationInfo.LocationStatus).FirstLetterToLower():
@@ -152,6 +161,7 @@
{
x.MaterielCode = string.Join(",", x.Details.Select(d => d.MaterielCode).Distinct());
x.BatchNo = string.Join(",", x.Details.Select(d => d.BatchNo).Distinct());
+ x.SupplierBatch = string.Join(",", x.Details.Select(d => d.SupplierBatch).Distinct());
x.MaterielSpec = x.Details.FirstOrDefault()?.MaterieSpec ?? "";
x.MaterielName = x.Details.FirstOrDefault()?.MaterielName ?? "";
});
@@ -186,5 +196,162 @@
}
return new PageGridData<object>(total: 0, null);
}
+
+ public virtual WebResponseContent Export(PageDataOptions options)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ Type t = typeof(StockViewDTO);
+
+ string savePath = AppDomain.CurrentDomain.BaseDirectory + $"ExcelExport";
+ IExporter exporter = new ExcelExporter();
+ options.Page = 1;
+ options.Rows = 30;
+ options.Order = "desc";
+ options.Sort = "stockId";
+
+ ISugarQueryable<Dt_StockInfo> sugarQueryable1 = _dbBase.Queryable<Dt_StockInfo>().Includes(x => x.Details);
+ ISugarQueryable<Dt_LocationInfo> sugarQueryable = _dbBase.Queryable<Dt_LocationInfo>();
+ ISugarQueryable<Dt_StockInfoDetail> sugarQueryable2 = _dbBase.Queryable<Dt_StockInfoDetail>();
+ if (!string.IsNullOrEmpty(options.Wheres))
+ {
+ try
+ {
+
+ List<SearchParameters> searchParametersList = options.Wheres.DeserializeObject<List<SearchParameters>>();
+ if (searchParametersList?.Any() == true)
+ {
+ foreach (var param in searchParametersList)
+ {
+ switch (param.Name)
+ {
+ case var name when name == nameof(Dt_StockInfo.PalletCode).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable1 = sugarQueryable1
+ .Where(x => x.PalletCode.Contains(param.Value.ToString()));
+ }
+ break;
+ case var name when name == nameof(Dt_StockInfoDetail.MaterielCode).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable1 = sugarQueryable1
+ .Where(x => x.Details.Any(v => v.MaterielCode.Contains(param.Value.ToString())));
+ }
+ break;
+ case var name when name == nameof(Dt_StockInfoDetail.BatchNo).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable1 = sugarQueryable1
+ .Where(x => x.Details.Any(v => v.BatchNo.Contains(param.Value.ToString())));
+ }
+ break;
+
+ case var name when name == nameof(Dt_StockInfo.LocationCode).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable1 = sugarQueryable1
+ .Where(x => x.LocationCode.Contains(param.Value.ToString()));
+ }
+ break;
+ case var name when name == nameof(Dt_LocationInfo.LocationStatus).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable = sugarQueryable
+ .Where(x => x.LocationStatus == param.Value.ObjToInt());
+ }
+ break;
+ case var name when name == nameof(Dt_StockInfo.StockStatus).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable1 = sugarQueryable1
+ .Where(x => x.StockStatus == param.Value.ObjToInt());
+ }
+ break;
+ case var name when name == nameof(Dt_StockInfo.WarehouseId).FirstLetterToLower():
+ if (!string.IsNullOrEmpty(param.Value?.ToString()))
+ {
+ sugarQueryable1 = sugarQueryable1
+ .Where(x => x.WarehouseId == param.Value.ObjToInt());
+ }
+ break;
+ case var name when name == nameof(Dt_StockInfo.CreateDate).FirstLetterToLower():
+ if (DateTime.TryParse(param.Value?.ToString(), out DateTime minDate))
+ {
+ LinqExpressionType expressionType = param.DisplayType.GetLinqCondition();
+ if (expressionType == LinqExpressionType.ThanOrEqual)
+ {
+ sugarQueryable1 = sugarQueryable1.Where(x => x.CreateDate >= minDate);
+ }
+ else if (expressionType == LinqExpressionType.LessThanOrEqual)
+ {
+ sugarQueryable1 = sugarQueryable1.Where(x => x.CreateDate <= minDate);
+ }
+ }
+ break;
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ }
+ }
+
+
+ ISugarQueryable<StockViewDTO> list = sugarQueryable1
+ .InnerJoin(sugarQueryable, (b, a) => a.LocationCode == b.LocationCode)
+ .Select((b, a) => new StockViewDTO
+ {
+ LocationCode = b.LocationCode,
+ Column = a.Column,
+ WarehouseId = b.WarehouseId,
+ CreateDate = b.CreateDate,
+ Creater = b.Creater,
+ Depth = a.Depth,
+ EnalbeStatus = a.EnableStatus,
+ 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,
+ });
+
+ int totalCount = 0;
+ var stockViewDTOs = list.ToPageList(options.Page, options.Rows, ref totalCount);
+
+ stockViewDTOs.ForEach(x =>
+ {
+ x.MaterielCode = string.Join(",", x.Details.Select(d => d.MaterielCode).Distinct());
+ x.BatchNo = string.Join(",", x.Details.Select(d => d.BatchNo).Distinct());
+ x.SupplierBatch= string.Join(",", x.Details.Select(d => d.SupplierBatch).Distinct());
+ x.StockCounts = Math.Round(x.Details.Sum(x => x.StockQuantity), 3).ToString();
+ x.MaterielSpec = x.Details.FirstOrDefault()?.MaterieSpec ?? "";
+ x.MaterielName = x.Details.FirstOrDefault()?.MaterielName ?? "";
+ });
+
+ byte[] data = exporter.ExportAsByteArray(stockViewDTOs).Result;
+
+ string fileName = "搴撳瓨瑙嗗浘.xlsx";
+
+ FileHelper.WriteFile(savePath, fileName, data);
+
+ content = WebResponseContent.Instance.OK(data: savePath + "\\" + fileName);
+ }
+ catch (Exception ex)
+ {
+ content = WebResponseContent.Instance.Error(ex.Message);
+ }
+ return content;
+ }
}
}
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs
index b6b5e1d..029a2cd 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_StockService/Service/StockInfoService.cs
@@ -211,19 +211,19 @@
List<Dt_StockInfodt> stolist= new List<Dt_StockInfodt>();
for (int i = 0; i < entities.Count; i++)
{
- Dt_StockInfoDetail dt_StockIndet = detdata.Where(x => x.StockId == entities[i].Id).FirstOrDefault();
+ List<Dt_StockInfoDetail> dt_StockIndet = detdata.Where(x => x.StockId == entities[i].Id).ToList();
string MaterialTypet = "鍘熸潗鏂�";
if (entities[i].MaterialType == (int)InventoryMaterialType.鎴愬搧)
{
MaterialTypet = "鎴愬搧";
}
- else if(entities[i].MaterialType == (int)InventoryMaterialType.绌烘墭)
+ else if (entities[i].MaterialType == (int)InventoryMaterialType.绌烘墭)
{
MaterialTypet = "绌烘墭";
}
string Wlstatust = "寰呮";
- if (entities[i].Wlstatus== (int)InventoryMaterialStatus.鍚堟牸)
+ if (entities[i].Wlstatus == (int)InventoryMaterialStatus.鍚堟牸)
{
Wlstatust = "鍚堟牸";
}
@@ -254,14 +254,14 @@
MaterialType = MaterialTypet,
LocationCode = entities[i].LocationCode,
Wlstatus = Wlstatust,
- MaterielCode = dt_StockIndet?.MaterielCode ?? "", // 濡傛灉 dt_StockIndet 涓� null锛屼娇鐢ㄧ┖瀛楃涓蹭綔涓洪粯璁ゅ��
- MaterielName = dt_StockIndet?.MaterielName ?? "",
- OrderNo = dt_StockIndet?.OrderNo ?? "",
- BatchNo = dt_StockIndet?.BatchNo ?? "",
- SerialNumber = dt_StockIndet?.SerialNumber ?? "",
- StockQuantity = dt_StockIndet?.StockQuantity ?? 0, // 鍋囪 StockQuantity 鏄暟鍊肩被鍨嬶紝浣跨敤 0 浣滀负榛樿鍊�
- BatchNoName = dt_StockIndet?.BatchNoName ?? "",
- CreateDate = dt_StockIndet?.CreateDate ?? DateTime.MinValue, // 鍋囪 CreateDate 鏄棩鏈熺被鍨嬶紝浣跨敤榛樿鏃堕棿
+ MaterielCode = dt_StockIndet?.FirstOrDefault()?.MaterielCode ?? "",
+ MaterielName = dt_StockIndet?.FirstOrDefault()?.MaterielName ?? "",
+ OrderNo = dt_StockIndet?.FirstOrDefault()?.OrderNo ?? "",
+ BatchNo = dt_StockIndet?.FirstOrDefault()?.BatchNo ?? "",
+ SerialNumber = dt_StockIndet?.FirstOrDefault()?.SerialNumber ?? "",
+ StockQuantity = dt_StockIndet?.Sum(item => item.StockQuantity) ?? 0,
+ BatchNoName = dt_StockIndet?.FirstOrDefault()?.BatchNoName ?? "",
+ CreateDate = dt_StockIndet?.FirstOrDefault()?.CreateDate ?? DateTime.MinValue,
Remark = entities[i].Remark,
};
stolist.Add(dt_);
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_SystemRepository/Sys_RoleDataPermissionRepository.cs b/WMS/WIDESEA_WMSServer/WIDESEA_SystemRepository/Sys_RoleDataPermissionRepository.cs
new file mode 100644
index 0000000..ac429c2
--- /dev/null
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_SystemRepository/Sys_RoleDataPermissionRepository.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_ISystemRepository;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_SystemRepository
+{
+ public class Sys_RoleDataPermissionRepository : RepositoryBase<Sys_RoleDataPermission>, ISys_RoleDataPermissionRepository
+ {
+ public Sys_RoleDataPermissionRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
+ {
+ }
+ }
+}
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs
index 8246572..d15afc9 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/PartialTaskService_Inbound.cs
@@ -39,8 +39,7 @@
Dt_Task task = Repository.QueryFirst(x => x.PalletCode == palletCode);
if (task != null)
{
- PushTasksToWCS(new List<Dt_Task> { task });
- return WebResponseContent.Instance.OK($"璇ユ墭鐩樺凡鐢熸垚浠诲姟", _mapper.Map<WMSTaskDTO>(task));
+ return WebResponseContent.Instance.Error($"璇ユ墭鐩榹palletCode}宸茬敓鎴愪换鍔�");
}
Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).Includes(x => x.Details).First();
@@ -177,7 +176,7 @@
_unitOfWorkManage.CommitTran();
WMSTaskDTO wMSTaskDTO = _mapper.Map<WMSTaskDTO>(newTask);
- //PushTasksToWCS(new List<Dt_Task> { newTask });
+ PushTasksToWCS(new List<Dt_Task> { newTask });
return WebResponseContent.Instance.OK(data: wMSTaskDTO);
}
catch (Exception ex)
@@ -253,8 +252,7 @@
Dt_Task task = Repository.QueryFirst(x => x.PalletCode == palletCode);
if (task != null)
{
- PushTasksToWCS(new List<Dt_Task> { task });
- return WebResponseContent.Instance.OK($"璇ユ墭鐩樺凡鐢熸垚浠诲姟", _mapper.Map<WMSTaskDTO>(task));
+ return WebResponseContent.Instance.Error($"璇ユ墭鐩榹palletCode}宸茬敓鎴愪换鍔�");
}
// 鑾峰彇鍏ュ簱鍗曟槑缁�
var inboundOrderDet = GetInboundOrderDetail(palletCode);
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
index dc164dc..de58589 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -79,6 +79,7 @@
using WIDESEA_InboundRepository;
using System.Drawing.Printing;
using System;
+using WIDESEA_Common.Log;
namespace WIDESEA_TaskInfoService
{
@@ -107,7 +108,8 @@
private readonly IStockInfoDetailRepository _stockInfoDetailRepository;
private readonly IReturnOrderRepository _returnOrderRepository;
private readonly IProductionRepository _productionRepository;
- private readonly IInboundRepository _inboundRepository;
+ private readonly IInboundRepository _inboundRepository;
+
public ITaskRepository Repository => BaseDal;
public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IMaterielInfoService materielInfoService, IInboundOrderDetail_HtyService inboundOrderDetail_HtyService, IOutboundOrder_HtyService outboundOrder_HtyService, IOutboundOrderDetail_HtyService outboundOrderDetail_HtyService, IInboundOrder_HtyService inboundOrder_HtyService, IStockRepository stockRepository, IInboundOrderDetailService inboundOrderDetailService, IBasicService basicService, IOutboundService outboundService, IInboundService inboundService, IRecordService recordService, IStockService stockService, ITask_HtyService taskHtyService, ILocationInfoService locationInfoService, IOutboundOrderDetailRepository outboundOrderDetailRepository, IBasicRepository basicRepository, IStockInfoDetailRepository stockInfoDetailRepository, IPalletTypeInfoRepository palletTypeInfoRepository, IReturnOrderRepository returnOrderRepository, IProductionRepository productionRepository,IInboundRepository inboundRepository) : base(BaseDal)
@@ -144,6 +146,7 @@
public string ReceiveWMSTaskAllocatein = WIDESEA_Core.Helper.AppSettings.Configuration["ReceiveWMSTaskAllocatein"];
public string ReceiveERPTaskout = WIDESEA_Core.Helper.AppSettings.Configuration["ReceiveERPTaskout"];
public string InMaterialWarehousingCallback = WIDESEA_Core.Helper.AppSettings.Configuration["InMaterialWarehousingCallback"];
+
/// <summary>
/// 浠诲姟淇℃伅鎺ㄩ�佽嚦WCS
@@ -187,7 +190,7 @@
{
return WebResponseContent.Instance.Error($"鏈壘鍒癢CSApi鍦板潃,璇锋鏌ラ厤缃枃浠�");
}
- string response = HttpHelper.Get($"{url}/api/Task/RecWMSTaskCompleted?taskNum=" + taskNum);
+ string response = HttpHelper.Post($"{url}/api/Task/RecWMSTaskCompleted?taskNum=" + taskNum);
return JsonConvert.DeserializeObject<WebResponseContent>(response) ?? WebResponseContent.Instance.Error("杩斿洖閿欒");
}
@@ -1205,8 +1208,7 @@
if (outboundOrderDetails.OrderDetailStatus == OrderDetailStatusEnum.Over.ObjToInt() && inboundOrder.System.Equals("ERP"))
{
FeedBackOutERP(outboundOrder.OrderNo, outboundOrderDetails.LinId);
- //DownloadReport(path, savePath, outboundOrderDetails.Id);
- //printTest(savePath);
+ DownloadReport(path, savePath, outboundOrderDetails.Id);
}
///鍗曟嵁瀹屾垚鎺ㄩ�丼MOM绯荤粺
if (outboundOrder.OrderStatus == OutboundStatusEnum.鍑哄簱瀹屾垚.ObjToInt() && inboundOrder.System.Equals("SMOM"))
@@ -1664,72 +1666,348 @@
throw new Exception($"鎿嶄綔澶辫触: {response.Message ?? "鏈彁渚涢敊璇俊鎭�"}");
}
}
- public string DownloadReport(string path, string savePath, int orderId)
+ // 鏂规硶澹版槑娣诲姞 async 鍏抽敭瀛楋紝杩斿洖鍊兼敼涓� Task<string>
+ public async Task<string> DownloadReport(string path, string savePath, int orderId)
{
- // 鏋勫缓瀹屾暣 URL锛岋紙鎶ヨ〃浼犲弬锛�
string reportUrl = path + "&orderId=" + orderId;
try
{
- // 纭繚淇濆瓨鐩綍瀛樺湪
string directory = Path.GetDirectoryName(savePath);
+ Console.WriteLine($"涓嬭浇鍦板潃: {reportUrl}");
+ Console.WriteLine($"淇濆瓨璺緞: {savePath}");
+
+ // 纭繚鐩綍瀛樺湪
if (!Directory.Exists(directory))
{
Directory.CreateDirectory(directory);
+ Console.WriteLine($"宸插垱寤虹洰褰�: {directory}");
}
- string[] files = Directory.GetFiles(directory);
- // 鍒犻櫎姣忎釜鏂囦欢
- foreach (string filePath in files)
+ // 娓呯悊鐩綍涓嬬幇鏈夋枃浠�
+ if (File.Exists(savePath))
{
- File.Delete(filePath);
+ File.Delete(savePath);
+ Console.WriteLine($"宸插垹闄ゆ棫鏂囦欢: {savePath}");
}
- // 浣跨敤 HttpClient 涓嬭浇鏂囦欢
+
+ // 浣跨敤涓存椂鏂囦欢鍚嶄笅杞斤紝涓嬭浇瀹屾垚鍚庡啀閲嶅懡鍚�
+ string tempFilePath = savePath + ".tmp";
+
+ // 寮傛涓嬭浇鏂囦欢
using (var httpClient = new HttpClient())
{
- // 璁剧疆瓒呮椂鏃堕棿锛堝竼杞姤琛ㄧ敓鎴愬彲鑳介渶瑕佽緝闀挎椂闂达級
httpClient.Timeout = TimeSpan.FromMinutes(5);
- // 鍙戦�� GET 璇锋眰锛堝悓姝ユ柟寮忥級
- using (var response = httpClient.GetAsync(reportUrl, HttpCompletionOption.ResponseHeadersRead).GetAwaiter().GetResult())
+ using (var response = await httpClient.GetAsync(reportUrl, HttpCompletionOption.ResponseHeadersRead).ConfigureAwait(false))
{
- // 妫�鏌ュ搷搴旂姸鎬�
response.EnsureSuccessStatusCode();
- // 鑾峰彇鍐呭娴侊紙鍚屾鏂瑰紡锛�
- using (var contentStream = response.Content.ReadAsStreamAsync().GetAwaiter().GetResult())
+ using (var contentStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false))
{
- // 鍒涘缓鏂囦欢娴�
- using (var fileStream = new FileStream(savePath, FileMode.Create, FileAccess.Write, FileShare.None))
+ Console.WriteLine($"寮�濮嬪啓鍏ヤ复鏃舵枃浠�: {tempFilePath}");
+
+ using (var fileStream = new FileStream(
+ tempFilePath,
+ FileMode.Create,
+ FileAccess.Write,
+ FileShare.None,
+ bufferSize: 4096,
+ useAsync: true
+ ))
{
- // 澶嶅埗鍐呭鍒版枃浠讹紙鍚屾鏂瑰紡锛�
- contentStream.CopyToAsync(fileStream).GetAwaiter().GetResult();
+ await contentStream.CopyToAsync(fileStream).ConfigureAwait(false);
+ await fileStream.FlushAsync().ConfigureAwait(false);
+ Console.WriteLine($"涓存椂鏂囦欢鍐欏叆瀹屾垚: {tempFilePath}");
}
}
}
}
- return savePath;
+ // 鍏抽敭浼樺寲锛氱‘淇濇枃浠跺畬鍏ㄥ啓鍏ョ鐩�
+ await EnsureFileCompletelyWritten(tempFilePath);
+
+ // 閲嶅懡鍚嶄负鐩爣鏂囦欢
+ File.Move(tempFilePath, savePath, true);
+ Console.WriteLine($"鏂囦欢閲嶅懡鍚嶅畬鎴�: {savePath}");
+
+ // 楠岃瘉鏂囦欢鍙闂�
+ await ValidateFileAccessible(savePath);
+
+ // 鎵撳嵃鏂囦欢
+ PrintTestDirect(savePath);
+
+ return savePath;
}
catch (Exception ex)
{
- throw new ValidationException(ex.Message);
+ Console.WriteLine($"涓嬭浇澶辫触: {ex.Message}");
+ throw new InvalidOperationException($"鏂囦欢涓嬭浇寮傚父: {ex.Message}", ex);
}
}
- public virtual void printTest(string fullPath)
+ /// <summary>
+ /// 纭繚鏂囦欢瀹屽叏鍐欏叆纾佺洏
+ /// </summary>
+ private async Task EnsureFileCompletelyWritten(string filePath)
{
- Spire.Pdf.PdfDocument pdf = new PdfDocument();
- //鏂囦欢鍦板潃
- pdf.LoadFromFile(fullPath);
- //鎸囧畾鎵撳嵃鏈轰綅缃�
- string url = AppSettings.app("PrinterName");
- pdf.PrintSettings.PrinterName = url;
- //鎵ц鎵撳嵃
- pdf.Print();
- //鍐呭瓨閲婃斁
- pdf.Dispose();
+ const int maxRetries = 5;
+ const int delayMs = 500;
+ for (int i = 0; i < maxRetries; i++)
+ {
+ try
+ {
+ // 灏濊瘯浠ヨ鍙栨ā寮忔墦寮�鏂囦欢锛岀‘淇濇枃浠舵病鏈夎鍗犵敤
+ using (var fs = new FileStream(filePath,
+ FileMode.Open,
+ FileAccess.Read,
+ FileShare.Read,
+ bufferSize: 4096,
+ useAsync: true))
+ {
+ // 楠岃瘉鏂囦欢鏈夊唴瀹�
+ if (fs.Length > 0)
+ {
+ Console.WriteLine($"鏂囦欢楠岃瘉鎴愬姛: 澶у皬={fs.Length}瀛楄妭 (灏濊瘯 {i + 1}/{maxRetries})");
+ return;
+ }
+ else
+ {
+ Console.WriteLine($"璀﹀憡: 鏂囦欢澶у皬涓�0 (灏濊瘯 {i + 1}/{maxRetries})");
+ }
+ }
+ }
+ catch (IOException ex)
+ {
+ Console.WriteLine($"鏂囦欢鍙兘浠嶅湪鍐欏叆涓� (灏濊瘯 {i + 1}/{maxRetries}): {ex.Message}");
+ }
+
+ if (i < maxRetries - 1)
+ {
+ await Task.Delay(delayMs);
+ }
+ }
+
+ throw new IOException($"鏂囦欢鍐欏叆鏈畬鎴愭垨鏃犳硶璁块棶: {filePath}");
+ }
+
+ /// <summary>
+ /// 楠岃瘉鏂囦欢鍙闂笖涓嶄负绌�
+ /// </summary>
+ private async Task ValidateFileAccessible(string filePath)
+ {
+ const int maxRetries = 3;
+ const int delayMs = 300;
+
+ for (int i = 0; i < maxRetries; i++)
+ {
+ try
+ {
+ if (!File.Exists(filePath))
+ {
+ throw new FileNotFoundException($"鏂囦欢涓嶅瓨鍦�: {filePath}");
+ }
+
+ var fileInfo = new FileInfo(filePath);
+
+ // 楠岃瘉鏂囦欢澶у皬澶т簬0
+ if (fileInfo.Length == 0)
+ {
+ throw new InvalidDataException($"鏂囦欢澶у皬涓�0: {filePath}");
+ }
+
+ // 楠岃瘉鏂囦欢涓嶆槸瀹屽叏鐢辩┖瀛楃缁勬垚锛堝彲閫夋鏌ワ級
+ await ValidateFileContent(filePath);
+
+ Console.WriteLine($"鏂囦欢楠岃瘉閫氳繃: {filePath} (澶у皬={fileInfo.Length}瀛楄妭)");
+ return;
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine($"鏂囦欢楠岃瘉澶辫触 (灏濊瘯 {i + 1}/{maxRetries}): {ex.Message}");
+
+ if (i == maxRetries - 1)
+ {
+ throw;
+ }
+
+ await Task.Delay(delayMs);
+ }
+ }
+ }
+
+ /// <summary>
+ /// 楠岃瘉鏂囦欢鍐呭锛堝彲閫夛級
+ /// </summary>
+ private async Task ValidateFileContent(string filePath)
+ {
+ try
+ {
+ // 璇诲彇鏂囦欢鍓嶅嚑涓瓧鑺傦紝纭繚涓嶆槸瀹屽叏鐢辩┖瀛楃缁勬垚
+ using (var fs = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.Read, 4096, true))
+ {
+ byte[] buffer = new byte[Math.Min(1024, fs.Length)];
+ int bytesRead = await fs.ReadAsync(buffer, 0, buffer.Length);
+
+ // 妫�鏌ユ槸鍚﹂兘鏄�0锛堢┖鏂囦欢锛�
+ if (bytesRead > 0 && buffer.All(b => b == 0))
+ {
+ throw new InvalidDataException("鏂囦欢鍐呭寮傚父: 鍏ㄩ儴涓�0瀛楄妭");
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine($"鏂囦欢鍐呭楠岃瘉寮傚父: {ex.Message}");
+ // 鍙互閫夋嫨鏄惁鎶涘嚭寮傚父
+ }
+ }
+
+ public virtual void PrintTestDirect(string fullPath)
+ {
+ const int maxRetryCount = 3;
+ const int retryDelayMs = 1000;
+
+ if (!File.Exists(fullPath))
+ {
+ Console.WriteLine($"鎵撳嵃澶辫触锛氭枃浠朵笉瀛樺湪 {fullPath}");
+ return;
+ }
+
+ // 鑾峰彇鎵撳嵃鏈哄悕绉�
+ string printerName = AppSettings.app("PrinterName");
+
+ // 灏濊瘯涓嶅悓鐨勬墦鍗版柟娉�
+ for (int retryCount = 0; retryCount < maxRetryCount; retryCount++)
+ {
+ try
+ {
+ Console.WriteLine($"灏濊瘯鎵撳嵃 (鏂规硶 {retryCount + 1}/{maxRetryCount}): {fullPath}");
+
+ switch (retryCount)
+ {
+ case 0:
+ // 鏂规硶1: 浣跨敤鍘熷鎵撳嵃鍛戒护
+ PrintUsingRawCommand(fullPath, printerName);
+ break;
+ case 1:
+ // 鏂规硶3: 鐩存帴浣跨敤Spire.PDF浣嗙畝鍖栬缃�
+ PrintUsingSpireSimple(fullPath, printerName);
+ break;
+ case 2:
+ // 鏂规硶3: 鐩存帴浣跨敤Spire.PDF浣嗙畝鍖栬缃�
+ PrintUsingSpireSimple(fullPath, printerName);
+ break;
+ }
+
+ Console.WriteLine("鎵撳嵃浠诲姟鍙戦�佹垚鍔�");
+ return;
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine($"鎵撳嵃鏂规硶 {retryCount + 1} 澶辫触: {ex.Message}");
+
+ if (retryCount < maxRetryCount - 1)
+ {
+ Thread.Sleep(retryDelayMs);
+ }
+ }
+ }
+
+ Console.WriteLine("鎵�鏈夋墦鍗版柟娉曢兘澶辫触");
+ }
+
+ /// <summary>
+ /// 浣跨敤鍘熷鎵撳嵃鍛戒护
+ /// </summary>
+ private void PrintUsingRawCommand(string filePath, string printerName)
+ {
+ try
+ {
+ // 鏂规硶1: 浣跨敤Process鐩存帴鎵撳嵃
+ var process = new System.Diagnostics.Process();
+ process.StartInfo.FileName = filePath;
+ process.StartInfo.Verb = "print";
+ process.StartInfo.CreateNoWindow = true;
+ process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
+ process.Start();
+
+ // 绛夊緟涓�娈垫椂闂磋鎵撳嵃浠诲姟鎻愪氦
+ if (!process.WaitForExit(5000))
+ {
+ Console.WriteLine("鎵撳嵃杩涚▼鏈強鏃堕��鍑猴紝浣嗕换鍔″彲鑳藉凡鎻愪氦");
+ }
+ }
+ catch
+ {
+ // 濡傛灉涓婅堪鏂规硶澶辫触锛屽皾璇曚娇鐢╮undll32
+ try
+ {
+ var args = $@"/c rundll32.exe C:\Windows\System32\shimgvw.dll,ImageView_PrintTo ""{filePath}"" ""{printerName}""";
+ System.Diagnostics.Process.Start("cmd.exe", args);
+ }
+ catch
+ {
+ throw;
+ }
+ }
+ }
+
+ /// <summary>
+ /// 浣跨敤Spire.PDF浣嗙畝鍖栬缃�
+ /// </summary>
+ private void PrintUsingSpireSimple(string filePath, string printerName)
+ {
+ using (Spire.Pdf.PdfDocument pdf = new Spire.Pdf.PdfDocument())
+ {
+ // 浣跨敤鏈�灏忛厤缃姞杞芥枃浠�
+ pdf.LoadFromFile(filePath);
+
+ // 璁剧疆鍩烘湰鎵撳嵃鏈轰俊鎭�
+ if (!string.IsNullOrEmpty(printerName))
+ {
+ pdf.PrintSettings.PrinterName = printerName;
+ }
+
+ // 鐩存帴鎵撳嵃锛屼笉妫�鏌�
+ pdf.Print();
+ }
+ }
+
+ /// <summary>
+ /// 妫�鏌ユ枃浠舵槸鍚﹀彲璁块棶
+ /// </summary>
+ private bool IsFileAccessible(string filePath)
+ {
+ try
+ {
+ using (FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ {
+ return fs.Length > 0;
+ }
+ }
+ catch
+ {
+ return false;
+ }
+ }
+
+ /// <summary>
+ /// 灏濊瘯寮哄埗鍨冨溇鍥炴敹锛岄噴鏀惧彲鑳藉瓨鍦ㄧ殑鏂囦欢鍙ユ焺
+ /// </summary>
+ private void TryForceGarbageCollection()
+ {
+ try
+ {
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+ Console.WriteLine("宸叉墽琛屽瀮鍦惧洖鏀�");
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine($"鍨冨溇鍥炴敹澶辫触: {ex.Message}");
+ }
}
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoRowController.cs b/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoRowController.cs
new file mode 100644
index 0000000..bf9e263
--- /dev/null
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/LocationInfoRowController.cs
@@ -0,0 +1,105 @@
+锘縰sing Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+using WIDESEA_Core;
+using WIDESEA_Core.BaseController;
+using WIDESEA_DTO.Basic;
+using WIDESEA_IBasicRepository;
+using WIDESEA_IBasicService;
+using WIDESEA_ISystemRepository;
+using WIDESEA_Model.Models;
+
+namespace WIDESEA_WMSServer.Controllers.Basic
+{
+ /// <summary>
+ /// 璐т綅
+ /// </summary>
+ [Route("api/LocationInfoRow")]
+ [ApiController]
+ public class LocationInfoRowController : ApiBaseController<ILocationInfoService, Dt_LocationInfo>
+ {
+ private readonly ILocationInfoRepository _repository;
+ private readonly ISys_RoleDataPermissionRepository _permissionRepository;
+ private readonly ILocationInfoRepository _locationInfoRepository;
+ public LocationInfoRowController(ILocationInfoService service, ILocationInfoRepository repository, ISys_RoleDataPermissionRepository permissionRepository, ILocationInfoRepository locationInfoRepository) : base(service)
+ {
+ _repository = repository;
+ _permissionRepository = permissionRepository;
+ _locationInfoRepository = locationInfoRepository;
+ }
+ /// <summary>
+ /// 鑾峰彇搴撳尯鏉冮檺
+ /// </summary>
+ /// <returns></returns>
+ [HttpGet, HttpPost, Route("GetArea"), AllowAnonymous]
+ public object GetArea()
+ {
+ List<object> list = new List<object>();
+ List<Dt_LocationInfo>? locations = null;
+ List<Sys_RoleDataPermission> permissions = _permissionRepository.QueryData(x => x.RoleId == App.User.RoleId);
+ if (permissions.Count > 0)
+ locations = _locationInfoRepository.QueryData(x => permissions.Select(k => k.WarehouseId).ToList().Contains(x.WarehouseId));
+ foreach (var permission in permissions)
+ {
+ var Rows = locations.Where(x => x.WarehouseId == permission.WarehouseId).GroupBy(x => x.Row).Select(x => x.Key).OrderBy(x => x).ToList();
+ var obj = new
+ {
+ house_name = permission.WarehouseName,
+ shelf_code = permission.WarehouseId,
+ tunnel = Rows
+ };
+ list.Add(obj);
+ }
+ return list;
+ }
+ /// <summary>
+ /// 鑾峰彇璐т綅淇℃伅
+ /// </summary>
+ /// <param name="area"></param>
+ /// <returns></returns>
+ [HttpPost, Route("GetLocationStatu"), AllowAnonymous]
+ public object GetLocationStatu([FromBody] LocationArea area)
+ {
+ List<LocationLayer> layers = new List<LocationLayer>();
+ var data = _locationInfoRepository.QueryData(x => x.WarehouseId == area.shelf_code && x.Row == area.tunnel);
+ foreach (var layer in data.GroupBy(t => t.Layer))
+ {
+ var rows = new List<LocationRow>();
+ var data_rows = layer.GroupBy(t => t.Row);
+ foreach (var data_row in data_rows)
+ {
+ var cols = new List<LocationCol>();
+ foreach (var data_col in data_row)
+ {
+ cols.Add(new LocationCol()
+ {
+ //鍒�
+ row = data_col.Row,
+ layer = data_col.Layer,
+ index = data_col.Column,
+ locationCode = data_col.LocationCode,
+ location_state = data_col.LocationStatus,
+ location_lock = data_col.EnableStatus,
+ remark = data_col.Remark
+ });
+ }
+ cols = cols.OrderBy(t => t.index).ToList();
+ rows.Add(new LocationRow()
+ {
+ //琛�
+ index = data_row.Key,
+ cols = cols
+ });
+ }
+ rows = rows.OrderBy(t => t.index).ToList();
+ layers.Add(new LocationLayer()
+ {
+ //灞�
+ index = layer.Key,
+ rows = rows
+ });
+ }
+ layers = layers.OrderBy(t => t.index).ToList();
+ return layers;
+ }
+ }
+}
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockViewController.cs b/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockViewController.cs
index bbd9d96..e67047a 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockViewController.cs
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockViewController.cs
@@ -2,6 +2,7 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
+using System.Reflection;
using WIDESEA_Core;
using WIDESEA_Core.BaseController;
using WIDESEA_DTO.Stock;
@@ -31,5 +32,34 @@
{
return _stockViewService.GetDetailPage(pageData);
}
+
+ /// <summary>
+ /// 瀵煎嚭鏁版嵁
+ /// </summary>
+ /// <param name="loadData"></param>
+ /// <returns></returns>
+ [HttpPost, Route("Export")]
+ public virtual ActionResult Export([FromBody] PageDataOptions loadData)
+ {
+ WebResponseContent result = InvokeService("Export", new object[] { loadData }) as WebResponseContent;
+ if (result.Status)
+ return File(
+ System.IO.File.ReadAllBytes(result.Data.ToString()),
+ System.Net.Mime.MediaTypeNames.Application.Octet,
+ Path.GetFileName(result.Data.ToString())
+ );
+ return Json(result);
+ }
+ private object InvokeService(string methodName, object[] parameters)
+ {
+ Type t = _stockViewService.GetType();
+ List<Type> types = new List<Type>();
+ foreach (var param in parameters)
+ {
+ types.Add(param.GetType());
+ }
+ MethodInfo method = t.GetMethod(methodName, types.ToArray());
+ return method.Invoke(_stockViewService, parameters);
+ }
}
}
diff --git a/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json b/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
index 378fca5..8f1dbb2 100644
--- a/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
+++ b/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/appsettings.json
@@ -1,36 +1,44 @@
{
- "urls": "http://*:9290", //web鏈嶅姟绔彛锛屽鏋滅敤IIS閮ㄧ讲锛屾妸杩欎釜鍘绘帀
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft.AspNetCore": "Warning"
- }
- },
- "dics": "inOrderType,inoutType,outOrderType,inboundState,createType,enableEnum,enableStatusEnum,locationStatusEnum,locationTypeEnum,taskTypeEnum,taskStatusEnum,outboundStatusEnum,orderDetailStatusEnum,stockStatusEmun,stockChangeType,outStockStatus,InventoryMaterialType,InventoryMaterialStatus",
- "AllowedHosts": "*",
+ "urls": "http://*:9290", //web鏈嶅姟绔彛锛屽鏋滅敤IIS閮ㄧ讲锛屾妸杩欎釜鍘绘帀
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft.AspNetCore": "Warning"
+ }
+ },
+ "dics": "inOrderType,inoutType,outOrderType,inboundState,createType,enableEnum,enableStatusEnum,locationStatusEnum,locationTypeEnum,taskTypeEnum,taskStatusEnum,outboundStatusEnum,orderDetailStatusEnum,stockStatusEmun,stockChangeType,outStockStatus,InventoryMaterialType,Inventory,materialStatus,warehouses,inoutTypeEnum,takeStockStatusEnum,takeStockDetailStatusEnum",
+ "AllowedHosts": "*",
- "ReceiveTask": "http://192.168.110.172:9291/api/Task/ReceiveTask", //涓嬪彂鍑哄簱浠诲姟鑷砏CS
- "ReceiveWMSTaskin": "http://10.168.3.36:1041/api/dataportal/invoke", //绔嬪簱鍏ュ簱鏁伴噺淇℃伅鍥炰紶WMS
- "ReceiveWMSTaskout": "http://10.168.3.36:1041/api/dataportal/invoke", //绔嬪簱鍑哄簱鏁伴噺淇℃伅鍥炰紶WMS
- "ReceiveWMSTaskAUT": "http://10.168.3.36:1041/api/dataportal/invoke", //绔嬪簱鍏ュ簱鏁伴噺淇℃伅鍥炰紶WMS楠岃瘉
- "ReceiveWMSInventoryIn": "http://10.168.3.36:1041/api/dataportal/invoke", //鐩樼偣宸紓鏁伴噺鍥炰紶WMS
- "ReceiveWMSTaskAllocatein": "http://10.168.3.36:1041/api/dataportal/invoke", //璋冩嫧浠诲姟鏁伴噺鍥炰紶WMS
- "ReceiveWMSTask": "http://192.168.110.172:9291/ReceiveWMSTask", //鏌ヨ搴撳瓨锛岀‘璁ゅ叆搴撶珯鍙�
- "ConnectionStringsEncryption": false,
- "MainDB": "DB_WIDESEA", //褰撳墠椤圭洰鐨勪富搴擄紝鎵�瀵瑰簲鐨勮繛鎺ュ瓧绗︿覆鐨凟nabled蹇呴』涓簍rue
- //杩炴帴瀛楃涓�
- //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
- "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_JAMK;User ID=sa;Password=sa123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
- //璺ㄥ煙
- "Cors": {
- "PolicyName": "CorsIpAccess", //绛栫暐鍚嶇О
- "EnableAllIPs": true, //褰撲负true鏃讹紝寮�鏀炬墍鏈塈P鍧囧彲璁块棶銆�
- // 鏀寔澶氫釜鍩熷悕绔彛锛屾敞鎰忕鍙e彿鍚庝笉瑕佸甫/鏂滄潌锛氭瘮濡俵ocalhost:8000/锛屾槸閿欑殑
- // 娉ㄦ剰锛宧ttp://127.0.0.1:1818 鍜� http://localhost:1818 鏄笉涓�鏍风殑
- "IPs": "http://127.0.0.1:8080,http://localhost:8080"
- },
- "WCS": "http://localhost:9291",
- "ApiName": "WIDESEA",
- "ExpMinutes": 120,
- "QuartzJobAutoStart": true
+ "ReceiveTask": "http://192.168.110.172:9291/api/Task/ReceiveTask", //涓嬪彂鍑哄簱浠诲姟鑷砏CS
+ "ReceiveWMSTaskin": "http://172.30.0.192:1031/api/dataportal/invoke", //绔嬪簱鍏ュ簱鏁伴噺淇℃伅鍥炰紶WMS
+ "ReceiveWMSTaskreturn": "http://172.30.0.192:1031/api/dataportal/invoke", //绔嬪簱鍥炲簱鏁伴噺淇℃伅鍥炰紶WMS
+ "ReceiveWMSTaskout": "http://172.30.0.192:1031/api/dataportal/invoke", //绔嬪簱鍑哄簱鏁伴噺淇℃伅鍥炰紶WMS
+ "ReceiveWMSTaskAUT": "http://172.30.0.192:1031/api/dataportal/invoke", //绔嬪簱鍏ュ簱鏁伴噺淇℃伅鍥炰紶WMS楠岃瘉
+ "ReceiveWMSInventoryIn": "http://172.30.0.192:1031/api/dataportal/invoke", //鐩樼偣宸紓鏁伴噺鍥炰紶WMS
+ "ReceiveWMSTaskAllocatein": "http://172.30.0.192:1031/api/dataportal/invoke", //璋冩嫧浠诲姟鏁伴噺鍥炰紶WMS
+ "ReceiveWMSTask": "http://192.168.110.172:9291/ReceiveWMSTask", //鏌ヨ搴撳瓨锛岀‘璁ゅ叆搴撶珯鍙�
+
+ "ReceiveERPTaskout": "http://172.30.0.192:99/external/asrs/api/OutMaterialWarehousingCallback", //绔嬪簱鍑哄簱鏁伴噺淇℃伅鍥炰紶ERP
+ "CancelOutFeedbackERP": "http://172.30.0.192:99/external/asrs/api/CancelOutMaterialWarehousing", //鍑哄簱鍗曟槑缁嗗彇娑堝洖浼燛RP
+ "InMaterialWarehousingCallback": "http://172.30.0.184:99/external/asrs/api/InMaterialWarehousingCallback", //鍏ュ簱鍗曞畬鎴愬洖浼燛RP
+ "CancelInMaterialWarehousing": "http://172.30.0.184:99/external/asrs/api/CancelInMaterialWarehousing", //鍏ュ簱鍗曞彇娑堝洖浼燛RP
+ "ConnectionStringsEncryption": false,
+ "MainDB": "DB_WIDESEA", //褰撳墠椤圭洰鐨勪富搴擄紝鎵�瀵瑰簲鐨勮繛鎺ュ瓧绗︿覆鐨凟nabled蹇呴』涓簍rue
+ //杩炴帴瀛楃涓�
+ //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=",
+ "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_JAMK;User ID=sa;Password=root;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
+ //璺ㄥ煙
+ "Cors": {
+ "PolicyName": "CorsIpAccess", //绛栫暐鍚嶇О
+ "EnableAllIPs": true, //褰撲负true鏃讹紝寮�鏀炬墍鏈塈P鍧囧彲璁块棶銆�
+ // 鏀寔澶氫釜鍩熷悕绔彛锛屾敞鎰忕鍙e彿鍚庝笉瑕佸甫/鏂滄潌锛氭瘮濡俵ocalhost:8000/锛屾槸閿欑殑
+ // 娉ㄦ剰锛宧ttp://127.0.0.1:1818 鍜� http://localhost:1818 鏄笉涓�鏍风殑
+ "IPs": "http://127.0.0.1:8080,http://localhost:8080"
+ },
+ "ERP": "http://172.30.0.192:99",
+ "WCS": "http://localhost:9291",
+ "PrinterName": "SHARP MX-5148NC PCL6",
+ "ApiName": "WIDESEA",
+ "ExpMinutes": 120,
+ "QuartzJobAutoStart": true
}
diff --git "a/\345\220\211\345\256\211PDA/pages/stash/TakeStockOrder.vue" "b/\345\220\211\345\256\211PDA/pages/stash/TakeStockOrder.vue"
index 93f88ed..bf2c0f6 100644
--- "a/\345\220\211\345\256\211PDA/pages/stash/TakeStockOrder.vue"
+++ "b/\345\220\211\345\256\211PDA/pages/stash/TakeStockOrder.vue"
@@ -6,16 +6,34 @@
</view>
</u-sticky>
<uni-list :border="true">
- <uni-list-item direction="column" clickable @click="groupClick(item.orderNo)" link
- :to="page+item.orderNo+'&warehouseId='+warehouseId+'&id='+item.id" v-for="item in allReceivingOrders"
- :key="item.orderNo">
+ <uni-list-item
+ direction="column"
+ clickable
+ @click="groupClick(item.orderNo)"
+ link
+ :to="`${page}${item.orderNo}&warehouseId=${warehouseId}&id=${item.id}`"
+ v-for="item in allReceivingOrders"
+ :key="item.orderNo"
+ >
<template v-slot:body>
<uni-group margin-top="20">
- <view style="line-height: 17px;color: #596671;font-size: 14px;text-align: center;display: flex;justify-content: space-between;">
+ <view style="line-height: 17px;color: #596671;font-size: 14px;display: flex;justify-content: space-between;">
鐩樼偣鍗曞彿 {{item.orderNo}}
</view>
- <view style="line-height: 17px;color: #596671;font-size: 14px;text-align: center;display: flex;justify-content: space-between;">
+ <view style="line-height: 17px;color: #596671;font-size: 14px;display: flex;justify-content: space-between;">
鍒涘缓鏃堕棿 {{item.createDate}}
+ </view>
+ <!-- 鎵樼洏缂栧彿灞曠ず鍖哄煙 -->
+ <view style="line-height: 17px;color: #596671;font-size: 14px;margin-top: 10rpx;">
+ 闇�鐩樼偣鐩樺彿锛�
+ <view style="display: inline-flex;flex-wrap: wrap;margin-left: 10rpx;">
+ <text
+ style="display: inline-block;background-color: #f5f5f5;padding: 2rpx 10rpx;border-radius: 4rpx;margin: 0 5rpx 5rpx 0;"
+ v-for="(detail, index) in item.details"
+ :key="index">
+ {{detail.takePalletCode}} ,鏂欏彿:{{detail.materielCode}}
+ </text>
+ </view>
</view>
<view
style="margin-top: 10rpx;display: flex;align-items: center; ">
@@ -26,9 +44,13 @@
</uni-group>
</template>
</uni-list-item>
-
</uni-list>
- <uni-load-more :status="status" v-if="loadVisible"></uni-load-more>
+ <!-- 鍔犺浇鏇村缁勪欢 -->
+ <uni-load-more
+ :status="status"
+ :show-icon="true"
+ v-if="allReceivingOrders.length > 0 || status === 'loading'"
+ ></uni-load-more>
<u-back-top :scroll-top="scrollTop" top="400"></u-back-top>
</view>
@@ -40,95 +62,118 @@
data() {
return {
page: "/pages/stash/TakeStock?orderNo=",
- loadVisible: false,
searchValue: "",
warehouseId: "",
- status: "more",
+ status: "more", // 鍔犺浇鐘舵�侊細more-鍙姞杞斤紝loading-鍔犺浇涓紝noMore-鏃犳洿澶�
allReceivingOrders: [],
pageNo: 1,
+ pageSize: 5, // 鍏抽敭淇锛氫笌鍚庣淇濇寔涓�鑷达紙姣忛〉5鏉★級
scrollTop: 0,
- isLoaded:false
+ isLoaded: false,
+ isLoading: false, // 闃叉閲嶅鍔犺浇鐨勯攣
+ hasMore: true // 鏄惁杩樻湁鏇村鏁版嵁
}
},
onLoad(res) {
this.warehouseId = res.warehouseId;
this.isLoaded = true;
- this.getData();
+ this.resetData(); // 閲嶇疆鏁版嵁骞跺姞杞界涓�椤�
},
onPageScroll(e) {
this.scrollTop = e.scrollTop;
},
onShow() {
if (this.isLoaded) {
- // 浠庡叾浠栭〉闈㈣繑鍥炴椂鍒锋柊
- this.getData();
+ this.resetData();
}
},
onReachBottom() {
- this.pageNo += 1;
- this.getData();
+ // 涓嬫媺鍒板簳閮ㄦ椂鍔犺浇鏇村
+ if (this.hasMore && !this.isLoading) {
+ this.pageNo += 1;
+ this.getData();
+ }
},
methods: {
- search(res) {
+ // 鎼滅储鏃堕噸缃暟鎹�
+ search() {
+ this.resetData();
+ },
+
+ // 閲嶇疆鏁版嵁鍒板垵濮嬬姸鎬�
+ resetData() {
this.pageNo = 1;
+ this.allReceivingOrders = [];
+ this.hasMore = true;
+ this.status = "more";
this.getData();
},
+
groupClick() {
-
+ // 鐐瑰嚮浜嬩欢澶勭悊
},
+
+ // 鑾峰彇鏁版嵁
getData() {
- var postData = {
+ if (this.isLoading || !this.hasMore) return;
+
+ this.isLoading = true;
+ this.status = "loading";
+
+ const postData = {
MainData: {
orderNo: this.searchValue,
pageNo: this.pageNo,
+ // 鍚庣鍥哄畾姣忛〉5鏉★紝杩欓噷鍙互涓嶄紶閫抪ageSize锛屼繚鎸佷笌鍚庣涓�鑷�
warehouseId: this.warehouseId,
},
}
- this.$u.post('/api/TakeStockOrder/GetTakeStockOrders', postData).then((res) => {
- if (res.status) {
- if (res.data.length > 0) {
- if (this.searchValue == '') {
- this.allReceivingOrders =res.data.map(i => ({
- ...i,
- takeStockStatus: TakeStockStatus.find(item => item.value == i
- .takeStockStatus).label
- }))
- // this.allReceivingOrders = res.data;
- if (this.allReceivingOrders.length > 3) {
- this.loadVisible = true;
+
+ this.$u.post('/api/TakeStockOrder/GetTakeStockOrders', postData)
+ .then((res) => {
+ this.isLoading = false;
+
+ if (res.status) {
+ const processedData = res.data.map(item => ({
+ ...item,
+ takeStockStatus: TakeStockStatus.find(status => status.value === item.takeStockStatus)?.label || ''
+ }));
+
+ if (processedData.length > 0) {
+ if (this.pageNo === 1) {
+ this.allReceivingOrders = processedData;
} else {
- this.loadVisible = false;
+ this.allReceivingOrders = [...this.allReceivingOrders, ...processedData];
}
+
+ // 鍏抽敭淇锛氭牴鎹悗绔疄闄呰繑鍥炴暟閲忓垽鏂槸鍚﹁繕鏈夋洿澶�
+ // 鍚庣鍥哄畾姣忛〉5鏉★紝鎵�浠ュ綋杩斿洖5鏉℃椂璇存槑鍙兘杩樻湁鏇村锛屽皯浜�5鏉″垯璇存槑娌℃湁鏇村
+ this.hasMore = processedData.length === this.pageSize;
+ this.status = this.hasMore ? "more" : "noMore";
} else {
- // this.allReceivingOrders = res.data;
- if (postData.MainData.pageNo == 1) {
+ if (this.pageNo === 1) {
this.allReceivingOrders = [];
}
- this.allReceivingOrders =res.data.map(i => ({
- ...i,
- takeStockStatus: TakeStockStatus.find(item => item.value == i
- .takeStockStatus).label
- }))
- if (this.allReceivingOrders.length > 3) {
- this.loadVisible = true;
- } else {
- this.loadVisible = false;
- }
+ this.hasMore = false;
+ this.status = "noMore";
}
} else {
- this.status = 'noMore';
- //this.allReceivingOrders = [];
- this.loadVisible = true;
+ this.status = this.pageNo > 1 ? "more" : "noMore";
+ this.$u.toast('鏁版嵁鍔犺浇澶辫触锛岃閲嶈瘯');
}
-
- }
- })
+ })
+ .catch(() => {
+ this.isLoading = false;
+ this.status = this.pageNo > 1 ? "more" : "noMore";
+ this.$u.toast('缃戠粶閿欒锛岃妫�鏌ョ綉缁�');
+ });
}
}
}
</script>
<style lang="scss">
+ /* 鏍峰紡淇濇寔涓嶅彉 */
@import '@/common/uni-ui.scss';
page {
--
Gitblit v1.9.3