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