From 9536a6d14c8f1ac9001a4d27ec0e87b761634ab4 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 27 十月 2023 14:14:09 +0800
Subject: [PATCH] 特批申请单

---
 WebAPI/Controllers/WebAPIController.cs |  169 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 165 insertions(+), 4 deletions(-)

diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index 3e0472d..4e05ac2 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -1808,7 +1808,7 @@
             try
             {
                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
-                ds = oCN.RunProcReturn("Select p.HItemID,p.HNumber 宸ュ簭浠g爜,p.HName 宸ュ簭,w.HItemID 宸ヤ綔涓績ID,w.HNumber 宸ヤ綔涓績浠g爜,w.HName 宸ヤ綔涓績,d.HItemID 閮ㄩ棬ID,d.HNumber 閮ㄩ棬浠g爜,d.HName 閮ㄩ棬 from Gy_Process p left join Gy_WorkCenter w on p.HWorkCenterID = w.HItemID left join Gy_Department d on p.HDeptID = d.HItemID where p.HStopflag = 0 " + sWhere + " Order by HItemID ", "Gy_Process");
+                ds = oCN.RunProcReturn("Select p.HItemID,p.HNumber 宸ュ簭浠g爜,p.HName 宸ュ簭,w.HItemID 宸ヤ綔涓績ID,w.HNumber 宸ヤ綔涓績浠g爜,w.HName 宸ヤ綔涓績,d.HItemID 閮ㄩ棬ID,d.HNumber 閮ㄩ棬浠g爜,d.HName 閮ㄩ棬 from Gy_Process p left join Gy_WorkCenter w on p.HWorkCenterID = w.HItemID left join Gy_Department d on p.HDeptID = d.HItemID where p.HStopflag = 0 " + sWhere + " Order by p.HNumber ", "Gy_Process");
                 if (ds == null || ds.Tables[0].Rows.Count <= 0)
                 {
                     objjson.code = "0";
@@ -3348,6 +3348,59 @@
         }
 
         /// <summary>
+        /// 鑾峰彇褰撳墠鐢熶骇璧勬簮涓嬪凡缁忓紑宸ョ殑鐢熶骇浠诲姟鍗曞垪琛�
+        /// </summary>
+        /// <returns></returns>
+        [Route("Web/GetSc_ICMOBillListView3")]
+        [HttpGet]
+        public object GetSc_ICMOBillListView3(string ICMOBill, int OrganizationID,int HSourceID)
+        {
+            if (ICMOBill != "")
+            {
+                sWhere = " where 1=1 and (鍗曟嵁鍙� like '%" + ICMOBill + "%' or 浜у搧浠g爜 like '%" + ICMOBill + "%' or 浜у搧鍚嶇О like '%" + ICMOBill + "%' or 瑙勬牸鍨嬪彿 like '%" + ICMOBill + "%' )";
+            }
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("select * from h_v_IF_ICMOBillList where 1=1 and isnull(瀹℃牳浜�,'')<>'' and isnull(鍏抽棴浜�,'')='' and isnull(琛屽叧闂汉,'')=''  and 鐘舵�� = '寮�宸�' and HSourceID_b = " + HSourceID + " order by 鍗曟嵁鍙�,hsubid ", "h_v_IF_ICMOBillList");
+                }
+                else
+                {
+                    string sql = "select * from h_v_IF_ICMOBillList " + sWhere + " and isnull(瀹℃牳浜�,'')<>'' and isnull(鍏抽棴浜�,'')='' and isnull(琛屽叧闂汉,'')='' " +
+                        "and 鐘舵�� = '寮�宸�' and HSourceID_b = " + HSourceID + " order by 鍗曟嵁鍙�,hsubid ";
+                    ds = oCN.RunProcReturn(sql, "h_v_IF_ICMOBillList");
+                }
+                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 = "0";
+                    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;
+            }
+        }
+
+        /// <summary>
         /// 鑾峰彇宸ュ簭娴佽浆鍗″垪琛�
         /// </summary>
         /// <returns></returns>
@@ -3668,7 +3721,7 @@
         /// <returns></returns>
         [Route("Web/GetCheckItemByCheckProjectID")]
         [HttpGet]
-        public object GetCheckItemByCheckProjectID(int CheckProjectID)
+        public object GetCheckItemByCheckProjectID(int CheckProjectID,int HBatchQty)
         {
             if (CheckProjectID <= 0)
             {
@@ -3681,8 +3734,8 @@
             try
             {
                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
-                string sql = "select c.HItemID HQCCheckItemID,c.HName 妫�楠岄」鐩�,b.HQCStd,b.HQCUnit HUnit,b.HAnalysisMethod,b.HStatus HResult from Gy_QCCheckProjectMain a left join Gy_QCCheckProjectSub b on a.HInterID = b.HInterID left join Gy_QCCheckItem c on b.HQCCheckItemID = c.HItemID where a.HInterID = " + CheckProjectID;
-                ds = oCN.RunProcReturn(sql, "Gy_QCCheckProjectMain");
+                string sql = "exec h_p_Gy_GetQCCheckItemByProject " + CheckProjectID + "," + HBatchQty;
+                ds = oCN.RunProcReturn(sql, "h_p_Gy_GetQCCheckItemByProject");
                 if (ds == null || ds.Tables[0].Rows.Count <= 0)
                 {
                     objjson.code = "0";
@@ -4987,6 +5040,114 @@
             return objJsonResult;
         }
 
+        /// <summary>
+        /// 鑾峰彇杩愯緭鍏徃鍒楄〃
+        /// </summary>
+        /// <returns></returns>
+        [Route("Web/GetConveyCompList_Json")]
+        [HttpGet]
+        public object GetConveyCompList_Json(string ConveyComp)
+        {
+            if (ConveyComp != "")
+            {
+                sWhere = sWhere + " and ( HNumber like '%" + ConveyComp + "%' or HName like '%" + ConveyComp + "%' ) ";
+            }
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("Select HItemID,HNumber ,HName  from Gy_ConveyComp where HStopflag=0 Order by HItemID ", "Gy_ConveyComp");
+                }
+                else
+                {
+                    string sql1 = "Select HItemID,HNumber ,HName  from Gy_ConveyComp where HStopflag=0 and HEndFlag=1 ";
+                    string sql = sql1 + sWhere;
+                    ds = oCN.RunProcReturn(sql, "Gy_ConveyComp");
+                }
+
+                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 = "0";
+                    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;
+            }
+        }
+
+        /// <summary>
+        /// 鑾峰彇杩愯緭鏂瑰紡鍒楄〃
+        /// </summary>
+        /// <returns></returns>
+        [Route("Web/GetConveyTypeList_Json")]
+        [HttpGet]
+        public object GetConveyTypeList_Json(string ConveyType)
+        {
+            if (ConveyType != "")
+            {
+                sWhere = sWhere + " and ( HNumber like '%" + ConveyType + "%' or HName like '%" + ConveyType + "%' ) ";
+            }
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("Select HItemID,HNumber ,HName  from Gy_ConveyType where HStopflag=0 Order by HItemID ", "Gy_ConveyType");
+                }
+                else
+                {
+                    string sql1 = "Select HItemID,HNumber ,HName  from Gy_ConveyType where HStopflag=0 and HEndFlag=1 ";
+                    string sql = sql1 + sWhere;
+                    ds = oCN.RunProcReturn(sql, "Gy_ConveyType");
+                }
+
+                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 = "0";
+                    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