From 92a93a399f8c8481a9cc2f2e46b89ee0b45a98ec Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期二, 06 五月 2025 13:14:43 +0800
Subject: [PATCH] 2025/5/6 提交

---
 NETERPNoWin/bin/Debug/DBUtility.dll                                 |    0 
 NETERPNoWin/bin/Debug/NETERPNoWin.pdb                               |    0 
 PayM/bin/Debug/Interop.gregn6Lib.dll                                |    0 
 NETERPNoWin/bin/Debug/PlanM.pdb                                     |    0 
 WebAPI/Controllers/SBGL/Sb_EquipPatrolCheckBillController.cs        |  161 +-
 NETERPNoWin/bin/Debug/DBUtility.pdb                                 |    0 
 PayM/bin/Debug/DAL.pdb                                              |    0 
 WebAPI/Controllers/SBGL/Sb_EquipPatrolCheckRuleBillController.cs    | 1163 ++++++++++++++++++++
 PayM/obj/Debug/Interop.gregn6Lib.dll                                |    0 
 NETERPNoWin/bin/Debug/Pub_Control.dll                               |    0 
 Model/obj/Release/Model.pdb                                         |    0 
 BLL/bin/Release/BLL.pdb                                             |    0 
 PayM/bin/Debug/Pub_Class.dll                                        |    0 
 NETERPNoWin/bin/Debug/Pub_Control.pdb                               |    0 
 PayM/obj/Debug/PayM.dll                                             |    0 
 WebAPI/ListModels.cs                                                |   95 +
 WebAPI/WebAPI.csproj                                                |    8 
 PayM/bin/Debug/Pub_Control.pdb                                      |    0 
 PayM/obj/Debug/AxInterop.gregn6Lib.dll                              |    0 
 NETERPNoWin/bin/Debug/SQLHelper.dll                                 |    0 
 PayM/obj/Debug/PayM.pdb                                             |    0 
 Model/Model.csproj                                                  |    2 
 NETERPNoWin/bin/Debug/BLL.dll                                       |    0 
 WebAPI/Models/ClsSb_EquipPatrolCheckRuleBillMain.cs                 |   18 
 NETERPNoWin/bin/Debug/SQLHelper.pdb                                 |    0 
 PayM/bin/Debug/Pub_Control.dll                                      |    0 
 PayM/bin/Debug/AxInterop.gregn6Lib.dll                              |    0 
 NETERPNoWin/bin/Debug/OAM.pdb                                       |    0 
 BLL/bin/Release/BLL.dll                                             |    0 
 NETERPNoWin/bin/Debug/OAM.dll                                       |    0 
 PayM/bin/Debug/Pub_Class.pdb                                        |    0 
 sdk_dingding/TopSdk/bin/Debug/TopSdk.pdb                            |    0 
 Model/obj/Release/Model.dll                                         |    0 
 WebAPI/Controllers/SBGL/Sb_EquipPatrolCheckPlanBillController.cs    |  845 ++++++++++++++
 PayM/bin/Debug/Model.dll                                            |    0 
 NETERPNoWin/bin/Debug/NETERPNoWin.exe                               |    0 
 PayM/bin/Debug/Model.pdb                                            |    0 
 Model/obj/Release/Model.csproj.AssemblyReference.cache              |    0 
 PayM/bin/Debug/DAL.dll                                              |    0 
 NETERPNoWin/bin/Debug/Kanban.dll                                    |    0 
 NETERPNoWin/bin/Debug/Kanban.pdb                                    |    0 
 NETERPNoWin/bin/Debug/BLL.pdb                                       |    0 
 NETERPNoWin/bin/Debug/Interop.gregn6Lib.dll                         |    0 
 Model/生产管理/设备管理/ClsSb_EquipPatrolCheckPlanBillSub.cs                |   27 
 NETERPNoWin/obj/Debug/Interop.gregn6Lib.dll                         |    0 
 SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt |    1 
 BLL/bin/Release/DAL.dll                                             |    0 
 NETERPNoWin/bin/Debug/BaseSet.dll                                   |    0 
 NETERPNoWin/bin/Debug/Model.pdb                                     |    0 
 DAL/bin/Release/Model.dll                                           |    0 
 DAL/生产管理/设备管理/ClsSb_EquipPatrolCheckBill.cs                         |   14 
 NETERPNoWin/bin/Debug/DAL.pdb                                       |    0 
 WebAPI/Properties/PublishProfiles/FolderProfile1.pubxml.user        |   20 
 PayM/bin/Debug/DBUtility.dll                                        |    0 
 NETERPNoWin/bin/Debug/Model.dll                                     |    0 
 DAL/bin/Release/DAL.pdb                                             |    0 
 WebAPI/Models/ClsSb_EquipPatrolCheckBillMain.cs                     |   27 
 BLL/bin/Release/Model.dll                                           |    0 
 BLL/bin/Release/DAL.pdb                                             |    0 
 NETERPNoWin/bin/Debug/BaseSet.pdb                                   |    0 
 BLL/bin/Release/Model.pdb                                           |    0 
 DAL/bin/Release/DAL.dll                                             |    0 
 NETERPNoWin/obj/Debug/NETERPNoWin.exe                               |    0 
 DAL/bin/Release/Model.pdb                                           |    0 
 NETERPNoWin/bin/Debug/DAL.dll                                       |    0 
 Model/生产管理/设备管理/ClsSb_EquipPatrolCheckPlanBillMain.cs               |   22 
 sdk_dingding/TopSdk/bin/Debug/TopSdk.dll                            |    0 
 NETERPNoWin/bin/Debug/WorkM.pdb                                     |    0 
 PayM/bin/Debug/PayM.dll                                             |    0 
 sdk_dingding/TopSdk/obj/Debug/TopSdk.dll                            |    0 
 DBUtility/obj/Release/DBUtility.csproj.AssemblyReference.cache      |    0 
 NETERPNoWin/bin/Debug/WorkM.dll                                     |    0 
 sdk_dingding/TopSdk/obj/Debug/TopSdk.pdb                            |    0 
 DAL/DAL.csproj                                                      |    1 
 PayM/bin/Debug/DBUtility.pdb                                        |    0 
 PayM/bin/Debug/PayM.pdb                                             |    0 
 WebAPI/Models/ClsGy_PatrolCheck.cs                                  |    2 
 PayM/bin/Debug/SQLHelper.dll                                        |    0 
 NETERPNoWin/bin/Debug/WarM.dll                                      |    0 
 PayM/bin/Debug/BLL.pdb                                              |    0 
 PayM/bin/Debug/SQLHelper.pdb                                        |    0 
 SQLHelper/obj/Release/SQLHelper.csproj.AssemblyReference.cache      |    0 
 PayM/bin/Debug/BLL.dll                                              |    0 
 WebAPI/Controllers/基础资料/基础资料/Gy_PatrolCheckBillController.cs        |   10 
 WebAPI/DLL/ClsSb_EquipPatrolCheckRuleBill.cs                        |  276 ++++
 WebAPI/DLL/ClsSb_EquipPatrolCheckBill.cs                            |  343 +++++
 WebAPI/Models/ClsSb_EquipPatrolCheckRuleBillSub.cs                  |   19 
 DAL/生产管理/设备管理/ClsSb_EquipPatrolCheckPlanBill.cs                     |  336 +++++
 Model/bin/Release/Model.pdb                                         |    0 
 WebAPI/Models/ClsSb_EquipPatrolCheckBillSub.cs                      |   34 
 NETERPNoWin/bin/Debug/Pub_Class.dll                                 |    0 
 Model/bin/Release/Model.dll                                         |    0 
 NETERPNoWin/obj/Debug/NETERPNoWin.pdb                               |    0 
 /dev/null                                                           |    0 
 NETERPNoWin/bin/Debug/PlanM.dll                                     |    0 
 NETERPNoWin/bin/Debug/Pub_Class.pdb                                 |    0 
 NETERPNoWin/bin/Debug/WarM.pdb                                      |    0 
 97 files changed, 3,320 insertions(+), 104 deletions(-)

diff --git a/BLL/bin/Release/BLL.dll b/BLL/bin/Release/BLL.dll
index aa1931f..ae60a00 100644
--- a/BLL/bin/Release/BLL.dll
+++ b/BLL/bin/Release/BLL.dll
Binary files differ
diff --git a/BLL/bin/Release/BLL.pdb b/BLL/bin/Release/BLL.pdb
index 58360c7..3bbc255 100644
--- a/BLL/bin/Release/BLL.pdb
+++ b/BLL/bin/Release/BLL.pdb
Binary files differ
diff --git a/BLL/bin/Release/DAL.dll b/BLL/bin/Release/DAL.dll
index 07d197b..40c065f 100644
--- a/BLL/bin/Release/DAL.dll
+++ b/BLL/bin/Release/DAL.dll
Binary files differ
diff --git a/BLL/bin/Release/DAL.pdb b/BLL/bin/Release/DAL.pdb
index 95963f1..4f9656a 100644
--- a/BLL/bin/Release/DAL.pdb
+++ b/BLL/bin/Release/DAL.pdb
Binary files differ
diff --git a/BLL/bin/Release/Model.dll b/BLL/bin/Release/Model.dll
index c0df88f..80bbbe6 100644
--- a/BLL/bin/Release/Model.dll
+++ b/BLL/bin/Release/Model.dll
Binary files differ
diff --git a/BLL/bin/Release/Model.pdb b/BLL/bin/Release/Model.pdb
index e15aba4..7f20d6f 100644
--- a/BLL/bin/Release/Model.pdb
+++ b/BLL/bin/Release/Model.pdb
Binary files differ
diff --git a/DAL/DAL.csproj b/DAL/DAL.csproj
index d6b4f6b..db70962 100644
--- a/DAL/DAL.csproj
+++ b/DAL/DAL.csproj
@@ -102,6 +102,7 @@
     <Compile Include="婧愬崟\InterFace婧愬崟\Cls_S_IF_ICMOReportBillList_CusBarCodeBill.cs" />
     <Compile Include="鐢熶骇绠$悊\鎺掍骇瑙i攣鐢宠鍗昞ClsJIT_UnLockRequestBill.cs" />
     <Compile Include="鐢熶骇绠$悊\鎺掍骇閿佸畾鐢宠鍗昞ClsJIT_LockRequestBill.cs" />
+    <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipPatrolCheckPlanBill.cs" />
     <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipPatrolCheckBill.cs" />
     <Compile Include="绯荤粺鍏敤\ClsXt_DefineBillMainSet.cs" />
     <Compile Include="璁″垝绠$悊\ClsGy_SourceMouldBillMain.cs" />
diff --git a/DAL/bin/Release/DAL.dll b/DAL/bin/Release/DAL.dll
index 07d197b..40c065f 100644
--- a/DAL/bin/Release/DAL.dll
+++ b/DAL/bin/Release/DAL.dll
Binary files differ
diff --git a/DAL/bin/Release/DAL.pdb b/DAL/bin/Release/DAL.pdb
index 95963f1..4f9656a 100644
--- a/DAL/bin/Release/DAL.pdb
+++ b/DAL/bin/Release/DAL.pdb
Binary files differ
diff --git a/DAL/bin/Release/Model.dll b/DAL/bin/Release/Model.dll
index c0df88f..80bbbe6 100644
--- a/DAL/bin/Release/Model.dll
+++ b/DAL/bin/Release/Model.dll
Binary files differ
diff --git a/DAL/bin/Release/Model.pdb b/DAL/bin/Release/Model.pdb
index e15aba4..7f20d6f 100644
--- a/DAL/bin/Release/Model.pdb
+++ b/DAL/bin/Release/Model.pdb
Binary files differ
diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipPatrolCheckBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipPatrolCheckBill.cs"
index 50b54a3..4a92dd2 100644
--- "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipPatrolCheckBill.cs"
+++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipPatrolCheckBill.cs"
@@ -18,8 +18,8 @@
             base.MvarItemKeySub4 = "";
             base.MvarItemKey="Sb_EquipPatrolCheckBillMain";
             base.MvarReportTitle="璁惧宸℃璁板綍";
-            base.BillType = "3903";
-            base.HBillSubType = "3903";
+            base.BillType = "5014";
+            base.HBillSubType = "5014";
 
         }
 
@@ -89,13 +89,13 @@
                      "HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
                      "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
                      "HPatrolCheckItemID,HPatrolCheckItem,HPatrolCheckPart,HClaim," +
-                     "HManagerID,HManagerNumber,HPatrolCheckItemClassID,HPatrolCheckItemMethodID,HPatrolCheckResult" +
+                     "HManagerID,HPatrolCheckItemClassID,HPatrolCheckItemMethodID,HPatrolCheckResult" +
                      ") values("
                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() +
                      ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
                      "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                      ",'" + oSub.HPatrolCheckItemID + "','" + oSub.HPatrolCheckItem + "','" + oSub.HPatrolCheckPart + "','" + oSub.HClaim +
-                     "'," + oSub.HManagerID.ToString() + ",'" + oSub.HManagerNumber + "'," + oSub.HPatrolCheckItemClassID + "," + oSub.HPatrolCheckItemMethodID + ",'" + oSub.HPatrolCheckResult + "'" +
+                     "'," + oSub.HManagerID.ToString() + "," + oSub.HPatrolCheckItemClassID + "," + oSub.HPatrolCheckItemMethodID + ",'" + oSub.HPatrolCheckResult + "'" +
                      ") ");
                 }
                 //
@@ -184,13 +184,13 @@
                       "HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
                       "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
                       "HPatrolCheckItemID,HPatrolCheckItem,HPatrolCheckPart,HClaim," +
-                      "HManagerID,HManagerNumber,HPatrolCheckItemClassID,HPatrolCheckItemMethodID,HPatrolCheckResult" +
+                      "HManagerID,HPatrolCheckItemClassID,HPatrolCheckItemMethodID,HPatrolCheckResult" +
                       ") values("
                       + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() +
                       ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
                       "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                       ",'" + oSub.HPatrolCheckItemID+"','"+oSub.HPatrolCheckItem + "','" + oSub.HPatrolCheckPart + "','" + oSub.HClaim +
-                      "'," + oSub.HManagerID.ToString() + ",'" + oSub.HManagerNumber + "'," + oSub.HPatrolCheckItemClassID + "," + oSub.HPatrolCheckItemMethodID + ",'" + oSub.HPatrolCheckResult + "'" +
+                      "'," + oSub.HManagerID.ToString() + "," + oSub.HPatrolCheckItemClassID + "," + oSub.HPatrolCheckItemMethodID + ",'" + oSub.HPatrolCheckResult + "'" +
                       ") ");
                 }
                 //鐐规瀹屾垚锛屽弽鍐欒澶囩偣妫�璁″垝鍗曞瓙琛ㄦ槸鍚︾偣妫�鏍囪
@@ -326,7 +326,7 @@
                     //oSub.HUnitName = DsSub.Tables[0].Rows[i]["HUnitName"].ToString().Trim();
                     //oSub.HSeOrderBillNo = DsSub.Tables[0].Rows[i]["HSeOrderBillNo"].ToString().Trim();
                     oSub.HManagerID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HManagerID"]);
-                    oSub.HManagerNumber = DsSub.Tables[0].Rows[i]["HManagerNumber"].ToString().Trim();
+                    //oSub.HManagerNumber = DsSub.Tables[0].Rows[i]["HManagerNumber"].ToString().Trim();
                     //oSub.HManagerName = DsSub.Tables[0].Rows[i]["HManagerName"].ToString().Trim();
                     //oSub.HICMOBillNo = DsSub.Tables[0].Rows[i]["HICMOBillNo"].ToString().Trim();
                     
diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipPatrolCheckPlanBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipPatrolCheckPlanBill.cs"
new file mode 100644
index 0000000..226201c
--- /dev/null
+++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipPatrolCheckPlanBill.cs"
@@ -0,0 +1,336 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+    public  class ClsSb_EquipPatrolCheckPlanBill:DBUtility.ClsXt_BaseBill
+    {
+        public Model.ClsSb_EquipPatrolCheckPlanBillMain omodel = new Model.ClsSb_EquipPatrolCheckPlanBillMain();
+        public List<Model.ClsSb_EquipPatrolCheckPlanBillSub> DetailColl = new List<Model.ClsSb_EquipPatrolCheckPlanBillSub>();
+
+        public ClsSb_EquipPatrolCheckPlanBill()
+        {
+            base.MvarItemKeySub = "Sb_EquipPatrolCheckPlanBillSub";
+            base.MvarItemKeySub2 = "";
+            base.MvarItemKeySub3 = "";
+            base.MvarItemKeySub4 = "";
+            base.MvarItemKey="Sb_EquipPatrolCheckPlanBillMain";
+            base.MvarReportTitle="璁惧宸℃璁″垝";
+            base.BillType = "5015";
+            base.HBillSubType = "5015";
+
+        }
+
+        #region 鍥哄畾浠g爜
+
+        ~ClsSb_EquipPatrolCheckPlanBill()
+        {
+            DetailColl = null;
+        }
+       
+        #endregion   鑷畾涔夋柟娉�
+        //淇敼鍗曟嵁
+        public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
+        {
+            try
+            {
+                //淇濆瓨鍓嶆帶鍒�=========================================
+                string HBillNote = "";
+                DataSet ds = oCn.RunProcReturn("Exec h_p_Sb_EquipPatrolCheckPlanBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Sb_EquipPatrolCheckPlanBill_BeforeSaveCtrl");
+                if (ds == null)
+                {
+                    sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+                    return false;
+                }
+                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+                    return false;
+                }
+                //=========================================================
+                oCn.BeginTran();
+                //鏇存柊涓昏〃
+                oCn.RunProc("UpDate Sb_EquipPatrolCheckPlanBillMain set  " +
+                " HBillNo='" + omodel.HBillNo + "'" +  //鍥哄畾璧嬪��===============
+                ",HYear='" + omodel.HYear.ToString() + "'" +
+                ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
+                ",HRemark='" + omodel.HRemark + "'" +
+                ",HUpDater='" + omodel.HMaker + "'" +
+                ",HUpDateDate=getdate()" +
+                //========================================
+                ",HEquipID=" + omodel.HEquipID.ToString() +
+                ",HBeginDate='" + omodel.HBeginDate + "'" +
+                ",HEndDate='" + omodel.HEndDate+"'" +
+                ",HMouldPatrolCheckRuleID='" + omodel.HMouldPatrolCheckRuleID + "'" +
+                ",HCycleUnit='" + omodel.HCycleUnit + "'" +
+                ",HCheckCycle=" + omodel.HCheckCycle.ToString() +
+                ",HExplanation='" + omodel.HExplanation+"'" +
+                ",HInnerBillNo='" + omodel.HInnerBillNo+"'" +
+                ",HUSEORGID=" + omodel.HUSEORGID +
+                //",HCREATEORGID=" + omodel.HCREATEORGID +
+                ",HDeptID=" + omodel.HDeptID +
+                " where HInterID=" + lngBillKey.ToString());
+                //鍒犻櫎鍏宠仈
+                DeleteRelation(ref sReturn, lngBillKey);
+                //鍒犻櫎瀛愯〃
+                DeleteBillSub(lngBillKey);
+                //鎻掑叆瀛愯〃
+                omodel.HInterID = lngBillKey;
+                foreach (Model.ClsSb_EquipPatrolCheckPlanBillSub oSub in DetailColl)
+                {
+                    oCn.RunProc("Insert into Sb_EquipPatrolCheckPlanBillSub " +
+                      " (HInterID,HEntryID," +
+                      "HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
+                      "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
+                      "HPatrolCheckItem,HPatrolCheckPart,HClaim," +
+                      "HManagerID,HPatrolCheckItemClassID,HPatrolCheckItemMethodID" +
+                      ") values("
+                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() +
+                      ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
+                      "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+                      ",'" + oSub.HPatrolCheckItem + "','" + oSub.HPatrolCheckPart + "','" + oSub.HClaim +
+                      "'," + oSub.HManagerID.ToString() + "," + oSub.HPatrolCheckItemClassID + "," + oSub.HPatrolCheckItemMethodID +
+                      ") ");
+                }
+                //
+                //foreach (Model.ClsSb_EquipPatrolCheckPlanBillSub oSub in DetailColl)
+                //{
+                //    Ds = oCn.RunProcReturn("exec h_p_Sb_EquipPatrolCheckPlanBill_Qty " + oSub.HICMOInterID, "");
+                //    if (Ds.Tables[0].Rows.Count == 0)
+                //        return;
+                //    if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y")
+                //    {
+                //        sReturn = "姹囨姤鏁伴噺瓒呰繃璁″垝鏁伴噺锛佷笉鍏佽淇濆瓨";
+                //        return false;
+                //    }
+                //}
+                //=========================淇濆瓨鍚庢帶鍒�  
+                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sb_EquipPatrolCheckPlanBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Sb_EquipPatrolCheckRuleBill_AfterSaveCtrl");
+                if (ds2 == null)
+                {
+                    sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒";
+                    oCn.RollBack();
+                    return false;
+                }
+                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
+                    oCn.RollBack();
+                    return false;
+                }
+                //============================
+                sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+        //鏂板鍗曟嵁
+        public override bool AddBill(ref string sReturn)
+        {
+            try
+            {
+                //淇濆瓨鍓嶆帶鍒�=========================================
+                string HBillNote = "";
+                DataSet ds = oCn.RunProcReturn("Exec h_p_Sb_EquipPatrolCheckPlanBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Sb_EquipPatrolCheckPlanBill_BeforeSaveCtrl");
+                if (ds == null)
+                {
+                    sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+                    return false;
+                }
+                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+                    return false;
+                }
+                //=========================================================
+                //寰楀埌mainid
+                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+                //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+                oCn.BeginTran();
+                //涓昏〃
+                oCn.RunProc("Insert Into Sb_EquipPatrolCheckPlanBillMain   " +
+                "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
+                ",HYear,HPeriod,HRemark,HEquipID" +
+                ",HBeginDate,HEndDate,HCheckCycle,HCycleUnit,HExplanation,HInnerBillNo,HMouldPatrolCheckRuleID" +
+                ",HUSEORGID,HCREATEORGID,HDeptID" +
+                ") " +
+                " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
+                "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," + omodel.HEquipID.ToString() +
+                ",'" + omodel.HBeginDate +"','" +omodel.HEndDate + "'," + omodel.HCheckCycle.ToString() +",'"+ omodel.HCycleUnit + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo +"','" + omodel.HMouldPatrolCheckRuleID + "',"+ omodel.HUSEORGID + "," + omodel.HCREATEORGID + "," + omodel.HDeptID +
+                ") ");
+                //鎻掑叆瀛愯〃
+                foreach (Model.ClsSb_EquipPatrolCheckPlanBillSub oSub in DetailColl)
+                {
+                    oCn.RunProc("Insert into Sb_EquipPatrolCheckPlanBillSub " +
+                      " (HInterID,HEntryID," +
+                      "HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
+                      "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
+                      "HPatrolCheckItem,HPatrolCheckPart,HClaim," +
+                      "HManagerID,HPatrolCheckItemClassID,HPatrolCheckItemMethodID" +
+                      ") values("
+                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() +
+                      ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
+                      "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+                      ",'" + oSub.HPatrolCheckItem + "','" + oSub.HPatrolCheckPart + "','" + oSub.HClaim +
+                      "'," + oSub.HManagerID.ToString() + "," + oSub.HPatrolCheckItemClassID + "," + oSub.HPatrolCheckItemMethodID + 
+                      ") ");
+                }
+                //
+                //foreach (Model.ClsSb_EquipPatrolCheckPlanBillSub oSub in DetailColl)
+                //{
+                //    Ds = oCn.RunProcReturn("exec h_p_Sb_EquipPatrolCheckPlanBill_Qty " + oSub.HICMOInterID, "");
+                //    if (Ds.Tables[0].Rows.Count == 0)
+                //        return;
+                //    if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y")
+                //    {
+                //        sReturn = "姹囨姤鏁伴噺瓒呰繃璁″垝鏁伴噺锛佷笉鍏佽淇濆瓨";
+                //        return false;
+                //    }
+                //}
+                //
+
+                //=========================淇濆瓨鍚庢帶鍒�  
+                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sb_EquipPatrolCheckPlanBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Sb_EquipPatrolCheckRuleBill_AfterSaveCtrl");
+                if (ds2 == null)
+                {
+                    sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒";
+                    oCn.RollBack();
+                    return false;
+                }
+                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
+                    oCn.RollBack();
+                    return false;
+                }
+                //============================
+                sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+        //鏄剧ず鍗曟嵁
+        public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
+        {
+            try
+            {
+                //鏌ヨ涓昏〃
+                DataSet Ds ;
+                Ds = oCn.RunProcReturn("Select * from Sb_EquipPatrolCheckPlanBillMain Where HInterID=" + lngBillKey.ToString(), "Sb_EquipPatrolCheckPlanBillMain");
+                if(Ds.Tables[0].Rows.Count==0)
+                {
+                    sReturn = "鍗曟嵁鏈壘鍒帮紒";
+                    return false;
+                }
+                //鍥哄畾璧嬪��===========================================
+                omodel.HInterID =DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
+                omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
+                omodel.HDate =DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
+                omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
+                omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
+                omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
+                omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
+                omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
+                omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
+                omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
+                omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
+                omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
+                omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
+                omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
+                omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
+                omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
+                omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
+                omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
+                omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
+                omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
+                omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
+                omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
+                omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
+                omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
+                //========================================================
+                //==
+                omodel.HEquipID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HEquipID"]);
+                omodel.HBeginDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HBeginDate"]);
+                omodel.HEndDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HEndDate"]);
+                omodel.HCycleUnit = Ds.Tables[0].Rows[0]["HCycleUnit"].ToString().Trim();
+                omodel.HCheckCycle = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckCycle"]);
+                omodel.HExplanation = Ds.Tables[0].Rows[0]["HExplanation"].ToString().Trim();
+                omodel.HInnerBillNo = Ds.Tables[0].Rows[0]["HInnerBillNo"].ToString().Trim();
+                //
+                
+                //寰幆
+                DataSet DsSub ;
+                DsSub = oCn.RunProcReturn("Select * from Sb_EquipPatrolCheckPlanBillSub Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "Sb_EquipPatrolCheckPlanBillSub");
+                DetailColl.Clear();//娓呯┖
+                for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+                {
+                    Model.ClsSb_EquipPatrolCheckPlanBillSub oSub = new Model.ClsSb_EquipPatrolCheckPlanBillSub();
+                    // 鍥哄畾璧嬪��===============================================
+                    oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
+                    oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
+                    oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
+                    oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
+                    oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
+                    oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
+                    oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
+                    oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]); 
+                    oSub.HCloseMan =  DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
+                    oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
+                    oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
+                    oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
+                    //===================================================
+                    //oSub.HWorkerID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWorkerID"]);
+                    //oSub.HWorkerNumber = DsSub.Tables[0].Rows[i]["HWorkerNumber"].ToString().Trim();
+                    //oSub.HSourceID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceID"]);
+                    //oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"]);
+                    //oSub.HMaterNumber = DsSub.Tables[0].Rows[i]["HMaterNumber"].ToString().Trim();
+                    //oSub.HMaterName = DsSub.Tables[0].Rows[i]["HMaterName"].ToString().Trim();
+                    //oSub.HMaterModel = DsSub.Tables[0].Rows[i]["HMaterModel"].ToString().Trim();
+                    oSub.HPatrolCheckItem = DsSub.Tables[0].Rows[i]["HPatrolCheckItem"].ToString().Trim();
+                    oSub.HPatrolCheckPart = DsSub.Tables[0].Rows[i]["HPatrolCheckPart"].ToString().Trim();
+                    //oSub.HBeginDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HBeginDate"]);
+                    //oSub.HEndDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEndDate"]);
+                    //oSub.HTimes = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HTimes"]);
+                    oSub.HClaim = DsSub.Tables[0].Rows[i]["HClaim"].ToString().Trim();
+                    //oSub.HQtyMust = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQtyMust"]);
+                    //oSub.HBadCount = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HBadCount"]);
+                    //oSub.HWasterQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HWasterQty"]);
+                    //oSub.HUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUnitID"]);
+                    //oSub.HUnitNumber = DsSub.Tables[0].Rows[i]["HUnitNumber"].ToString().Trim();
+                    //oSub.HUnitName = DsSub.Tables[0].Rows[i]["HUnitName"].ToString().Trim();
+                    //oSub.HSeOrderBillNo = DsSub.Tables[0].Rows[i]["HSeOrderBillNo"].ToString().Trim();
+                    oSub.HManagerID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HManagerID"]);
+                    //oSub.HManagerNumber = DsSub.Tables[0].Rows[i]["HManagerNumber"].ToString().Trim();
+                    //oSub.HManagerName = DsSub.Tables[0].Rows[i]["HManagerName"].ToString().Trim();
+                    //oSub.HICMOBillNo = DsSub.Tables[0].Rows[i]["HICMOBillNo"].ToString().Trim();
+                    
+                    DetailColl.Add(oSub);
+                }
+                sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                throw (e);
+            }
+        }
+       
+        
+    }
+
+}
diff --git a/DBUtility/obj/Release/DBUtility.csproj.AssemblyReference.cache b/DBUtility/obj/Release/DBUtility.csproj.AssemblyReference.cache
index 4111cb7..0fc88f1 100644
--- a/DBUtility/obj/Release/DBUtility.csproj.AssemblyReference.cache
+++ b/DBUtility/obj/Release/DBUtility.csproj.AssemblyReference.cache
Binary files differ
diff --git a/Model/Model.csproj b/Model/Model.csproj
index 2840dcd..e2d7b9e 100644
--- a/Model/Model.csproj
+++ b/Model/Model.csproj
@@ -168,6 +168,8 @@
     <Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldMaintainPlanBillSub_Plan.cs" />
     <Compile Include="鐢熶骇绠$悊\鐢熶骇棰嗘枡\ClsKf_ProductReceiveMaterialBillMain.cs" />
     <Compile Include="鐢熶骇绠$悊\鐢熶骇棰嗘枡\ClsKf_ProductReceiveMaterialBillSub.cs" />
