From fc086d9ec6750163b38ac6c061bc7bab7af14c30 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期一, 08 四月 2024 17:18:48 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 DAL/工资管理/ClsPay_WorkTimesBill.cs                                 |  148 +
 WebAPI/Controllers/基础资料/工资基础资料/Gy_WorkTypeController.cs          |   18 
 WebAPI/Controllers/条码管理/WEBSController.cs                        |   53 
 Model/Model.csproj                                               |    5 
 WebAPI/Service/LuBaoSevice.cs                                    |   19 
 WarM/条码打印/Gy_BarCodeBill.cs                                      |   19 
 Model/工资管理/ClsHR_EmployeeSkillBillSub.cs                         |   14 
 DAL/工资管理/ClsHR_EmployeeSkillBill.cs                              |  218 +++
 DAL/质检管理/ClsQC_NoPassProdRequestBill.cs                          |  328 +++++
 WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs             |  242 +++
 WebAPI/Controllers/基础资料/工资基础资料/Gy_ClassTimePrjController.cs      |   18 
 Model/基础资料/基础资料/ClsGy_BadPhenomena_Model.cs                      |   12 
 Model/质检管理/ClsQC_NoPassProdRequestBillSub.cs                     |   11 
 WebAPI/Controllers/工资管理/HR_PostSkillBillController.cs            |    4 
 WebAPI/Controllers/WebAPIController.cs                           |  300 ++++
 WebAPI/Controllers/工资管理/HR_EmployeeSkillBillController.cs        |  817 +++++++++++++
 Model/工资管理/ClsPay_WorkTimesBillSub.cs                            |    3 
 Model/工资管理/ClsHR_EmployeeSkillBillMain.cs                        |   17 
 WebAPI/Controllers/基础资料/工资基础资料/Gy_ClassTimePrjGroupController.cs |   18 
 Model/质检管理/ClsQC_NoPassProdRequestBillMain.cs                    |   56 
 WebAPI/ListModels.cs                                             |   51 
 WebAPI/DLL/ClsGy_BadPhenomena_Ctl.cs                             |  101 +
 WebAPI/Controllers/工资管理/Pay_WorkTimesBillController.cs           |  294 ++++
 DAL/DAL.csproj                                                   |    2 
 WebAPI/Controllers/Sc_ProcessMangementController.cs              |  853 +++++++++++++
 WebAPI/WebAPI.csproj                                             |    2 
 WebAPI/Controllers/基础资料/工资基础资料/Gy_WorkPayTypeController.cs       |   18 
 27 files changed, 3,532 insertions(+), 109 deletions(-)

diff --git a/DAL/DAL.csproj b/DAL/DAL.csproj
index 2997a73..d354bb2 100644
--- a/DAL/DAL.csproj
+++ b/DAL/DAL.csproj
@@ -126,6 +126,7 @@
     <Compile Include="鍩虹璧勬枡\鍏朵粬鍩虹璧勬枡\ClsGy_QCCheckProject_View.cs" />
     <Compile Include="鍩虹璧勬枡\鍏朵粬鍩虹璧勬枡\ClsGy_StdWorkTimes_Ctl.cs" />
     <Compile Include="鍩虹璧勬枡\鍏朵粬鍩虹璧勬枡\ClsGy_SupMaterial_Ctl.cs" />
+    <Compile Include="宸ヨ祫绠$悊\ClsHR_EmployeeSkillBill.cs" />
     <Compile Include="宸ヨ祫绠$悊\ClsHR_PostSkillBill.cs" />
     <Compile Include="婧愬崟\ERP婧愬崟\Cls_S_Sc_ABJJD.cs" />
     <Compile Include="婧愬崟\InterFace婧愬崟\Cls_S_IF_ICMOBillList.cs" />
@@ -643,6 +644,7 @@
     <Compile Include="绯荤粺鍏敤\ClsXt_SystemParameter_Ctl.cs" />
     <Compile Include="绯荤粺鍏敤\ClsXt_BillSubType_Ctl.cs" />
     <Compile Include="璁″垝绠$悊\ClsGy_MaterialTechParamBillMain.cs" />
+    <Compile Include="璐ㄦ绠$悊\ClsQC_NoPassProdRequestBill.cs" />
     <Compile Include="璐ㄦ绠$悊\ClsQC_FirstPieceCheckBill.cs" />
     <Compile Include="璐ㄦ绠$悊\ClsQC_LastPieceCheckBill.cs" />
     <Compile Include="璐ㄦ绠$悊\ClsQC_NoPassProdCheckBill.cs" />
diff --git "a/DAL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsHR_EmployeeSkillBill.cs" "b/DAL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsHR_EmployeeSkillBill.cs"
new file mode 100644
index 0000000..8c225f1
--- /dev/null
+++ "b/DAL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsHR_EmployeeSkillBill.cs"
@@ -0,0 +1,218 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+    public  class ClsHR_EmployeeSkillBill : DBUtility.ClsXt_BaseBill
+    {
+        public Model.ClsHR_EmployeeSkillBillMain omodel = new Model.ClsHR_EmployeeSkillBillMain();
+        public List<Model.ClsHR_EmployeeSkillBillSub> DetailColl = new List<Model.ClsHR_EmployeeSkillBillSub>();
+
+        public ClsHR_EmployeeSkillBill()
+        {
+            base.MvarItemKeySub = "HR_EmployeeSkillBillSub";
+            base.MvarItemKeySub2 = "";
+            base.MvarItemKeySub3 = "";
+            base.MvarItemKeySub4 = "";
+            base.MvarItemKey= "HR_EmployeeSkillBillMain";
+            base.MvarReportTitle="鍛樺伐鎶�鑳芥竻鍗�";
+            base.BillType= "2330";
+            base.HBillSubType = "2330";
+
+        }
+
+        #region 鍥哄畾浠g爜
+
+        ~ClsHR_EmployeeSkillBill()
+        {
+            DetailColl = null;
+        }
+       
+        #endregion   鑷畾涔夋柟娉�
+        //淇敼鍗曟嵁
+        public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
+        {
+            try
+            {
+                //
+                oCn.BeginTran();
+                //鏇存柊涓昏〃
+                oCn.RunProc("UpDate HR_EmployeeSkillBillMain set  " +
+                " HBillNo='" + omodel.HBillNo + "'" +  //鍥哄畾璧嬪��===============
+                ",HDate='" + omodel.HDate + "'" +
+                ",HYear='" + omodel.HYear.ToString() + "'" +
+                ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
+                ",HRemark='" + omodel.HRemark + "'" +
+                ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" +
+                ",HUpDateDate=getdate()" +
+                //========================================
+                ",HDeptID='" + omodel.HDeptID.ToString() +
+                "',HPostID='" + omodel.HPostID.ToString() +
+                "',HOrgID='" + omodel.HOrgID.ToString() + "'" +
+                " where HInterID=" + lngBillKey.ToString());
+                //鍒犻櫎鍏宠仈
+                DeleteRelation(ref sReturn, lngBillKey);
+                //鍒犻櫎瀛愯〃
+                DeleteBillSub(lngBillKey);
+                //鎻掑叆瀛愯〃
+                omodel.HInterID = lngBillKey;
+                foreach (Model.ClsHR_EmployeeSkillBillSub oSub in DetailColl)
+                {
+                    oCn.RunProc("Insert into HR_EmployeeSkillBillSub " +
+                      " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
+                      ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+                      ",HPostSkillid,HSkillLev,HTrainDate" +
+                    
+                      ") values("
+                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + 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.HPostSkillid.ToString() + ",'" + oSub.HSkillLev.ToString() +"','"+ oSub.HTrainDate +
+                      "') ");
+                }
+              
+                sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+        //鏂板鍗曟嵁
+        public override bool AddBill(ref string sReturn)
+        {
+            try
+            {
+             
+                //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+                oCn.BeginTran();
+                //涓昏〃
+                oCn.RunProc("Insert Into HR_EmployeeSkillBillMain   " +
+                "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
+                ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
+                ",HDeptID,HPostID,HOrgID,HEmpID,HCheckEmpID,HManagerEmpID,HInnerBillNo" +
+               
+                ") " +
+                " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
+                ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
+                ",'" + omodel.HDeptID.ToString() + "'," + omodel.HPostID.ToString() + "," + omodel.HOrgID.ToString() + ",'" + omodel.HEmpID.ToString() + 
+                "','"+omodel.HCheckEmpID.ToString() + "','"+omodel.HManagerEmpID.ToString() + "','"+omodel.HInnerBillNo.ToString() +
+
+                "') ");
+
+                //鎻掑叆瀛愯〃
+                foreach (Model.ClsHR_EmployeeSkillBillSub oSub in DetailColl)
+                {
+                    oCn.RunProc("Insert into HR_EmployeeSkillBillSub " +
+                      " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
+                      ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+                      ",HPostSkillid,HSkillLev,HTrainDate" +
+
+                      ") values("
+                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + 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.HPostSkillid.ToString() + ",'" + oSub.HSkillLev.ToString() + "','" + oSub.HTrainDate +
+                      "') ");
+                }
+                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 HR_EmployeeSkillBillMain Where HInterID=" + lngBillKey.ToString(), "HR_EmployeeSkillBillMain");
+                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();
+                //========================================================
+                omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]);
+                omodel.HPostID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPostID"]);
+                omodel.HOrgID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HOrgID"]);
+
+
+                //
+
+                //寰幆
+                DataSet DsSub ;
+                DsSub = oCn.RunProcReturn("Select * from HR_EmployeeSkillBillSub Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "HR_EmployeeSkillBillSub");
+                DetailColl.Clear();//娓呯┖
+                for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+                {
+                    Model.ClsHR_EmployeeSkillBillSub oSub = new Model.ClsHR_EmployeeSkillBillSub();
+                    // 鍥哄畾璧嬪��===============================================
+                    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.HPostSkillid = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HPostSkillid"]);
+                    oSub.HSkillLev = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSkillLev"]);
+                    DetailColl.Add(oSub);
+                }
+                sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                throw (e);
+            }
+        }
+       
+        
+    }
+
+}
diff --git "a/DAL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_WorkTimesBill.cs" "b/DAL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_WorkTimesBill.cs"
index 43e48a1..59ebf7f 100644
--- "a/DAL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_WorkTimesBill.cs"
+++ "b/DAL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_WorkTimesBill.cs"
@@ -29,15 +29,75 @@
         {
             DetailColl = null;
         }
-       
+
         #endregion   鑷畾涔夋柟娉�
