From 148f50e4053fe3cfc319561c64cf8c6f110915e0 Mon Sep 17 00:00:00 2001 From: lenovo Date: Sun, 27 Apr 2025 15:15:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=A5=E5=BA=93=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E8=BF=9C=E4=BC=B8=E8=B4=A7=E4=BD=8D=E6=98=AF?= =?UTF-8?q?=E7=89=A9=E6=96=99=EF=BC=8C=E7=94=B3=E8=AF=B7=E7=A9=BA=E6=89=98?= =?UTF-8?q?=E7=9B=98=E5=9E=9B=E5=85=A5=E5=BA=93=E5=85=81=E8=AE=B8=E6=94=BE?= =?UTF-8?q?=E5=9C=A8=E8=BF=91=E7=AB=AF=E8=B4=A7=E4=BD=8D=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=87=BA=E5=BA=93=E5=80=92=E5=BA=93bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SiaSun.LMS.Implement/Control/ControlBase.cs | 1 - SiaSun.LMS.Implement/Manage/ManageOut.cs | 33 ++++++++++++++++--- SiaSun.LMS.Implement/S_CellService.cs | 23 ++++++++++--- SiaSun.LMS.WCFHost/HouseMap.config | 2 +- SiaSun.LMS.WCFHost/SiaSun.LMS.WCFHost.csproj | 2 +- .../@Files/Default/FieldDescription.xml | 1 + .../SiaSun.LMS.WPFClient.csproj | 2 +- 7 files changed, 51 insertions(+), 13 deletions(-) diff --git a/SiaSun.LMS.Implement/Control/ControlBase.cs b/SiaSun.LMS.Implement/Control/ControlBase.cs index 27b1e0c..d6ac6ee 100644 --- a/SiaSun.LMS.Implement/Control/ControlBase.cs +++ b/SiaSun.LMS.Implement/Control/ControlBase.cs @@ -98,7 +98,6 @@ namespace SiaSun.LMS.Implement bool bResult = true; sResult = string.Empty; string mesout = string.Empty; - IList lsIO_CONTROL_APPLY = this._P_IO_CONTROL_APPLY.GetList(0); foreach (SiaSun.LMS.Model.IO_CONTROL_APPLY mIO_CONTROL_APPLY in lsIO_CONTROL_APPLY) diff --git a/SiaSun.LMS.Implement/Manage/ManageOut.cs b/SiaSun.LMS.Implement/Manage/ManageOut.cs index be639c6..5ccd86d 100644 --- a/SiaSun.LMS.Implement/Manage/ManageOut.cs +++ b/SiaSun.LMS.Implement/Manage/ManageOut.cs @@ -1326,18 +1326,41 @@ namespace SiaSun.LMS.Implement ORDER BY cell_y ASC, cell_x,cell_z", mWH_CELL.DEVICE_CODE, CellHeight)); if (ManageMoveCellNormal.Rows.Count == 0) { + ManageMoveCellDouble = this.GetList(string.Format(@"select * from V_WH_CELL_DOUBLE_TO_NORMAL where cell_model ='{1}' and cell_status = 'Nohave' and device_code = '{0}' and run_status = 'Enable' and cell_status_near = 'Nohave' and run_status_near = 'Enable' ORDER BY cell_y ASC, cell_x,cell_z", mWH_CELL.DEVICE_CODE, CellHeight)); - rangeAry = new int[ManageMoveCellDouble.Rows.Count]; - for (int i = 0; i < ManageMoveCellDouble.Rows.Count; i++) + if (ManageMoveCellDouble.Rows.Count ==0) { - range = Math.Abs(mWH_CELL.CELL_X - Convert.ToInt32(ManageMoveCellDouble.Rows[i]["CELL_X"])) + Math.Abs(mWH_CELL.CELL_Y - Convert.ToInt32(ManageMoveCellDouble.Rows[i]["CELL_Y"])); - rangeAry[i] = range; + ManageMoveCellNormal = this.GetList(string.Format(@"select *from V_WH_CELL_DOUBLE_TO_NORMAL + where cell_model ='{1}' and cell_status ='Full' and run_status in ('Enable','Disable') + and device_code = '{0}' and cell_status_near = 'Nohave' and run_status_near = 'Enable' + ORDER BY cell_y ASC, cell_x,cell_z", mWH_CELL.DEVICE_CODE, CellHeight)); + if (ManageMoveCellNormal.Rows.Count > 0) + { + rangeAry = new int[ManageMoveCellNormal.Rows.Count]; + for (int i = 0; i < ManageMoveCellNormal.Rows.Count; i++) + { + range = Math.Abs(mWH_CELL.CELL_X - Convert.ToInt32(ManageMoveCellNormal.Rows[i]["CELL_X_NEAR"])) + Math.Abs(mWH_CELL.CELL_Y - Convert.ToInt32(ManageMoveCellNormal.Rows[i]["CELL_Y_NEAR"])); + rangeAry[i] = range; + } + rangemin = SiaSun.LMS.Common.StringUtil.CheckMin(rangeAry); + } } - rangemin = SiaSun.LMS.Common.StringUtil.CheckMin(rangeAry); + else + { + rangeAry = new int[ManageMoveCellDouble.Rows.Count]; + + for (int i = 0; i < ManageMoveCellDouble.Rows.Count; i++) + { + range = Math.Abs(mWH_CELL.CELL_X - Convert.ToInt32(ManageMoveCellDouble.Rows[i]["CELL_X"])) + Math.Abs(mWH_CELL.CELL_Y - Convert.ToInt32(ManageMoveCellDouble.Rows[i]["CELL_Y"])); + rangeAry[i] = range; + } + rangemin = SiaSun.LMS.Common.StringUtil.CheckMin(rangeAry); + } + } else { diff --git a/SiaSun.LMS.Implement/S_CellService.cs b/SiaSun.LMS.Implement/S_CellService.cs index f5bd950..4048fcc 100644 --- a/SiaSun.LMS.Implement/S_CellService.cs +++ b/SiaSun.LMS.Implement/S_CellService.cs @@ -877,10 +877,25 @@ namespace SiaSun.LMS.Implement dtCELL = this.GetList(strSQL); if (dtCELL.Rows.Count == 0) { - bResult = false; - sResult = "当前双申巷道空货位货位不足,请查看!"; - END_CELL_ID = 0; - return bResult; + strSQL = string.Format(@"SELECT top 1 * FROM V_WH_CELL_DOUBLE_TO_NORMAL WHERE RUN_STATUS = 'Enable' AND CELL_STATUS = 'Full' + AND RUN_STATUS_NEAR = 'Enable' AND CELL_STATUS_NEAR ='Nohave' AND DEVICE_CODE = {0} + ORDER BY {1}CELL_Y,CELL_X", DEVICE_CODE, sOrderSQL); + dtCELL = this.GetList(strSQL); + if (dtCELL.Rows.Count == 0) + { + bResult = false; + sResult = "当前双申巷道空货位货位不足,请查看!"; + END_CELL_ID = 0; + return bResult; + } + else + { + END_CELL_ID = Convert.ToInt32(dtCELL.Rows[0]["CELL_ID_NEAR"].ToString()); + SiaSun.LMS.Model.WH_CELL mEND_WH_CELL = this._P_WH_CELL.GetModel(END_CELL_ID); + mEND_WH_CELL.RUN_STATUS = Enum.RUN_STATUS.Selected.ToString(); + this._P_WH_CELL.Update(mEND_WH_CELL); + return true; + } } else { diff --git a/SiaSun.LMS.WCFHost/HouseMap.config b/SiaSun.LMS.WCFHost/HouseMap.config index 72e9495..10c3664 100644 --- a/SiaSun.LMS.WCFHost/HouseMap.config +++ b/SiaSun.LMS.WCFHost/HouseMap.config @@ -8,7 +8,7 @@ - + diff --git a/SiaSun.LMS.WCFHost/SiaSun.LMS.WCFHost.csproj b/SiaSun.LMS.WCFHost/SiaSun.LMS.WCFHost.csproj index e89103d..46b5320 100644 --- a/SiaSun.LMS.WCFHost/SiaSun.LMS.WCFHost.csproj +++ b/SiaSun.LMS.WCFHost/SiaSun.LMS.WCFHost.csproj @@ -65,7 +65,7 @@ LocalIntranet - true + false Properties\app.manifest diff --git a/SiaSun.LMS.WPFClient/@Files/Default/FieldDescription.xml b/SiaSun.LMS.WPFClient/@Files/Default/FieldDescription.xml index 6403193..87efb75 100644 --- a/SiaSun.LMS.WPFClient/@Files/Default/FieldDescription.xml +++ b/SiaSun.LMS.WPFClient/@Files/Default/FieldDescription.xml @@ -249,6 +249,7 @@ + diff --git a/SiaSun.LMS.WPFClient/SiaSun.LMS.WPFClient.csproj b/SiaSun.LMS.WPFClient/SiaSun.LMS.WPFClient.csproj index 652c3a8..1968da4 100644 --- a/SiaSun.LMS.WPFClient/SiaSun.LMS.WPFClient.csproj +++ b/SiaSun.LMS.WPFClient/SiaSun.LMS.WPFClient.csproj @@ -77,7 +77,7 @@ SiaSun.LMS.WPFClient_TemporaryKey.pfx - true + false false