+    <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipPatrolCheckPlanBillSub.cs" />
+    <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipPatrolCheckPlanBillMain.cs" />
     <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipPatrolCheckBillSub.cs" />
     <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipPatrolCheckBillMain.cs" />
     <Compile Include="绯荤粺鍏敤\ClsXt_DefineBillMainSetSub.cs" />
diff --git a/Model/bin/Release/Model.dll b/Model/bin/Release/Model.dll
index c0df88f..80bbbe6 100644
--- a/Model/bin/Release/Model.dll
+++ b/Model/bin/Release/Model.dll
Binary files differ
diff --git a/Model/bin/Release/Model.pdb b/Model/bin/Release/Model.pdb
index e15aba4..7f20d6f 100644
--- a/Model/bin/Release/Model.pdb
+++ b/Model/bin/Release/Model.pdb
Binary files differ
diff --git a/Model/obj/Release/Model.csproj.AssemblyReference.cache b/Model/obj/Release/Model.csproj.AssemblyReference.cache
index 9d9f12c..fadf578 100644
--- a/Model/obj/Release/Model.csproj.AssemblyReference.cache
+++ b/Model/obj/Release/Model.csproj.AssemblyReference.cache
Binary files differ
diff --git a/Model/obj/Release/Model.dll b/Model/obj/Release/Model.dll
index c0df88f..80bbbe6 100644
--- a/Model/obj/Release/Model.dll
+++ b/Model/obj/Release/Model.dll
Binary files differ
diff --git a/Model/obj/Release/Model.pdb b/Model/obj/Release/Model.pdb
index e15aba4..7f20d6f 100644
--- a/Model/obj/Release/Model.pdb
+++ b/Model/obj/Release/Model.pdb
Binary files differ
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipPatrolCheckPlanBillMain.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipPatrolCheckPlanBillMain.cs"
new file mode 100644
index 0000000..0f2264e
--- /dev/null
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipPatrolCheckPlanBillMain.cs"
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+    public class ClsSb_EquipPatrolCheckPlanBillMain:DBUtility.ClsXt_BaseBillMain
+    {
+        public Int64 HEquipID;
+        public DateTime HBeginDate;
+        public DateTime HEndDate;
+        public string HCycleUnit;
+        public Int64 HCheckCycle;
+        public string HExplanation;
+        public string HInnerBillNo;
+        public int HMouldPatrolCheckRuleID;//设备巡检规程id
+
+        public int HUSEORGID;
+        public int HCREATEORGID;
+        public int HDeptID;
+    }
+}
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipPatrolCheckPlanBillSub.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipPatrolCheckPlanBillSub.cs"
new file mode 100644
index 0000000..cb0c5f2
--- /dev/null
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipPatrolCheckPlanBillSub.cs"
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+    public class ClsSb_EquipPatrolCheckPlanBillSub:DBUtility.ClsXt_BaseBillSub
+    { 
+        // 
+        public Int64 HMaterID;
+        public string HMaterNumber;
+        public string HMaterName;
+        public string HMaterModel;
+        public string HPatrolCheckItem;
+        public string HPatrolCheckPart;
+        public string HClaim;
+        public Int64 HUnitID;
+        public string HUnitNumber;
+        public string HUnitName;
+        public Int64 HManagerID;
+        // public string HManagerNumber;
+        public string HManagerName;
+
+        public Int64 HPatrolCheckItemClassID;//巡检项目分类id
+        public Int64 HPatrolCheckItemMethodID;//巡检方法id
+    }
+}
diff --git a/NETERPNoWin/bin/Debug/BLL.dll b/NETERPNoWin/bin/Debug/BLL.dll
index 482d99d..c9f5d9f 100644
--- a/NETERPNoWin/bin/Debug/BLL.dll
+++ b/NETERPNoWin/bin/Debug/BLL.dll
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/BLL.pdb b/NETERPNoWin/bin/Debug/BLL.pdb
index 404d5ec..42d5a07 100644
--- a/NETERPNoWin/bin/Debug/BLL.pdb
+++ b/NETERPNoWin/bin/Debug/BLL.pdb
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/BaseSet.dll b/NETERPNoWin/bin/Debug/BaseSet.dll
index c379e8d..47fd77c 100644
--- a/NETERPNoWin/bin/Debug/BaseSet.dll
+++ b/NETERPNoWin/bin/Debug/BaseSet.dll
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/BaseSet.pdb b/NETERPNoWin/bin/Debug/BaseSet.pdb
index 1e5fe52..000e607 100644
--- a/NETERPNoWin/bin/Debug/BaseSet.pdb
+++ b/NETERPNoWin/bin/Debug/BaseSet.pdb
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/DAL.dll b/NETERPNoWin/bin/Debug/DAL.dll
index d72fcd6..60e8023 100644
--- a/NETERPNoWin/bin/Debug/DAL.dll
+++ b/NETERPNoWin/bin/Debug/DAL.dll
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/DAL.pdb b/NETERPNoWin/bin/Debug/DAL.pdb
index 0b5840e..bcd0f2d 100644
--- a/NETERPNoWin/bin/Debug/DAL.pdb
+++ b/NETERPNoWin/bin/Debug/DAL.pdb
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/DBUtility.dll b/NETERPNoWin/bin/Debug/DBUtility.dll
index 42ffcc7..3cd8dd5 100644
--- a/NETERPNoWin/bin/Debug/DBUtility.dll
+++ b/NETERPNoWin/bin/Debug/DBUtility.dll
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/DBUtility.pdb b/NETERPNoWin/bin/Debug/DBUtility.pdb
index 90cc673..413fdab 100644
--- a/NETERPNoWin/bin/Debug/DBUtility.pdb
+++ b/NETERPNoWin/bin/Debug/DBUtility.pdb
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/Interop.gregn6Lib.dll b/NETERPNoWin/bin/Debug/Interop.gregn6Lib.dll
index ec1e07d..376697f 100644
--- a/NETERPNoWin/bin/Debug/Interop.gregn6Lib.dll
+++ b/NETERPNoWin/bin/Debug/Interop.gregn6Lib.dll
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/Kanban.dll b/NETERPNoWin/bin/Debug/Kanban.dll
index 5f3b31f..b71d7bb 100644
--- a/NETERPNoWin/bin/Debug/Kanban.dll
+++ b/NETERPNoWin/bin/Debug/Kanban.dll
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/Kanban.pdb b/NETERPNoWin/bin/Debug/Kanban.pdb
index 116fb69..d46432a 100644
--- a/NETERPNoWin/bin/Debug/Kanban.pdb
+++ b/NETERPNoWin/bin/Debug/Kanban.pdb
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/Model.dll b/NETERPNoWin/bin/Debug/Model.dll
index fb494be..30052ba 100644
--- a/NETERPNoWin/bin/Debug/Model.dll
+++ b/NETERPNoWin/bin/Debug/Model.dll
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/Model.pdb b/NETERPNoWin/bin/Debug/Model.pdb
index faf9ed8..525e005 100644
--- a/NETERPNoWin/bin/Debug/Model.pdb
+++ b/NETERPNoWin/bin/Debug/Model.pdb
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/NETERPNoWin.exe b/NETERPNoWin/bin/Debug/NETERPNoWin.exe
index 549ee2f..df7318f 100644
--- a/NETERPNoWin/bin/Debug/NETERPNoWin.exe
+++ b/NETERPNoWin/bin/Debug/NETERPNoWin.exe
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/NETERPNoWin.pdb b/NETERPNoWin/bin/Debug/NETERPNoWin.pdb
index bf319d7..342f9d2 100644
--- a/NETERPNoWin/bin/Debug/NETERPNoWin.pdb
+++ b/NETERPNoWin/bin/Debug/NETERPNoWin.pdb
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/OAM.dll b/NETERPNoWin/bin/Debug/OAM.dll
index 9eec334..5b9d9bb 100644
--- a/NETERPNoWin/bin/Debug/OAM.dll
+++ b/NETERPNoWin/bin/Debug/OAM.dll
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/OAM.pdb b/NETERPNoWin/bin/Debug/OAM.pdb
index 305650d..82de54b 100644
--- a/NETERPNoWin/bin/Debug/OAM.pdb
+++ b/NETERPNoWin/bin/Debug/OAM.pdb
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/PlanM.dll b/NETERPNoWin/bin/Debug/PlanM.dll
index b81b5ed..44f2f0c 100644
--- a/NETERPNoWin/bin/Debug/PlanM.dll
+++ b/NETERPNoWin/bin/Debug/PlanM.dll
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/PlanM.pdb b/NETERPNoWin/bin/Debug/PlanM.pdb
index cb8390d..e779aab 100644
--- a/NETERPNoWin/bin/Debug/PlanM.pdb
+++ b/NETERPNoWin/bin/Debug/PlanM.pdb
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/Pub_Class.dll b/NETERPNoWin/bin/Debug/Pub_Class.dll
index c0b569e..608835a 100644
--- a/NETERPNoWin/bin/Debug/Pub_Class.dll
+++ b/NETERPNoWin/bin/Debug/Pub_Class.dll
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/Pub_Class.pdb b/NETERPNoWin/bin/Debug/Pub_Class.pdb
index abf890f..c2b4c44 100644
--- a/NETERPNoWin/bin/Debug/Pub_Class.pdb
+++ b/NETERPNoWin/bin/Debug/Pub_Class.pdb
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/Pub_Control.dll b/NETERPNoWin/bin/Debug/Pub_Control.dll
index 88f55ae..d6e1d3a 100644
--- a/NETERPNoWin/bin/Debug/Pub_Control.dll
+++ b/NETERPNoWin/bin/Debug/Pub_Control.dll
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/Pub_Control.pdb b/NETERPNoWin/bin/Debug/Pub_Control.pdb
index 62dabc3..068f29b 100644
--- a/NETERPNoWin/bin/Debug/Pub_Control.pdb
+++ b/NETERPNoWin/bin/Debug/Pub_Control.pdb
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/SQLHelper.dll b/NETERPNoWin/bin/Debug/SQLHelper.dll
index 719e581..53e6503 100644
--- a/NETERPNoWin/bin/Debug/SQLHelper.dll
+++ b/NETERPNoWin/bin/Debug/SQLHelper.dll
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/SQLHelper.pdb b/NETERPNoWin/bin/Debug/SQLHelper.pdb
index f6cbc41..14ce3b0 100644
--- a/NETERPNoWin/bin/Debug/SQLHelper.pdb
+++ b/NETERPNoWin/bin/Debug/SQLHelper.pdb
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/WarM.dll b/NETERPNoWin/bin/Debug/WarM.dll
index b6553e0..d7266d1 100644
--- a/NETERPNoWin/bin/Debug/WarM.dll
+++ b/NETERPNoWin/bin/Debug/WarM.dll
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/WarM.pdb b/NETERPNoWin/bin/Debug/WarM.pdb
index c73d537..095a49d 100644
--- a/NETERPNoWin/bin/Debug/WarM.pdb
+++ b/NETERPNoWin/bin/Debug/WarM.pdb
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/WorkM.dll b/NETERPNoWin/bin/Debug/WorkM.dll
index c2d5912..2add766 100644
--- a/NETERPNoWin/bin/Debug/WorkM.dll
+++ b/NETERPNoWin/bin/Debug/WorkM.dll
Binary files differ
diff --git a/NETERPNoWin/bin/Debug/WorkM.pdb b/NETERPNoWin/bin/Debug/WorkM.pdb
index fbb1e24..9256c15 100644
--- a/NETERPNoWin/bin/Debug/WorkM.pdb
+++ b/NETERPNoWin/bin/Debug/WorkM.pdb
Binary files differ
diff --git a/NETERPNoWin/obj/Debug/Interop.gregn6Lib.dll b/NETERPNoWin/obj/Debug/Interop.gregn6Lib.dll
index ec1e07d..376697f 100644
--- a/NETERPNoWin/obj/Debug/Interop.gregn6Lib.dll
+++ b/NETERPNoWin/obj/Debug/Interop.gregn6Lib.dll
Binary files differ
diff --git a/NETERPNoWin/obj/Debug/NETERPNoWin.exe b/NETERPNoWin/obj/Debug/NETERPNoWin.exe
index 549ee2f..df7318f 100644
--- a/NETERPNoWin/obj/Debug/NETERPNoWin.exe
+++ b/NETERPNoWin/obj/Debug/NETERPNoWin.exe
Binary files differ
diff --git a/NETERPNoWin/obj/Debug/NETERPNoWin.pdb b/NETERPNoWin/obj/Debug/NETERPNoWin.pdb
index bf319d7..342f9d2 100644
--- a/NETERPNoWin/obj/Debug/NETERPNoWin.pdb
+++ b/NETERPNoWin/obj/Debug/NETERPNoWin.pdb
Binary files differ
diff --git a/PayM/bin/Debug/AxInterop.gregn6Lib.dll b/PayM/bin/Debug/AxInterop.gregn6Lib.dll
index 76d2ac4..3759550 100644
--- a/PayM/bin/Debug/AxInterop.gregn6Lib.dll
+++ b/PayM/bin/Debug/AxInterop.gregn6Lib.dll
Binary files differ
diff --git a/PayM/bin/Debug/BLL.dll b/PayM/bin/Debug/BLL.dll
index 482d99d..c9f5d9f 100644
--- a/PayM/bin/Debug/BLL.dll
+++ b/PayM/bin/Debug/BLL.dll
Binary files differ
diff --git a/PayM/bin/Debug/BLL.pdb b/PayM/bin/Debug/BLL.pdb
index 404d5ec..42d5a07 100644
--- a/PayM/bin/Debug/BLL.pdb
+++ b/PayM/bin/Debug/BLL.pdb
Binary files differ
diff --git a/PayM/bin/Debug/DAL.dll b/PayM/bin/Debug/DAL.dll
index d72fcd6..60e8023 100644
--- a/PayM/bin/Debug/DAL.dll
+++ b/PayM/bin/Debug/DAL.dll
Binary files differ
diff --git a/PayM/bin/Debug/DAL.pdb b/PayM/bin/Debug/DAL.pdb
index 0b5840e..bcd0f2d 100644
--- a/PayM/bin/Debug/DAL.pdb
+++ b/PayM/bin/Debug/DAL.pdb
Binary files differ
diff --git a/PayM/bin/Debug/DBUtility.dll b/PayM/bin/Debug/DBUtility.dll
index 42ffcc7..3cd8dd5 100644
--- a/PayM/bin/Debug/DBUtility.dll
+++ b/PayM/bin/Debug/DBUtility.dll
Binary files differ
diff --git a/PayM/bin/Debug/DBUtility.pdb b/PayM/bin/Debug/DBUtility.pdb
index 90cc673..413fdab 100644
--- a/PayM/bin/Debug/DBUtility.pdb
+++ b/PayM/bin/Debug/DBUtility.pdb
Binary files differ
diff --git a/PayM/bin/Debug/Interop.gregn6Lib.dll b/PayM/bin/Debug/Interop.gregn6Lib.dll
index 5b11934..418f2be 100644
--- a/PayM/bin/Debug/Interop.gregn6Lib.dll
+++ b/PayM/bin/Debug/Interop.gregn6Lib.dll
Binary files differ
diff --git a/PayM/bin/Debug/Model.dll b/PayM/bin/Debug/Model.dll
index fb494be..30052ba 100644
--- a/PayM/bin/Debug/Model.dll
+++ b/PayM/bin/Debug/Model.dll
Binary files differ
diff --git a/PayM/bin/Debug/Model.pdb b/PayM/bin/Debug/Model.pdb
index faf9ed8..525e005 100644
--- a/PayM/bin/Debug/Model.pdb
+++ b/PayM/bin/Debug/Model.pdb
Binary files differ
diff --git a/PayM/bin/Debug/PayM.dll b/PayM/bin/Debug/PayM.dll
index dda57db..26cb584 100644
--- a/PayM/bin/Debug/PayM.dll
+++ b/PayM/bin/Debug/PayM.dll
Binary files differ
diff --git a/PayM/bin/Debug/PayM.pdb b/PayM/bin/Debug/PayM.pdb
index 6183d31..56a4dba 100644
--- a/PayM/bin/Debug/PayM.pdb
+++ b/PayM/bin/Debug/PayM.pdb
Binary files differ
diff --git a/PayM/bin/Debug/Pub_Class.dll b/PayM/bin/Debug/Pub_Class.dll
index c0b569e..608835a 100644
--- a/PayM/bin/Debug/Pub_Class.dll
+++ b/PayM/bin/Debug/Pub_Class.dll
Binary files differ
diff --git a/PayM/bin/Debug/Pub_Class.pdb b/PayM/bin/Debug/Pub_Class.pdb
index abf890f..c2b4c44 100644
--- a/PayM/bin/Debug/Pub_Class.pdb
+++ b/PayM/bin/Debug/Pub_Class.pdb
Binary files differ
diff --git a/PayM/bin/Debug/Pub_Control.dll b/PayM/bin/Debug/Pub_Control.dll
index 88f55ae..d6e1d3a 100644
--- a/PayM/bin/Debug/Pub_Control.dll
+++ b/PayM/bin/Debug/Pub_Control.dll
Binary files differ
diff --git a/PayM/bin/Debug/Pub_Control.pdb b/PayM/bin/Debug/Pub_Control.pdb
index 62dabc3..068f29b 100644
--- a/PayM/bin/Debug/Pub_Control.pdb
+++ b/PayM/bin/Debug/Pub_Control.pdb
Binary files differ
diff --git a/PayM/bin/Debug/SQLHelper.dll b/PayM/bin/Debug/SQLHelper.dll
index 719e581..53e6503 100644
--- a/PayM/bin/Debug/SQLHelper.dll
+++ b/PayM/bin/Debug/SQLHelper.dll
Binary files differ
diff --git a/PayM/bin/Debug/SQLHelper.pdb b/PayM/bin/Debug/SQLHelper.pdb
index f6cbc41..14ce3b0 100644
--- a/PayM/bin/Debug/SQLHelper.pdb
+++ b/PayM/bin/Debug/SQLHelper.pdb
Binary files differ
diff --git a/PayM/obj/Debug/AxInterop.gregn6Lib.dll b/PayM/obj/Debug/AxInterop.gregn6Lib.dll
index 76d2ac4..3759550 100644
--- a/PayM/obj/Debug/AxInterop.gregn6Lib.dll
+++ b/PayM/obj/Debug/AxInterop.gregn6Lib.dll
Binary files differ
diff --git a/PayM/obj/Debug/Interop.gregn6Lib.dll b/PayM/obj/Debug/Interop.gregn6Lib.dll
index 5b11934..418f2be 100644
--- a/PayM/obj/Debug/Interop.gregn6Lib.dll
+++ b/PayM/obj/Debug/Interop.gregn6Lib.dll
Binary files differ
diff --git a/PayM/obj/Debug/PayM.dll b/PayM/obj/Debug/PayM.dll
index dda57db..26cb584 100644
--- a/PayM/obj/Debug/PayM.dll
+++ b/PayM/obj/Debug/PayM.dll
Binary files differ
diff --git a/PayM/obj/Debug/PayM.pdb b/PayM/obj/Debug/PayM.pdb
index 6183d31..56a4dba 100644
--- a/PayM/obj/Debug/PayM.pdb
+++ b/PayM/obj/Debug/PayM.pdb
Binary files differ
diff --git a/SQLHelper/obj/Release/SQLHelper.csproj.AssemblyReference.cache b/SQLHelper/obj/Release/SQLHelper.csproj.AssemblyReference.cache
index 42fb0c2..110f91f 100644
--- a/SQLHelper/obj/Release/SQLHelper.csproj.AssemblyReference.cache
+++ b/SQLHelper/obj/Release/SQLHelper.csproj.AssemblyReference.cache
Binary files differ
diff --git a/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.AssemblyReference.cache b/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.AssemblyReference.cache
deleted file mode 100644
index b04aad7..0000000
--- a/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.AssemblyReference.cache
+++ /dev/null
Binary files differ
diff --git a/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt b/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt
index 5a3a400..8967cf3 100644
--- a/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt
+++ b/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt
@@ -14,4 +14,3 @@
 D:\WorkBench\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.CoreCompileInputs.cache
 D:\WorkBench\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.dll
 D:\WorkBench\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.pdb
