From 45b33e77b6f90e0a18fc88bbb0826ecf1e7b9b51 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期三, 19 六月 2024 15:25:16 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 Model/生产管理/设备管理/ClsSB_EquipICMOTechParamBillSub.cs             |   18 
 WebAPI/Controllers/条码管理/WEBSController.cs                      |   31 +
 WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs         |   74 +-
 Model/Model.csproj                                             |    2 
 WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs    |   63 ++
 DAL/信息平台/ClsOA_ErrMsgBackReceiveBill.cs                        |    3 
 Model/生产管理/设备管理/ClsSB_EquipICMOTechParamBillMain.cs            |   25 +
 WebAPI/Models/ClsOA_ErrMsgBackBillMain.cs                      |    2 
 WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs    |    6 
 DBUtility/业务单据/ClsXt_BaseBillSub.cs                            |    3 
 DAL/生产管理/设备管理/ClsSB_EquipICMOTechParamBill.cs                  |  330 +++++++++++++
 WebAPI/Properties/PublishProfiles/FolderProfile12.pubxml.user  |   36 
 WebAPI/Web.config                                              |    2 
 DAL/DAL.csproj                                                 |    1 
 WebAPI/Controllers/SBGL/SB_EquipICMOTechParamBillController.cs |  786 ++++++++++++++++++++++++++++++++
 WebAPI/WebAPI.csproj                                           |    1 
 WebAPI/DLL/ClsOA_ErrMsgBackBill.cs                             |    5 
 17 files changed, 1,334 insertions(+), 54 deletions(-)

diff --git a/DAL/DAL.csproj b/DAL/DAL.csproj
index e9ab483..201204b 100644
--- a/DAL/DAL.csproj
+++ b/DAL/DAL.csproj
@@ -647,6 +647,7 @@
     <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsGy_EquipTypeBill.cs" />
     <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsGy_FixCardChangeBill.cs" />
     <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsGy_FixCardBill.cs" />
+    <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSB_EquipICMOTechParamBill.cs" />
     <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipBeginBillMain.cs" />
     <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipStopBillMain.cs" />
     <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipWorkBeforeCheckBill.cs" />
diff --git "a/DAL/\344\277\241\346\201\257\345\271\263\345\217\260/ClsOA_ErrMsgBackReceiveBill.cs" "b/DAL/\344\277\241\346\201\257\345\271\263\345\217\260/ClsOA_ErrMsgBackReceiveBill.cs"
index 78938e4..e00caa9 100644
--- "a/DAL/\344\277\241\346\201\257\345\271\263\345\217\260/ClsOA_ErrMsgBackReceiveBill.cs"
+++ "b/DAL/\344\277\241\346\201\257\345\271\263\345\217\260/ClsOA_ErrMsgBackReceiveBill.cs"
@@ -189,6 +189,9 @@
                 //涓昏〃
                 oCn.RunProc(sql);
 
+                //鍙嶉鎺ユ敹鍗曚繚瀛樺悗,鏇存柊寮傚父鍙嶉鍗曠殑鎸囨淳澶勭悊浜�
+                string sql1 = "update OA_ErrMsgBackBillMain set HHandleEmpID='" + omodel.HHandleEmpID.ToString() + "' where HBillNo='" + omodel.HMainSourceBillNo + "' ";
+                oCn.RunProc(sql1);
                 //=========================淇濆瓨鍚庢帶鍒�  
                 DataSet ds2 = oCn.RunProcReturn("Exec h_p_OA_ErrMsgBackReceiveBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_OA_ErrMsgBackReceiveBill_AfterSaveCtrl");
                 if (ds2 == null)
diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSB_EquipICMOTechParamBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSB_EquipICMOTechParamBill.cs"
new file mode 100644
index 0000000..96d3642
--- /dev/null
+++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSB_EquipICMOTechParamBill.cs"
@@ -0,0 +1,330 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace DAL
+{
+    public  class ClsSB_EquipICMOTechParamBill:DBUtility.ClsXt_BaseBill
+    {
+        public Model.ClsSB_EquipICMOTechParamBillMain omodel = new Model.ClsSB_EquipICMOTechParamBillMain();
+        public List<Model.ClsSB_EquipICMOTechParamBillSub> DetailColl = new List<Model.ClsSB_EquipICMOTechParamBillSub>();
+
+        public ClsSB_EquipICMOTechParamBill()
+        {
+            base.MvarItemKeySub = "SB_EquipICMOTechParamBillSub";
+            base.MvarItemKeySub2 = "";
+            base.MvarItemKeySub3 = "";
+            base.MvarItemKeySub4 = "";
+            base.MvarItemKey="SB_EquipICMOTechParamBillMain";
+            base.MvarReportTitle= "璁惧宸ヨ壓鍙傛暟璁㈠崟鐐规琛�";
+            base.BillType= "3919";
+            base.HBillSubType = "3919";
+
+        }
+
+        #region 鍥哄畾浠g爜
+
+        ~ClsSB_EquipICMOTechParamBill()
+        {
+            DetailColl = null;
+        }
+
+        #endregion   鑷畾涔夋柟娉�
+
+        //淇濆瓨鍓嶆帶鍒�
+        public bool BeforeSave(Int64 HInterID, string HBillNo, Int64 OperationType, ref string sReturn)
+        {
+            try
+            {
+                DataSet Ds = oCn.RunProcReturn("Exec h_p_SB_EquipICMOTechParamBill_BeforeSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_SB_EquipICMOTechParamBill_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_SB_EquipICMOTechParamBill_AfterSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_SB_EquipICMOTechParamBill_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 SB_EquipICMOTechParamBillMain 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 + "'" +
+                ",HProcNo=" + omodel.HProcNo.ToString() +
+                ",HMaterID=" + omodel.HMaterID.ToString() +
+                ",HProcID=" + omodel.HProcID.ToString() +
+                ",HEmpID=" + omodel.HEmpID.ToString() +
+                ",HSourceID=" + omodel.HSourceID.ToString() +
+                ",HGroupID=" + omodel.HGroupID.ToString() +
+                ",HDeptID=" + omodel.HDeptID.ToString() +
+                ",HEquipID=" + omodel.HEquipID.ToString() +
+                ",HStockOrgID=" + omodel.HSTOCKORGID.ToString() +
+                " where HInterID=" + lngBillKey.ToString());
+                //鍒犻櫎鍏宠仈
+                DeleteRelation(ref sReturn, lngBillKey);
+                //鍒犻櫎瀛愯〃
+                DeleteBillSub(lngBillKey);
+                //鎻掑叆瀛愯〃
+                omodel.HInterID = lngBillKey;
+                foreach (Model.ClsSB_EquipICMOTechParamBillSub oSub in DetailColl)
+                {
+                    oCn.RunProc("Insert into SB_EquipICMOTechParamBillSub " +
+                      " (HInterID,HEntryID,HRemark,HRelationQty,HRelationMoney" +
+                      ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HBillNo_bak" +
+                      ",HTechParamID,HTechParamUnitID,HVaule,HStd,HMax,HMin,HResult" +
+                      ") values("
+                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+                      "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "','" + omodel.HBillNo + "'" +
+                      "," + oSub.HTechParamID.ToString() + "," + oSub.HTechParamUnitID.ToString() + ",'" + oSub.HVaule + "','" + oSub.HStd + "','" + oSub.HMax + "','" + oSub.HMin + "','" + oSub.HResult + "'" +
+                      ") ");
+                }
+                //淇濆瓨鍚庢帶鍒�
+                if (!AfterSave(lngBillKey, omodel.HBillNo, 2, ref sReturn))
+                {
+                    oCn.RollBack();
+                    return false;
+                }
+                sReturn = "鍗曟嵁鍙凤細" + omodel.HBillNo + " 淇敼鎴愬姛锛�";
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+        //鏂板鍗曟嵁
+        public override bool AddBill(ref string sReturn)
+        {
+            try
+            {
+                //寰楀埌mainid
+                if (omodel.HInterID == 0)
+                {
+                    omodel.HInterID = DBUtility.ClsPub.CreateBillID_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+                }
+
+                oCn.BeginTran();
+                //淇濆瓨鍓嶆帶鍒�
+                if (!BeforeSave(omodel.HInterID, omodel.HBillNo, 1, ref sReturn))
+                {
+                    oCn.RollBack();
+                    return false;
+                }
+                //涓昏〃
+                oCn.RunProc("Insert Into SB_EquipICMOTechParamBillMain   " +
+                "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
+                ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
+                ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType" +
+                ",HICMOInterID,HICMOEntryID,HICMOBillNo,HProcExchInterID,HProcExchEntryID,HProcExchBillNo" +
+                ",HProcNo,HMaterID,HProcID,HEmpID,HSourceID" +
+                ",HGroupID,HDeptID,HEquipID,HStockOrgID" +
+                ") " +
+                " 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.HMainSourceInterID.ToString() + "," + omodel.HMainSourceEntryID.ToString() + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'" +
+                ", " + omodel.HICMOInterID.ToString() + "," + omodel.HICMOEntryID.ToString() + ",'" + omodel.HICMOBillNo + "'," + omodel.HProcExchInterID.ToString() + "," + omodel.HProcExchEntryID.ToString() + ",'" + omodel.HProcExchBillNo + "'" +
+                ", " + omodel.HProcNo.ToString() + "," + omodel.HMaterID.ToString() + "," + omodel.HProcID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HSourceID.ToString() +
+                ", " + omodel.HGroupID.ToString() + "," + omodel.HDeptID.ToString() + "," + omodel.HEquipID.ToString() + "," + omodel.HSTOCKORGID.ToString() +
+                ") ");
+                //鎻掑叆瀛愯〃
+                foreach (Model.ClsSB_EquipICMOTechParamBillSub oSub in DetailColl)
+                {
+                    oCn.RunProc("Insert into SB_EquipICMOTechParamBillSub " +
+                      " (HInterID,HEntryID,HRemark,HRelationQty,HRelationMoney" +
+                      ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HBillNo_bak" +
+                      ",HTechParamID,HTechParamUnitID,HVaule,HStd,HMax,HMin,HResult" +
+                      ") values("
+                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+                      "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "','" + omodel.HBillNo + "'" +
+                      "," + oSub.HTechParamID.ToString() + "," + oSub.HTechParamUnitID.ToString() + ",'" + oSub.HVaule + "','" + oSub.HStd + "','" + oSub.HMax + "','" + oSub.HMin + "','" + oSub.HResult + "'" +
+                      ") ");
+                }
+                //淇濆瓨鍚庢帶鍒�
+                if (!AfterSave(omodel.HInterID, omodel.HBillNo, 1, ref sReturn))
+                {
+                    oCn.RollBack();
+                    return false;
+                }
+                sReturn = "鍗曟嵁鍙凤細" + omodel.HBillNo + " 鏂板鎴愬姛锛�";
+                oCn.Commit();
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                oCn.RollBack();
+                throw (e);
+            }
+        }
+        //鏄剧ず鍗曟嵁
+        public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
+        {
+            try
+            {
+                //鏌ヨ涓昏〃
+                DataSet Ds ;
+                Ds = oCn.RunProcReturn("Select * from SB_EquipICMOTechParamBillMain Where HInterID=" + lngBillKey.ToString(), "SB_EquipICMOTechParamBillMain");
+                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.HMainSourceBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMainSourceBillType"]);
+                omodel.HMainSourceInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMainSourceInterID"]);
+                omodel.HMainSourceEntryID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMainSourceEntryID"]);
+                omodel.HMainSourceBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMainSourceBillNo"]);
+                //========================================================
+                omodel.HICMOInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HICMOInterID"]);
+                omodel.HICMOEntryID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HICMOEntryID"]);
+                omodel.HICMOBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HICMOBillNo"]);
+                omodel.HProcExchInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HProcExchInterID"]);
+                omodel.HProcExchEntryID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HProcExchEntryID"]);
+                omodel.HProcExchBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HProcExchBillNo"]);
+                omodel.HProcNo = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HProcNo"]);
+                omodel.HMaterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMaterID"]);
+                omodel.HProcID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HProcID"]);
+                omodel.HEmpID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HEmpID"]);
+                omodel.HSourceID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSourceID"]);
+                omodel.HGroupID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HGroupID"]);
+                omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]);
+                omodel.HEquipID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HEquipID"]);
+                omodel.HSTOCKORGID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HStockOrgID"]);
+
+                //寰幆
+                DataSet DsSub ;
+                DsSub = oCn.RunProcReturn("Select * from SB_EquipICMOTechParamBillSub Where HInterID=" + lngBillKey.ToString() + "order by HEntryID", "SB_EquipICMOTechParamBillSub");
+                DetailColl.Clear();//娓呯┖
+                for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++)
+                {
+                    Model.ClsSB_EquipICMOTechParamBillSub oSub = new Model.ClsSB_EquipICMOTechParamBillSub();
+                    // 鍥哄畾璧嬪��===============================================
+                    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.HBillNo_bak = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HBillNo_bak"]);
+                    //===================================================
+                    oSub.HTechParamID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HTechParamID"]);
+                    oSub.HTechParamUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HTechParamUnitID"]);
+                    oSub.HVaule = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HVaule"]);
+                    oSub.HStd = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HStd"]);
+                    oSub.HMax = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HMax"]);
+                    oSub.HMin = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HMin"]);
+                    oSub.HResult = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HResult"]);
+                    DetailColl.Add(oSub);
+                }
+                sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
+                return true;
+            }
+            catch (Exception e)
+            {
+                sReturn = e.Message;
+                throw (e);
+            }
+        }
+       
+        
+    }
+
+}
diff --git "a/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBillSub.cs" "b/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBillSub.cs"
index 6d063f8..2f5c96f 100644
--- "a/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBillSub.cs"
+++ "b/DBUtility/\344\270\232\345\212\241\345\215\225\346\215\256/ClsXt_BaseBillSub.cs"
@@ -7,7 +7,8 @@
     public class ClsXt_BaseBillSub
     {
         public Int64 HInterID;
-        public Int64 HEntryID; 
+        public Int64 HEntryID;
+        public string HBillNo_bak;      //varchar(50)	--单据号(备份,以免内码丢失,找不到对应主表)
         //
         public string HCloseMan;         //行关闭
         public bool HCloseType;        //关闭类型
diff --git a/Model/Model.csproj b/Model/Model.csproj
index 02aa0ff..b2b2d6f 100644
--- a/Model/Model.csproj
+++ b/Model/Model.csproj
@@ -647,6 +647,8 @@
     <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsGy_FixCardBillMain.cs" />
     <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsGy_FixCardBillSub_Emp.cs" />
     <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipBeginBillMain.cs" />
+    <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSB_EquipICMOTechParamBillMain.cs" />
+    <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSB_EquipICMOTechParamBillSub.cs" />
     <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipStopBillMain.cs" />
     <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipBeginBillSub.cs" />
     <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipStopBillSub.cs" />
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSB_EquipICMOTechParamBillMain.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSB_EquipICMOTechParamBillMain.cs"
new file mode 100644
index 0000000..a3961b7
--- /dev/null
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSB_EquipICMOTechParamBillMain.cs"
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+    public class ClsSB_EquipICMOTechParamBillMain:DBUtility.ClsXt_BaseBillMain
+    {
+        public Int64 HICMOInterID;      //  int         //任务单内码
+        public Int64 HICMOEntryID;      //  int         //任务单子内码  
+        public string HICMOBillNo;      //  varchar(50) //任务单号
+        public Int64 HProcExchInterID;  //  int         //工序流转卡内码
+        public Int64 HProcExchEntryID;  //  int         //工序流转卡子内码
+        public string HProcExchBillNo;  //  varchar(50) //工序流转卡号
+        public Int64 HProcNo;           //  int         //工序流转卡流水号
+        public Int64 HMaterID;          //  int         //物料(Gy_Material)
+        public Int64 HProcID;           //  int 		//工序(Gy_Process)
+        public Int64 HEmpID;            //  int         //点检人(gy_employee)
+        public Int64 HSourceID;         //  int         //生产资源(Gy_Source) 
+        public Int64 HGroupID;          //  int         //生产班组(Gy_Group)
+        public Int64 HDeptID;           //  int         //生产车间(Gy_Department)							
+        public Int64 HEquipID;          //  int         //设备(Gy_EquipFileBillMain)
+
+    }
+}
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSB_EquipICMOTechParamBillSub.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSB_EquipICMOTechParamBillSub.cs"
new file mode 100644
index 0000000..4f93d45
--- /dev/null
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSB_EquipICMOTechParamBillSub.cs"
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+    public class ClsSB_EquipICMOTechParamBillSub : DBUtility.ClsXt_BaseBillSub
+    {
+        public Int64 HTechParamID;      //  int             //工艺参数
+        public Int64 HTechParamUnitID;  //  int             //工艺参数单位(Gy_TechnologyParameterUnit)
+        public string HVaule;           //  varchar(20)     //工艺参数值
+        public string HStd;             //  varchar(200)    //标准值
+        public string HMax;             //  varchar(200)    //上限
+        public string HMin;             //  varchar(200)    //下限
+        public string HResult;          //  varchar(50)     //检测结果(OK,NG)
+
+    }
+}
diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
index 43a78b6..6635690 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -441,36 +441,36 @@
                 //涓昏〃
 
                 LogService.Write($"5.绯荤粺鎺у埗鏌ヨ鍒ゆ柇锛岀敤鏃�" + sw.Elapsed);
