yangle
2023-05-06 a7d17c8ecf0076d00e1199cfc5ea8e7d44749ac6
WebAPI/Controllers/PublicPageMethodController.cs
@@ -1481,6 +1481,48 @@
        }
        #endregion
        #region 出库申请单查询列表
        [Route("OtherOutRequestBillList/CX")]
        [HttpGet]
        public object CX(string sWhere)
        {
            try
            {
                    string sql1 = "Select * from AIS20220914133941..T_STK_OUTSTOCKAPPLY where fdocumentstatus = 'C' and FCloseStatus = 'A'";
                   string sql2 = "order by Fdate asc";
                 string sql = sql1 + sWhere + sql2;
                    ds = oCN.RunProcReturn(sql, "T_STK_OUTSTOCKAPPLY");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "false!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region  根据树型id查找设备列表   
        [Route("Gy_MaintenanceMode/EqpCX")]
        [HttpGet]
@@ -2028,7 +2070,7 @@
                }
                else
                {
                    string sql1 = "Select HItemID,HParentID,HNumber,HName from h_v_IF_Unit ";
                    string sql1 = "Select HItemID,HParentID,HNumber,HName from h_v_IF_Unit  ";
                    string sql = sql1 + sWhere;
                    ds = oCN.RunProcReturn(sql, "h_v_IF_Unit");
                }
@@ -2146,22 +2188,12 @@
                    string sql = sql1 + sWhere;
                    ds = oCN.RunProcReturn(sql, "Gy_Property");
                }
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "false!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "Sucess!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
            }
            catch (Exception e)
            {
@@ -3654,5 +3686,41 @@
        }
        #endregion
        #region 选择工序基础资料
        [Route("PublicPageMethod/ProcessList")]
        [HttpGet]
        public object ProcessList(string sWhere)
        {
            try
            {
                ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName from Gy_Process " + sWhere + " Order by HItemID", "Gy_Process");
                //if (ds == null || ds.Tables[0].Rows.Count == 0)
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "false!";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                //else
                //{
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[0];
                return objJsonResult;
                //}
            }
            catch (Exception e)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
}