+
+        //淇濆瓨鍓嶆帶鍒�
+        public bool BeforeSave(Int64 HInterID, string HBillNo, Int64 OperationType, ref string sReturn)
+        {
+            try
+            {
+                DataSet Ds = oCn.RunProcReturn("Exec h_p_Pay_WorkTimesBill_BeforeSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_Pay_WorkTimesBill_BeforeSaveCtrl");
+                if (Ds == null || Ds.Tables[0].Rows.Count == 0)
+                {
+                    sReturn = "淇濆瓨鍓嶅垽鏂け璐ワ紒";
+                    return false;
+                }
+                else
+                {
+                    if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HBack"]) == 1)
+                    {
+                        sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
+                        return false;
+                    }
+                }
+                return true;
+            }
+            catch (Exception e)
+            {
+                throw (e);
+            }
+        }
+
+        //淇濆瓨鍚庢帶鍒�
+        public bool AfterSave(Int64 HInterID, string HBillNo, Int64 OperationType, ref string sReturn)
+        {
+            try
+            {
+                DataSet Ds = oCn.RunProcReturn("Exec h_p_Pay_WorkTimesBill_AfterSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_Pay_WorkTimesBill_AfterSaveCtrl");
+                if (Ds == null || Ds.Tables[0].Rows.Count == 0)
+                {
+                    sReturn = "淇濆瓨鍚庡垽鏂け璐ワ紒";
+                    return false;
+                }
+                else
+                {
+                    if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HBack"]) == 1)
+                    {
+                        sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
+                        return false;
+                    }
+                }
+                return true;
+            }
+            catch (Exception e)
+            {
+                throw (e);
+            }
+        }
+
         //淇敼鍗曟嵁
         public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
         {
             try
             {
-                //
                 oCn.BeginTran();
+                //淇濆瓨鍓嶆帶鍒�
+                if (!BeforeSave(lngBillKey, omodel.HBillNo, 2, ref sReturn))
+                {
+                    oCn.RollBack();
+                    return false;
+                }
                 //鏇存柊涓昏〃
                 oCn.RunProc("UpDate Pay_WorkTimesBillMain set  " +
                 " HBillNo='" + omodel.HBillNo + "'" +  //鍥哄畾璧嬪��===============
@@ -52,6 +112,7 @@
                 ",HGroupID=" + omodel.HGroupID.ToString() +
                 ",HPayType='" + omodel.HPayType + "'" +
                 ",HSaveType=" + DBUtility.ClsPub.BoolToString(omodel.HSaveType) +
+                ",HStockOrgID=" + omodel.HSTOCKORGID.ToString() +
                 " where HInterID=" + lngBillKey.ToString());
                 //鍒犻櫎鍏宠仈
                 DeleteRelation(ref sReturn, lngBillKey);
@@ -62,34 +123,30 @@
                 foreach (Model.ClsPay_WorkTimesBillSub oSub in DetailColl)
                 {
                     oCn.RunProc("Insert into Pay_WorkTimesBillSub " +
-                      " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
-                      ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+                      " (HInterID,HEntryID,HRemark,HRelationQty,HRelationMoney" +
+                      ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
                       ",HEmpID,HEmpRate,HPMTimes,HAMTimes,HBaseTimes,HBaseDays" +
                       ",HOverTimes,HOverDays,HLeaveTimes,HLeaveDays,HLateQty,HLateTimes" +
                       ",HEarlyQty,HEarlyTimes,HOutForEmpQty,HOutForEmpTimes,HOutForComQty,HOutForComTimes" +
-                      ",HAbsentDays,HRestFlag,HSchClassID,HCTPrjID,HWorkTypeID,HPayMoney,HMoney" +
+                      ",HAbsentDays,HRestFlag,HSchClassID,HNeedTimes,HCTPrjID,HWorkTypeID" +
+                      ",HPayMoney,HMoney" +
                       ") values("
-                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
-                      "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+                      "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'" +
                       "," + oSub.HEmpID.ToString() + "," + oSub.HEmpRate.ToString() + "," + oSub.HPMTimes.ToString() + "," + oSub.HAMTimes.ToString() + "," + oSub.HBaseTimes.ToString() + "," + oSub.HBaseDays.ToString() +
                       "," + oSub.HOverTimes.ToString() + "," + oSub.HOverDays.ToString() + "," + oSub.HLeaveTimes.ToString() + "," + oSub.HLeaveDays.ToString() + "," + oSub.HLateQty.ToString() + "," + oSub.HLateTimes.ToString() +
                       "," + oSub.HEarlyQty.ToString() + "," + oSub.HEarlyTimes.ToString() + "," + oSub.HOutForEmpQty.ToString() + "," + oSub.HOutForEmpTimes.ToString() + "," + oSub.HOutForComQty.ToString() + "," + oSub.HOutForComTimes.ToString() +
-                      "," + oSub.HAbsentDays.ToString() + "," + Convert.ToString(oSub.HRestFlag ? 1 : 0) + "," + oSub.HSchClassID.ToString() + "," + oSub.HCTPrjID.ToString() + "," + oSub.HWorkTypeID.ToString() + "," + oSub.HPayMoney.ToString() + "," + oSub.HMoney.ToString() +
+                      "," + oSub.HAbsentDays.ToString() + "," + Convert.ToString(oSub.HRestFlag ? 1 : 0) + "," + oSub.HSchClassID.ToString() + "," + oSub.HNeedTimes.ToString() + "," + oSub.HCTPrjID.ToString() + "," + oSub.HWorkTypeID.ToString() +
+                      "," + oSub.HPayMoney.ToString() + "," + oSub.HMoney.ToString() +
                       ") ");
                 }
-                //
-                //foreach (Model.ClsPay_WorkTimesBillSub oSub in DetailColl)
-                //{
-                //    Ds = oCn.RunProcReturn("exec h_p_Pay_WorkTimesBill_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;
-                //    }
-                //}
-                sReturn = "淇敼鍗曟嵁鎴愬姛锛�";
+                //淇濆瓨鍚庢帶鍒�
+                if (!AfterSave(lngBillKey, omodel.HBillNo, 2, ref sReturn))
+                {
+                    oCn.RollBack();
+                    return false;
+                }
+                sReturn = "鍗曟嵁鍙凤細"+ omodel.HBillNo+ " 淇敼鎴愬姛锛�";
                 oCn.Commit();
                 return true;
             }
@@ -109,49 +166,52 @@
                 omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                 //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
                 oCn.BeginTran();
+                //淇濆瓨鍓嶆帶鍒�
+                if (!BeforeSave(omodel.HInterID, omodel.HBillNo, 1, ref sReturn))
+                {
+                    oCn.RollBack();
+                    return false;
+                }
                 //涓昏〃
                 oCn.RunProc("Insert Into Pay_WorkTimesBillMain   " +
                 "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
                 ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
-                ",HDeptID,HGroupID,HPayType,HSaveType" +
+                ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType" +
+                ",HDeptID,HGroupID,HPayType,HSaveType,HStockOrgID" +
                 ") " +
-                " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
+                " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate.ToShortDateString() + "'" +
                 ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
-                ", " + omodel.HDeptID.ToString() + "," + omodel.HGroupID.ToString() + ",'" + omodel.HPayType + "'," + DBUtility.ClsPub.BoolToString(omodel.HSaveType) + 
+                ", " + omodel.HMainSourceInterID.ToString() + "," + omodel.HMainSourceEntryID.ToString() + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'" +
+                ", " + omodel.HDeptID.ToString() + "," + omodel.HGroupID.ToString() + ",'" + omodel.HPayType + "'," + DBUtility.ClsPub.BoolToString(omodel.HSaveType) + "," + omodel.HSTOCKORGID.ToString() +
                 ") ");
                 //鎻掑叆瀛愯〃
                 foreach (Model.ClsPay_WorkTimesBillSub oSub in DetailColl)
                 {
                     oCn.RunProc("Insert into Pay_WorkTimesBillSub " +
-                      " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
-                      ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+                      " (HInterID,HEntryID,HRemark,HRelationQty,HRelationMoney" +
+                      ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
                       ",HEmpID,HEmpRate,HPMTimes,HAMTimes,HBaseTimes,HBaseDays" +
                       ",HOverTimes,HOverDays,HLeaveTimes,HLeaveDays,HLateQty,HLateTimes" +
                       ",HEarlyQty,HEarlyTimes,HOutForEmpQty,HOutForEmpTimes,HOutForComQty,HOutForComTimes" +
-                      ",HAbsentDays,HRestFlag,HSchClassID,HCTPrjID,HWorkTypeID,HPayMoney,HMoney" +
+                      ",HAbsentDays,HRestFlag,HSchClassID,HNeedTimes,HCTPrjID,HWorkTypeID" +
+                      ",HPayMoney,HMoney" +
                       ") values("
-                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
-                      "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+                      "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'"+
                       "," + oSub.HEmpID.ToString() + "," + oSub.HEmpRate.ToString() + "," + oSub.HPMTimes.ToString() + "," + oSub.HAMTimes.ToString() + "," + oSub.HBaseTimes.ToString() + "," + oSub.HBaseDays.ToString() +
                       "," + oSub.HOverTimes.ToString() + "," + oSub.HOverDays.ToString() + "," + oSub.HLeaveTimes.ToString() + "," + oSub.HLeaveDays.ToString() + "," + oSub.HLateQty.ToString() + "," + oSub.HLateTimes.ToString() +
                       "," + oSub.HEarlyQty.ToString() + "," + oSub.HEarlyTimes.ToString() + "," + oSub.HOutForEmpQty.ToString() + "," + oSub.HOutForEmpTimes.ToString() + "," + oSub.HOutForComQty.ToString() + "," + oSub.HOutForComTimes.ToString() +
-                      "," + oSub.HAbsentDays.ToString() + "," + Convert.ToString(oSub.HRestFlag ? 1 : 0) + "," + oSub.HSchClassID.ToString() + "," + oSub.HCTPrjID.ToString() + "," + oSub.HWorkTypeID.ToString() + "," + oSub.HPayMoney.ToString() + "," + oSub.HMoney.ToString() +
+                      "," + oSub.HAbsentDays.ToString() + "," + Convert.ToString(oSub.HRestFlag ? 1 : 0) + "," + oSub.HSchClassID.ToString() + "," + oSub.HNeedTimes.ToString() + "," + oSub.HCTPrjID.ToString() + "," + oSub.HWorkTypeID.ToString() +
+                      "," + oSub.HPayMoney.ToString() + "," + oSub.HMoney.ToString() +
                       ") ");
                 }
-                //
-                //foreach (Model.ClsPay_WorkTimesBillSub oSub in DetailColl)
-                //{
-                //    Ds = oCn.RunProcReturn("exec h_p_Pay_WorkTimesBill_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;
-                //    }
-                //}
-                //
-                sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
+                //淇濆瓨鍚庢帶鍒�
+                if (!AfterSave(omodel.HInterID, omodel.HBillNo, 1, ref sReturn))
+                {
+                    oCn.RollBack();
+                    return false;
+                }
+                sReturn = "鍗曟嵁鍙凤細" + omodel.HBillNo + " 鏂板鎴愬姛锛�";
                 oCn.Commit();
                 return true;
             }