-                ds = oCN.RunProcReturn("exec h_p_MES_StationOutBill_QtyCtrl " + HInterID + "", "h_p_MES_StationOutBill_QtyCtrl");
-                if (ds == null)
-                {
-                    oCN.RollBack();
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = "鍒ゆ柇鏁伴噺澶辫触锛�";
-                    objJsonResult.data = null;
-                    return objJsonResult;
-                }
-                LogService.Write($"5.1锛岀敤鏃�" + sw.Elapsed);
-                if (ds.Tables[0].Rows.Count == 0)
-                {
-                    oCN.RollBack();
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = "鍒ゆ柇鏁伴噺澶辫触锛�";
-                    objJsonResult.data = null;
-                    return objJsonResult;
-                }
-                LogService.Write($"5.2锛岀敤鏃�" + sw.Elapsed);
-                if (ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "2")
-                {
-                    oCN.RollBack();
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = "鏁伴噺鎺у埗," + ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
-                    objJsonResult.data = null;
-                    return objJsonResult;
-                }
+                //ds = oCN.RunProcReturn("exec h_p_MES_StationOutBill_QtyCtrl " + HInterID + "", "h_p_MES_StationOutBill_QtyCtrl");
+                //if (ds == null)
+                //{
+                //    oCN.RollBack();
+                //    objJsonResult.code = "0";
+                //    objJsonResult.count = 0;
+                //    objJsonResult.Message = "鍒ゆ柇鏁伴噺澶辫触锛�";
+                //    objJsonResult.data = null;
+                //    return objJsonResult;
+                //}
+                //LogService.Write($"5.1锛岀敤鏃�" + sw.Elapsed);
+                //if (ds.Tables[0].Rows.Count == 0)
+                //{
+                //    oCN.RollBack();
+                //    objJsonResult.code = "0";
+                //    objJsonResult.count = 0;
+                //    objJsonResult.Message = "鍒ゆ柇鏁伴噺澶辫触锛�";
+                //    objJsonResult.data = null;
+                //    return objJsonResult;
+                //}
+                //LogService.Write($"5.2锛岀敤鏃�" + sw.Elapsed);
+                //if (ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) == "2")
+                //{
+                //    oCN.RollBack();
+                //    objJsonResult.code = "0";
+                //    objJsonResult.count = 0;
+                //    objJsonResult.Message = "鏁伴噺鎺у埗," + ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+                //    objJsonResult.data = null;
+                //    return objJsonResult;
+                //}
                 LogService.Write($"6.鍒ゆ柇缁撴潫锛岀敤鏃�" + sw.Elapsed);
                 oCN.RunProc("exec h_p_Mes_ProcessExchangeRelationQty_Out " + HInterID + ","+ num + "");
                 LogService.Write($"6.1锛岀敤鏃�" + sw.Elapsed);
