From 8a91b16a1078921d70ee5489101ba104e7070e26 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期一, 24 五月 2021 17:35:31 +0800
Subject: [PATCH] 模具保养计划单编辑

---
 WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 58 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs b/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs
index 18d1120..baef2f7 100644
--- a/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs
+++ b/WebAPI/Controllers/Sc_CheckToolsRepairWorkBillController.cs
@@ -1463,5 +1463,63 @@
         }
         #endregion
 
+
+
+
+
+        #region[妯″叿淇濆吇璁″垝鍗曠紪杈戞椂鑾峰彇琛ㄥご鏁版嵁]
+        [Route("Sc_MouldMaintainPlanBill/Sc_MouldMaintainPlanBillListCheckDetai")]
+        [HttpGet]
+        public ApiResult<DataSet> Sc_MouldMaintainPlanBillListCheckDetai(string HID)
+        {
+            if (string.IsNullOrEmpty(HID))
+                return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" };
+            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+            var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Sc_MouldMaintainPlanBillList  where hmainid= " + HID + " ", "h_v_Sc_MouldMaintainPlanBillList");
+            if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
+                return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄤ繚鍏昏鍒掑崟" };
+            return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
+        }
+        #endregion
+
+        #region[妯″叿淇濆吇璁″垝鍗曠紪杈戞椂鑾峰彇琛ㄩ鏁版嵁]
+        [Route("Sc_MouldMaintainPlanBill/Sc_MouldMaintainPlanBillListProjectDetai")]
+        [HttpGet]
+        public object Sc_MouldMaintainPlanBillListProjectDetai(string sqlWhere)
+        {
+            DataSet ds;
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                if (sqlWhere == null || sqlWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("select HMaterID,HUnitID,HQty,HQtyMust,HRemark   from Sc_MouldMaintainPlanBillSub", "Sc_MouldMaintainPlanBillSub");
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
+                }
+                else
+                {
+                    string sql1 = "select HMaterID,HUnitID,HQty,HQtyMust,HRemark   from Sc_MouldMaintainPlanBillSub where 1 = 1 ";
+                    string sql = sql1 + sqlWhere;
+                    ds = oCN.RunProcReturn(sql, "Sc_MouldRepairWorkBillSub");
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+                objJsonResult.data = null;
+            }
+            return objJsonResult;
+        }
+        #endregion
+
     }
 }
\ No newline at end of file

--
Gitblit v1.9.1