From 1db1c64dc628d2053617ba2c3cc78fb94b518d2c Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期一, 27 二月 2023 08:57:55 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/PublicPageMethodController.cs |  222 +++++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 190 insertions(+), 32 deletions(-)

diff --git a/WebAPI/Controllers/PublicPageMethodController.cs b/WebAPI/Controllers/PublicPageMethodController.cs
index 9f9d590..b6f02c4 100644
--- a/WebAPI/Controllers/PublicPageMethodController.cs
+++ b/WebAPI/Controllers/PublicPageMethodController.cs
@@ -34,7 +34,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
+                    objJsonResult.Message = "褰撳墠缁勭粐鏁版嵁鏈淮鎶わ紒";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -108,7 +108,7 @@
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
-                objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
+                objJsonResult.Message = "褰撳墠缁勭粐鏁版嵁鏈淮鎶わ紒";
                 objJsonResult.data = null;
                 return objJsonResult;
             }
@@ -140,7 +140,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
+                    objJsonResult.Message = "褰撳墠缁勭粐鏁版嵁鏈淮鎶わ紒";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -214,7 +214,7 @@
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
-                objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
+                objJsonResult.Message = "褰撳墠缁勭粐鏁版嵁鏈淮鎶わ紒";
                 objJsonResult.data = null;
                 return objJsonResult;
             }
@@ -245,7 +245,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
+                    objJsonResult.Message = "褰撳墠缁勭粐鏁版嵁鏈淮鎶わ紒";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -319,7 +319,7 @@
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
-                objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
+                objJsonResult.Message = "褰撳墠缁勭粐鏁版嵁鏈淮鎶わ紒";
                 objJsonResult.data = null;
                 return objJsonResult;
             }
@@ -350,7 +350,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
+                    objJsonResult.Message = "褰撳墠缁勭粐鏁版嵁鏈淮鎶わ紒";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -424,7 +424,7 @@
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
-                objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
+                objJsonResult.Message = "褰撳墠缁勭粐鏁版嵁鏈淮鎶わ紒";
                 objJsonResult.data = null;
                 return objJsonResult;
             }
@@ -455,7 +455,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
+                    objJsonResult.Message = "褰撳墠缁勭粐鏁版嵁鏈淮鎶わ紒";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -529,7 +529,7 @@
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
-                objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
+                objJsonResult.Message = "褰撳墠缁勭粐鏁版嵁鏈淮鎶わ紒";
                 objJsonResult.data = null;
                 return objJsonResult;
             }
@@ -770,7 +770,7 @@
             {
                 if (sWhere == null || sWhere.Equals(""))
                 {
-                    ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName,HModel from h_v_Gy_Mould Order by HNumber", "h_v_Gy_Mould");
+                    ds = oCN.RunProcReturn("Select HItemID,HParentID,HNumber,HName,HModel,HDesignLife,HUseLife,HLeaveLife from h_v_Gy_Mould Order by HNumber", "h_v_Gy_Mould");
                 }
                 else
                 {
@@ -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]
@@ -1919,6 +1961,33 @@
         }
         #endregion
 
+        #region 鑾峰彇鍏ㄩ儴鐗╂枡淇℃伅
+        [Route("PublicPageMethod/MaterialList")]
+        [HttpGet]
+        public object MaterialList(string sWhere)
+        {
+            try
+            {
+                ds = oCN.RunProcReturn("select * from h_v_KF_ICInventoryList_IF" + sWhere , "h_v_KF_ICInventoryList_IF");
+
+                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/PartCX")]
         [HttpGet]
@@ -2001,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");
                 }
@@ -2119,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)
             {
@@ -2228,7 +2287,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
+                    objJsonResult.Message = "褰撳墠缁勭粐鏁版嵁鏈淮鎶わ紒";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -2302,7 +2361,7 @@
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
-                objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
+                objJsonResult.Message = "褰撳墠缁勭粐鏁版嵁鏈淮鎶わ紒";
                 objJsonResult.data = null;
                 return objJsonResult;
             }
@@ -2333,7 +2392,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
+                    objJsonResult.Message = "褰撳墠缁勭粐鏁版嵁鏈淮鎶わ紒";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -2438,7 +2497,7 @@
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "鏃犺缁勭粐鐨勭敤鎴锋暟鎹紒";
+                    objJsonResult.Message = "褰撳墠缁勭粐鏁版嵁鏈淮鎶わ紒";
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
@@ -3528,5 +3587,104 @@
 
         #endregion
 
+
+        #region 鐢ㄦ埛绌挎妗嗘煡璇㈠垪琛�
+        [Route("PublicPageMethod/PeopleTransFerList")]
+        [HttpGet]
+        public object PeopleTransFerList()
+        {
+            try
+            {
+
+                ds = oCN.RunProcReturn("Select czybm value,czymc title from h_v_Gy_UserList Order by czybm ", "h_v_Gy_UserList");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犵敤鎴锋暟鎹紒";
+                    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 鑾峰彇鏍哥畻鏂瑰紡鍒楄〃
+        /// <summary>
+        /// 鑾峰彇鏍哥畻鏂瑰紡鍒楄〃
+        /// </summary>
+        /// <returns></returns>
+        [Route("PublicPageMethod/GetClassTimePrjList_Json")]
+        [HttpGet]
+        public object GetClassTimePrjList_Json(string Gy_ClassTimePrj)
+        {
+            string sWhere = "";
+            //sWhere = " Where HStopFlag=0  and HEndFlag=1";
+            //sWhere = " Where HStopFlag=0  and HEndFlag=1  and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString();
+            if (Gy_ClassTimePrj != "")
+            {
+                sWhere = sWhere + " and ( HNumber like '%" + Gy_ClassTimePrj + "%' or HName like '%" + Gy_ClassTimePrj + "%' ) ";
+            }
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("Select HItemID,HNumber ,HName  from Gy_ClassTimePrjGroup where HStopflag=0 Order by HItemID ", "Gy_ClassTimePrjGroup");
+                }
+                else
+                {
+                    string sql1 = "Select HItemID,HNumber ,HName  from Gy_ClassTimePrjGroup where HStopflag=0  ";
+                    string sql = sql1 + sWhere;
+                    ds = oCN.RunProcReturn(sql, "Gy_ClassTimePrjGroup");
+                }
+
+                //ds = webserver.GetUnitList(sWhere, ref DBUtility.ClsPub.sErrInfo);
+
+
+                if (ds == null || ds.Tables[0].Rows.Count <= 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鑾峰彇鎴愬姛";
+                    objJsonResult.data = ds.Tables[0];
+                    return objJsonResult;
+                }
+            }
+            catch (Exception ex)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鑾峰彇澶辫触" + ex.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
     }
 }

--
Gitblit v1.9.1