@@ -2665,6 +2665,19 @@
                 {
                 }
 
+                DataSet dataSet = oCN.RunProcReturn(@"select a.HProcExchBillNo,a.HQty,b.HQty HProcExchQty  from Sc_StationOutBillMain a
+inner join Sc_ProcessExchangeBillMain b on a.HProcExchInterID = b.HInterID
+where a.HInterID = " + lngBillKey, "Sc_ProcessExchangeBillMain");
+
+                if (dataSet.Tables[0].Rows.Count > 0)
+                {
+                    string HProcExchBillNo = dataSet.Tables[0].Rows[0]["HProcExchBillNo"].ToString();
+                    double HQty = double.Parse(dataSet.Tables[0].Rows[0]["HQty"].ToString());
+                    double HProcExchQty = double.Parse(dataSet.Tables[0].Rows[0]["HProcExchQty"].ToString());
+
+                    LogService.Write("鍑虹珯鍗曟嵁瀹℃牳鏇存敼娴佽浆鍗℃暟閲�,娴佽浆鍗�:" + HProcExchBillNo + ",鍑虹珯鍗曞彿锛�" + HBillNo + ",鍘熸祦杞崱鏁伴噺:" + HProcExchQty + ",鏂版祦杞崱鏁伴噺:" + HQty);
+                }
+
                 //瀹℃牳鍚庢帶鍒�
                 string sql = "exec h_p_Sc_StationOutBill_AfterCheckCtrl " + lngBillKey + ",'" + HBillNo + "','" + CurUserName + "'";
                 ds = oCN.RunProcReturn(sql, "h_p_Sc_StationOutBill_AfterCheckCtrl");
@@ -2680,6 +2693,7 @@
                     oCN.RollBack();
                     return false;
                 }
+               
 
                 sReturn = sReturn + " 瀹℃牳鍔熻兘锛�";
                 oCN.Commit();
diff --git a/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs b/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
index 4a5c1dc..66abec4 100644
--- a/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
+++ b/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
@@ -16,6 +16,15 @@
     public class Sc_ProcessExchangeBillController : ApiController
     {
         public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+        public const string ModName = "3772";                   //鍗曟嵁绫诲瀷
+        public const string ModCaption = "宸ュ簭娴佽浆鍗�";          //鍗曟嵁鍚嶇О
+        public const string ModRightName = "Sc_ProcessExchangeBill";
+        public const string ModRightNameList = ModRightName + "List";       //鍒楄〃
+        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";      //鍒犻櫎
         private json objJsonResult = new json();
         SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
         DataSet ds;
@@ -1902,5 +1911,59 @@
         }
         #endregion
 