diff --git "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_NoPassProdRequestBill.cs" "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_NoPassProdRequestBill.cs"
new file mode 100644
index 0000000..4e7ef7e
--- /dev/null
+++ "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_NoPassProdRequestBill.cs"
@@ -0,0 +1,328 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+    public class ClsQC_NoPassProdRequestBill : DBUtility.ClsXt_BaseBill
+    {
+        public Model.ClsQC_NoPassProdRequestBillMain omodel = new Model.ClsQC_NoPassProdRequestBillMain();
+        public List<Model.ClsQC_NoPassProdRequestBillSub> DetailColl = new List<Model.ClsQC_NoPassProdRequestBillSub>();
+
+
+        public ClsQC_NoPassProdRequestBill()
+        {
+            base.MvarItemKeySub = "QC_NoPassProdRequestBillSub";
+            base.MvarItemKeySub2 = "";
+            base.MvarItemKeySub3 = "";
+            base.MvarItemKeySub4 = "";
+            base.MvarItemKey = "QC_NoPassProdRequestBillMain";
+            base.MvarReportTitle = "寮傚父鍙嶉楠屾敹鍗�";
+            base.BillType = "7512";
+            base.HBillSubType = "7512";
+
+        }
+
+        #region 鍥哄畾浠g爜
+
+        ~ClsQC_NoPassProdRequestBill()
+        {
+            DetailColl = null;
+        }
+
+        #endregion   鑷畾涔夋柟娉�
+        //淇敼鍗曟嵁
+        public override bool ModifyBill(Int64 lngBillKey, ref string sReturn)
+        {
+            try
+            {
+                //淇濆瓨鍓嶆帶鍒�=========================================
+                string HBillNote = "";
+                DataSet ds = oCn.RunProcReturn("Exec h_p_QC_NoPassProdRequestBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_QC_NoPassProdRequestBill_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 QC_NoPassProdRequestBillMain set  " +
+                " HBillNo='" + omodel.HBillNo + "'" +  //鍥哄畾璧嬪��===============
+                ",HDate='" + omodel.HDate + "'" +
+                ",HYear='" + omodel.HYear.ToString() + "'" +
+                ",HPeriod='" + omodel.HPeriod.ToString() + "'" +
+                ",HRemark='" + omodel.HRemark + "'" +
+                ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" +
+                ",HUpDateDate=getdate()" +
+                //========================================
+                ",HICMOInterID='" + omodel.HICMOInterID.ToString() + "'" +
+                ",HICMOEntryID='" + omodel.HICMOEntryID.ToString() + "'" +
+                ",HICMOBillNo='" + omodel.HICMOBillNo + "'" +
+                ",HProcExchInterID='" + omodel.HProcExchInterID.ToString() + "'" +
+                ",HProcExchEntryID='" + omodel.HProcExchEntryID.ToString() + "'" +
+                ",HProcExchBillNo='" + omodel.HProcExchBillNo + "'" +
+
+
+
+               
+                 ",HHappendDate='" + omodel.HHappendDate + "'" +
+                 ",HMaterID='" + omodel.HMaterID.ToString() +
+                 "',HUnitID='" + omodel.HUnitID.ToString() +
+                 "',HMaterType='" + omodel.HMaterType + "'" +
+                 ",HUnRightQty='" + omodel.HUnRightQty + "'" +
+                 ",HLev='" + omodel.HLev + "'" +
+                 ",HDeptID='" + omodel.HDeptID.ToString() + "'" +
+                 ",HProcID='" + omodel.HProcID.ToString() + "'" +
+                 ",HIsStop='" + omodel.HIsStop + "'" +
+                 ",HIsBatchUnRight='" + omodel.HIsBatchUnRight +
+                 "',HBarCode='" + omodel.HBarCode +
+                 "',HSeOrderBillNo='" + omodel.HSeOrderBillNo+
+                 "',HBadPhenomenaID='" + omodel.HBadPhenomenaID.ToString() + "'" +
+                 ",HReasonNote='" + omodel.HReasonNote + "'" +
+                 ",HSendMan='" + omodel.HSendMan + "'" +
+                 ",HReceiveMan='" + omodel.HReceiveMan + "'" +
+                 ",HCopyMan='" + omodel.HCopyMan + "'" +
+
+                " where HInterID=" + lngBillKey.ToString());
+                //鍒犻櫎鍏宠仈
+                DeleteRelation(ref sReturn, lngBillKey);
+                //鍒犻櫎瀛愯〃
+                DeleteBillSub(lngBillKey);
+
+                //=========================淇濆瓨鍚庢帶鍒�  
+                DataSet ds2 = oCn.RunProcReturn("Exec h_p_QC_NoPassProdRequestBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_QC_NoPassProdRequestBill_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);
+                //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
+                oCn.BeginTran();
+
+
+                //淇濆瓨鍓嶆帶鍒�=========================================
+                string HBillNote = "";
+                DataSet ds = oCn.RunProcReturn("Exec h_p_QC_NoPassProdRequestBill_BeforeSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "','" + HBillNote + "',1 ", "h_p_QC_NoPassProdRequestBill_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;
+                }
+                //=========================================================
+
+                string sql = "";
+
+                sql = "Insert Into QC_NoPassProdRequestBillMain" +
+                "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HYear,HPeriod,HRemark,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType," +
+                "HICMOInterID,HICMOEntryID,HICMOBillNo,HProcExchInterID,HProcExchEntryID,HProcExchBillNo,HHappendDate,HMaterID,HUnitID,HMaterType,HUnRightQty,HLev,HDeptID,HProcID,HIsStop,HIsBatchUnRight,HBarCode,HSeOrderBillNo,HBadPhenomenaID,HReasonNote,HSendMan,HReceiveMan,HCopyMan) " +
+                " values(" +
+                "'" + this.BillType +
+                "','" + this.HBillSubType +
+                "'," + omodel.HInterID.ToString() +
+                ",'" + omodel.HBillNo +
+                "','" + omodel.HDate +
+                "'," + omodel.HYear +
+                "," + omodel.HPeriod +
+                ",'" + omodel.HRemark +
+                "','" + omodel.HMaker +
+                "',getdate()" +
+                ",'" + omodel.HMainSourceInterID +
+                "','" + omodel.HMainSourceEntryID +
+                "','" + omodel.HMainSourceBillNo +
+                "','" + omodel.HMainSourceBillType +
+
+                "','" + omodel.HICMOInterID.ToString() +
+                "','" + omodel.HICMOEntryID.ToString() +
+                "','" + omodel.HICMOBillNo +
+                "','" + omodel.HProcExchInterID.ToString() +
+                "','" + omodel.HProcExchEntryID.ToString() +
+                "','" + omodel.HProcExchBillNo +
+                "','" + omodel.HHappendDate +
+                "','" + omodel.HMaterID.ToString() +
+                "','" + omodel.HUnitID.ToString() +
+                "','" + omodel.HMaterType +
+                "','" + omodel.HUnRightQty +
+                "','" + omodel.HLev +
+                "','" + omodel.HDeptID.ToString() +
+                "','" + omodel.HProcID.ToString() +
+                "','" + omodel.HIsStop +
+                "','" + omodel.HIsBatchUnRight +
+                "','" + omodel.HBarCode +
+                 "','" + omodel.HSeOrderBillNo +
+                "','" + omodel.HBadPhenomenaID.ToString() +
+                 "','" + omodel.HReasonNote +
+                "','" + omodel.HSendMan +
+                "','" + omodel.HReceiveMan +
+                 "','" + omodel.HCopyMan +
+                "') ";
+                //涓昏〃
+                oCn.RunProc(sql);
+
+                //=========================淇濆瓨鍚庢帶鍒�  
+                DataSet ds2 = oCn.RunProcReturn("Exec h_p_QC_NoPassProdRequestBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_QC_NoPassProdRequestBill_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 QC_NoPassProdRequestBillMain Where HInterID=" + lngBillKey.ToString(), "QC_NoPassProdRequestBillMain");
+                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();
+                //========================================================                
+                //omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]);                
+                //omodel.HContext = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HContext"]);                
+                //omodel.HDescription = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HDescription"]);
+                //omodel.HSendMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HSendMan"]);
+                //omodel.HReceiveMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HReceiveMan"]);
+                //omodel.HCopyMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HCopyMan"]);
+                //omodel.HLevel = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HLevel"]);
+                //omodel.HReTransmitMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HReTransmitMan"]);
+                //omodel.HBillTypeName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillTypeName"]);
+                //omodel.HPlanBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HPlanBillNo"]);
+                //omodel.HMaterName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMaterName"]);
+                //omodel.HMaterModel = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMaterModel"]);
+                //omodel.HSendType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HSendType"]);
+                //omodel.HHasten = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HHasten"]);
+                //omodel.HQty = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HQty"]);   
+                //
+
+                //寰幆
+                DataSet DsSub;
+                DsSub = oCn.RunProcReturn("Select * from QC_NoPassProdRequestBillSub Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "QC_NoPassProdRequestBillSub");
+                DetailColl.Clear();//娓呯┖
+                for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+                {
+                    Model.ClsQC_NoPassProdRequestBillSub oSub = new Model.ClsQC_NoPassProdRequestBillSub();
+                    // 鍥哄畾璧嬪��===============================================
+                    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.HDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HDate"]);
+                    //oSub.HSendStatus = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSendStatus"]);
+                    //oSub.HSendMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HSendMan"]);
+                    //oSub.HDescription = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HDescription"]);
+
+                    DetailColl.Add(oSub);
+                }
+
+                sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                throw (e);
+            }
+        }
+
+
+    }
+
+}
diff --git a/Model/Model.csproj b/Model/Model.csproj
index 30b87d6..bcc04e2 100644
--- a/Model/Model.csproj
+++ b/Model/Model.csproj
@@ -351,6 +351,7 @@
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_AreaUser_Model.cs">
       <SubType>Code</SubType>
     </Compile>
+    <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_BadPhenomena_Model.cs" />
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_BadResult_Model.cs" />
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_CardChangeType_Model.cs" />
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_CardStatus_Model.cs" />
@@ -462,6 +463,8 @@
     <Compile Include="宸ヨ祫绠$悊\ClsHR_EmpDimissionBillSub.cs" />
     <Compile Include="宸ヨ祫绠$悊\ClsHR_EmpEngageRequestBillMain.cs" />
     <Compile Include="宸ヨ祫绠$悊\ClsHR_EmpEngageRequestBillSub.cs" />
+    <Compile Include="宸ヨ祫绠$悊\ClsHR_EmployeeSkillBillMain.cs" />
+    <Compile Include="宸ヨ祫绠$悊\ClsHR_EmployeeSkillBillSub.cs" />
     <Compile Include="宸ヨ祫绠$悊\ClsPay_CarOutApplyBillMain.cs" />
     <Compile Include="宸ヨ祫绠$悊\ClsPay_CarOutApplyBillSub.cs" />
     <Compile Include="宸ヨ祫绠$悊\ClsPay_EmpInitChangeBillMain.cs" />
@@ -635,6 +638,8 @@
     <Compile Include="绯荤粺鍏敤\ClsXt_SystemParameter_Model.cs" />
     <Compile Include="璁″垝绠$悊\ClsGy_MaterialTechParamBillSub.cs" />
     <Compile Include="璁″垝绠$悊\ClsGy_MaterialTechParamBillMain.cs" />
+    <Compile Include="璐ㄦ绠$悊\ClsQC_NoPassProdRequestBillMain.cs" />
+    <Compile Include="璐ㄦ绠$悊\ClsQC_NoPassProdRequestBillSub.cs" />
     <Compile Include="璐ㄦ绠$悊\ClsSc_ProcessExchangeBillMain_Note.cs" />
     <Compile Include="璐ㄦ绠$悊\ClsQC_FirstPieceCheckBillSub_ValueGrid.cs" />
     <Compile Include="璐ㄦ绠$悊\ClsQC_PatrolProcCheckBillSub_BadReason.cs" />
diff --git "a/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_BadPhenomena_Model.cs" "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_BadPhenomena_Model.cs"
new file mode 100644
index 0000000..ff249d1
--- /dev/null
+++ "b/Model/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/ClsGy_BadPhenomena_Model.cs"
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+    public class ClsGy_BadPhenomena_Model: DBUtility.ClsGy_Base_Model
+    {
+
+  
+    }
+}
diff --git "a/Model/\345\267\245\350\265\204\347\256\241\347\220\206/ClsHR_EmployeeSkillBillMain.cs" "b/Model/\345\267\245\350\265\204\347\256\241\347\220\206/ClsHR_EmployeeSkillBillMain.cs"
new file mode 100644
index 0000000..7494e95
--- /dev/null
+++ "b/Model/\345\267\245\350\265\204\347\256\241\347\220\206/ClsHR_EmployeeSkillBillMain.cs"
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+    public class ClsHR_EmployeeSkillBillMain : DBUtility.ClsXt_BaseBillMain
+    {
+        public Int64 HDeptID;//		部门	
+        public Int64 HPostID;//	岗位
+        public Int64 HOrgID;    //组织
+        public Int64 HEmpID;//		职员	
+        public Int64 HCheckEmpID;//	-评定人
+        public Int64 HManagerEmpID;    //上级领导
+        public string HInnerBillNo; //内部订单号
+    }
+}
diff --git "a/Model/\345\267\245\350\265\204\347\256\241\347\220\206/ClsHR_EmployeeSkillBillSub.cs" "b/Model/\345\267\245\350\265\204\347\256\241\347\220\206/ClsHR_EmployeeSkillBillSub.cs"
new file mode 100644
index 0000000..ba52517
--- /dev/null
+++ "b/Model/\345\267\245\350\265\204\347\256\241\347\220\206/ClsHR_EmployeeSkillBillSub.cs"
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+    public class ClsHR_EmployeeSkillBillSub : DBUtility.ClsXt_BaseBillSub
+    {
+    
+        public Int64 HPostSkillid;//    int   岗位技能编码
+        public Int64 HSkillLev;//   int 能力等级需求
+        public DateTime HTrainDate;  //培训时间
+    }
+}
diff --git "a/Model/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_WorkTimesBillSub.cs" "b/Model/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_WorkTimesBillSub.cs"
index c6ab705..23c819a 100644
--- "a/Model/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_WorkTimesBillSub.cs"
+++ "b/Model/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_WorkTimesBillSub.cs"
@@ -6,8 +6,6 @@
 {
     public class ClsPay_WorkTimesBillSub:DBUtility.ClsXt_BaseBillSub
     {
-        public DateTime HEntryCloseDate;//   datetime      --行关闭 (默认为'')		new
-        public string HRemark;//         varchar(200)        --备注 
         public Int64 HEmpID;//		int 	'职员
         public Single HEmpRate;//	money	'职员系数
         public Single HPMTimes;//      money	     '下午工时
@@ -29,6 +27,7 @@
         public Int64 HAbsentDays;//	int		‘旷工天数
         public bool HRestFlag;//	bit 		'厂休
         public Int64 HSchClassID;//	int		'班次         暂时存0	
+        public Single HNeedTimes;//    money	      '应上班工时
         public Int64 HCTPrjID;//    int      '核算方案
         public Int64 HWorkTypeID;//   int     //工种
         public Single HPayMoney;//     money      //小时工资
diff --git "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_NoPassProdRequestBillMain.cs" "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_NoPassProdRequestBillMain.cs"
new file mode 100644
index 0000000..f536956
--- /dev/null
+++ "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_NoPassProdRequestBillMain.cs"
@@ -0,0 +1,56 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+    public class ClsQC_NoPassProdRequestBillMain : DBUtility.ClsXt_BaseBillMain
+    {
+       
+        public int HICMOInterID;     // 任务单内码  
+       
+        public int HICMOEntryID;     // 任务单子内码  
+       
+        public string HICMOBillNo;   // 任务单号  
+        
+        public int HProcExchInterID;    // 工序流转卡内码  
+
+        public int HProcExchEntryID;    // 工序流转卡子内码  
+        
+        public string HProcExchBillNo;  // 工序流转卡号  
+       
+        public DateTime HHappendDate;    // 发生时间(年月日,时分秒)  
+       
+        public int HMaterID;     // 物料(Gy_Material)  
+       
+        public int HUnitID;  // 计量单位(Gy_Unit)  
+      
+        public string HMaterType;     // 产品类型  
+       
+        public decimal HUnRightQty;  // 不良数量  
+       
+        public string HLev;  // 紧急程度(紧急、普通)  
+      
+        public int HDeptID;       // 车间
+      
+        public int HProcID;   // 发生工序(gy_Process)  
+      
+        public string HIsStop;    // 是否停线(是、否)  
+      
+        public string HIsBatchUnRight;    // 是否批量问题(是、否)  
+       
+        public string HBarCode;  // 不良品SN码  
+      
+        public string HSeOrderBillNo;     // 销售订单  
+       
+        public int HBadPhenomenaID;  // 不良现象(Gy_BadPhenomena)  
+      
+        public string HReasonNote;    // 问题现象简述  
+       
+        public string HSendMan;  // 发送人(gy_czygl)  
+      
+        public string HReceiveMan;    // 接收人(gy_czygl)  
+      
+        public string HCopyMan;   // 抄送(gy_czygl)  
+    }
+}
diff --git "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_NoPassProdRequestBillSub.cs" "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_NoPassProdRequestBillSub.cs"
new file mode 100644
index 0000000..4c5c4f4
--- /dev/null
+++ "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_NoPassProdRequestBillSub.cs"
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+    public class ClsQC_NoPassProdRequestBillSub : DBUtility.ClsXt_BaseBillSub
+    {
+      
+    }
+}
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
index a9a2bcb..fba07be 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
@@ -3689,7 +3689,24 @@
             }
             else
             {
-                if (CampanyName == "涓帶")
+                if (CampanyName == "澶忓疂鐢靛櫒")
+                {
+                    cmbHBarCodeType.Items.Clear();
+                    cmbHBarCodeType.Items.Add("鍐呴攢鏈烘潯鐮�");
+                    cmbHBarCodeType.Items.Add("澶栭攢鏈烘潯鐮�");
+                    cmbHBarCodeType.Items.Add("鍗婃垚鍝佹潯鐮�");
+                    this.cmbHBarCodeType.SelectedIndex = 0;
+                }
+                else if (CampanyName == "鍗氭棩绉戞妧")
+                {
+                    cmbHBarCodeType.Items.Clear();
+                    cmbHBarCodeType.Items.Add("浠櫒澶栬喘浠舵潯鐮佹櫘閫氳鍒�");
+                    cmbHBarCodeType.Items.Add("浠櫒澶栬喘浠舵潯鐮佸鍣ㄨ鍒�");
+                    cmbHBarCodeType.Items.Add("浠櫒鎴愬搧鏉$爜瑙勫垯");
+                    cmbHBarCodeType.Items.Add("璇曞墏鎴愬搧鏉$爜瑙勫垯");
+                    this.cmbHBarCodeType.SelectedIndex = 0;
+                }
+                else if (CampanyName == "涓帶")
                 {
                     cmbHBarCodeType.Items.Clear();
                     cmbHBarCodeType.Items.Add("鍞竴鏉$爜");
diff --git a/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs b/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs
index fc30fda..5ab6de0 100644
--- a/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs
@@ -5357,5 +5357,247 @@
         }
         #endregion
 
+        #region  涓嶈壇鐜拌薄  鏌ヨ,瀹℃牳锛屽弽瀹℃牳锛岀鐢紝鍙嶇鐢�
+        /// <summary> 
+        /// 涓嶈壇鐜拌薄  鏌ヨ
+        /// </summary>  Gy_BadPhenomena
+        /// <param name="sWhere"></param>
+        /// <param name="user"></param>
+        /// <returns></returns>
+        [Route("Gy_BadReason/Gy_BadPhenomenaList")]
+        [HttpGet]
+        public object Gy_BadPhenomenaList(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //鏌ョ湅鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Gy_BadPhenomena_Query", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                string sql1 = "select * from  h_v_Gy_BadPhenomena where 1 = 1";
+                string sql = sql1 + sWhere + " order by 涓嶈壇鐜拌薄浠g爜 ";
+                ds = oCN.RunProcReturn(sql, "h_v_Gy_BadPhenomena");
+
+                //娣诲姞鍒楀悕
+                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;
+            }
+        }
+
+        /// <summary>
+        /// 涓嶈壇鐜拌薄 瀹℃牳銆佸弽瀹℃牳
+        /// </summary>
+        /// <param name="HInterID">鍗曟嵁ID</param>
+        /// <param name="IsAudit">瀹℃牳(0),鍙嶅鏍�(1)</param>
+        /// <param name="CurUserName">瀹℃牳浜�</param>
+        /// <returns></returns>
+        [Route("Gy_BadReason/AuditGy_BadPhenomena")]
+        [HttpGet]
+        public object AuditGy_BadPhenomena(int HInterID, int IsAudit, string CurUserName)
+        {
+            try
+            {
+                //瀹℃牳鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Gy_BadPhenomena_Check", 1, false, CurUserName))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                var ds = oCN.RunProcReturn("select * from Gy_BadPhenomena where HItemID=" + HInterID, "Gy_BadPhenomena");
+                if (ds.Tables[0].Rows.Count > 0)
+                {
+                    if (IsAudit == 0)  //瀹℃牳鍒ゆ柇
+                    {
+                        if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+                    {
+                        if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() == "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                oCN.BeginTran();
+
+                if (IsAudit == 0)  //瀹℃牳鍒ゆ柇
+                {
+                    oCN.RunProc("update Gy_BadPhenomena set HCheckEmp='" + CurUserName + "',HCheckTime=getdate() where HItemID=" + HInterID);
+
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "瀹℃牳鎴愬姛";
+                    objJsonResult.data = null;
+                }
+                if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+                {
+                    oCN.RunProc("update Gy_BadPhenomena set HCheckEmp='',HCheckTime=null where HItemID=" + HInterID);
+
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鍙嶅鏍告垚鍔�";
+                    objJsonResult.data = null;
+                }
+                oCN.Commit();
+
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+
+
+        /// <summary>
+        /// 涓嶈壇鐜拌薄 绂佺敤銆佸弽绂佺敤
+        /// </summary>
+        /// <param name="HInterID">鍗曟嵁ID</param>
+        /// <param name="IsStop">绂佺敤(0),鍙嶇鐢�(1)</param>
+        /// <param name="CurUserName">瀹℃牳浜�</param>
+        /// <returns></returns>
+        [Route("Gy_BadReason/StopGy_BadPhenomena")]
+        [HttpGet]
+        public object StopGy_BadPhenomena(int HInterID, int IsStop, string CurUserName)
+        {
+            try
+            {
+                //瀹℃牳鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Gy_BadPhenomena_Close", 1, false, CurUserName))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "绂佺敤澶辫触锛佹棤鏉冮檺锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                var ds = oCN.RunProcReturn("select * from Gy_BadPhenomena where HItemID=" + HInterID, "Gy_SupType");
+                if (ds.Tables[0].Rows.Count > 0)
+                {
+                    if (IsStop == 0)  //绂佺敤鍒ゆ柇
+                    {
+                        if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁宸茬鐢�!涓嶈兘鍐嶆绂佺敤锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    if (IsStop == 1) //鍙嶇鐢ㄥ垽鏂�
+                    {
+                        if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() == "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁鏈鐢�!涓嶉渶瑕佸弽绂佺敤!";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                oCN.BeginTran();
+
+                if (IsStop == 0)  //绂佺敤鍒ゆ柇
+                {
+                    oCN.RunProc("update Gy_BadPhenomena set HStopEmp='" + CurUserName + "',HStopTime=getdate(),HStopflag=1 where HItemID=" + HInterID);
+
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "绂佺敤鎴愬姛";
+                    objJsonResult.data = null;
+                }
+                if (IsStop == 1) //鍙嶇鐢ㄥ垽鏂�
+                {
+                    oCN.RunProc("update Gy_BadPhenomena set HStopEmp='',HStopTime=null,HStopflag=0 where HItemID=" + HInterID);
+
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鍙嶇鐢ㄦ垚鍔�";
+                    objJsonResult.data = null;
+                }
+                oCN.Commit();
+
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "绂佺敤澶辫触鎴栬�呭弽绂佺敤澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
     }
 }
\ No newline at end of file
diff --git a/WebAPI/Controllers/Sc_ProcessMangementController.cs b/WebAPI/Controllers/Sc_ProcessMangementController.cs
index 749364a..f7ff406 100644
--- a/WebAPI/Controllers/Sc_ProcessMangementController.cs
+++ b/WebAPI/Controllers/Sc_ProcessMangementController.cs
@@ -4987,7 +4987,860 @@
             }
         }
 
+        #region 涓嶈壇鍝佽瘎瀹$敵璇峰崟
 
+        #region 涓嶈壇鍝佽瘎瀹$敵璇峰崟 鏂板/缂栬緫      
+        [Route("Sc_ProcessMangement/SaveQC_NoPassProdRequestBill")]
+        [HttpPost]
+        public object SaveQC_NoPassProdRequestBill([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 refSav = sArray[1].ToString();//鎿嶄綔鏂瑰紡鏁版嵁绫诲瀷 1娣诲姞 3淇敼 2 澶嶅埗
+            string msg4 = sArray[2].ToString();//鐢ㄦ埛鍚�
+
+            DBUtility.ClsPub.CurUserName = msg4;
+
+            string UserName = "";
+            string s = "";
+            ListModels oListModels = new ListModels();
+            try
+            {
+                //缂栬緫鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("QC_NoPassProdRequestBillMain_Edit", 1, false, msg4))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                // QC_NoPassProdRequestBill
+                DAL.ClsQC_NoPassProdRequestBill oBill = new DAL.ClsQC_NoPassProdRequestBill();
+                List<Model.ClsQC_NoPassProdRequestBillMain> lsmain = new List<Model.ClsQC_NoPassProdRequestBillMain>();
+                msg2 = msg2.Replace("\\", "");
+                msg2 = msg2.Replace("\n", "");  //\n
+                lsmain = oListModels.getObjectByJson_QC_NoPassProdRequestBill(msg2);
+                foreach (Model.ClsQC_NoPassProdRequestBillMain oItem in lsmain)
+                {
+                    if (refSav == "Add")
+                    {
+                        //鍗曟嵁鍙锋槸鍚﹂噸澶�
+                        if (oBill.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁鍙烽噸澶嶏紒涓嶅厑璁镐繚瀛橈紒";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                    }
+                    if (refSav == "Update")
+                    {
+                        if (oBill.ShowBill(oItem.HInterID, ref s) == false)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "姝ゅ崟鎹湁璇紒";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                        //鍒ゆ柇鏄惁鍙紪杈�
+                        if (oBill.omodel.HChecker != "" && oBill.omodel.HChecker != null)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽淇敼锛�";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                        if (oBill.omodel.HBillStatus > 1)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "姝ゅ崟鎹浜庝笉鍙紪杈戠姸鎬侊紝涓嶅厑璁镐慨鏀癸紒";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                        if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(oBill, ref s))
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = s + "锛屼笉鍏佽淇敼";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                    }
+                    UserName = oItem.HMaker;  //鍒跺崟浜�
+                    oItem.HBillType = "7512";
+                    oItem.HBillSubType = "7512";
+
+                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+                    oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
+                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
+
+                    if (DBUtility.ClsPub.isStrNull(oItem.HDate) == "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佹病鏈夊崟鎹棩鏈燂紝鏃犳硶淇濆瓨锛�";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    oBill.omodel = oItem;
+                }
+
+                //淇濆瓨
+                //淇濆瓨瀹屾瘯鍚庨獙鏀�
+                bool bResult;
+                if (refSav == "Add")
+                {
+
+                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+                }
+                else if (refSav == "Update")
+                {
+                    bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+                }
+                else
+                {
+                    bResult = false;
+                }
+                if (bResult)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+                    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("Sc_ProcessMangement/Edit_QC_NoPassProdRequestBill")]
+        [HttpGet]
+        public object Edit_QC_NoPassProdRequestBill(string HID)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                string sql = "select * from h_v_QC_NoPassProdRequestBillMainList where hmainid='" + HID + "'";
+                ds = oCN.RunProcReturn(sql, "h_v_QC_NoPassProdRequestBillMainList");
+
+                //娣诲姞鍒楀悕
+                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 ex)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�" + ex.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 涓嶈壇鍝佽瘎瀹$敵璇峰崟 鍒楄〃
+
+        [Route("Sc_ProcessMangement/Get_QC_NoPassProdRequestBillList")]
+        [HttpGet]
+        public object Get_QC_NoPassProdRequestBillList(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                //鏌ョ湅鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("QC_NoPassProdRequestBillMain_Query", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    string sql = "select * from h_v_QC_NoPassProdRequestBillMainList order by 鍗曟嵁鍙� desc";
+                    ds = oCN.RunProcReturn(sql, "h_v_QC_NoPassProdRequestBillMainList");
+                }
+                else
+                {
+                    string sql1 = "select * from h_v_QC_NoPassProdRequestBillMainList where 1 = 1 ";
+                    string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc";
+                    ds = oCN.RunProcReturn(sql, "h_v_QC_NoPassProdRequestBillMainList");
+                }
+
+                //娣诲姞鍒楀悕
+                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 ex)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�" + ex.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 涓嶈壇鍝佽瘎瀹$敵璇峰崟 鍒犻櫎
+
+        [Route("Sc_ProcessMangement/DeleteQC_NoPassProdRequestBill")]
+        [HttpGet]
+        public object DeleteQC_NoPassProdRequestBill(string HInterID, string user)
+        {
+            try
+            {
+                string s = "";
+                DAL.ClsQC_NoPassProdRequestBill BillOld = new DAL.ClsQC_NoPassProdRequestBill();
+                //鏌ョ湅鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("QC_NoPassProdRequestBillMain_Delete", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (HInterID == null || HInterID.Equals(""))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "HInterID涓嶈兘涓虹┖锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                if (BillOld.ShowBill(long.Parse(HInterID), ref s) == false)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "姝ゅ崟鎹湁璇紒";
+                    objJsonResult.data = 1;
+                    return objJsonResult;
+                }
+                //鍒ゆ柇鏄惁鍙垹闄�
+                if (BillOld.omodel.HChecker != "" && BillOld.omodel.HChecker != null)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽鍒犻櫎锛�";
+                    objJsonResult.data = 1;
+                    return objJsonResult;
+                }
+                //鍒犻櫎鍓嶆帶鍒�=========================================      
+                string sql1 = "exec h_p_QC_NoPassProdRequestBill_BeforeDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
+                ds = oCN.RunProcReturn(sql1, "h_p_QC_NoPassProdRequestBill_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;
+                }
+                //==================================================================================  
+
+
+
+                oCN.BeginTran();
+
+                oCN.RunProc("delete from QC_NoPassProdRequestBillMain where HInterID = " + HInterID);
+                oCN.RunProc("delete from QC_NoPassProdRequestBillSub where HInterID= " + HInterID);
+
+                //鍒犻櫎鍚庢帶鍒�==================================================================================      
+                string sql2 = "exec h_p_QC_NoPassProdRequestBill_AfterDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + user + "'";
+                ds = oCN.RunProcReturn(sql2, "h_p_QC_NoPassProdRequestBill_AfterDelCtrl");
+                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+                {
+                    s = "鍒犻櫎鍚庡垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:" + s;
+                    objJsonResult.data = null;
+                    oCN.RollBack();
+                    return objJsonResult;
+                }
+                if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+                {
+                    s = ds.Tables[0].Rows[0]["HRemark"].ToString();
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:" + s;
+                    objJsonResult.data = null;
+                    oCN.RollBack();
+                    return objJsonResult;
+                }
+                //==============================================================================================
+
+                oCN.Commit();
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鍒犻櫎鎴愬姛";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 涓嶈壇鍝佽瘎瀹$敵璇峰崟 瀹℃牳/鍙嶅鏍�
+        /// <summary>
+        /// </summary>
+        /// <param name="HInterID">鍗曟嵁ID</param>
+        /// <param name="IsAudit">瀹℃牳(0),鍙嶅鏍�(1)</param>
+        /// <param name="CurUserName">瀹℃牳浜�</param>
+        /// <returns></returns>
+        [Route("Sc_ProcessMangement/AuditQC_NoPassProdRequestBill")]
+        [HttpGet]
+        public object AuditQC_NoPassProdRequestBill(int HInterID, int IsAudit, string CurUserName)
+        {
+            string ModRightNameCheck = "QC_NoPassProdRequestBillMain_Check";
+            DBUtility.ClsPub.CurUserName = CurUserName;
+            try
+            {
+                //瀹℃牳鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                //HInterID鏁版嵁鍒ゆ柇
+                if (HInterID <= 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "HInterID灏忎簬0锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                Int64 lngBillKey = 0;
+                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹�
+                DAL.ClsQC_NoPassProdRequestBill oBill = new DAL.ClsQC_NoPassProdRequestBill();               //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣�
+
+                //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔
+                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁
+                {
+                    if (oBill.omodel.HCloseMan.Trim() != "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    if (oBill.omodel.HDeleteMan.Trim() != "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    if (IsAudit == 0)  //瀹℃牳鍒ゆ柇
+                    {
+                        if (oBill.omodel.HChecker.Trim() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    if (IsAudit == 1) //鍙嶅鏍稿垽鏂�
+                    {
+                        if (oBill.omodel.HChecker.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;
+                }
+
+
+                //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣�
+                if (IsAudit == 0) //瀹℃牳鎻愪氦
+                {
+                    oCN.BeginTran();
+
+                    //璁板綍杩斿洖淇℃伅
+                    string msg = "";
+
+
+                    //瀹℃牳鍓嶆帶鍒�=========================================      
+                    string sql1 = "exec h_p_QC_NoPassProdRequestBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
+                    ds = oCN.RunProcReturn(sql1, "h_p_QC_NoPassProdRequestBill_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 (oBill.CheckBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_QC_NoPassProdRequestBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+                    {
+                        oCN.Commit();
+
+                        objJsonResult.code = "1";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "瀹℃牳鎴愬姛锛�" + msg;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        oCN.RollBack();
+
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+                if (IsAudit == 1) //鍙嶅鏍告彁浜�
+                {
+
+                    //鍙嶅鏍稿墠鎺у埗=========================================        
+                    string sql1 = "exec h_p_QC_NoPassProdRequestBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
+                    ds = oCN.RunProcReturn(sql1, "h_p_QC_NoPassProdRequestBill_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;
+                    }
+                    //===========================================================          
+
+                    //鍙嶅鏍告彁浜bandonCheck
+                    if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_QC_NoPassProdRequestBill_AfterUnCheckCtrl", CurUserName, 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;
+                    }
+                }
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 涓嶈壇鍝佽瘎瀹$敵璇峰崟 鍏抽棴/鍙嶅叧闂�
+        /// <summary>
+        /// </summary>
+        /// <param name="HInterID">鍗曟嵁ID</param>
+        /// <param name="IsAudit">鍏抽棴(0),鍙嶅叧闂�(1)</param>
+        /// <param name="CurUserName">鍏抽棴浜�</param>
+        /// <returns></returns>
+        [Route("Sc_ProcessMangement/CloseQC_NoPassProdRequestBill")]
+        [HttpGet]
+        public object CloseQC_NoPassProdRequestBill(int HInterID, int IsAudit, string CurUserName)
+        {
+            string ModRightNameCheck = "QC_NoPassProdRequestBillMain_Close";
+            DBUtility.ClsPub.CurUserName = CurUserName;
+            try
+            {
+                //妫�鏌ユ潈闄�
+                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍏抽棴澶辫触锛佹棤鏉冮檺锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                //HInterID鏁版嵁鍒ゆ柇
+                if (HInterID <= 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "HInterID灏忎簬0锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                Int64 lngBillKey = 0;
+                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹�
+                DAL.ClsQC_NoPassProdRequestBill oBill = new DAL.ClsQC_NoPassProdRequestBill();             //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣�
+
+                //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔
+                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁
+                {
+                    if (oBill.omodel.HDeleteMan.Trim() != "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘杩涜鍏抽棴锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    if (oBill.omodel.HChecker.Trim() == "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶈兘杩涜鍏抽棴锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    if (IsAudit == 0)  //鍏抽棴鍒ゆ柇
+                    {
+                        if (oBill.omodel.HCloseMan.Trim() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆鍏抽棴锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    if (IsAudit == 1) //鍙嶅叧闂垽鏂�
+                    {
+                        if (oBill.omodel.HCloseMan.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;
+                }
+
+
+                //杩涜闇�瑕佽繘琛岀殑鍏抽棴/鍙嶅叧闂搷浣�
+                if (IsAudit == 0) //鍏抽棴鎻愪氦
+                {
+                    //鍏抽棴鎻愪氦
+                    if (oBill.CloseBill(lngBillKey, 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;
+                    }
+                }
+                if (IsAudit == 1) //鍙嶅叧闂彁浜�
+                {
+                    //鍙嶅叧闂彁浜�
+                    if (oBill.CancelClose(lngBillKey, 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;
+                    }
+                }
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍏抽棴澶辫触鎴栬�呭弽鍏抽棴澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 涓嶈壇鍝佽瘎瀹$敵璇峰崟  浣滃簾/鍙嶄綔搴�
+        /// <summary>
+        /// </summary>
+        /// <param name="HInterID">鍗曟嵁ID</param>
+        /// <param name="IsAudit">浣滃簾(0),鍙嶄綔搴�(1)</param>
+        /// <param name="CurUserName">浣滃簾浜�</param>
+        /// <returns></returns>
+        [Route("Sc_ProcessMangement/DeleteQC_NoPassProdRequestBill")]
+        [HttpGet]
+        public object DeleteQC_NoPassProdRequestBill(int HInterID, int IsAudit, string CurUserName)
+        {
+            string ModRightNameCheck = "QC_NoPassProdRequestBillMain_Drop";
+            DBUtility.ClsPub.CurUserName = CurUserName;
+            try
+            {
+                //妫�鏌ユ潈闄�
+                if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "浣滃簾澶辫触锛佹棤鏉冮檺锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                //HInterID鏁版嵁鍒ゆ柇
+                if (HInterID <= 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "HInterID灏忎簬0锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                Int64 lngBillKey = 0;
+                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹�
+                DAL.ClsQC_NoPassProdRequestBill oBill = new DAL.ClsQC_NoPassProdRequestBill();              //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣�
+
+                //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔
+                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 (IsAudit == 0)  //浣滃簾鍒ゆ柇
+                    {
+                        if (oBill.omodel.HDeleteMan.Trim() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶄綔搴燂紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    if (IsAudit == 1) //鍙嶄綔搴熷垽鏂�
+                    {
+                        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;
+                }
+
+
+                //杩涜闇�瑕佽繘琛岀殑浣滃簾/鍙嶄綔搴熸搷浣�
+                if (IsAudit == 0) //浣滃簾鎻愪氦
+                {
+                    //浣滃簾鎻愪氦
+                    if (oBill.Cancelltion(lngBillKey, 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;
+                    }
+                }
+                if (IsAudit == 1) //鍙嶅叧闂彁浜�
+                {
+                    //鍙嶅叧闂彁浜�
+                    if (oBill.AbandonCancelltion(lngBillKey, 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;
+                    }
+                }
+                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/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index 9af7542..18070fc 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -8511,6 +8511,306 @@
         }
         #endregion
 
+        #region  涓嶈壇鐜拌薄  璁剧疆鍒楄〃/淇濆瓨/缂栬緫/鍒犻櫎鏂规硶
+        /// <summary>
+        ///  涓嶈壇鐜拌薄 淇濆瓨
+        /// </summary>
+        /// <param name="msg"></param>
+        /// <returns></returns>
+        [Route("SaveGy_BadPhenomenaList")]
+        [HttpPost]
+        public object SaveGy_BadPhenomenaList([FromBody] JObject msg)
+        {
+            DataSet ds;
+            var _value = msg["msg"].ToString();
+            string msg3 = _value.ToString();
+            string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg1 = sArray[0].ToString();
+            string msg2 = sArray[1].ToString();
+
+            //鏌ョ湅鏉冮檺
+            if (!DBUtility.ClsPub.Security_Log("Gy_BadPhenomena_Edit", 1, false, msg2))
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+
+            Int64 HItemID = 0;
+            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+            //鑾峰彇鏈�澶D鍊艰祴鍊�
+            DataSet Maxds = oCN.RunProcReturn("select isNull(MAX(HItemID),0) HItemID from Gy_BadPhenomena ", "Gy_BadPhenomena");
+            if (Maxds != null || Maxds.Tables[0].Rows.Count > 0)
+            {
+                //HItemID= Maxds.Tables[0].Rows[0]["HItemID"]
+                var maxid = Convert.ToInt32(Maxds.Tables[0].Rows[0]["HItemID"]);
+                maxid += 1;
+                HItemID = maxid;
+            }
+            ListModels oListModels = new ListModels();
+            try
+            {
+
+                WebAPI.DLL.ClsGy_BadPhenomena_Ctl oBill = new WebAPI.DLL.ClsGy_BadPhenomena_Ctl();
+                List<Model.ClsGy_BadPhenomena_Model> lsmain = new List<Model.ClsGy_BadPhenomena_Model>();
+                msg1 = msg1.Replace("\\", "");
+                msg1 = msg1.Replace("\n", "");
+                lsmain = oListModels.getObjectByJson_Gy_BadPhenomena(msg1);
+                foreach (Model.ClsGy_BadPhenomena_Model oItem in lsmain)
+                {
+                    if (oItem.HNumber.Trim() == "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷笉鑳戒负绌猴紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    if (oItem.HName.Trim() == "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佸悕绉颁笉鑳戒负绌猴紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    if (!DBUtility.ClsPub.AllowNumber(oItem.HNumber.Trim()))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    //鏌ヨ鏁版嵁涓槸鍚﹀瓨鍦ㄩ噸澶嶄唬鐮�
+
+                    ds = oCN.RunProcReturn("select * from  Gy_BadPhenomena where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_BadPhenomena");
+                    if (oItem.HNumber.Trim() == "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷负绌猴紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    //鏂板鏃跺垽鏂�
+                    if (oItem.HItemID == 0)
+                    {
+                        if (ds == null || ds.Tables[0].Rows.Count == 0)
+                        {
+
+                        }
+                        else
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮侀噸澶嶏紒";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                        //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+                        string sParent;
+                        sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
+                        if (sParent.Trim() == "")
+                        {
+                            oBill.oModel.HParentID = 0;
+                        }
+                        else
+                        {
+                            if (oBill.HavParentCode(sParent.Trim(), HItemID))
+                            {
+                                oBill.oModel.HParentID = oBill.oModel.HItemID;
+                            }
+                            else
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+                                objJsonResult.data = 1;
+                                return objJsonResult;
+                            }
+                        }
+                    }
+                    else//缂栬緫鏃跺垽鏂�
+                    {
+                        //妫�鏌ョ埗绾ф槸鍚﹀瓨鍦�
+                        string sParent;
+                        sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim());
+                        if (sParent.Trim() == "")
+                        {
+                            oBill.oModel.HParentID = 0;
+                        }
+                        else
+                        {
+                            if (oBill.HavParentCode(sParent.Trim(), oItem.HItemID))
+                            {
+                                oBill.oModel.HParentID = oBill.oModel.HItemID;
+                            }
+                            else
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "淇濆瓨澶辫触锛佷笂绾т唬鐮佷笉瀛樺湪鎴栬绂佺敤锛�";
+                                objJsonResult.data = 1;
+                                return objJsonResult;
+                            }
+                        }
+                    }
+                    //寰楀埌鐭唬鐮�
+                    string sShortNumber;
+                    sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim());
+                    if (sShortNumber.Trim() == "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    oItem.HShortNumber = sShortNumber;//鐭唬鐮�
+                    oItem.HEndFlag = true;//鏈骇鏍囧織
+                    oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //绛夌骇
+                    oItem.HMakeEmp = msg2; //鍒涘缓浜�
+
+                    oBill.oModel = oItem;
+                }
+
+                //淇濆瓨
+                //淇濆瓨瀹屾瘯鍚庡鐞�
+                bool bResult;
+                if (oBill.oModel.HItemID == 0)
+                {
+                    // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+                    bResult = oBill.AddNew();
+                }
+                else
+                {
+                    bResult = oBill.ModifyByID(oBill.oModel.HItemID);
+                }
+                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;
+            }
+        }
+
+        /// <summary>
+        /// 涓嶈壇鐜拌薄 鑾峰彇淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("GetGy_BadPhenomenaDetail")]
+        [HttpGet]
+        public ApiResult<DataSet> GetGy_BadPhenomenaDetail(string HID)
+        {
+            var model = LuBaoSevice.GetGy_BadPhenomenaDetail(HID);
+            return model;
+        }
+
+        /// <summary>
+        /// 涓嶈壇鐜拌薄 鍒犻櫎鍔熻兘
+        /// </summary>
+        /// <returns></returns>
+        [Route("DeltetGy_BadPhenomena")]
+        [HttpGet]
+        public object DeltetGy_BadPhenomena(string HItemID, string user)
+        {
+            DataSet ds;
+            //string ModRightNameCheck = "Sc_ProcessReport_check";
+            try
+            {
+                //鍒犻櫎鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Gy_BadPhenomena_Drop", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                if (string.IsNullOrWhiteSpace(HItemID))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "HItemID涓虹┖锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                oCN.BeginTran();//寮�濮嬩簨鍔�
+
+                ds = oCN.RunProcReturn("select * from Gy_BadPhenomena where HItemID=" + HItemID, "Gy_BadPhenomena");
+                if (ds.Tables[0].Rows.Count > 0)
+                {
+                    if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘杩涜鍒犻櫎锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍗曟嵁宸茬鐢�!涓嶈兘杩涜鍒犻櫎锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                oCN.RunProc("delete Gy_BadPhenomena where HItemID=" + HItemID);
+                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
 
         /// <summary>
         /// 鐢ㄥ叧鑱斿伐搴忚幏鍙栦俊鎭�
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ClassTimePrjController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ClassTimePrjController.cs"
index 7a4b223..9800336 100644
--- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ClassTimePrjController.cs"
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ClassTimePrjController.cs"
@@ -36,18 +36,22 @@
         /// <returns></returns>
         [Route("Gy_ClassTimePrjController/GetGy_ClassTimePrjList_Json")]
         [HttpGet]
-        public object GetGy_ClassTimePrjList_Json(string sWhere, string HMaker)
+        public object GetGy_ClassTimePrjList_Json(string sWhere, string HMaker, string OperationType)
         {
             try
             {
                 //鍒ゆ柇鏉冮檺
-                if (!DBUtility.ClsPub.Security_Log(ModRightName, 1, false, HMaker))
+                if (OperationType == "1")
                 {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
-                    objJsonResult.data = null;
-                    return objJsonResult;
+                    //鍒ゆ柇鏉冮檺
+                    if (!DBUtility.ClsPub.Security_Log(ModRightName, 1, false, HMaker))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
                 }
 
                 //杩斿洖鍒楄〃淇℃伅
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ClassTimePrjGroupController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ClassTimePrjGroupController.cs"
index 8335e09..eda2cc1 100644
--- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ClassTimePrjGroupController.cs"
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ClassTimePrjGroupController.cs"
@@ -36,18 +36,22 @@
         /// <returns></returns>
         [Route("Gy_ClassTimePrjGroupController/GetGy_ClassTimePrjGroupList_Json")]
         [HttpGet]
-        public object GetGy_ClassTimePrjGroupList_Json(string sWhere, string HMaker)
+        public object GetGy_ClassTimePrjGroupList_Json(string sWhere, string HMaker, string OperationType)
         {
             try
             {
                 //鍒ゆ柇鏉冮檺
-                if (!DBUtility.ClsPub.Security_Log(ModRightName, 1, false, HMaker))
+                if (OperationType == "1")
                 {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
-                    objJsonResult.data = null;
-                    return objJsonResult;
+                    //鍒ゆ柇鏉冮檺
+                    if (!DBUtility.ClsPub.Security_Log(ModRightName, 1, false, HMaker))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
                 }
 
                 //杩斿洖鍒楄〃淇℃伅
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkPayTypeController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkPayTypeController.cs"
index 4464185..81c3d0a 100644
--- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkPayTypeController.cs"
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkPayTypeController.cs"
@@ -36,18 +36,22 @@
         /// <returns></returns>
         [Route("Gy_WorkPayTypeController/GetGy_WorkPayTypeList_Json")]
         [HttpGet]
-        public object GetGy_WorkPayTypeList_Json(string sWhere, string HMaker)
+        public object GetGy_WorkPayTypeList_Json(string sWhere, string HMaker, string OperationType)
         {
             try
             {
                 //鍒ゆ柇鏉冮檺
-                if (!DBUtility.ClsPub.Security_Log(ModRightName, 1, false, HMaker))
+                if (OperationType == "1")
                 {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
-                    objJsonResult.data = null;
-                    return objJsonResult;
+                    //鍒ゆ柇鏉冮檺
+                    if (!DBUtility.ClsPub.Security_Log(ModRightName, 1, false, HMaker))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
                 }
 
                 //杩斿洖鍒楄〃淇℃伅
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkTypeController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkTypeController.cs"
index a6e29c1..16684c7 100644
--- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkTypeController.cs"
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\267\245\350\265\204\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkTypeController.cs"
@@ -36,18 +36,22 @@
         /// <returns></returns>
         [Route("Gy_WorkTypeController/GetGy_WorkTypeList_Json")]
         [HttpGet]
-        public object GetGy_WorkTypeList_Json(string sWhere, string HMaker)
+        public object GetGy_WorkTypeList_Json(string sWhere, string HMaker, string OperationType)
         {
             try
             {
                 //鍒ゆ柇鏉冮檺
-                if (!DBUtility.ClsPub.Security_Log(ModRightName, 1, false, HMaker))
+                if (OperationType == "1")
                 {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
-                    objJsonResult.data = null;
-                    return objJsonResult;
+                    //鍒ゆ柇鏉冮檺
+                    if (!DBUtility.ClsPub.Security_Log(ModRightName, 1, false, HMaker))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
                 }
 
                 //杩斿洖鍒楄〃淇℃伅
diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/HR_EmployeeSkillBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/HR_EmployeeSkillBillController.cs"
new file mode 100644
index 0000000..4e207e3
--- /dev/null
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/HR_EmployeeSkillBillController.cs"
@@ -0,0 +1,817 @@
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using Pub_Class;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers
+{
+
+    public class HR_EmployeeSkillBillController : ApiController
+    {
+        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+        public const string ModName = "2331";                   //鍗曟嵁绫诲瀷
+        public const string ModCaption = "鍛樺伐鎶�鑳芥竻鍗�";          //鍗曟嵁鍚嶇О
+        public const string ModRightName = "HR_EmployeeSkillBill";
+        public const string ModRightNameQuery = ModRightName + "_Query";      //鏌ヨ
+        public const string ModRightNameEdit = ModRightName + "_Edit";      //缂栬緫
+        public const string ModRightNameCheck = ModRightName + "_Check";    //瀹℃牳
+        public const string ModRightNameClose = ModRightName + "_Close";    //鍏抽棴
+        public const string ModRightNameDelete = ModRightName + "_Delete";  //浣滃簾
+        public const string ModRightNameDrop = ModRightName + "_Drop";      //鍒犻櫎
+        public DataSet ds = new DataSet();
+        private json objJsonResult = new json();
+        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+        public DAL.ClsHR_EmployeeSkillBill oBill = new DAL.ClsHR_EmployeeSkillBill();
+        public DAL.ClsHR_EmployeeSkillBill BillNew = new DAL.ClsHR_EmployeeSkillBill();   //瀵瑰簲鍗曟嵁绫�
+        public DAL.ClsHR_EmployeeSkillBill BillOld = new DAL.ClsHR_EmployeeSkillBill();   //瀵瑰簲鍗曟嵁绫�
+
+        // HR_EmployeeSkillBill HR_EmployeeSkillBillMain
+        #region 鍛樺伐鎶�鑳芥竻鍗曞垪琛�
+        /// <summary>
+        /// 鑾峰彇鍛樺伐鎶�鑳芥竻鍗曞垪琛ㄤ俊鎭�
+        /// </summary>
+        /// <returns></returns>
+        [Route("HR_EmployeeSkillBill/GetHR_EmployeeSkillBillList")]
+        [HttpGet]
+        public object GetHR_EmployeeSkillBillList(string sWhere, string HMaker)
+        {
+            try
+            {
+                //鍒ゆ柇鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log(ModRightNameQuery, 3, false, HMaker))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                //杩斿洖鍒楄〃淇℃伅
+                ds = oCn.RunProcReturn("select * from h_v_HR_EmployeeSkillBillMainList where 1=1 " + sWhere + " order by hmainid desc", "h_v_HR_EmployeeSkillBillMainList");
+                List<object> columnNameList = new List<object>();
+                //娣诲姞鍒楀悕
+                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 = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鎴愬姛锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏌ヨ鍒楄〃淇℃伅澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 鍛樺伐鎶�鑳芥竻鍗曞垹闄�
+        /// <summary>
+        /// 鍒犻櫎鍛樺伐鎶�鑳芥竻鍗�
+        /// </summary>
+        /// <returns></returns>
+        [Route("HR_EmployeeSkillBill/DeleteHR_EmployeeSkillBill")]
+        [HttpGet]
+        public object DeleteHR_EmployeeSkillBill(Int64 HInterID, string HMaker)
+        {
+            try
+            {
+                //鍒ゆ柇鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log(ModRightNameDrop, 3, false, HMaker))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鍒犻櫎鍔熻兘鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                //鍒ゆ柇瀛樺湪鎬�
+                if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo))
+                {
+
+                    //鍒犻櫎鍓嶆帶鍒�=========================================      
+                    string sql1 = "exec h_p_HR_EmployeeSkillBill_BeforeDelCtrl  " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + HMaker + "'";
+                    ds = oCn.RunProcReturn(sql1, "h_p_YS_ReceiveOtherBill_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;
+                    }
+                    //==================================================================================  
+                   
+                    //鍒犻櫎鍗曟嵁锛堝寘鍚垹闄ゅ悗鎺у埗銆佸啓鍏ユ棩蹇楋級
+                    if (!oBill.DeleteBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_HR_EmployeeSkillBill_AfterDelCtrl", HMaker, ref ClsPub.sExeReturnInfo))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍒犻櫎澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏈煡璇㈠埌璇ュ憳宸ユ妧鑳芥竻鍗曪紝璇峰埛鏂版暟鎹悗閲嶆柊閫夋嫨锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍒犻櫎澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 鍛樺伐鎶�鑳芥竻鍗曞鏍�/鍙嶅鏍�
+        /// <summary>
+        /// 瀹℃牳/鍙嶅鏍稿憳宸ユ妧鑳芥竻鍗�
+        /// </summary>
+        /// <param name="HInterID">鍗曟嵁ID</param>
+        /// <param name="Type">瀹℃牳(1),鍙嶅鏍�(2)</param>
+        /// <param name="HMaker">瀹℃牳浜�</param>
+        /// <returns></returns>
+        [Route("HR_EmployeeSkillBill/AuditHR_EmployeeSkillBill")]
+        [HttpGet]
+        public object AuditHR_EmployeeSkillBill(Int64 HInterID, int IsAudit, string HMaker)
+        {
+            try
+            {
+                //鍒ゆ柇鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log(ModRightNameCheck, 3, false, HMaker))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡瀹℃牳/鍙嶅鏍稿姛鑳芥潈闄�,璇蜂笌绠$悊鍛樿仈绯伙紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                Int64 lngBillKey = 0;
+                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹�
+                DAL.ClsHR_EmployeeSkillBill oBill = new DAL.ClsHR_EmployeeSkillBill();                              //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣�
+
+                //鍒ゆ柇瀛樺湪鎬�
+                if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo))
+                {
+                  
+                    //Type 1 瀹℃牳  2  鍙嶅鏍�
+                    if (IsAudit == 1)
+                    {
+                        if (oBill.omodel.HChecker.Trim() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁宸插鏍革紝涓嶈兘鍐嶆瀹℃牳锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        if (oBill.omodel.HCloseMan.Trim() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        if (oBill.omodel.HDeleteMan.Trim() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        if (IsAudit == 1)  //瀹℃牳鍒ゆ柇
+                        {
+                            if (oBill.omodel.HChecker.Trim() != "")
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�";
+                                objJsonResult.data = null;
+                                return objJsonResult;
+                            }
+                        }
+                        if (IsAudit == 2) //鍙嶅鏍稿垽鏂�
+                        {
+                            if (oBill.omodel.HChecker.Trim() == "")
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!";
+                                objJsonResult.data = null;
+                                return objJsonResult;
+                            }
+                        }
+                        //瀹℃牳鍓嶆帶鍒�=========================================      
+                        string sql1 = "exec h_p_HR_EmployeeSkillBill_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + HMaker + "'";
+                        ds = oCn.RunProcReturn(sql1, "h_p_HR_EmployeeSkillBill_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 (!oBill.CheckBill(HInterID, oBill.omodel.HBillNo, "h_p_HR_EmployeeSkillBill_AfterCheckCtrl", HMaker, ref ClsPub.sExeReturnInfo))
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 1;
+                            objJsonResult.Message = "鍗曟嵁鍙凤細"+ oBill.omodel.HBillNo+ " 瀹℃牳鎴愬姛锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult; ;
+                        }
+                    }
+                    else
+                    {
+                        if (oBill.omodel.HChecker.Trim() == "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁鏈鏍革紝涓嶉渶瑕佸弽瀹℃牳锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        //鍙嶅鏍稿墠鎺у埗=========================================        
+                        string sql1 = "exec h_p_HR_EmployeeSkillBill_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + HMaker + "'";
+                        ds = oCn.RunProcReturn(sql1, "h_p_HR_EmployeeSkillBill_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 (!oBill.AbandonCheck(HInterID, oBill.omodel.HBillNo, "h_p_HR_EmployeeSkillBill_AfterUnCheckCtrl", HMaker, ref ClsPub.sExeReturnInfo))
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 1;
+                            objJsonResult.Message = "鍗曟嵁鍙凤細" + oBill.omodel.HBillNo + " 鍙嶅鏍告垚鍔燂紒";
+                            objJsonResult.data = null;
+                            return objJsonResult; ;
+                        }
+                    }
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏈煡璇㈠埌璇ュ憳宸ユ妧鑳芥竻鍗曪紝璇峰埛鏂版暟鎹悗閲嶆柊閫夋嫨锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "瀹℃牳鎴栧弽瀹℃牳澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 鍛樺伐鎶�鑳芥竻鍗曞叧闂�/鍙嶅叧闂�
+        /// <summary>
+        /// 鍏抽棴/鍙嶅叧闂憳宸ユ妧鑳芥竻鍗�
+        /// </summary>
+        /// <param name="HInterID">鍗曟嵁ID</param>
+        /// <param name="Type">鍏抽棴(1),鍙嶅叧闂�(2)</param>
+        /// <param name="HMaker">鍏抽棴浜�</param>
+        /// <returns></returns>
+        [Route("HR_EmployeeSkillBill/CloseHR_EmployeeSkillBill")]
+        [HttpGet]
+        public object CloseHR_EmployeeSkillBill(Int64 HInterID, int Type, string HMaker)
+        {
+            try
+            {
+                //鍒ゆ柇鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log(ModRightNameClose, 3, false, HMaker))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鍏抽棴/鍙嶅叧闂姛鑳芥潈闄�,璇蜂笌绠$悊鍛樿仈绯伙紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                //鍒ゆ柇瀛樺湪鎬�
+                if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo))
+                {
+                    //Type 1 鍏抽棴  2  鍙嶅叧闂�
+                    if (Type == 1)
+                    {
+                        if (oBill.omodel.HDeleteMan.Trim() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘杩涜鍏抽棴锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        if (oBill.omodel.HChecker.Trim() == "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁鏈鏍�!涓嶈兘杩涜鍏抽棴锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+
+                        if (oBill.omodel.HCloseMan.Trim() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁宸插叧闂紝涓嶈兘鍐嶆鍏抽棴锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        //鍏抽棴鍗曟嵁
+                        if (!oBill.CloseBill(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo))
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍏抽棴澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 1;
+                            objJsonResult.Message = "鍏抽棴鎴愬姛锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult; ;
+                        }
+                    }
+                    else
+                    {
+                        if (oBill.omodel.HCloseMan.Trim() == "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁鏈叧闂紝涓嶉渶瑕佸弽鍏抽棴锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        //鍙嶅叧闂崟鎹�
+                        if (!oBill.CancelClose(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo))
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍙嶅叧闂け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 1;
+                            objJsonResult.Message = "鍙嶅叧闂垚鍔燂紒";
+                            objJsonResult.data = null;
+                            return objJsonResult; ;
+                        }
+                    }
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏈煡璇㈠埌璇ュ憳宸ユ妧鑳芥竻鍗曪紝璇峰埛鏂版暟鎹悗閲嶆柊閫夋嫨锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍏抽棴鎴栧弽鍏抽棴澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 鍛樺伐鎶�鑳芥竻鍗曚綔搴�/鍙嶄綔搴�
+        /// <summary>
+        /// 浣滃簾/鍙嶄綔搴熷憳宸ユ妧鑳芥竻鍗�
+        /// </summary>
+        /// <param name="HInterID">鍗曟嵁ID</param>
+        /// <param name="Type">浣滃簾(1),鍙嶄綔搴�(2)</param>
+        /// <param name="HMaker">浣滃簾浜�</param>
+        /// <returns></returns>
+        [Route("HR_EmployeeSkillBill/DropHR_EmployeeSkillBill")]
+        [HttpGet]
+        public object DropHR_EmployeeSkillBill(Int64 HInterID, int Type, string HMaker)
+        {
+            try
+            {
+                //鍒ゆ柇鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log(ModRightNameDelete, 3, false, HMaker))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡浣滃簾/鍙嶄綔搴熷姛鑳芥潈闄�,璇蜂笌绠$悊鍛樿仈绯伙紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                //鍒ゆ柇瀛樺湪鎬�
+                if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo))
+                {
+                    //Type 1 浣滃簾  2  鍙嶄綔搴�
+                    if (Type == 1)
+                    {
+                        if (oBill.omodel.HChecker.Trim() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁宸插鏍�!涓嶈兘杩涜浣滃簾锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        if (oBill.omodel.HDeleteMan.Trim() != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶄綔搴燂紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        //浣滃簾鍗曟嵁
+                        if (!oBill.Cancelltion(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo))
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "浣滃簾澶辫触!鍘熷洜:" + ClsPub.sExeReturnInfo;
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 1;
+                            objJsonResult.Message = " 浣滃簾鎴愬姛锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult; ;
+                        }
+                    }
+                    else
+                    {
+                        if (oBill.omodel.HDeleteMan.Trim() == "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁鏈綔搴燂紝涓嶉渶瑕佸弽浣滃簾锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        //鍙嶄綔搴熷崟鎹�
+                        if (!oBill.AbandonCancelltion(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo))
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍙嶄綔搴熷け璐�!鍘熷洜:" + ClsPub.sExeReturnInfo;
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 1;
+                            objJsonResult.Message = " 鍙嶄綔搴熸垚鍔燂紒";
+                            objJsonResult.data = null;
+                            return objJsonResult; ;
+                        }
+                    }
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏈煡璇㈠埌璇ュ憳宸ユ妧鑳芥竻鍗曪紝璇峰埛鏂版暟鎹悗閲嶆柊閫夋嫨锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "浣滃簾鎴栧弽浣滃簾澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 鍛樺伐鎶�鑳芥竻鍗曠紪杈�
+        /// <summary>
+        /// 鍛樺伐鎶�鑳芥竻鍗曠紪杈戞椂锛屾牴鎹崟鎹甀D鑾峰彇鍗曟嵁淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("HR_EmployeeSkillBill/EditHR_EmployeeSkillBill")]
+        [HttpGet]
+        public object EditHR_EmployeeSkillBill(Int64 HInterID, string HMaker)
+        {
+            try
+            {
+                //鍒ゆ柇鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log(ModRightNameEdit, 3, false, HMaker))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡缂栬緫鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                //杩斿洖鍒楄〃淇℃伅
+                ds = oCn.RunProcReturn("select * from h_v_HR_EmployeeSkillBillMainList where 1=1 and hmainid=" + HInterID + " order by hmainid desc", "h_v_HR_EmployeeSkillBillMainList");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏈煡璇㈠埌璇ュ憳宸ユ妧鑳芥竻鍗曪紝璇峰埛鏂版暟鎹悗閲嶆柊閫夋嫨锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "杩斿洖鍛樺伐鎶�鑳芥竻鍗曚俊鎭け璐ワ紒" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 鍛樺伐鎶�鑳芥竻鍗� 鏂板/缂栬緫
+        [Route("HR_EmployeeSkillBill/SaveHR_EmployeeSkillBill")]
+        [HttpPost]
+        public object SaveHR_EmployeeSkillBill([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 refSav = sArray[2].ToString();//鎿嶄綔鏂瑰紡鏁版嵁绫诲瀷 1娣诲姞 3淇敼 2 澶嶅埗
+            string msg4 = sArray[3].ToString();//鐢ㄦ埛鍚�
+
+            DBUtility.ClsPub.CurUserName = msg4;
+
+            string UserName = "";
+            string s = "";
+            ListModels oListModels = new ListModels();
+            try
+            {
+                //缂栬緫鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("HR_EmployeeSkillBill_Edit", 1, false, msg4))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                DAL.ClsHR_EmployeeSkillBill oBill = new DAL.ClsHR_EmployeeSkillBill();
+                List<Model.ClsHR_EmployeeSkillBillMain> lsmain = new List<Model.ClsHR_EmployeeSkillBillMain>();
+                msg2 = msg2.Replace("\\", "");
+                msg2 = msg2.Replace("\n", "");  //\n
+                lsmain = oListModels.getObjectByJson_HR_EmployeeSkillBillMain(msg2);
+                foreach (Model.ClsHR_EmployeeSkillBillMain oItem in lsmain)
+                {
+                    if (refSav == "Add")
+                    {
+                        //鍗曟嵁鍙锋槸鍚﹂噸澶�
+                        if (BillNew.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍗曟嵁鍙烽噸澶嶏紒涓嶅厑璁镐繚瀛橈紒";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                    }
+                    if (refSav == "Update")
+                    {
+                        if (BillOld.ShowBill(oItem.HInterID, ref s) == false)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "姝ゅ崟鎹湁璇紒";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                        //鍒ゆ柇鏄惁鍙紪杈�
+                        if (BillOld.omodel.HChecker != "" && BillOld.omodel.HChecker != null)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "姝ゅ崟鎹凡缁忚瀹℃牳锛屼笉鍏佽淇敼锛�";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                        if (BillOld.omodel.HBillStatus > 1)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "姝ゅ崟鎹浜庝笉鍙紪杈戠姸鎬侊紝涓嶅厑璁镐慨鏀癸紒";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                        if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(BillOld, ref s))
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = s + "锛屼笉鍏佽淇敼";
+                            objJsonResult.data = 1;
+                            return objJsonResult;
+                        }
+                    }
+                    UserName = oItem.HMaker;  //鍒跺崟浜�
+                    oItem.HBillType = "2330";
+                    oItem.HBillSubType = "2330";
+
+                    oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+                    oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
+                    oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd"));
+
+                    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
+                List<Model.ClsHR_EmployeeSkillBillSub> ls = new List<Model.ClsHR_EmployeeSkillBillSub>();
+                ls = oListModels.getObjectByJson_HR_EmployeeSkillBillSub(msg3);
+                int i = 0;
+                foreach (Model.ClsHR_EmployeeSkillBillSub oItemSub in ls)
+                {
+                    i++;
+                    oItemSub.HEntryID = i;
+
+
+                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+                    oItemSub.HCloseType = false;   //鍏抽棴绫诲瀷
+
+                    oBill.DetailColl.Add(oItemSub);
+
+                }
+
+                //淇濆瓨
+                //淇濆瓨瀹屾瘯鍚庡鐞�
+                bool bResult;
+                if (refSav == "Add")
+                {
+
+                    bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo);
+                }
+                else if (refSav == "Update")
+                {
+                    bResult = oBill.ModifyBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+                }
+                else
+                {
+                    bResult = false;
+                }
+                if (bResult)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
+                    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
+    }
+}
\ No newline at end of file
diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/HR_PostSkillBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/HR_PostSkillBillController.cs"
index e9b2561..92a5e3b 100644
--- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/HR_PostSkillBillController.cs"
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/HR_PostSkillBillController.cs"
@@ -732,8 +732,8 @@
                         }
                     }
                     UserName = oItem.HMaker;  //鍒跺崟浜�
-                    oItem.HBillType = "2002";
-                    oItem.HBillSubType = "2002";
+                    oItem.HBillType = "2331";
+                    oItem.HBillSubType = "2331";
 
                     oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
                     oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_WorkTimesBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_WorkTimesBillController.cs"
index 42d41d5..3553906 100644
--- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_WorkTimesBillController.cs"
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_WorkTimesBillController.cs"
@@ -30,11 +30,11 @@
         private json objJsonResult = new json();
         SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
         public DAL.ClsPay_WorkTimesBill oBill = new DAL.ClsPay_WorkTimesBill();
-        public DAL.ClsPay_WorkTimesBill BillNew = new DAL.ClsPay_WorkTimesBill();   //瀵瑰簲鍗曟嵁绫�
-        public DAL.ClsPay_WorkTimesBill BillOld = new DAL.ClsPay_WorkTimesBill();   //瀵瑰簲鍗曟嵁绫�
+        public DLL.ClsPay_WorkTimesBill BillNew0 = new DLL.ClsPay_WorkTimesBill();   // 
+        public DLL.ClsPay_WorkTimesBill BillOld0 = new DLL.ClsPay_WorkTimesBill();   //    
 
 
-        #region 鑰冨嫟姹囨姤鍗曞垪琛�
+        #region 鑰冨嫟姹囨姤鍗曞垪琛ㄤ俊鎭�
         /// <summary>
         /// 鑾峰彇鑰冨嫟姹囨姤鍗曞垪琛ㄤ俊鎭�
         /// </summary>
@@ -591,7 +591,7 @@
         }
         #endregion
 
-        #region 鑰冨嫟姹囨姤鍗曠紪杈�
+        #region 鑰冨嫟姹囨姤鍗曟ā鍧�   浠庡垪琛ㄩ�変腑鎵撳紑鍗曟嵁锛岃繑鍥炲崟鎹俊鎭椂璋冪敤
         /// <summary>
         /// 鑰冨嫟姹囨姤鍗曠紪杈戞椂锛屾牴鎹崟鎹甀D鑾峰彇鍗曟嵁淇℃伅
         /// </summary>
@@ -624,7 +624,7 @@
                 }
                 else
                 {
-                    objJsonResult.code = "1";
+                    objJsonResult.code = "0";
                     objJsonResult.count = 1;
                     objJsonResult.Message = "鎴愬姛锛�";
                     objJsonResult.data = ds.Tables[0];
@@ -642,6 +642,201 @@
         }
         #endregion
 
+        #region 鑰冨嫟姹囨姤鍗曚繚瀛�
+        /// <summary>
+        /// 鑰冨嫟姹囨姤鍗曚繚瀛�
+        /// </summary>
+        [Route("Pay_WorkTimesBillController/GetPay_WorkTimesBill_Save_Json")]
+        [HttpPost]
+        public object GetPay_WorkTimesBill_Save_Json([FromBody] JObject sMainSub)
+        {
+            var _value = sMainSub["sMainSub"].ToString();
+            string msg1 = _value.ToString();
+            string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
+            string sMainStr = sArray[0].ToString();         //涓昏〃鏁版嵁
+            string sSubStr = sArray[1].ToString();          //瀛愯〃鏁版嵁
+            string OperationType = sArray[2].ToString();    //鎿嶄綔绫诲瀷锛�1鏂板銆�2缂栬緫锛�
+            string HMaker = sArray[3].ToString();           //鍒跺崟浜�
+            try
+            {
+                //鍒ゆ柇鏉冮檺
+                if (OperationType == "1")
+                {
+                    BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew;
+                    //鍒ゆ柇鏂板鏉冮檺
+                    if (!DBUtility.ClsPub.Security_Log(ModRightName, 1, false, HMaker))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏂板鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+                else
+                {
+                    BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_Modify;
+                    //鍒ゆ柇缂栬緫鏉冮檺
+                    if (!DBUtility.ClsPub.Security_Log(ModRightNameEdit, 1, false, HMaker))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡缂栬緫鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+                //琛ㄥご璧嬪��
+                sMainStr = sMainStr.Replace("\\", "");
+                sMainStr = sMainStr.Replace("\n", "");
+                sMainStr = "[" + sMainStr.ToString() + "]";
+                List<Model.ClsPay_WorkTimesBillMain> lsmain = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsPay_WorkTimesBillMain>>(sMainStr);
+                foreach (Model.ClsPay_WorkTimesBillMain oItem in lsmain)
+                {
+                    //鍗曟嵁鍙锋槸鍚﹂噸澶�
+                    if (oBill.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, oItem.HInterID))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍗曟嵁鍙烽噸澶嶏紒涓嶅厑璁镐繚瀛橈紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
+                    string s = "";
+                    int sYear = 0;
+                    int sPeriod = 0;
+                    if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod_Pay(oItem.HDate, ref sYear, ref sPeriod, ref s) == false)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = s;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+
+                    oItem.HYear = sYear;
+                    oItem.HPeriod = sPeriod;
+                    DBUtility.ClsPub.CurUserName = oItem.HMaker;
+                    oBill.omodel = oItem;
+                }
+                //琛ㄤ綋璧嬪��
+                //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
+                sSubStr = sSubStr.Substring(1, sSubStr.Length - 2);
+                sSubStr = sSubStr.Replace("\\", "");
+                sSubStr = sSubStr.Replace("\n", "");
+                sSubStr = "[" + sSubStr.ToString() + "]";
+                List<Model.ClsPay_WorkTimesBillSub> ls = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsPay_WorkTimesBillSub>>(sSubStr);
+                int i = 0;
+                foreach (Model.ClsPay_WorkTimesBillSub oItemSub in ls)
+                {
+                    i++;
+                    oItemSub.HEntryID = i;
+                    oBill.DetailColl.Add(oItemSub);
+                }
+
+                //淇濆瓨
+                bool bResult;
+                if (OperationType == "1")   //鏂板淇濆瓨
+                {
+                    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 = 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;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "淇濆瓨澶辫触锛�" + e.Message;
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+
+
+
+
+
+
+
+
+
+        //---------------------------------------------------------------------------------------------鏃ф柟娉�
+
+
+        /// <summary>
+        /// 杩斿洖鑰冨嫟姹囨姤鍗曞垪琛�
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("Pay_WorkTimesBill/GetWorkTimesBill")]
+        [HttpGet]
+        public object GetWorkTimesBill(string sWhere, string user)
+        {
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Pay_WorkTimesBillList", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                ds = Sc_GetWorkTimesBill(sWhere);
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+            }
+            catch (Exception ex)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        public static DataSet Sc_GetWorkTimesBill(string sWhere)
+        {
+            if (sWhere == null || sWhere.Equals(""))
+            {
+                return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Pay_WorkTimesBillList order by hmainid desc", "h_v_Pay_WorkTimesBillList");
+            }
+            else
+            {
+                string sql1 = "select * from h_v_Pay_WorkTimesBillList where 1 = 1 ";
+                string sql = sql1 + sWhere + " order by hmainid desc";
+                return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Pay_WorkTimesBillList");
+            }
+
+        }
 
 
         #region[鑰冨嫟姹囨姤鍗曠紪杈戞椂鑾峰彇琛ㄥご鏁版嵁]
@@ -664,38 +859,34 @@
         #region[鑰冨嫟姹囨姤鍗曠紪杈戞椂鑾峰彇琛ㄤ綋鏁版嵁]
         [Route("Pay_WorkTimesBill/Pay_WorkTimesBillListProjectDetai")]
         [HttpGet]
-        public object Pay_WorkTimesBillListProjectDetai(Int64 HInterID)
+        public object Pay_WorkTimesBillListProjectDetai(string sqlWhere)
         {
+            DataSet ds;
             try
             {
-                ds = oCn.RunProcReturn("exec h_p_Pay_WorkTimesBill_EditInit " + HInterID, "h_p_Pay_WorkTimesBill_EditInit");
-                if (ds == null || ds.Tables[0].Rows.Count == 0)
-                {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = "鏈煡璇㈠埌璇ヨ�冨嫟姹囨姤鍗曪紝璇峰埛鏂版暟鎹悗閲嶆柊閫夋嫨锛�";
-                    objJsonResult.data = null;
-                    return objJsonResult;
-                }
-                else
-                {
-                    objJsonResult.code = "1";
-                    objJsonResult.count = 1;
-                    objJsonResult.Message = "鎴愬姛锛�";
-                    objJsonResult.data = ds.Tables[0];
-                    return objJsonResult;
-                }
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                string sql1 = "SELECT  HDeptID,閮ㄩ棬浠g爜,閮ㄩ棬,HGroupID" +
+                    ",鐝粍浠g爜,鐝粍,琛ㄥご澶囨敞,鍒跺崟浜�,鍒跺崟鏃ユ湡,瀹℃牳浜�" +
+                    ",瀹℃牳鏃ユ湡,淇敼浜�,淇敼鏃ユ湡,鍏抽棴浜�, 鍏抽棴鏃ユ湡,HEmpID" +
+                    ",HEmpNumber,HEmpName,鑱屽憳绯绘暟 HEmpRate,鍩烘湰澶╂暟 HBaseDays,鍩烘湰宸ユ椂 HBaseTimes,鍔犵彮宸ユ椂 HOverTimes,璇峰亣宸ユ椂 HLeaveTimes,鍔犵彮澶╂暟 HOverDays,璇峰亣澶╂暟 HLeaveDays,杩熷埌娆℃暟 HLateQty" +
+                    ",鍏嚭 HOutForComQty,绉佸嚭 HOutForEmpQty,鍏嚭鏃堕棿 HOutForComTimes,绉佸嚭鏃堕棿 HOutForEmpTimes,杩熷埌鏃堕棿 HLateTimes,鏃╅��娆℃暟 HEarlyQty,鏃╅��鏃堕棿 HEarlyTimes" +
+                    ",鏃峰伐澶╂暟 HAbsentDays,涓婂崍 HAMTimes,涓嬪崍 HPMTimes,HCTPrjID,HCTPrjNumber,HCTPrjName,HWorkTypeID,HWorkTypeNumber,HWorkTypeName,HPayMoney,HMoney" +
+                    ",琛ㄤ綋澶囨敞 HRemark,HRestFlag,HSchClassID FROM h_v_Pay_WorkTimesBillList where 1 = 1 ";
+                string sql = sql1 + sqlWhere;
+                ds = oCN.RunProcReturn(sql, "h_v_Pay_WorkTimesBillList");
+                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.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
                 objJsonResult.data = null;
-                return objJsonResult;
             }
-
-
+            return objJsonResult;
         }
         #endregion
 
@@ -742,7 +933,7 @@
                     if (refSav == "Add")
                     {
                         //鍗曟嵁鍙锋槸鍚﹂噸澶�
-                        if (BillNew.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld.omodel.HInterID))
+                        if (BillNew0.IsExistBillNo(ref ClsPub.sExeReturnInfo, oItem.HBillNo, BillStatus, BillOld0.omodel.HInterID))
                         {
                             objJsonResult.code = "0";
                             objJsonResult.count = 0;
@@ -753,7 +944,7 @@
                     }
                     if (refSav == "Update")
                     {
-                        if (BillOld.ShowBill(oItem.HInterID, ref s) == false)
+                        if (BillOld0.ShowBill(oItem.HInterID, ref s) == false)
                         {
                             objJsonResult.code = "0";
                             objJsonResult.count = 0;
@@ -762,7 +953,7 @@
                             return objJsonResult;
                         }
                         //鍒ゆ柇鏄惁鍙紪杈�
-                        if (BillOld.omodel.HChecker != "" && BillOld.omodel.HChecker != null)
+                        if (BillOld0.omodel.HChecker != "" && BillOld0.omodel.HChecker != null)
                         {
                             objJsonResult.code = "0";
                             objJsonResult.count = 0;
@@ -770,7 +961,7 @@
                             objJsonResult.data = 1;
                             return objJsonResult;
                         }
-                        if (BillOld.omodel.HBillStatus > 1)
+                        if (BillOld0.omodel.HBillStatus > 1)
                         {
                             objJsonResult.code = "0";
                             objJsonResult.count = 0;
@@ -778,7 +969,7 @@
                             objJsonResult.data = 1;
                             return objJsonResult;
                         }
-                        if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(BillOld, ref s))
+                        if (!DBUtility.Xt_BaseBillFun.Fun_AllowEditBill(BillOld0, ref s))
                         {
                             objJsonResult.code = "0";
                             objJsonResult.count = 0;
@@ -864,6 +1055,45 @@
         }
 
         /// <summary>
+        ///宸ヨ祫缁撶畻涓汉鍗曞垹闄ゅ姛鑳�
+        /// </summary>
+        /// <returns></returns>
+        [Route("Pay_WorkTimesBill/DeltetWorkTimesBill")]
+        [HttpGet]
+        public object DeltetWorkTimesBill(string HInterID, string user)
+        {
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Pay_WorkTimesBill_Drop", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                oCn.BeginTran();
+                oCn.RunProc("Delete From Pay_WorkTimesBillMain where HInterID = " + HInterID);
+                oCn.RunProc("Delete From Pay_WorkTimesBillSub where HInterID = " + HInterID);
+                oCn.Commit();
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                oCn.RollBack();
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        /// <summary>
         /// 閫氳繃鐝粍鏌ヨ鑱屽憳淇℃伅
         ///鍙傛暟锛歴tring sql銆�
         ///杩斿洖鍊硷細object銆�
diff --git "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs" "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
index 6b40952..dbb8fe9 100644
--- "a/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
+++ "b/WebAPI/Controllers/\346\235\241\347\240\201\347\256\241\347\220\206/WEBSController.cs"
@@ -243,6 +243,59 @@
 
         #endregion
 
+        #region 鑾峰彇鏈�澶у崟鎹彿
+
+        /// <summary>
+        /// 鑾峰彇鏈�澶у崟鎹彿
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetMaxBillNo_Json")]
+        [HttpGet]
+        public object GetMaxBillNo_Json(string HBillType)
+        {
+            try
+            {
+                string sErrMsg = "";
+                string HBillNo = "";
+                HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(HBillType, ref sErrMsg, true);
+
+                //----------鍒涘缓铏氳〃------------------------
+                DataTable dt_Main = new DataTable("Json");
+                dt_Main.Columns.Add("HBillNo", typeof(string));
+                //---------鍒涘缓鏂拌------------------------
+                DataRow dr_main = dt_Main.NewRow(); //鍒涘缓鏂拌 
+                dt_Main.Rows.Add(dr_main);          //灏嗘柊琛屽姞鍏ュ埌琛ㄤ腑
+                dr_main["HBillNo"] = DBUtility.ClsPub.isStrNull(HBillNo);
+                //杩斿洖鏁版嵁
+                if (HBillNo == "")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏈�澶у崟鎹彿鑾峰彇澶辫触";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "鑾峰彇鎴愬姛";
+                    objJsonResult.data = dt_Main;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鑾峰彇鏈�澶у崟鎹彿澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
 
         #region 鏍规嵁鏉$爜锛岃繑鍥炴潯鐮佹。妗堜腑鏉$爜淇℃伅
 
diff --git a/WebAPI/DLL/ClsGy_BadPhenomena_Ctl.cs b/WebAPI/DLL/ClsGy_BadPhenomena_Ctl.cs
new file mode 100644
index 0000000..c8b3b7e
--- /dev/null
+++ b/WebAPI/DLL/ClsGy_BadPhenomena_Ctl.cs
@@ -0,0 +1,101 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace WebAPI.DLL
+{
+    public class ClsGy_BadPhenomena_Ctl : DBUtility.ClsGy_Base_Ctl
+    {
+        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+        //鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩�
+        public string HOldNumber;
+        public Model.ClsGy_BadPhenomena_Model oModel = new Model.ClsGy_BadPhenomena_Model();
+        //鏂板
+        public override bool AddNew()
+        {
+            //
+            try
+            {
+                oCn.BeginTran();
+                oCn.RunProc("Insert into " + MvarItemKey + " " +
+                    " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+                    ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HUSEORGID,HUseFlag,HMakeEmp,HCREATEORGID) " +
+                    " Values('" + oModel.HNumber + "','" + oModel.HName + "','" + oModel.HHelpCode + "','" + oModel.HShortNumber + "'," + oModel.HParentID.ToString() +
+                    "," + oModel.HLevel.ToString() + "," + Convert.ToString(oModel.HEndFlag ? 1 : 0) + "," + Convert.ToString(oModel.HStopflag ? 1 : 0) + ",'" + oModel.HRemark + "','" + DateTime.Now + "','" + oModel.HUSEORGID + "','" + oModel.HUseFlag + "','" + oModel.HMakeEmp + "','" + oModel.HUSEORGID + "')", ref DBUtility.ClsPub.sExeReturnInfo);
+                //淇敼涓婄骇涓洪潪鏈骇浠g爜
+                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+
+        //淇敼
+        public override bool ModifyByID(Int64 sItemID)
+        {
+            try
+            {
+
+                oCn.BeginTran();
+                oCn.RunProc("Update " + MvarItemKey + " set " +
+                    " HNumber='" + oModel.HNumber + "'" +
+                    ",HName='" + oModel.HName + "'" +
+                    ",HShortNumber='" + oModel.HShortNumber + "'" +
+                    ",HHelpCode='" + oModel.HHelpCode + "'" +
+                    ",HModifyTime='" + DateTime.Now + "'" +
+                    ",HUSEORGID='" + oModel.HUSEORGID + "'" +
+                    ",HModifyEmp ='" + oModel.HMakeEmp + "'" +
+                    ",HUseFlag='" + oModel.HUseFlag + "'" +
+                    ",HStopflag=" + Convert.ToString(oModel.HStopflag ? 1 : 0) +
+                    ",HRemark= '" + oModel.HRemark + "' Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo);
+                //淇敼瀛愰」鐩唬鐮�
+                oCn.RunProc("exec h_p_Gy_UpdateNumber '" + MvarItemKey + "','" + oModel.HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
+                //灏嗕笂绾� 涓洪潪鏈骇
+                oCn.RunProc("Update " + MvarItemKey + " set HEndflag=0 where HItemID=" + oModel.HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
+                //
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+        //鏍规嵁浠g爜鍒ゆ柇淇℃伅
+        public override bool HavParentCode(string sCode, Int64 sItemID)
+        {
+            DataSet DS;
+            try
+            {
+                DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where HStopflag=0 and HNumber='" + sCode + "' and HItemID<>" + sItemID, MvarItemKey, ref Pub_Class.ClsPub.sExeReturnInfo);
+                if (DS.Tables[0].Rows.Count == 0)
+                    return false;
+                else
+                {
+                    oModel.HItemID = Convert.ToInt64(DS.Tables[0].Rows[0]["HItemID"]);
+                    return true;
+                }
+            }
+            catch (Exception e)
+            {
+                throw (e);
+            }
+        }
+        //鏋勯�犲嚱鏁�
+        public ClsGy_BadPhenomena_Ctl()
+        {
+            MvarItemKey = "Gy_BadPhenomena";
+            MvarReportTitle = "涓嶈壇鐜拌薄璁剧疆";
+            oModel = new Model.ClsGy_BadPhenomena_Model();
+        }
+
+    
+
+    }
+}
diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs
index 2d02066..cb5a8cf 100644
--- a/WebAPI/ListModels.cs
+++ b/WebAPI/ListModels.cs
@@ -395,6 +395,18 @@
         }
 
         /// <summary>
+        /// 澶勭悊鏂板涓嶈壇鍝佽瘎瀹$敵璇峰崟琛ㄧ殑json
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Model.ClsQC_NoPassProdRequestBillMain> getObjectByJson_QC_NoPassProdRequestBill(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Model.ClsQC_NoPassProdRequestBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_NoPassProdRequestBillMain>>(jsonString);
+            return list;
+        }
+
+        /// <summary>
         /// 澶勭悊鏂板閮ㄩ棬鍩虹璧勬枡鐨凧SON
         /// </summary>
         /// <param name="jsonString"></param>
@@ -848,6 +860,18 @@
         }
 
         /// <summary>
+        /// 澶勭悊鏂板涓嶈壇鐜拌薄琛ㄧ殑json
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Model.ClsGy_BadPhenomena_Model> getObjectByJson_Gy_BadPhenomena(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Model.ClsGy_BadPhenomena_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_BadPhenomena_Model>>(jsonString);
+            return list;
+        }
+
+        /// <summary>
         /// 澶勭悊鏂板妫�娴嬪�艰〃鐨刯son
         /// </summary>
         /// <param name="jsonString"></param>
@@ -1182,6 +1206,31 @@
         }
 
         /// <summary>
+        /// 澶勭悊鏂板憳宸ユ妧鑳芥竻鍗曚富琛ㄧ殑json
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Model.ClsHR_EmployeeSkillBillMain> getObjectByJson_HR_EmployeeSkillBillMain(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Model.ClsHR_EmployeeSkillBillMain> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsHR_EmployeeSkillBillMain>>(jsonString);
+            return list;
+        }
+
+        /// <summary>
+        /// 澶勭悊鏂板憳宸ユ妧鑳芥竻鍗曞瓙琛ㄧ殑json
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Model.ClsHR_EmployeeSkillBillSub> getObjectByJson_HR_EmployeeSkillBillSub(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Model.ClsHR_EmployeeSkillBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsHR_EmployeeSkillBillSub>>(jsonString);
+            return list;
+        }
+
+
+        /// <summary>
         /// 澶勭悊鏂板鍛ㄦ�荤粨琛ㄧ殑json
         /// </summary>
         /// <param name="jsonString"></param>
@@ -1248,6 +1297,8 @@
             List<Model.ClsPM_ProjectMoneyBillSub> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsPM_ProjectMoneyBillSub>>(jsonString);
             return list;
         }
+
+
         
         /// <summary>
         /// 澶勭悊鏂板椤圭洰鍚姩琛ㄧ殑json
diff --git a/WebAPI/Service/LuBaoSevice.cs b/WebAPI/Service/LuBaoSevice.cs
index f06c8ae..3ef5df0 100644
--- a/WebAPI/Service/LuBaoSevice.cs
+++ b/WebAPI/Service/LuBaoSevice.cs
@@ -216,6 +216,25 @@
         }
 
         /// <summary>
+        /// 涓嶈壇鐜拌薄鏍规嵁id鑾峰彇淇℃伅
+        /// </summary>
+        public static ApiResult<DataSet> GetGy_BadPhenomenaDetail(string HID)
+        {
+            if (string.IsNullOrEmpty(HID))
+                return new ApiResult<DataSet> { code = -1, msg = "ID涓嶈兘涓虹┖" };
+            var dataSet = GetGy_BadPhenomenaDb(HID);
+            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 };
+        }
+        public static DataSet GetGy_BadPhenomenaDb(string HID)
+        {
+            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+            var dataSet = oCN.RunProcReturn("select top 1 * from h_v_Gy_BadPhenomena  where HItemID= " + HID + " ", "h_v_Gy_BadPhenomena");
+            return dataSet;
+        }
+
+        /// <summary>
         /// 妫�娴嬪�兼牴鎹甶d鑾峰彇淇℃伅
         /// </summary>
         public static ApiResult<DataSet> GetGy_InspectValueBillDetail(string HID)
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index 4b30938..5d0f245 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -554,6 +554,7 @@
     <Compile Include="Controllers\鍩虹璧勬枡\宸ヨ祫鍩虹璧勬枡\Gy_WorkTypeController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\宸ヨ祫鍩虹璧勬枡\Gy_WorkPayTypeController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\宸ヨ祫鍩虹璧勬枡\Gy_ClassTimePrjGroupController.cs" />
+    <Compile Include="Controllers\宸ヨ祫绠$悊\HR_EmployeeSkillBillController.cs" />
     <Compile Include="Controllers\宸ヨ祫绠$悊\Pay_OutApplyBillController.cs" />
     <Compile Include="Controllers\宸ヨ祫绠$悊\Pay_OverApplyBillController.cs" />
     <Compile Include="Controllers\宸ヨ祫绠$悊\Pay_PayMentBillController.cs" />
@@ -644,6 +645,7 @@
     <Compile Include="Dapper\SqlHelper.cs" />
     <Compile Include="Dapper\SqlPools.cs" />
     <Compile Include="DbUntil\DataFormatUntil.cs" />
+    <Compile Include="DLL\ClsGy_BadPhenomena_Ctl.cs" />
     <Compile Include="DLL\ClsGy_InspectInstruMent_Ctl.cs" />
     <Compile Include="DLL\ClsGy_InspectBasis_Ctl.cs" />
     <Compile Include="DLL\ClsGy_PoStockStyle_Ctl.cs" />

--
Gitblit v1.9.1