-D:\WorkBench\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.AssemblyReference.cache
diff --git a/WebAPI/Controllers/SBGL/Sb_EquipPatrolCheckBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipPatrolCheckBillController.cs
index 04456ae..d4f04b4 100644
--- a/WebAPI/Controllers/SBGL/Sb_EquipPatrolCheckBillController.cs
+++ b/WebAPI/Controllers/SBGL/Sb_EquipPatrolCheckBillController.cs
@@ -17,8 +17,8 @@
         public DataSet ds = new DataSet();
         public DBUtility.ClsPub.Enum_BillStatus BillStatus;//鍗曟嵁鐘舵�侊紙鏂板锛屼慨鏀癸紝娴忚锛屾洿鏂板崟浠凤紝鍙樻洿锛�
         SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
-        public DAL.ClsSb_EquipDotCheckBill BillNew = new DAL.ClsSb_EquipDotCheckBill();   //瀵瑰簲鍗曟嵁绫�
-        public DAL.ClsSb_EquipDotCheckBill BillOld = new DAL.ClsSb_EquipDotCheckBill();   //瀵瑰簲鍗曟嵁绫�                                            
+        public DAL.ClsSb_EquipPatrolCheckBill BillNew = new DAL.ClsSb_EquipPatrolCheckBill();   //瀵瑰簲鍗曟嵁绫�
+        public DAL.ClsSb_EquipPatrolCheckBill BillOld = new DAL.ClsSb_EquipPatrolCheckBill();   //瀵瑰簲鍗曟嵁绫�                                            
         Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();   //鑾峰彇绯荤粺鍙傛暟
         string fileip = System.Configuration.ConfigurationManager.AppSettings["FileIP"];
 
@@ -109,16 +109,17 @@
             }
         }
 
-        #region 璁惧鐐规璁板綍鍒嗛〉鏌ヨ
-        [Route("Sb_EquipDotCheckBill/GetEquipDotCheckBillListPage")]
+        #region 璁惧宸℃璁板綍鍒嗛〉鏌ヨ
+        [Route("Sb_EquipPatrolCheckBill/GetEquipPatrolCheckBillListPage")]
         [HttpGet]
-        public object GetEquipDotCheckBillListPage(string sWhere, string user, int page, int size)
+        public object GetEquipPatrolCheckBillListPage(string sWhere, string user, int page, int size)
         {
             try
             {
                 List<object> columnNameList = new List<object>();
                 //缂栬緫鏉冮檺
-                if (!DBUtility.ClsPub.Security_Log_second("Sb_EquipDotCheckBillList", 1, false, user))
+                
+                if (!DBUtility.ClsPub.Security_Log_second("Sb_EquipPatrolCheckBillList", 1, false, user))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -129,11 +130,11 @@
                 sWhere = sWhere.Replace("'", "''");
                 if (sWhere == null || sWhere.Equals(""))
                 {
-                    ds = oCN.RunProcReturn("exec h_p_Sb_EquipDotCheckBillListPage " + page + "," + size + ",''", "h_p_Sb_EquipDotCheckBillListPage");
+                    ds = oCN.RunProcReturn("exec h_p_Sb_EquipPatrolCheckBillListPage " + page + "," + size + ",''", "h_p_Sb_EquipPatrolCheckBillListPage");
                 }
                 else
                 {
-                    ds = oCN.RunProcReturn("exec h_p_Sb_EquipDotCheckBillListPage " + page + "," + size + ",'" + sWhere + "'", "h_p_Sb_EquipDotCheckBillListPage");
+                    ds = oCN.RunProcReturn("exec h_p_Sb_EquipPatrolCheckBillListPage " + page + "," + size + ",'" + sWhere + "'", "h_p_Sb_EquipPatrolCheckBillListPage");
                 }
 
                 //娣诲姞鍒楀悕
@@ -165,21 +166,21 @@
         #region sql璇彞
 
 
-        public static DataSet Sb_EquipDotCheckBillList_s(string sWhere)
+        public static DataSet Sb_EquipPatrolCheckBillList_s(string sWhere)
         {
-            return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sb_EquipDotCheckBillList ", "h_v_Sb_EquipDotCheckBillList");
+            return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sb_EquipPatrolCheckBillList ", "h_v_Sb_EquipPatrolCheckBillList");
         }
         #endregion
 
-        #region 璁惧鐐规璁板綍琛� 淇濆瓨/缂栬緫
+        #region 璁惧宸℃璁板綍琛� 淇濆瓨/缂栬緫
         /// <summary>
-        /// 鐐规璁板綍琛� 淇濆瓨
+        /// 宸℃璁板綍琛� 淇濆瓨
         /// </summary>
         /// <param name="msg"></param>
         /// <returns></returns>
-        [Route("Sb_EquipDotCheckBill/SaveEquipDotCheckBillList")]
+        [Route("Sb_EquipPatrolCheckBill/SaveEquipPatrolCheckBillList")]
         [HttpPost]
-        public object SaveEquipDotCheckBillList([FromBody] JObject msg)
+        public object SaveEquipPatrolCheckBillList([FromBody] JObject msg)
         {
             var _value = msg["msg"].ToString();
             string msg1 = _value.ToString();
@@ -193,7 +194,7 @@
             ListModels oListModels = new ListModels();
             try
             {
-                if (!DBUtility.ClsPub.Security_Log("Sb_EquipDotCheckBill_Edit", 1, false, msg4))
+                if (!DBUtility.ClsPub.Security_Log("Sb_EquipPatrolCheckBill_Edit", 1, false, msg4))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -202,12 +203,12 @@
                     return objJsonResult;
                 }
 
-                DAL.ClsSb_EquipDotCheckBill oBill = new DAL.ClsSb_EquipDotCheckBill();
-                List<Model.ClsSb_EquipDotCheckBillMain> lsmain = new List<Model.ClsSb_EquipDotCheckBillMain>();
+                DAL.ClsSb_EquipPatrolCheckBill oBill = new DAL.ClsSb_EquipPatrolCheckBill();
+                List<Model.ClsSb_EquipPatrolCheckBillMain> lsmain = new List<Model.ClsSb_EquipPatrolCheckBillMain>();
                 msg2 = msg2.Replace("\\", "");
                 msg2 = msg2.Replace("\n", "");  //\n
-                lsmain = oListModels.getObjectByJson_Sb_EquipDotCheckBillMain(msg2);
-                foreach (Model.ClsSb_EquipDotCheckBillMain oItem in lsmain)
+                lsmain = oListModels.getObjectByJson_Sb_EquipPatrolCheckBillMain(msg2);
+                foreach (Model.ClsSb_EquipPatrolCheckBillMain oItem in lsmain)
                 {
                     //oItem.HMaker = "";
                     UserName = oItem.HMaker;  //鍒跺崟浜�
@@ -247,10 +248,10 @@
                 msg3 = msg3.Replace("\\", "");
                 msg3 = msg3.Replace("\n", "");  //\n
                 //msg2 = msg2.Replace("'", "鈥�");
-                List<Model.ClsSb_EquipDotCheckBillSub> ls = new List<Model.ClsSb_EquipDotCheckBillSub>();
-                ls = oListModels.getObjectByJson_Sb_EquipDotCheckBillSub(msg3);
+                List<Model.ClsSb_EquipPatrolCheckBillSub> ls = new List<Model.ClsSb_EquipPatrolCheckBillSub>();
+                ls = oListModels.getObjectByJson_Sb_EquipPatrolCheckBillSub(msg3);
                 int i = 0;
-                foreach (Model.ClsSb_EquipDotCheckBillSub oItemSub in ls)
+                foreach (Model.ClsSb_EquipPatrolCheckBillSub oItemSub in ls)
                 {
 
                     i++;
@@ -314,17 +315,17 @@
         }
         #endregion
 
-        #region [璁惧鐐规璁板綍琛ㄥ垹闄ゅ姛鑳絔
+        #region [璁惧宸℃璁板綍琛ㄥ垹闄ゅ姛鑳絔
         /// <summary>
         /// 妯″叿缁翠慨鍗曞垹闄ゅ姛鑳�
         /// </summary>
         /// <returns></returns>
-        [Route("Sb_EquipDotCheckBill/DeltetEquipDotCheckBillList")]
+        [Route("Sb_EquipPatrolCheckBill/DeltetEquipPatrolCheckBillList")]
         [HttpGet]
-        public object DeltetEquipDotCheckBillList(string HInterID,string user)
+        public object DeltetEquipPatrolCheckBillList(string HInterID,string user)
         {
             //缂栬緫鏉冮檺
-            if (!DBUtility.ClsPub.Security_Log_second("Sb_EquipDotCheckBill_Delete", 1, false, user))
+            if (!DBUtility.ClsPub.Security_Log_second("Sb_EquipPatrolCheckBill_Delete", 1, false, user))
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
@@ -344,7 +345,7 @@
                 objJsonResult.data = null;
                 return objJsonResult;
             }
-            DAL.ClsSb_EquipDotCheckBill oBill = new DAL.ClsSb_EquipDotCheckBill();
+            DAL.ClsSb_EquipPatrolCheckBill oBill = new DAL.ClsSb_EquipPatrolCheckBill();
             if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
             {
                 if (oBill.omodel.HBillStatus > 1)
@@ -365,7 +366,7 @@
                 }
 
                 //鍒犻櫎鍓嶆帶鍒�
-                DataSet BeforeDs = oCN.RunProcReturn("Exec h_p_Sb_EquipDotCheckBill_BeforeDelCtrl " + HInterID.ToString() + ",'" + user + "'", "h_p_Sb_EquipDotCheckBill_BeforeDelCtrl");
+                DataSet BeforeDs = oCN.RunProcReturn("Exec h_p_Sb_EquipPatrolCheckBill_BeforeDelCtrl " + HInterID.ToString() + ",'" + user + "'", "h_p_Sb_EquipPatrolCheckBill_BeforeDelCtrl");
                 if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0)
                 {
                     objJsonResult.code = "0";
@@ -386,7 +387,7 @@
                     }
                 }
 
-                bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Sb_EquipDotCheckBill_AfterDelCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo);
+                bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Sb_EquipPatrolCheckBill_AfterDelCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo);
                 if (IsDete)
                 {
                     objJsonResult.code = "0";
@@ -415,25 +416,25 @@
         }
         #endregion
 
-        #region[璁惧鐐规璁板綍琛ㄧ紪杈戞椂鑾峰彇琛ㄥご鏁版嵁]
-        [Route("Sb_EquipDotCheckBill/Sb_EquipDotCheckBillListCheckDetai")]
+        #region[璁惧宸℃璁板綍琛ㄧ紪杈戞椂鑾峰彇琛ㄥご鏁版嵁]
+        [Route("Sb_EquipPatrolCheckBill/Sb_EquipPatrolCheckBillListCheckDetai")]
         [HttpGet]
-        public ApiResult<DataSet> Sb_EquipDotCheckBillListCheckDetai(string HID)
+        public ApiResult<DataSet> Sb_EquipPatrolCheckBillListCheckDetai(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_Sb_EquipDotCheckBill_Edit2  where hmainid= " + HID + " ", "h_v_Sb_EquipDotCheckBill_Edit2");
+            var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Sb_EquipPatrolCheckBill_Edit2  where hmainid= " + HID + " ", "h_v_Sb_EquipPatrolCheckBill_Edit2");
             if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
-                return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄧ偣妫�璁板綍琛�" };
+                return new ApiResult<DataSet> { code = -1, msg = "涓嶅瓨鍦ㄥ贰妫�璁板綍琛�" };
             return new ApiResult<DataSet> { code = 1, msg = "鏌ヨ鎴愬姛", data = dataSet };
         }
         #endregion
 
-        #region[璁惧鐐规璁板綍琛ㄧ紪杈戞椂鑾峰彇琛ㄩ鏁版嵁]
-        [Route("Sb_EquipDotCheckBill/Sb_EquipDotCheckBillListProjectDetai")]
+        #region[璁惧宸℃璁板綍琛ㄧ紪杈戞椂鑾峰彇琛ㄩ鏁版嵁]
+        [Route("Sb_EquipPatrolCheckBill/Sb_EquipPatrolCheckBillListProjectDetai")]
         [HttpGet]
