From 2fe70195e1d6334ef74a5d0ad7dee89b28ae6092 Mon Sep 17 00:00:00 2001
From: cwjbxqmz <1134865194@qq.com>
Date: 星期四, 12 十月 2023 09:54:59 +0800
Subject: [PATCH] 1.采购退料单维护:增加 审核,反审核,关闭,反关闭,作废,反作废、条码明细、列设置,按钮设置 等 按钮;其他入库单维护、生产入库单维护: 增加 作废,反作废、条码明细 等 按钮; 委外加工入库单维护: 增加 关闭,反关闭,作废,反作废 等 按钮; 生产退库单维护、分布式调入单维护: 增加 关闭,反关闭,作废,反作废、条码明细 等 按钮; 2.增加 领用申请单 单据新增编制 模块;增加 领用申请单列表 单据列表 模块;

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

diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index ae4f998..39f4f7e 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -342,6 +342,122 @@
         }
 
 
+        #region 鐢ㄦ埛璁剧疆
+        #region 鑾峰彇鐢ㄦ埛淇℃伅
+        [Route("Gy_USERSet_PDA/GetGy_Czygl_Info")]
+        [HttpGet]
+        public object GetGy_Czygl_Info(string Czybm, string user)
+        {
+            try
+            {
+                //鏌ョ湅鏉冮檺
+                //if (!DBUtility.ClsPub.Security_Log("Gy_ProjectStage_Query", 1, false, user))
+                //{
+                //    objJsonResult.code = "0";
+                //    objJsonResult.count = 0;
+                //    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                //    objJsonResult.data = null;
+                //    return objJsonResult;
+                //}
+
+                string sql = @"select Czybm, Czymc, HWhID, HWhName, HSecManagerID, HSecManager, HKeeperID, HKeeper, HDeptID, HDept, HCloudUserName, HCloudUserPsd from Gy_Czygl where Czybm = '" + Czybm + "'";
+                ds = oCN.RunProcReturn(sql, "Gy_Czygl");
+
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏈壘鍒扮浉鍏虫暟鎹紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                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 淇濆瓨鐢ㄦ埛淇℃伅
+        [Route("Gy_USERSet_PDA/SaveGy_Czygl_Info")]
+        [HttpPost]
+        public object SaveGy_Czygl_Info([FromBody] JObject sMainSub)
+        {
+            try
+            {
+                //鑾峰彇鍙傛暟
+                var _value = sMainSub["sMainSub"].ToString();
+                string msg1 = _value.ToString();
+                string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+
+                Int64 HWhID = Int64.Parse(sArray[0].ToString());
+                string HWhName = sArray[1].ToString();
+                Int64 HSecManagerID = Int64.Parse(sArray[2].ToString());
+                string HSecManager = sArray[3].ToString();
+                Int64 HKeeperID = Int64.Parse(sArray[4].ToString());
+                string HKeeper = sArray[5].ToString();
+                Int64 HDeptID = Int64.Parse(sArray[6].ToString());
+                string HDept = sArray[7].ToString();
+                string HCloudUserName = sArray[8].ToString().Trim();
+                string HCloudUserPsd = sArray[9].ToString().Trim();
+
+                string Czybm = sArray[10].ToString();
+                string user = sArray[11].ToString();                     //鎿嶄綔鐢ㄦ埛鐨勭敤鎴峰悕
+
+                ////鍒ゆ柇鏄惁鏈夋柊澧炴潈闄�
+                //if (!DBUtility.ClsPub.Security_Log("Sc_ICMOBillQualityStatus_Tmp_Edit", 1, false, user))
+                //{
+                //    objJsonResult.code = "0";
+                //    objJsonResult.count = 0;
+                //    objJsonResult.Message = "鏃犳柊澧炴潈闄�!";
+                //    objJsonResult.data = null;
+                //    return objJsonResult;
+                //}
+
+                string sql = "update Gy_Czygl set " + 
+                    "HWhID = " + HWhID + 
+                    ", HWhName = '" + HWhName +
+                    "', HSecManagerID = " + HSecManagerID +
+                    ", HSecManager = '" + HSecManager +
+                    "', HKeeperID = " + HKeeperID +
+                    ", HKeeper = '" + HKeeper +
+                    "', HDeptID = " + HDeptID +
+                    ", HDept = '" + HDept +
+                    "', HCloudUserName = '" + HCloudUserName +
+                    "', HCloudUserPsd = '" + HCloudUserPsd +
+                    "' where Czybm = '" + Czybm + "'";
+
+                oCN.RunProc(sql);
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+        #endregion
+
+
 
         //鎾ら攢缂撳瓨鍒楄〃璁板綍
         [Route("Web/Rescind_Json")]
@@ -2663,7 +2779,7 @@
             try
             {
                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
-                string sql = "Select a.HItemID ,HNumber 鏍哥畻鏂瑰紡缁勪唬鐮�,HName 鏍哥畻鏂瑰紡缁勫悕绉�,HDeptID,b.閮ㄩ棬鍚嶇О 閮ㄩ棬 from Gy_ClassTimePrjGroup a left join h_v_Gy_Department b on a.HDeptID=b.HItemID";
+                string sql = "Select a.HItemID ,HNumber 鏍哥畻鏂瑰紡缁勪唬鐮�,HName 鏍哥畻鏂瑰紡缁勫悕绉�,HDeptID,b.閮ㄩ棬浠g爜,b.閮ㄩ棬鍚嶇О 閮ㄩ棬 from Gy_ClassTimePrjGroup a left join h_v_Gy_Department b on a.HDeptID=b.HItemID";
                 if (sWhere == null || sWhere.Equals(""))
                 {
                     ds = oCN.RunProcReturn(sql, "Gy_ClassTimePrjGroup");
@@ -3232,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>
@@ -3552,7 +3721,7 @@
         /// <returns></returns>
         [Route("Web/GetCheckItemByCheckProjectID")]
         [HttpGet]
-        public object GetCheckItemByCheckProjectID(int CheckProjectID)
+        public object GetCheckItemByCheckProjectID(int CheckProjectID,int HBatchQty)
         {
             if (CheckProjectID <= 0)
             {
@@ -3565,8 +3734,8 @@
             try
             {
                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
-                string sql = "select * from h_v_Gy_GetQCCheckItemByProject where hmainid = " + 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";

--
Gitblit v1.9.1