From 11a5fb245177328f1899a9c89ec983354356168c Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期四, 26 二月 2026 14:36:56 +0800
Subject: [PATCH] 1
---
/dev/null | 40 ----------
.gitignore | 2
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/BasicInfo/InitializationLocationDTO.cs | 43 ++++++++++
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/IKLSLocationInfoService.cs | 10 ++
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_StationManger.cs | 12 +-
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskExtend.cs | 1
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WIDESEAWCS_DTO.csproj | 4 -
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/KLSLocationInfoService.cs | 59 ++++++++++++++
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/BasicInfo/KLSLocationInfoController.cs | 15 +++
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs | 1
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs | 30 ++++++-
11 files changed, 160 insertions(+), 57 deletions(-)
diff --git a/.gitignore b/.gitignore
index d945873..01a233d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -260,3 +260,5 @@
*.2
/浠g爜绠$悊/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/config/applicationhost.config
+/浠g爜绠$悊/WCS/WIDESEAWCS_Client/package.json
+/浠g爜绠$悊/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/package.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/package.json"
deleted file mode 100644
index 977418b..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Client/package.json"
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "name": "wideseawcs",
- "version": "0.1.0",
- "private": true,
- "scripts": {
- "serve": "vue-cli-service serve",
- "build": "vue-cli-service build",
- "test:unit": "vue-cli-service test:unit",
- "lint": "vue-cli-service lint"
- },
- "dependencies": {
- "@element-plus/icons-vue": "^2.1.0",
- "@microsoft/signalr": "^6.0.4",
- "ali-oss": "^6.17.1",
- "axios": "^0.21.1",
- "core-js": "^3.6.5",
- "echarts": "^5.0.2",
- "element-plus": "^2.2.14",
- "less": "^4.1.1",
- "vue": "^3.2.37",
- "vue-draggable-next": "^2.0.1",
- "vue-router": "^4.0.0-0",
- "vuex": "^4.0.0-0",
- "wangeditor": "^4.7.6"
- },
- "devDependencies": {
- "@babel/plugin-syntax-dynamic-import": "^7.8.3",
- "@vue/cli-plugin-babel": "~4.5.0",
- "@vue/cli-plugin-eslint": "~4.5.0",
- "@vue/cli-plugin-router": "~4.5.0",
- "@vue/cli-plugin-unit-mocha": "~4.5.0",
- "@vue/cli-plugin-vuex": "~4.5.0",
- "@vue/cli-service": "~4.5.0",
- "@vue/compiler-sfc": "^3.0.0",
- "@vue/test-utils": "^2.0.0-0",
- "babel-eslint": "^10.1.0",
- "chai": "^4.1.2",
- "cross-env": "^7.0.3",
- "less": "^4.1.1",
- "less-loader": "^7.3.0",
- "stylus": "^0.54.7",
- "stylus-loader": "^3.0.2"
- },
- "eslintConfig": {
- "root": true,
- "env": {
- "node": true
- },
- "extends": [
- "plugin:vue/essential",
- "@vue/standard"
- ],
- "rules": {
- "indent": [
- 1,
- 4
- ]
- },
- "parserOptions": {
- "parser": "babel-eslint"
- }
- },
- "eslintIgnore": [
- "*"
- ]
-}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/KLSLocationInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/KLSLocationInfoService.cs"
index ba9b8bd..8db1ac2 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/KLSLocationInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_BasicInfoService/KLSLocationInfoService.cs"
@@ -1,10 +1,16 @@
-锘縰sing System;
+锘縰sing OfficeOpenXml.FormulaParsing.Excel.Functions.Text;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using WIDESEA_DTO.Basic;
+using WIDESEAWCS_Common.LocationEnum;
+using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseRepository;
using WIDESEAWCS_Core.BaseServices;
+using WIDESEAWCS_Core.Helper;
+using WIDESEAWCS_Core.Utilities;
using WIDESEAWCS_IBasicInfoService;
using WIDESEAWCS_Model.Models;
@@ -17,5 +23,56 @@
}
public IRepository<Dt_KLSLocationInfo> Repository => BaseDal;
+ /// <summary>
+ /// 鑾峰彇鍙敤绌鸿揣浣�
+ /// </summary>
+ /// <param name="AreaCode"></param>
+ /// <param name="containerType"></param>
+ /// <returns></returns>
+ public Dt_KLSLocationInfo GetFreeLocationInfo(string AreaCode, int containerType)
+ {
+ Dt_KLSLocationInfo? kLSLocationInfo = BaseDal.QueryFirst(x => x.WarehouseId.ToString() == AreaCode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == containerType);
+ return kLSLocationInfo;
+ }
+
+ public WebResponseContent InitializationLocation(InitializationLocationDTO initializationLocationDTO)
+ {
+ try
+ {
+ (bool, string, object?) result = ModelValidate.ValidateModelData(initializationLocationDTO);
+ if (!result.Item1) return WebResponseContent.Instance.Error(result.Item2);
+
+ List<Dt_KLSLocationInfo> locationInfos = new List<Dt_KLSLocationInfo>();
+ for (int i = 9; i < initializationLocationDTO.MaxRow; i++)
+ {
+ for (int j = 0; j < initializationLocationDTO.MaxColumn; j++)
+ {
+ for (int k = 0; k < initializationLocationDTO.MaxLayer; k++)
+ {
+ Dt_KLSLocationInfo locationInfo = new Dt_KLSLocationInfo()
+ {
+ Column = j + 1,
+ EnableStatus = EnableStatusEnum.Normal.ObjToInt(),
+ Layer = k + 1,
+ LocationStatus = LocationStatusEnum.Free.ObjToInt(),
+ RoadwayNo = $"{initializationLocationDTO.Roadway}",
+ Row = i + 1,
+ LocationType = LocationTypeEnum.SmallPallet.ObjToInt(),
+ Depth = initializationLocationDTO.Depth,
+ };
+ locationInfo.LocationCode = $"{locationInfo.Row.ToString().PadLeft(3, '0')}-{locationInfo.Column.ToString().PadLeft(3, '0')}-{locationInfo.Layer.ToString().PadLeft(3, '0')}";
+ locationInfo.LocationName = $"{locationInfo.Row.ToString().PadLeft(3, '0')}琛寋locationInfo.Column.ToString().PadLeft(3, '0')}鍒梴locationInfo.Layer.ToString().PadLeft(3, '0')}灞�";
+ locationInfos.Add(locationInfo);
+ }
+ }
+ }
+ BaseDal.AddData(locationInfos);
+ 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/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/BasicInfo/InitializationLocationDTO.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/BasicInfo/InitializationLocationDTO.cs"
new file mode 100644
index 0000000..52a8893
--- /dev/null
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/BasicInfo/InitializationLocationDTO.cs"
@@ -0,0 +1,43 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WIDESEAWCS_Core.Attributes;
+
+namespace WIDESEA_DTO.Basic
+{
+ [ModelValidate]
+ public class InitializationLocationDTO
+ {
+ /// <summary>
+ /// 宸烽亾鍙�
+ /// </summary>
+ [PropertyValidate("宸烽亾鍙�", NotNullAndEmpty = true)]
+ public string Roadway { get; set; }
+
+ /// <summary>
+ /// 琛�
+ /// </summary>
+ [PropertyValidate("琛�", MinValue = 1, IsContainMinValue = false)]
+ public int MaxRow { get; set; }
+
+ /// <summary>
+ /// 鍒�
+ /// </summary>
+ [PropertyValidate("鍒�", MinValue = 1, IsContainMinValue = false)]
+ public int MaxColumn { get; set; }
+
+ /// <summary>
+ /// 灞�
+ /// </summary>
+ [PropertyValidate("灞�", MinValue = 1, IsContainMinValue = false)]
+ public int MaxLayer { get; set; }
+
+ /// <summary>
+ /// 鏄惁鍗曟繁璐т綅
+ /// </summary>
+ [PropertyValidate("娣卞害", MinValue = 1, NotNullAndEmpty = true, IsContainMinValue = true)]
+ public int Depth { get; set; }
+ }
+}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WIDESEAWCS_DTO.csproj" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WIDESEAWCS_DTO.csproj"
index 530c11b..ff3df55 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WIDESEAWCS_DTO.csproj"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_DTO/WIDESEAWCS_DTO.csproj"
@@ -10,8 +10,4 @@
<ProjectReference Include="..\WIDESEAWCS_Model\WIDESEAWCS_Model.csproj" />
</ItemGroup>
- <ItemGroup>
- <Folder Include="BasicInfo\" />
- </ItemGroup>
-
</Project>
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/IKLSLocationInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/IKLSLocationInfoService.cs"
index 35f5838..ef10a16 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/IKLSLocationInfoService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_IBasicInfoService/IKLSLocationInfoService.cs"
@@ -3,6 +3,8 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using WIDESEA_DTO.Basic;
+using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseRepository;
using WIDESEAWCS_Core.BaseServices;
using WIDESEAWCS_Model.Models;
@@ -12,5 +14,13 @@
public interface IKLSLocationInfoService : IService<Dt_KLSLocationInfo>
{
public IRepository<Dt_KLSLocationInfo> Repository { get; }
+
+ WebResponseContent InitializationLocation(InitializationLocationDTO initializationLocationDTO);
+ /// <summary>
+ /// 鑾峰彇鍙敤绌鸿揣浣�
+ /// </summary>
+ /// <param name="AreaCode"></param>
+ /// <returns></returns>
+ Dt_KLSLocationInfo GetFreeLocationInfo(string AreaCode, int containerType);
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_StationManger.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_StationManger.cs"
index a95e2d6..a5488dd 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_StationManger.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Model/Models/BasicInfo/Dt_StationManger.cs"
@@ -39,10 +39,10 @@
public int StationType { get; set; }
/// <summary>
- /// 瀵瑰簲鍫嗗灈鏈烘帓-鍒�-灞�
+ /// 瀵瑰簲鍥涘悜杞︾偣ID
/// </summary>
- [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "瀵瑰簲鍫嗗灈鏈烘帓-鍒�-灞�")]
- public string StackerCraneStationCode { get; set; }
+ [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "瀵瑰簲鍥涘悜杞︾偣ID")]
+ public string RGVStationCode { get; set; }
/// <summary>
/// 绔欏彴璁惧缂栧彿
@@ -51,10 +51,10 @@
public string StationDeviceCode { get; set; }
/// <summary>
- /// 鍫嗗灈鏈虹紪鍙�
+ /// RGV缂栧彿
/// </summary>
- [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "鍫嗗灈鏈虹紪鍙�")]
- public string StackerCraneCode { get; set; }
+ [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "RGV缂栧彿")]
+ public string RGVCode { get; set; }
/// <summary>
/// AGV绔欏彴缂栧彿
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/BasicInfo/KLSLocationInfoController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/BasicInfo/KLSLocationInfoController.cs"
index 865a150..3f29a77 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/BasicInfo/KLSLocationInfoController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/BasicInfo/KLSLocationInfoController.cs"
@@ -1,4 +1,7 @@
-锘縰sing Microsoft.AspNetCore.Mvc;
+锘縰sing Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Mvc;
+using WIDESEA_DTO.Basic;
+using WIDESEAWCS_Core;
using WIDESEAWCS_Core.BaseController;
using WIDESEAWCS_IBasicInfoService;
using WIDESEAWCS_Model.Models;
@@ -16,5 +19,15 @@
{
}
+ /// <summary>
+ /// 鍒濆鍖栬揣浣�
+ /// </summary>
+ /// <param name="initializationLocationDTO"></param>
+ /// <returns></returns>
+ [HttpPost, Route("InitializationLocation"), AllowAnonymous]
+ public WebResponseContent InitializationLocation([FromBody] InitializationLocationDTO initializationLocationDTO)
+ {
+ return Service.InitializationLocation(initializationLocationDTO);
+ }
}
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs"
index 284ff52..25ee068 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/WMS/WMSController.cs"
@@ -118,6 +118,7 @@
/// </summary>
/// <param name="AreaCode">鍖哄煙鍙�</param>
/// <returns></returns>
+ [HttpPost, Route("LocationInquiry"), AllowAnonymous]
public object LocationInquiry(string AreaCode)
{
WebResponseContent content = _taskService.LocationInquiry(AreaCode);
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json"
deleted file mode 100644
index b1876d4..0000000
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json"
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "urls": "http://*:9291", //web鏈嶅姟绔彛锛屽鏋滅敤IIS閮ㄧ讲锛屾妸杩欎釜鍘绘帀
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft.AspNetCore": "Warning"
- }
- },
- "dics": "deviceType,devicePlcType,jobAssembly,jobClassName,deviceStatus,taskType,taskState,inOutType",
- "AllowedHosts": "*",
- "ConnectionStringsEncryption": false,
- "MainDB": "DB_WIDESEA", //褰撳墠椤圭洰鐨勪富搴擄紝鎵�瀵瑰簲鐨勮繛鎺ュ瓧绗︿覆鐨凟nabled蹇呴』涓簍rue
- //1.MySql
- //2.SqlServer
- //3.Sqlite
- //4.Oracle
- //5.PostgreSQL
- "DBType": "SqlServer",
- //杩炴帴瀛楃涓�
- "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWCS_GP;User ID=sa;Password=123456;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"
- },
- "ApiLogIgnore": "", //璁板綍鏃ュ織鏃讹紝蹇界暐鐨凙PI鍚嶇О锛屽涓敤閫楀彿鍒嗛殧锛岄厤缃殑涓嶈褰曞埌鏁版嵁搴撲腑
- "ApiName": "WIDESEAWCS",
- "ExpMinutes": 120,
- "QuartzJobAutoStart": true,
- "DBSeedEnable": false,
- "QuartzDBSeedEnable": false,
- "LogDeubgEnable": true, //鏄惁璁板綍璋冭瘯鏃ュ織
- "PrintSql": false, //鎵撳嵃SQL璇彞
- "LogAOPEnable": true, //鏄惁璁板綍AOP鏃ュ織
- "WebSocketEnable": true, //鏄惁寮�鍚疻ebSocket鏈嶅姟
- "WebSocketPort": 9296 //WebSocket鏈嶅姟绔彛
-}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs"
index b5a59b2..b5c2829 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/KLSTaskMethods.cs"
@@ -27,13 +27,12 @@
{
int containerType = taskDTO.containerCode.Contains("LLM") ? LocationTypeEnum.LargePallet.ObjToInt() : LocationTypeEnum.SmallPallet.ObjToInt();
//鑾峰彇璐т綅淇℃伅
- Dt_KLSLocationInfo? kLSLocationInfo = _kLSLocationInfoService.Repository.QueryFirst(x => x.WarehouseId.ToString() == taskDTO.toAreaCode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.LocationType == containerType);
- if (kLSLocationInfo == null) throw new Exception($"鏈壘鍒扮粓鐐瑰簱鍖恒�恵taskDTO.toAreaCode}銆戝彲鐢ㄧ┖璐т綅锛�");
- Dt_Task dt_Task = new Dt_Task()
+ Dt_KLSLocationInfo? kLSLocationInfo = _kLSLocationInfoService.GetFreeLocationInfo(taskDTO.toAreaCode, containerType) ?? throw new Exception($"鏈壘鍒扮粓鐐瑰簱鍖恒�恵taskDTO.toAreaCode}銆戝彲鐢ㄧ┖璐т綅锛�");
+ Dt_Task dt_Task = new()
{
TaskNum = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
WMSTaskNum = taskDTO.taskCode,
- WMSId = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
+ //WMSId = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
Grade = taskDTO.taskPriority,
PalletCode = taskDTO.containerCode,
Roadway = kLSLocationInfo.RoadwayNo,
@@ -113,8 +112,29 @@
{
try
{
+ List<Dt_RGVLocationInfo>? rGVLocationInfos = _rGVLocationInfoService.Repository.QueryData(x => x.WarehouseId.ToString() == taskDTO.toAreaCode && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt() && x.LocationStatus == LocationStatusEnum.Free.ObjToInt());
+ if (rGVLocationInfos.Count < 1) throw new Exception($"鏈壘鍒扮粓鐐瑰簱鍖恒�恵taskDTO.toAreaCode}銆戝彲鐢ㄧ┖璐т綅锛�");
+ var rGVLocationInfo = rGVLocationInfos.OrderBy(x => x.Depth).First();
+ Dt_Task dt_Task = new Dt_Task()
+ {
+ TaskNum = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
+ WMSTaskNum = taskDTO.taskCode,
+ WMSId = GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
+ Grade = taskDTO.taskPriority,
+ PalletCode = taskDTO.containerCode,
+ Roadway = rGVLocationInfo.RoadwayNo,
+ TaskState = TaskStatusEnum.New.ObjToInt(),
+ TaskType = taskType,
+ SourceAddress = taskDTO.fromLocationCode,
+ CurrentAddress = taskDTO.fromLocationCode,
+ NextAddress = rGVLocationInfo.LocationCode,//鎵惧叆搴撶珯鍙板搴旂殑澶栧舰妫�娴嬬紪鍙�
+ TargetAddress = rGVLocationInfo.LocationCode,
+ Creater = "WMS",
+ };
+ rGVLocationInfo.LocationStatus = LocationStatusEnum.InLock.ObjToInt();
Db.Ado.BeginTran();
-
+ BaseDal.AddData(dt_Task);
+ _rGVLocationInfoService.Repository.UpdateData(rGVLocationInfo);
Db.Ado.CommitTran();
return WebResponseContent.Instance.OK();
}
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskExtend.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskExtend.cs"
index eb767fa..ab1a799 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskExtend.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/Task/TaskExtend.cs"
@@ -63,6 +63,7 @@
{
gALAXISTaskInfo.groupId = DateTime.Now.ToString("yyMMddHHmmss");
gALAXISTaskInfo.msgTime = DateTime.Now.ToString();
+ gALAXISTaskInfo.tasks = new List<GALAXISTask>();
foreach (var task in tasks)
{
GALAXISTask gALAXISTask = new GALAXISTask()
--
Gitblit v1.9.3