+
+        #region 宸ュ簭娴佽浆鍗″垪琛�
+        /// <summary>
+        /// 鑾峰彇宸ュ簭娴佽浆鍗″垪琛ㄤ俊鎭�
+        /// </summary>
+        /// <returns></returns>
+        [Route("Sc_ProcessExchangeBillController/GetSc_ProcessExchangeBillList_Json")]
+        [HttpGet]
+        public object GetSc_ProcessExchangeBillList_Json(string sWhere, string HMaker, string OperationType, string ViewName)
+        {
+            try
+            {
+                //鍒ゆ柇鏉冮檺
+                if (OperationType == "1")
+                {
+                    //鍒ゆ柇鏉冮檺
+                    if (!DBUtility.ClsPub.Security_Log(ModRightNameList, 3, false, HMaker))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                //杩斿洖鍒楄〃淇℃伅
+                ds = oCN.RunProcReturn("select * from " + ViewName + " where 1=1 " + sWhere + " order by hmainid desc", ViewName);
+                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
+
     }
 }
\ No newline at end of file
diff --git a/WebAPI/Controllers/SBGL/SB_EquipICMOTechParamBillController.cs b/WebAPI/Controllers/SBGL/SB_EquipICMOTechParamBillController.cs
new file mode 100644
index 0000000..84c4be6
--- /dev/null
+++ b/WebAPI/Controllers/SBGL/SB_EquipICMOTechParamBillController.cs
@@ -0,0 +1,786 @@
+锘縰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 SB_EquipICMOTechParamBillController : ApiController
+    {
+        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+        public const string ModName = "3919";                   //鍗曟嵁绫诲瀷
+        public const string ModCaption = "璁惧宸ヨ壓鍙傛暟璁㈠崟鐐规琛�";          //鍗曟嵁鍚嶇О
+        public const string ModRightName = "SB_EquipICMOTechParamBill";
+        public const string ModRightNameList = ModRightName + "List";       //鍒楄〃
+        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.ClsSB_EquipICMOTechParamBill oBill = new DAL.ClsSB_EquipICMOTechParamBill();
+
+
+        #region 璁惧宸ヨ壓鍙傛暟璁㈠崟鐐规琛ㄥ垪琛ㄤ俊鎭�
+        /// <summary>
+        /// 鑾峰彇璁惧宸ヨ壓鍙傛暟璁㈠崟鐐规琛ㄥ垪琛ㄤ俊鎭�
+        /// </summary>
+        /// <returns></returns>
+        [Route("SB_EquipICMOTechParamBillController/GetSB_EquipICMOTechParamBillList_Json")]
+        [HttpGet]
+        public object GetSB_EquipICMOTechParamBillList_Json(string sWhere, string HMaker, string OperationType, string ViewName)
+        {
+            try
+            {
+                //鍒ゆ柇鏉冮檺
+                if (OperationType == "1")
+                {
+                    //鍒ゆ柇鏉冮檺
+                    if (!DBUtility.ClsPub.Security_Log(ModRightNameList, 3, false, HMaker))
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                //杩斿洖鍒楄〃淇℃伅
+                ds = oCn.RunProcReturn("select * from " + ViewName + " where 1=1 " + sWhere + " order by hmainid desc", ViewName);
+                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("SB_EquipICMOTechParamBillController/GetSB_EquipICMOTechParamBill_Delete_Json")]
+        [HttpGet]
+        public object GetSB_EquipICMOTechParamBill_Delete_Json(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 s = "";
+                    int sYear = 0;
+                    int sPeriod = 0;
+                    if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oBill.omodel.HDate, ref sYear, ref sPeriod, ref s) == false)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = s;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    //鍒犻櫎鍓嶆帶鍒�
+                    DataSet BeforeDs = oCn.RunProcReturn("Exec h_p_SB_EquipICMOTechParamBill_BeforeDelCtrl " + HInterID.ToString() + ",'" + HMaker + "'", "h_p_SB_EquipICMOTechParamBill_BeforeDelCtrl");
+                    if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "鍒犻櫎鍓嶅垽鏂け璐ワ紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍒犻櫎澶辫触锛�" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]);
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    //鍒犻櫎鍗曟嵁锛堝寘鍚垹闄ゅ悗鎺у埗銆佸啓鍏ユ棩蹇楋級
+                    if (!oBill.DeleteBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_SB_EquipICMOTechParamBill_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("SB_EquipICMOTechParamBillController/GetSB_EquipICMOTechParamBill_Check_Json")]
+        [HttpGet]
+        public object GetSB_EquipICMOTechParamBill_Check_Json(Int64 HInterID, int Type, 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;
+                }
+
+                //鍒ゆ柇瀛樺湪鎬�
+                if (oBill.ShowBill(HInterID, ref DBUtility.ClsPub.sExeReturnInfo))
+                {
+                    //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
+                    string s = "";
+                    int sYear = 0;
+                    int sPeriod = 0;
+                    if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oBill.omodel.HDate, ref sYear, ref sPeriod, ref s) == false)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = s;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+
+                    //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.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;
+                        }
+                        //瀹℃牳鍓嶆帶鍒�
+                        DataSet BeforeDs = oCn.RunProcReturn("Exec h_p_SB_EquipICMOTechParamBill_BeforeCheckCtrl " + HInterID.ToString() + ",'" + HMaker + "'", "h_p_SB_EquipICMOTechParamBill_BeforeCheckCtrl");
+                        if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "瀹℃牳鍓嶅垽鏂け璐ワ紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1)
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "瀹℃牳澶辫触锛�" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]);
+                                objJsonResult.data = null;
+                                return objJsonResult;
+                            }
+                        }
+                        //瀹℃牳鍗曟嵁
+                        if (!oBill.CheckBill(HInterID, oBill.omodel.HBillNo, "h_p_SB_EquipICMOTechParamBill_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;
+                        }
+                        //鍙嶅鏍稿墠鎺у埗
+                        DataSet BeforeDs = oCn.RunProcReturn("Exec h_p_SB_EquipICMOTechParamBill_BeforeUnCheckCtrl " + HInterID.ToString() + ",'" + HMaker + "'", "h_p_SB_EquipICMOTechParamBill_BeforeUnCheckCtrl");
+                        if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鍙嶅鏍稿墠鍒ゆ柇澶辫触锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1)
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "鍙嶅鏍稿け璐ワ紒" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]);
+                                objJsonResult.data = null;
+                                return objJsonResult;
+                            }
+                        }
+
+                        //鍙嶅鏍稿崟鎹�
+                        if (!oBill.AbandonCheck(HInterID, oBill.omodel.HBillNo, "h_p_SB_EquipICMOTechParamBill_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("SB_EquipICMOTechParamBillController/GetSB_EquipICMOTechParamBill_Close_Json")]
+        [HttpGet]
+        public object GetSB_EquipICMOTechParamBill_Close_Json(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))
+                {
+                    //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
+                    string s = "";
+                    int sYear = 0;
+                    int sPeriod = 0;
+                    if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oBill.omodel.HDate, ref sYear, ref sPeriod, ref s) == false)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = s;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+
+                    //Type 1 鍏抽棴  2  鍙嶅叧闂�
+                    if (Type == 1)
+                    {
+                        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 = "鍗曟嵁鍙凤細" + oBill.omodel.HBillNo + " 鍏抽棴鎴愬姛锛�";
+                            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 = "鍗曟嵁鍙凤細" + 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("SB_EquipICMOTechParamBillController/GetSB_EquipICMOTechParamBill_Cancelltion_Json")]
+        [HttpGet]
+        public object GetSB_EquipICMOTechParamBill_Cancelltion_Json(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))
+                {
+                    //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
+                    string s = "";
+                    int sYear = 0;
+                    int sPeriod = 0;
+                    if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oBill.omodel.HDate, ref sYear, ref sPeriod, ref s) == false)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = s;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+
+                    //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.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 = "鍗曟嵁鍙凤細" + oBill.omodel.HBillNo + " 浣滃簾鎴愬姛锛�";
+                            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 = "鍗曟嵁鍙凤細" + 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>
+        /// 璁惧宸ヨ壓鍙傛暟璁㈠崟鐐规琛ㄧ紪杈戞椂锛屾牴鎹崟鎹甀D鑾峰彇鍗曟嵁淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("SB_EquipICMOTechParamBillController/GetSB_EquipICMOTechParamBill_Json")]
+        [HttpGet]
+        public object GetSB_EquipICMOTechParamBill_Json(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("exec h_p_SB_EquipICMOTechParamBill_EditInit " + HInterID, "h_p_SB_EquipICMOTechParamBill_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 = "0";
+                    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 璁惧宸ヨ壓鍙傛暟璁㈠崟鐐规琛ㄤ繚瀛�
+        /// <summary>
+        /// 璁惧宸ヨ壓鍙傛暟璁㈠崟鐐规琛ㄤ繚瀛�
+        /// </summary>
+        [Route("SB_EquipICMOTechParamBillController/GetSB_EquipICMOTechParamBill_Save_Json")]
+        [HttpPost]
+        public object GetSB_EquipICMOTechParamBill_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.ClsSB_EquipICMOTechParamBillMain> lsmain = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSB_EquipICMOTechParamBillMain>>(sMainStr);
+                foreach (Model.ClsSB_EquipICMOTechParamBillMain 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(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.ClsSB_EquipICMOTechParamBillSub> ls = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSB_EquipICMOTechParamBillSub>>(sSubStr);
+                int i = 0;
+                foreach (Model.ClsSB_EquipICMOTechParamBillSub oItemSub in ls)
+                {
+                    i++;
+                    oItemSub.HEntryID = i;
+                    oItemSub.HSourceInterID = oBill.omodel.HMainSourceInterID;
+                    oItemSub.HSourceEntryID = oBill.omodel.HMainSourceEntryID;
+                    oItemSub.HSourceBillNo = oBill.omodel.HMainSourceBillNo;
+                    oItemSub.HSourceBillType = oBill.omodel.HMainSourceBillType;
+                    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
+
+
+
+
+    }
+}
\ No newline at end of file
diff --git a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
index 89983c8..66a1b09 100644
--- a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
@@ -396,7 +396,7 @@
                 if (sWhere == null || sWhere.Equals(""))
                 {
                     string sql = "select * from h_v_OA_ErrMsgBackBillList order by 鍗曟嵁鍙� desc";
-                    ds = oCN.RunProcReturn(sql, "p_v_OA_ErrMsgBackBillList");
+                    ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackBillList");
                 }
                 else
                 {
@@ -518,10 +518,12 @@
                                         A.HReceiveMan,A.HCopyMan,A.HHasten,
                                         A.HLevel,A.HMaterName,A.HMaterModel,
                                         B.HReadFlag, A.HMaker,A.HMakeDate,A.HUpDater,A.HUpDateDate,A.HChecker,A.HCheckDate,A.HCloseMan,A.HCloseDate,A.HDeleteMan,A.HDeleteDate,
-                                        A.HSourceInterID,A.HSourceEntryID,A.HSourceBillNo,A.HSourceBillType
+                                        A.HSourceInterID,A.HSourceEntryID,A.HSourceBillNo,A.HSourceBillType,
+										A.HHandleEmpID,f.HName HHandleEmpName
                                         from OA_ErrMsgBackBillMain A 
                                         inner join  OA_ErrMsgBackBillSub2 B on A.HInterID=B.HInterID 
                                         left join Gy_Department D on A.HDeptID=D.HItemID
+										left join Gy_Employee f on A.HHandleEmpID=f.HItemID 
                                         where A.HInterID='" + HID + "' and b.HEntryID='" + HEntryID + "'");
             var dataSet = oCN.RunProcReturn(sql, "OA_ErrMsgBackBillMain");
             if (dataSet == null || dataSet.Tables[0].Rows.Count == 0)
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 6a9b65a..63e66fe 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"
@@ -7011,6 +7011,37 @@
             }
         }
         #endregion
+
+        #region 鏈熷垵搴撳瓨鎶ヨ〃
+        /// <summary>
+        /// 浠撳簱鏀跺彂瀛樻姤琛�
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/UpdateKf_ICInvBal")]
+        [HttpGet]
+        public object UpdateKf_ICInvBal( )
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_KF_ICinventory ", "h_p_KF_ICinventory");
+
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鏍″鎴愬姛锛�";
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
         #endregion
 
 
diff --git a/WebAPI/DLL/ClsOA_ErrMsgBackBill.cs b/WebAPI/DLL/ClsOA_ErrMsgBackBill.cs
index 397b06f..42bf431 100644
--- a/WebAPI/DLL/ClsOA_ErrMsgBackBill.cs
+++ b/WebAPI/DLL/ClsOA_ErrMsgBackBill.cs
@@ -67,6 +67,7 @@
                 ",HQty=" + omodel.HQty.ToString() +
                 ",HRecDeptID=" + omodel.HRecDeptID.ToString() +
                 ",HMaterNumber='" + omodel.HMaterNumber + "'" +
+                ",HHandleEmpID=" + omodel.HHandleEmpID.ToString() +
 
                 " where HInterID=" + lngBillKey.ToString());
                 //鍒犻櫎鍏宠仈
@@ -137,7 +138,7 @@
                 ",HContext,HDeptID,HDescription,HSendMan,HReceiveMan" +
                 ",HCopyMan,HHasten,HLevel,HReTransmitMan,HBillTypeName"+
                 ",HPlanBillNo,HMaterName,HMaterModel,HQty,HSendType"+
-                ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRecDeptID,HMaterNumber,HErrMsgBackTypeID" +
+                ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRecDeptID,HMaterNumber,HErrMsgBackTypeID,HHandleEmpID" +
                 ") " +
                 " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
                 "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
@@ -145,7 +146,7 @@
                 ",'" + omodel.HCopyMan + "'," + omodel.HHasten.ToString() + ",'" + omodel.HLevel + "','" + omodel.HReTransmitMan + "','" + omodel.HBillTypeName + "'" +
                 ",'" + omodel.HPlanBillNo + "','" + omodel.HMaterName + "','" + omodel.HMaterModel + "'," + omodel.HQty.ToString() + ",'" + omodel.HSendType + "'" +
                 ",'" + omodel.HMainSourceInterID + "','" + omodel.HMainSourceEntryID + "','" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'" +
-                "," + omodel.HRecDeptID + ",'" + omodel.HMaterNumber + "'," + omodel.HErrMsgBackTypeID +
+                "," + omodel.HRecDeptID + ",'" + omodel.HMaterNumber + "'," + omodel.HErrMsgBackTypeID +", " + omodel.HHandleEmpID +
                 ") ");
                 //鎻掑叆瀛愯〃
                 //foreach (Models.ClsOA_ErrMsgBackBillSub oSub in DetailColl)
