From 15e8a41e673b3bba590c86c87aab1b2d788acd96 Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期三, 03 十一月 2021 17:29:12 +0800
Subject: [PATCH] 基础资料点检项目、维修项目、维修检验项目、保养项目列表+新增编辑

---
 WebAPI/Controllers/基础资料/基础资料/Gy_DotCheckBillController.cs    |  309 +++++++++++++
 WebAPI/Models/ClsGy_RepairCheck.cs                           |   24 +
 WebAPI/Models/ClsGy_DotCheck.cs                              |   23 +
 WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user  |   34 
 WebAPI/Controllers/基础资料/基础资料/Gy_RepairBillController.cs      |  308 +++++++++++++
 WebAPI/Models/ClsGy_Maintain.cs                              |   24 +
 WebAPI/Models/ClsGy_Repair.cs                                |   22 
 WebAPI/WebAPI.csproj                                         |    8 
 WebAPI/Controllers/基础资料/基础资料/Gy_RepairCheckBillController.cs |  308 +++++++++++++
 WebAPI/Controllers/基础资料/基础资料/Gy_MaintainBillController.cs    |  308 +++++++++++++
 10 files changed, 1,351 insertions(+), 17 deletions(-)

diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckBillController.cs"
new file mode 100644
index 0000000..11b7e70
--- /dev/null
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DotCheckBillController.cs"
@@ -0,0 +1,309 @@
+锘縰sing DBUtility;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+
+
+namespace WebAPI.Controllers.鍩虹璧勬枡.鍩虹璧勬枡
+{
+    public class Gy_DotCheckBillController : ApiController
+    {
+        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+
+        private json objJsonResult = new json();
+        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        DataSet ds;
+        Models.ClsGy_DotCheck oDept = new Models.ClsGy_DotCheck();
+        Models.ClsGy_DotCheck oDeptHlp = new Models.ClsGy_DotCheck();
+
+        #region 鐐规椤圭洰鍒楄〃鏁版嵁
+        [Route("Gy_DotCheck/GetDotCheckList")]
+        [HttpGet]
+        public object GetDotCheckList(string sWhere, string user)
+        {
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_DotCheck", 1, true, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鏌ョ湅鏉冮檺";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                ds = oCN.RunProcReturn("select HItemID,HNumber,HName,HLevel, case when HEndFlag<>0 then 'Y'else ' 'end HEndFlag,case when HStopFlag <> 0 then 'Y'else ' 'end HStopFlag, HRemark, HUseFlag from Gy_DotCheck where 1=1 " + sWhere, "Gy_DotCheck");
+                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 = "鏌ユ壘鎴愬姛锛�";
+                    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_DotCheck/DeleteDotCheck")]
+        [HttpGet]
+        public object DeleteDotCheck(long HItemID, string User)
+        {
+
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_DotCheck", 1, true, User))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鍒犻櫎鏉冮檺";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                ds = oCN.RunProcReturn("Select * from Gy_DotCheck Where HItemID='" + HItemID + "'", "Gy_DotCheck", ref DBUtility.ClsPub.sExeReturnInfo);
+                if (ds.Tables[0].Rows.Count != 0)
+                {
+                    ds = oCN.RunProcReturn("Delete from Gy_DotCheck Where HItemID='" + HItemID + "'", "Gy_DotCheck", ref DBUtility.ClsPub.sExeReturnInfo);
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鍒犻櫎鎴愬姛";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�";
+                    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
+
+        #region 淇敼鐐规椤圭洰鑾峰彇缁戝畾鏁版嵁
+        [Route("Gy_DotCheck/EditDotCheck")]
+        [HttpGet]
+        public object EditDotCheck(long HInterID)
+        {
+            try
+            {
+                ds = oCN.RunProcReturn("select * from Gy_DotCheck where HItemID=" + HInterID, "Gy_DotCheck");
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "";
+                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_DotCheck/EditBill")]
+        [HttpPost]
+        public object EditBill([FromBody] JObject oMain)
+        {
+
+            try
+            {
+                var _value = oMain["oMain"].ToString();
+                string msg1 = _value.ToString();
+                string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+                string msg2 = sArray[0].ToString();
+                string msg3 = sArray[1].ToString();
+                string msg4 = sArray[2].ToString();//褰撳墠浜�
+
+                //鍙嶅簭鍒楀寲
+                msg2 = "[" + msg2.ToString() + "]";
+                List<Models.ClsGy_DotCheck> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsGy_DotCheck>>(msg2);
+
+                long HItemID = int.Parse(msg3);
+                string HNumber = list[0].HNumber;
+                string HName = list[0].HName;
+                string HShortNumber = list[0].HNumber;
+                string HHelpCode = list[0].HHelpCode;
+                string HRemark = list[0].HRemark;
+                bool HStopflag = list[0].HStopflag;
+                string HUseFlag = list[0].HUseFlag;
+
+                //鍒ゆ柇鏉冮檺
+                if (!ClsPub.Security_Log("Gy_DotCheck", 1, true, msg4))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鎵惧埌璇ュ姛鑳芥ā鍧楋紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                if (!DBUtility.ClsPub.AllowNumber(HNumber))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (oDept.HavSameNumber(HItemID, HNumber))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "浠g爜閲嶅锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+                oCN.BeginTran();
+                //涓昏〃
+                oCN.RunProc("Update Gy_DotCheck set " +
+                    " HNumber='" + HNumber + "'" +
+                    ",HName='" + HName + "'" +
+                    ",HShortNumber='" + HShortNumber + "'" +
+                    ",HHelpCode='" + HHelpCode + "'" +
+                    ",HStopflag='" + HStopflag + "'" +
+                    ",HRemark= '" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
+                //淇敼瀛愰」鐩唬鐮�
+                //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_RepairCheck,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
+
+                oCN.Commit();
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "淇敼鎴愬姛锛�";
+                //objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.Message;
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 鐐规椤圭洰鏂板淇濆瓨
+        [Route("GetDotCheck/AddBill")]
+        [HttpPost]
+        public object AddBill([FromBody] JObject oMain)
+        {
+            try
+            {
+                var _value = oMain["oMain"].ToString();
+                string msg1 = _value.ToString();
+                string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+                string msg2 = sArray[0].ToString();
+                string msg3 = sArray[1].ToString();//褰撳墠浜�
+
+                //鍙嶅簭鍒楀寲
+                msg2 = "[" + msg2.ToString() + "]";
+
+                List<Models.ClsGy_DotCheck> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsGy_DotCheck>>(msg2);
+
+                string HNumber = list[0].HNumber;
+                string HName = list[0].HName;
+                string HShortNumber = list[0].HNumber;
+                long HLevel = list[0].HLevel;
+                string HHelpCode = list[0].HHelpCode;
+                string HRemark = list[0].HRemark;
+                bool HStopflag = list[0].HStopflag;
+                string HUseFlag = list[0].HUseFlag;
+                bool HEndFlag = list[0].HEndFlag;
+
+                //鍒ゆ柇鏉冮檺
+                if (!ClsPub.Security_Log("Gy_DotCheck", 1, true, msg3))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鎵惧埌璇ュ姛鑳芥ā鍧楋紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (!DBUtility.ClsPub.AllowNumber(HNumber))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+
+                //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+                oCN.BeginTran();
+                //涓昏〃
+                oCN.RunProc("Insert into Gy_DotCheck " +
+                   " (HNumber,HName,HHelpCode,HShortNumber" +
+                   ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime) " +
+                   " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," +
+                    +HLevel + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "',getdate())", ref DBUtility.ClsPub.sExeReturnInfo);
+                //淇敼涓婄骇涓洪潪鏈骇浠g爜
+                //oCN.RunProc("Update Gy_MouldType set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+                oCN.Commit();
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鏂板鎴愬姛锛�";
+                //objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.Message;
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+    }
+}
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaintainBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaintainBillController.cs"
new file mode 100644
index 0000000..df7c94d
--- /dev/null
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaintainBillController.cs"
@@ -0,0 +1,308 @@
+锘縰sing DBUtility;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.鍩虹璧勬枡.鍩虹璧勬枡
+{
+    public class Gy_MaintainBillController : ApiController
+    {
+        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+
+        private json objJsonResult = new json();
+        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        DataSet ds;
+        Models.ClsGy_Maintain oDept = new Models.ClsGy_Maintain();
+        Models.ClsGy_Maintain oDeptHlp = new Models.ClsGy_Maintain();
+
+        #region 淇濆吇椤圭洰鍒楄〃鏁版嵁
+        [Route("Gy_Maintain/GetMaintainlist")]
+        [HttpGet]
+        public object GetMaintainlist(string sWhere, string user)
+        {
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_Maintain", 1, true, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鏌ョ湅鏉冮檺";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                ds = oCN.RunProcReturn("select HItemID,HNumber,HName,HLevel, case when HEndFlag<>0 then 'Y'else ' 'end HEndFlag,case when HStopFlag <> 0 then 'Y'else ' 'end HStopFlag, HRemark, HUseFlag from Gy_Maintain where 1=1 " + sWhere, "Gy_Maintain");
+                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 = "鏌ユ壘鎴愬姛锛�";
+                    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_Maintain/DeleteMaintain")]
+        [HttpGet]
+        public object DeleteMaintain(long HItemID, string User)
+        {
+
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_Maintain_Delete", 1, true, User))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鍒犻櫎鏉冮檺";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                ds = oCN.RunProcReturn("Select * from Gy_Maintain Where HItemID='" + HItemID + "'", "Gy_Maintain", ref DBUtility.ClsPub.sExeReturnInfo);
+                if (ds.Tables[0].Rows.Count != 0)
+                {
+                    ds = oCN.RunProcReturn("Delete from Gy_Maintain Where HItemID='" + HItemID + "'", "Gy_Maintain", ref DBUtility.ClsPub.sExeReturnInfo);
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鍒犻櫎鎴愬姛";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�";
+                    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
+
+        #region 淇敼淇濆吇椤圭洰鑾峰彇缁戝畾鏁版嵁
+        [Route("Gy_Maintain/EditMaintain")]
+        [HttpGet]
+        public object EditMaintain(long HInterID)
+        {
+            try
+            {
+                ds = oCN.RunProcReturn("select * from Gy_Maintain where HItemID=" + HInterID, "Gy_Maintain");
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "";
+                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_Maintain/EditBill")]
+        [HttpPost]
+        public object EditBill([FromBody] JObject oMain)
+        {
+
+            try
+            {
+                var _value = oMain["oMain"].ToString();
+                string msg1 = _value.ToString();
+                string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+                string msg2 = sArray[0].ToString();
+                string msg3 = sArray[1].ToString();
+                string msg4 = sArray[2].ToString();//褰撳墠浜�
+
+                //鍙嶅簭鍒楀寲
+                msg2 = "[" + msg2.ToString() + "]";
+                List<Models.ClsGy_Maintain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsGy_Maintain>>(msg2);
+
+                long HItemID = int.Parse(msg3);
+                string HNumber = list[0].HNumber;
+                string HName = list[0].HName;
+                string HShortNumber = list[0].HNumber;
+                string HHelpCode = list[0].HHelpCode;
+                string HRemark = list[0].HRemark;
+                bool HStopflag = list[0].HStopflag;
+                string HUseFlag = list[0].HUseFlag;
+
+                //鍒ゆ柇鏉冮檺
+                if (!ClsPub.Security_Log("Gy_Maintain_Edit", 1, true, msg4))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鎵惧埌璇ュ姛鑳芥ā鍧楋紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                if (!DBUtility.ClsPub.AllowNumber(HNumber))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (oDept.HavSameNumber(HItemID, HNumber))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "浠g爜閲嶅锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+                oCN.BeginTran();
+                //涓昏〃
+                oCN.RunProc("Update Gy_Maintain set " +
+                    " HNumber='" + HNumber + "'" +
+                    ",HName='" + HName + "'" +
+                    ",HShortNumber='" + HShortNumber + "'" +
+                    ",HHelpCode='" + HHelpCode + "'" +
+                    ",HStopflag='" + HStopflag + "'" +
+                    ",HRemark= '" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
+                //淇敼瀛愰」鐩唬鐮�
+                //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_RepairCheck,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
+                
+                oCN.Commit();
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "淇敼鎴愬姛锛�";
+                //objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.Message;
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 淇濆吇椤圭洰鏂板淇濆瓨
+        [Route("Gy_Maintain/AddBill")]
+        [HttpPost]
+        public object AddBill([FromBody] JObject oMain)
+        {
+            try
+            {
+                var _value = oMain["oMain"].ToString();
+                string msg1 = _value.ToString();
+                string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+                string msg2 = sArray[0].ToString();
+                string msg3 = sArray[1].ToString();//褰撳墠浜�
+
+                //鍙嶅簭鍒楀寲
+                msg2 = "[" + msg2.ToString() + "]";
+
+                List<Models.ClsGy_Maintain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsGy_Maintain>>(msg2);
+
+                string HNumber = list[0].HNumber;
+                string HName = list[0].HName;
+                string HShortNumber = list[0].HNumber;
+                long HLevel = list[0].HLevel;
+                string HHelpCode = list[0].HHelpCode;
+                string HRemark = list[0].HRemark;
+                bool HStopflag = list[0].HStopflag;
+                string HUseFlag = list[0].HUseFlag;
+                bool HEndFlag = list[0].HEndFlag;
+
+                //鍒ゆ柇鏉冮檺
+                if (!ClsPub.Security_Log("Gy_Maintain_Edit", 1, true, msg3))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鎵惧埌璇ュ姛鑳芥ā鍧楋紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (!DBUtility.ClsPub.AllowNumber(HNumber))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+
+                //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+                oCN.BeginTran();
+                //涓昏〃
+                oCN.RunProc("Insert into Gy_Maintain " +
+                   " (HNumber,HName,HHelpCode,HShortNumber" +
+                   ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime) " +
+                   " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + 
+                    + HLevel + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "',getdate())", ref DBUtility.ClsPub.sExeReturnInfo);
+                //淇敼涓婄骇涓洪潪鏈骇浠g爜
+                //oCN.RunProc("Update Gy_MouldType set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+                oCN.Commit();
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鏂板鎴愬姛锛�";
+                //objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.Message;
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+    }
+}
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairBillController.cs"
new file mode 100644
index 0000000..6bbfbd7
--- /dev/null
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairBillController.cs"
@@ -0,0 +1,308 @@
+锘縰sing DBUtility;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.鍩虹璧勬枡.鍩虹璧勬枡
+{
+    public class Gy_RepairBillController : ApiController
+    {
+        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+
+        private json objJsonResult = new json();
+        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        DataSet ds;
+        Models.ClsGy_Repair oDept = new Models.ClsGy_Repair();
+        Models.ClsGy_Repair oDeptHlp = new Models.ClsGy_Repair();
+
+        #region 缁翠慨椤圭洰鍒楄〃鏁版嵁
+        [Route("Gy_Repair/GetRepairList")]
+        [HttpGet]
+        public object GetRepairList(string sWhere, string user)
+        {
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_Repair", 1, true, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鏌ョ湅鏉冮檺";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                ds = oCN.RunProcReturn("select HItemID,HNumber,HName,HLevel, case when HEndFlag<>0 then 'Y'else ' 'end HEndFlag,case when HStopFlag <> 0 then 'Y'else ' 'end HStopFlag, HRemark, HUseFlag from Gy_Repair where 1=1 " + sWhere, "Gy_Repair");
+                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 = "鏌ユ壘鎴愬姛锛�";
+                    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_Repair/DeleteRepair")]
+        [HttpGet]
+        public object DeleteRepair(long HItemID, string User)
+        {
+
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_Repair_Delete", 1, true, User))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鍒犻櫎鏉冮檺";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                ds = oCN.RunProcReturn("Select * from Gy_Repair Where HItemID='" + HItemID + "'", "Gy_Repair", ref DBUtility.ClsPub.sExeReturnInfo);
+                if (ds.Tables[0].Rows.Count != 0)
+                {
+                    ds = oCN.RunProcReturn("Delete from Gy_Repair Where HItemID='" + HItemID + "'", "Gy_Repair", ref DBUtility.ClsPub.sExeReturnInfo);
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鍒犻櫎鎴愬姛";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�";
+                    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
+
+        #region 淇敼缁翠慨椤圭洰鑾峰彇缁戝畾鏁版嵁
+        [Route("Gy_Repair/EditRepair")]
+        [HttpGet]
+        public object EditRepair(long HInterID)
+        {
+            try
+            {
+                ds = oCN.RunProcReturn("select * from Gy_Repair where HItemID=" + HInterID, "Gy_Repair");
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "";
+                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_Repair/EditBill")]
+        [HttpPost]
+        public object EditBill([FromBody] JObject oMain)
+        {
+
+            try
+            {
+                var _value = oMain["oMain"].ToString();
+                string msg1 = _value.ToString();
+                string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+                string msg2 = sArray[0].ToString();
+                string msg3 = sArray[1].ToString();
+                string msg4 = sArray[2].ToString();//褰撳墠浜�
+
+                //鍙嶅簭鍒楀寲
+                msg2 = "[" + msg2.ToString() + "]";
+                List<Models.ClsGy_Repair> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsGy_Repair>>(msg2);
+
+                long HItemID = int.Parse(msg3);
+                string HNumber = list[0].HNumber;
+                string HName = list[0].HName;
+                string HShortNumber = list[0].HNumber;
+                string HHelpCode = list[0].HHelpCode;
+                string HRemark = list[0].HRemark;
+                bool HStopflag = list[0].HStopflag;
+                string HUseFlag = list[0].HUseFlag;
+
+                //鍒ゆ柇鏉冮檺
+                if (!ClsPub.Security_Log("Gy_Repair_Edit", 1, true, msg4))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鎵惧埌璇ュ姛鑳芥ā鍧楋紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                if (!DBUtility.ClsPub.AllowNumber(HNumber))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (oDept.HavSameNumber(HItemID, HNumber))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "浠g爜閲嶅锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+                oCN.BeginTran();
+                //涓昏〃
+                oCN.RunProc("Update Gy_Repair set " +
+                    " HNumber='" + HNumber + "'" +
+                    ",HName='" + HName + "'" +
+                    ",HShortNumber='" + HShortNumber + "'" +
+                    ",HHelpCode='" + HHelpCode + "'" +
+                    ",HStopflag='" + HStopflag + "'" +
+                    ",HRemark= '" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
+                //淇敼瀛愰」鐩唬鐮�
+                //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_RepairCheck,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
+
+                oCN.Commit();
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "淇敼鎴愬姛锛�";
+                //objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.Message;
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 缁翠慨椤圭洰鏂板淇濆瓨
+        [Route("Gy_Repair/AddBill")]
+        [HttpPost]
+        public object AddBill([FromBody] JObject oMain)
+        {
+            try
+            {
+                var _value = oMain["oMain"].ToString();
+                string msg1 = _value.ToString();
+                string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+                string msg2 = sArray[0].ToString();
+                string msg3 = sArray[1].ToString();//褰撳墠浜�
+
+                //鍙嶅簭鍒楀寲
+                msg2 = "[" + msg2.ToString() + "]";
+
+                List<Models.ClsGy_Repair> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsGy_Repair>>(msg2);
+
+                string HNumber = list[0].HNumber;
+                string HName = list[0].HName;
+                string HShortNumber = list[0].HNumber;
+                long HLevel = list[0].HLevel;
+                string HHelpCode = list[0].HHelpCode;
+                string HRemark = list[0].HRemark;
+                bool HStopflag = list[0].HStopflag;
+                string HUseFlag = list[0].HUseFlag;
+                bool HEndFlag = list[0].HEndFlag;
+
+                //鍒ゆ柇鏉冮檺
+                if (!ClsPub.Security_Log("Gy_Repair_Edit", 1, true, msg3))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鎵惧埌璇ュ姛鑳芥ā鍧楋紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (!DBUtility.ClsPub.AllowNumber(HNumber))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+
+                //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+                oCN.BeginTran();
+                //涓昏〃
+                oCN.RunProc("Insert into Gy_Repair " +
+                   " (HNumber,HName,HHelpCode,HShortNumber" +
+                   ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime) " +
+                   " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," +
+                    +HLevel + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "',getdate())", ref DBUtility.ClsPub.sExeReturnInfo);
+                //淇敼涓婄骇涓洪潪鏈骇浠g爜
+                //oCN.RunProc("Update Gy_MouldType set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+                oCN.Commit();
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鏂板鎴愬姛锛�";
+                //objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.Message;
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+    }
+}
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairCheckBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairCheckBillController.cs"
new file mode 100644
index 0000000..dd261ca
--- /dev/null
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_RepairCheckBillController.cs"
@@ -0,0 +1,308 @@
+锘縰sing DBUtility;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.鍩虹璧勬枡.鍩虹璧勬枡
+{
+    public class Gy_RepairCheckBillController : ApiController
+    {
+        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+
+        private json objJsonResult = new json();
+        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        DataSet ds;
+        Models.ClsGy_RepairCheck oDept = new Models.ClsGy_RepairCheck();
+        Models.ClsGy_RepairCheck oDeptHlp = new Models.ClsGy_RepairCheck();
+
+        #region 缁翠慨楠屾敹椤圭洰鍒楄〃鏁版嵁
+        [Route("Gy_RepairCheck/GetRepairCheckList")]
+        [HttpGet]
+        public object GetRepairCheckList(string sWhere, string user)
+        {
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_RepairCheck", 1, true, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鏌ョ湅鏉冮檺";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                ds = oCN.RunProcReturn("select HItemID,HNumber,HName,HLevel, case when HEndFlag<>0 then 'Y'else ' 'end HEndFlag,case when HStopFlag <> 0 then 'Y'else ' 'end HStopFlag, HRemark, HUseFlag from Gy_RepairCheck where 1=1 " + sWhere, "Gy_RepairCheck");
+                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 = "鏌ユ壘鎴愬姛锛�";
+                    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_RepairCheck/DeleteRepairCheck")]
+        [HttpGet]
+        public object DeleteRepairCheck(long HItemID, string User)
+        {
+
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_RepairCheck_Delete", 1, true, User))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鍒犻櫎鏉冮檺";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                ds = oCN.RunProcReturn("Select * from Gy_RepairCheck Where HItemID='" + HItemID + "'", "Gy_RepairCheck", ref DBUtility.ClsPub.sExeReturnInfo);
+                if (ds.Tables[0].Rows.Count != 0)
+                {
+                    ds = oCN.RunProcReturn("Delete from Gy_RepairCheck Where HItemID='" + HItemID + "'", "Gy_RepairCheck", ref DBUtility.ClsPub.sExeReturnInfo);
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鍒犻櫎鎴愬姛";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�";
+                    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
+
+        #region 淇敼缁翠慨楠屾敹椤圭洰鑾峰彇缁戝畾鏁版嵁
+        [Route("Gy_RepairCheck/EditRepairCheck")]
+        [HttpGet]
+        public object EditRepairCheck(long HInterID)
+        {
+            try
+            {
+                ds = oCN.RunProcReturn("select * from Gy_RepairCheck where HItemID=" + HInterID, "Gy_RepairCheck");
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "";
+                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_RepairCheck/EditBill")]
+        [HttpPost]
+        public object EditBill([FromBody] JObject oMain)
+        {
+
+            try
+            {
+                var _value = oMain["oMain"].ToString();
+                string msg1 = _value.ToString();
+                string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+                string msg2 = sArray[0].ToString();
+                string msg3 = sArray[1].ToString();
+                string msg4 = sArray[2].ToString();//褰撳墠浜�
+
+                //鍙嶅簭鍒楀寲
+                msg2 = "[" + msg2.ToString() + "]";
+                List<Models.ClsGy_RepairCheck> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsGy_RepairCheck>>(msg2);
+
+                long HItemID = int.Parse(msg3);
+                string HNumber = list[0].HNumber;
+                string HName = list[0].HName;
+                string HShortNumber = list[0].HNumber;
+                string HHelpCode = list[0].HHelpCode;
+                string HRemark = list[0].HRemark;
+                bool HStopflag = list[0].HStopflag;
+                string HUseFlag = list[0].HUseFlag;
+
+                //鍒ゆ柇鏉冮檺
+                if (!ClsPub.Security_Log("Gy_RepairCheck_Edit", 1, true, msg4))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鎵惧埌璇ュ姛鑳芥ā鍧楋紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                if (!DBUtility.ClsPub.AllowNumber(HNumber))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (oDept.HavSameNumber(HItemID, HNumber))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "浠g爜閲嶅锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+                oCN.BeginTran();
+                //涓昏〃
+                oCN.RunProc("Update Gy_RepairCheck set " +
+                    " HNumber='" + HNumber + "'" +
+                    ",HName='" + HName + "'" +
+                    ",HShortNumber='" + HShortNumber + "'" +
+                    ",HHelpCode='" + HHelpCode + "'" +
+                    ",HStopflag='" + HStopflag + "'" +
+                    ",HRemark= '" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
+                //淇敼瀛愰」鐩唬鐮�
+                //oCN.RunProc("exec h_p_Gy_UpdateNumber Gy_RepairCheck,'" + HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
+
+                oCN.Commit();
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "淇敼鎴愬姛锛�";
+                //objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.Message;
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 缁翠慨楠屾敹椤圭洰鏂板淇濆瓨
+        [Route("Gy_RepairCheck/AddBill")]
+        [HttpPost]
+        public object AddBill([FromBody] JObject oMain)
+        {
+            try
+            {
+                var _value = oMain["oMain"].ToString();
+                string msg1 = _value.ToString();
+                string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+                string msg2 = sArray[0].ToString();
+                string msg3 = sArray[1].ToString();//褰撳墠浜�
+
+                //鍙嶅簭鍒楀寲
+                msg2 = "[" + msg2.ToString() + "]";
+
+                List<Models.ClsGy_RepairCheck> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsGy_RepairCheck>>(msg2);
+
+                string HNumber = list[0].HNumber;
+                string HName = list[0].HName;
+                string HShortNumber = list[0].HNumber;
+                long HLevel = list[0].HLevel;
+                string HHelpCode = list[0].HHelpCode;
+                string HRemark = list[0].HRemark;
+                bool HStopflag = list[0].HStopflag;
+                string HUseFlag = list[0].HUseFlag;
+                bool HEndFlag = list[0].HEndFlag;
+
+                //鍒ゆ柇鏉冮檺
+                if (!ClsPub.Security_Log("Gy_RepairCheck_Edit", 1, true, msg3))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鎵惧埌璇ュ姛鑳芥ā鍧楋紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (!DBUtility.ClsPub.AllowNumber(HNumber))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "浠g爜涓笉鑳藉嚭鐜拌繛缁��.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+
+                //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+                oCN.BeginTran();
+                //涓昏〃
+                oCN.RunProc("Insert into Gy_RepairCheck " +
+                   " (HNumber,HName,HHelpCode,HShortNumber" +
+                   ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime) " +
+                   " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," +
+                    +HLevel + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "',getdate())", ref DBUtility.ClsPub.sExeReturnInfo);
+                //淇敼涓婄骇涓洪潪鏈骇浠g爜
+                //oCN.RunProc("Update Gy_MouldType set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+                oCN.Commit();
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鏂板鎴愬姛锛�";
+                //objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.Message;
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+    }
+}
diff --git a/WebAPI/Models/ClsGy_DotCheck.cs b/WebAPI/Models/ClsGy_DotCheck.cs
new file mode 100644
index 0000000..9f84d7c
--- /dev/null
+++ b/WebAPI/Models/ClsGy_DotCheck.cs
@@ -0,0 +1,23 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace WebAPI.Models
+{
+    public class ClsGy_DotCheck : DBUtility.ClsGy_Base_Ctl
+    {
+        public int HItemID;
+        public string HNumber;          //浠g爜
+        public string HName;             //鍚嶇О
+        public string HHelpCode;    //鍔╄鐮�
+        public string HShortNumber;   //鐭唬鐮�
+        public int HParentID;       //鐖剁骇
+        public int HLevel;         //绛夌骇
+        public bool HEndFlag;        //鏈骇鏍囧織
+        public bool HStopflag;      //绂佺敤鏍囧織
+        public string HRemark;         //澶囨敞
+        public string HUseFlag = "鏈娇鐢�";
+
+    }
+}
\ No newline at end of file
diff --git a/WebAPI/Models/ClsGy_Maintain.cs b/WebAPI/Models/ClsGy_Maintain.cs
new file mode 100644
index 0000000..6e6a924
--- /dev/null
+++ b/WebAPI/Models/ClsGy_Maintain.cs
@@ -0,0 +1,24 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace WebAPI.Models
+{
+    public class ClsGy_Maintain : DBUtility.ClsGy_Base_Ctl
+    {
+        public int HItemID;
+        public string HNumber;          //浠g爜
+        public string HName;             //鍚嶇О
+        public string HHelpCode;    //鍔╄鐮�
+        public string HShortNumber;   //鐭唬鐮�
+        public int HParentID;       //鐖剁骇
+        public int HLevel;         //绛夌骇
+        public bool HEndFlag;        //鏈骇鏍囧織
+        public bool HStopflag;      //绂佺敤鏍囧織
+        public string HRemark;         //澶囨敞
+        public string HUseFlag = "鏈娇鐢�";
+
+        
+    }
+}
\ No newline at end of file
diff --git a/WebAPI/Models/ClsGy_Repair.cs b/WebAPI/Models/ClsGy_Repair.cs
new file mode 100644
index 0000000..6a90027
--- /dev/null
+++ b/WebAPI/Models/ClsGy_Repair.cs
@@ -0,0 +1,22 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace WebAPI.Models
+{
+    public class ClsGy_Repair : DBUtility.ClsGy_Base_Ctl
+    {
+        public int HItemID;
+        public string HNumber;          //浠g爜
+        public string HName;             //鍚嶇О
+        public string HHelpCode;    //鍔╄鐮�
+        public string HShortNumber;   //鐭唬鐮�
+        public int HParentID;       //鐖剁骇
+        public int HLevel;         //绛夌骇
+        public bool HEndFlag;        //鏈骇鏍囧織
+        public bool HStopflag;      //绂佺敤鏍囧織
+        public string HRemark;         //澶囨敞
+        public string HUseFlag = "鏈娇鐢�";
+    }
+}
\ No newline at end of file
diff --git a/WebAPI/Models/ClsGy_RepairCheck.cs b/WebAPI/Models/ClsGy_RepairCheck.cs
new file mode 100644
index 0000000..4d7f8c3
--- /dev/null
+++ b/WebAPI/Models/ClsGy_RepairCheck.cs
@@ -0,0 +1,24 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace WebAPI.Models
+{
+    public class ClsGy_RepairCheck : DBUtility.ClsGy_Base_Ctl
+    {
+        public int HItemID;
+        public string HNumber;          //浠g爜
+        public string HName;             //鍚嶇О
+        public string HHelpCode;    //鍔╄鐮�
+        public string HShortNumber;   //鐭唬鐮�
+        public int HParentID;       //鐖剁骇
+        public int HLevel;         //绛夌骇
+        public bool HEndFlag;        //鏈骇鏍囧織
+        public bool HStopflag;      //绂佺敤鏍囧織
+        public string HRemark;         //澶囨敞
+        public string HUseFlag = "鏈娇鐢�";
+
+
+    }
+}
\ No newline at end of file
diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
index c710f74..fbbba9b 100644
--- a/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
+++ b/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -18,25 +18,25 @@
       <publishTime>02/22/2013 08:43:40</publishTime>
     </File>
     <File Include="bin/BLL.dll">
-      <publishTime>11/02/2021 16:45:08</publishTime>
+      <publishTime>11/03/2021 17:04:35</publishTime>
     </File>
     <File Include="bin/BLL.pdb">
-      <publishTime>11/02/2021 16:45:08</publishTime>
+      <publishTime>11/03/2021 17:04:35</publishTime>
     </File>
     <File Include="bin/DAL.dll">
-      <publishTime>11/02/2021 16:45:06</publishTime>
+      <publishTime>11/03/2021 17:04:33</publishTime>
     </File>
     <File Include="bin/DAL.pdb">
-      <publishTime>11/02/2021 16:45:06</publishTime>
+      <publishTime>11/03/2021 17:04:33</publishTime>
     </File>
     <File Include="bin/Dapper.dll">
       <publishTime>07/22/2016 14:52:40</publishTime>
     </File>
     <File Include="bin/DBUtility.dll">
-      <publishTime>11/02/2021 16:45:02</publishTime>
+      <publishTime>11/03/2021 17:04:29</publishTime>
     </File>
     <File Include="bin/DBUtility.pdb">
-      <publishTime>11/02/2021 16:45:02</publishTime>
+      <publishTime>11/03/2021 17:04:29</publishTime>
     </File>
     <File Include="bin/Interop.gregn6Lib.dll">
       <publishTime>08/25/2021 10:28:25</publishTime>
@@ -60,10 +60,10 @@
       <publishTime>07/25/2012 11:48:56</publishTime>
     </File>
     <File Include="bin/Model.dll">
-      <publishTime>11/02/2021 16:45:02</publishTime>
+      <publishTime>11/03/2021 17:04:29</publishTime>
     </File>
     <File Include="bin/Model.pdb">
-      <publishTime>11/02/2021 16:45:02</publishTime>
+      <publishTime>11/03/2021 17:04:29</publishTime>
     </File>
     <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
       <publishTime>08/16/2021 17:23:15</publishTime>
@@ -72,22 +72,22 @@
       <publishTime>08/03/2014 20:33:56</publishTime>
     </File>
     <File Include="bin/Pub_Class.dll">
-      <publishTime>11/02/2021 16:44:59</publishTime>
+      <publishTime>11/03/2021 17:04:27</publishTime>
     </File>
     <File Include="bin/Pub_Class.pdb">
-      <publishTime>11/02/2021 16:44:59</publishTime>
+      <publishTime>11/03/2021 17:04:27</publishTime>
     </File>
     <File Include="bin/Pub_Control.dll">
-      <publishTime>11/02/2021 16:45:00</publishTime>
+      <publishTime>11/03/2021 17:04:28</publishTime>
     </File>
     <File Include="bin/Pub_Control.pdb">
-      <publishTime>11/02/2021 16:45:00</publishTime>
+      <publishTime>11/03/2021 17:04:28</publishTime>
     </File>
     <File Include="bin/SQLHelper.dll">
-      <publishTime>11/02/2021 16:45:01</publishTime>
+      <publishTime>11/03/2021 17:04:28</publishTime>
     </File>
     <File Include="bin/SQLHelper.pdb">
-      <publishTime>11/02/2021 16:45:01</publishTime>
+      <publishTime>11/03/2021 17:04:28</publishTime>
     </File>
     <File Include="bin/stdole.dll">
       <publishTime>05/09/2021 13:35:37</publishTime>
@@ -189,10 +189,10 @@
       <publishTime>11/24/2014 11:18:48</publishTime>
     </File>
     <File Include="bin/WebAPI.dll">
-      <publishTime>11/02/2021 16:45:11</publishTime>
+      <publishTime>11/03/2021 17:04:38</publishTime>
     </File>
     <File Include="bin/WebAPI.pdb">
-      <publishTime>11/02/2021 16:45:11</publishTime>
+      <publishTime>11/03/2021 17:04:38</publishTime>
     </File>
     <File Include="bin/WebGrease.dll">
       <publishTime>07/17/2013 17:03:52</publishTime>
@@ -363,7 +363,7 @@
       <publishTime>08/06/2021 22:57:28</publishTime>
     </File>
     <File Include="Web.config">
-      <publishTime>11/02/2021 16:45:28</publishTime>
+      <publishTime>11/03/2021 17:05:39</publishTime>
     </File>
   </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index b9a1b09..d39d945 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -381,6 +381,10 @@
     <Compile Include="Controllers\XSGL\Xs_SeOrderBillController.cs" />
     <Compile Include="Controllers\鍝佽川绠$悊\宸ュ簭妫�楠屽崟\QC_ProcessCheckBillController.cs" />
     <Compile Include="Controllers\鍝佽川绠$悊\棣栦欢妫�楠屽崟\QC_FirstPieceCheckBillController.cs" />
+    <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_DotCheckBillController.cs" />
+    <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_MaintainBillController.cs" />
+    <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_RepairBillController.cs" />
+    <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_RepairCheckBillController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\宸ヨ祫鍩虹璧勬枡\Gy_ProcPriceController.cs" />
     <Compile Include="Controllers\鐢熶骇绠$悊\鐢熶骇浠诲姟鍗昞Sc_ICMOBillController.cs" />
     <Compile Include="Controllers\鐢熶骇绠$悊\璐ㄩ噺姹囨姤鍗昞Sc_QualityReportBillController.cs" />
@@ -435,6 +439,10 @@
     <Compile Include="Models\ApiConfig.cs" />
     <Compile Include="Models\ApiResult.cs" />
     <Compile Include="Models\CheckItem.cs" />
+    <Compile Include="Models\ClsGy_DotCheck.cs" />
+    <Compile Include="Models\ClsGy_Maintain.cs" />
+    <Compile Include="Models\ClsGy_Repair.cs" />
+    <Compile Include="Models\ClsGy_RepairCheck.cs" />
     <Compile Include="Models\Gy_OrderBackInfo.cs" />
     <Compile Include="Models\Gy_OrderLevList.cs" />
     <Compile Include="Models\ClsGy_EquipFileMain.cs" />

--
Gitblit v1.9.1