From 7ac9fbc33ef8454f4472c79bc37c183642fb7048 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期四, 07 三月 2024 10:29:56 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/WebAPIController.cs |  118 +++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 110 insertions(+), 8 deletions(-)

diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index 0acb9b9..b23cf09 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -8109,14 +8109,34 @@
                     return objJsonResult;
                 }
                 oCN.BeginTran();//寮�濮嬩簨鍔�
+                
                 ds = oCN.RunProcReturn("select * from Gy_ProjectMoney where HItemID=" + HItemID, "Gy_ProjectMoney");
-                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                if (ds.Tables[0].Rows.Count > 0)
+                {
+                    if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘杩涜鍒犻櫎锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍗曟嵁宸茬鐢�!涓嶈兘杩涜鍒犻櫎锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+                else
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒";
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!";
                     objJsonResult.data = null;
-                    return objJsonResult; ;
+                    return objJsonResult;
                 }
 
 
@@ -8951,11 +8971,11 @@
                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                 if (sWhere == null || sWhere.Equals(""))
                 {
-                    ds = oCN.RunProcReturn("Select HInterID,HEquipFileNumber,HName  from Gy_EquipFileBillMain where 0=0 Order by HInterID ", "Gy_EquipFileBillMain");
+                    ds = oCN.RunProcReturn("Select HInterID,HEquipFileNumber,HName,HModel2  from Gy_EquipFileBillMain where 0=0 Order by HInterID ", "Gy_EquipFileBillMain");
                 }
                 else
                 {
-                    string sql1 = "Select HInterID,HEquipFileNumber,HName  from Gy_EquipFileBillMain where 0=0  ";
+                    string sql1 = "Select HInterID,HEquipFileNumber,HName,HModel2  from Gy_EquipFileBillMain where 0=0  ";
                     string sql = sql1 + sWhere;
                     ds = oCN.RunProcReturn(sql, "Gy_EquipFileBillMain");
                 }
@@ -9984,7 +10004,7 @@
         /// <returns></returns>
         [Route("Web/GetItemByEquipFile")]
         [HttpGet]
-        public object GetItemByEquipFile(int EquipProjectID,string Type)
+        public object GetItemByEquipFile(int EquipProjectID,string Type,string HDate)
         {
             if (EquipProjectID <= 0)
             {
@@ -10014,7 +10034,8 @@
                 }
 
                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
-                string sql = string.Format(@"select * from " + HView + " where HInterID = " + EquipProjectID);
+                //string sql = string.Format(@"select * from " + HView + " where HInterID = " + EquipProjectID);
+                string sql = string.Format(@"Exec h_p_Sb_GetCheckItem_PDA '" + EquipProjectID + "','" + Type + "','" + HDate + "'");
                 ds = oCN.RunProcReturn(sql, HView);
                 if (ds == null || ds.Tables[0].Rows.Count <= 0)
                 {
@@ -10049,7 +10070,7 @@
         /// <returns></returns>
         [Route("Web/GetEquipmentBillsList")]
         [HttpGet]
-        public object GetEquipmentBillsList(string sWhere, string Type)
+        public object GetEquipmentBillsList(string sWhere, string Type,string user)
         {            
             try
             {
@@ -10081,6 +10102,15 @@
                 }
 
                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+                ds = oCN.RunProcReturn("select ManagerFlag from gy_czygl where czymc='" + user.Trim() + "'", "gy_czygl");
+                if (!(bool)ds.Tables[0].Rows[0]["ManagerFlag"])  //鏄惁绠$悊鍛�
+                {
+                    //涓嶆槸绠$悊鍛�
+                    sWhere += " and 鍒跺崟浜� = '" + user + "'";
+                }
+
+
                 string sql = string.Format(@"select * from " + HView + " where 1 = 1 " + sWhere);
                 ds = oCN.RunProcReturn(sql, HView);
                 //娣诲姞鍒楀悕
@@ -10329,6 +10359,37 @@
             }
         }
 
+
+        /// <summary>
+        /// 鑾峰彇閫夊崟鍙风殑婧愬崟绫诲瀷
+        /// </summary>
+        /// <returns></returns>
+        [Route("Web/GetHSourceBillName")]
+        [HttpGet]
+        public object GetHSourceBillName(string HBillType)
+        {
+            try
+            {
+                ClsCN oCn = new ClsCN();
+                DataSet oDs = new DataSet();
+                //==========
+                oDs = oCn.RunProcReturn("select * from  xt_BillType where HNumber='" + HBillType + "'", "xt_BillType");
+                objjson.code = "1";
+                objjson.count = 1;
+                objjson.Message = "鑾峰彇鎴愬姛锛�";
+                objjson.data = oDs.Tables[0];
+                return objjson; ;
+            }
+            catch (Exception e)
+            {
+
+                objjson.code = "0";
+                objjson.count = 0;
+                objjson.Message = "鑾峰彇澶辫触锛佸紓甯�" + e.ToString();
+                objjson.data = null;
+                return objjson; ;
+            }
+        }
 
         #region [浠庢暟鎹簱鍔犺浇鑿滃崟]
         public class MenuLoad
@@ -11231,6 +11292,47 @@
             }
         }
 
+        /// <summary>
+        /// 鑾峰彇鍗曟嵁妯″潡鍚嶇О
+        /// </summary>
+        /// <returns></returns>
+        [Route("Web/GetModuleName")]
+        [HttpGet]
+        public object GetModuleName(string HModuleType)
+        {
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+                ds = oCN.RunProcReturn("Select * from Xt_BillType where HNumber = '" + HModuleType + "'", "Xt_BillType");
+
+                if (ds == null || ds.Tables[0].Rows.Count <= 0)
+                {
+                    objjson.code = "0";
+                    objjson.count = 0;
+                    objjson.Message = "鑾峰彇澶辫触" + DBUtility.ClsPub.sErrInfo;
+                    objjson.data = null;
+                    return objjson;
+                }
+                else
+                {
+                    objjson.code = "1";
+                    objjson.count = 1;
+                    objjson.Message = "鑾峰彇鎴愬姛!";
+                    objjson.data = ds.Tables[0];
+                    return objjson;
+                }
+            }
+            catch (Exception ex)
+            {
+                objjson.code = "0";
+                objjson.count = 0;
+                objjson.Message = "鑾峰彇澶辫触" + ex.ToString();
+                objjson.data = null;
+                return objjson;
+            }
+        }
+
     }
 
 }

--
Gitblit v1.9.1