diff --git a/WebAPI/Models/ClsOA_ErrMsgBackBillMain.cs b/WebAPI/Models/ClsOA_ErrMsgBackBillMain.cs
index 885dea0..98be88a 100644
--- a/WebAPI/Models/ClsOA_ErrMsgBackBillMain.cs
+++ b/WebAPI/Models/ClsOA_ErrMsgBackBillMain.cs
@@ -27,5 +27,7 @@
         public Int64 HRecDeptID;//     int      --接收部门
 
         public Int64 HErrMsgBackTypeID; //异常类型
+
+        public Int64 HHandleEmpID; //指派处理人
     }
 }
diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile12.pubxml.user b/WebAPI/Properties/PublishProfiles/FolderProfile12.pubxml.user
index c4bdfa9..79c6e56 100644
--- a/WebAPI/Properties/PublishProfiles/FolderProfile12.pubxml.user
+++ b/WebAPI/Properties/PublishProfiles/FolderProfile12.pubxml.user
@@ -4,7 +4,7 @@
 -->
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
-    <History>True|2024-06-17T05:22:25.8401219Z;True|2024-06-17T11:27:09.9223091+08:00;True|2024-06-17T11:23:37.5133763+08:00;True|2024-06-17T10:58:43.2727797+08:00;True|2024-06-14T13:32:57.5800980+08:00;False|2024-06-13T10:45:10.1375417+08:00;False|2024-06-13T10:43:52.8804222+08:00;</History>
+    <History>True|2024-06-18T08:08:52.3066991Z;True|2024-06-18T14:08:42.6969999+08:00;True|2024-06-17T13:22:25.8401219+08:00;True|2024-06-17T11:27:09.9223091+08:00;True|2024-06-17T11:23:37.5133763+08:00;True|2024-06-17T10:58:43.2727797+08:00;True|2024-06-14T13:32:57.5800980+08:00;False|2024-06-13T10:45:10.1375417+08:00;False|2024-06-13T10:43:52.8804222+08:00;</History>
     <_PublishTargetUrl>D:\缃戠珯鍙戝竷\鏅轰簯MESWMS\API</_PublishTargetUrl>
   </PropertyGroup>
   <ItemGroup>