-        public object Sb_EquipDotCheckBillListProjectDetai(string sqlWhere)
+        public object Sb_EquipPatrolCheckBillListProjectDetai(string sqlWhere)
         {
             DataSet ds;
             try
@@ -441,7 +442,7 @@
                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                 if (sqlWhere == null || sqlWhere.Equals(""))
                 {
-                    ds = oCN.RunProcReturn("select * from h_v_Sb_EquipDotCheckBill_Edit", "h_v_Sb_EquipDotCheckBill_Edit");
+                    ds = oCN.RunProcReturn("select * from h_v_Sb_EquipPatrolCheckBill_Edit", "h_v_Sb_EquipPatrolCheckBill_Edit");
                     objJsonResult.code = "0";
                     objJsonResult.count = 1;
                     objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
@@ -449,9 +450,9 @@
                 }
                 else
                 {
-                    string sql1 = "select * from h_v_Sb_EquipDotCheckBill_Edit where 1 = 1 ";
+                    string sql1 = "select * from h_v_Sb_EquipPatrolCheckBill_Edit where 1 = 1 ";
                     string sql = sql1 + sqlWhere;
-                    ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckBill_Edit");
+                    ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipPatrolCheckBill_Edit");
                     objJsonResult.code = "0";
                     objJsonResult.count = 1;
                     objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
@@ -474,7 +475,7 @@
 
 
         #region 鏍规嵁璁惧鏉$爜鏌ユ壘璁惧妗f淇℃伅PDA
-        [Route("Sb_PDA_EquipDotCheckBill/txtHBarCode_KeyDown")]
+        [Route("Sb_PDA_EquipPatrolCheckBill/txtHBarCode_KeyDown")]
         [HttpGet]
         public object txtHBarCode_KeyDown(string HBarCode)
         {
@@ -517,7 +518,7 @@
         #endregion
 
         #region 鏍规嵁璁惧鏉$爜鏌ユ壘璁惧妗f淇℃伅PDA  鏌ヨ鏉$爜妗f鍒楄〃
-        [Route("Sb_PDA_EquipDotCheckBill/txtHBarCode_KeyDown_List")]
+        [Route("Sb_PDA_EquipPatrolCheckBill/txtHBarCode_KeyDown_List")]
         [HttpGet]
         public object txtHBarCode_KeyDown_List(string HBarCode)
         {
@@ -559,11 +560,11 @@
         }
         #endregion
 
-        #region 璁惧鐐规璁板綍鎻愪氦PDA
+        #region 璁惧宸℃璁板綍鎻愪氦PDA
 
-        [Route("Sb_PDA_EquipDotCheckBill/SaveGetEquipDotCheckBillList")]
+        [Route("Sb_PDA_EquipPatrolCheckBill/SaveGetEquipPatrolCheckBillList")]
         [HttpPost]
-        public object SaveGetEquipDotCheckBillList([FromBody] JObject msg)
+        public object SaveGetEquipPatrolCheckBillList([FromBody] JObject msg)
         {
             var _value = msg["msg"].ToString();
             string msg1 = _value.ToString();
@@ -576,12 +577,12 @@
             ListModels oListModels = new ListModels();
             try
             {
-                DLL.ClsSb_EquipDotCheckBill oBill = new DLL.ClsSb_EquipDotCheckBill();
-                List<Models.ClsSb_EquipDotCheckBillMain> lsmain = new List<Models.ClsSb_EquipDotCheckBillMain>();
+                DLL.ClsSb_EquipPatrolCheckBill oBill = new DLL.ClsSb_EquipPatrolCheckBill();
+                List<Models.ClsSb_EquipPatrolCheckBillMain> lsmain = new List<Models.ClsSb_EquipPatrolCheckBillMain>();
                 msg2 = msg2.Replace("\\", "");
                 msg2 = msg2.Replace("\n", "");  //\n
-                lsmain = oListModels.getObjectByJson_Sb_EquipDotCheckBillMainPDA(msg2); 
-                foreach (Models.ClsSb_EquipDotCheckBillMain oItem in lsmain)
+                lsmain = oListModels.getObjectByJson_Sb_EquipPatrolCheckBillMainPDA(msg2); 
+                foreach (Models.ClsSb_EquipPatrolCheckBillMain oItem in lsmain)
                 {
                     //鍗曟嵁鍙锋槸鍚﹂噸澶�
                     if (BillNew.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
@@ -629,10 +630,10 @@
                 msg3 = msg3.Substring(1, msg3.Length - 2);
                 msg3 = msg3.Replace("\\", "");
                 msg3 = msg3.Replace("\n", "");  //\n
-                List<Models.ClsSb_EquipDotCheckBillSub> ls = new List<Models.ClsSb_EquipDotCheckBillSub>();
-                ls = oListModels.getObjectByJson_Sb_EquipDotCheckBillSubPDA(msg3);
+                List<Models.ClsSb_EquipPatrolCheckBillSub> ls = new List<Models.ClsSb_EquipPatrolCheckBillSub>();
+                ls = oListModels.getObjectByJson_Sb_EquipPatrolCheckBillSubPDA(msg3);
                 int i = 0;
-                foreach (Models.ClsSb_EquipDotCheckBillSub oItemSub in ls)
+                foreach (Models.ClsSb_EquipPatrolCheckBillSub oItemSub in ls)
                 {
 
                     i++;
@@ -698,15 +699,15 @@
         }
         #endregion
 
-        #region 璁惧鐐规璁板綍鍗曞鏍�/鍙嶅鏍稿姛鑳�
-        [Route("Sb_EquipDotCheckBill/CheckSb_EquipDotCheckBill")]
+        #region 璁惧宸℃璁板綍鍗曞鏍�/鍙嶅鏍稿姛鑳�
+        [Route("Sb_EquipPatrolCheckBill/CheckSb_EquipPatrolCheckBill")]
         [HttpGet]
-        public object CheckSb_EquipDotCheckBill(string HInterID, int Type, string user)
+        public object CheckSb_EquipPatrolCheckBill(string HInterID, int Type, string user)
         {
             try
             {
                 //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄�
-                if (!DBUtility.ClsPub.Security_Log("Sb_EquipDotCheckBill_Check", 1, false, user))
+                if (!DBUtility.ClsPub.Security_Log("Sb_EquipPatrolCheckBill_Check", 1, false, user))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -731,8 +732,8 @@
                 if (Type == 1)
                 {
                     //瀹℃牳鍓嶆帶鍒�=========================================      
-                    string sql1 = "exec h_p_Sb_EquipDotCheckBill_BeforeCheckCtrl " + HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
-                    ds = oCN.RunProcReturn(sql1, "h_p_Sb_EquipDotCheckBill_BeforeCheckCtrl");
+                    string sql1 = "exec h_p_Sb_EquipPatrolCheckBill_BeforeCheckCtrl " + HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
+                    ds = oCN.RunProcReturn(sql1, "h_p_Sb_EquipPatrolCheckBill_BeforeCheckCtrl");
                     if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                     {
                         objJsonResult.code = "0";
@@ -754,7 +755,7 @@
                     }
                     //==================================================================================  
 
-                    if (!BillOld.CheckBill(int.Parse(HInterID), BillOld.omodel.HBillNo, "h_p_Sb_EquipDotCheckBill_AfterCheckCtrl", user, ref ClsPub.sExeReturnInfo))
+                    if (!BillOld.CheckBill(int.Parse(HInterID), BillOld.omodel.HBillNo, "h_p_Sb_EquipPatrolCheckBill_AfterCheckCtrl", user, ref ClsPub.sExeReturnInfo))
                     {
                         objJsonResult.code = "0";
                         objJsonResult.count = 1;
@@ -766,8 +767,8 @@
                 else
                 {
                     //鍙嶅鏍稿墠鎺у埗=========================================        
-                    string sql1 = "exec h_p_Sb_EquipDotCheckBill_BeforeUnCheckCtrl " + HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
-                    ds = oCN.RunProcReturn(sql1, "h_p_Sb_EquipDotCheckBill_BeforeUnCheckCtrl");
+                    string sql1 = "exec h_p_Sb_EquipPatrolCheckBill_BeforeUnCheckCtrl " + HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
+                    ds = oCN.RunProcReturn(sql1, "h_p_Sb_EquipPatrolCheckBill_BeforeUnCheckCtrl");
                     if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                     {
                         objJsonResult.code = "0";
@@ -787,7 +788,7 @@
                     }
                     //===========================================================         
 
-                    if (!BillOld.AbandonCheck(int.Parse(HInterID), BillOld.omodel.HBillNo, "h_p_Sb_EquipDotCheckBill_AfterUnCheckCtrl", user, ref ClsPub.sExeReturnInfo))
+                    if (!BillOld.AbandonCheck(int.Parse(HInterID), BillOld.omodel.HBillNo, "h_p_Sb_EquipPatrolCheckBill_AfterUnCheckCtrl", user, ref ClsPub.sExeReturnInfo))
                     {
                         objJsonResult.code = "0";
                         objJsonResult.count = 1;
@@ -817,15 +818,15 @@
         }
         #endregion
 
-        #region 璁惧鐐规璁板綍鍗曞叧闂�/鍙嶅叧闂姛鑳�
-        [Route("Sb_EquipDotCheckBill/CloseSb_EquipDotCheckBill")]
+        #region 璁惧宸℃璁板綍鍗曞叧闂�/鍙嶅叧闂姛鑳�
+        [Route("Sb_EquipPatrolCheckBill/CloseSb_EquipPatrolCheckBill")]
         [HttpGet]
-        public object CloseSb_EquipDotCheckBill(string HInterID, int Type, string user)
+        public object CloseSb_EquipPatrolCheckBill(string HInterID, int Type, string user)
         {
             try
             {
                 //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄�
-                if (!DBUtility.ClsPub.Security_Log("Sb_EquipDotCheckBill_Close", 1, false, user))
+                if (!DBUtility.ClsPub.Security_Log("Sb_EquipPatrolCheckBill_Close", 1, false, user))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -852,8 +853,8 @@
                 {
                     string sql = "";
                     //鍏抽棴鍓嶆帶鍒�===============================================Begin===================================================================
-                    sql = "exec h_p_Sb_EquipDotCheckBill_BeforeCloseCtrl " + HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
-                    ds = oCN.RunProcReturn(sql, "h_p_Sb_EquipDotCheckBill_BeforeCloseCtrl");
+                    sql = "exec h_p_Sb_EquipPatrolCheckBill_BeforeCloseCtrl " + HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
+                    ds = oCN.RunProcReturn(sql, "h_p_Sb_EquipPatrolCheckBill_BeforeCloseCtrl");
                     if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                     {
                         objJsonResult.code = "0";
@@ -874,7 +875,7 @@
                     //鍏抽棴鍓嶆帶鍒�===============================================End===================================================================
 
                     //鍏抽棴鎻愪氦
-                    if (BillOld.CloseBill(Convert.ToInt32(HInterID), BillOld.omodel.HBillNo, "h_p_Sb_EquipDotCheckBill_AfterCloseCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+                    if (BillOld.CloseBill(Convert.ToInt32(HInterID), BillOld.omodel.HBillNo, "h_p_Sb_EquipPatrolCheckBill_AfterCloseCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                     {
                         objJsonResult.code = "1";
                         objJsonResult.count = 1;
@@ -895,8 +896,8 @@
                 {
                     string sql = "";
                     //鍙嶅叧闂墠鎺у埗===============================================Begin===================================================================
-                    sql = "exec h_p_Sb_EquipDotCheckBill_BeforeUnCloseCtrl " + HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
-                    ds = oCN.RunProcReturn(sql, "h_p_Sb_EquipDotCheckBill_BeforeUnCloseCtrl");
+                    sql = "exec h_p_Sb_EquipPatrolCheckBill_BeforeUnCloseCtrl " + HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
+                    ds = oCN.RunProcReturn(sql, "h_p_Sb_EquipPatrolCheckBill_BeforeUnCloseCtrl");
                     if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                     {
                         objJsonResult.code = "0";
@@ -917,7 +918,7 @@
                     //鍙嶅叧闂墠鎺у埗===============================================End===================================================================
 
                     //鍙嶅叧闂彁浜�
-                    if (BillOld.CancelClose(Convert.ToInt32(HInterID), BillOld.omodel.HBillNo, "h_p_Sb_EquipDotCheckBill_AfterUnCloseCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+                    if (BillOld.CancelClose(Convert.ToInt32(HInterID), BillOld.omodel.HBillNo, "h_p_Sb_EquipPatrolCheckBill_AfterUnCloseCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                     {
                         objJsonResult.code = "1";
                         objJsonResult.count = 1;
@@ -955,9 +956,9 @@
         }
         #endregion
 
-        #region 璁惧鐐规閫炬湡棰勮鎶ヨ〃
+        #region 璁惧宸℃閫炬湡棰勮鎶ヨ〃
 
-        [Route("Sb_EquipDotCheckWarning/Report")]
+        [Route("Sb_EquipPatrolCheckWarning/Report")]
         [HttpGet]
         public object Report(string HYear,string HMonth,string HEquipTypeID, string user)
         {
@@ -983,8 +984,8 @@
                 }
                 else
                 {
-                    string sql = "exec h_p_Sb_EquipDotCheckWarningReport " + HYear + "," + HMonth + "," + HEquipTypeID;
-                    ds = oCN.RunProcReturn(sql, "h_p_Sb_EquipDotCheckWarningReport");
+                    string sql = "exec h_p_Sb_EquipPatrolCheckWarningReport " + HYear + "," + HMonth + "," + HEquipTypeID;
+                    ds = oCN.RunProcReturn(sql, "h_p_Sb_EquipPatrolCheckWarningReport");
                 }
 
                 //娣诲姞鍒楀悕
@@ -1013,8 +1014,8 @@
         }
         #endregion
 
-        #region 璁惧鐐规璁板綍鎷嶇収涓婁紶
-        [Route("Sb_EquipDotCheckBill/UploadFile")]
+        #region 璁惧宸℃璁板綍鎷嶇収涓婁紶
+        [Route("Sb_EquipPatrolCheckBill/UploadFile")]
         [HttpPost]
         public object UploadFile()
         {
@@ -1135,7 +1136,7 @@
         /// </summary>
         /// <param name="sWhere"></param>
         /// <returns></returns>
-        [Route("Sb_EquipDotCheckBill/Filelist")]
+        [Route("Sb_EquipPatrolCheckBill/Filelist")]
         [HttpGet]
         public object Filelist(string HBillNo)
         {
@@ -1166,7 +1167,7 @@
         /// </summary>
         /// <param name="sWhere"></param>
         /// <returns></returns>
-        [Route("Sb_EquipDotCheckBill/DeleteFilelist")]
+        [Route("Sb_EquipPatrolCheckBill/DeleteFilelist")]
         [HttpGet]
         public object DeleteFilelist(string HItemID, string HSourceBillNo, string HFileName)
         {
diff --git a/WebAPI/Controllers/SBGL/Sb_EquipPatrolCheckPlanBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipPatrolCheckPlanBillController.cs
new file mode 100644
index 0000000..f8a407c
--- /dev/null
+++ b/WebAPI/Controllers/SBGL/Sb_EquipPatrolCheckPlanBillController.cs
@@ -0,0 +1,845 @@
+锘縰sing DBUtility;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using SyntacticSugar.constant;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Web.Http;
+using WebAPI.Models;
+namespace WebAPI.Controllers
+{
+    public class Sb_EquipPatrolCheckPlanBillController : ApiController
+    {
+        private json objJsonResult = new json();
+        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        public DataSet ds = new DataSet();
+        public DAL.ClsSb_EquipPatrolCheckPlanBill BillOld = new DAL.ClsSb_EquipPatrolCheckPlanBill(); 
+
+        #region 璁惧宸℃璁″垝琛�
+
+        /// <summary>
+        /// 璁惧宸℃璁″垝琛ㄥ垪琛� list鍒楄〃鏁版嵁鍔犺浇
+        /// </summary>
+        /// <returns></returns>
+        [Route("Sb_EquipPatrolCheckPlanBill/GetEquipPatrolCheckPlanBillList")]
+        [HttpGet]
+        public object GetEquipPatrolCheckPlanBillList(string sWhere,string user)
+        {
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Sb_EquipPatrolCheckPlanBillList", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("select * from h_v_Sb_EquipPatrolCheckPlanBillList " + sWhere + " order by hmainid desc", "h_v_Sb_EquipPatrolCheckPlanBillList");
+                }
+                else
+                {
+                    string sql1 = "select * from h_v_Sb_EquipPatrolCheckPlanBillList where 1 = 1";
+                    string sql = sql1 + sWhere + " order by hmainid desc";
+                    ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipPatrolCheckPlanBillList");
+                }
+
+                //if (ds.Tables[0].Rows.Count != 0 || ds != null)
+                //{
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+                //}
+                //else
+                //{
+                //objJsonResult.code = "0";
+                //objJsonResult.count = 0;
+                //objJsonResult.Message = "鏃犳暟鎹�";
+                //objJsonResult.data = null;
+                //return objJsonResult;
+                //}
+            }
+            catch (Exception ex)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        /// <summary>
+        /// 璁惧宸℃璁″垝鍗曞垎椤靛垪琛�
+        /// </summary>
+        /// <returns></returns>
+        [Route("Sb_EquipPatrolCheckPlanBill/GetEquipPatrolCheckPlanBillListPage")]
+        [HttpGet]
+        public object GetEquipPatrolCheckPlanBillListPage(string sWhere, string user, int page, int size)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                
+                if (!DBUtility.ClsPub.Security_Log("Sb_EquipPatrolCheckPlanBillList", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("exec h_p_Sb_EquipPatrolCheckPlanBillList_Query " + page + "," + size + ",'',''", "h_p_Sb_EquipPatrolCheckPlanBillList_Query");
+                }
+                else
+                {
+                    sWhere = sWhere.Replace("'", "''");
+                    ds = oCN.RunProcReturn("exec h_p_Sb_EquipPatrolCheckPlanBillList_Query " + page + "," + size + ",'','" + sWhere + "'", "h_p_Sb_EquipPatrolCheckPlanBillList_Query");
+                }
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception ex)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #region 璁惧宸℃璁板綍缁熻鍒嗘瀽 
+        /// <summary>
+        /// 杩斿洖璁惧宸℃璁板綍缁熻鍒嗘瀽 鍒楄〃
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("Sb_EquipPatrolCheckReport/Statistics")]
+        [HttpGet]
+        public object Statistics(string DateYear, string HType, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                if (DateYear == null || DateYear.Equals(""))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "璇烽�夋嫨鏈夋晥骞翠唤";
+                    return objJsonResult;
+                }
+                else
+                {
+                    ds = oCN.RunProcReturn("exec h_p_Sb_EquipPatrolCheckBillReport '" + DateYear + "','" + HType + "'", "h_p_Sb_EquipPatrolCheckBillReport");
+                }
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region sql璇彞
+
+
+        public static DataSet Sb_EquipPatrolCheckPlanBillList_s(string sWhere)
+        {
+            return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sb_EquipPatrolCheckPlanBillList ", "h_v_Sb_EquipPatrolCheckPlanBillList");
+        }
+        #endregion
+
+        #region 璁惧宸℃璁″垝琛� 淇濆瓨/缂栬緫
+        /// <summary>
+        /// 淇濆瓨妯″叿缁翠慨鍗�
+        /// </summary>
+        /// <param name="msg"></param>
+        /// <returns></returns>
+        [Route("Sb_EquipPatrolCheckPlanBill/SaveEquipPatrolCheckPlanBillList")]
+        [HttpPost]
+        public object SaveEquipPatrolCheckPlanBillList([FromBody] JObject msg)
+        {
+            var _value = msg["msg"].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();
+
+
+            string UserName = "";
+            ListModels oListModels = new ListModels();
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Sb_EquipPatrolCheckPlanBill_Edit", 1, false, msg4))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                DAL.ClsSb_EquipPatrolCheckPlanBill oBill = new DAL.ClsSb_EquipPatrolCheckPlanBill();
+                List<Model.ClsSb_EquipPatrolCheckPlanBillMain> lsmain = new List<Model.ClsSb_EquipPatrolCheckPlanBillMain>();
+                msg2 = msg2.Replace("\\", "");
+                msg2 = msg2.Replace("\n", "");  //\n
+                lsmain = oListModels.getObjectByJson_Sb_EquipPatrolCheckPlanBillMain(msg2);
+                foreach (Model.ClsSb_EquipPatrolCheckPlanBillMain oItem in lsmain)
+                {
+                    //oItem.HMaker = "";
+                    UserName = oItem.HMaker;  //鍒跺崟浜�
+                    oItem.HBillType = "3904";
+                    oItem.HBillSubType = "3904";
+
+                    //oItem.HInterID =0;
+                    //oItem.HBillNo = "";
+                    oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));//  --鏃ユ湡
+                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+                    //oItem.HMakeDate = "";
+                    //oItem.HYear = "";
+                    //oItem.HPeriod = "";
+                    //oItem.HRemark = "";
+                    //oItem.HCycleUnit = "";
+                    //oItem.HCheckCycle = "";
+                    //oItem.HBeginDate = "";
+                    //oItem.HEndDate = "";
+                    //oItem.HInnerBillNo = "";
+                    //oItem.HExplanation = "";
+
+                    //oItem.HInterID = DBUtility.ClsPub.CreateBillID_SRMProd("1103", ref DBUtility.ClsPub.sExeReturnInfo);
+                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佹病鏈夊崟鎹棩鏈燂紝鏃犳硶淇濆瓨锛�";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    oBill.omodel = oItem;
+                }
+                //琛ㄤ綋鏁版嵁
+                //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
+                msg3 = msg3.Substring(1, msg3.Length - 2);
+                msg3 = msg3.Replace("\\", "");
+                msg3 = msg3.Replace("\n", "");  //\n
+                //msg2 = msg2.Replace("'", "鈥�");
+                List<Model.ClsSb_EquipPatrolCheckPlanBillSub> ls = new List<Model.ClsSb_EquipPatrolCheckPlanBillSub>();
+                ls = oListModels.getObjectByJson_Sb_EquipPatrolCheckPlanBillSub(msg3);
+                int i = 0;
+                foreach (Model.ClsSb_EquipPatrolCheckPlanBillSub oItemSub in ls)
+                {
+
+                    i++;
+                    oItemSub.HEntryID = i;
+                    //oItemSub.HCloseMan = "";       //琛屽叧闂�
+                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+                    oItemSub.HCloseType = false;   //鍏抽棴绫诲瀷
+                    //oItemSub.HRemark = "";         //澶囨敞
+                    oItemSub.HSourceInterID = 0;     // 婧愬崟涓诲唴鐮�
+                    oItemSub.HSourceEntryID = 0;   //婧愬崟瀛愬唴鐮�
+                    //oItemSub.HSourceBillNo = "";  //婧愬崟鍗曞彿
+                    //oItemSub.HSourceBillType = ""; //婧愬崟绫诲瀷
+                    oItemSub.HRelationQty = 0;     //鍏宠仈鏁伴噺
+                                                   //oItemSub.HRelationMoney = 0;   //鍏宠仈閲戦
+                                                   //HMaterID = "";//閰嶄欢浠g爜
+                                                   //HUnitID = "";//鍗曚綅浠g爜
+                                                   //HQty = "";//瀹為檯鐢ㄩ噺
+                                                   //HQtyMust = "";//鍗曚綅鐢ㄩ噺
+                                                   //HRemark = "";//澶囨敞
+
+                    oBill.DetailColl.Add(oItemSub);
+
+                }
+                //淇濆瓨
+                //淇濆瓨瀹屾瘯鍚庡鐞�
+                bool bResult;
+                if (oBill.omodel.HInterID == 0)
+                {
+                    // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+                }
+                else
+                {
+                    bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+                }
+                if (bResult)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+                    //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+                    objJsonResult.data = 1;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = 1;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+                objJsonResult.data = 1;
+                return objJsonResult;
+            }
+        }
+        #endregion
+        #region [璁惧宸℃璁″垝琛ㄥ垹闄ゅ姛鑳絔
+        /// <summary>
+        /// 妯″叿缁翠慨鍗曞垹闄ゅ姛鑳�
+        /// </summary>
+        /// <returns></returns>
+        [Route("Sb_EquipPatrolCheckPlanBill/DeltetEquipPatrolCheckPlanBillList")]
+        [HttpGet]
+        public object DeltetEquipPatrolCheckPlanBillList(string HInterID,string user)
+        {
+            //缂栬緫鏉冮檺
+            if (!DBUtility.ClsPub.Security_Log("Sb_EquipPatrolCheckPlanBill_Delete", 1, false, user))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+
+
+            Int64 lngBillKey = 0;
+            lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+            if (lngBillKey == 0)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            DAL.ClsSb_EquipPatrolCheckPlanBill oBill = new DAL.ClsSb_EquipPatrolCheckPlanBill();
+            if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
+            {
+                if (oBill.omodel.HBillStatus > 1)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁褰撳墠澶勪簬涓嶈兘鍒犻櫎鐘舵��,涓嶈兘鍒犻櫎锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                if (oBill.omodel.HChecker != "")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁宸茬粡瀹℃牳,涓嶈兘鍒犻櫎锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                //鍒犻櫎鍓嶆帶鍒�=========================================      
+                string sql1 = "exec h_p_Sb_EquipPatrolCheckPlanBill_BeforeDelCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + user + "'";
+                ds = oCN.RunProcReturn(sql1, "h_p_Sb_EquipPatrolCheckPlanBill_BeforeDelCtrl");
+                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:鍒犻櫎鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                //==================================================================================  
+
+                bool IsDete = oBill.DeleteBill(lngBillKey, oBill.omodel.HBillNo, "h_p_Sb_EquipPatrolCheckPlanBill_AfterDelCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo);
+                if (IsDete)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            else
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍗曟嵁鏈壘鍒�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region[璁惧宸℃璁″垝琛ㄧ紪杈戞椂鑾峰彇琛ㄥご鏁版嵁]
+        [Route("Sb_EquipPatrolCheckPlanBill/Sb_EquipPatrolCheckPlanBillListCheckDetai")]
+        [HttpGet]
+        public ApiResult<DataSet> Sb_EquipPatrolCheckPlanBillListCheckDetai(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_Sb_EquipPatrolCheckPlanBill_Edit2  where hmainid= " + HID + " ", "h_v_Sb_EquipPatrolCheckPlanBill_Edit2");
+            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("Sb_EquipPatrolCheckPlanBill/Sb_EquipPatrolCheckPlanBillListProjectDetai")]
+        [HttpGet]
+        public object Sb_EquipPatrolCheckPlanBillListProjectDetai(string sqlWhere)
+        {
+            DataSet ds;
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                if (sqlWhere == null || sqlWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("select * from h_v_Sb_EquipPatrolCheckPlanBill_Edit", "h_v_Sb_EquipPatrolCheckPlanBill_Edit");
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
+                }
+                else
+                {
+                    string sql1 = "select * from h_v_Sb_EquipPatrolCheckPlanBill_Edit where 1 = 1 ";
+                    string sql = sql1 + sqlWhere;
+                    ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipPatrolCheckPlanBill_Edit");
+                    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
+
+        #region[璁惧宸℃璁板綍琛紝閫夊贰妫�璁″垝鑾峰彇宸℃璁″垝娓呭崟淇℃伅]
+        [Route("Sb_EquipPatrolCheckPlanBill/Sb_EquipPatrolCheckPlanBill_PlanList")]
+        [HttpGet]
+        public object Sb_EquipPatrolCheckPlanBill_PlanList(string HInterID,string HDate)
+        {
+            DataSet ds;
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+                ds = oCN.RunProcReturn("exec h_p_Sb_EquipPatrolCheck_GetPlanList " + HInterID + ",'" + HDate + "'", "h_p_Sb_EquipPatrolCheck_GetPlanList");
+
+                if (ds.Tables[0].Rows.Count != 0 || ds != null)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    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
+
+        #region[璁惧宸℃璁″垝琛ㄧ紪杈戞椂鑾峰彇琛ㄤ綋鏁版嵁--宸℃璁″垝]
+        [Route("Sb_EquipPatrolCheckPlanBill/GetPlanList")]
+        [HttpGet]
+        public object GetPlanList(string sqlWhere)
+        {
+            DataSet ds;
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                if (sqlWhere == null || sqlWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("select * from h_v_Sb_EquipPatrolCheckPlanList", "h_v_Sb_EquipPatrolCheckPlanList");
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
+                }
+                else
+                {
+                    string sql1 = "select * from h_v_Sb_EquipPatrolCheckPlanList where 1 = 1 ";
+                    string sql = sql1 + sqlWhere;
+                    ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipPatrolCheckPlanList");
+                    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
+
+        #region 璁惧宸℃璁″垝鍗曞鏍�/鍙嶅鏍稿姛鑳�
+        [Route("Sb_EquipPatrolCheckPlanBill/CheckSb_EquipPatrolCheckPlanBill")]
+        [HttpGet]
+        public object CheckSb_EquipMaintainRuleBill(string HInterID, int Type, string user)
+        {
+            string sql = "";
+            try
+            {
+                //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄�
+                if (!DBUtility.ClsPub.Security_Log("Sb_EquipPatrolCheckPlanBill_Check", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳潈闄愬鏍�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (string.IsNullOrWhiteSpace(HInterID))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "HInterID涓虹┖锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                ClsPub.CurUserName = user;
+                ds = oCN.RunProcReturn("select * from Sb_EquipPatrolCheckPlanBillMain where HInterID = " + int.Parse(HInterID), "Sb_EquipPatrolCheckPlanBillMain");
+                string HBillNo = "";
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
+                }
+                oCN.BeginTran();//寮�濮嬩簨鍔�
+
+                //Type 1 瀹℃牳  2  鍙嶅鏍�
+                if (Type == 1)
+                {
+                    //瀹℃牳鍓嶆帶鍒�
+                    sql = "exec h_p_Sb_EquipPatrolCheckPlanBill_BeforeCheckCtrl  " + int.Parse(HInterID) + ",'" + HBillNo + "','" + user + "'";
+                    ds = oCN.RunProcReturn(sql, "h_p_Sb_EquipPatrolCheckBill_BeforeCheckCtrl ");
+                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:瀹℃牳鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+
+                    }
+                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    if (!BillOld.CheckBill(int.Parse(HInterID), HBillNo, "h_p_Sb_EquipPatrolCheckPlanBill_AfterCheckCtrl", user, ref ClsPub.sExeReturnInfo))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    //鑷姩鐢熸垚宸℃璁″垝鍗�
+                    oCN.RunProc("exec h_p_Sb_EquipPatrolCheckPlan_Auto " + HInterID);
+                }
+                else
+                {
+                    //鍙嶅鏍稿墠鎺у埗
+                    sql = "exec  h_p_Sb_EquipPatrolCheckPlanBill_BeforeUnCheckCtrl " + int.Parse(HInterID) + ",'" + HBillNo + "','" + user + "'";
+                    ds = oCN.RunProcReturn(sql, "h_p_Sb_EquipPatrolCheckBill_BeforeUnCheckCtrl");
+                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:鍙嶅鏍稿墠鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+
+                    }
+                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+
+                    if (BillOld.AbandonCheck(int.Parse(HInterID), HBillNo, " h_p_Sb_EquipPatrolCheckPlanBill_AfterUnCheckCtrl", user, ref ClsPub.sExeReturnInfo))
+                    {
+                        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+                    }
+                    else
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                oCN.Commit();//鎻愪氦浜嬪姟
+
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鎵ц鎴愬姛锛�";
+                objJsonResult.data = null;
+                return objJsonResult; ;
+
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 璁惧宸℃璁″垝鍗曞叧闂�/鍙嶅叧闂姛鑳�
+        [Route("Sb_EquipPatrolCheckPlanBill/CloseSb_EquipPatrolCheckPlanBill")]
+        [HttpGet]
+        public object CloseSb_EquipMaintainRuleBill(string HInterID, int Type, string user)
+        {
+            try
+            {
+                //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄�
+                if (!DBUtility.ClsPub.Security_Log("Sb_EquipPatrolCheckPlanBill_Close", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳潈闄愬叧闂�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (string.IsNullOrWhiteSpace(HInterID))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "HInterID涓虹┖锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                ClsPub.CurUserName = user;
+
+                oCN.BeginTran();//寮�濮嬩簨鍔�
+
+                //Type 1 鍏抽棴  2  鍙嶅叧闂�
+                if (Type == 1)
+                {
+                    string sql = "";
+                    //鍏抽棴鍓嶆帶鍒�===============================================Begin===================================================================
+                    sql = "exec h_p_Sb_EquipPatrolCheckPlanBill_BeforeCloseCtrl " + HInterID + ",'','" + user + "'";
+                    ds = oCN.RunProcReturn(sql, "h_p_Sb_EquipPatrolCheckPlanBill_BeforeCloseCtrl");
+                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:鍏抽棴鍓嶅墠鍒ゆ柇澶辫触锛屾棤杩斿洖淇℃伅锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+
+                    }
+                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    //鍏抽棴鍓嶆帶鍒�===============================================End===================================================================
+
+                    //鍏抽棴鎻愪氦
+                    if (BillOld.CloseBill(Convert.ToInt32(HInterID), "", "h_p_Sb_EquipPatrolCheckPlanBill_AfterCloseCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+                    {
+                        objJsonResult.code = "1";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鍏抽棴鎴愬姛";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }                    
+                }
+                else
+                {
+                    string sql = "";
+                    //鍙嶅叧闂墠鎺у埗===============================================Begin===================================================================
+                    sql = "exec h_p_Sb_EquipPatrolCheckPlanBill_BeforeUnCloseCtrl " + HInterID + ",'','" + user + "'";
+                    ds = oCN.RunProcReturn(sql, "h_p_Sb_EquipPatrolCheckPlanBill_BeforeUnCloseCtrl");
+                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:鍙嶅叧闂墠鍓嶅垽鏂け璐ワ紝鏃犺繑鍥炰俊鎭紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+
+                    }
+                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    //鍙嶅叧闂墠鎺у埗===============================================End===================================================================
+
+                    //鍙嶅叧闂彁浜�
+                    if (BillOld.CancelClose(Convert.ToInt32(HInterID), "", "h_p_Sb_EquipPatrolCheckPlanBill_AfterUnCloseCtrl", user, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+                    {
+                        objJsonResult.code = "1";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鍙嶅叧闂垚鍔�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                oCN.Commit();//鎻愪氦浜嬪姟
+
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鎵ц鎴愬姛锛�";
+                objJsonResult.data = null;
+                return objJsonResult; ;
+
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+
+
+        #endregion
+
+    }
+}
\ No newline at end of file
diff --git a/WebAPI/Controllers/SBGL/Sb_EquipPatrolCheckRuleBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipPatrolCheckRuleBillController.cs
new file mode 100644
index 0000000..1f89ec9
--- /dev/null
+++ b/WebAPI/Controllers/SBGL/Sb_EquipPatrolCheckRuleBillController.cs
@@ -0,0 +1,1163 @@
+锘縰sing DBUtility;
+using Newtonsoft.Json;
+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;
+using System.Web;
+using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�;
+using System.IO;
+
+namespace WebAPI.Controllers.SBGL
+{
+    public class Sb_EquipPatrolCheckRuleBillController : ApiController
+    {
+        private json objJsonResult = new json();
+        public DataSet ds = new DataSet();
+        public DBUtility.ClsPub.Enum_BillStatus BillStatus;//鍗曟嵁鐘舵�侊紙鏂板锛屼慨鏀癸紝娴忚锛屾洿鏂板崟浠凤紝鍙樻洿锛�
+        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        public DLL.ClsSb_EquipPatrolCheckRuleBill BillNew = new DLL.ClsSb_EquipPatrolCheckRuleBill();   //瀵瑰簲鍗曟嵁绫�
+        public DLL.ClsSb_EquipPatrolCheckRuleBill BillOld = new DLL.ClsSb_EquipPatrolCheckRuleBill();   //瀵瑰簲鍗曟嵁绫�
+
+
+        #region 璁惧宸℃瑙勭▼鍗曞垪琛�
+        [Route("Sb_EquipPatrolCheckRuleBill/GetEquipPatrolCheckRuleList")]
+        [HttpGet]
+        public object GetEquipPatrolCheckRuleList(string sWhere,string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                
+                if (!DBUtility.ClsPub.Security_Log("Sb_EquipPatrolCheckRuleBillList", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("select * from h_v_Sb_EquipPatrolCheckRuleList " + sWhere + " order by hmainid desc", "h_v_Sb_EquipPatrolCheckRuleList");
+                }
+                else
+                {
+                    string sql1 = "select * from h_v_Sb_EquipPatrolCheckRuleList where 1 = 1";
+                    string sql = sql1 + sWhere + " order by hmainid desc";
+                    ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipPatrolCheckRuleList");
+                }
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+                //if (ds.Tables[0].Rows.Count != 0 || ds != null)
+                //{
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+                //}
+                //else
+                //{
+                //objJsonResult.code = "0";
+                //objJsonResult.count = 0;
+                //objJsonResult.Message = "鏃犳暟鎹�";
+                //objJsonResult.data = null;
+                //return objJsonResult;
+                //}
+            }
+            catch (Exception ex)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 璁惧宸℃瑙勭▼鍗曞垪琛≒DA
+        [Route("Sb_EquipPatrolCheckRuleBill/GetEquipPatrolCheckRuleListPDA")]
+        [HttpGet]
+        public object GetEquipPatrolCheckRuleListPDA(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                if (!DBUtility.ClsPub.Security_Log("Sb_EquipPatrolCheckRuleBillList", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("select * from h_v_Sb_GetPatrolCheckRuleListByEquip " + sWhere , "h_v_Sb_GetPatrolCheckRuleListByEquip");
+                }
+                else
+                {
+                    string sql1 = "select * from h_v_Sb_GetPatrolCheckRuleListByEquip where 1 = 1";
+                    string sql = sql1 + sWhere;
+                    ds = oCN.RunProcReturn(sql, "h_v_Sb_GetPatrolCheckRuleListByEquip");
+                }
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+                //if (ds.Tables[0].Rows.Count != 0 || ds != null)
+                //{
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+                //}
+                //else
+                //{
+                //objJsonResult.code = "0";
+                //objJsonResult.count = 0;
+                //objJsonResult.Message = "鏃犳暟鎹�";
+                //objJsonResult.data = null;
+                //return objJsonResult;
+                //}
+            }
+            catch (Exception ex)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 璁惧宸℃瑙勭▼璁板綍鍒犻櫎鍔熻兘
+        [Route("Sb_EquipPatrolCheckRuleBill/DeleteEquipPatrolCheckRuleBillList")]
+        [HttpGet]
+        public object DeleteEquipPatrolCheckRuleBillList(string HInterID,string user)
+        {
+            if (!DBUtility.ClsPub.Security_Log("Sb_EquipPatrolCheckRuleBill_Delete", 1, false, user))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            Int64 lngBillKey = 0;
+            lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+            if (lngBillKey == 0)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            DLL.ClsSb_EquipPatrolCheckRuleBill oBill = new DLL.ClsSb_EquipPatrolCheckRuleBill();
+            ds = oCN.RunProcReturn("select * from Sb_EquipPatrolCheckRuleBillMain where HInterID=" + HInterID, "Sb_EquipPatrolCheckRuleBillMain");
+            if (ds.Tables[0].Rows.Count>0)
+            {
+                //鏁版嵁搴撶┖鍊煎垽鏂�
+                if (ds.Tables[0].Rows[0]["HBillStatus"] == DBNull.Value)
+                {
+                    ds.Tables[0].Rows[0]["HBillStatus"] = 1;
+                }
+                if (int.Parse(ds.Tables[0].Rows[0]["HBillStatus"].ToString())  > 1)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁褰撳墠澶勪簬涓嶈兘鍒犻櫎鐘舵�侊紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                //鍒犻櫎鍓嶆帶鍒�=========================================      
+                string sql1 = "exec h_p_Sb_EquipPatrolCheckRuleBill_BeforeDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
+                ds = oCN.RunProcReturn(sql1, "h_p_Sb_EquipPatrolCheckRuleBill_BeforeDelCtrl");
+                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:鍒犻櫎鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                //==================================================================================  
+
+                bool IsDete = oBill.DeleteBill(lngBillKey,BillOld.omodel.HBillNo, "h_p_Sb_EquipPatrolCheckRuleBill_AfterDelCtrl",user, ref DBUtility.ClsPub.sExeReturnInfo);
+                if (IsDete)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            else
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍗曟嵁鏈壘鍒�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region[璁惧宸℃瑙勭▼鍗曠紪杈戞椂鑾峰彇琛ㄥご鏁版嵁]
+        [Route("Sb_EquipPatrolCheckRuleBill/Sb_EquipPatrolCheckRuleBillListCheckDetai")]
+        [HttpGet]
+        public ApiResult<DataSet> Sb_EquipPatrolCheckRuleBillListCheckDetai(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_Sb_EquipPatrolCheckRuleEdit  where hmainid= " + HID + " ", "h_v_Sb_EquipPatrolCheckRuleEdit");
+            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("Sb_EquipPatrolCheckRuleBill/Sb_EquipPatrolCheckRuleBillListProjectDetai")]
+        [HttpGet]
+        public object Sb_EquipPatrolCheckRuleBillListProjectDetai(string sqlWhere)
+        {
+            DataSet ds;
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+                string sql1 = @"select  *  from h_v_Sb_EquipPatrolCheckRuleEdit a
+                        left join Gy_PatrolCheck b  on a.宸℃椤圭洰ID =b.HItemID where 1 = 1 ";
+                string sql = sql1 + sqlWhere;
+                ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipPatrolCheckRuleEdit");
+                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
+
+        #region 璁惧宸℃瑙勭▼鍗� 淇濆瓨/缂栬緫
+        /// <summary>
+        /// 璁惧宸℃瑙勭▼鍗� 淇濆瓨
+        /// </summary>
+        /// <param name="msg"></param>
+        /// <returns></returns>
+        [Route("Sb_EquipPatrolCheckRuleBill/SaveEquipPatrolCheckRuleBill")]
+        [HttpPost]
+        public object SaveEquipPatrolCheckRuleBill([FromBody] JObject msg)
+        {
+            var _value = msg["msg"].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();
+
+
+            string UserName = "";
+            ListModels oListModels = new ListModels();
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Sb_EquipPatrolCheckRuleBill_Edit", 1, false, msg4))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                DLL.ClsSb_EquipPatrolCheckRuleBill oBill = new DLL.ClsSb_EquipPatrolCheckRuleBill();
+                List<Models.ClsSb_EquipPatrolCheckRuleBillMain> lsmain = new List<Models.ClsSb_EquipPatrolCheckRuleBillMain>();
+                msg2 = msg2.Replace("\\", "");
+                msg2 = msg2.Replace("\n", "");  //\n
+                lsmain = oListModels.getObjectByJson_Sb_EquipPatrolCheckRuleBillMain(msg2);
+                foreach (Models.ClsSb_EquipPatrolCheckRuleBillMain oItem in lsmain)
+                {
+                    UserName = oItem.HMaker;  //鍒跺崟浜�
+                    oItem.HBillType = "5015";
+                    oItem.HBillSubType = "5015";
+                    DBUtility.ClsPub.CurUserName = UserName;
+                    oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));//  --鏃ユ湡
+                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+
+                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佹病鏈夊崟鎹棩鏈燂紝鏃犳硶淇濆瓨锛�";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    oBill.omodel = oItem;
+                }
+
+                //琛ㄤ綋鏁版嵁 鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
+                msg3 = msg3.Substring(1, msg3.Length - 2);
+                msg3 = msg3.Replace("\\", "");
+                msg3 = msg3.Replace("\n", "");  //\n
+                //msg2 = msg2.Replace("'", "鈥�");
+                List<Models.ClsSb_EquipPatrolCheckRuleBillSub> ls = new List<Models.ClsSb_EquipPatrolCheckRuleBillSub>();
+                ls = oListModels.getObjectByJson_Sb_EquipPatrolCheckRuleBillSub(msg3);
+                int i = 0;
+                foreach (Models.ClsSb_EquipPatrolCheckRuleBillSub oItemSub in ls)
+                {
+
+                    i++;
+                    oItemSub.HEntryID = i;
+                    //oItemSub.HCloseMan = "";       //琛屽叧闂�
+                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+                    oItemSub.HCloseType = false;   //鍏抽棴绫诲瀷
+                    //oItemSub.HRemark = "";         //澶囨敞
+                    oItemSub.HSourceInterID = 0;     // 婧愬崟涓诲唴鐮�
+                    oItemSub.HSourceEntryID = 0;   //婧愬崟瀛愬唴鐮�
+                    //oItemSub.HSourceBillNo = "";  //婧愬崟鍗曞彿
+                    //oItemSub.HSourceBillType = ""; //婧愬崟绫诲瀷
+                    oItemSub.HRelationQty = 0;     //鍏宠仈鏁伴噺
+                                                   
+                    oBill.DetailColl_Mater.Add(oItemSub);
+
+                }
+                //淇濆瓨
+                //淇濆瓨瀹屾瘯鍚庡鐞�
+                bool bResult;
+                if (oBill.omodel.HInterID == 0)
+                {
+                    // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+                }
+                else
+                {
+                    bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+                }
+                if (bResult)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+                    //WebAPIController.Add_Log("閫佽揣鍗曚笅鎺�", UserName, "鐢熸垚閫佽揣鍗�");
+                    objJsonResult.data = 1;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = 1;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.ToString();
+                objJsonResult.data = 1;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 璁惧宸℃瑙勭▼鍗曞鏍�/鍙嶅鏍稿姛鑳�
+        [Route("Sb_EquipPatrolCheckRuleBill/CheckSb_EquipPatrolCheckRuleBill")]
+        [HttpGet]
+        public object CheckSb_EquipPatrolCheckRuleBill(string HInterID, int Type, string user)
+        {
+            try
+            {
+                //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄�
+                if (!DBUtility.ClsPub.Security_Log("Sb_EquipPatrolCheckRuleBill_Check", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳潈闄愬鏍�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (string.IsNullOrWhiteSpace(HInterID))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "HInterID涓虹┖锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                DLL.ClsSb_EquipPatrolCheckRuleBill oBill = new DLL.ClsSb_EquipPatrolCheckRuleBill();
+                ClsPub.CurUserName = user;
+                oCN.BeginTran();//寮�濮嬩簨鍔�
+
+                //Type 1 瀹℃牳  2  鍙嶅鏍�
+                if (Type == 1)
+                {
+                    //瀹℃牳鍓嶆帶鍒�=========================================      
+                    string sql1 = "exec h_p_Sb_EquipPatrolCheckRuleBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + user + "'";
+                    ds = oCN.RunProcReturn(sql1, "h_p_Sb_EquipPatrolCheckRuleBill_BeforeCheckCtrl");
+                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:瀹℃牳鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+                        objJsonResult.data = null;
+                        oCN.RollBack();
+                        return objJsonResult;
+                    }
+
+                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+                        objJsonResult.data = null;
+                        oCN.RollBack();
+                        return objJsonResult;
+                    }
+                    //==================================================================================      
+
+                    if (!BillOld.CheckBill(int.Parse(HInterID),oBill.omodel.HBillNo, "h_p_Sb_EquipPatrolCheckRuleBill_AfterCheckCtrl",user, ref ClsPub.sExeReturnInfo))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+                else
+                {
+                    //鍙嶅鏍稿墠鎺у埗=========================================        
+                    string sql1 = "exec h_p_Sb_EquipPatrolCheckRuleBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + user + "'";
+                    ds = oCN.RunProcReturn(sql1, "h_p_Sb_EquipPatrolCheckRuleBill_BeforeUnCheckCtrl");
+                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:鍙嶅鏍稿墠鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+
+                    }
+                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    //===========================================================         
+
+
+                    if (BillOld.AbandonCheck(int.Parse(HInterID),oBill.omodel.HBillNo, "h_p_Sb_EquipPatrolCheckRuleBill_AfterUnCheckCtrl",user, ref ClsPub.sExeReturnInfo))
+                    {
+                        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+                    }
+                    else
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                oCN.Commit();//鎻愪氦浜嬪姟
+
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鎵ц鎴愬姛锛�";
+                objJsonResult.data = null;
+                return objJsonResult; ;
+
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 璁惧宸℃瑙勭▼鍗曞叧闂�/鍙嶅叧闂姛鑳�
+        [Route("Sb_EquipPatrolCheckRuleBill/CloseSb_EquipPatrolCheckRuleBill")]
+        [HttpGet]
+        public object CloseSb_EquipPatrolCheckRuleBill(string HInterID, int Type, string user)
+        {
+            try
+            {
+                //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄�
+                if (!DBUtility.ClsPub.Security_Log("Sb_EquipPatrolCheckRuleBill_Close", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳潈闄愬叧闂�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (string.IsNullOrWhiteSpace(HInterID))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "HInterID涓虹┖锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                ClsPub.CurUserName = user;
+
+                oCN.BeginTran();//寮�濮嬩簨鍔�
+
+                //Type 1 鍏抽棴  2  鍙嶅叧闂�
+                if (Type == 1)
+                {
+                    if (!BillOld.CloseBill(int.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+                else
+                {
+                    if (!BillOld.CancelClose(int.Parse(HInterID), ref ClsPub.sExeReturnInfo))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                oCN.Commit();//鎻愪氦浜嬪姟
+
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鎵ц鎴愬姛锛�";
+                objJsonResult.data = null;
+                return objJsonResult; ;
+
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 璁惧宸℃瑙勭▼浣滃簾/鍙嶄綔搴熷姛鑳�
+        [Route("Sb_EquipPatrolCheckRuleBill/DeleteSb_EquipPatrolCheckRuleBill")]
+        [HttpGet]
+        public object DeleteSb_EquipPatrolCheckRuleBill(string HInterID, int Type, string user)
+        {
+            try
+            {
+                //鍒ゆ柇鏄惁鏈夊垹闄ゆ潈闄�
+                if (!DBUtility.ClsPub.Security_Log("Sb_EquipPatrolCheckRuleBill_Drop", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳潈闄愪綔搴�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (string.IsNullOrWhiteSpace(HInterID))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "HInterID涓虹┖锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                DLL.ClsSb_EquipPatrolCheckRuleBill oBill = new DLL.ClsSb_EquipPatrolCheckRuleBill();
+                ClsPub.CurUserName = user;
+                Int64 lngBillKey = 0;
+                lngBillKey = DBUtility.ClsPub.isLong(HInterID);
+                //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔
+                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁
+                {
+                    if (oBill.omodel.HChecker.Trim() != "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘杩涜浣滃簾锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    if (Type == 1)  //浣滃簾鍒ゆ柇
+                    {
+                        if (oBill.omodel.HDeleteMan.Trim() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶄綔搴燂紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    if (Type == 2) //鍙嶄綔搴熷垽鏂�
+                    {
+                        if (oBill.omodel.HDeleteMan.Trim() == "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁鏈綔搴�!涓嶉渶瑕佸弽浣滃簾锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                oCN.BeginTran();//寮�濮嬩簨鍔�
+
+                //Type 1 浣滃簾  2  鍙嶄綔搴�
+                if (Type == 1)
+                {
+                    //浣滃簾鍓嶆帶鍒�=========================================      
+                    string sql1 = "exec h_p_Sb_EquipPatrolCheckRuleBill_BeforeDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + user + "'";
+                    ds = oCN.RunProcReturn(sql1, "h_p_Sb_EquipPatrolCheckRuleBill_BeforeDropCtrl");
+                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "浣滃簾澶辫触!鍘熷洜:浣滃簾鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+                        objJsonResult.data = null;
+                        oCN.RollBack();
+                        return objJsonResult;
+                    }
+
+                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "浣滃簾澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+                        objJsonResult.data = null;
+                        oCN.RollBack();
+                        return objJsonResult;
+                    }
+                    //==================================================================================      
+
+                    if (!oBill.Cancelltion(int.Parse(HInterID), oBill.omodel.HBillNo, "h_p_Sb_EquipPatrolCheckRuleBill_AfterDropCtrl", user, ref ClsPub.sExeReturnInfo))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "浣滃簾澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+                else
+                {
+                    //鍙嶄綔搴熷墠鎺у埗=========================================        
+                    string sql1 = "exec h_p_Sb_EquipPatrolCheckRuleBill_BeforeUnDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + user + "'";
+                    ds = oCN.RunProcReturn(sql1, "h_p_Sb_EquipPatrolCheckRuleBill_BeforeUnDropCtrl");
+                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鍙嶄綔搴熷け璐�!鍘熷洜:鍙嶄綔搴熷墠鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+
+                    }
+                    if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鍙嶄綔搴熷け璐�!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    //===========================================================   
+
+                    if (!oBill.AbandonCancelltion(int.Parse(HInterID), oBill.omodel.HBillNo, "h_p_Sb_EquipPatrolCheckRuleBill_AfterUnDropCtrl", user, ref ClsPub.sExeReturnInfo))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鍙嶄綔搴熷け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                oCN.Commit();//鎻愪氦浜嬪姟
+
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鎵ц鎴愬姛锛�";
+                objJsonResult.data = null;
+                return objJsonResult; ;
+
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 璁惧宸℃瑙勭▼鍗曟枃浠朵笂浼�
+        [Route("Sb_EquipPatrolCheckRuleBill/Sb_EquipPatrolCheckRuleBill_Excel")]
+        [HttpPost]
+        public object Sb_EquipPatrolCheckRuleBill_Excel()
+        {
+            try
+            {
+
+                //鑾峰彇鏂囦欢鍚嶇О
+                var file = HttpContext.Current.Request.Files[0];
+                //鑾峰彇鏂囦欢鐗╃悊璺緞
+                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+                // 鍒涘缓涓�涓瓧鍏告潵瀛樺偍name鍒板崟鎹彿鍜孒InterID鐨勬槧灏�  
+                Dictionary<string, object[]> nameToValues = new Dictionary<string, object[]>();
+                string HBillType = "3913";
+                //淇濆瓨鏂囦欢
+                file.SaveAs(ExcelPath);
+
+                NpoiHelper np = new NpoiHelper();
+                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+                //鍒犻櫎鏂囦欢
+                File.Delete(ExcelPath);
+
+                //鍒涘缓涓存椂琛�
+                DataTable tb2 = new DataTable("dt2");
+
+                //娣诲姞鍒楀悕
+                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+                {
+                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+                }
+
+                //妯℃澘缂哄皯鍒� 浣嗛渶瑕佷粠鏁版嵁搴撲腑鏌ヨ鍑烘潵鏄剧ず鍦ㄩ〉闈㈢殑瀛楁
+                tb2.Columns.Add("HPatrolCheckItemID", typeof(Int32));//宸℃椤圭洰ID
+                tb2.Columns.Add("HPatrolCheckItemClassID", typeof(Int32));//宸℃鍒嗙被ID
+                tb2.Columns.Add("HPatrolCheckItemMethodID", typeof(Int32));//宸℃鏂规硶ID
+                tb2.Columns.Add("HEmpID", typeof(Int32));//璐熻矗浜�
+                tb2.Columns.Add("鍗曟嵁鍙�", typeof(string));//鍗曟嵁鍙�
+                tb2.Columns.Add("HInterID", typeof(Int64));//涓婚敭
+                //娣诲姞鏁版嵁
+                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+                {
+                    DataRow row = tb2.NewRow();
+                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+                    {
+                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+                    }
+                    tb2.Rows.Add(row);
+                }
+
+
+                var error = "";
+
+                //鏌ヨ宸℃瑙勭▼娌℃湁鐨勫垪
+                if (!tb2.Columns.Contains("宸℃瑙勭▼鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愬贰妫�瑙勭▼鍚嶇О銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍛ㄦ湡鍗曚綅"))
+                    error += "娌℃湁鎵惧埌銆愬懆鏈熷崟浣嶃�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("宸℃鍛ㄦ湡"))
+                    error += "娌℃湁鎵惧埌銆愬贰妫�鍛ㄦ湡銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鎽樿"))
+                    error += "娌℃湁鎵惧埌銆愭憳瑕併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("琛ㄥご澶囨敞"))
+                    error += "娌℃湁鎵惧埌銆愯〃澶村娉ㄣ�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("宸℃椤圭洰浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愬贰妫�椤圭洰浠g爜銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("宸℃椤圭洰鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愬贰妫�椤圭洰鍚嶇О銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("宸℃鏂规硶浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愬贰妫�椤圭洰浠g爜銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("宸℃鏂规硶鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愬贰妫�椤圭洰鍚嶇О銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("宸℃閮ㄤ綅"))
+                    error += "娌℃湁鎵惧埌銆愬贰妫�閮ㄤ綅銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍏蜂綋瑕佹眰"))
+                    error += "娌℃湁鎵惧埌銆愬叿浣撹姹傘�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("璐熻矗浜轰唬鐮�"))
+                    error += "娌℃湁鎵惧埌銆愯礋璐d汉浠g爜銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("璐熻矗浜哄悕绉�"))
+                    error += "娌℃湁鎵惧埌銆愯礋璐d汉鍚嶇О銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("琛ㄤ綋澶囨敞"))
+                    error += "娌℃湁鎵惧埌銆愯〃浣撳娉ㄣ�戠殑鏍囬,";
+
+                if (error.Length > 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
+                {
+
+                    string HPatrolCheckItemNumber = "";
+                    string HPatrolCheckItemName = "";
+                    string HEmpNum = "";
+                    string HEmpName = "";
+
+                    HPatrolCheckItemNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["宸℃椤圭洰浠g爜"].ToString());
+                    HPatrolCheckItemName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["宸℃椤圭洰鍚嶇О"].ToString());
+                    HEmpNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["璐熻矗浜轰唬鐮�"].ToString());
+                    HEmpName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["璐熻矗浜哄悕绉�"].ToString());
+                    string HPatrolCheckItemMethodNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["宸℃鏂规硶浠g爜"].ToString());
+                    string HPatrolCheckItemMethodName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["宸℃鏂规硶鍚嶇О"].ToString());
+
+                    string HEquipPatrolCheckRuleName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["宸℃瑙勭▼鍚嶇О"].ToString());
+                    string HCycleUnit = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鍛ㄦ湡鍗曚綅"].ToString());
+                    string HCheckCycle = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["宸℃鍛ㄦ湡"].ToString());
+                    string HExplanation = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鎽樿"].ToString());
+                    string HMainRemark = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["琛ㄥご澶囨敞"].ToString());
+                    string HPatrolCheckPart = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["宸℃閮ㄤ綅"].ToString());
+                    string HClaim = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鍏蜂綋瑕佹眰"].ToString());
+                    string HSubRemark = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["琛ㄤ綋澶囨敞"].ToString());
+
+                    int index = i + 1;
+                     //鏌ヨ宸℃椤圭洰
+                    ds = oCN.RunProcReturn("select * from Gy_PatrolCheck where  HNumber='" + HPatrolCheckItemNumber + "' and Hname='" + HPatrolCheckItemName + "'", "Gy_PatrolCheck");
+
+                    if (ds.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "绗�" + index + "琛�,宸℃椤圭洰涓嶅瓨鍦紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        tb2.Rows[i]["HPatrolCheckItemID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        tb2.Rows[i]["HPatrolCheckItemClassID"] = ds.Tables[0].Rows[0]["HPatrolCheckItemClassID"].ToString();
+                    }
+                    //鏌ヨ璐熻矗浜�
+                    ds = oCN.RunProcReturn("select * from Gy_Employee where  HNumber='" + HEmpNum + "' and Hname='" + HEmpName + "'", "Gy_Employee");
+
+                    if (ds.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "绗�" + index + "琛�,璇ヨ礋璐d汉:" + HEmpName + ",涓嶅瓨鍦紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        tb2.Rows[i]["HEmpID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                    }
+
+                    //鏌ヨ宸℃鏂规硶
+                    ds = oCN.RunProcReturn("select * from Gy_PatrolCheckItemMethod where  HNumber='" + HPatrolCheckItemMethodNumber + "' and Hname='" + HPatrolCheckItemMethodName + "'", "Gy_Employee");
+
+                    if (ds.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "绗�" + index + "琛�,璇ュ贰妫�鏂规硶:" + HEmpName + ",涓嶅瓨鍦紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        tb2.Rows[i]["HPatrolCheckItemMethodID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                    }
+
+                    //璁惧宸℃瑙勭▼鍚嶇О
+                    if (HEquipPatrolCheckRuleName == "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "绗�" + index + "琛�,璁惧宸℃瑙勭▼鍗曞悕绉颁笉鑳戒负绌猴紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+
+                    //鍛ㄦ湡鍗曚綅
+                    if (HCycleUnit == "" || (HCycleUnit != "鏈�" && HCycleUnit != "鍛�" && HCycleUnit != "澶�"))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "绗�" + index + "琛�,鍛ㄦ湡鍗曚綅涓嶈兘涓虹┖涓斿彧鑳戒负澶╋紝鏈堬紝鍛紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    //宸℃鍛ㄦ湡
+                    if (HCheckCycle == "" )
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "绗�" + index + "琛�,宸℃鍛ㄦ湡涓嶈兘涓虹┖锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    //璁剧疆鍗曟嵁HinterID鍜屽崟鎹彿
+                    
+
+                    Int64 HInterID;
+                    string HBillNo;
+                    object[] myArray = new object[2];
+                    // 濡傛灉瀛楀吀涓繕娌℃湁杩欎釜宸℃瑙勭▼鐨勬潯鐩紝灏辨坊鍔犲畠  
+                    if (!nameToValues.ContainsKey(HEquipPatrolCheckRuleName))
+                    {
+                        HInterID = DBUtility.ClsPub.CreateBillID(HBillType, ref DBUtility.ClsPub.sExeReturnInfo);
+                        HBillNo = DBUtility.ClsPub.CreateBillCode(HBillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
+                        myArray[0] = HInterID;
+                        myArray[1] = HBillNo;
+                        nameToValues[HEquipPatrolCheckRuleName] = myArray;
+                        tb2.Rows[i]["HInterID"] = HInterID;
+                        tb2.Rows[i]["鍗曟嵁鍙�"] = HBillNo;
+                    }
+                    // 濡傛灉瀛楀吀涓湁杩欎釜骞撮緞鐨勬潯鐩紝浣嗘槸褰撳墠琛岀殑鍚嶇О涓嶆槸瀛楀吀涓殑鍚嶇О锛屽氨鏇存柊瀹�  
+                    else if (true)
+                    {
+                        tb2.Rows[i]["HInterID"] = nameToValues[HEquipPatrolCheckRuleName][0];
+                        tb2.Rows[i]["鍗曟嵁鍙�"] = nameToValues[HEquipPatrolCheckRuleName][1];// 鏇存柊褰撳墠琛屽崟鎹彿鍜宨d
+                    }
+
+                }
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = error;
+                objJsonResult.data = tb2;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 璁惧宸℃瑙勭▼鍗� 瀵煎叆(淇濆瓨)
+        [Route("Sb_EquipPatrolCheckRuleBill/Sb_EquipPatrolCheckRuleBill_btnSave")]
+        [HttpPost]
+        public object Sb_EquipPatrolCheckRuleBill_btnSave([FromBody] JObject sMainSub)
+        {
+            var _value = sMainSub["sMainSub"].ToString();
+            string msg1 = _value.ToString();
+            string[] sArray = msg1.Split(new string[] { "&鍜�" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString();
+            string user = sArray[1].ToString();
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Sb_EquipPatrolCheckRuleBill_Edit", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+                foreach (JObject item in Excel)
+                {
+                    Dictionary<string, string> dic = new Dictionary<string, string>();
+                    foreach (var itm in item.Properties())
+                    {
+                        dic.Add(itm.Name, itm.Value.ToString());
+                    }
+                    list.Add(dic);
+                }
+
+                oCN.BeginTran();
+                int i = 1;
+                foreach (Dictionary<string, string> item in list)
+                {
+                    string HInterID = item["HInterID"].ToString();
+                    string HBillNo = item["鍗曟嵁鍙�"].ToString();
+                    //string HInterID = item["宸℃瑙勭▼鍚嶇О"].ToString();
+                    string HCycleUnit = item["鍛ㄦ湡鍗曚綅"].ToString();
+                    string HCheckCycle = item["宸℃鍛ㄦ湡"].ToString();
+                    string HExplanation = item["鎽樿"].ToString();
+                    string HMainRemark = item["琛ㄥご澶囨敞"].ToString();
+                    string HPatrolCheckItemID = item["HPatrolCheckItemID"].ToString();
+                    string HPatrolCheckItemClassID = item["HPatrolCheckItemClassID"].ToString();
+                    string HPatrolCheckItemMethodID = item["HPatrolCheckItemMethodID"].ToString();
+                    string HPatrolCheckItem = item["宸℃椤圭洰鍚嶇О"].ToString();
+                    string HPatrolCheckPart = item["宸℃閮ㄤ綅"].ToString();
+                    string HClaim = item["鍏蜂綋瑕佹眰"].ToString();
+                    string HEmpID = item["HEmpID"].ToString();
+                    string HSubRemark = item["琛ㄤ綋澶囨敞"].ToString();
+                    string HBillType = "3913";
+                    string HBillSubType = "3913";
+                    DateTime HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));
+                    Int64 HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+                    Int64 HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
+                    DataSet Cs;
+                    Int64 HEntryID = 1;
+                    Cs = oCN.RunProcReturn("select MAX(HEntryID)HEntryID from Sb_EquipPatrolCheckRuleBillSub", "Sb_EquipPatrolCheckRuleBillSub");
+                    if (Cs.Tables[0].Rows.Count != 0 && ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString()) != 0)
+                    {
+                        HEntryID = ClsPub.isLong(Cs.Tables[0].Rows[0]["HEntryID"].ToString());
+                        HEntryID += 1;
+                    }
+
+                    ds = oCN.RunProcReturn("select * from Sb_EquipPatrolCheckRuleBillMain where HInterID =" + HInterID, "Sb_EquipPatrolCheckRuleBillMain");
+
+                    if (ds.Tables[0].Rows.Count == 0)
+                    {
+
+                        //涓昏〃
+                        oCN.RunProc("Insert Into Sb_EquipPatrolCheckRuleBillMain   " +
+                        "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate,HBillStatus" +
+                        ",HYear,HPeriod,HRemark" +
+                        ",HBeginDate,HEndDate,HCycleUnit,HCheckCycle,HExplanation" +
+                        ") " +
+                        " values('" + HBillType + "','" + HBillSubType + "'," + HInterID.ToString() + ",'" + HBillNo + "','" + HDate + "','" + user + "',getdate(),1" +
+                        "," + HYear.ToString() + "," + HPeriod.ToString() + ",'" + HMainRemark + "'" +
+                        ",getdate()" + ",getdate()" + ",'" + HCycleUnit + "','" + HCheckCycle + "','" + HExplanation + "'" +
+                        ") ");
+                        //鎻掑叆瀛愯〃
+                        oCN.RunProc("Insert into Sb_EquipPatrolCheckRuleBillSub " +
+                            " (HInterID,HEntryID," +
+                            "HRemark," +
+                            "HPatrolCheckItemID,HPatrolCheckItem,HPatrolCheckPart,HClaim," +
+                            "HManagerID,HPatrolCheckItemClassID,HPatrolCheckItemMethodID" +
+                            ") values("
+                            + HInterID.ToString() + "," + HEntryID.ToString() +
+                             ",'" + HSubRemark + "'" +
+                            ",'" + HPatrolCheckItemID + "','" + HPatrolCheckItem + "','" + HPatrolCheckPart + "','" + HClaim +
+                            "'," + HEmpID + "," + HPatrolCheckItemClassID + "," + HPatrolCheckItemMethodID +
+                            ") ");
+                    }
+                    else
+                    {
+                        oCN.RunProc("Insert into Sb_EquipPatrolCheckRuleBillSub " +
+                            " (HInterID,HEntryID," +
+                            "HRemark," +
+                            "HPatrolCheckItemID,HPatrolCheckItem,HPatrolCheckPart,HClaim," +
+                            "HManagerID,HPatrolCheckItemClassID,HPatrolCheckItemMethodID" +
+                            ") values("
+                            + HInterID.ToString() + "," + HEntryID.ToString() +
+                             ",'" + HSubRemark + "'" +
+                            ",'" + HPatrolCheckItemID + "','" + HPatrolCheckItem + "','" + HPatrolCheckPart + "','" + HClaim +
+                            "'," + HEmpID + "," + HPatrolCheckItemClassID + "," + HPatrolCheckItemMethodID +
+                            ") ");
+                    }
+
+                    i++;
+                }
+
+                oCN.Commit();
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "瀵煎叆鎴愬姛!";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                LogService.Write(e);
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                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_PatrolCheckBillController.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_PatrolCheckBillController.cs"
index 5bc9ca0..916ee12 100644
--- "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_PatrolCheckBillController.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_PatrolCheckBillController.cs"
@@ -232,7 +232,7 @@
                 string HRemark = list[0].HRemark;
                 bool HStopflag = list[0].HStopflag;
                 string HModifyEmp = msg3;
-                string HPatrolCheckType = list[0].HPatrolCheckType;
+                string HPatrolCheckItemType = list[0].HPatrolCheckItemType;
                 bool HEndFlag = list[0].HEndFlag;
                 Int64 HPatrolCheckItemClassID = list[0].HPatrolCheckItemClassID;
 
@@ -302,7 +302,7 @@
                     ",HUSEORGID=" + HUSEORGID  +
                     ",HHelpCode='" + HHelpCode + "'" +
                     ",HStopflag='" + HStopflag + "'" +
-                    ",HPatrolCheckType='" + HPatrolCheckType + "'" +
+                    ",HPatrolCheckItemType='" + HPatrolCheckItemType + "'" +
                     ",HPatrolCheckItemClassID=" + HPatrolCheckItemClassID +                     
                     ",HRemark= '" + HRemark + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
                 //淇敼瀛愰」鐩唬鐮�
@@ -380,7 +380,7 @@
                 string HUseFlag = list[0].HUseFlag;
                 string HMakeEmp = list[0].HMakeEmp;
                 bool HEndFlag = list[0].HEndFlag;
-                string HPatrolCheckType = list[0].HPatrolCheckType;
+                string HPatrolCheckItemType = list[0].HPatrolCheckItemType;
                 Int64 HPatrolCheckItemClassID = list[0].HPatrolCheckItemClassID;
                 //鍒ゆ柇鏉冮檺
                 if (!ClsPub.Security_Log("Gy_PatrolCheck_Edit", 1, false, msg3))
@@ -432,11 +432,11 @@
                 oCN.RunProc("Insert into Gy_PatrolCheck " +
                    " (HNumber,HName,HHelpCode,HShortNumber" +
                    ",HLevel,HEndFlag,HStopflag,HRemark,HParentID,HPatrolCheckItemClassID" +
-                  ",HMakeEmp,HMakeTime,HUSEORGID,HCREATEORGID,HUseFlag,HPatrolCheckType" +
+                  ",HMakeEmp,HMakeTime,HUSEORGID,HCREATEORGID,HUseFlag,HPatrolCheckItemType" +
                    " ) " +
                    " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," +
                     +HLevel + ",1," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "',0," + HPatrolCheckItemClassID + "" +
-                      ",'" + HMakeEmp + "',getdate()," + HUSEORGID + "," + HCREATEORGID + ",'" + HUseFlag + "','"+ HPatrolCheckType + "')", ref DBUtility.ClsPub.sExeReturnInfo);
+                      ",'" + HMakeEmp + "',getdate()," + HUSEORGID + "," + HCREATEORGID + ",'" + HUseFlag + "','"+ HPatrolCheckItemType + "')", ref DBUtility.ClsPub.sExeReturnInfo);
                 //淇敼涓婄骇涓洪潪鏈骇浠g爜
                 //oCN.RunProc("Update Gy_MouldType set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
 
diff --git a/WebAPI/DLL/ClsSb_EquipPatrolCheckBill.cs b/WebAPI/DLL/ClsSb_EquipPatrolCheckBill.cs
new file mode 100644
index 0000000..5d37f88
--- /dev/null
+++ b/WebAPI/DLL/ClsSb_EquipPatrolCheckBill.cs
@@ -0,0 +1,343 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace WebAPI.DLL
+{
+    public  class ClsSb_EquipPatrolCheckBill:DBUtility.ClsXt_BaseBill
+    {
+        public Models.ClsSb_EquipPatrolCheckBillMain omodel = new Models.ClsSb_EquipPatrolCheckBillMain();
+        public List<Models.ClsSb_EquipPatrolCheckBillSub> DetailColl = new List<Models.ClsSb_EquipPatrolCheckBillSub>();
+
+        public ClsSb_EquipPatrolCheckBill()
+        {
+            base.MvarItemKeySub = "Sb_EquipPatrolCheckBillSub";
+            base.MvarItemKeySub2 = "";
+            base.MvarItemKeySub3 = "";
+            base.MvarItemKeySub4 = "";
+            base.MvarItemKey="Sb_EquipPatrolCheckBillMain";
+            base.MvarReportTitle="璁惧鐐规璁板綍";
+            base.BillType = "3903";
+            base.HBillSubType = "3903";
+
+        }
+
+        #region 鍥哄畾浠g爜
+
+        ~ClsSb_EquipPatrolCheckBill()
+        {
+            DetailColl = null;
+        }
+       
+        #endregion   鑷畾涔夋柟娉�
+        //淇敼鍗曟嵁
+        public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
+        {
+            try
+            {
+                //
+                oCn.BeginTran();
+
+                //淇濆瓨鍓嶆帶鍒�=========================================
+                string HBillNote = "";
+                DataSet ds = oCn.RunProcReturn("Exec h_p_Sb_EquipPatrolCheckBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "'2 ", "h_p_Sb_EquipPatrolCheckBill_BeforeSaveCtrl");
+                if (ds == null)
+                {
+                    sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+                    return false;
+                }
+                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+                    return false;
+                }
+                //=========================================================
+
+                //鏇存柊涓昏〃
+                oCn.RunProc("UpDate Sb_EquipPatrolCheckBillMain set  " +
+                " HBillNo='" + omodel.HBillNo + "'" +  //鍥哄畾璧嬪��===============
+                ",HDate='" + omodel.HDate + "'" +
+                ",HYear='" + omodel.HYear.ToString() + "'" +
+                ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
+                ",HRemark='" + omodel.HRemark + "'" +
+                ",HUpDater='" + omodel.HMaker + "'" +
+                ",HUpDateDate=getdate()" +
+                //========================================
+                ",HEquipID=" + omodel.HEquipID.ToString() +
+                ",HBeginDate='" + omodel.HBeginDate + "'" +
+                ",HEndDate='" + omodel.HEndDate+"'" +
+                ",HPlanNo='" + omodel.HPlanNo + "'" +
+                ",HExplanation='" + omodel.HExplanation+"'" +
+                ",HInnerBillNo='" + omodel.HInnerBillNo+"'" +
+                " where HInterID=" + lngBillKey.ToString());
+                //鍒犻櫎鍏宠仈
+                DeleteRelation(ref sReturn, lngBillKey);
+                //鍒犻櫎瀛愯〃
+                DeleteBillSub(lngBillKey);
+                //鎻掑叆瀛愯〃
+                omodel.HInterID = lngBillKey;
+                foreach (Models.ClsSb_EquipPatrolCheckBillSub oSub in DetailColl)
+                {
+                    oCn.RunProc("Insert into Sb_EquipPatrolCheckBillSub " +
+                      " (HInterID,HEntryID," +
+                      "HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
+                      "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
+                      "HPatrolCheckItem,HPatrolCheckPart,HClaim," +
+                      "HManagerID,HManagerNumber" +
+                      ") values("
+                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + 
+                      ",'" + oSub.HCloseMan + "','"+oSub.HEntryCloseDate+"'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
+                      "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+                      ",'" + oSub.HPatrolCheckItem + "','"+oSub.HPatrolCheckPart+"','"  + oSub.HClaim +
+                      "'," + oSub.HManagerID.ToString()+",'" +oSub.HManagerNumber+"'"+
+                      ") ");
+                }
+                //
+                //foreach (Model.ClsSb_EquipPatrolCheckBillSub oSub in DetailColl)
+                //{
+                //    Ds = oCn.RunProcReturn("exec h_p_Sb_EquipPatrolCheckBill_Qty " + oSub.HICMOInterID, "");
+                //    if (Ds.Tables[0].Rows.Count == 0)
+                //        return;
+                //    if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y")
+                //    {
+                //        sReturn = "姹囨姤鏁伴噺瓒呰繃璁″垝鏁伴噺锛佷笉鍏佽淇濆瓨";
+                //        return false;
+                //    }
+                //}
+
+                //=========================淇濆瓨鍚庢帶鍒�  
+                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sb_EquipPatrolCheckBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',2 ", "h_p_Sb_EquipPatrolCheckBill_AfterSaveCtrl");
+                if (ds2 == null)
+                {
+                    sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒";
+                    oCn.RollBack();
+                    return false;
+                }
+                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
+                    oCn.RollBack();
+                    return false;
+                }
+                //============================
+
+                sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+        //鏂板鍗曟嵁
+        public override bool AddBill(ref string sReturn)
+        {
+            try
+            {
+                //寰楀埌mainid
+                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+
+                //淇濆瓨鍓嶆帶鍒�=========================================
+                string HBillNote = "";
+                DataSet ds = oCn.RunProcReturn("Exec h_p_Sb_EquipPatrolCheckBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Sb_EquipPatrolCheckBill_BeforeSaveCtrl");
+                if (ds == null)
+                {
+                    sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+                    return false;
+                }
+                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+                    return false;
+                }
+                //=========================================================
+
+                //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+                oCn.BeginTran();
+                //涓昏〃
+                oCn.RunProc("Insert Into Sb_EquipPatrolCheckBillMain   " +
+                "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
+                ",HYear,HPeriod,HRemark,HEquipID" +
+                ",HBeginDate,HEndDate,HPlanNo,HExplanation,HInnerBillNo" +
+                ",HDeptID,HQty,HEquipPatrolCheckRuleInterID" +
+                ",HLastResult,HErrNote,HBigSafeNote,HShiftsID,HPatrolCheckNote" +
+                ") " +
+                " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
+                "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," + omodel.HEquipID.ToString() +
+                ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HPlanNo + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'" +
+               ",'" + omodel.HDeptID + "'," + omodel.HQty + "," + omodel.HEquipPatrolCheckRuleInterID + ",'" + omodel.HLastResult + "','" + omodel.HErrNote + "','" + omodel.HBigSafeNote + "'," + omodel.HShiftsID + ",'" + omodel.HPatrolCheckNote + "'" +
+                ") ");
+                //鎻掑叆瀛愯〃
+                foreach (Models.ClsSb_EquipPatrolCheckBillSub oSub in DetailColl)
+                {
+                    oCn.RunProc("Insert into Sb_EquipPatrolCheckBillSub " +
+                      " (HInterID,HEntryID," +
+                      "HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
+                      "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
+                      "HPatrolCheckItem,HPatrolCheckPart,HClaim," +
+                      "HManagerID,HManagerNumber,HPatrolCheckResult,HPatrolCheckItemID " +
+                      ",HPatrolCheckItemClassID,HPatrolCheckItemMethodID" +
+                      ") values("
+                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() +
+                      ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
+                      "," + oSub.HSourceInterID.ToString()  + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+                      ",'" + oSub.HPatrolCheckItem + "','" + oSub.HPatrolCheckPart + "','" + oSub.HClaim +
+                      "'," + oSub.HManagerID.ToString() + ",'" + oSub.HManagerNumber + "','" + oSub.HPatrolCheckResult + "'," + oSub.HPatrolCheckItemID + "," + oSub.HPatrolCheckItemClassID + "," + oSub.HPatrolCheckItemMethodID + 
+                      ") ");
+                }
+                //鏇存柊鐐规璁″垝瀛愯〃鍏宠仈鏍囪
+                oCn.RunProc("update Sb_EquipPatrolCheckPlanBillSub_Plan set HRelationFlag = 1 where HInterID = " + omodel.HPlanInterID + " and HEntryID = " + omodel.HPlanEntryID);
+                //
+                //foreach (Model.ClsSb_EquipPatrolCheckBillSub oSub in DetailColl)
+                //{
+                //    Ds = oCn.RunProcReturn("exec h_p_Sb_EquipPatrolCheckBill_Qty " + oSub.HICMOInterID, "");
+                //    if (Ds.Tables[0].Rows.Count == 0)
+                //        return;
+                //    if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y")
+                //    {
+                //        sReturn = "姹囨姤鏁伴噺瓒呰繃璁″垝鏁伴噺锛佷笉鍏佽淇濆瓨";
+                //        return false;
+                //    }
+                //}
+                //
+
+                //=========================淇濆瓨鍚庢帶鍒�  
+                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sb_EquipPatrolCheckBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Sb_EquipPatrolCheckBill_AfterSaveCtrl");
+                if (ds2 == null)
+                {
+                    sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒";
+                    oCn.RollBack();
+                    return false;
+                }
+                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
+                    oCn.RollBack();
+                    return false;
+                }
+                //============================
+                sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+        //鏄剧ず鍗曟嵁
+        public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
+        {
+            try
+            {
+                //鏌ヨ涓昏〃
+                DataSet Ds ;
+                Ds = oCn.RunProcReturn("Select * from Sb_EquipPatrolCheckBillMain Where HInterID=" + lngBillKey.ToString(), "Sb_EquipPatrolCheckBillMain");
+                if(Ds.Tables[0].Rows.Count==0)
+                {
+                    sReturn = "鍗曟嵁鏈壘鍒帮紒";
+                    return false;
+                }
+                //鍥哄畾璧嬪��===========================================
+                omodel.HInterID =DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
+                omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
+                omodel.HDate =DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
+                omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
+                omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
+                omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
+                omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
+                omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
+                omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
+                omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
+                omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
+                omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
+                omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
+                omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
+                omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
+                omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
+                omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
+                omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
+                omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
+                omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
+                omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
+                omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
+                omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
+                omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
+                //========================================================
+                //==
+                omodel.HEquipID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HEquipID"]);
+                omodel.HBeginDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HBeginDate"]);
+                omodel.HEndDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HEndDate"]);
+                omodel.HPlanNo = Ds.Tables[0].Rows[0]["HPlanNo"].ToString().Trim();
+                omodel.HExplanation = Ds.Tables[0].Rows[0]["HExplanation"].ToString().Trim();
+                omodel.HInnerBillNo = Ds.Tables[0].Rows[0]["HInnerBillNo"].ToString().Trim();
+                //
+                
+                //寰幆
+                DataSet DsSub ;
+                DsSub = oCn.RunProcReturn("Select * from Sb_EquipPatrolCheckBillSub Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "Sb_EquipPatrolCheckBillSub");
+                DetailColl.Clear();//娓呯┖
+                for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+                {
+                    Models.ClsSb_EquipPatrolCheckBillSub oSub = new Models.ClsSb_EquipPatrolCheckBillSub();
+                    // 鍥哄畾璧嬪��===============================================
+                    oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
+                    oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
+                    oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
+                    oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
+                    oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
+                    oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
+                    oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
+                    oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]); 
+                    oSub.HCloseMan =  DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
+                    oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
+                    oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
+                    oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
+                    //===================================================
+                    //oSub.HWorkerID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWorkerID"]);
+                    //oSub.HWorkerNumber = DsSub.Tables[0].Rows[i]["HWorkerNumber"].ToString().Trim();
+                    //oSub.HSourceID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceID"]);
+                    //oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"]);
+                    //oSub.HMaterNumber = DsSub.Tables[0].Rows[i]["HMaterNumber"].ToString().Trim();
+                    //oSub.HMaterName = DsSub.Tables[0].Rows[i]["HMaterName"].ToString().Trim();
+                    //oSub.HMaterModel = DsSub.Tables[0].Rows[i]["HMaterModel"].ToString().Trim();
+                    oSub.HPatrolCheckItem = DsSub.Tables[0].Rows[i]["HPatrolCheckItem"].ToString().Trim();
+                    oSub.HPatrolCheckPart = DsSub.Tables[0].Rows[i]["HPatrolCheckPart"].ToString().Trim();
+                    //oSub.HBeginDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HBeginDate"]);
+                    //oSub.HEndDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEndDate"]);
+                    //oSub.HTimes = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HTimes"]);
+                    oSub.HClaim = DsSub.Tables[0].Rows[i]["HClaim"].ToString().Trim();
+                    //oSub.HQtyMust = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQtyMust"]);
+                    //oSub.HBadCount = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HBadCount"]);
+                    //oSub.HWasterQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HWasterQty"]);
+                    //oSub.HUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUnitID"]);
+                    //oSub.HUnitNumber = DsSub.Tables[0].Rows[i]["HUnitNumber"].ToString().Trim();
+                    //oSub.HUnitName = DsSub.Tables[0].Rows[i]["HUnitName"].ToString().Trim();
+                    //oSub.HSeOrderBillNo = DsSub.Tables[0].Rows[i]["HSeOrderBillNo"].ToString().Trim();
+                    oSub.HManagerID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HManagerID"]);
+                    oSub.HManagerNumber = DsSub.Tables[0].Rows[i]["HManagerNumber"].ToString().Trim();
+                    //oSub.HManagerName = DsSub.Tables[0].Rows[i]["HManagerName"].ToString().Trim();
+                    //oSub.HICMOBillNo = DsSub.Tables[0].Rows[i]["HICMOBillNo"].ToString().Trim();
+                    
+                    DetailColl.Add(oSub);
+                }
+                sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                throw (e);
+            }
+        }
+       
+        
+    }
+
+}
diff --git a/WebAPI/DLL/ClsSb_EquipPatrolCheckRuleBill.cs b/WebAPI/DLL/ClsSb_EquipPatrolCheckRuleBill.cs
new file mode 100644
index 0000000..cc155d4
--- /dev/null
+++ b/WebAPI/DLL/ClsSb_EquipPatrolCheckRuleBill.cs
@@ -0,0 +1,276 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Web;
+
+namespace WebAPI.DLL
+{
+    public class ClsSb_EquipPatrolCheckRuleBill : DBUtility.ClsXt_BaseBill
+    {
+        public Models.ClsSb_EquipPatrolCheckRuleBillMain omodel = new Models.ClsSb_EquipPatrolCheckRuleBillMain();
+        public List<Models.ClsSb_EquipPatrolCheckRuleBillSub> DetailColl_Mater = new List<Models.ClsSb_EquipPatrolCheckRuleBillSub>();
+
+        public ClsSb_EquipPatrolCheckRuleBill()
+        {
+            base.MvarItemKeySub = "Sb_EquipPatrolCheckRuleBillSub";
+            base.MvarItemKeySub2 = "";
+            base.MvarItemKeySub3 = "";
+            base.MvarItemKeySub4 = "";
+            base.MvarItemKey = "Sb_EquipPatrolCheckRuleBillMain";
+            base.MvarReportTitle = "璁惧宸℃瑙勭▼";
+            base.BillType = "3913";
+        }
+        //淇敼鍗曟嵁
+        public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
+        {
+            try
+            {
+                //淇濆瓨鍓嶆帶鍒�=========================================
+                string HBillNote = "";
+                DataSet ds = oCn.RunProcReturn("Exec h_p_Sb_EquipPatrolCheckRuleBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Sb_EquipPatrolCheckRuleBill_BeforeSaveCtrl");
+                if (ds == null)
+                {
+                    sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+                    return false;
+                }
+                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+                    return false;
+                }
+                //=========================================================
+
+                oCn.BeginTran();
+                //鏇存柊涓昏〃
+                oCn.RunProc("UpDate Sb_EquipPatrolCheckRuleBillMain set  " +
+                " HBillNo='" + omodel.HBillNo + "'" +  //鍥哄畾璧嬪��===============
+                ",HDate='" + omodel.HDate + "'" +
+                ",HYear='" + omodel.HYear.ToString() + "'" +
+                ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
+                ",HRemark='" + omodel.HRemark + "'" +
+                ",HUpDater='" + omodel.HMaker + "'" +
+                ",HUpDateDate=getdate()" +
+                //========================================
+                ",HBeginDate='" + omodel.HBeginDate + "'" +
+                ",HEndDate='" + omodel.HEndDate + "'" +
+                ",HCycleUnit='" + omodel.HCycleUnit+ "'" +
+                ",HCheckCycle='" + omodel.HCheckCycle + "'" +
+                ",HExplanation='" + omodel.HExplanation + "'" +
+                ",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
+                ",HStandard='" + Convert.ToString(omodel.HStandard ? 1 : 0) + "'" +
+                ",HUSEORGID=" + omodel.HUSEORGID +
+                " where HInterID=" + lngBillKey.ToString());
+                //鍒犻櫎鍏宠仈
+                DeleteRelation(ref sReturn, lngBillKey);
+                //鍒犻櫎瀛愯〃
+                oCn.RunProc("Delete From Sb_EquipPatrolCheckRuleBillSub  where HInterID=" + lngBillKey.ToString());
+                //鎻掑叆瀛愯〃
+                omodel.HInterID = lngBillKey;
+                foreach (Models.ClsSb_EquipPatrolCheckRuleBillSub oSub in DetailColl_Mater)
+                {
+                    oCn.RunProc("Insert into Sb_EquipPatrolCheckRuleBillSub " +
+                      " (HInterID,HEntryID," +
+                      "HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
+                      "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
+                      "HPatrolCheckItemID,HPatrolCheckItem,HPatrolCheckPart,HClaim," +
+                      "HManagerID,HPatrolCheckItemClassID,HPatrolCheckItemMethodID" +
+                      ") values("
+                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() +
+                      ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
+                      "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+                      ",'" + oSub.HPatrolCheckItemID + "','" + oSub.HPatrolCheckItem + "','" + oSub.HPatrolCheckPart + "','" + oSub.HClaim +
+                      "'," + oSub.HManagerID.ToString() + "," + oSub.HPatrolCheckItemClassID + "," + oSub.HPatrolCheckItemMethodID +
+                      ") ");
+                }
+
+                //=========================淇濆瓨鍚庢帶鍒�  
+                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sb_EquipPatrolCheckRuleBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Sb_EquipPatrolCheckRuleBill_AfterSaveCtrl");
+                if (ds2 == null)
+                {
+                    sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒";
+                    oCn.RollBack();
+                    return false;
+                }
+                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
+                    oCn.RollBack();
+                    return false;
+                }
+                //============================
+
+                sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+        //鏂板鍗曟嵁
+        public override bool AddBill(ref string sReturn)
+        {
+            try
+            {
+                //淇濆瓨鍓嶆帶鍒�=========================================
+                string HBillNote = "";
+                DataSet ds = oCn.RunProcReturn("Exec h_p_Sb_EquipPatrolCheckRuleBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_Sb_EquipPatrolCheckRuleBill_BeforeSaveCtrl");
+                if (ds == null)
+                {
+                    sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+                    return false;
+                }
+                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    sReturn = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+                    return false;
+                }
+                //=========================================================
+
+                //寰楀埌mainid
+                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+                //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+                oCn.BeginTran();
+                //涓昏〃
+                oCn.RunProc("Insert Into Sb_EquipPatrolCheckRuleBillMain   " +
+                "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
+                ",HYear,HPeriod,HRemark" +
+                ",HBeginDate,HEndDate,HCycleUnit,HCheckCycle,HExplanation,HInnerBillNo,HStandard,HUSEORGID,HCREATEORGID" +
+                ") " +
+                " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
+                "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," +
+                "'" + omodel.HBeginDate + "','" + omodel.HEndDate + "','" + omodel.HCycleUnit+ "','" + omodel.HCheckCycle + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "','" + Convert.ToString(omodel.HStandard ? 1 : 0) + "'," + omodel.HUSEORGID + "," + omodel.HCREATEORGID +
+                ") ");
+                //鎻掑叆瀛愯〃
+                foreach (Models.ClsSb_EquipPatrolCheckRuleBillSub oSub in DetailColl_Mater)
+                {
+                    oCn.RunProc("Insert into Sb_EquipPatrolCheckRuleBillSub " +
+                      " (HInterID,HEntryID," +
+                      "HCloseMan,HEntryCloseDate,HCloseType,HRemark," +
+                      "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," +
+                      "HPatrolCheckItemID,HPatrolCheckItem,HPatrolCheckPart,HClaim," +
+                      "HManagerID,HPatrolCheckItemClassID,HPatrolCheckItemMethodID" +
+                      ") values("
+                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() +
+                      ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
+                      "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+                      ",'" + oSub.HPatrolCheckItemID + "','" + oSub.HPatrolCheckItem + "','" + oSub.HPatrolCheckPart + "','" + oSub.HClaim +
+                      "'," + oSub.HManagerID.ToString() + "," + oSub.HPatrolCheckItemClassID + "," + oSub.HPatrolCheckItemMethodID +
+                      ") ");
+                }
+                
+                 //=========================淇濆瓨鍚庢帶鍒�  
+                DataSet ds2 = oCn.RunProcReturn("Exec h_p_Sb_EquipPatrolCheckRuleBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Sb_EquipPatrolCheckRuleBill_AfterSaveCtrl");
+                if (ds2 == null)
+                {
+                    sReturn = "淇濆瓨鍚庢帶鍒跺垽鏂け璐ワ紒";
+                    oCn.RollBack();
+                    return false;
+                }
+                if (DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    sReturn = "淇濆瓨澶辫触2锛�" + DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HBackRemark"]);
+                    oCn.RollBack();
+                    return false;
+                }
+                //============================
+
+                sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+
+        //鏄剧ず鍗曟嵁
+        #region 鏄剧ず鍗曟嵁
+        public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
+        {
+            try
+            {
+                //鏌ヨ涓昏〃
+                DataSet Ds;
+                Ds = oCn.RunProcReturn("select * from Sb_EquipPatrolCheckRuleBillMain Where HInterID = " + lngBillKey.ToString(), "Sb_EquipPatrolCheckRuleBillMain ");
+                if (Ds.Tables[0].Rows.Count == 0)
+                {
+                    sReturn = "鍗曟嵁鏈壘鍒帮紒";
+                    return false;
+                }
+
+                //鍥哄畾璧嬪��===========================================
+                omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]);
+                omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]);
+                omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]);
+                omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]);
+                omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]);
+                omodel.HDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]);
+                omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
+                omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]);
+                omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]);
+                omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]);
+                omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]);
+                omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim();
+                omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim();
+                omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim();
+                omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim();
+                omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim();
+                omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim();
+                omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim();
+                omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim();
+                omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim();
+                omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim();
+                omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim();
+                omodel.HCloseType = DBUtility.ClsPub.isBool(Ds.Tables[0].Rows[0]["HCloseType"]);
+                omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim();
+                omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim();
+                //========================================================
+
+
+                //
+
+                //寰幆
+                DataSet DsSub;
+                DsSub = oCn.RunProcReturn("select * from Sb_EquipPatrolCheckRuleBillSub where HInterID = " + lngBillKey.ToString() + "order by HEntryID", "Sb_EquipPatrolCheckRuleBillSub");
+                DetailColl_Mater.Clear();//娓呯┖
+                for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+                {
+                    Models.ClsSb_EquipPatrolCheckRuleBillSub oSub = new Models.ClsSb_EquipPatrolCheckRuleBillSub();
+                    // 鍥哄畾璧嬪��===============================================
+                    oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]);
+                    oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]);
+                    oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]);
+                    oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]);
+                    oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim();
+                    oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim();
+                    oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]);
+                    oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]);
+                    oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]);
+                    oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]);
+                    oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]);
+                    oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim();
+                    //===================================================
+
+
+                    DetailColl_Mater.Add(oSub);
+                }
+                sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                throw (e);
+            }
+        }
+        #endregion
+    }
+}
\ No newline at end of file
diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs
index d57ff34..74bc0df 100644
--- a/WebAPI/ListModels.cs
+++ b/WebAPI/ListModels.cs
@@ -2561,6 +2561,28 @@
             return list;
         }
 
+        /// <summary>
+        /// 璁惧宸℃璁″垝鍗� 涓昏〃
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Model.ClsSb_EquipPatrolCheckPlanBillMain> getObjectByJson_Sb_EquipPatrolCheckPlanBillMain(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Model.ClsSb_EquipPatrolCheckPlanBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSb_EquipPatrolCheckPlanBillMain>>(jsonString);
+            return list;
+        }
+        /// <summary>
+        /// 璁惧宸℃璁″垝鍗� 瀛愯〃
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Model.ClsSb_EquipPatrolCheckPlanBillSub> getObjectByJson_Sb_EquipPatrolCheckPlanBillSub(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Model.ClsSb_EquipPatrolCheckPlanBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSb_EquipPatrolCheckPlanBillSub>>(jsonString);
+            return list;
+        }
 
 
         /// <summary>
@@ -2712,6 +2734,56 @@
         {
             jsonString = "[" + jsonString.ToString() + "]";
             List<Models.ClsSb_EquipDotCheckRuleBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsSb_EquipDotCheckRuleBillSub>>(jsonString);
+            return list;
+        }
+
+        /// <summary>
+        ///  璁惧宸℃瑙勭▼琛� 涓昏〃
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Models.ClsSb_EquipPatrolCheckRuleBillMain> getObjectByJson_Sb_EquipPatrolCheckRuleBillMain(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Models.ClsSb_EquipPatrolCheckRuleBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsSb_EquipPatrolCheckRuleBillMain>>(jsonString);
+            return list;
+        }       
+
+        /// <summary>
+        /// 璁惧宸℃瑙勭▼琛� 瀛愯〃
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Models.ClsSb_EquipPatrolCheckRuleBillSub> getObjectByJson_Sb_EquipPatrolCheckRuleBillSub(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Models.ClsSb_EquipPatrolCheckRuleBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsSb_EquipPatrolCheckRuleBillSub>>(jsonString);
+            return list;
+        }
+
+
+
+        /// <summary>
+        /// 璁惧宸℃璁板綍琛� 涓昏〃
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Model.ClsSb_EquipPatrolCheckBillMain> getObjectByJson_Sb_EquipPatrolCheckBillMain(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Model.ClsSb_EquipPatrolCheckBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSb_EquipPatrolCheckBillMain>>(jsonString);
+            return list;
+        }
+        
+        /// <summary>
+        /// 璁惧宸℃璁板綍琛� 瀛愯〃
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Model.ClsSb_EquipPatrolCheckBillSub> getObjectByJson_Sb_EquipPatrolCheckBillSub(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Model.ClsSb_EquipPatrolCheckBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSb_EquipPatrolCheckBillSub>>(jsonString);
             return list;
         }
 
@@ -3575,6 +3647,17 @@
             return list;
         }
 
+        /// <summary>
+        /// PDA澶勭悊鏂板璁惧宸℃璁板綍鍗曚富琛ㄧ殑json
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Models.ClsSb_EquipPatrolCheckBillMain> getObjectByJson_Sb_EquipPatrolCheckBillMainPDA(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Models.ClsSb_EquipPatrolCheckBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsSb_EquipPatrolCheckBillMain>>(jsonString);
+            return list;
+        }
 
         /// <summary>
         /// PDA澶勭悊鏂板璁惧鐐规璁板綍鍗曞瓙琛ㄧ殑json
@@ -3589,6 +3672,18 @@
         }
 
         /// <summary>
+        /// PDA澶勭悊鏂板璁惧宸℃璁板綍鍗曞瓙琛ㄧ殑json
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Models.ClsSb_EquipPatrolCheckBillSub> getObjectByJson_Sb_EquipPatrolCheckBillSubPDA(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Models.ClsSb_EquipPatrolCheckBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Models.ClsSb_EquipPatrolCheckBillSub>>(jsonString);
+            return list;
+        }
+
+        /// <summary>
         /// PDA澶勭悊鏂板璁惧淇濆吇璁板綍鍗曚富琛ㄧ殑json
         /// </summary>
         /// <param name="jsonString"></param>
diff --git a/WebAPI/Models/ClsGy_PatrolCheck.cs b/WebAPI/Models/ClsGy_PatrolCheck.cs
index c463965..c72dd80 100644
--- a/WebAPI/Models/ClsGy_PatrolCheck.cs
+++ b/WebAPI/Models/ClsGy_PatrolCheck.cs
@@ -18,7 +18,7 @@
         public bool HStopflag;      //绂佺敤鏍囧織
         public string HRemark;         //澶囨敞
         public string HMakeEmp;
-        public string HPatrolCheckType;
+        public string HPatrolCheckItemType;
         public string HUseFlag = "鏈娇鐢�";
 
         public Int64 HPatrolCheckItemClassID; //宸℃椤圭洰鍒嗙被
diff --git a/WebAPI/Models/ClsSb_EquipPatrolCheckBillMain.cs b/WebAPI/Models/ClsSb_EquipPatrolCheckBillMain.cs
new file mode 100644
index 0000000..7fee89d
--- /dev/null
+++ b/WebAPI/Models/ClsSb_EquipPatrolCheckBillMain.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WebAPI.Models
+{
+    public class ClsSb_EquipPatrolCheckBillMain:DBUtility.ClsXt_BaseBillMain
+    {
+        public Int64 HEquipID;
+        public DateTime HBeginDate;
+        public DateTime HEndDate;
+        public string HPlanNo;
+        public Int64 HPlanInterID;
+        public Int64 HPlanEntryID;
+        public string HExplanation;
+        public string HInnerBillNo;
+        public long HDeptID;//     int	--部门ID
+        public decimal HQty; //数量
+        public Int64 HEquipPatrolCheckRuleInterID; //巡检规程
+
+        public string HLastResult;// 最终结论(OK,NG) 
+        public string HErrNote;// 异常情况记录 
+        public string HBigSafeNote;// 重大安全隐患记录 
+        public Int64 HShiftsID;// 生产班次(Gy_Shifts) 
+        public string HPatrolCheckNote;// 巡检数据
+    }
+}
diff --git a/WebAPI/Models/ClsSb_EquipPatrolCheckBillSub.cs b/WebAPI/Models/ClsSb_EquipPatrolCheckBillSub.cs
new file mode 100644
index 0000000..07d227e
--- /dev/null
+++ b/WebAPI/Models/ClsSb_EquipPatrolCheckBillSub.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WebAPI.Models
+{
+    public class ClsSb_EquipPatrolCheckBillSub:DBUtility.ClsXt_BaseBillSub
+    { 
+       
+        public string HRemark;
+        public string HCloseMan;
+        public DateTime HEntryCloseDate;
+        public bool HCloseType;
+        // 
+        public Int64 HMaterID;
+        public string HMaterNumber;
+        public string HMaterName;
+        public string HMaterModel;
+        public Int64 HPatrolCheckItemID;
+        public string HPatrolCheckItem;
+        public string HPatrolCheckPart;
+        public string HClaim;
+        public Int64 HUnitID;
+        public string HUnitNumber;
+        public string HUnitName;
+        public Int64 HManagerID;
+        public string HManagerNumber;
+        public string HManagerName;
+        public string HPatrolCheckResult;
+
+        public Int64 HPatrolCheckItemClassID;// 巡检项目分类(gy_PatrolCheckItemClass)
+        public Int64 HPatrolCheckItemMethodID;// 巡检方法(gy_PatrolCheckItemMethod)
+    }
+}
diff --git a/WebAPI/Models/ClsSb_EquipPatrolCheckRuleBillMain.cs b/WebAPI/Models/ClsSb_EquipPatrolCheckRuleBillMain.cs
new file mode 100644
index 0000000..028f9c6
--- /dev/null
+++ b/WebAPI/Models/ClsSb_EquipPatrolCheckRuleBillMain.cs
@@ -0,0 +1,18 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace WebAPI.Models
+{
+    public class ClsSb_EquipPatrolCheckRuleBillMain : DBUtility.ClsXt_BaseBillMain
+    {
+        public DateTime HBeginDate;// datetime	      --璁″垝寮�濮嬫棩鏈�
+        public DateTime HEndDate;//                    datetime    --璁″垝缁撴潫鏃ユ湡
+        public string HCycleUnit;//          varchar(10) --鍛ㄦ湡鍗曚綅(澶╋紝鏈堬紝鍛�)
+        public int HCheckCycle;// int	--鐐规鍛ㄦ湡
+        public string HExplanation;//        varchar(500)    --鎽樿
+        public string HInnerBillNo;//            varchar(50)   --鍐呴儴鍗曟嵁鍙�
+        public bool HStandard;//榛樿瑙勭▼
+    }
+}
\ No newline at end of file
diff --git a/WebAPI/Models/ClsSb_EquipPatrolCheckRuleBillSub.cs b/WebAPI/Models/ClsSb_EquipPatrolCheckRuleBillSub.cs
new file mode 100644
index 0000000..f60efe4
--- /dev/null
+++ b/WebAPI/Models/ClsSb_EquipPatrolCheckRuleBillSub.cs
@@ -0,0 +1,19 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace WebAPI.Models
+{
+    public class ClsSb_EquipPatrolCheckRuleBillSub : DBUtility.ClsXt_BaseBillSub
+    {
+        public int HPatrolCheckItemID;// int --宸℃椤圭洰ID
+        public string HPatrolCheckItem;//  varchar(100)  --宸℃椤圭洰
+        public string HPatrolCheckPart;//  varchar(100)  --宸℃閮ㄤ綅
+        public string HClaim;//      varchar(100)       --鍏蜂綋瑕佹眰
+        public int HManagerID;//  int   --璐熻矗浜篿d(鑱屽憳琛�)
+
+        public Int64 HPatrolCheckItemClassID;//宸℃椤圭洰鍒嗙被id
+        public Int64 HPatrolCheckItemMethodID;//宸℃鏂规硶id
+    }
+}
\ No newline at end of file
diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile1.pubxml.user b/WebAPI/Properties/PublishProfiles/FolderProfile1.pubxml.user
index f4051f4..e815f8a 100644
--- a/WebAPI/Properties/PublishProfiles/FolderProfile1.pubxml.user
+++ b/WebAPI/Properties/PublishProfiles/FolderProfile1.pubxml.user
@@ -4,7 +4,7 @@
 -->
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
-    <History>True|2025-04-29T08:32:47.7145278Z;True|2025-04-29T15:41:44.7116258+08:00;True|2025-04-29T15:32:49.4490248+08:00;False|2025-04-29T15:25:51.5282600+08:00;False|2025-04-29T15:23:33.1022530+08:00;True|2025-04-29T14:39:42.0427387+08:00;True|2025-04-29T14:14:37.1424704+08:00;True|2025-04-29T13:53:06.8818046+08:00;True|2025-04-29T13:38:29.5948294+08:00;True|2025-04-29T08:50:02.3834885+08:00;True|2025-04-29T08:45:53.9723523+08:00;True|2025-04-29T08:41:10.0539041+08:00;True|2025-04-29T08:40:36.8094165+08:00;True|2025-04-29T08:36:14.3169515+08:00;True|2025-04-29T08:18:50.9294272+08:00;True|2025-04-29T08:13:21.0111785+08:00;True|2025-04-29T08:08:41.1470031+08:00;False|2025-04-29T08:08:00.8674071+08:00;True|2025-04-24T14:03:47.0390589+08:00;True|2025-04-24T13:08:57.8491077+08:00;True|2025-04-24T11:15:53.7224800+08:00;True|2025-04-24T11:12:55.2113887+08:00;False|2025-04-24T11:09:59.9499198+08:00;True|2025-04-21T16:51:11.0234671+08:00;False|2025-04-21T16:50:27.9924375+08:00;True|2025-04-21T16:28:02.4554241+08:00;True|2025-04-21T16:26:45.7389516+08:00;True|2025-04-21T16:17:59.3641418+08:00;True|2025-04-21T16:11:42.4953735+08:00;False|2025-04-21T16:10:57.0902986+08:00;False|2025-04-21T16:08:30.7814654+08:00;False|2025-04-21T16:06:31.1495468+08:00;False|2025-04-21T15:32:02.6951071+08:00;False|2025-04-21T15:31:03.0207208+08:00;False|2025-04-21T15:27:46.3232315+08:00;False|2025-04-21T15:26:04.3356811+08:00;False|2025-04-21T15:24:39.2075383+08:00;True|2025-04-03T13:53:30.6471699+08:00;False|2025-04-03T13:53:22.8762999+08:00;True|2025-04-02T12:47:31.3375226+08:00;False|2025-04-02T12:47:24.2095072+08:00;True|2025-04-01T16:29:52.7465502+08:00;False|2025-04-01T16:29:33.7844649+08:00;True|2025-03-28T16:22:29.8664470+08:00;True|2025-03-28T15:53:12.1106288+08:00;False|2025-03-28T15:53:01.4674242+08:00;True|2025-03-28T13:34:17.5506822+08:00;False|2025-03-28T13:34:09.5853308+08:00;True|2025-03-26T12:42:08.9630741+08:00;True|2025-03-26T12:40:07.7144561+08:00;True|2025-03-26T12:30:37.3503331+08:00;True|2025-03-26T12:26:47.5061658+08:00;True|2025-03-26T10:54:47.2556717+08:00;True|2025-03-26T10:49:59.7897145+08:00;True|2025-03-26T10:47:02.6195828+08:00;False|2025-03-26T10:46:54.9421244+08:00;True|2025-03-26T01:10:19.1227462+08:00;True|2025-03-26T01:00:04.3583740+08:00;True|2025-03-26T00:38:57.4757071+08:00;True|2025-03-26T00:28:24.9370188+08:00;True|2025-03-26T00:04:05.4507425+08:00;True|2025-03-25T23:06:56.2284828+08:00;False|2025-03-25T23:06:46.7023339+08:00;True|2025-03-25T22:57:08.3127897+08:00;False|2025-03-25T22:55:05.8028873+08:00;False|2025-03-25T22:54:51.2053101+08:00;False|2025-03-04T11:23:36.7757604+08:00;True|2025-02-12T14:05:06.1068587+08:00;False|2025-02-12T14:03:43.3961038+08:00;True|2025-01-18T09:42:50.3629397+08:00;True|2025-01-18T09:39:16.1773412+08:00;True|2025-01-17T11:15:39.4147082+08:00;False|2025-01-17T11:15:09.0033498+08:00;True|2025-01-14T10:20:31.1504093+08:00;False|2025-01-14T10:19:59.1429931+08:00;True|2025-01-10T16:29:54.8671377+08:00;False|2025-01-10T16:29:05.0650370+08:00;True|2025-01-04T14:30:56.5041884+08:00;True|2025-01-04T14:26:52.7448761+08:00;True|2025-01-04T14:23:27.9956967+08:00;True|2025-01-04T14:12:46.2410106+08:00;True|2025-01-04T14:09:33.1727375+08:00;True|2025-01-04T14:07:16.3373347+08:00;False|2025-01-04T14:06:33.4982458+08:00;True|2024-12-31T13:36:55.7394582+08:00;False|2024-12-31T13:35:58.6205647+08:00;True|2024-12-28T15:59:32.1394796+08:00;True|2024-12-28T13:48:20.4283118+08:00;True|2024-12-28T13:43:39.8159616+08:00;True|2024-12-28T13:23:58.4183285+08:00;True|2024-12-28T13:19:13.0583263+08:00;True|2024-12-28T13:12:03.2648502+08:00;True|2024-12-28T13:04:22.6803754+08:00;False|2024-12-28T13:03:56.5993252+08:00;True|2024-12-28T10:50:06.1597154+08:00;True|2024-12-28T10:27:58.7075320+08:00;False|2024-12-28T10:27:09.9450571+08:00;True|2024-12-24T10:52:25.3403292+08:00;False|2024-12-24T10:51:41.8017370+08:00;True|2024-12-23T15:45:21.7729300+08:00;True|2024-12-23T15:31:38.8549407+08:00;True|2024-12-23T15:20:26.2361671+08:00;True|2024-12-23T13:40:03.2774116+08:00;False|2024-12-23T13:39:39.8510770+08:00;True|2024-12-23T13:11:15.3232454+08:00;True|2024-12-23T13:05:43.3057458+08:00;True|2024-12-16T10:57:23.0694936+08:00;True|2024-12-16T10:03:48.1938775+08:00;True|2024-12-16T09:38:57.3052219+08:00;False|2024-12-16T09:38:31.7097388+08:00;True|2024-12-16T09:25:38.3751534+08:00;False|2024-12-16T09:24:19.3952981+08:00;True|2024-12-11T22:41:13.2881405+08:00;False|2024-12-11T22:40:26.3239379+08:00;True|2024-12-11T22:14:41.4392948+08:00;True|2024-12-11T22:03:03.6823866+08:00;True|2024-12-11T21:48:51.7423044+08:00;False|2024-12-11T21:47:55.6236616+08:00;True|2024-12-02T14:57:10.0773563+08:00;False|2024-12-02T14:56:35.6440156+08:00;True|2024-11-26T08:55:53.9125170+08:00;True|2024-11-26T08:24:31.3112433+08:00;False|2024-11-26T08:23:46.0894924+08:00;True|2024-11-20T10:16:03.7893118+08:00;False|2024-11-20T10:15:23.2632533+08:00;True|2024-11-20T09:06:55.2799108+08:00;False|2024-11-20T09:05:45.8751214+08:00;True|2024-11-15T10:50:02.2079520+08:00;False|2024-11-15T10:49:22.4156447+08:00;True|2024-11-11T16:53:33.6615343+08:00;False|2024-11-11T16:52:17.7499691+08:00;False|2024-11-06T11:32:23.8339166+08:00;True|2024-10-24T20:08:16.1196372+08:00;True|2024-10-24T14:53:21.0804405+08:00;False|2024-10-24T14:50:14.4659302+08:00;</History>
+    <History>True|2025-05-06T03:05:36.8250941Z;True|2025-05-06T10:25:27.0035953+08:00;True|2025-05-06T09:55:27.8816646+08:00;True|2025-05-06T09:48:24.2023114+08:00;True|2025-05-06T09:36:31.5646471+08:00;True|2025-05-06T09:31:22.0639528+08:00;False|2025-05-06T09:30:02.7830632+08:00;True|2025-04-30T15:20:59.1827605+08:00;True|2025-04-30T15:14:37.3331777+08:00;True|2025-04-30T13:14:51.3154029+08:00;True|2025-04-30T13:14:15.0963455+08:00;True|2025-04-30T13:10:13.3727222+08:00;False|2025-04-30T13:06:39.8843484+08:00;False|2025-04-30T13:05:01.8963304+08:00;True|2025-04-30T10:23:53.7061459+08:00;True|2025-04-30T10:18:28.2879871+08:00;True|2025-04-30T10:14:38.6366499+08:00;True|2025-04-30T10:02:44.3278308+08:00;True|2025-04-30T09:53:29.6346041+08:00;True|2025-04-30T09:45:29.5572300+08:00;True|2025-04-30T09:14:32.0665725+08:00;True|2025-04-30T09:07:25.5826394+08:00;True|2025-04-30T09:01:28.5360494+08:00;False|2025-04-30T08:59:36.4959754+08:00;True|2025-04-29T16:32:47.7145278+08:00;True|2025-04-29T15:41:44.7116258+08:00;True|2025-04-29T15:32:49.4490248+08:00;False|2025-04-29T15:25:51.5282600+08:00;False|2025-04-29T15:23:33.1022530+08:00;True|2025-04-29T14:39:42.0427387+08:00;True|2025-04-29T14:14:37.1424704+08:00;True|2025-04-29T13:53:06.8818046+08:00;True|2025-04-29T13:38:29.5948294+08:00;True|2025-04-29T08:50:02.3834885+08:00;True|2025-04-29T08:45:53.9723523+08:00;True|2025-04-29T08:41:10.0539041+08:00;True|2025-04-29T08:40:36.8094165+08:00;True|2025-04-29T08:36:14.3169515+08:00;True|2025-04-29T08:18:50.9294272+08:00;True|2025-04-29T08:13:21.0111785+08:00;True|2025-04-29T08:08:41.1470031+08:00;False|2025-04-29T08:08:00.8674071+08:00;True|2025-04-24T14:03:47.0390589+08:00;True|2025-04-24T13:08:57.8491077+08:00;True|2025-04-24T11:15:53.7224800+08:00;True|2025-04-24T11:12:55.2113887+08:00;False|2025-04-24T11:09:59.9499198+08:00;True|2025-04-21T16:51:11.0234671+08:00;False|2025-04-21T16:50:27.9924375+08:00;True|2025-04-21T16:28:02.4554241+08:00;True|2025-04-21T16:26:45.7389516+08:00;True|2025-04-21T16:17:59.3641418+08:00;True|2025-04-21T16:11:42.4953735+08:00;False|2025-04-21T16:10:57.0902986+08:00;False|2025-04-21T16:08:30.7814654+08:00;False|2025-04-21T16:06:31.1495468+08:00;False|2025-04-21T15:32:02.6951071+08:00;False|2025-04-21T15:31:03.0207208+08:00;False|2025-04-21T15:27:46.3232315+08:00;False|2025-04-21T15:26:04.3356811+08:00;False|2025-04-21T15:24:39.2075383+08:00;True|2025-04-03T13:53:30.6471699+08:00;False|2025-04-03T13:53:22.8762999+08:00;True|2025-04-02T12:47:31.3375226+08:00;False|2025-04-02T12:47:24.2095072+08:00;True|2025-04-01T16:29:52.7465502+08:00;False|2025-04-01T16:29:33.7844649+08:00;True|2025-03-28T16:22:29.8664470+08:00;True|2025-03-28T15:53:12.1106288+08:00;False|2025-03-28T15:53:01.4674242+08:00;True|2025-03-28T13:34:17.5506822+08:00;False|2025-03-28T13:34:09.5853308+08:00;True|2025-03-26T12:42:08.9630741+08:00;True|2025-03-26T12:40:07.7144561+08:00;True|2025-03-26T12:30:37.3503331+08:00;True|2025-03-26T12:26:47.5061658+08:00;True|2025-03-26T10:54:47.2556717+08:00;True|2025-03-26T10:49:59.7897145+08:00;True|2025-03-26T10:47:02.6195828+08:00;False|2025-03-26T10:46:54.9421244+08:00;True|2025-03-26T01:10:19.1227462+08:00;True|2025-03-26T01:00:04.3583740+08:00;True|2025-03-26T00:38:57.4757071+08:00;True|2025-03-26T00:28:24.9370188+08:00;True|2025-03-26T00:04:05.4507425+08:00;True|2025-03-25T23:06:56.2284828+08:00;False|2025-03-25T23:06:46.7023339+08:00;True|2025-03-25T22:57:08.3127897+08:00;False|2025-03-25T22:55:05.8028873+08:00;False|2025-03-25T22:54:51.2053101+08:00;False|2025-03-04T11:23:36.7757604+08:00;True|2025-02-12T14:05:06.1068587+08:00;False|2025-02-12T14:03:43.3961038+08:00;True|2025-01-18T09:42:50.3629397+08:00;True|2025-01-18T09:39:16.1773412+08:00;True|2025-01-17T11:15:39.4147082+08:00;False|2025-01-17T11:15:09.0033498+08:00;True|2025-01-14T10:20:31.1504093+08:00;False|2025-01-14T10:19:59.1429931+08:00;True|2025-01-10T16:29:54.8671377+08:00;False|2025-01-10T16:29:05.0650370+08:00;True|2025-01-04T14:30:56.5041884+08:00;True|2025-01-04T14:26:52.7448761+08:00;True|2025-01-04T14:23:27.9956967+08:00;True|2025-01-04T14:12:46.2410106+08:00;True|2025-01-04T14:09:33.1727375+08:00;True|2025-01-04T14:07:16.3373347+08:00;False|2025-01-04T14:06:33.4982458+08:00;True|2024-12-31T13:36:55.7394582+08:00;False|2024-12-31T13:35:58.6205647+08:00;True|2024-12-28T15:59:32.1394796+08:00;True|2024-12-28T13:48:20.4283118+08:00;True|2024-12-28T13:43:39.8159616+08:00;True|2024-12-28T13:23:58.4183285+08:00;True|2024-12-28T13:19:13.0583263+08:00;True|2024-12-28T13:12:03.2648502+08:00;True|2024-12-28T13:04:22.6803754+08:00;False|2024-12-28T13:03:56.5993252+08:00;True|2024-12-28T10:50:06.1597154+08:00;True|2024-12-28T10:27:58.7075320+08:00;False|2024-12-28T10:27:09.9450571+08:00;True|2024-12-24T10:52:25.3403292+08:00;False|2024-12-24T10:51:41.8017370+08:00;True|2024-12-23T15:45:21.7729300+08:00;True|2024-12-23T15:31:38.8549407+08:00;True|2024-12-23T15:20:26.2361671+08:00;True|2024-12-23T13:40:03.2774116+08:00;False|2024-12-23T13:39:39.8510770+08:00;True|2024-12-23T13:11:15.3232454+08:00;True|2024-12-23T13:05:43.3057458+08:00;True|2024-12-16T10:57:23.0694936+08:00;True|2024-12-16T10:03:48.1938775+08:00;True|2024-12-16T09:38:57.3052219+08:00;False|2024-12-16T09:38:31.7097388+08:00;True|2024-12-16T09:25:38.3751534+08:00;False|2024-12-16T09:24:19.3952981+08:00;True|2024-12-11T22:41:13.2881405+08:00;False|2024-12-11T22:40:26.3239379+08:00;True|2024-12-11T22:14:41.4392948+08:00;True|2024-12-11T22:03:03.6823866+08:00;True|2024-12-11T21:48:51.7423044+08:00;False|2024-12-11T21:47:55.6236616+08:00;True|2024-12-02T14:57:10.0773563+08:00;False|2024-12-02T14:56:35.6440156+08:00;True|2024-11-26T08:55:53.9125170+08:00;True|2024-11-26T08:24:31.3112433+08:00;False|2024-11-26T08:23:46.0894924+08:00;True|2024-11-20T10:16:03.7893118+08:00;False|2024-11-20T10:15:23.2632533+08:00;True|2024-11-20T09:06:55.2799108+08:00;False|2024-11-20T09:05:45.8751214+08:00;True|2024-11-15T10:50:02.2079520+08:00;False|2024-11-15T10:49:22.4156447+08:00;True|2024-11-11T16:53:33.6615343+08:00;False|2024-11-11T16:52:17.7499691+08:00;False|2024-11-06T11:32:23.8339166+08:00;True|2024-10-24T20:08:16.1196372+08:00;True|2024-10-24T14:53:21.0804405+08:00;False|2024-10-24T14:50:14.4659302+08:00;</History>
     <_PublishTargetUrl>D:\缃戠珯鍙戝竷\鏅轰簯MESWMS\API</_PublishTargetUrl>
   </PropertyGroup>
   <ItemGroup>
@@ -45,19 +45,19 @@
       <publishTime>02/22/2013 16:43:40</publishTime>
     </File>
     <File Include="bin/BLL.dll">
-      <publishTime>04/29/2025 16:32:24</publishTime>
+      <publishTime>05/06/2025 11:05:12</publishTime>
     </File>
     <File Include="bin/BLL.pdb">
-      <publishTime>04/29/2025 16:32:24</publishTime>
+      <publishTime>05/06/2025 11:05:12</publishTime>
     </File>
     <File Include="bin/BouncyCastle.Crypto.dll">
       <publishTime>12/18/2020 05:32:28</publishTime>
     </File>
     <File Include="bin/DAL.dll">
-      <publishTime>04/29/2025 16:32:14</publishTime>
+      <publishTime>05/06/2025 11:04:58</publishTime>
     </File>
     <File Include="bin/DAL.pdb">
-      <publishTime>04/29/2025 16:32:14</publishTime>
+      <publishTime>05/06/2025 11:04:58</publishTime>
     </File>
     <File Include="bin/Dapper.dll">
       <publishTime>07/22/2016 22:52:40</publishTime>
@@ -111,10 +111,10 @@
       <publishTime>07/25/2012 19:48:56</publishTime>
     </File>
     <File Include="bin/Model.dll">
-      <publishTime>04/29/2025 16:32:10</publishTime>
+      <publishTime>05/06/2025 09:47:29</publishTime>
     </File>
     <File Include="bin/Model.pdb">
-      <publishTime>04/29/2025 16:32:10</publishTime>
+      <publishTime>05/06/2025 09:47:29</publishTime>
     </File>
     <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
       <publishTime>04/21/2025 11:46:16</publishTime>
@@ -294,13 +294,13 @@
       <publishTime>11/24/2014 19:18:48</publishTime>
     </File>
     <File Include="bin/WebAPI.dll">
-      <publishTime>04/29/2025 16:32:38</publishTime>
+      <publishTime>05/06/2025 11:05:23</publishTime>
     </File>
     <File Include="bin/WebAPI.pdb">
-      <publishTime>04/29/2025 16:32:38</publishTime>
+      <publishTime>05/06/2025 11:05:23</publishTime>
     </File>
     <File Include="bin/WebAPI.XmlSerializers.dll">
-      <publishTime>04/29/2025 16:32:45</publishTime>
+      <publishTime>05/06/2025 11:05:33</publishTime>
     </File>
     <File Include="bin/WebGrease.dll">
       <publishTime>07/18/2013 01:03:52</publishTime>
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index 6649127..53ec3c4 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -446,6 +446,8 @@
     <Compile Include="Controllers\CJGL\Sc_OEEReportController.cs" />
     <Compile Include="Controllers\CKGL\TMZD\Gy_BarCodeBillListController.cs" />
     <Compile Include="Controllers\JHGL\Gy_SourceMouldBillController.cs" />
+    <Compile Include="Controllers\SBGL\Sb_EquipPatrolCheckRuleBillController.cs" />
+    <Compile Include="Controllers\SBGL\Sb_EquipPatrolCheckPlanBillController.cs" />
     <Compile Include="Controllers\SBGL\Sb_EquipPatrolCheckBillController.cs" />
     <Compile Include="Controllers\XSGL\Crm_ComplainVisitBillController.cs" />
     <Compile Include="Controllers\XSGL\Xs_SellOutBillList_SecController.cs" />
@@ -803,6 +805,8 @@
     <Compile Include="DLL\ClsQC_NoPassProdCheckBill.cs" />
     <Compile Include="DLL\ClsQC_PatrolProcCheckBill.cs" />
     <Compile Include="DLL\ClsSb_EquipConkBookBill.cs" />
+    <Compile Include="DLL\ClsSb_EquipPatrolCheckRuleBill.cs" />
+    <Compile Include="DLL\ClsSb_EquipPatrolCheckBill.cs" />
     <Compile Include="DLL\ClsSb_EquipDotCheckBill.cs" />
     <Compile Include="DLL\ClsSb_EquipMaintainBill.cs" />
     <Compile Include="DLL\ClsSb_EquipMaintainRuleBill.cs" />
@@ -848,6 +852,10 @@
     <Compile Include="Models\ClsGy_SupMaterial.cs" />
     <Compile Include="Models\ClsGy_EquipFileBillSub_DotCheckRule.cs" />
     <Compile Include="Models\ClsGy_EquipFileBillSub_MaintainRule.cs" />
+    <Compile Include="Models\ClsSb_EquipPatrolCheckBillMain.cs" />
+    <Compile Include="Models\ClsSb_EquipPatrolCheckBillSub.cs" />
+    <Compile Include="Models\ClsSb_EquipPatrolCheckRuleBillMain.cs" />
+    <Compile Include="Models\ClsSb_EquipPatrolCheckRuleBillSub.cs" />
     <Compile Include="Models\ClsSb_EquipRepairSignBillMain.cs" />
     <Compile Include="Models\ClsSb_EquipRepairSignBillSub.cs" />
     <Compile Include="Models\ClsSc_AssemblyBillMain.cs" />
diff --git a/sdk_dingding/TopSdk/bin/Debug/TopSdk.dll b/sdk_dingding/TopSdk/bin/Debug/TopSdk.dll
index ec5b29a..9611025 100644
--- a/sdk_dingding/TopSdk/bin/Debug/TopSdk.dll
+++ b/sdk_dingding/TopSdk/bin/Debug/TopSdk.dll
Binary files differ
diff --git a/sdk_dingding/TopSdk/bin/Debug/TopSdk.pdb b/sdk_dingding/TopSdk/bin/Debug/TopSdk.pdb
index a766f61..08b61f4 100644
--- a/sdk_dingding/TopSdk/bin/Debug/TopSdk.pdb
+++ b/sdk_dingding/TopSdk/bin/Debug/TopSdk.pdb
Binary files differ
diff --git a/sdk_dingding/TopSdk/obj/Debug/TopSdk.dll b/sdk_dingding/TopSdk/obj/Debug/TopSdk.dll
index ec5b29a..9611025 100644
--- a/sdk_dingding/TopSdk/obj/Debug/TopSdk.dll
+++ b/sdk_dingding/TopSdk/obj/Debug/TopSdk.dll
Binary files differ
diff --git a/sdk_dingding/TopSdk/obj/Debug/TopSdk.pdb b/sdk_dingding/TopSdk/obj/Debug/TopSdk.pdb
index a766f61..08b61f4 100644
--- a/sdk_dingding/TopSdk/obj/Debug/TopSdk.pdb
+++ b/sdk_dingding/TopSdk/obj/Debug/TopSdk.pdb
Binary files differ

--
Gitblit v1.9.1