@@ -18,28 +18,28 @@
       <publishTime>02/22/2013 16:43:40</publishTime>
     </File>
     <File Include="bin/BLL.dll">
-      <publishTime>06/17/2024 13:22:14</publishTime>
+      <publishTime>06/18/2024 16:08:23</publishTime>
     </File>
     <File Include="bin/BLL.pdb">
-      <publishTime>06/17/2024 13:22:14</publishTime>
+      <publishTime>06/18/2024 16:08:23</publishTime>
     </File>
     <File Include="bin/BouncyCastle.Crypto.dll">
       <publishTime>12/18/2020 05:32:28</publishTime>
     </File>
     <File Include="bin/DAL.dll">
-      <publishTime>06/17/2024 13:22:13</publishTime>
+      <publishTime>06/18/2024 16:08:22</publishTime>
     </File>
     <File Include="bin/DAL.pdb">
-      <publishTime>06/17/2024 13:22:13</publishTime>
+      <publishTime>06/18/2024 16:08:22</publishTime>
     </File>
     <File Include="bin/Dapper.dll">
       <publishTime>07/22/2016 22:52:40</publishTime>
     </File>
     <File Include="bin/DBUtility.dll">
-      <publishTime>06/17/2024 13:22:10</publishTime>
+      <publishTime>06/18/2024 16:08:19</publishTime>
     </File>
     <File Include="bin/DBUtility.pdb">
-      <publishTime>06/17/2024 13:22:10</publishTime>
+      <publishTime>06/18/2024 16:08:19</publishTime>
     </File>
     <File Include="bin/Grpc.Core.Api.dll">
       <publishTime>03/22/2022 13:17:26</publishTime>
@@ -84,10 +84,10 @@
       <publishTime>07/25/2012 19:48:56</publishTime>
     </File>
     <File Include="bin/Model.dll">
-      <publishTime>06/17/2024 13:22:11</publishTime>
+      <publishTime>06/18/2024 16:08:20</publishTime>
     </File>
     <File Include="bin/Model.pdb">
-      <publishTime>06/17/2024 13:22:11</publishTime>
+      <publishTime>06/18/2024 16:08:20</publishTime>
     </File>
     <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
       <publishTime>05/25/2024 09:46:41</publishTime>
@@ -120,25 +120,25 @@
       <publishTime>10/23/2021 17:07:54</publishTime>
     </File>
     <File Include="bin/Pub_Class.dll">
-      <publishTime>06/17/2024 13:22:09</publishTime>
+      <publishTime>06/18/2024 16:08:17</publishTime>
     </File>
     <File Include="bin/Pub_Class.pdb">
-      <publishTime>06/17/2024 13:22:09</publishTime>
+      <publishTime>06/18/2024 16:08:17</publishTime>
     </File>
     <File Include="bin/Pub_Control.dll">
-      <publishTime>06/17/2024 13:22:10</publishTime>
+      <publishTime>06/18/2024 16:08:19</publishTime>
     </File>
     <File Include="bin/Pub_Control.pdb">
-      <publishTime>06/17/2024 13:22:10</publishTime>
+      <publishTime>06/18/2024 16:08:19</publishTime>
     </File>
     <File Include="bin/RestSharp.dll">
       <publishTime>08/31/2012 06:22:50</publishTime>
     </File>
     <File Include="bin/SQLHelper.dll">
-      <publishTime>06/17/2024 13:22:10</publishTime>
+      <publishTime>06/18/2024 16:08:19</publishTime>
     </File>
     <File Include="bin/SQLHelper.pdb">
-      <publishTime>06/17/2024 13:22:10</publishTime>
+      <publishTime>06/18/2024 16:08:19</publishTime>
     </File>
     <File Include="bin/Swashbuckle.Core.dll">
       <publishTime>02/16/2015 01:57:08</publishTime>
@@ -246,10 +246,10 @@
       <publishTime>11/24/2014 19:18:48</publishTime>
     </File>
     <File Include="bin/WebAPI.dll">
-      <publishTime>06/17/2024 13:22:18</publishTime>
+      <publishTime>06/18/2024 16:08:27</publishTime>
     </File>
     <File Include="bin/WebAPI.pdb">
-      <publishTime>06/17/2024 13:22:18</publishTime>
+      <publishTime>06/18/2024 16:08:27</publishTime>
     </File>
     <File Include="bin/WebGrease.dll">
       <publishTime>07/18/2013 01:03:52</publishTime>
@@ -444,7 +444,7 @@
       <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web.config">
-      <publishTime>06/17/2024 13:22:24</publishTime>
+      <publishTime>06/18/2024 16:08:51</publishTime>
     </File>
   </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/WebAPI/Web.config b/WebAPI/Web.config
index 0824486..c32c903 100644
--- a/WebAPI/Web.config
+++ b/WebAPI/Web.config
@@ -35,7 +35,7 @@
 		<!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/> -->	<!--娴嬭瘯鏈嶅姟鍣�-->
 		<!--<add key="surl" value="http://localhost:8082/webs/webservice1.asmx"/>    鏈湴-->
 		<!--<add key="sUrl" value="http://192.168.110.57:81/WEBS/WebService1.asmx"/>-->	<!--闄堥洴闈欐湰鍦伴厤缃�-->
-		<add key="surl" value="http://localhost/webs-web/webservice1.asmx"/>	<!--缈佹稕娑涙湰鍦伴厤缃�-->
+		<!--<add key="surl" value="http://localhost/webs-web/webservice1.asmx"/>-->	<!--缈佹稕娑涙湰鍦伴厤缃�-->
 		<!--<add key="sUrl" value="http://192.168.1.57:8082/WEBS-WMS/WebService1.asmx"/>涔濊彵-->
 		<!--<add key="sUrl" value="http://61.130.182.102:18181/WEBSCS/WebService1.asmx"/>--><!--鏂帿灏�-->
 		
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index ab9605e..6ec29e6 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -425,6 +425,7 @@
     <Compile Include="Controllers\PlateBindingController.cs" />
     <Compile Include="Controllers\SBGL\Gy_FixCardChangeBillController.cs" />
     <Compile Include="Controllers\SBGL\Gy_FixCardBillController.cs" />
+    <Compile Include="Controllers\SBGL\SB_EquipICMOTechParamBillController.cs" />
     <Compile Include="Controllers\SBGL\Sb_EquipBeginBillController.cs" />
     <Compile Include="Controllers\SBGL\Sb_EquipStopBillController.cs" />
     <Compile Include="Controllers\SBGL\Sb_EquipConkBookBillController.cs" />

--
Gitblit v1.9.1