From 1a2734038b281dc3f521569a3169ea053d64ff59 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 11 十月 2024 13:14:50 +0800
Subject: [PATCH] 1

---
 PayM/obj/Debug/PayM.Pay_OutApplyBillList.resources                             |    0 
 PayM/obj/Debug/PayM.Pay_OverApplyBill.resources                                |    0 
 WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs                            |  658 +++
 PayM/obj/Debug/PayM.Pay_OutApplyBill.resources                                 |    0 
 WebAPI/WebAPI.csproj.user                                                      |    2 
 Model/obj/x86/Release/Model.csproj.AssemblyReference.cache                     |    0 
 PayM/obj/Debug/PayM.Pay_PayMentYearReport.resources                            |    0 
 WebAPI/Controllers/BaseSet/Gy_DepartmentController.cs                          |  242 +
 WebAPI/Controllers/CJGL/Gy_MaterPreventErrMouldBillController.cs               |   57 
 DAL/生产管理/模具管理/ClsSc_MouldMaintainBill.cs                                       |    7 
 WarM/条码打印/Kf_WeighToBarCode.resx                                               |   12 
 WebAPI/Controllers/数据同步/钉钉同步/DD_DataSynchronizationController.cs               |  290 +
 WebAPI/Controllers/SBGL/SBBB/Sb_EquipMentCollectionTechParam_TempController.cs |    5 
 PayM/obj/Debug/PayM.Pay_ErrWorkTimesSendBillList.resources                     |    0 
 PayM/bin/Debug/Pub_Class.dll                                                   |    0 
 PayM/obj/Debug/PayM.Pay_PayMentDeptYearReport.resources                        |    0 
 WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs                    |   58 
 WebAPI/Models/ClsOA_ErrMsgBackBillMain.cs                                      |    1 
 WebAPI/Properties/PublishProfiles/FolderProfile10.pubxml.user                  |  201 
 PayM/obj/Debug/PayM.HR_WorkStoryBillList.resources                             |    0 
 PayM/obj/Debug/PayM.Pay_OtherBalBillList.resources                             |    0 
 PayM/obj/Debug/PayM.dll                                                        |    0 
 WebAPI/Controllers/MJGL/Sc_MouldReportController.cs                            |   49 
 PayM/obj/Debug/AxInterop.gregn6Lib.dll                                         |    0 
 PayM/obj/Debug/PayM.HR_InsuranceBookBillList.resources                         |    0 
 LMES/obj/x86/Release/LMES.csproj.AssemblyReference.cache                       |    0 
 PayM/obj/Debug/PayM.HR_PaperPhotoBill.resources                                |    0 
 PayM/obj/Debug/PayM.HR_WorkInjuryBillList.resources                            |    0 
 WebAPI/Controllers/CJGL/Cj_SingleStationController.cs                          |   67 
 Model/生产管理/模具管理/ClsSb_MouldRepairWorkBillMain.cs                               |    1 
 PayM/obj/Debug/PayM.pdb                                                        |    0 
 Model/生产管理/模具管理/ClsSc_MouldMaintainPlanBillSub_Plan.cs                         |   22 
 PayM/obj/Debug/PayM.HR_WorkSkillBillList.resources                             |    0 
 PayM/obj/Debug/PayM.Pay_OverApplyBillList.resources                            |    0 
 Model/生产管理/模具管理/ClsSc_MouldMaintainBillMain.cs                                 |    4 
 PayM/obj/Debug/PayM.csproj.ResolveComReference.cache                           |    0 
 WebAPI/Web.config                                                              |   13 
 WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs                   |   52 
 PayM/obj/Debug/PayM.HR_EmpDimissionBill.resources                              |    0 
 WebAPI/Controllers/品质管理/首件检验单/QC_FirstPieceCheckBillController.cs              |    1 
 PayM/bin/Debug/Pub_Class.pdb                                                   |    0 
 PayM/obj/Debug/PayM.Pay_MonthSubsidyYearReport.resources                       |    0 
 PayM/obj/Debug/PayM.Pay_OtherBalBill.resources                                 |    0 
 PayM/obj/Debug/PayM.Pay_ErrWorkTimesRequestBill.resources                      |    0 
 PayM/obj/Debug/PayM.Pay_SingleBalBill.resources                                |    0 
 WebAPI/Controllers/BaseSet/Gy_GroupController.cs                               |   13 
 Model/obj/Release/Model.csproj.AssemblyReference.cache                         |    0 
 WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs                            |    9 
 WebAPI/Controllers/BaseSet/Gy_QCCheckClassController.cs                        |   79 
 PayM/obj/Debug/PayM.HR_WorkSkillBill.resources                                 |    0 
 PayM/obj/Debug/PayM.HR_LearnHistoryBill.resources                              |    0 
 Model/生产管理/模具管理/ClsSc_MouldMaintainRuleBillMain.cs                             |    1 
 DAL/生产管理/模具管理/ClsSc_MouldMaintainPlanBill.cs                                   |   26 
 WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs                          |  582 +++
 PayM/obj/Debug/PayM.HR_FamilyMemberBillList.resources                          |    0 
 WebAPI/Controllers/品质管理/工序检验单/QC_ProcessCheckBillController.cs                 |    1 
 WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs                         |   11 
 PayM/obj/Debug/PayM.Pay_GetNeedCheckErrWorkTimesSendBillList.resources         |    0 
 WebAPI/Controllers/品质管理/巡检单/QC_PatrolProcCheckOtherBillController.cs           |    9 
 WebAPI/Models/ClsSb_EquipRepairWorkBillMain.cs                                 |    6 
 SyntacticSugar/bin/Debug/SyntacticSugar.pdb                                    |    0 
 DAL/计划管理/ClsGy_RoutingBill.cs                                                  |    4 
 PayM/bin/Debug/DBUtility.dll                                                   |    0 
 SyntacticSugar/obj/Debug/SyntacticSugar.dll                                    |    0 
 PayM/obj/Debug/PayM.Pay_MonthSubsidyEntryBillReportMX.resources                |    0 
 Model/质检管理/ClsQC_MonthTarGetBillMain.cs                                        |    1 
 PayM/obj/Debug/PayM.HR_PaperPhotoBillList.resources                            |    0 
 PayM/obj/Debug/PayM.Pay_SubsidyChangeBillList.resources                        |    0 
 PayM/obj/Debug/PayM.HR_FamilyMemberBill.resources                              |    0 
 SyntacticSugar/bin/Debug/SyntacticSugar.dll                                    |    0 
 PayM/obj/Debug/PayM.Pay_ProdWorkQtySumReport.resources                         |    0 
 WebAPI/Utility/TreeUtil.cs                                                     |   74 
 PayM/obj/Debug/PayM.Pay_WorkTimesBillList.resources                            |    0 
 WebAPI/Models/QueryModel.cs                                                    |   21 
 WebAPI/Models/Query/QueryModel.cs                                              |   23 
 WebAPI/Controllers/Sc_MouldRepairInBillListController.cs                       |   33 
 WebAPI/Controllers/WebAPIController.cs                                         | 1855 ++++++++++
 PayM/obj/Debug/PayM.Pay_WorkTimesCardBillList.resources                        |    0 
 PayM/obj/Debug/PayM.HR_RewardsPunishBill.resources                             |    0 
 PayM/obj/Debug/PayM.Pay_SingleBalBill_KS.resources                             |    0 
 WebAPI/Controllers/基础资料/基础资料/Gy_DisposeWayController.cs                        |  279 +
 WebAPI/Controllers/BaseSet/Gy_CustomerController.cs                            |  116 
 SyntacticSugar/obj/Debug/SyntacticSugar.pdb                                    |    0 
 Model/生产管理/模具管理/ClsSc_MouldMaintainPlanBillMain.cs                             |    1 
 PayM/bin/Debug/DBUtility.pdb                                                   |    0 
 PayM/obj/Debug/PayM.Pay_PayMentBillList.resources                              |    0 
 PayM/obj/Debug/PayM.Pay_MonthWriteBillReportMX.resources                       |    0 
 WarM/条码打印/Kf_WeighToBarCode.designer.cs                                        |  467 +-
 Model/质检管理/ClsQC_WorkSelfCheckBillSub.cs                                       |    2 
 PayM/bin/Debug/BLL.pdb                                                         |    0 
 WebAPI/Controllers/LMESController.cs                                           |   55 
 PayM/obj/Debug/PayM.HR_EmpChangeBill.resources                                 |    0 
 PayM/obj/Debug/PayM.csproj.GenerateResource.Cache                              |    0 
 WebAPI/Controllers/CJGL/Sc_KeyElementBindingController.cs                      |   36 
 Model/质检管理/ClsQC_TakeSampleCheckBillMain.cs                                    |    1 
 PayM/obj/Debug/PayM.Pay_GroupBalBillList.resources                             |    0 
 PayM/obj/Debug/PayM.Pay_PayMentDayBill.resources                               |    0 
 PayM/bin/Debug/BLL.dll                                                         |    0 
 PayM/obj/Debug/PayM.Pay_MonthWriteBillReport.resources                         |    0 
 PayM/obj/Debug/PayM.HR_InsuranceBookBill.resources                             |    0 
 DAL/质检管理/ClsQC_PatrolProcCheckOtherBill.cs                                     |    5 
 Pub_Class/CustomerCls/ClsXt_SystemParameter.cs                                 |   24 
 WebAPI/Controllers/工资管理/Pay_ProcPriceRequestBillController.cs                  |  626 +++
 PayM/obj/Debug/PayM.Pay_CarOutApplyBill.resources                              |    0 
 SyntacticSugar/constant/EmptyConstant.cs                                       |   16 
 PayM/obj/Debug/OAM.HR_EmpEngageRequestBill.resources                           |    0 
 Model/采购管理/ClsCg_POOrderBillMain.cs                                            |    2 
 WebAPI/Controllers/CJGL/Cj_StationInBillController.cs                          |    4 
 PayM/obj/Debug/PayM.HR_WorkInjuryBill.resources                                |    0 
 LMES/LMES.csproj                                                               |    2 
 WebAPI/DLL/ClsGy_Material_Ctl.cs                                               |    1 
 WebAPI/WebBLL/JCJM/GYZL/Gy_CustomerService.cs                                  |   25 
 WebAPI/Controllers/基础资料/工资基础资料/Gy_WorkTypeController.cs                        |  295 +
 PayM/bin/Debug/Interop.gregn6Lib.dll                                           |    0 
 WebAPI/Controllers/CKGL/TMZD/Gy_BarCodeBillListController.cs                   |   77 
 DAL/采购管理/ClsCg_PayableBill.cs                                                  |    6 
 PayM/obj/Debug/PayM.HR_RewardsPunishBillList.resources                         |    0 
 WarM/条码打印/Kf_WeighToBarCode.cs                                                 |  257 +
 WebAPI/DLL/ClsSb_EquipRepairWorkBill.cs                                        |    7 
 PayM/obj/Debug/PayM.Pay_SingleBalBill_Enter.resources                          |    0 
 PayM/obj/Debug/PayM.Pay_PayMentDayBillList.resources                           |    0 
 PayM/bin/Debug/DAL.pdb                                                         |    0 
 PayM/obj/Debug/PayM.HR_ContractBookBill.resources                              |    0 
 PayM/obj/Debug/PayM.Pay_SubsidyChangeBill.resources                            |    0 
 PayM/obj/Debug/Interop.gregn6Lib.dll                                           |    0 
 WebAPI/Controllers/基础资料/基础资料/Gy_ConkReasonBillController.cs                    |  280 +
 PayM/obj/Debug/PayM.Pay_ProcPriceRequestBill.resources                         |    0 
 PayM/obj/Debug/PayM.Pay_ProdWorkQtyEntryReport.resources                       |    0 
 DAL/生产管理/模具管理/ClsSb_MouldRepairWorkBill.cs                                     |    4 
 WebAPI/Models/基础资料/Gy_Process.cs                                               |    2 
 LMES/bin/Debug.rar                                                             |    0 
 WebAPI/Controllers/SCGL/Sc_PPBomBillController.cs                              |   54 
 DAL/质检管理/ClsQC_TakeSampleCheckBill.cs                                          |    5 
 WebAPI/Controllers/BaseSet/Gy_ProcessController.cs                             |   11 
 WebAPI/ListModels.cs                                                           |   13 
 PayM/obj/Debug/PayM.HR_EmpChangeBillList.resources                             |    0 
 PayM/obj/Debug/PayM.Pay_OuterScrap.resources                                   |    0 
 PayM/obj/Debug/PayM.Pay_NoWorkTimesReport.resources                            |    0 
 WebAPI/WebAPI.csproj                                                           |    4 
 WebAPI/DLL/ClsOA_ErrMsgBackBill.cs                                             |    5 
 PayM/bin/Debug/Pub_Control.pdb                                                 |    0 
 DAL/工资管理/ClsPay_WorkTimesBill.cs                                               |   63 
 WebAPI/Exceptions/ExcelException.cs                                            |   17 
 WebAPI/Controllers/条码管理/WEBSController.cs                                      |   71 
 PayM/obj/Debug/PayM.Pay_WorkTimesBill.resources                                |    0 
 Model/Model.csproj                                                             |    1 
 PayM/obj/Debug/PayM.Pay_SingleBalBillList.resources                            |    0 
 WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs                  |    3 
 PayM/obj/Debug/PayM.Pay_MonthExpenseEntryBillList.resources                    |    0 
 PayM/bin/Debug/Pub_Control.dll                                                 |    0 
 WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs                    |    3 
 PayM/bin/Debug/AxInterop.gregn6Lib.dll                                         |    0 
 WebAPI/WebBLL/JCJM/IMPL/Gy_CustomerImpl.cs                                     |  207 +
 DAL/质检管理/ClsQC_ProcessCheckBill.cs                                             |   16 
 WebAPI/Exceptions/EmptyException.cs                                            |   17 
 WebAPI/DLL/ClsGy_ProcMul_Ctl.cs                                                |  102 
 PayM/obj/Debug/PayM.Pay_GroupBalBill.resources                                 |    0 
 PayM/obj/Debug/PayM.HR_LearnHistoryBillList.resources                          |    0 
 PayM/bin/Debug/Model.dll                                                       |    0 
 PayM/obj/Debug/BaseSet.Gy_DataInTmp_DuSubsidyItem.resources                    |    0 
 PayM/bin/Debug/Model.pdb                                                       |    0 
 WebAPI/Controllers/基础资料/基础资料/Gy_StockPlace_Controller.cs                       |    2 
 LMES/DingDing_autoGetData.cs                                                   |   12 
 DAL/质检管理/ClsQC_MonthTarGetBill.cs                                              |    4 
 PayM/bin/Debug/DAL.dll                                                         |    0 
 WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs                       |   17 
 WebAPI/Controllers/BaseSet/Gy_CheckItemController.cs                           |   65 
 PayM/obj/Debug/PayM.HR_EmpDimissionBillList.resources                          |    0 
 PayM/obj/Debug/PayM.HR_ContractBookBillList.resources                          |    0 
 WebAPI/Controllers/品质管理/车间自检单/QC_WorkSelfCheckBillController.cs                |    3 
 PayM/obj/Debug/OAM.HR_EmpEngageRequestBillList.resources                       |    0 
 PayM/obj/Debug/PayM.Pay_YearToCashBillReport.resources                         |    0 
 DAL/质检管理/ClsQC_FirstPieceCheckBill.cs                                          |   10 
 PayM/obj/Debug/PayM.Pay_OtherMoney_Dlg.resources                               |    0 
 WebAPI/Controllers/工资管理/Pay_SalaryCalculateController.cs                       |   52 
 SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt            |    9 
 PayM/obj/Debug/PayM.Pay_InnerScrap.resources                                   |    0 
 DAL/生产管理/模具管理/ClsSc_MouldMaintainRuleBill.cs                                   |    5 
 PayM/obj/Debug/PayM.Pay_DuSubsidyItemBillList.resources                        |    0 
 PayM/obj/Debug/CostM.Pay_AccPayMentDayBillList.resources                       |    0 
 PayM/obj/Debug/PayM.KQ_sourceReport.resources                                  |    0 
 WebAPI/Controllers/BaseSet/Gy_EmployeeController.cs                            |    3 
 WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs                           |    2 
 PayM/obj/Debug/PayM.Pay_ErrWorkTimesSendBill.resources                         |    0 
 PayM/obj/Debug/PayM.Pay_EmpPayMentSumReport.resources                          |    0 
 PayM/obj/Debug/CostM.Pay_PayMentBillAutoAddnew.resources                       |    0 
 PayM/obj/Debug/PayM.Pay_PayMentBill.resources                                  |    0 
 PayM/obj/Debug/PayM.Pay_EmpWorkQtyEntryReport.resources                        |    0 
 PayM/bin/Debug/PayM.dll                                                        |    0 
 PayM/obj/Debug/PayM.Pay_CarOutApplyBillList.resources                          |    0 
 WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs                         |   10 
 PayM/obj/Debug/PayM.HR_WorkStoryBill.resources                                 |    0 
 WebAPI/Models/Gy_Group.cs                                                      |    2 
 WebAPI/Models/Gy_Mould.cs                                                      |    1 
 WebAPI/Controllers/品质管理/质量报表/QC_QualityReportsController.cs                    |  159 
 sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.FileListAbsolute.txt               |   24 
 DAL/质检管理/ClsQC_WorkSelfCheckBill.cs                                            |    8 
 WebAPI/Controllers/工资管理/Pay_SingleBalBillController.cs                         |   16 
 PayM/obj/Debug/PayM.Pay_MonthWriteBillReportMX2.resources                      |    0 
 PayM/bin/Debug/PayM.pdb                                                        |    0 
 PayM/obj/Debug/PayM.Pay_ErrWorkTimesRequestBillList.resources                  |    0 
 WebAPI/Controllers/CJGL/Sc_WorkBeginDotCheckBillController.cs                  |    4 
 WebAPI/Controllers/BaseSet/Gy_ModelTypeController.cs                           |  265 +
 PayM/bin/Debug/SQLHelper.dll                                                   |    0 
 WebAPI/Models/StationBill.cs                                                   |    1 
 WebAPI/Properties/PublishProfiles/FolderProfilewtt.pubxml.user                 |   46 
 WebAPI/Controllers/BaseSet/Gy_MaterialController.cs                            | 1094 +++++
 PayM/bin/Debug/SQLHelper.pdb                                                   |    0 
 PayM/obj/Debug/PayM.Pay_ProcPriceRequestBillList.resources                     |    0 
 PayM/obj/Debug/PayM.Pay_MonthSubsidyEntryBillReport.resources                  |    0 
 PayM/obj/Debug/PayM.Pay_PayMentSendList.resources                              |    0 
 PayM/obj/Debug/PayM.Pay_MonthExpenseEntryBillReport.resources                  |    0 
 WebAPI/Controllers/项目管理/工程项目/PM_ProjectBillController.cs                       |   10 
 WebAPI/Controllers/基础资料/基础资料/Gy_ProcMulController.cs                           |  537 ++
 WebAPI/Controllers/SBGL/Gy_EquipTypeController.cs                              |  266 +
 PayM/obj/Debug/PayM.Err_MonthExpenseEntryBill.resources                        |    0 
 PayM/obj/Debug/PayM.Pay_PayMentDeptSendList.resources                          |    0 
 WebAPI/Controllers/基础资料/基础资料/Gy_MaterTypeBillController.cs                     |  330 +
 PayM/obj/Debug/PayM.Pay_WorkTimesList.resources                                |    0 
 Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs                             |    3 
 PayM/obj/Debug/PayM.Pay_DuSubsidyItemBill.resources                            |    0 
 /dev/null                                                                      |    0 
 PayM/obj/Debug/PayM.Pay_PayMentPrintReport.resources                           |    0 
 WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs                           |  242 +
 Model/车间管理/ClsSc_ProcessExchangeBillSub_BatchSplit.cs                          |    2 
 Model/采购管理/ClsCg_PayableBillMain.cs                                            |    2 
 226 files changed, 10,246 insertions(+), 632 deletions(-)

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 59ebf7f..4f536c7 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"
@@ -146,9 +146,7 @@
                     oCn.RollBack();
                     return false;
                 }
-                sReturn = "鍗曟嵁鍙凤細"+ omodel.HBillNo+ " 淇敼鎴愬姛锛�";
                 oCn.Commit();
-                return true;
             }
             catch (Exception e)
             {
@@ -156,7 +154,37 @@
                 oCn.RollBack();
                 throw (e);
             }
+
+            //瀹℃牳鍗曟嵁
+            //鑾峰彇绯荤粺鍙傛暟
+            Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
+            if (oSystemParameter.ShowBillByOrgID(omodel.HSTOCKORGID, ref sReturn) == false)
+            {
+                sReturn = "鍗曟嵁鍙凤細" + omodel.HBillNo + " 淇敼鎴愬姛锛屽垽鏂槸鍚﹁嚜鍔ㄥ鏍告椂鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sReturn;
+                return true;
+            }
+
+            if (oSystemParameter.omodel.Pay_WorkTimesBill_AutoCheck.ToUpper() == "Y") //绯荤粺鍙傛暟  鑷姩瀹℃牳 
+            {
+                //瀹℃牳鍗曟嵁
+                if (!CheckBill(omodel.HInterID, omodel.HBillNo, "h_p_Pay_WorkTimesBill_AfterCheckCtrl", DBUtility.ClsPub.CurUserName, ref DBUtility.ClsPub.sExeReturnInfo))
+                {
+                    sReturn = "鍗曟嵁鍙凤細" + omodel.HBillNo + " 淇敼鎴愬姛锛屽鏍稿け璐ワ紒";
+                    return true;
+                }
+                else
+                {
+                    sReturn = "鍗曟嵁鍙凤細" + omodel.HBillNo + " 淇敼瀹℃牳鎴愬姛锛�";
+                    return true;
+                }
+            }
+            else
+            {
+                sReturn = "鍗曟嵁鍙凤細" + omodel.HBillNo + " 淇敼鎴愬姛锛�";
+                return true;
+            }
         }
+
         //鏂板鍗曟嵁
         public override bool AddBill(ref string sReturn)
         {
@@ -211,9 +239,7 @@
                     oCn.RollBack();
                     return false;
                 }
-                sReturn = "鍗曟嵁鍙凤細" + omodel.HBillNo + " 鏂板鎴愬姛锛�";
                 oCn.Commit();
-                return true;
             }
             catch (Exception e)
             {
@@ -221,6 +247,35 @@
                 oCn.RollBack();
                 throw (e);
             }
+
+            //瀹℃牳鍗曟嵁
+            //鑾峰彇绯荤粺鍙傛暟
+            Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
+            if (oSystemParameter.ShowBillByOrgID(omodel.HSTOCKORGID, ref sReturn) == false)
+            {
+                sReturn = "鍗曟嵁鍙凤細" + omodel.HBillNo + " 鏂板鎴愬姛锛屽垽鏂槸鍚﹁嚜鍔ㄥ鏍告椂鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sReturn;
+                return true;
+            }
+
+            if (oSystemParameter.omodel.Pay_WorkTimesBill_AutoCheck.ToUpper() == "Y") //绯荤粺鍙傛暟  鑷姩瀹℃牳 
+            {
+                //瀹℃牳鍗曟嵁
+                if (!CheckBill(omodel.HInterID, omodel.HBillNo, "h_p_Pay_WorkTimesBill_AfterCheckCtrl", DBUtility.ClsPub.CurUserName, ref DBUtility.ClsPub.sExeReturnInfo))
+                {
+                    sReturn = "鍗曟嵁鍙凤細" + omodel.HBillNo + " 鏂板鎴愬姛锛屽鏍稿け璐ワ紒";
+                    return true;
+                }
+                else
+                {
+                    sReturn = "鍗曟嵁鍙凤細" + omodel.HBillNo + " 鏂板瀹℃牳鎴愬姛锛�";
+                    return true;
+                }
+            }
+            else
+            {
+                sReturn = "鍗曟嵁鍙凤細" + omodel.HBillNo + " 鏂板鎴愬姛锛�";
+                return true;
+            }
         }
         //鏄剧ず鍗曟嵁
         public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSb_MouldRepairWorkBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSb_MouldRepairWorkBill.cs"
index 064804d..0c7e815 100644
--- "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSb_MouldRepairWorkBill.cs"
+++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSb_MouldRepairWorkBill.cs"
@@ -63,6 +63,7 @@
                 ",HCycleUnit='" + omodel.HCycleUnit + "'" +
                 ",HExplanation='" + omodel.HExplanation + "'" +
                 ",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
+                ",HRepairAccepDate='" + omodel.HRepairAccepDate + "'" +
                 ",HSupID=" + omodel.HSupID.ToString() +
                 ",HRepairType='" + omodel.HRepairType + "'" +
                 ",HNewModel='" + omodel.HNewModel + "'" +
@@ -161,6 +162,7 @@
                 ",HCycleUnit,HPlanTimes,HTimes,HEmpID,HManagerID"+
                 ",HDeptID,HExplanation,HInnerBillNo,HMouldID" +
                 ",HSupID,HRepairType,HNewModel,HNewDesignLife,HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID" +
+                ",HRepairAccepDate" +
                 ") " +
                 " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
                 "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" +
@@ -168,7 +170,7 @@
                 ",'" + omodel.HCycleUnit + "'," + omodel.HPlanTimes.ToString() + "," + omodel.HTimes.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() +
                 "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HMouldID.ToString() +
                  ", " + omodel.HSupID.ToString() + ",'" + omodel.HRepairType + "','" + omodel.HNewModel + "'," + omodel.HNewDesignLife.ToString() +",'"+ omodel.HMainSourceBillType+"',"+ omodel.HMainSourceInterID.ToString()+","+ omodel.HMainSourceEntryID.ToString()+
-                ") ");
+                ",'"+ omodel.HRepairAccepDate + "') ");
                 //鎻掑叆瀛愯〃
                 foreach (Model.ClsSb_MouldRepairWorkBillSub oSub in DetailColl)
                 {
diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainBill.cs"
index 276ef2d..30c2cbf 100644
--- "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainBill.cs"
+++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainBill.cs"
@@ -117,6 +117,10 @@
                 ",HEndDate='" + omodel.HEndDate + "'" +
                 ",HExplanation='" + omodel.HExplanation + "'" +
                 ",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
+                ",HRequestComDate='" + omodel.HRequestComDate + "'" +
+                ",HRecentMainModule='" + omodel.HRecentMainModule + "'" +
+                ",HCumulativeModule='" + omodel.HCumulativeModule + "'" +
+                ",HProductionModule='" + omodel.HProductionModule + "'" +
                 ",HMouldMaintainRuleInterID=" + omodel.HMouldMaintainRuleInterID.ToString() +
                 ",HMaintainLevID=" + omodel.HMaintainLevID +
                 ",HLastResult='" + omodel.HLastResult + "'" +
@@ -210,6 +214,7 @@
                 ",HPlanNo,HPlanInterID,HMouldID,HBeginDate"+
                 ",HEndDate"+
                 ",HInnerBillNo,HExplanation,HMouldMaintainRuleInterID,HMaintainLevID,HLastResult" +
+                ",HRequestComDate,HRecentMainModule,HCumulativeModule,HProductionModule" +
                 ") " +
                 " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
                 "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+
@@ -217,7 +222,7 @@
                 ",'" + omodel.HEndDate + "'"+
                 ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'," +omodel.HMouldMaintainRuleInterID.ToString() + "," + omodel.HMaintainLevID +
                 ",'" + omodel.HLastResult + "'" + 
-                ") ");
+                ",'"+ omodel.HRequestComDate + "'," + omodel.HRecentMainModule + "," + omodel.HCumulativeModule + "," + omodel.HProductionModule + ") ");
 
                 if (DetailCol.Count > 0)
                 {
diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBill.cs"
index 98dece1..675ee89 100644
--- "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBill.cs"
+++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBill.cs"
@@ -10,11 +10,12 @@
         public Model.ClsSc_MouldMaintainPlanBillMain omodel = new Model.ClsSc_MouldMaintainPlanBillMain();
         public List<Model.ClsSc_MouldMaintainPlanBillSub> DetailColl = new List<Model.ClsSc_MouldMaintainPlanBillSub>();
         public List<Model.ClsSc_MouldMaintainPlanBillSub_Item> DetailCol = new List<Model.ClsSc_MouldMaintainPlanBillSub_Item>();
+        public List<Model.ClsSc_MouldMaintainPlanBillSub_Plan> DetailCol2 = new List<Model.ClsSc_MouldMaintainPlanBillSub_Plan>();
 
         public ClsSc_MouldMaintainPlanBill()
         {
             base.MvarItemKeySub = "Sc_MouldMaintainPlanBillSub";
-            base.MvarItemKeySub2 = "";
+            base.MvarItemKeySub2 = "Sc_MouldMaintainPlanBillSub_Plan";
             base.MvarItemKeySub3 = "";
             base.MvarItemKeySub4 = "";
             base.MvarItemKey="Sc_MouldMaintainPlanBillMain";
@@ -71,11 +72,13 @@
                 ",HUSEORGID=" + omodel.HUSEORGID +
                 //",HCREATEORGID=" + omodel.HCREATEORGID +
                 ",HDeptID=" + omodel.HDeptID +
+                ",HErrWarQtys=" + omodel.HErrWarQtys +
                 " where HInterID=" + lngBillKey.ToString());
                 //鍒犻櫎鍏宠仈
                 DeleteRelation(ref sReturn, lngBillKey);
                 //鍒犻櫎瀛愯〃
                 DeleteBillSub(lngBillKey);
+                DeleteBillSub2(lngBillKey);
                 oCn.RunProc("delete from Sc_MouldMaintainPlanBillSub_Item where HInterID=" + lngBillKey);
                 
                 omodel.HInterID = lngBillKey;
@@ -111,6 +114,23 @@
                           ",'" + Item.HCloseMan + "'," + Convert.ToString(Item.HCloseType ? 1 : 0) + ",'" + Item.HRemark + "'" +
                           "," + Item.HSourceInterID.ToString() + "," + Item.HSourceEntryID.ToString() + ",'" + Item.HSourceBillNo + "','" + Item.HSourceBillType + "'," + Item.HRelationQty.ToString() + "," + Item.HRelationMoney.ToString() + ",'" + Item.HMaintainItem.ToString() +
                           "') ");
+                }
+
+                //鎻掑叆鐐规璁″垝
+                foreach (Model.ClsSc_MouldMaintainPlanBillSub_Plan Items in DetailCol2)
+                {
+                    oCn.RunProc("Insert into Sc_MouldMaintainPlanBillSub_Plan " +
+                      " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
+                      ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
+                      ",HPlanDate,HPlanBeginTime,HPlanEndTime,HSafeEndTime,HErrBeginTime," +
+                      "HRelationFlag,HSendFlag,HErrBeginQty,HUseNowQty,HUseEndQty" +
+
+                      ") values("
+                      + omodel.HInterID.ToString() + "," + Items.HEntryID.ToString() + ",'" + Items.HCloseMan + "','" + Items.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(Items.HCloseType ? 1 : 0) + ",'" + Items.HRemark + "'" +
+                      "," + Items.HSourceInterID.ToString() + "," + Items.HSourceEntryID.ToString() + ",'" + Items.HSourceBillNo + "','" + Items.HSourceBillType + "'," + Items.HRelationQty.ToString() + "," + Items.HRelationMoney.ToString() +
+                      ",'" + Items.HPlanDate.ToString() + "','" + Items.HPlanBeginTime.ToString() + "','" + Items.HPlanEndTime.ToString() + "','" + Items.HSafeEndTime.ToString() + "','" + Items.HErrBeginTime.ToString() + "'," +
+                      "'" + DBUtility.ClsPub.BoolToString(Items.HRelationFlag) + "','" + DBUtility.ClsPub.BoolToString(Items.HSendFlag) + "','" + Items.HErrBeginQty.ToString() + "','" + Items.HUseNowQty.ToString() + "','" + Items.HUseEndQty.ToString() +
+                      "') ");
                 }
                 //
                 //foreach (Model.ClsSc_MouldMaintainPlanBillSub oSub in DetailColl)
@@ -150,14 +170,14 @@
                 ",HYear,HPeriod,HRemark" +
                 ",HCycleUnit,HCheckCycle,HBeginDate,HEndDate"+
                 ",HInnerBillNo,HExplanation,HMouldMaintainRuleID,HMaintainLevID,HMainSourceInterID,HMainSourceBillNo,HMouldID" +
-                ",HUSEORGID,HCREATEORGID,HDeptID" +
+                ",HUSEORGID,HCREATEORGID,HDeptID,HErrWarQtys" +
                 ") " +
                 " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
                 "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'"+
                 ",'" + omodel.HCycleUnit + "'," + omodel.HCheckCycle.ToString() + ",'" + omodel.HBeginDate + "','" + omodel.HEndDate + "'" +
                 ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation  + "','" + omodel.HMouldMaintainRuleID + "'," + omodel.HMaintainLevID +
                 "," + omodel.HMainSourceInterID + ",'" + omodel.HMainSourceBillNo + "'," + omodel.HMouldID + "," + omodel.HUSEORGID + 
-                "," + omodel.HCREATEORGID + "," + omodel.HDeptID +
+                "," + omodel.HCREATEORGID + "," + omodel.HDeptID + "," + omodel.HErrWarQtys +
                 ") ");
                 //鎻掑叆瀛愯〃閰嶄欢淇℃伅
                 foreach (Model.ClsSc_MouldMaintainPlanBillSub oSub in DetailColl)
diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainRuleBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainRuleBill.cs"
index 542b9b0..533ef90 100644
--- "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainRuleBill.cs"
+++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainRuleBill.cs"
@@ -60,6 +60,7 @@
                 ",HUseQtys=" + omodel.HUseQtys +
                 ",HSafeDays=" + omodel.HSafeDays +
                 ",HErrWarDays=" + omodel.HErrWarDays +
+                ",HErrWarQtys=" + omodel.HErrWarQtys +
                 " where HInterID=" + lngBillKey.ToString());                
                 //鍒犻櫎鍏宠仈
                 //DeleteRelation(ref sReturn, lngBillKey);
@@ -120,11 +121,11 @@
                 oCn.RunProc("Insert Into Sc_MouldMaintainRuleBillMain" +
                  "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
                 ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
-                ",HCycleUnit,HCheckCycle,HExplanation,HInnerBillNo,HMaintainLevID,HUseQtys,HSafeDays,HErrWarDays" +
+                ",HCycleUnit,HCheckCycle,HExplanation,HInnerBillNo,HMaintainLevID,HUseQtys,HSafeDays,HErrWarDays,HErrWarQtys" +
                 ") " +
                 " 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.HCycleUnit + "'," + omodel.HCheckCycle.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HMaintainLevID + "," + omodel.HUseQtys + "," + omodel.HSafeDays + "," + omodel.HErrWarDays +
+                ",'" + omodel.HCycleUnit + "'," + omodel.HCheckCycle.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HMaintainLevID + "," + omodel.HUseQtys + "," + omodel.HSafeDays + "," + omodel.HErrWarDays + "," + omodel.HErrWarQtys +
                 ") ");
                 ////鎻掑叆瀛愯〃
                 foreach (Model.ClsSc_MouldMaintainRuleBillSub oSub in DetailColl_Mater)
diff --git "a/DAL/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_RoutingBill.cs" "b/DAL/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_RoutingBill.cs"
index 79a54e7..b8b1134 100644
--- "a/DAL/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_RoutingBill.cs"
+++ "b/DAL/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_RoutingBill.cs"
@@ -280,7 +280,7 @@
             {
                 //鏌ヨ涓昏〃
                 DataSet Ds ;
-                Ds = oCn.RunProcReturn("Select * from Gy_RoutingBillMain Where HInterID=" + lngBillKey.ToString()+" and HPRDORGID='"+DBUtility.ClsPub.HOrgID.ToString()+"'", "Gy_RoutingBillMain");
+                Ds = oCn.RunProcReturn("Select * from Gy_RoutingBillMain Where HInterID=" + lngBillKey.ToString(), "Gy_RoutingBillMain");
                 if(Ds.Tables[0].Rows.Count==0)
                 {
                     sReturn = "鍗曟嵁鏈壘鍒帮紒";
@@ -288,6 +288,8 @@
                 }
                 //璧嬪��
                 omodel.HInterID =DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"].ToString());
+                omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"].ToString());
+
                 omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim();
                 omodel.HName = Ds.Tables[0].Rows[0]["HName"].ToString().Trim();
                 omodel.HDate = Convert.ToDateTime(Ds.Tables[0].Rows[0]["HDate"].ToString().Trim());
diff --git "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBill.cs" "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBill.cs"
index c4a96db..0717e5d 100644
--- "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBill.cs"
+++ "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_FirstPieceCheckBill.cs"
@@ -82,6 +82,7 @@
                 //",HSupID=" + omodel.HSupID.ToString() +
                 //",HEmpID=" + omodel.HEmpID.ToString() +
                 ",HSourceID=" + omodel.HSourceID.ToString() +
+                ",HQCSchemeID=" + omodel.HQCSchemeID.ToString() +
                 ",HICMOInterID=" + omodel.HICMOInterID.ToString() +
                 ",HICMOBillNo='" + omodel.HICMOBillNo + "'" +
                 ",HICMOQty=" + omodel.HICMOQty.ToString() +
@@ -89,6 +90,7 @@
                 ",HProcExchEntryID=" + omodel.HProcExchEntryID.ToString() +
                 ",HProcExchBillNo='" + omodel.HProcExchBillNo + "'" +
                 ",HProcExchQty=" + omodel.HProcExchQty.ToString() +
+                ",HProcID=" + omodel.HProcID.ToString() +
                 ",HMaterID=" + omodel.HMaterID.ToString() +
                 ",HFirstCheckEmp=" + omodel.HFirstCheckEmp.ToString() +
                 ",HLastResult=" + DBUtility.ClsPub.BoolToString(omodel.HLastResult) +
@@ -109,13 +111,13 @@
                       ",HEntryCloseDate,HCloseType,HRemark,HSourceInterID" +
                       ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                       ",HQCCheckItemID,HQCStd,HUnit,HQCNote,HResult" +
-                      ",HMax,HMin,HAvg,HInspectVal" +
+                      ",HMax,HMin,HAvg,HInspectVal,HUpLimit,HDownLimit,HInspectInstruMentID" +
                       ") values("
                       + omodel.HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'" +
                       ",getdate()," + 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.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HUnit + "','" + oSub.HQCNote + "','" + oSub.HResult +"'"+
-                      ",'" + oSub.HMax + "','" + oSub.HMin + "','" + oSub.HAvg + "','"+ oSub.HInspectVal + "'" +
+                      ",'" + oSub.HMax + "','" + oSub.HMin + "','" + oSub.HAvg + "','"+ oSub.HInspectVal + "','" + oSub.HUpLimit + "','" + oSub.HDownLimit + "','" + oSub.HInspectInstruMentID + "'" +
                       ") ");
                 }
                 //foreach (Model.ClsQC_FirstPieceCheckBillSub_Item oSub2 in DetailColl1)
@@ -208,14 +210,14 @@
                 ",HSourceID,HICMOInterID,HICMOBillNo,HICMOQty,HProcExchInterID,HProcExchEntryID" +
                 ",HProcExchBillNo,HProcExchQty,HMaterID,HFirstCheckEmp,HLastResult" +
                 ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID,HQCSchemeID,HShiftsID,HErrTreatment,HBatchNo" +
-                ",HTakeSampleCheckBillID,HTakeSampleCheckBillNo" +
+                ",HTakeSampleCheckBillID,HTakeSampleCheckBillNo,HProcID" +
                 ") " +
                 " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",'" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
                 "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'" +
                 "," + omodel.HSourceID.ToString() + "," + omodel.HICMOInterID.ToString() + ",'" + omodel.HICMOBillNo + "'," + omodel.HICMOQty.ToString() + "," + omodel.HProcExchInterID.ToString() + "," + omodel.HProcExchEntryID.ToString() +
                 ",'" + omodel.HProcExchBillNo + "'," + omodel.HProcExchQty.ToString() + "," + omodel.HMaterID.ToString() + "," + omodel.HFirstCheckEmp.ToString() + ", " + DBUtility.ClsPub.BoolToString(omodel.HLastResult) +
                 "," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType  + "'," + omodel.HICMOEntryID + "," + omodel.HQCSchemeID + "," + omodel.HShiftsID + ",'" + omodel.HErrTreatment + "','" + omodel.HBatchNo + "'" +
-                ","+ omodel.HTakeSampleCheckBillID + ",'"+ omodel.HTakeSampleCheckBillNo + "'" +
+                ","+ omodel.HTakeSampleCheckBillID + ",'"+ omodel.HTakeSampleCheckBillNo + "','" + omodel.HProcID + "'" +
                 ") ");
                 //鎻掑叆瀛愯〃
                 foreach (Model.ClsQC_FirstPieceCheckBillSub oSub in DetailColl)
diff --git "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_MonthTarGetBill.cs" "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_MonthTarGetBill.cs"
index cbca434..19b8ff5 100644
--- "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_MonthTarGetBill.cs"
+++ "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_MonthTarGetBill.cs"
@@ -69,6 +69,7 @@
                 ",HProcPPMTarGetVal=" + omodel.HProcPPMTarGetVal + 
                 ",HProcKPITarGetVal=" + omodel.HProcKPITarGetVal.ToString() +
                 ",HInspectOrgID=" + omodel.HInspectOrgID.ToString() +
+                ",HProcTarGetVal=" + omodel.HProcTarGetVal.ToString() +
                 " where HInterID=" + lngBillKey.ToString());
                 //鍒犻櫎鍏宠仈
                 DeleteRelation(ref sReturn, lngBillKey);
@@ -130,7 +131,7 @@
                 //鎻掑叆涓昏〃
                 string mainSql = "insert into QC_MonthTarGetBillMain" +
                     "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate,HBillNo,HRemark,HMaker,HMakeDate" +
-                    ",HDeptID,HInspectOrgID,HProcTrapTarGetVal,HProcKPITarGetVal,HProcOmitTarGetVal,HProcPPMTarGetVal) " +
+                    ",HDeptID,HInspectOrgID,HProcTrapTarGetVal,HProcKPITarGetVal,HProcOmitTarGetVal,HProcPPMTarGetVal,HProcTarGetVal) " +
                     "values(" +
                     "" + (omodel.HYear.ToString() != "0" ? omodel.HYear.ToString() : DateTime.Now.Year.ToString()) +
                     "," + omodel.HPeriod.ToString() +
@@ -148,6 +149,7 @@
                     "," + omodel.HProcKPITarGetVal +
                     "," + omodel.HProcOmitTarGetVal +
                     "," + omodel.HProcPPMTarGetVal +
+                    "," + omodel.HProcTarGetVal +  
                     ")";
                     oCn.RunProc(mainSql);
 
diff --git "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_PatrolProcCheckOtherBill.cs" "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_PatrolProcCheckOtherBill.cs"
index f6074a5..5f8a05c 100644
--- "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_PatrolProcCheckOtherBill.cs"
+++ "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_PatrolProcCheckOtherBill.cs"
@@ -61,6 +61,7 @@
                 ",HFirstCheckEmp=" + omodel.HFirstCheckEmp.ToString() +
                 ",HLastResult=" + DBUtility.ClsPub.BoolToString(omodel.HLastResult) +
                 ",HShiftsID=" + omodel.HShiftsID.ToString() +
+                ",HProcID=" + omodel.HProcID.ToString() +
                 ",HErrTreatment='" + omodel.HErrTreatment + "'" +
                 ",HBatchNo='" + omodel.HBatchNo + "'" +
                 " where HInterID=" + lngBillKey.ToString());
@@ -123,14 +124,14 @@
                 ",HSourceID,HICMOInterID,HICMOBillNo,HICMOQty,HProcExchInterID,HProcExchEntryID" +
                 ",HProcExchBillNo,HProcExchQty,HMaterID,HFirstCheckEmp,HLastResult" +
                 ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID,HQCSchemeID,HShiftsID,HErrTreatment,HBatchNo" +
-                ",HTakeSampleCheckBillID,HTakeSampleCheckBillNo" +
+                ",HTakeSampleCheckBillID,HTakeSampleCheckBillNo,HProcID" +
                 ") " +
                 " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",'" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
                 "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'" +
                 "," + omodel.HSourceID.ToString() + "," + omodel.HICMOInterID.ToString() + ",'" + omodel.HICMOBillNo + "'," + omodel.HICMOQty.ToString() + "," + omodel.HProcExchInterID.ToString() + "," + omodel.HProcExchEntryID.ToString() +
                 ",'" + omodel.HProcExchBillNo + "'," + omodel.HProcExchQty.ToString() + "," + omodel.HMaterID.ToString() + "," + omodel.HFirstCheckEmp.ToString() + ", " + DBUtility.ClsPub.BoolToString(omodel.HLastResult) +
                 "," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'," + omodel.HICMOEntryID + "," + omodel.HQCSchemeID + "," + omodel.HShiftsID + ",'" + omodel.HErrTreatment + "','" + omodel.HBatchNo + "'" +
-                "," + omodel.HTakeSampleCheckBillID + ",'" + omodel.HTakeSampleCheckBillNo + "'" +
+                "," + omodel.HTakeSampleCheckBillID + ",'" + omodel.HTakeSampleCheckBillNo + "','" + omodel.HProcID + "'" +
                 ") ");
                 //鎻掑叆瀛愯〃
                 foreach (Model.ClsQC_PatrolProcCheckOtherBillSub oSub in DetailColl)
diff --git "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBill.cs" "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBill.cs"
index 23b5064..4e0774f 100644
--- "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBill.cs"
+++ "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_ProcessCheckBill.cs"
@@ -123,15 +123,21 @@
                       ",HEntryCloseDate,HCloseType,HRemark,HSourceInterID" +
                       ",HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                       ",HQCCheckClassID,HQCCheckItemID,HQCStd,HQCRelValue,HResult" +
-                      ",HProcCheckEmp,HProcCheckTime" +
-                      ") values("
+                      ",HProcCheckEmp,HProcCheckTime,  HSampleSchemeID,HSampleQty,HSampleDamageQty,HAcceptQty" +
+                      ",HRejectQty,HSampleUnRightQty,HStatus,HUnitID,HInspectVal,HTargetVal" +
+                      ",HUpLimit,HDownLimit,HUpOffSet,HDownOffSet,HKeyInspect,HAnalysisMethod,HInspectInstruMentID,HInspectResult" +
+                      ",HQCNote) values("
                       + omodel.HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'" +
                       ",getdate()," + 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.HQCCheckClassID.ToString() + "," + oSub.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HQCRelValue + "','" + oSub.HResult + "'" +
-                      "," + oSub.HProcCheckEmp.ToString() + ",'" + oSub.HProcCheckTime + "'" +
+                      "," + oSub.HProcCheckEmp.ToString() + ",'" + oSub.HProcCheckTime + "'," + oSub.HSampleSchemeID + "," + oSub.HSampleQty +
+                      "," + oSub.HSampleDamageQty + "," + oSub.HAcceptQty + "," + oSub.HRejectQty + "," + oSub.HSampleUnRightQty + ",'" + oSub.HStatus +
+                      "'," + oSub.HUnitID + ",'" + oSub.HInspectVal + "','" + oSub.HTargetVal + "','" + oSub.HUpLimit + "','" + oSub.HDownLimit +
+                      "','" + oSub.HUpOffSet + "','" + oSub.HDownOffSet + "'," + oSub.HKeyInspect + ",'" + oSub.HAnalysisMethod + "'," + oSub.HInspectInstruMentID + ",'" + oSub.HInspectResult + "','" + oSub.HQCNote + "'" +
                       ") ");
                 }
+
 
                 //foreach (Model.ClsQC_ProcessCheckBillSuboSub in DetailColl)
                 //{
@@ -236,7 +242,7 @@
                       ",HProcCheckEmp,HProcCheckTime,  HSampleSchemeID,HSampleQty,HSampleDamageQty,HAcceptQty" +
                       ",HRejectQty,HSampleUnRightQty,HStatus,HUnitID,HInspectVal,HTargetVal" +
                       ",HUpLimit,HDownLimit,HUpOffSet,HDownOffSet,HKeyInspect,HAnalysisMethod,HInspectInstruMentID,HInspectResult" +
-                      ") values("
+                      ",HQCNote,HMax,HMin,HAvg) values("
                       + omodel.HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'" +
                       ",getdate()," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'," + oSub.HSourceInterID.ToString() +
                       "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
@@ -244,7 +250,7 @@
                       "," + oSub.HProcCheckEmp.ToString() + ",'" + oSub.HProcCheckTime + "'," + oSub.HSampleSchemeID + "," + oSub.HSampleQty +
                       "," + oSub.HSampleDamageQty + "," + oSub.HAcceptQty + "," + oSub.HRejectQty + "," + oSub.HSampleUnRightQty + ",'" + oSub.HStatus +
                       "'," + oSub.HUnitID + ",'" + oSub.HInspectVal + "','" + oSub.HTargetVal + "','" + oSub.HUpLimit + "','" + oSub.HDownLimit +
-                      "','" + oSub.HUpOffSet + "','" + oSub.HDownOffSet + "'," + oSub.HKeyInspect + ",'" + oSub.HAnalysisMethod + "'," + oSub.HInspectInstruMentID + ",'" + oSub.HInspectResult + "'" +
+                      "','" + oSub.HUpOffSet + "','" + oSub.HDownOffSet + "'," + oSub.HKeyInspect + ",'" + oSub.HAnalysisMethod + "'," + oSub.HInspectInstruMentID + ",'" + oSub.HInspectResult + "','" + oSub.HQCNote + "','" + oSub.HMax + "','" + oSub.HMin + "','" + oSub.HAvg + "'" +
                       ") ");
                 }
 
diff --git "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_TakeSampleCheckBill.cs" "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_TakeSampleCheckBill.cs"
index ba3e9ba..5766882 100644
--- "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_TakeSampleCheckBill.cs"
+++ "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_TakeSampleCheckBill.cs"
@@ -74,6 +74,7 @@
                 "',HProdWeight2='" + omodel.HProdWeight2.ToString() +
                 "',HProdWeight3='" + omodel.HProdWeight3.ToString() +
                 "',HBadNote='" + omodel.HBadNote.ToString() +
+                "',TestType='" + omodel.TestType.ToString() +
                 "' where HInterID=" + lngBillKey.ToString());
                 //鍒犻櫎鍏宠仈
                 DeleteRelation(ref sReturn, lngBillKey);
@@ -107,14 +108,14 @@
                 ",HYear,HPeriod,HRemark" +
                 ",HSourceID,HICMOInterID,HICMOEntryID,HICMOBillNo,HICMOQty,HProcExchInterID,HProcExchEntryID" +
                 ",HProcExchBillNo,HProcExchQty,HDeptID,HMaterID,HUnitID,HBatchNo,HCheckEmp,HProcID" +
-                ",HGroupID,HShiftsID,HQty,HSourceOrgID,HInspectOrgID,HSampleDamageQty,HBadNote,HProdWeight1,HProdWeight2,HProdWeight3" +
+                ",HGroupID,HShiftsID,HQty,HSourceOrgID,HInspectOrgID,HSampleDamageQty,HBadNote,HProdWeight1,HProdWeight2,HProdWeight3,TestType" +
                 ") " +
                 " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",getdate(),'" + DBUtility.ClsPub.CurUserName + "',getdate()" +
                 "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'" +
                 ",'" + omodel.HSourceID.ToString() + "','" + omodel.HICMOInterID.ToString() + "','" + omodel.HICMOEntryID.ToString() + "','" + omodel.HICMOBillNo.ToString() + "','" + omodel.HICMOQty.ToString() + "','" + omodel.HProcExchInterID.ToString() + "','" + omodel.HProcExchEntryID.ToString() +
                 "','" + omodel.HProcExchBillNo + "','" + omodel.HProcExchQty.ToString() + "','" + omodel.HDeptID.ToString() + "','" + omodel.HMaterID.ToString() + "','" + omodel.HUnitID.ToString() + "','" + omodel.HBatchNo.ToString() +
                 "','" + omodel.HCheckEmp.ToString() + "','" + omodel.HProcID.ToString() + "','" + omodel.HGroupID.ToString() + "','" + omodel.HShiftsID.ToString() + "','" + omodel.HQty.ToString() + "','" + omodel.HSourceOrgID.ToString() + "','" +omodel.HInspectOrgID.ToString()+
-              "','" + omodel.HSampleDamageQty.ToString() + "','" + omodel.HBadNote + "','" + omodel.HProdWeight1.ToString() + "','" + omodel.HProdWeight2.ToString() + "','" + omodel.HProdWeight3.ToString() + "') ");              
+              "','" + omodel.HSampleDamageQty.ToString() + "','" + omodel.HBadNote + "','" + omodel.HProdWeight1.ToString() + "','" + omodel.HProdWeight2.ToString() + "','" + omodel.HProdWeight3.ToString() + "','" + omodel.TestType.ToString() + "') ");              
                 sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
                 oCn.Commit();
                 return true;
diff --git "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_WorkSelfCheckBill.cs" "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_WorkSelfCheckBill.cs"
index b4124cd..3fd6c8b 100644
--- "a/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_WorkSelfCheckBill.cs"
+++ "b/DAL/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_WorkSelfCheckBill.cs"
@@ -57,6 +57,7 @@
                 ",HProcExchEntryID=" + omodel.HProcExchEntryID.ToString() +
                 ",HProcExchBillNo='" + omodel.HProcExchBillNo + "'" +
                 ",HProcExchQty=" + omodel.HProcExchQty.ToString() +
+                ",HProcID=" + omodel.HProcID.ToString() +
                 ",HMaterID=" + omodel.HMaterID.ToString() +
                 ",HFirstCheckEmp=" + omodel.HFirstCheckEmp.ToString() +
                 ",HLastResult=" + DBUtility.ClsPub.BoolToString(omodel.HLastResult) +
@@ -89,7 +90,7 @@
                       ",'" + oSub.HMax + "','" + oSub.HMin + "','" + oSub.HAvg + "'" + "," + oSub.HSampleSchemeID + "," + oSub.HSampleQty +
                       "," + oSub.HSampleDamageQty + "," + oSub.HAcceptQty + "," + oSub.HRejectQty + "," + oSub.HSampleUnRightQty + ",'" + oSub.HStatus +
                       "'," + oSub.HUnitID + ",'" + oSub.HInspectValB + "','" + oSub.HInspectVal + "','" + oSub.HTargetValB + "','" + oSub.HTargetVal + "','" + oSub.HUpLimit + "','" + oSub.HDownLimit +
-                      "','" + oSub.HUpOffSet + "','" + oSub.HDownOffSet + "'," + oSub.HKeyInspect + ",'" + oSub.HAnalysisMethod + "'," + oSub.HInspectInstruMentID + ",'" + oSub.HInspectResult + "'" + ") ");
+                      "','" + oSub.HUpOffSet + "','" + oSub.HDownOffSet + "','" + oSub.HKeyInspect + "','" + oSub.HAnalysisMethod + "'," + oSub.HInspectInstruMentID + ",'" + oSub.HInspectResult + "'" + ") ");
                 }
 
 
@@ -122,12 +123,13 @@
                 ",HSourceID,HICMOInterID,HICMOBillNo,HICMOQty,HProcExchInterID,HProcExchEntryID" +
                 ",HProcExchBillNo,HProcExchQty,HMaterID,HFirstCheckEmp,HLastResult" +
                 ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HICMOEntryID,HQCSchemeID,HShiftsID,HErrTreatment" +
+                ",HProcID" +
                 ") " +
                 " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",'" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
                 "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'" +
                 "," + omodel.HSourceID.ToString() + "," + omodel.HICMOInterID.ToString() + ",'" + omodel.HICMOBillNo + "'," + omodel.HICMOQty.ToString() + "," + omodel.HProcExchInterID.ToString() + "," + omodel.HProcExchEntryID.ToString() +
                 ",'" + omodel.HProcExchBillNo + "'," + omodel.HProcExchQty.ToString() + "," + omodel.HMaterID.ToString() + "," + omodel.HFirstCheckEmp.ToString() + ", " + DBUtility.ClsPub.BoolToString(omodel.HLastResult) +
-                "," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType  + "'," + omodel.HICMOEntryID + "," + omodel.HQCSchemeID + "," + omodel.HShiftsID + ",'" + omodel.HErrTreatment + "'" +
+                "," + omodel.HMainSourceInterID + "," + omodel.HMainSourceEntryID + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType  + "'," + omodel.HICMOEntryID + "," + omodel.HQCSchemeID + "," + omodel.HShiftsID + ",'" + omodel.HErrTreatment + "','" + omodel.HProcID + "'" +
                 ") ");
                 //鎻掑叆瀛愯〃
                 foreach (Model.ClsQC_WorkSelfCheckBillSub oSub in DetailColl)
@@ -148,7 +150,7 @@
                       ",'" + oSub.HMax + "','" + oSub.HMin + "','" + oSub.HAvg + "'" + "," + oSub.HSampleSchemeID + "," + oSub.HSampleQty + 
                       "," + oSub.HSampleDamageQty + "," + oSub.HAcceptQty + "," + oSub.HRejectQty + "," + oSub.HSampleUnRightQty + ",'" + oSub.HStatus +
                       "'," + oSub.HUnitID + ",'" + oSub.HInspectValB + "','" + oSub.HInspectVal + "','" + oSub.HTargetValB + "','" + oSub.HTargetVal + "','" + oSub.HUpLimit + "','" + oSub.HDownLimit +
-                      "','" + oSub.HUpOffSet + "','" + oSub.HDownOffSet + "'," + oSub.HKeyInspect + ",'" + oSub.HAnalysisMethod + "'," + oSub.HInspectInstruMentID + ",'" + oSub.HInspectResult + "'" + ") ");
+                      "','" + oSub.HUpOffSet + "','" + oSub.HDownOffSet + "','" + oSub.HKeyInspect + "','" + oSub.HAnalysisMethod + "'," + oSub.HInspectInstruMentID + ",'" + oSub.HInspectResult + "'" + ") ");
                 }
               
                 sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
diff --git "a/DAL/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_PayableBill.cs" "b/DAL/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_PayableBill.cs"
index ab9fbb6..edf0c25 100644
--- "a/DAL/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_PayableBill.cs"
+++ "b/DAL/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_PayableBill.cs"
@@ -124,6 +124,8 @@
                     ",HExplanation = '" + omodel.HExplanation + "'" +
                     ",HInnerBillNo = '" + omodel.HInnerBillNo + "'" +
                     ",HRemark = '" + omodel.HRemark + "'" +
+                    ",HProjectID = " + omodel.HProjectID  +
+                    ",HInvoiceBillNo = '" + omodel.HInvoiceBillNo + "'" +
                     " where HInterID = " + omodel.HInterID;
                 oCn.RunProc(mainSql);
 
@@ -294,7 +296,7 @@
                 string mainSql = "insert into Cg_PayableBillMain" +
                     "(HInterID,HBillNo,HDate,HYear,HPeriod,HBillType,HBillSubType" +
                     ",HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType" +
-                    ",HMaker,HMakeDate,HSSID,HPSStyleID,HReceiveDate,HSupID,HCurID,HExRate,HEmpID,HMangerID,HDeptID,HExplanation,HInnerBillNo,HRemark) " +
+                    ",HMaker,HMakeDate,HSSID,HPSStyleID,HReceiveDate,HSupID,HCurID,HExRate,HEmpID,HMangerID,HDeptID,HExplanation,HInnerBillNo,HRemark,HProjectID,HInvoiceBillNo) " +
                     "values(" +
                     "" + omodel.HInterID + "" +
                     ",'" + omodel.HBillNo + "'" +
@@ -321,6 +323,8 @@
                     ",'" + omodel.HExplanation + "'" +
                     ",'" + omodel.HInnerBillNo + "'" +
                     ",'" + omodel.HRemark + "'" +
+                    "," + omodel.HProjectID +
+                    ",'" + omodel.HInvoiceBillNo + "'" +
                     ")";
 
                 oCn.RunProc(mainSql);
diff --git a/LMES/DingDing_autoGetData.cs b/LMES/DingDing_autoGetData.cs
index 3cfcffa..8e9b291 100644
--- a/LMES/DingDing_autoGetData.cs
+++ b/LMES/DingDing_autoGetData.cs
@@ -63,6 +63,17 @@
                     return false;
                 }
 
+                //璁惧缁翠慨璁板綍鍗�
+                if (obj.getData_EquipRepairWeiXiu(ref msg) == false)
+                {
+                    return false;
+                }
+                //妯″叿缁翠慨璁板綍鍗� 淇濆吇璁板綍鍗�
+                if (obj.getData_MouldFileWeiXiuBaoYang(ref msg) == false)
+                {
+                    return false;
+                }
+
                 return true;
             }
             catch (Exception e)
@@ -90,6 +101,7 @@
         #region 瀹氭椂鍣ㄤ簩锛氬悓姝ラ拤閽夋暟鎹�
         private void timer2_Tick(object sender, EventArgs e)
         {
+            //this.timer2.Enabled = false;
             int connectTimes = 0;
             int maxConnectTimes = 10;
 
diff --git a/LMES/LMES.csproj b/LMES/LMES.csproj
index 88b71bf..c15f85c 100644
--- a/LMES/LMES.csproj
+++ b/LMES/LMES.csproj
@@ -37,7 +37,7 @@
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
-    <Prefer32Bit>false</Prefer32Bit>
+    <Prefer32Bit>true</Prefer32Bit>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>
diff --git a/LMES/bin/Debug.rar b/LMES/bin/Debug.rar
new file mode 100644
index 0000000..f1b884c
--- /dev/null
+++ b/LMES/bin/Debug.rar
Binary files differ
diff --git a/LMES/obj/x86/Release/LMES.csproj.AssemblyReference.cache b/LMES/obj/x86/Release/LMES.csproj.AssemblyReference.cache
index fd1ac89..0cf7547 100644
--- a/LMES/obj/x86/Release/LMES.csproj.AssemblyReference.cache
+++ b/LMES/obj/x86/Release/LMES.csproj.AssemblyReference.cache
Binary files differ
diff --git a/Model/Model.csproj b/Model/Model.csproj
index 25b9b39..9a9d60a 100644
--- a/Model/Model.csproj
+++ b/Model/Model.csproj
@@ -147,6 +147,7 @@
     <Compile Include="WMS\ClsWMS_CusBarCodeCheckBillMain.cs" />
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_TechnologyParameterType_Model .cs" />
     <Compile Include="鍩虹璧勬枡\鍩虹璧勬枡\ClsGy_RestDay_Model.cs" />
+    <Compile Include="鐢熶骇绠$悊\妯″叿绠$悊\ClsSc_MouldMaintainPlanBillSub_Plan.cs" />
     <Compile Include="璐ㄦ绠$悊\ClsQC_MonthTarGetBillMain.cs" />
     <Compile Include="璐ㄦ绠$悊\ClsQC_MonthTarGetBillSub.cs" />
     <Compile Include="鐢熶骇绠$悊\璁惧绠$悊\ClsSb_EquipRepairSignBillMain.cs" />
diff --git a/Model/obj/Release/Model.csproj.AssemblyReference.cache b/Model/obj/Release/Model.csproj.AssemblyReference.cache
index 6fefcd1..f2f1252 100644
--- a/Model/obj/Release/Model.csproj.AssemblyReference.cache
+++ b/Model/obj/Release/Model.csproj.AssemblyReference.cache
Binary files differ
diff --git a/Model/obj/x86/Release/Model.csproj.AssemblyReference.cache b/Model/obj/x86/Release/Model.csproj.AssemblyReference.cache
index a7f2a69..119813e 100644
--- a/Model/obj/x86/Release/Model.csproj.AssemblyReference.cache
+++ b/Model/obj/x86/Release/Model.csproj.AssemblyReference.cache
Binary files differ
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSb_MouldRepairWorkBillMain.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSb_MouldRepairWorkBillMain.cs"
index 984bfb6..b4e0257 100644
--- "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSb_MouldRepairWorkBillMain.cs"
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSb_MouldRepairWorkBillMain.cs"
@@ -10,6 +10,7 @@
         public Int64 HRepairID;//	--维修项目(Gy_Repair)
         public DateTime HRepairBeginDate;//  --维修开始日期
         public DateTime HRepairEndDate;//  --维修结束日期
+        public DateTime HRepairAccepDate;//  --维修受理日期
         public string HRepairContent;//   --维修内容
         public string HCycleUnit;//   varchar(10)	--时间单位(小时,天)
         public double HPlanTimes;//  money         --计划维修工时
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainBillMain.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainBillMain.cs"
index 6ab8a98..bcd80e7 100644
--- "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainBillMain.cs"
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainBillMain.cs"
@@ -22,5 +22,9 @@
         public int HMouldMaintainPlanEntryID; //器具保养计划单(Sc_MouldMaintainPlanBillSub_Plan)子内码
 
         public string HLastResult;
+        public string HRequestComDate;
+        public Int64 HRecentMainModule;
+        public Int64 HCumulativeModule;
+        public Int64 HProductionModule;
     }
 }
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBillMain.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBillMain.cs"
index 3e9af70..7b7d4fb 100644
--- "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBillMain.cs"
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBillMain.cs"
@@ -19,6 +19,7 @@
 
         public Int64 HMaintainLevID; //保养级别(gy_HMaintainLev)
         public Int64 HMouldID; //器具内码
+        public Int64 HErrWarQtys; // --预警次数
 
         public int HUSEORGID;
         public int HCREATEORGID;
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBillSub_Plan.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBillSub_Plan.cs"
new file mode 100644
index 0000000..58778ca
--- /dev/null
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainPlanBillSub_Plan.cs"
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Model
+{
+    public class ClsSc_MouldMaintainPlanBillSub_Plan : DBUtility.ClsXt_BaseBillSub
+    {
+        //============
+
+        public string HPlanDate; // --计划日期
+        public string HPlanBeginTime; //--计划开始时间点(默认00:00:00)
+        public string HPlanEndTime; //--计划结束时间点(默认23:59:59)
+        public string HSafeEndTime; //--安全结束时间点
+        public string HErrBeginTime; //--预警开始时间点  
+        public bool HRelationFlag; // --关联标记(是否已生成保养记录)
+        public bool HSendFlag; //是否发送信息 (发送钉钉)
+        public int HErrBeginQty; //预警开始次数
+        public int HUseNowQty; //当前使用次数
+        public int HUseEndQty; //结束使用次数
+    }
+}
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainRuleBillMain.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainRuleBillMain.cs"
index df49511..a8235ea 100644
--- "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainRuleBillMain.cs"
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\346\250\241\345\205\267\347\256\241\347\220\206/ClsSc_MouldMaintainRuleBillMain.cs"
@@ -15,5 +15,6 @@
         public Int64 HUseQtys; //保养冲刺数
         public Int64 HSafeDays; //保养安全天数
         public Int64 HErrWarDays; //保养预警天数
+        public Int64 HErrWarQtys; //保养预警次数
     }
 }
diff --git "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_MonthTarGetBillMain.cs" "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_MonthTarGetBillMain.cs"
index 246103b..7001db6 100644
--- "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_MonthTarGetBillMain.cs"
+++ "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_MonthTarGetBillMain.cs"
@@ -11,6 +11,7 @@
         public Int64 HProcKPITarGetVal;
         public Int64 HProcOmitTarGetVal;
         public Int64 HProcPPMTarGetVal;
+        public Int64 HProcTarGetVal; //各工序目标值
         public Int64 HInspectOrgID;
 
     }
diff --git "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_TakeSampleCheckBillMain.cs" "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_TakeSampleCheckBillMain.cs"
index df73bba..2e7b76c 100644
--- "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_TakeSampleCheckBillMain.cs"
+++ "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_TakeSampleCheckBillMain.cs"
@@ -32,6 +32,7 @@
         public Double HProdWeight1;  //dec(18,8) --产品单重1(界面默认为0) 
         public Double HProdWeight2;  //dec(18,8) --产品单重2(界面默认为0) 
         public Double HProdWeight3;  //dec(18,8) --产品单重3(界面默认为0) 
+        public string TestType;  //dec(18,8) --产品单重3(界面默认为0) 
 
     }
 }
diff --git "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_WorkSelfCheckBillSub.cs" "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_WorkSelfCheckBillSub.cs"
index 06c4a1a..cf19baa 100644
--- "a/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_WorkSelfCheckBillSub.cs"
+++ "b/Model/\350\264\250\346\243\200\347\256\241\347\220\206/ClsQC_WorkSelfCheckBillSub.cs"
@@ -20,7 +20,7 @@
         public string HInSpectValT;
         public string HDefectLevel;
         public bool HDestructInspect;
-        public double HKeyInspect;
+        public bool HKeyInspect;
         public string HStatus;
         public Int64 HSampleQty;
         public Int64 HSampleSchemeID;
diff --git "a/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBillSub_BatchSplit.cs" "b/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBillSub_BatchSplit.cs"
index af1f432..f5b267e 100644
--- "a/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBillSub_BatchSplit.cs"
+++ "b/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBillSub_BatchSplit.cs"
@@ -19,6 +19,8 @@
         public Int64 HInterID;//流转卡内码
         public string HBillNo;//流转卡号
         public string HBatchNo;//批次
+        public string HGroupNumber;//班组        
+        public Int64 HWorkShopID;//生产车间内码
     }
 }
 
diff --git "a/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_POOrderBillMain.cs" "b/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_POOrderBillMain.cs"
index 9ecfced..09e653c 100644
--- "a/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_POOrderBillMain.cs"
+++ "b/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_POOrderBillMain.cs"
@@ -49,6 +49,8 @@
         public string HPROVIDERADDRESS;   //供货方地址
         public Int64 HCORRESPONDORGID;	//对应组织
         public Int64 HPROVIDERCONTACTID;//供货方联系人
+        public string HLinkMan; //联系人
+        public string HLinkPhone;   //联系人电话
 
     }
 }
diff --git "a/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_PayableBillMain.cs" "b/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_PayableBillMain.cs"
index a8403b1..2058f37 100644
--- "a/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_PayableBillMain.cs"
+++ "b/Model/\351\207\207\350\264\255\347\256\241\347\220\206/ClsCg_PayableBillMain.cs"
@@ -17,6 +17,8 @@
         public string HReceiveDate;
         public string HExplanation;
         public string HInnerBillNo;
+        public Int64 HProjectID;            //项目编号
+        public string HInvoiceBillNo;//发票编号
 
         public bool HRedBlueFlag;       //bit       --红蓝字
         public string HHookMan;         //varchar   --勾稽人
diff --git a/PayM/bin/Debug/AxInterop.gregn6Lib.dll b/PayM/bin/Debug/AxInterop.gregn6Lib.dll
index 7057a24..877dc5c 100644
--- a/PayM/bin/Debug/AxInterop.gregn6Lib.dll
+++ b/PayM/bin/Debug/AxInterop.gregn6Lib.dll
Binary files differ
diff --git a/PayM/bin/Debug/BLL.dll b/PayM/bin/Debug/BLL.dll
index fa3da21..a5e2454 100644
--- a/PayM/bin/Debug/BLL.dll
+++ b/PayM/bin/Debug/BLL.dll
Binary files differ
diff --git a/PayM/bin/Debug/BLL.pdb b/PayM/bin/Debug/BLL.pdb
index 78c8104..18625b6 100644
--- a/PayM/bin/Debug/BLL.pdb
+++ b/PayM/bin/Debug/BLL.pdb
Binary files differ
diff --git a/PayM/bin/Debug/DAL.dll b/PayM/bin/Debug/DAL.dll
index 727f902..dc737d0 100644
--- a/PayM/bin/Debug/DAL.dll
+++ b/PayM/bin/Debug/DAL.dll
Binary files differ
diff --git a/PayM/bin/Debug/DAL.pdb b/PayM/bin/Debug/DAL.pdb
index e73f3b3..ac563dd 100644
--- a/PayM/bin/Debug/DAL.pdb
+++ b/PayM/bin/Debug/DAL.pdb
Binary files differ
diff --git a/PayM/bin/Debug/DBUtility.dll b/PayM/bin/Debug/DBUtility.dll
index 26dab8f..3cea673 100644
--- a/PayM/bin/Debug/DBUtility.dll
+++ b/PayM/bin/Debug/DBUtility.dll
Binary files differ
diff --git a/PayM/bin/Debug/DBUtility.pdb b/PayM/bin/Debug/DBUtility.pdb
index 6a63813..5734eb1 100644
--- a/PayM/bin/Debug/DBUtility.pdb
+++ b/PayM/bin/Debug/DBUtility.pdb
Binary files differ
diff --git a/PayM/bin/Debug/Interop.gregn6Lib.dll b/PayM/bin/Debug/Interop.gregn6Lib.dll
index 4a58863..9deaf25 100644
--- a/PayM/bin/Debug/Interop.gregn6Lib.dll
+++ b/PayM/bin/Debug/Interop.gregn6Lib.dll
Binary files differ
diff --git a/PayM/bin/Debug/Model.dll b/PayM/bin/Debug/Model.dll
index 7476821..030bf62 100644
--- a/PayM/bin/Debug/Model.dll
+++ b/PayM/bin/Debug/Model.dll
Binary files differ
diff --git a/PayM/bin/Debug/Model.pdb b/PayM/bin/Debug/Model.pdb
index 2883c5b..64ef3a1 100644
--- a/PayM/bin/Debug/Model.pdb
+++ b/PayM/bin/Debug/Model.pdb
Binary files differ
diff --git a/PayM/bin/Debug/PayM.dll b/PayM/bin/Debug/PayM.dll
index 946feac..67c9c22 100644
--- a/PayM/bin/Debug/PayM.dll
+++ b/PayM/bin/Debug/PayM.dll
Binary files differ
diff --git a/PayM/bin/Debug/PayM.pdb b/PayM/bin/Debug/PayM.pdb
index 115ad90..a3ccb8f 100644
--- a/PayM/bin/Debug/PayM.pdb
+++ b/PayM/bin/Debug/PayM.pdb
Binary files differ
diff --git a/PayM/bin/Debug/Pub_Class.dll b/PayM/bin/Debug/Pub_Class.dll
index f8dea4c..15122d7 100644
--- a/PayM/bin/Debug/Pub_Class.dll
+++ b/PayM/bin/Debug/Pub_Class.dll
Binary files differ
diff --git a/PayM/bin/Debug/Pub_Class.pdb b/PayM/bin/Debug/Pub_Class.pdb
index 7202bac..8d4a205 100644
--- a/PayM/bin/Debug/Pub_Class.pdb
+++ b/PayM/bin/Debug/Pub_Class.pdb
Binary files differ
diff --git a/PayM/bin/Debug/Pub_Control.dll b/PayM/bin/Debug/Pub_Control.dll
index 89cc5c2..04c1392 100644
--- a/PayM/bin/Debug/Pub_Control.dll
+++ b/PayM/bin/Debug/Pub_Control.dll
Binary files differ
diff --git a/PayM/bin/Debug/Pub_Control.pdb b/PayM/bin/Debug/Pub_Control.pdb
index 9891ba1..a1b2a96 100644
--- a/PayM/bin/Debug/Pub_Control.pdb
+++ b/PayM/bin/Debug/Pub_Control.pdb
Binary files differ
diff --git a/PayM/bin/Debug/SQLHelper.dll b/PayM/bin/Debug/SQLHelper.dll
index de4c686..47ac68c 100644
--- a/PayM/bin/Debug/SQLHelper.dll
+++ b/PayM/bin/Debug/SQLHelper.dll
Binary files differ
diff --git a/PayM/bin/Debug/SQLHelper.pdb b/PayM/bin/Debug/SQLHelper.pdb
index 90ec041..898000e 100644
--- a/PayM/bin/Debug/SQLHelper.pdb
+++ b/PayM/bin/Debug/SQLHelper.pdb
Binary files differ
diff --git a/PayM/obj/Debug/AxInterop.gregn6Lib.dll b/PayM/obj/Debug/AxInterop.gregn6Lib.dll
index 7057a24..877dc5c 100644
--- a/PayM/obj/Debug/AxInterop.gregn6Lib.dll
+++ b/PayM/obj/Debug/AxInterop.gregn6Lib.dll
Binary files differ
diff --git a/PayM/obj/Debug/BaseSet.Gy_DataInTmp_DuSubsidyItem.resources b/PayM/obj/Debug/BaseSet.Gy_DataInTmp_DuSubsidyItem.resources
index 0610035..1eec1a9 100644
--- a/PayM/obj/Debug/BaseSet.Gy_DataInTmp_DuSubsidyItem.resources
+++ b/PayM/obj/Debug/BaseSet.Gy_DataInTmp_DuSubsidyItem.resources
Binary files differ
diff --git a/PayM/obj/Debug/CostM.Pay_AccPayMentDayBillList.resources b/PayM/obj/Debug/CostM.Pay_AccPayMentDayBillList.resources
index f0a160a..f753f0d 100644
--- a/PayM/obj/Debug/CostM.Pay_AccPayMentDayBillList.resources
+++ b/PayM/obj/Debug/CostM.Pay_AccPayMentDayBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/CostM.Pay_PayMentBillAutoAddnew.resources b/PayM/obj/Debug/CostM.Pay_PayMentBillAutoAddnew.resources
index f0a160a..f753f0d 100644
--- a/PayM/obj/Debug/CostM.Pay_PayMentBillAutoAddnew.resources
+++ b/PayM/obj/Debug/CostM.Pay_PayMentBillAutoAddnew.resources
Binary files differ
diff --git a/PayM/obj/Debug/Interop.gregn6Lib.dll b/PayM/obj/Debug/Interop.gregn6Lib.dll
index 8bd7e5b..9deaf25 100644
--- a/PayM/obj/Debug/Interop.gregn6Lib.dll
+++ b/PayM/obj/Debug/Interop.gregn6Lib.dll
Binary files differ
diff --git a/PayM/obj/Debug/OAM.HR_EmpEngageRequestBill.resources b/PayM/obj/Debug/OAM.HR_EmpEngageRequestBill.resources
index c40f20f..fe67101 100644
--- a/PayM/obj/Debug/OAM.HR_EmpEngageRequestBill.resources
+++ b/PayM/obj/Debug/OAM.HR_EmpEngageRequestBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/OAM.HR_EmpEngageRequestBillList.resources b/PayM/obj/Debug/OAM.HR_EmpEngageRequestBillList.resources
index e1ec351..9db27ad 100644
--- a/PayM/obj/Debug/OAM.HR_EmpEngageRequestBillList.resources
+++ b/PayM/obj/Debug/OAM.HR_EmpEngageRequestBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Err_MonthExpenseEntryBill.resources b/PayM/obj/Debug/PayM.Err_MonthExpenseEntryBill.resources
index 42d95f8..01c9556 100644
--- a/PayM/obj/Debug/PayM.Err_MonthExpenseEntryBill.resources
+++ b/PayM/obj/Debug/PayM.Err_MonthExpenseEntryBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.HR_ContractBookBill.resources b/PayM/obj/Debug/PayM.HR_ContractBookBill.resources
index e7858d7..787985c 100644
--- a/PayM/obj/Debug/PayM.HR_ContractBookBill.resources
+++ b/PayM/obj/Debug/PayM.HR_ContractBookBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.HR_ContractBookBillList.resources b/PayM/obj/Debug/PayM.HR_ContractBookBillList.resources
index b5a8f9f..26509ac 100644
--- a/PayM/obj/Debug/PayM.HR_ContractBookBillList.resources
+++ b/PayM/obj/Debug/PayM.HR_ContractBookBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.HR_EmpChangeBill.resources b/PayM/obj/Debug/PayM.HR_EmpChangeBill.resources
index d101c09..8243501 100644
--- a/PayM/obj/Debug/PayM.HR_EmpChangeBill.resources
+++ b/PayM/obj/Debug/PayM.HR_EmpChangeBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.HR_EmpChangeBillList.resources b/PayM/obj/Debug/PayM.HR_EmpChangeBillList.resources
index b5a8f9f..26509ac 100644
--- a/PayM/obj/Debug/PayM.HR_EmpChangeBillList.resources
+++ b/PayM/obj/Debug/PayM.HR_EmpChangeBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.HR_EmpDimissionBill.resources b/PayM/obj/Debug/PayM.HR_EmpDimissionBill.resources
index 3ca2b2f..c9652fd 100644
--- a/PayM/obj/Debug/PayM.HR_EmpDimissionBill.resources
+++ b/PayM/obj/Debug/PayM.HR_EmpDimissionBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.HR_EmpDimissionBillList.resources b/PayM/obj/Debug/PayM.HR_EmpDimissionBillList.resources
index 46debfd..0831b84 100644
--- a/PayM/obj/Debug/PayM.HR_EmpDimissionBillList.resources
+++ b/PayM/obj/Debug/PayM.HR_EmpDimissionBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.HR_FamilyMemberBill.resources b/PayM/obj/Debug/PayM.HR_FamilyMemberBill.resources
index e7858d7..787985c 100644
--- a/PayM/obj/Debug/PayM.HR_FamilyMemberBill.resources
+++ b/PayM/obj/Debug/PayM.HR_FamilyMemberBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.HR_FamilyMemberBillList.resources b/PayM/obj/Debug/PayM.HR_FamilyMemberBillList.resources
index b5a8f9f..26509ac 100644
--- a/PayM/obj/Debug/PayM.HR_FamilyMemberBillList.resources
+++ b/PayM/obj/Debug/PayM.HR_FamilyMemberBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.HR_InsuranceBookBill.resources b/PayM/obj/Debug/PayM.HR_InsuranceBookBill.resources
index e7858d7..787985c 100644
--- a/PayM/obj/Debug/PayM.HR_InsuranceBookBill.resources
+++ b/PayM/obj/Debug/PayM.HR_InsuranceBookBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.HR_InsuranceBookBillList.resources b/PayM/obj/Debug/PayM.HR_InsuranceBookBillList.resources
index b5a8f9f..26509ac 100644
--- a/PayM/obj/Debug/PayM.HR_InsuranceBookBillList.resources
+++ b/PayM/obj/Debug/PayM.HR_InsuranceBookBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.HR_LearnHistoryBill.resources b/PayM/obj/Debug/PayM.HR_LearnHistoryBill.resources
index e7858d7..787985c 100644
--- a/PayM/obj/Debug/PayM.HR_LearnHistoryBill.resources
+++ b/PayM/obj/Debug/PayM.HR_LearnHistoryBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.HR_LearnHistoryBillList.resources b/PayM/obj/Debug/PayM.HR_LearnHistoryBillList.resources
index b5a8f9f..26509ac 100644
--- a/PayM/obj/Debug/PayM.HR_LearnHistoryBillList.resources
+++ b/PayM/obj/Debug/PayM.HR_LearnHistoryBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.HR_PaperPhotoBill.resources b/PayM/obj/Debug/PayM.HR_PaperPhotoBill.resources
index e7858d7..787985c 100644
--- a/PayM/obj/Debug/PayM.HR_PaperPhotoBill.resources
+++ b/PayM/obj/Debug/PayM.HR_PaperPhotoBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.HR_PaperPhotoBillList.resources b/PayM/obj/Debug/PayM.HR_PaperPhotoBillList.resources
index b5a8f9f..26509ac 100644
--- a/PayM/obj/Debug/PayM.HR_PaperPhotoBillList.resources
+++ b/PayM/obj/Debug/PayM.HR_PaperPhotoBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.HR_RewardsPunishBill.resources b/PayM/obj/Debug/PayM.HR_RewardsPunishBill.resources
index e7858d7..787985c 100644
--- a/PayM/obj/Debug/PayM.HR_RewardsPunishBill.resources
+++ b/PayM/obj/Debug/PayM.HR_RewardsPunishBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.HR_RewardsPunishBillList.resources b/PayM/obj/Debug/PayM.HR_RewardsPunishBillList.resources
index b5a8f9f..26509ac 100644
--- a/PayM/obj/Debug/PayM.HR_RewardsPunishBillList.resources
+++ b/PayM/obj/Debug/PayM.HR_RewardsPunishBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.HR_WorkInjuryBill.resources b/PayM/obj/Debug/PayM.HR_WorkInjuryBill.resources
index e7858d7..787985c 100644
--- a/PayM/obj/Debug/PayM.HR_WorkInjuryBill.resources
+++ b/PayM/obj/Debug/PayM.HR_WorkInjuryBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.HR_WorkInjuryBillList.resources b/PayM/obj/Debug/PayM.HR_WorkInjuryBillList.resources
index b5a8f9f..26509ac 100644
--- a/PayM/obj/Debug/PayM.HR_WorkInjuryBillList.resources
+++ b/PayM/obj/Debug/PayM.HR_WorkInjuryBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.HR_WorkSkillBill.resources b/PayM/obj/Debug/PayM.HR_WorkSkillBill.resources
index e7858d7..787985c 100644
--- a/PayM/obj/Debug/PayM.HR_WorkSkillBill.resources
+++ b/PayM/obj/Debug/PayM.HR_WorkSkillBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.HR_WorkSkillBillList.resources b/PayM/obj/Debug/PayM.HR_WorkSkillBillList.resources
index b5a8f9f..26509ac 100644
--- a/PayM/obj/Debug/PayM.HR_WorkSkillBillList.resources
+++ b/PayM/obj/Debug/PayM.HR_WorkSkillBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.HR_WorkStoryBill.resources b/PayM/obj/Debug/PayM.HR_WorkStoryBill.resources
index e7858d7..787985c 100644
--- a/PayM/obj/Debug/PayM.HR_WorkStoryBill.resources
+++ b/PayM/obj/Debug/PayM.HR_WorkStoryBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.HR_WorkStoryBillList.resources b/PayM/obj/Debug/PayM.HR_WorkStoryBillList.resources
index b5a8f9f..26509ac 100644
--- a/PayM/obj/Debug/PayM.HR_WorkStoryBillList.resources
+++ b/PayM/obj/Debug/PayM.HR_WorkStoryBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.KQ_sourceReport.resources b/PayM/obj/Debug/PayM.KQ_sourceReport.resources
index 42d95f8..01c9556 100644
--- a/PayM/obj/Debug/PayM.KQ_sourceReport.resources
+++ b/PayM/obj/Debug/PayM.KQ_sourceReport.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_CarOutApplyBill.resources b/PayM/obj/Debug/PayM.Pay_CarOutApplyBill.resources
index dbf6a6b..e620e33 100644
--- a/PayM/obj/Debug/PayM.Pay_CarOutApplyBill.resources
+++ b/PayM/obj/Debug/PayM.Pay_CarOutApplyBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_CarOutApplyBillList.resources b/PayM/obj/Debug/PayM.Pay_CarOutApplyBillList.resources
index 4f17f92..a70b498 100644
--- a/PayM/obj/Debug/PayM.Pay_CarOutApplyBillList.resources
+++ b/PayM/obj/Debug/PayM.Pay_CarOutApplyBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_DuSubsidyItemBill.resources b/PayM/obj/Debug/PayM.Pay_DuSubsidyItemBill.resources
index 3182b62..89f3885 100644
--- a/PayM/obj/Debug/PayM.Pay_DuSubsidyItemBill.resources
+++ b/PayM/obj/Debug/PayM.Pay_DuSubsidyItemBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_DuSubsidyItemBillList.resources b/PayM/obj/Debug/PayM.Pay_DuSubsidyItemBillList.resources
index 4f17f92..a70b498 100644
--- a/PayM/obj/Debug/PayM.Pay_DuSubsidyItemBillList.resources
+++ b/PayM/obj/Debug/PayM.Pay_DuSubsidyItemBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_EmpPayMentSumReport.resources b/PayM/obj/Debug/PayM.Pay_EmpPayMentSumReport.resources
index 42d95f8..01c9556 100644
--- a/PayM/obj/Debug/PayM.Pay_EmpPayMentSumReport.resources
+++ b/PayM/obj/Debug/PayM.Pay_EmpPayMentSumReport.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_EmpWorkQtyEntryReport.resources b/PayM/obj/Debug/PayM.Pay_EmpWorkQtyEntryReport.resources
index 42d95f8..01c9556 100644
--- a/PayM/obj/Debug/PayM.Pay_EmpWorkQtyEntryReport.resources
+++ b/PayM/obj/Debug/PayM.Pay_EmpWorkQtyEntryReport.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_ErrWorkTimesRequestBill.resources b/PayM/obj/Debug/PayM.Pay_ErrWorkTimesRequestBill.resources
index 0359eb0..9e00c6e 100644
--- a/PayM/obj/Debug/PayM.Pay_ErrWorkTimesRequestBill.resources
+++ b/PayM/obj/Debug/PayM.Pay_ErrWorkTimesRequestBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_ErrWorkTimesRequestBillList.resources b/PayM/obj/Debug/PayM.Pay_ErrWorkTimesRequestBillList.resources
index 4f17f92..a70b498 100644
--- a/PayM/obj/Debug/PayM.Pay_ErrWorkTimesRequestBillList.resources
+++ b/PayM/obj/Debug/PayM.Pay_ErrWorkTimesRequestBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_ErrWorkTimesSendBill.resources b/PayM/obj/Debug/PayM.Pay_ErrWorkTimesSendBill.resources
index ce5a71e..592d8c1 100644
--- a/PayM/obj/Debug/PayM.Pay_ErrWorkTimesSendBill.resources
+++ b/PayM/obj/Debug/PayM.Pay_ErrWorkTimesSendBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_ErrWorkTimesSendBillList.resources b/PayM/obj/Debug/PayM.Pay_ErrWorkTimesSendBillList.resources
index 50ce328..5003e21 100644
--- a/PayM/obj/Debug/PayM.Pay_ErrWorkTimesSendBillList.resources
+++ b/PayM/obj/Debug/PayM.Pay_ErrWorkTimesSendBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_GetNeedCheckErrWorkTimesSendBillList.resources b/PayM/obj/Debug/PayM.Pay_GetNeedCheckErrWorkTimesSendBillList.resources
index ef87781..63c32a2 100644
--- a/PayM/obj/Debug/PayM.Pay_GetNeedCheckErrWorkTimesSendBillList.resources
+++ b/PayM/obj/Debug/PayM.Pay_GetNeedCheckErrWorkTimesSendBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_GroupBalBill.resources b/PayM/obj/Debug/PayM.Pay_GroupBalBill.resources
index 52df846..cd05a9f 100644
--- a/PayM/obj/Debug/PayM.Pay_GroupBalBill.resources
+++ b/PayM/obj/Debug/PayM.Pay_GroupBalBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_GroupBalBillList.resources b/PayM/obj/Debug/PayM.Pay_GroupBalBillList.resources
index 4ece476..96bd928 100644
--- a/PayM/obj/Debug/PayM.Pay_GroupBalBillList.resources
+++ b/PayM/obj/Debug/PayM.Pay_GroupBalBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_InnerScrap.resources b/PayM/obj/Debug/PayM.Pay_InnerScrap.resources
index 42d95f8..01c9556 100644
--- a/PayM/obj/Debug/PayM.Pay_InnerScrap.resources
+++ b/PayM/obj/Debug/PayM.Pay_InnerScrap.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_MonthExpenseEntryBillList.resources b/PayM/obj/Debug/PayM.Pay_MonthExpenseEntryBillList.resources
index f0a160a..f753f0d 100644
--- a/PayM/obj/Debug/PayM.Pay_MonthExpenseEntryBillList.resources
+++ b/PayM/obj/Debug/PayM.Pay_MonthExpenseEntryBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_MonthExpenseEntryBillReport.resources b/PayM/obj/Debug/PayM.Pay_MonthExpenseEntryBillReport.resources
index 42d95f8..01c9556 100644
--- a/PayM/obj/Debug/PayM.Pay_MonthExpenseEntryBillReport.resources
+++ b/PayM/obj/Debug/PayM.Pay_MonthExpenseEntryBillReport.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_MonthSubsidyEntryBillReport.resources b/PayM/obj/Debug/PayM.Pay_MonthSubsidyEntryBillReport.resources
index d867661..8b7dfec 100644
--- a/PayM/obj/Debug/PayM.Pay_MonthSubsidyEntryBillReport.resources
+++ b/PayM/obj/Debug/PayM.Pay_MonthSubsidyEntryBillReport.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_MonthSubsidyEntryBillReportMX.resources b/PayM/obj/Debug/PayM.Pay_MonthSubsidyEntryBillReportMX.resources
index 42d95f8..01c9556 100644
--- a/PayM/obj/Debug/PayM.Pay_MonthSubsidyEntryBillReportMX.resources
+++ b/PayM/obj/Debug/PayM.Pay_MonthSubsidyEntryBillReportMX.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_MonthSubsidyYearReport.resources b/PayM/obj/Debug/PayM.Pay_MonthSubsidyYearReport.resources
index c7318e2..e267dbd 100644
--- a/PayM/obj/Debug/PayM.Pay_MonthSubsidyYearReport.resources
+++ b/PayM/obj/Debug/PayM.Pay_MonthSubsidyYearReport.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_MonthWriteBillReport.resources b/PayM/obj/Debug/PayM.Pay_MonthWriteBillReport.resources
index cc56509..833c5f6 100644
--- a/PayM/obj/Debug/PayM.Pay_MonthWriteBillReport.resources
+++ b/PayM/obj/Debug/PayM.Pay_MonthWriteBillReport.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_MonthWriteBillReportMX.resources b/PayM/obj/Debug/PayM.Pay_MonthWriteBillReportMX.resources
index 42d95f8..01c9556 100644
--- a/PayM/obj/Debug/PayM.Pay_MonthWriteBillReportMX.resources
+++ b/PayM/obj/Debug/PayM.Pay_MonthWriteBillReportMX.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_MonthWriteBillReportMX2.resources b/PayM/obj/Debug/PayM.Pay_MonthWriteBillReportMX2.resources
index 42d95f8..01c9556 100644
--- a/PayM/obj/Debug/PayM.Pay_MonthWriteBillReportMX2.resources
+++ b/PayM/obj/Debug/PayM.Pay_MonthWriteBillReportMX2.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_NoWorkTimesReport.resources b/PayM/obj/Debug/PayM.Pay_NoWorkTimesReport.resources
index 42d95f8..01c9556 100644
--- a/PayM/obj/Debug/PayM.Pay_NoWorkTimesReport.resources
+++ b/PayM/obj/Debug/PayM.Pay_NoWorkTimesReport.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_OtherBalBill.resources b/PayM/obj/Debug/PayM.Pay_OtherBalBill.resources
index c2fccff..9f5486e 100644
--- a/PayM/obj/Debug/PayM.Pay_OtherBalBill.resources
+++ b/PayM/obj/Debug/PayM.Pay_OtherBalBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_OtherBalBillList.resources b/PayM/obj/Debug/PayM.Pay_OtherBalBillList.resources
index b5a8f9f..26509ac 100644
--- a/PayM/obj/Debug/PayM.Pay_OtherBalBillList.resources
+++ b/PayM/obj/Debug/PayM.Pay_OtherBalBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_OtherMoney_Dlg.resources b/PayM/obj/Debug/PayM.Pay_OtherMoney_Dlg.resources
index 9a50115..2e88a39 100644
--- a/PayM/obj/Debug/PayM.Pay_OtherMoney_Dlg.resources
+++ b/PayM/obj/Debug/PayM.Pay_OtherMoney_Dlg.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_OutApplyBill.resources b/PayM/obj/Debug/PayM.Pay_OutApplyBill.resources
index 3509a63..47c1be3 100644
--- a/PayM/obj/Debug/PayM.Pay_OutApplyBill.resources
+++ b/PayM/obj/Debug/PayM.Pay_OutApplyBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_OutApplyBillList.resources b/PayM/obj/Debug/PayM.Pay_OutApplyBillList.resources
index 2137550..96b3e13 100644
--- a/PayM/obj/Debug/PayM.Pay_OutApplyBillList.resources
+++ b/PayM/obj/Debug/PayM.Pay_OutApplyBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_OuterScrap.resources b/PayM/obj/Debug/PayM.Pay_OuterScrap.resources
index 42d95f8..01c9556 100644
--- a/PayM/obj/Debug/PayM.Pay_OuterScrap.resources
+++ b/PayM/obj/Debug/PayM.Pay_OuterScrap.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_OverApplyBill.resources b/PayM/obj/Debug/PayM.Pay_OverApplyBill.resources
index a594861..4fcbbac 100644
--- a/PayM/obj/Debug/PayM.Pay_OverApplyBill.resources
+++ b/PayM/obj/Debug/PayM.Pay_OverApplyBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_OverApplyBillList.resources b/PayM/obj/Debug/PayM.Pay_OverApplyBillList.resources
index b5a8f9f..26509ac 100644
--- a/PayM/obj/Debug/PayM.Pay_OverApplyBillList.resources
+++ b/PayM/obj/Debug/PayM.Pay_OverApplyBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_PayMentBill.resources b/PayM/obj/Debug/PayM.Pay_PayMentBill.resources
index 007640b..a44b342 100644
--- a/PayM/obj/Debug/PayM.Pay_PayMentBill.resources
+++ b/PayM/obj/Debug/PayM.Pay_PayMentBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_PayMentBillList.resources b/PayM/obj/Debug/PayM.Pay_PayMentBillList.resources
index a2a27d3..430f1cc4 100644
--- a/PayM/obj/Debug/PayM.Pay_PayMentBillList.resources
+++ b/PayM/obj/Debug/PayM.Pay_PayMentBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_PayMentDayBill.resources b/PayM/obj/Debug/PayM.Pay_PayMentDayBill.resources
index 849515d..2ca7d0f 100644
--- a/PayM/obj/Debug/PayM.Pay_PayMentDayBill.resources
+++ b/PayM/obj/Debug/PayM.Pay_PayMentDayBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_PayMentDayBillList.resources b/PayM/obj/Debug/PayM.Pay_PayMentDayBillList.resources
index b5a8f9f..26509ac 100644
--- a/PayM/obj/Debug/PayM.Pay_PayMentDayBillList.resources
+++ b/PayM/obj/Debug/PayM.Pay_PayMentDayBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_PayMentDeptSendList.resources b/PayM/obj/Debug/PayM.Pay_PayMentDeptSendList.resources
index 42d95f8..01c9556 100644
--- a/PayM/obj/Debug/PayM.Pay_PayMentDeptSendList.resources
+++ b/PayM/obj/Debug/PayM.Pay_PayMentDeptSendList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_PayMentDeptYearReport.resources b/PayM/obj/Debug/PayM.Pay_PayMentDeptYearReport.resources
index 42d95f8..01c9556 100644
--- a/PayM/obj/Debug/PayM.Pay_PayMentDeptYearReport.resources
+++ b/PayM/obj/Debug/PayM.Pay_PayMentDeptYearReport.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_PayMentPrintReport.resources b/PayM/obj/Debug/PayM.Pay_PayMentPrintReport.resources
index 42d95f8..01c9556 100644
--- a/PayM/obj/Debug/PayM.Pay_PayMentPrintReport.resources
+++ b/PayM/obj/Debug/PayM.Pay_PayMentPrintReport.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_PayMentSendList.resources b/PayM/obj/Debug/PayM.Pay_PayMentSendList.resources
index 42d95f8..01c9556 100644
--- a/PayM/obj/Debug/PayM.Pay_PayMentSendList.resources
+++ b/PayM/obj/Debug/PayM.Pay_PayMentSendList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_PayMentYearReport.resources b/PayM/obj/Debug/PayM.Pay_PayMentYearReport.resources
index 42d95f8..01c9556 100644
--- a/PayM/obj/Debug/PayM.Pay_PayMentYearReport.resources
+++ b/PayM/obj/Debug/PayM.Pay_PayMentYearReport.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_ProcPriceRequestBill.resources b/PayM/obj/Debug/PayM.Pay_ProcPriceRequestBill.resources
index d101c09..8243501 100644
--- a/PayM/obj/Debug/PayM.Pay_ProcPriceRequestBill.resources
+++ b/PayM/obj/Debug/PayM.Pay_ProcPriceRequestBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_ProcPriceRequestBillList.resources b/PayM/obj/Debug/PayM.Pay_ProcPriceRequestBillList.resources
index b5a8f9f..26509ac 100644
--- a/PayM/obj/Debug/PayM.Pay_ProcPriceRequestBillList.resources
+++ b/PayM/obj/Debug/PayM.Pay_ProcPriceRequestBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_ProdWorkQtyEntryReport.resources b/PayM/obj/Debug/PayM.Pay_ProdWorkQtyEntryReport.resources
index 42d95f8..01c9556 100644
--- a/PayM/obj/Debug/PayM.Pay_ProdWorkQtyEntryReport.resources
+++ b/PayM/obj/Debug/PayM.Pay_ProdWorkQtyEntryReport.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_ProdWorkQtySumReport.resources b/PayM/obj/Debug/PayM.Pay_ProdWorkQtySumReport.resources
index 42d95f8..01c9556 100644
--- a/PayM/obj/Debug/PayM.Pay_ProdWorkQtySumReport.resources
+++ b/PayM/obj/Debug/PayM.Pay_ProdWorkQtySumReport.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_SingleBalBill.resources b/PayM/obj/Debug/PayM.Pay_SingleBalBill.resources
index 119ac39..01f83ad 100644
--- a/PayM/obj/Debug/PayM.Pay_SingleBalBill.resources
+++ b/PayM/obj/Debug/PayM.Pay_SingleBalBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_SingleBalBillList.resources b/PayM/obj/Debug/PayM.Pay_SingleBalBillList.resources
index b5a8f9f..26509ac 100644
--- a/PayM/obj/Debug/PayM.Pay_SingleBalBillList.resources
+++ b/PayM/obj/Debug/PayM.Pay_SingleBalBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_SingleBalBill_Enter.resources b/PayM/obj/Debug/PayM.Pay_SingleBalBill_Enter.resources
index 001c721..0edfd4b 100644
--- a/PayM/obj/Debug/PayM.Pay_SingleBalBill_Enter.resources
+++ b/PayM/obj/Debug/PayM.Pay_SingleBalBill_Enter.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_SingleBalBill_KS.resources b/PayM/obj/Debug/PayM.Pay_SingleBalBill_KS.resources
index 000011a..66d7d86 100644
--- a/PayM/obj/Debug/PayM.Pay_SingleBalBill_KS.resources
+++ b/PayM/obj/Debug/PayM.Pay_SingleBalBill_KS.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_SubsidyChangeBill.resources b/PayM/obj/Debug/PayM.Pay_SubsidyChangeBill.resources
index 60f52ba..323dd9f 100644
--- a/PayM/obj/Debug/PayM.Pay_SubsidyChangeBill.resources
+++ b/PayM/obj/Debug/PayM.Pay_SubsidyChangeBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_SubsidyChangeBillList.resources b/PayM/obj/Debug/PayM.Pay_SubsidyChangeBillList.resources
index 4f17f92..a70b498 100644
--- a/PayM/obj/Debug/PayM.Pay_SubsidyChangeBillList.resources
+++ b/PayM/obj/Debug/PayM.Pay_SubsidyChangeBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_WorkTimesBill.resources b/PayM/obj/Debug/PayM.Pay_WorkTimesBill.resources
index 9a1832f..06ccee7 100644
--- a/PayM/obj/Debug/PayM.Pay_WorkTimesBill.resources
+++ b/PayM/obj/Debug/PayM.Pay_WorkTimesBill.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_WorkTimesBillList.resources b/PayM/obj/Debug/PayM.Pay_WorkTimesBillList.resources
index b5a8f9f..26509ac 100644
--- a/PayM/obj/Debug/PayM.Pay_WorkTimesBillList.resources
+++ b/PayM/obj/Debug/PayM.Pay_WorkTimesBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_WorkTimesCardBillList.resources b/PayM/obj/Debug/PayM.Pay_WorkTimesCardBillList.resources
index f0a160a..f753f0d 100644
--- a/PayM/obj/Debug/PayM.Pay_WorkTimesCardBillList.resources
+++ b/PayM/obj/Debug/PayM.Pay_WorkTimesCardBillList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_WorkTimesList.resources b/PayM/obj/Debug/PayM.Pay_WorkTimesList.resources
index 42d95f8..01c9556 100644
--- a/PayM/obj/Debug/PayM.Pay_WorkTimesList.resources
+++ b/PayM/obj/Debug/PayM.Pay_WorkTimesList.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.Pay_YearToCashBillReport.resources b/PayM/obj/Debug/PayM.Pay_YearToCashBillReport.resources
index 42d95f8..01c9556 100644
--- a/PayM/obj/Debug/PayM.Pay_YearToCashBillReport.resources
+++ b/PayM/obj/Debug/PayM.Pay_YearToCashBillReport.resources
Binary files differ
diff --git a/PayM/obj/Debug/PayM.csproj.GenerateResource.Cache b/PayM/obj/Debug/PayM.csproj.GenerateResource.Cache
index 859e9de..fa24017 100644
--- a/PayM/obj/Debug/PayM.csproj.GenerateResource.Cache
+++ b/PayM/obj/Debug/PayM.csproj.GenerateResource.Cache
Binary files differ
diff --git a/PayM/obj/Debug/PayM.csproj.ResolveComReference.cache b/PayM/obj/Debug/PayM.csproj.ResolveComReference.cache
index df5e8a8..a7770f4 100644
--- a/PayM/obj/Debug/PayM.csproj.ResolveComReference.cache
+++ b/PayM/obj/Debug/PayM.csproj.ResolveComReference.cache
Binary files differ
diff --git a/PayM/obj/Debug/PayM.dll b/PayM/obj/Debug/PayM.dll
index 946feac..67c9c22 100644
--- a/PayM/obj/Debug/PayM.dll
+++ b/PayM/obj/Debug/PayM.dll
Binary files differ
diff --git a/PayM/obj/Debug/PayM.pdb b/PayM/obj/Debug/PayM.pdb
index 115ad90..a3ccb8f 100644
--- a/PayM/obj/Debug/PayM.pdb
+++ b/PayM/obj/Debug/PayM.pdb
Binary files differ
diff --git a/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs b/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs
index 4367dd5..b6f478a 100644
--- a/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs
+++ b/Pub_Class/CustomerCls/ClsXt_SystemParameter.cs
@@ -1820,7 +1820,12 @@
                     {
                         omodel.MES_StationOutBill_MustBeginWorkCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                     }
-
+                    //=========出站汇报单
+                    //自动审核
+                    if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "MES_StationOutBill_AutoCheck")
+                    {
+                        omodel.MES_StationOutBill_AutoCheck = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
+                    }
                     //=========设备工艺参数点检                   
                     if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "SB_EquipICMOTechParamBill_MustBeginWorkCtl")
                     {
@@ -2004,6 +2009,14 @@
                     {
                         omodel.YS_ReceiveBill_AutoCheck = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                     }
+
+                    //=========考勤汇报单
+                    //自动审核
+                    if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Pay_WorkTimesBill_AutoCheck")
+                    {
+                        omodel.Pay_WorkTimesBill_AutoCheck = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
+                    }
+
                     ////=========工序进站单
                     ////自动匹配流水号
                     //if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "MES_StationBill_ProcNo")
@@ -3746,7 +3759,14 @@
                         omodel.MES_StationEntrustOutBill_DeleteCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                     }
 
-                    
+
+
+                    //工资系统参数
+                    //==============================考勤汇报单
+                    if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Pay_WorkTimesBill_AutoCheck")
+                    {
+                        omodel.Pay_WorkTimesBill_AutoCheck = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
+                    }
 
 
                     //=======JIT系统参数
diff --git a/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs b/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs
index e040760..85f8cd0 100644
--- a/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs
+++ b/Pub_Class/CustomerCls/ClsXt_SystemParameterMain.cs
@@ -660,6 +660,9 @@
         //收款单
         public string YS_ReceiveBill_AutoCheck;       //保存后是否自动审核
 
+        //考勤汇报单
+        public string Pay_WorkTimesBill_AutoCheck;   //保存后是否自动审核
+
         //下模单
         public string Sc_MouldLowerBill_MouldUpper;  //必须做上模单才能生成下模单
 
diff --git a/SyntacticSugar/bin/Debug/SyntacticSugar.dll b/SyntacticSugar/bin/Debug/SyntacticSugar.dll
index 55b6c53..a04b391 100644
--- a/SyntacticSugar/bin/Debug/SyntacticSugar.dll
+++ b/SyntacticSugar/bin/Debug/SyntacticSugar.dll
Binary files differ
diff --git a/SyntacticSugar/bin/Debug/SyntacticSugar.pdb b/SyntacticSugar/bin/Debug/SyntacticSugar.pdb
index ceb9ba6..508e325 100644
--- a/SyntacticSugar/bin/Debug/SyntacticSugar.pdb
+++ b/SyntacticSugar/bin/Debug/SyntacticSugar.pdb
Binary files differ
diff --git a/SyntacticSugar/constant/EmptyConstant.cs b/SyntacticSugar/constant/EmptyConstant.cs
new file mode 100644
index 0000000..47d7bc1
--- /dev/null
+++ b/SyntacticSugar/constant/EmptyConstant.cs
@@ -0,0 +1,16 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SyntacticSugar.constant
+{
+    public static class EmptyConstant
+    {
+        /// <summary>
+        /// 绌�
+        /// </summary>
+        public static int EMPTY = 0;
+    }
+}
diff --git a/SyntacticSugar/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/SyntacticSugar/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index 073b9d4..0000000
--- a/SyntacticSugar/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
+++ /dev/null
Binary files differ
diff --git a/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt b/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt
index cd112e2..ac3e0df 100644
--- a/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt
+++ b/SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
 D:\vs\椤圭洰浠g爜\MES-WEB-API\MES-WEB-API\SyntacticSugar\bin\Debug\SyntacticSugar.dll
 D:\vs\椤圭洰浠g爜\MES-WEB-API\MES-WEB-API\SyntacticSugar\bin\Debug\SyntacticSugar.pdb
 D:\vs\椤圭洰浠g爜\MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.CoreCompileInputs.cache
@@ -16,3 +17,11 @@
 D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.dll
 D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.pdb
 D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.AssemblyReference.cache
+=======
+D:\GIT浠撳簱\MES-WEB-API\SyntacticSugar\bin\Debug\SyntacticSugar.dll
+D:\GIT浠撳簱\MES-WEB-API\SyntacticSugar\bin\Debug\SyntacticSugar.pdb
+D:\GIT浠撳簱\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.AssemblyReference.cache
+D:\GIT浠撳簱\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.CoreCompileInputs.cache
+D:\GIT浠撳簱\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.dll
+D:\GIT浠撳簱\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.pdb
+>>>>>>> fa997fd4354db116cfae04f1232779ce0b38f629
diff --git a/SyntacticSugar/obj/Debug/SyntacticSugar.dll b/SyntacticSugar/obj/Debug/SyntacticSugar.dll
index 55b6c53..a04b391 100644
--- a/SyntacticSugar/obj/Debug/SyntacticSugar.dll
+++ b/SyntacticSugar/obj/Debug/SyntacticSugar.dll
Binary files differ
diff --git a/SyntacticSugar/obj/Debug/SyntacticSugar.pdb b/SyntacticSugar/obj/Debug/SyntacticSugar.pdb
index ceb9ba6..508e325 100644
--- a/SyntacticSugar/obj/Debug/SyntacticSugar.pdb
+++ b/SyntacticSugar/obj/Debug/SyntacticSugar.pdb
Binary files differ
diff --git a/SyntacticSugar/obj/Release/.NETFramework,Version=v4.5.AssemblyAttributes.cs b/SyntacticSugar/obj/Release/.NETFramework,Version=v4.5.AssemblyAttributes.cs
deleted file mode 100644
index e5dc9b8..0000000
--- a/SyntacticSugar/obj/Release/.NETFramework,Version=v4.5.AssemblyAttributes.cs
+++ /dev/null
@@ -1,4 +0,0 @@
-// <autogenerated />
-using System;
-using System.Reflection;
-[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")]
diff --git a/SyntacticSugar/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/SyntacticSugar/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index 5b8f43b..0000000
--- a/SyntacticSugar/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache
+++ /dev/null
Binary files differ
diff --git a/SyntacticSugar/obj/Release/SyntacticSugar.csproj.AssemblyReference.cache b/SyntacticSugar/obj/Release/SyntacticSugar.csproj.AssemblyReference.cache
deleted file mode 100644
index 7a33952..0000000
--- a/SyntacticSugar/obj/Release/SyntacticSugar.csproj.AssemblyReference.cache
+++ /dev/null
Binary files differ
diff --git a/SyntacticSugar/obj/Release/SyntacticSugar.csproj.CoreCompileInputs.cache b/SyntacticSugar/obj/Release/SyntacticSugar.csproj.CoreCompileInputs.cache
deleted file mode 100644
index ef71615..0000000
--- a/SyntacticSugar/obj/Release/SyntacticSugar.csproj.CoreCompileInputs.cache
+++ /dev/null
@@ -1 +0,0 @@
-ebba85c1baaf628c0afa612ea676c9e3de2b6fa1c6f341c19042c3220637a7c3
diff --git a/SyntacticSugar/obj/Release/SyntacticSugar.csproj.FileListAbsolute.txt b/SyntacticSugar/obj/Release/SyntacticSugar.csproj.FileListAbsolute.txt
deleted file mode 100644
index 631be78..0000000
--- a/SyntacticSugar/obj/Release/SyntacticSugar.csproj.FileListAbsolute.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-D:\vs\椤圭洰浠g爜\MES-WEB-API\MES-WEB-API\SyntacticSugar\bin\Release\SyntacticSugar.dll
-D:\vs\椤圭洰浠g爜\MES-WEB-API\MES-WEB-API\SyntacticSugar\bin\Release\SyntacticSugar.pdb
-D:\vs\椤圭洰浠g爜\MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Release\SyntacticSugar.csproj.CoreCompileInputs.cache
-D:\vs\椤圭洰浠g爜\MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Release\SyntacticSugar.dll
-D:\vs\椤圭洰浠g爜\MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Release\SyntacticSugar.pdb
-D:\vs\椤圭洰浠g爜\MES-WEB-API\MES-WEB-API\SyntacticSugar\obj\Release\SyntacticSugar.csproj.AssemblyReference.cache
diff --git a/SyntacticSugar/obj/Release/SyntacticSugar.dll b/SyntacticSugar/obj/Release/SyntacticSugar.dll
deleted file mode 100644
index 50183ae..0000000
--- a/SyntacticSugar/obj/Release/SyntacticSugar.dll
+++ /dev/null
Binary files differ
diff --git a/SyntacticSugar/obj/Release/SyntacticSugar.pdb b/SyntacticSugar/obj/Release/SyntacticSugar.pdb
deleted file mode 100644
index 9cb9e37..0000000
--- a/SyntacticSugar/obj/Release/SyntacticSugar.pdb
+++ /dev/null
Binary files differ
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.cs"
index 4dc1ac2..06a734f 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.cs"
@@ -703,6 +703,7 @@
             Int64 HBadReasonID = 0;     //涓嶈壇鍘熷洜ID
             string HCusMaterName = "";  //瀹㈡埛鐗╂枡鍚嶇О
             string HCusModel = "";      //瀹㈡埛瑙勬牸鍨嬪彿
+            string HBarCode_Pack = "";  //鎵樼洏鏉$爜
 
             HBarCode = TM;
             HBarCodeType = DBUtility.ClsPub.isStrNull(cmbHBarCodeType.Text);
@@ -719,6 +720,7 @@
             HBadReasonID = DBUtility.ClsPub.isLong(txtHRemark.Tag);
             HCusMaterName = DBUtility.ClsPub.isStrNull(txtHCusMaterName.Text);
             HCusModel = DBUtility.ClsPub.isStrNull(txtHCusModel.Text);
+            HBarCode_Pack = DBUtility.ClsPub.isStrNull(txtHBarCode_Pack.Text);
 
             try
             {
@@ -730,7 +732,7 @@
                 ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " +
                 ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " +
                 ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate,HMaterialJQty,HMaterialMQty,HNowQty " +
-                ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HGiveAwayFlag " +
+                ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HGiveAwayFlag,HBarCode_Pack " +
                 ",HOrderInterID,HOrderEntryID,HOrderBillNo,HCustomQty1,HMaterialModel,HCusModel " +
                 ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo,HLogo " +
                 ") Values ("
@@ -739,7 +741,7 @@
                 + ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "',''"
                 + ", 1," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'"
                 + ", 0,'',getdate(),'','" + sDate + "'," + HMaterialJQty.ToString() + "," + HMaterialMQty.ToString() + "," + HNowQty.ToString()
-                + ", " + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + ",''," + HInterID.ToString() + ",0"
+                + ", " + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + ",''," + HInterID.ToString() + ",0,'" + HBarCode_Pack + "'"
                 + ", " + HProcessExchangeInterID.ToString() + ",0,'" + HProcessExchangeBillNo + "'," + HBadReasonID.ToString() + ",'" + HCusMaterName + "','" + HCusModel + "'"
                 + ",'" + HMaterName + "','" + HMaterModel + "',''," + HAuxPropID.ToString() + ",'','','1')");
 
@@ -761,8 +763,8 @@
                     " Values("
                     + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HMaterID.ToString() + "," + HAuxPropID.ToString() + ",0"
                     + "," + HWhID.ToString() + ",0," + HSPID.ToString() + ",0,0,''"
-                    +",0," + HQty.ToString() + ",1,'" + HBatchNo + "','" + HBarCode + "',''"
-                    +",'" + HMaker + "',getdate()," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillType + "','" + HSourceBillNo + "'"
+                    +",0," + HQty.ToString() + ",1,'" + HBatchNo + "','" + HBarCode + "','" + HBarCode_Pack + "'"
+                    + ",'" + HMaker + "',getdate()," + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillType + "','" + HSourceBillNo + "'"
                     +",0,0,'',0,'',0"
                     +"," + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + ",'','绉伴噸鍏ュ簱鐢熸垚','2'"
                     +",0,0,'',0)");
@@ -888,6 +890,11 @@
                         {
                             HRemark = HRemark + "銆�" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value);
                         }
+                        if (DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜绫诲瀷")].Value) == "鎵樼洏鏉$爜")
+                        {
+                            MessageBox.Show("鎵�閫夋潯鐮佺紪鍙凤細" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value) + " 涓烘墭鐩樻潯鐮侊紝涓嶅厑璁镐綔搴燂紒", "鎻愮ず");
+                            return;
+                        }
                     }
                     if (HRemark != "")
                     {
@@ -950,6 +957,7 @@
                     string HItemID = "";
                     string HBarCode = "";
                     string HBarCode2 = "";
+                    string HBarCode_Pack = DBUtility.ClsPub.isStrNull(txtHBarCode_Pack.Text);
                     for (int i = 0; i <= grdMain.SelectedRows.Count - 1; i++)
                     {
                         HItemID = HItemID + "," + DBUtility.ClsPub.isLong(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value.ToString());
@@ -965,6 +973,17 @@
                         if (DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("浣滃簾鏍囪")].Value) == "")
                         {
                             HRemark = HRemark + "銆�" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value);
+                        }
+                        if (DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜绫诲瀷")].Value) == "鎵樼洏鏉$爜")
+                        {
+                            MessageBox.Show("鎵�閫夋潯鐮佺紪鍙凤細" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value) + " 涓烘墭鐩樻潯鐮侊紝涓嶅厑璁稿弽浣滃簾锛�", "鎻愮ず");
+                            return;
+                        }
+                        if (DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("HBarCode_Pack")].Value) != ""
+                            && DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("HBarCode_Pack")].Value) != HBarCode_Pack)
+                        {
+                            MessageBox.Show("鎵�閫夋潯鐮佺紪鍙凤細" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value) + " 宸茬敓鎴愬搴旂粍鎵樺崟锛屼笉鍏佽鍙嶄綔搴燂紒", "鎻愮ず");
+                            return;
                         }
                     }
                     if (HRemark != "")
@@ -999,7 +1018,7 @@
                         ",HCusID,HDeptID,HCusBarCode,HMulSourceBill) " +
                         " select " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "',HMaterID,HAuxPropID,0" +
                         ",HWhID,0,HSPID,0,0,''" +
-                        ",0,HQty,1,HBatchNo,HBarCode,''" +
+                        ",0,HQty,1,HBatchNo,HBarCode,HBarCode_Pack" +
                         ",'" + HMaker + "',getdate(),HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo" +
                         ",0,0,'',0,'',0" +
                         ",HSTOCKORGID,HSTOCKORGID,HSTOCKORGID,'','绉伴噸鍏ュ簱鐢熸垚-鍙嶄綔搴�','2'" +
@@ -1043,6 +1062,229 @@
 
         #endregion
 
+        #region  //寮�濮嬬粍鎵�
+        private void cmdHBPack_Click(object sender, EventArgs e)
+        {
+            if (!PackSub_AllowSave())
+            {
+                return;
+            }
+            SavePackBarCode();
+            BarCode_Display();
+            grdMain.Rows[0].Selected = true;
+
+            txtHBarCode_Pack.Text = DBUtility.ClsPub.isStrNull(grdMain.Rows[grdMain.SelectedRows[0].Index].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value);
+            cmdHBPack.Enabled = false;
+
+            sBarCodeItemID = DBUtility.ClsPub.isLong(grdMain.Rows[grdMain.SelectedRows[0].Index].Cells[Fun_GetCol("HItemID")].Value).ToString();
+            //鑷姩鎵撳嵃
+            if (chkHDYFlag.Checked == true)
+            {
+                //鎵撳嵃鏉$爜
+                Sub_SetReport("鎵樼洏鏉$爜");
+                Report.Print(false);
+                Thread.Sleep(1000);
+            }
+            else
+            {
+                //閫夋嫨鎵撳嵃妯℃澘
+                BLL.Gy_OpenTmp oFrm = new BLL.Gy_OpenTmp();
+                oFrm.sBillName = ModName;
+                oFrm.sBillModel = ModCaption;
+                oFrm.ShowDialog();
+                if (oFrm.OKTag == Pub_Class.ClsPub.Enum_OKTag.OKTag_OK)
+                {
+                    Sub_SetReport(oFrm.sOpenTmp);
+                    Report.Print(false);
+                    Thread.Sleep(1000);
+                }
+            }
+        }
+
+        //鏉$爜鐢熸垚鍓嶅垽鏂�
+        private bool PackSub_AllowSave()
+        {
+            //鍒ゆ柇褰撳墠鍗曟嵁ID鏄惁宸蹭笂浼犵敓鎴愬崟鎹�
+            DataSet Ds = oCn.RunProcReturn("select top 1 1 from KF_WeighSource_Temp with(nolock) where HInterID=" + HInterID.ToString() + " and HRelationInterID=1 ", "KF_WeighSource_Temp", ref DBUtility.ClsPub.sExeReturnInfo);
+            if (Ds == null || Ds.Tables[0].Rows.Count == 0)
+            {
+            }
+            else
+            {
+                MessageBox.Show("褰撳墠鏉$爜璁板綍宸叉崲鐝笂浼犵敓鎴愬崟鎹紝璇烽��鍑哄悗閲嶆柊杩涘叆璇ユā鍧楄繘琛屾潯鐮佺敓鎴愭搷浣滐紒", "鎻愮ず");
+                return false;
+            }
+
+            if (HInterID == 0 || HBillNo == "")
+            {
+                MessageBox.Show("鑾峰彇鏉$爜瀵瑰簲鍗曟嵁ID鎴栧崟鎹彿澶辫触锛岃閲嶆柊鍒锋柊鐣岄潰锛�", "鎻愮ず");
+                return false;
+            }
+            return true;
+        }
+
+        //鐢熸垚鎵樼洏鏉$爜
+        private void SavePackBarCode()
+        {
+            int LSHlen = 6;             //娴佹按鍙烽暱搴�
+            Int64 LSH = 0;              //娴佹按鍙�
+            string LSH2 = "";           //娴佹按鍙疯浆鎹㈡垚瀛楃
+            string sDate = "";          //鏃ユ湡
+            string sYear = "";          //骞�
+            string sPeriod = "";        //鏈�
+            string sDay = "";           //鏃�
+            string sTMNumber = "";      //鏉$爜鑷畾涔夊墠缂�
+            string TM = "";             //鏉$爜缂栧彿
+            DataSet Ds;
+
+            //鏃ユ湡鑾峰彇鏂瑰紡
+            sDate = dtpHDate.Value.ToShortDateString();
+            sYear = DBUtility.ClsPub.isDate(sDate).Year.ToString().Substring(2, 2);
+            sPeriod = "0" + DBUtility.ClsPub.isDate(sDate).Month.ToString();
+            sPeriod = sPeriod.Substring(sPeriod.Length - 2, 2);
+            sDay = "0" + DBUtility.ClsPub.isDate(sDate).Day.ToString();
+            sDay = sDay.Substring(sDay.Length - 2, 2);
+            //==================================
+            //鏉$爜鍓嶇紑 = 'TP' + 缁勭粐浠g爜 + 骞� + 鏈� + 鏃�
+            sTMNumber = "TP" + DBUtility.ClsPub.HOrgNumber + sYear + sPeriod + sDay;
+            Ds = oCn.RunProcReturn("exec h_p_WMS_GetMaxNo '" + sTMNumber + "'", "h_p_WMS_GetMaxNo");    //鑾峰彇鏈�澶ф祦姘村彿
+            LSH = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]);
+            LSH = LSH + 1;
+            LSH2 = LSH.ToString();
+            while (LSH2.Length < LSHlen)  //濡傛灉娴佹按鍙峰皬浜�6浣嶆暟鍓嶉潰琛�0
+            {
+                LSH2 = "0" + LSH2;
+            }
+            TM = sTMNumber + LSH2;
+
+            string HBarCode = "";
+            string HBarCodeType = "鎵樼洏鏉$爜";
+
+            HBarCode = TM;
+            HBarCodeType = "";
+
+            try
+            {
+                oCn.BeginTran();
+                //鍐欏叆鏉$爜妗f
+                oCn.RunProc("Insert into Gy_BarCodeBill " +
+                "(HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HBarCode_Pack" +
+                ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" +
+                ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " +
+                ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " +
+                ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate,HMaterialJQty,HMaterialMQty,HNowQty " +
+                ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HGiveAwayFlag " +
+                ",HOrderInterID,HOrderEntryID,HOrderBillNo,HCustomQty1,HMaterialModel,HCusModel " +
+                ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo,HLogo " +
+                ") Values ("
+                + "'" + HBarCode + "','" + HBarCodeType + "',0,0,1,'" + HBarCode + "'"
+                + ",'',0,0,'" + HMaker + "',getdate(),0,1"
+                + ",0,0,'','',''"
+                + ",1,0,0,0,0,''"
+                + ", 0,'',getdate(),'','" + sDate + "',0,0,0"
+                + ", " + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + ",''," + HInterID.ToString() + ",0"
+                + ", " + HProcessExchangeInterID.ToString() + ",0,'',0,'',''"
+                + ",'','','',0,'','','1')");
+
+                //鍥炲~鏈�澶ф祦姘村彿
+                oCn.RunProc("exec h_p_WMS_SetMaxNo_QTY '" + sTMNumber + "',1 ");
+                oCn.Commit();
+            }
+            catch (Exception e)
+            {
+                oCn.RollBack();
+                MessageBox.Show("鎵樼洏鏉$爜鐢熸垚澶辫触锛�" + e.Message);
+            }
+        }
+
+
+        #endregion
+
+        #region  //缁撴潫缁勬墭
+        private void cmdHEPack_Click(object sender, EventArgs e)
+        {
+            string HBarCode_Pack = DBUtility.ClsPub.isStrNull(txtHBarCode_Pack.Text);
+
+            //鐢熸垚缁勬墭鍗曞墠鍒ゆ柇
+            if(HBarCode_Pack=="")
+            {
+                MessageBox.Show("璇峰厛鐐瑰嚮寮�濮嬬粍鎵橈紝杩涜鏉$爜缁勬墭鎿嶄綔锛�", "鎻愮ず");
+                return;
+            }
+            bool b = false;
+            for (int i = 0; i < grdMain.RowCount; i++)
+            {
+                if (DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[Fun_GetCol("鏉$爜绫诲瀷")].Value) == "鍞竴鏉$爜"
+                    && DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[Fun_GetCol("HBarCode_Pack")].Value) == HBarCode_Pack)
+                {
+                    b = true;
+                    break;
+                }
+            }
+            if (b == false)
+            {
+                MessageBox.Show("褰撳墠鎵樼洏鏉$爜涓嬭繕娌$敓鎴愬搴旀潯鐮侊紝涓嶅厑璁哥敓鎴愮粍鎵樺崟锛�", "鎻愮ず");
+                return;
+            }
+
+            //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
+            string s = "";
+            int sYear = 0;
+            int sPeriod = 0;
+            if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
+            {
+                MessageBox.Show(s, "鎻愮ず");
+                return;
+            }
+
+            try
+            {
+                oCn.BeginTran();
+                //鐢熸垚鐢熶骇缁勬墭鍗�
+                Int64 HPUInterID = DBUtility.ClsPub.CreateBillID_Prod("3783", ref DBUtility.ClsPub.sExeReturnInfo);         //寰楀埌鏈�鏂扮敓浜х粍鎵樺崟ID
+                string HPUBillNo = DBUtility.ClsPub.CreateBillCode_Prod("3783", ref DBUtility.ClsPub.sExeReturnInfo, true); //寰楀埌鏈�鏂扮敓浜х粍鎵樺崟鍙�
+
+                //鍐欏叆鐢熶骇缁勬墭鍗曚富琛�
+                oCn.RunProc("Insert Into Sc_PackUnionBillMain " +
+                    "(HInterID,HBillNo,HBillType,HBillSubType,HDate,HRemark" +
+                    ",HYear,HPeriod,HChecker,HCheckDate,HMaker,HMakeDate" +
+                    ",HICMOInterID,HICMOBillNo,HBarCode_Pack,HMaterID,HUnitID,HProdOrgID" +
+                    ") Values ("
+                    + " " + HPUInterID.ToString() + ",'" + HPUBillNo + "','3783','3783',convert(varchar(10),getdate(),120),''"
+                    + "," + sYear.ToString() + "," + sPeriod.ToString() + ",'" + HMaker + "',getdate(),'" + HMaker + "',getdate()"
+                    + ",0,'','" + HBarCode_Pack + "',0,0," + HStockOrgID.ToString() + ") ");
+
+                //鍐欏叆鐢熶骇瑁呯鍗曞瓙琛�
+                oCn.RunProc("Insert into Sc_PackUnionBillSub " +
+                "(HInterID,HEntryID,HRelationQty,HRelationMoney,HRemark" +
+                ",HMaterID,HUnitID,HQty,HBarCode,HBarCode_Pack,HScanDate" +
+                ",HAuxPropID,HBatchNo,HMTONo" +
+                ",HSourceID,HEquipID,HGroupID,HWorkerID,HStatus" +
+                ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType) " +
+                " select " + HPUInterID.ToString() + ",HItemID,'0,0,''" +
+                ",HMaterID,HUnitID,HQty,HBarCode,HBarCode_Pack,getdate()" +
+                ",HAuxPropID,HBatchNo,HMTONo" +
+                ",0,0,0,0,0" +
+                ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" +
+                "from Gy_BarCodeBill with(nolock) where HInterID=" + HInterID.ToString() + " and HBarCode_Pack='" + HBarCode_Pack + "' and HStopflag=0"
+                );
+
+                MessageBox.Show("鐢熸垚鐢熶骇缁勬墭鍗曪細" + HPUBillNo + " 鎴愬姛锛�", "鎻愮ず");
+
+                txtHBarCode_Pack.Text = "";
+                cmdHBPack.Enabled = true;
+                oCn.Commit();
+                return;
+            }
+            catch (Exception e2)
+            {
+                oCn.RollBack();
+                MessageBox.Show("鐢熸垚鐢熶骇缁勬墭鍗曞け璐ワ紒" + e2.Message);
+                return;
+            }
+        }
+
+        #endregion
 
 
 
@@ -1343,7 +1585,12 @@
                 fs.Close();
             }
         }
+
         #endregion
+
         #endregion
+
+
+
     }
 }
\ No newline at end of file
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.designer.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.designer.cs"
index 639d158..a98477c 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.designer.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.designer.cs"
@@ -30,8 +30,8 @@
         {
             this.components = new System.ComponentModel.Container();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Kf_WeighToBarCode));
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
             this.Tool = new System.Windows.Forms.ToolStrip();
             this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
             this.mrlk = new System.Windows.Forms.ToolStripButton();
@@ -55,6 +55,10 @@
             this.label4 = new System.Windows.Forms.Label();
             this.txtHMaterNumber = new System.Windows.Forms.TextBox();
             this.gbUp = new System.Windows.Forms.GroupBox();
+            this.textBox_COM = new System.Windows.Forms.TextBox();
+            this.label_COM = new System.Windows.Forms.Label();
+            this.button_OpenCom = new System.Windows.Forms.Button();
+            this.button_getHWeight = new System.Windows.Forms.Button();
             this.label17 = new System.Windows.Forms.Label();
             this.txtHOrderPickRemark = new System.Windows.Forms.TextBox();
             this.label15 = new System.Windows.Forms.Label();
@@ -102,10 +106,10 @@
             this.鍙充晶 = new System.Windows.Forms.Panel();
             this.timer2 = new System.Windows.Forms.Timer(this.components);
             this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
-            this.button_getHWeight = new System.Windows.Forms.Button();
-            this.button_OpenCom = new System.Windows.Forms.Button();
-            this.label_COM = new System.Windows.Forms.Label();
-            this.textBox_COM = new System.Windows.Forms.TextBox();
+            this.cmdHBPack = new System.Windows.Forms.Button();
+            this.cmdHEPack = new System.Windows.Forms.Button();
+            this.label18 = new System.Windows.Forms.Label();
+            this.txtHBarCode_Pack = new System.Windows.Forms.TextBox();
             this.Tool.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.grdMain)).BeginInit();
             this.gbUp.SuspendLayout();
@@ -140,7 +144,7 @@
             this.Tool.Location = new System.Drawing.Point(0, 0);
             this.Tool.Name = "Tool";
             this.Tool.Padding = new System.Windows.Forms.Padding(0);
-            this.Tool.Size = new System.Drawing.Size(1924, 75);
+            this.Tool.Size = new System.Drawing.Size(1283, 50);
             this.Tool.Stretch = true;
             this.Tool.TabIndex = 16;
             this.Tool.Text = "toolStrip1";
@@ -149,7 +153,7 @@
             // 
             this.toolStripSeparator9.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
             this.toolStripSeparator9.Name = "toolStripSeparator9";
-            this.toolStripSeparator9.Size = new System.Drawing.Size(6, 75);
+            this.toolStripSeparator9.Size = new System.Drawing.Size(6, 50);
             // 
             // mrlk
             // 
@@ -159,7 +163,7 @@
             this.mrlk.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
             this.mrlk.ImageTransparentColor = System.Drawing.Color.White;
             this.mrlk.Name = "mrlk";
-            this.mrlk.Size = new System.Drawing.Size(86, 70);
+            this.mrlk.Size = new System.Drawing.Size(60, 47);
             this.mrlk.Text = "榛樿鍒楀";
             this.mrlk.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
             this.mrlk.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
@@ -169,7 +173,7 @@
             // 
             this.toolStripSeparator7.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
             this.toolStripSeparator7.Name = "toolStripSeparator7";
-            this.toolStripSeparator7.Size = new System.Drawing.Size(6, 75);
+            this.toolStripSeparator7.Size = new System.Drawing.Size(6, 50);
             // 
             // bclk
             // 
@@ -179,7 +183,7 @@
             this.bclk.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
             this.bclk.ImageTransparentColor = System.Drawing.Color.White;
             this.bclk.Name = "bclk";
-            this.bclk.Size = new System.Drawing.Size(86, 70);
+            this.bclk.Size = new System.Drawing.Size(60, 47);
             this.bclk.Text = "淇濆瓨鍒楀";
             this.bclk.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
             this.bclk.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
@@ -189,7 +193,7 @@
             // 
             this.toolStripSeparator8.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
             this.toolStripSeparator8.Name = "toolStripSeparator8";
-            this.toolStripSeparator8.Size = new System.Drawing.Size(6, 75);
+            this.toolStripSeparator8.Size = new System.Drawing.Size(6, 50);
             // 
             // sx
             // 
@@ -208,7 +212,7 @@
             // toolStripSeparator1
             // 
             this.toolStripSeparator1.Name = "toolStripSeparator1";
-            this.toolStripSeparator1.Size = new System.Drawing.Size(6, 75);
+            this.toolStripSeparator1.Size = new System.Drawing.Size(6, 50);
             // 
             // dy
             // 
@@ -227,7 +231,7 @@
             // toolStripSeparator2
             // 
             this.toolStripSeparator2.Name = "toolStripSeparator2";
-            this.toolStripSeparator2.Size = new System.Drawing.Size(6, 75);
+            this.toolStripSeparator2.Size = new System.Drawing.Size(6, 50);
             // 
             // hb
             // 
@@ -246,7 +250,7 @@
             // toolStripSeparator3
             // 
             this.toolStripSeparator3.Name = "toolStripSeparator3";
-            this.toolStripSeparator3.Size = new System.Drawing.Size(6, 75);
+            this.toolStripSeparator3.Size = new System.Drawing.Size(6, 50);
             // 
             // tc
             // 
@@ -265,7 +269,7 @@
             // toolStripSeparator4
             // 
             this.toolStripSeparator4.Name = "toolStripSeparator4";
-            this.toolStripSeparator4.Size = new System.Drawing.Size(6, 75);
+            this.toolStripSeparator4.Size = new System.Drawing.Size(6, 50);
             // 
             // timer1
             // 
@@ -278,22 +282,22 @@
             this.grdMain.AllowUserToDeleteRows = false;
             this.grdMain.BackgroundColor = System.Drawing.SystemColors.ControlLightLight;
             this.grdMain.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle1.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.grdMain.DefaultCellStyle = dataGridViewCellStyle1;
+            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle3.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.grdMain.DefaultCellStyle = dataGridViewCellStyle3;
             this.grdMain.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.grdMain.Location = new System.Drawing.Point(4, 4);
+            this.grdMain.Location = new System.Drawing.Point(3, 3);
             this.grdMain.Margin = new System.Windows.Forms.Padding(0);
             this.grdMain.Name = "grdMain";
             this.grdMain.ReadOnly = true;
             this.grdMain.RowHeadersWidth = 51;
             this.grdMain.RowTemplate.Height = 23;
-            this.grdMain.Size = new System.Drawing.Size(1472, 508);
+            this.grdMain.Size = new System.Drawing.Size(978, 334);
             this.grdMain.TabIndex = 19;
             this.grdMain.Paint += new System.Windows.Forms.PaintEventHandler(this.grdMain_Paint);
             // 
@@ -302,10 +306,9 @@
             this.label2.AutoSize = true;
             this.label2.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label2.ForeColor = System.Drawing.Color.Black;
-            this.label2.Location = new System.Drawing.Point(663, 90);
-            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Location = new System.Drawing.Point(442, 60);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(80, 18);
+            this.label2.Size = new System.Drawing.Size(53, 12);
             this.label2.TabIndex = 49;
             this.label2.Text = "瑙勬牸鍨嬪彿";
             // 
@@ -313,11 +316,10 @@
             // 
             this.txtHMaterModel.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.txtHMaterModel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
-            this.txtHMaterModel.Location = new System.Drawing.Point(747, 84);
-            this.txtHMaterModel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.txtHMaterModel.Location = new System.Drawing.Point(498, 56);
             this.txtHMaterModel.Name = "txtHMaterModel";
             this.txtHMaterModel.ReadOnly = true;
-            this.txtHMaterModel.Size = new System.Drawing.Size(190, 28);
+            this.txtHMaterModel.Size = new System.Drawing.Size(128, 21);
             this.txtHMaterModel.TabIndex = 50;
             // 
             // label3
@@ -325,10 +327,9 @@
             this.label3.AutoSize = true;
             this.label3.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label3.ForeColor = System.Drawing.Color.Black;
-            this.label3.Location = new System.Drawing.Point(94, 222);
-            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Location = new System.Drawing.Point(63, 148);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(44, 18);
+            this.label3.Size = new System.Drawing.Size(29, 12);
             this.label3.TabIndex = 52;
             this.label3.Text = "澶囨敞";
             // 
@@ -336,10 +337,9 @@
             // 
             this.txtHRemark.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.txtHRemark.ImeMode = System.Windows.Forms.ImeMode.NoControl;
-            this.txtHRemark.Location = new System.Drawing.Point(142, 216);
-            this.txtHRemark.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.txtHRemark.Location = new System.Drawing.Point(95, 144);
             this.txtHRemark.Name = "txtHRemark";
-            this.txtHRemark.Size = new System.Drawing.Size(1056, 28);
+            this.txtHRemark.Size = new System.Drawing.Size(705, 21);
             this.txtHRemark.TabIndex = 53;
             // 
             // label4
@@ -347,10 +347,9 @@
             this.label4.AutoSize = true;
             this.label4.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label4.ForeColor = System.Drawing.Color.Black;
-            this.label4.Location = new System.Drawing.Point(58, 90);
-            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label4.Location = new System.Drawing.Point(39, 60);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(80, 18);
+            this.label4.Size = new System.Drawing.Size(53, 12);
             this.label4.TabIndex = 55;
             this.label4.Text = "鐗╂枡浠g爜";
             // 
@@ -358,16 +357,19 @@
             // 
             this.txtHMaterNumber.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.txtHMaterNumber.ImeMode = System.Windows.Forms.ImeMode.NoControl;
-            this.txtHMaterNumber.Location = new System.Drawing.Point(142, 84);
-            this.txtHMaterNumber.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.txtHMaterNumber.Location = new System.Drawing.Point(95, 56);
             this.txtHMaterNumber.Name = "txtHMaterNumber";
             this.txtHMaterNumber.ReadOnly = true;
-            this.txtHMaterNumber.Size = new System.Drawing.Size(190, 28);
+            this.txtHMaterNumber.Size = new System.Drawing.Size(128, 21);
             this.txtHMaterNumber.TabIndex = 56;
             // 
             // gbUp
             // 
             this.gbUp.BackColor = System.Drawing.Color.Transparent;
+            this.gbUp.Controls.Add(this.label18);
+            this.gbUp.Controls.Add(this.txtHBarCode_Pack);
+            this.gbUp.Controls.Add(this.cmdHEPack);
+            this.gbUp.Controls.Add(this.cmdHBPack);
             this.gbUp.Controls.Add(this.textBox_COM);
             this.gbUp.Controls.Add(this.label_COM);
             this.gbUp.Controls.Add(this.button_OpenCom);
@@ -412,22 +414,65 @@
             this.gbUp.Controls.Add(this.label2);
             this.gbUp.Dock = System.Windows.Forms.DockStyle.Top;
             this.gbUp.Location = new System.Drawing.Point(0, 0);
-            this.gbUp.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.gbUp.Name = "gbUp";
-            this.gbUp.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.gbUp.Size = new System.Drawing.Size(1488, 392);
+            this.gbUp.Size = new System.Drawing.Size(992, 261);
             this.gbUp.TabIndex = 58;
             this.gbUp.TabStop = false;
+            // 
+            // textBox_COM
+            // 
+            this.textBox_COM.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.textBox_COM.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+            this.textBox_COM.Location = new System.Drawing.Point(498, 112);
+            this.textBox_COM.Name = "textBox_COM";
+            this.textBox_COM.Size = new System.Drawing.Size(128, 21);
+            this.textBox_COM.TabIndex = 329;
+            // 
+            // label_COM
+            // 
+            this.label_COM.AutoSize = true;
+            this.label_COM.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label_COM.ForeColor = System.Drawing.Color.Black;
+            this.label_COM.Location = new System.Drawing.Point(472, 116);
+            this.label_COM.Name = "label_COM";
+            this.label_COM.Size = new System.Drawing.Size(23, 12);
+            this.label_COM.TabIndex = 328;
+            this.label_COM.Text = "COM";
+            // 
+            // button_OpenCom
+            // 
+            this.button_OpenCom.BackColor = System.Drawing.Color.White;
+            this.button_OpenCom.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.button_OpenCom.Location = new System.Drawing.Point(429, 222);
+            this.button_OpenCom.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.button_OpenCom.Name = "button_OpenCom";
+            this.button_OpenCom.Size = new System.Drawing.Size(86, 32);
+            this.button_OpenCom.TabIndex = 327;
+            this.button_OpenCom.Text = "鎵撳紑涓插彛";
+            this.button_OpenCom.UseVisualStyleBackColor = false;
+            this.button_OpenCom.Click += new System.EventHandler(this.button_OpenCom_Click);
+            // 
+            // button_getHWeight
+            // 
+            this.button_getHWeight.BackColor = System.Drawing.Color.White;
+            this.button_getHWeight.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.button_getHWeight.Location = new System.Drawing.Point(322, 222);
+            this.button_getHWeight.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.button_getHWeight.Name = "button_getHWeight";
+            this.button_getHWeight.Size = new System.Drawing.Size(86, 32);
+            this.button_getHWeight.TabIndex = 326;
+            this.button_getHWeight.Text = "绉伴噸";
+            this.button_getHWeight.UseVisualStyleBackColor = false;
+            this.button_getHWeight.Click += new System.EventHandler(this.button_getHWeight_Click);
             // 
             // label17
             // 
             this.label17.AutoSize = true;
             this.label17.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label17.ForeColor = System.Drawing.Color.Black;
-            this.label17.Location = new System.Drawing.Point(22, 266);
-            this.label17.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label17.Location = new System.Drawing.Point(15, 177);
             this.label17.Name = "label17";
-            this.label17.Size = new System.Drawing.Size(116, 18);
+            this.label17.Size = new System.Drawing.Size(77, 12);
             this.label17.TabIndex = 324;
             this.label17.Text = "璁㈠崟鍖呰澶囨敞";
             // 
@@ -437,13 +482,12 @@
             this.txtHOrderPickRemark.Font = new System.Drawing.Font("瀹嬩綋", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.txtHOrderPickRemark.ForeColor = System.Drawing.Color.Red;
             this.txtHOrderPickRemark.ImeMode = System.Windows.Forms.ImeMode.NoControl;
-            this.txtHOrderPickRemark.Location = new System.Drawing.Point(142, 260);
-            this.txtHOrderPickRemark.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.txtHOrderPickRemark.Location = new System.Drawing.Point(95, 173);
             this.txtHOrderPickRemark.Multiline = true;
             this.txtHOrderPickRemark.Name = "txtHOrderPickRemark";
             this.txtHOrderPickRemark.ReadOnly = true;
             this.txtHOrderPickRemark.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
-            this.txtHOrderPickRemark.Size = new System.Drawing.Size(1087, 64);
+            this.txtHOrderPickRemark.Size = new System.Drawing.Size(726, 44);
             this.txtHOrderPickRemark.TabIndex = 325;
             // 
             // label15
@@ -451,10 +495,9 @@
             this.label15.AutoSize = true;
             this.label15.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label15.ForeColor = System.Drawing.Color.Black;
-            this.label15.Location = new System.Drawing.Point(336, 174);
-            this.label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label15.Location = new System.Drawing.Point(224, 116);
             this.label15.Name = "label15";
-            this.label15.Size = new System.Drawing.Size(116, 18);
+            this.label15.Size = new System.Drawing.Size(77, 12);
             this.label15.TabIndex = 322;
             this.label15.Text = "瀹㈡埛瑙勬牸鍨嬪彿";
             // 
@@ -462,11 +505,10 @@
             // 
             this.txtHCusModel.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.txtHCusModel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
-            this.txtHCusModel.Location = new System.Drawing.Point(454, 168);
-            this.txtHCusModel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.txtHCusModel.Location = new System.Drawing.Point(303, 112);
             this.txtHCusModel.Name = "txtHCusModel";
             this.txtHCusModel.ReadOnly = true;
-            this.txtHCusModel.Size = new System.Drawing.Size(190, 28);
+            this.txtHCusModel.Size = new System.Drawing.Size(128, 21);
             this.txtHCusModel.TabIndex = 323;
             // 
             // label16
@@ -474,10 +516,9 @@
             this.label16.AutoSize = true;
             this.label16.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label16.ForeColor = System.Drawing.Color.Black;
-            this.label16.Location = new System.Drawing.Point(22, 174);
-            this.label16.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label16.Location = new System.Drawing.Point(15, 116);
             this.label16.Name = "label16";
-            this.label16.Size = new System.Drawing.Size(116, 18);
+            this.label16.Size = new System.Drawing.Size(77, 12);
             this.label16.TabIndex = 320;
             this.label16.Text = "瀹㈡埛鐗╂枡鍚嶇О";
             // 
@@ -485,11 +526,10 @@
             // 
             this.txtHCusMaterName.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.txtHCusMaterName.ImeMode = System.Windows.Forms.ImeMode.NoControl;
-            this.txtHCusMaterName.Location = new System.Drawing.Point(142, 168);
-            this.txtHCusMaterName.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.txtHCusMaterName.Location = new System.Drawing.Point(95, 112);
             this.txtHCusMaterName.Name = "txtHCusMaterName";
             this.txtHCusMaterName.ReadOnly = true;
-            this.txtHCusMaterName.Size = new System.Drawing.Size(190, 28);
+            this.txtHCusMaterName.Size = new System.Drawing.Size(128, 21);
             this.txtHCusMaterName.TabIndex = 321;
             // 
             // label13
@@ -497,10 +537,9 @@
             this.label13.AutoSize = true;
             this.label13.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label13.ForeColor = System.Drawing.Color.Black;
-            this.label13.Location = new System.Drawing.Point(993, 132);
-            this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label13.Location = new System.Drawing.Point(662, 88);
             this.label13.Name = "label13";
-            this.label13.Size = new System.Drawing.Size(44, 18);
+            this.label13.Size = new System.Drawing.Size(29, 12);
             this.label13.TabIndex = 318;
             this.label13.Text = "鍖呭彿";
             // 
@@ -508,10 +547,9 @@
             // 
             this.txtHBarcodeNo.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.txtHBarcodeNo.ImeMode = System.Windows.Forms.ImeMode.NoControl;
-            this.txtHBarcodeNo.Location = new System.Drawing.Point(1040, 126);
-            this.txtHBarcodeNo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.txtHBarcodeNo.Location = new System.Drawing.Point(693, 84);
             this.txtHBarcodeNo.Name = "txtHBarcodeNo";
-            this.txtHBarcodeNo.Size = new System.Drawing.Size(190, 28);
+            this.txtHBarcodeNo.Size = new System.Drawing.Size(128, 21);
             this.txtHBarcodeNo.TabIndex = 319;
             // 
             // cmdHBadReasonID
@@ -519,10 +557,9 @@
             this.cmdHBadReasonID.BackColor = System.Drawing.Color.Transparent;
             this.cmdHBadReasonID.Image = ((System.Drawing.Image)(resources.GetObject("cmdHBadReasonID.Image")));
             this.cmdHBadReasonID.ImageAlign = System.Drawing.ContentAlignment.TopRight;
-            this.cmdHBadReasonID.Location = new System.Drawing.Point(1198, 214);
-            this.cmdHBadReasonID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.cmdHBadReasonID.Location = new System.Drawing.Point(799, 143);
             this.cmdHBadReasonID.Name = "cmdHBadReasonID";
-            this.cmdHBadReasonID.Size = new System.Drawing.Size(33, 33);
+            this.cmdHBadReasonID.Size = new System.Drawing.Size(22, 22);
             this.cmdHBadReasonID.TabIndex = 317;
             this.cmdHBadReasonID.UseVisualStyleBackColor = false;
             this.cmdHBadReasonID.Click += new System.EventHandler(this.cmdHBadReasonID_Click);
@@ -530,9 +567,10 @@
             // chkHDYFlag
             // 
             this.chkHDYFlag.AutoSize = true;
-            this.chkHDYFlag.Location = new System.Drawing.Point(837, 354);
+            this.chkHDYFlag.Location = new System.Drawing.Point(558, 236);
+            this.chkHDYFlag.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.chkHDYFlag.Name = "chkHDYFlag";
-            this.chkHDYFlag.Size = new System.Drawing.Size(106, 22);
+            this.chkHDYFlag.Size = new System.Drawing.Size(72, 16);
             this.chkHDYFlag.TabIndex = 316;
             this.chkHDYFlag.Text = "鑷姩鎵撳嵃";
             this.chkHDYFlag.UseVisualStyleBackColor = true;
@@ -541,9 +579,10 @@
             // 
             this.cmdFZF.BackColor = System.Drawing.Color.White;
             this.cmdFZF.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.cmdFZF.Location = new System.Drawing.Point(1094, 333);
+            this.cmdFZF.Location = new System.Drawing.Point(729, 222);
+            this.cmdFZF.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.cmdFZF.Name = "cmdFZF";
-            this.cmdFZF.Size = new System.Drawing.Size(129, 48);
+            this.cmdFZF.Size = new System.Drawing.Size(86, 32);
             this.cmdFZF.TabIndex = 157;
             this.cmdFZF.Text = "鍙嶄綔搴�";
             this.cmdFZF.UseVisualStyleBackColor = false;
@@ -553,9 +592,10 @@
             // 
             this.cmdZF.BackColor = System.Drawing.Color.White;
             this.cmdZF.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.cmdZF.Location = new System.Drawing.Point(952, 333);
+            this.cmdZF.Location = new System.Drawing.Point(635, 222);
+            this.cmdZF.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.cmdZF.Name = "cmdZF";
-            this.cmdZF.Size = new System.Drawing.Size(129, 48);
+            this.cmdZF.Size = new System.Drawing.Size(86, 32);
             this.cmdZF.TabIndex = 156;
             this.cmdZF.Text = "浣滃簾";
             this.cmdZF.UseVisualStyleBackColor = false;
@@ -565,11 +605,10 @@
             // 
             this.txtHDeptName.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.txtHDeptName.ImeMode = System.Windows.Forms.ImeMode.NoControl;
-            this.txtHDeptName.Location = new System.Drawing.Point(747, 42);
-            this.txtHDeptName.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.txtHDeptName.Location = new System.Drawing.Point(498, 28);
             this.txtHDeptName.Name = "txtHDeptName";
             this.txtHDeptName.ReadOnly = true;
-            this.txtHDeptName.Size = new System.Drawing.Size(190, 28);
+            this.txtHDeptName.Size = new System.Drawing.Size(128, 21);
             this.txtHDeptName.TabIndex = 155;
             // 
             // label12
@@ -577,10 +616,9 @@
             this.label12.AutoSize = true;
             this.label12.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label12.ForeColor = System.Drawing.Color.Black;
-            this.label12.Location = new System.Drawing.Point(699, 48);
-            this.label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label12.Location = new System.Drawing.Point(466, 32);
             this.label12.Name = "label12";
-            this.label12.Size = new System.Drawing.Size(44, 18);
+            this.label12.Size = new System.Drawing.Size(29, 12);
             this.label12.TabIndex = 154;
             this.label12.Text = "杞﹂棿";
             // 
@@ -588,11 +626,10 @@
             // 
             this.txtHBatchNo.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.txtHBatchNo.ImeMode = System.Windows.Forms.ImeMode.NoControl;
-            this.txtHBatchNo.Location = new System.Drawing.Point(1040, 84);
-            this.txtHBatchNo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.txtHBatchNo.Location = new System.Drawing.Point(693, 56);
             this.txtHBatchNo.Name = "txtHBatchNo";
             this.txtHBatchNo.ReadOnly = true;
-            this.txtHBatchNo.Size = new System.Drawing.Size(190, 28);
+            this.txtHBatchNo.Size = new System.Drawing.Size(128, 21);
             this.txtHBatchNo.TabIndex = 153;
             // 
             // label11
@@ -600,10 +637,9 @@
             this.label11.AutoSize = true;
             this.label11.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label11.ForeColor = System.Drawing.Color.Black;
-            this.label11.Location = new System.Drawing.Point(993, 90);
-            this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label11.Location = new System.Drawing.Point(662, 60);
             this.label11.Name = "label11";
-            this.label11.Size = new System.Drawing.Size(44, 18);
+            this.label11.Size = new System.Drawing.Size(29, 12);
             this.label11.TabIndex = 152;
             this.label11.Text = "鎵瑰彿";
             // 
@@ -612,10 +648,9 @@
             this.label10.AutoSize = true;
             this.label10.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label10.ForeColor = System.Drawing.Color.Black;
-            this.label10.Location = new System.Drawing.Point(681, 132);
-            this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label10.Location = new System.Drawing.Point(454, 88);
             this.label10.Name = "label10";
-            this.label10.Size = new System.Drawing.Size(62, 18);
+            this.label10.Size = new System.Drawing.Size(41, 12);
             this.label10.TabIndex = 150;
             this.label10.Text = "鎵g偣鏁�";
             // 
@@ -623,10 +658,9 @@
             // 
             this.txtHKDQty.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.txtHKDQty.ImeMode = System.Windows.Forms.ImeMode.NoControl;
-            this.txtHKDQty.Location = new System.Drawing.Point(747, 126);
-            this.txtHKDQty.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.txtHKDQty.Location = new System.Drawing.Point(498, 84);
             this.txtHKDQty.Name = "txtHKDQty";
-            this.txtHKDQty.Size = new System.Drawing.Size(190, 28);
+            this.txtHKDQty.Size = new System.Drawing.Size(128, 21);
             this.txtHKDQty.TabIndex = 151;
             // 
             // label9
@@ -634,10 +668,9 @@
             this.label9.AutoSize = true;
             this.label9.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label9.ForeColor = System.Drawing.Color.Black;
-            this.label9.Location = new System.Drawing.Point(408, 132);
-            this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label9.Location = new System.Drawing.Point(272, 88);
             this.label9.Name = "label9";
-            this.label9.Size = new System.Drawing.Size(44, 18);
+            this.label9.Size = new System.Drawing.Size(29, 12);
             this.label9.TabIndex = 148;
             this.label9.Text = "閲嶉噺";
             // 
@@ -645,10 +678,9 @@
             // 
             this.txtHWeightQyt.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.txtHWeightQyt.ImeMode = System.Windows.Forms.ImeMode.NoControl;
-            this.txtHWeightQyt.Location = new System.Drawing.Point(454, 126);
-            this.txtHWeightQyt.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.txtHWeightQyt.Location = new System.Drawing.Point(303, 84);
             this.txtHWeightQyt.Name = "txtHWeightQyt";
-            this.txtHWeightQyt.Size = new System.Drawing.Size(190, 28);
+            this.txtHWeightQyt.Size = new System.Drawing.Size(128, 21);
             this.txtHWeightQyt.TabIndex = 149;
             // 
             // label7
@@ -656,10 +688,9 @@
             this.label7.AutoSize = true;
             this.label7.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label7.ForeColor = System.Drawing.Color.Black;
-            this.label7.Location = new System.Drawing.Point(94, 132);
-            this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label7.Location = new System.Drawing.Point(63, 88);
             this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(44, 18);
+            this.label7.Size = new System.Drawing.Size(29, 12);
             this.label7.TabIndex = 146;
             this.label7.Text = "绫虫暟";
             // 
@@ -667,10 +698,9 @@
             // 
             this.txtHQty.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.txtHQty.ImeMode = System.Windows.Forms.ImeMode.NoControl;
-            this.txtHQty.Location = new System.Drawing.Point(142, 126);
-            this.txtHQty.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.txtHQty.Location = new System.Drawing.Point(95, 84);
             this.txtHQty.Name = "txtHQty";
-            this.txtHQty.Size = new System.Drawing.Size(190, 28);
+            this.txtHQty.Size = new System.Drawing.Size(128, 21);
             this.txtHQty.TabIndex = 147;
             // 
             // label14
@@ -678,10 +708,9 @@
             this.label14.AutoSize = true;
             this.label14.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label14.ForeColor = System.Drawing.Color.Black;
-            this.label14.Location = new System.Drawing.Point(372, 90);
-            this.label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label14.Location = new System.Drawing.Point(248, 60);
             this.label14.Name = "label14";
-            this.label14.Size = new System.Drawing.Size(80, 18);
+            this.label14.Size = new System.Drawing.Size(53, 12);
             this.label14.TabIndex = 144;
             this.label14.Text = "鐗╂枡鍚嶇О";
             // 
@@ -689,20 +718,20 @@
             // 
             this.txtHMaterName.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.txtHMaterName.ImeMode = System.Windows.Forms.ImeMode.NoControl;
-            this.txtHMaterName.Location = new System.Drawing.Point(454, 84);
-            this.txtHMaterName.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.txtHMaterName.Location = new System.Drawing.Point(303, 56);
             this.txtHMaterName.Name = "txtHMaterName";
             this.txtHMaterName.ReadOnly = true;
-            this.txtHMaterName.Size = new System.Drawing.Size(190, 28);
+            this.txtHMaterName.Size = new System.Drawing.Size(128, 21);
             this.txtHMaterName.TabIndex = 145;
             // 
             // cmdSave
             // 
             this.cmdSave.BackColor = System.Drawing.Color.White;
             this.cmdSave.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.cmdSave.Location = new System.Drawing.Point(314, 333);
+            this.cmdSave.Location = new System.Drawing.Point(209, 222);
+            this.cmdSave.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.cmdSave.Name = "cmdSave";
-            this.cmdSave.Size = new System.Drawing.Size(129, 48);
+            this.cmdSave.Size = new System.Drawing.Size(86, 32);
             this.cmdSave.TabIndex = 139;
             this.cmdSave.Text = "淇濆瓨";
             this.cmdSave.UseVisualStyleBackColor = false;
@@ -713,10 +742,9 @@
             this.label5.AutoSize = true;
             this.label5.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label5.ForeColor = System.Drawing.Color.Black;
-            this.label5.Location = new System.Drawing.Point(76, 48);
-            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label5.Location = new System.Drawing.Point(51, 32);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(62, 18);
+            this.label5.Size = new System.Drawing.Size(41, 12);
             this.label5.TabIndex = 142;
             this.label5.Text = "鍗曟嵁鍙�";
             // 
@@ -724,9 +752,10 @@
             // 
             this.cmdSourceBillNo.BackColor = System.Drawing.Color.White;
             this.cmdSourceBillNo.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.cmdSourceBillNo.Location = new System.Drawing.Point(153, 333);
+            this.cmdSourceBillNo.Location = new System.Drawing.Point(102, 222);
+            this.cmdSourceBillNo.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.cmdSourceBillNo.Name = "cmdSourceBillNo";
-            this.cmdSourceBillNo.Size = new System.Drawing.Size(129, 48);
+            this.cmdSourceBillNo.Size = new System.Drawing.Size(86, 32);
             this.cmdSourceBillNo.TabIndex = 138;
             this.cmdSourceBillNo.Text = "閫夊崟";
             this.cmdSourceBillNo.UseVisualStyleBackColor = false;
@@ -736,11 +765,10 @@
             // 
             this.txtHBillNo.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.txtHBillNo.ImeMode = System.Windows.Forms.ImeMode.NoControl;
-            this.txtHBillNo.Location = new System.Drawing.Point(142, 42);
-            this.txtHBillNo.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.txtHBillNo.Location = new System.Drawing.Point(95, 28);
             this.txtHBillNo.Name = "txtHBillNo";
             this.txtHBillNo.ReadOnly = true;
-            this.txtHBillNo.Size = new System.Drawing.Size(190, 28);
+            this.txtHBillNo.Size = new System.Drawing.Size(128, 21);
             this.txtHBillNo.TabIndex = 143;
             // 
             // cmbHBarCodeType
@@ -749,9 +777,10 @@
             this.cmbHBarCodeType.FormattingEnabled = true;
             this.cmbHBarCodeType.Items.AddRange(new object[] {
             "鍞竴鏉$爜"});
-            this.cmbHBarCodeType.Location = new System.Drawing.Point(1040, 42);
+            this.cmbHBarCodeType.Location = new System.Drawing.Point(693, 28);
+            this.cmbHBarCodeType.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.cmbHBarCodeType.Name = "cmbHBarCodeType";
-            this.cmbHBarCodeType.Size = new System.Drawing.Size(190, 26);
+            this.cmbHBarCodeType.Size = new System.Drawing.Size(128, 20);
             this.cmbHBarCodeType.TabIndex = 139;
             // 
             // label8
@@ -759,10 +788,9 @@
             this.label8.AutoSize = true;
             this.label8.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label8.ForeColor = System.Drawing.Color.Black;
-            this.label8.Location = new System.Drawing.Point(957, 48);
-            this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label8.Location = new System.Drawing.Point(638, 32);
             this.label8.Name = "label8";
-            this.label8.Size = new System.Drawing.Size(80, 18);
+            this.label8.Size = new System.Drawing.Size(53, 12);
             this.label8.TabIndex = 138;
             this.label8.Text = "鏉$爜绫诲瀷";
             // 
@@ -770,9 +798,10 @@
             // 
             this.dtpHDate.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.dtpHDate.Format = System.Windows.Forms.DateTimePickerFormat.Short;
-            this.dtpHDate.Location = new System.Drawing.Point(454, 42);
+            this.dtpHDate.Location = new System.Drawing.Point(303, 28);
+            this.dtpHDate.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.dtpHDate.Name = "dtpHDate";
-            this.dtpHDate.Size = new System.Drawing.Size(190, 28);
+            this.dtpHDate.Size = new System.Drawing.Size(128, 21);
             this.dtpHDate.TabIndex = 100;
             // 
             // label6
@@ -780,10 +809,9 @@
             this.label6.AutoSize = true;
             this.label6.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label6.ForeColor = System.Drawing.Color.Black;
-            this.label6.Location = new System.Drawing.Point(408, 48);
-            this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label6.Location = new System.Drawing.Point(272, 32);
             this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(44, 18);
+            this.label6.Size = new System.Drawing.Size(29, 12);
             this.label6.TabIndex = 99;
             this.label6.Text = "鏃ユ湡";
             // 
@@ -793,22 +821,22 @@
             this.grdSub.AllowUserToDeleteRows = false;
             this.grdSub.BackgroundColor = System.Drawing.SystemColors.ControlLightLight;
             this.grdSub.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle2.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.grdSub.DefaultCellStyle = dataGridViewCellStyle2;
+            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle4.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.grdSub.DefaultCellStyle = dataGridViewCellStyle4;
             this.grdSub.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.grdSub.Location = new System.Drawing.Point(0, 110);
+            this.grdSub.Location = new System.Drawing.Point(0, 73);
             this.grdSub.Margin = new System.Windows.Forms.Padding(0);
             this.grdSub.Name = "grdSub";
             this.grdSub.ReadOnly = true;
             this.grdSub.RowHeadersWidth = 51;
             this.grdSub.RowTemplate.Height = 23;
-            this.grdSub.Size = new System.Drawing.Size(386, 830);
+            this.grdSub.Size = new System.Drawing.Size(257, 554);
             this.grdSub.TabIndex = 18;
             this.grdSub.Paint += new System.Windows.Forms.PaintEventHandler(this.grdSub_Paint);
             // 
@@ -816,21 +844,19 @@
             // 
             this.tabControl1.Controls.Add(this.tabPage1);
             this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.tabControl1.Location = new System.Drawing.Point(0, 392);
-            this.tabControl1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.tabControl1.Location = new System.Drawing.Point(0, 261);
             this.tabControl1.Name = "tabControl1";
             this.tabControl1.SelectedIndex = 0;
-            this.tabControl1.Size = new System.Drawing.Size(1488, 548);
+            this.tabControl1.Size = new System.Drawing.Size(992, 366);
             this.tabControl1.TabIndex = 149;
             // 
             // tabPage1
             // 
             this.tabPage1.Controls.Add(this.grdMain);
-            this.tabPage1.Location = new System.Drawing.Point(4, 28);
-            this.tabPage1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.tabPage1.Location = new System.Drawing.Point(4, 22);
             this.tabPage1.Name = "tabPage1";
-            this.tabPage1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.tabPage1.Size = new System.Drawing.Size(1480, 516);
+            this.tabPage1.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
+            this.tabPage1.Size = new System.Drawing.Size(984, 340);
             this.tabPage1.TabIndex = 0;
             this.tabPage1.Text = "绉伴噸璁板綍";
             this.tabPage1.UseVisualStyleBackColor = true;
@@ -840,10 +866,9 @@
             this.panel1.Controls.Add(this.grdSub);
             this.panel1.Controls.Add(this.groupBox1);
             this.panel1.Dock = System.Windows.Forms.DockStyle.Left;
-            this.panel1.Location = new System.Drawing.Point(16, 75);
-            this.panel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.panel1.Location = new System.Drawing.Point(11, 50);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(386, 940);
+            this.panel1.Size = new System.Drawing.Size(257, 627);
             this.panel1.TabIndex = 59;
             // 
             // groupBox1
@@ -853,10 +878,8 @@
             this.groupBox1.Controls.Add(this.cmdOK);
             this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
             this.groupBox1.Location = new System.Drawing.Point(0, 0);
-            this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.groupBox1.Name = "groupBox1";
-            this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.groupBox1.Size = new System.Drawing.Size(386, 110);
+            this.groupBox1.Size = new System.Drawing.Size(257, 73);
             this.groupBox1.TabIndex = 146;
             this.groupBox1.TabStop = false;
             // 
@@ -865,10 +888,9 @@
             this.label1.AutoSize = true;
             this.label1.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.label1.ForeColor = System.Drawing.Color.Black;
-            this.label1.Location = new System.Drawing.Point(16, 60);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Location = new System.Drawing.Point(11, 40);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(62, 18);
+            this.label1.Size = new System.Drawing.Size(41, 12);
             this.label1.TabIndex = 151;
             this.label1.Text = "鏉″舰鐮�";
             // 
@@ -876,10 +898,9 @@
             // 
             this.txtHBarCode.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.txtHBarCode.ImeMode = System.Windows.Forms.ImeMode.NoControl;
-            this.txtHBarCode.Location = new System.Drawing.Point(86, 54);
-            this.txtHBarCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.txtHBarCode.Location = new System.Drawing.Point(57, 36);
             this.txtHBarCode.Name = "txtHBarCode";
-            this.txtHBarCode.Size = new System.Drawing.Size(188, 28);
+            this.txtHBarCode.Size = new System.Drawing.Size(127, 21);
             this.txtHBarCode.TabIndex = 152;
             this.txtHBarCode.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtHBarCode_KeyPress);
             // 
@@ -888,9 +909,10 @@
             this.cmdOK.BackColor = System.Drawing.Color.White;
             this.cmdOK.Cursor = System.Windows.Forms.Cursors.Default;
             this.cmdOK.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.cmdOK.Location = new System.Drawing.Point(284, 50);
+            this.cmdOK.Location = new System.Drawing.Point(189, 33);
+            this.cmdOK.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.cmdOK.Name = "cmdOK";
-            this.cmdOK.Size = new System.Drawing.Size(82, 40);
+            this.cmdOK.Size = new System.Drawing.Size(55, 27);
             this.cmdOK.TabIndex = 150;
             this.cmdOK.Text = "纭";
             this.cmdOK.UseVisualStyleBackColor = false;
@@ -901,105 +923,101 @@
             this.panel2.Controls.Add(this.tabControl1);
             this.panel2.Controls.Add(this.gbUp);
             this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.panel2.Location = new System.Drawing.Point(418, 75);
-            this.panel2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.panel2.Location = new System.Drawing.Point(279, 50);
             this.panel2.Name = "panel2";
-            this.panel2.Size = new System.Drawing.Size(1488, 940);
+            this.panel2.Size = new System.Drawing.Size(992, 627);
             this.panel2.TabIndex = 60;
             // 
             // 宸︿晶
             // 
             this.宸︿晶.Dock = System.Windows.Forms.DockStyle.Left;
-            this.宸︿晶.Location = new System.Drawing.Point(0, 75);
-            this.宸︿晶.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.宸︿晶.Location = new System.Drawing.Point(0, 50);
             this.宸︿晶.Name = "宸︿晶";
-            this.宸︿晶.Size = new System.Drawing.Size(16, 940);
+            this.宸︿晶.Size = new System.Drawing.Size(11, 627);
             this.宸︿晶.TabIndex = 61;
             // 
             // 涓棿
             // 
             this.涓棿.Dock = System.Windows.Forms.DockStyle.Left;
-            this.涓棿.Location = new System.Drawing.Point(402, 75);
-            this.涓棿.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.涓棿.Location = new System.Drawing.Point(268, 50);
             this.涓棿.Name = "涓棿";
-            this.涓棿.Size = new System.Drawing.Size(16, 940);
+            this.涓棿.Size = new System.Drawing.Size(11, 627);
             this.涓棿.TabIndex = 62;
             // 
             // 搴曢儴
             // 
             this.搴曢儴.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.搴曢儴.Location = new System.Drawing.Point(0, 1015);
-            this.搴曢儴.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.搴曢儴.Location = new System.Drawing.Point(0, 677);
             this.搴曢儴.Name = "搴曢儴";
-            this.搴曢儴.Size = new System.Drawing.Size(1924, 15);
+            this.搴曢儴.Size = new System.Drawing.Size(1283, 10);
             this.搴曢儴.TabIndex = 63;
             // 
             // 鍙充晶
             // 
             this.鍙充晶.Dock = System.Windows.Forms.DockStyle.Right;
-            this.鍙充晶.Location = new System.Drawing.Point(1906, 75);
-            this.鍙充晶.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.鍙充晶.Location = new System.Drawing.Point(1271, 50);
             this.鍙充晶.Name = "鍙充晶";
-            this.鍙充晶.Size = new System.Drawing.Size(18, 940);
+            this.鍙充晶.Size = new System.Drawing.Size(12, 627);
             this.鍙充晶.TabIndex = 64;
             // 
             // timer2
             // 
             this.timer2.Tick += new System.EventHandler(this.timer2_Tick);
             // 
-            // button_getHWeight
+            // cmdHBPack
             // 
-            this.button_getHWeight.BackColor = System.Drawing.Color.White;
-            this.button_getHWeight.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.button_getHWeight.Location = new System.Drawing.Point(483, 333);
-            this.button_getHWeight.Name = "button_getHWeight";
-            this.button_getHWeight.Size = new System.Drawing.Size(129, 48);
-            this.button_getHWeight.TabIndex = 326;
-            this.button_getHWeight.Text = "绉伴噸";
-            this.button_getHWeight.UseVisualStyleBackColor = false;
-            this.button_getHWeight.Click += new System.EventHandler(this.button_getHWeight_Click);
+            this.cmdHBPack.BackColor = System.Drawing.Color.White;
+            this.cmdHBPack.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.cmdHBPack.Location = new System.Drawing.Point(847, 40);
+            this.cmdHBPack.Margin = new System.Windows.Forms.Padding(2);
+            this.cmdHBPack.Name = "cmdHBPack";
+            this.cmdHBPack.Size = new System.Drawing.Size(86, 32);
+            this.cmdHBPack.TabIndex = 330;
+            this.cmdHBPack.Text = "寮�濮嬬粍鎵�";
+            this.cmdHBPack.UseVisualStyleBackColor = false;
+            this.cmdHBPack.Click += new System.EventHandler(this.cmdHBPack_Click);
             // 
-            // button_OpenCom
+            // cmdHEPack
             // 
-            this.button_OpenCom.BackColor = System.Drawing.Color.White;
-            this.button_OpenCom.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.button_OpenCom.Location = new System.Drawing.Point(644, 333);
-            this.button_OpenCom.Name = "button_OpenCom";
-            this.button_OpenCom.Size = new System.Drawing.Size(129, 48);
-            this.button_OpenCom.TabIndex = 327;
-            this.button_OpenCom.Text = "鎵撳紑涓插彛";
-            this.button_OpenCom.UseVisualStyleBackColor = false;
-            this.button_OpenCom.Click += new System.EventHandler(this.button_OpenCom_Click);
+            this.cmdHEPack.BackColor = System.Drawing.Color.White;
+            this.cmdHEPack.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.cmdHEPack.Location = new System.Drawing.Point(847, 94);
+            this.cmdHEPack.Margin = new System.Windows.Forms.Padding(2);
+            this.cmdHEPack.Name = "cmdHEPack";
+            this.cmdHEPack.Size = new System.Drawing.Size(86, 32);
+            this.cmdHEPack.TabIndex = 331;
+            this.cmdHEPack.Text = "缁撴潫缁勬墭";
+            this.cmdHEPack.UseVisualStyleBackColor = false;
+            this.cmdHEPack.Click += new System.EventHandler(this.cmdHEPack_Click);
             // 
-            // label_COM
+            // label18
             // 
-            this.label_COM.AutoSize = true;
-            this.label_COM.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label_COM.ForeColor = System.Drawing.Color.Black;
-            this.label_COM.Location = new System.Drawing.Point(708, 171);
-            this.label_COM.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label_COM.Name = "label_COM";
-            this.label_COM.Size = new System.Drawing.Size(35, 18);
-            this.label_COM.TabIndex = 328;
-            this.label_COM.Text = "COM";
+            this.label18.AutoSize = true;
+            this.label18.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label18.ForeColor = System.Drawing.Color.Black;
+            this.label18.Location = new System.Drawing.Point(638, 116);
+            this.label18.Name = "label18";
+            this.label18.Size = new System.Drawing.Size(53, 12);
+            this.label18.TabIndex = 332;
+            this.label18.Text = "鎵樼洏鏉$爜";
             // 
-            // textBox_COM
+            // txtHBarCode_Pack
             // 
-            this.textBox_COM.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.textBox_COM.ImeMode = System.Windows.Forms.ImeMode.NoControl;
-            this.textBox_COM.Location = new System.Drawing.Point(747, 168);
-            this.textBox_COM.Margin = new System.Windows.Forms.Padding(4);
-            this.textBox_COM.Name = "textBox_COM";
-            this.textBox_COM.Size = new System.Drawing.Size(190, 28);
-            this.textBox_COM.TabIndex = 329;
+            this.txtHBarCode_Pack.Font = new System.Drawing.Font("瀹嬩綋", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.txtHBarCode_Pack.ImeMode = System.Windows.Forms.ImeMode.NoControl;
+            this.txtHBarCode_Pack.Location = new System.Drawing.Point(693, 112);
+            this.txtHBarCode_Pack.Name = "txtHBarCode_Pack";
+            this.txtHBarCode_Pack.ReadOnly = true;
+            this.txtHBarCode_Pack.Size = new System.Drawing.Size(128, 21);
+            this.txtHBarCode_Pack.TabIndex = 333;
             // 
             // Kf_WeighToBarCode
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.AutoSize = true;
             this.BackColor = System.Drawing.SystemColors.ActiveCaption;
-            this.ClientSize = new System.Drawing.Size(1924, 1030);
+            this.ClientSize = new System.Drawing.Size(1283, 687);
             this.Controls.Add(this.panel2);
             this.Controls.Add(this.涓棿);
             this.Controls.Add(this.panel1);
@@ -1007,7 +1025,6 @@
             this.Controls.Add(this.鍙充晶);
             this.Controls.Add(this.搴曢儴);
             this.Controls.Add(this.Tool);
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "Kf_WeighToBarCode";
             this.Text = "绉伴噸鍏ュ簱";
             this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
@@ -1103,5 +1120,9 @@
         private System.Windows.Forms.Button button_OpenCom;
         private System.Windows.Forms.TextBox textBox_COM;
         private System.Windows.Forms.Label label_COM;
+        private System.Windows.Forms.Button cmdHEPack;
+        private System.Windows.Forms.Button cmdHBPack;
+        private System.Windows.Forms.Label label18;
+        private System.Windows.Forms.TextBox txtHBarCode_Pack;
     }
 }
\ No newline at end of file
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.resx" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.resx"
index 5f71287..381a61d 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.resx"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Kf_WeighToBarCode.resx"
@@ -360,7 +360,7 @@
   <data name="mrlk.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAH/SURBVDhPfZHfS1NhGMefkCLQu/A/6MK6SbMQFlg3dudN
+        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAH/SURBVDhPfZHfS1NhGMefkCLQu/A/6MK6SbMQFlg3dudN
         oBFDY9BF05XMMAoLL3bhxGB4zjzoVCKim4iCgkCMSam1cqP9aO4YJlpIDmqh00IRv73Pe87OWuV54Mt7
         znm/n895z0aF8Stj6FdGoARDUAf/H97jTp96FyZmjC8QwuRUBB0zACkiwT0i9rxvgBcvX4MZEye65Vex
         vp6HJ7yJ+1nYpmNyE3nRZcbEiW74AljL5UB3gOk84J8HnFPA0UfirZqIaoZPMQDZZcbEibp6+vE9mwUF
@@ -375,7 +375,7 @@
   <data name="bclk.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAH4SURBVDhPjZPNS1RRGMZfI2jRLlqUEKLUQgsl3EauEoRW
+        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAH4SURBVDhPjZPNS1RRGMZfI2jRLlqUEKLUQgsl3EauEoRW
         /QN+phG4CQXTNrPLbzFrpZAuBIfEqChctFRndHI0YzKnxkHFYQgH50NH5+o8Pm/HwQ/s4oGHc++5z/O7
         77nnvSKPPZDyKYSfA8tN55N6NfMvK1XT+LIBxAH8PqfUqxnNitR+g1x/yQuRlJWCZVm2Uo965RozmpXq
         aRR/Io1jYgJwTdlLPeqt92QqqHLj7phZTCST2Nqxl3rUWzrOTKX7JGBykm9x2Us96r3p1ApOAf5G49iI
@@ -390,7 +390,7 @@
   <data name="sx.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAFtSURBVDhPtVPLTsJAFOUj+kV+gWv9CaAWBApoITzER6UJ
+        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFtSURBVDhPtVPLTsJAFOUj+kV+gWv9CaAWBApoITzER6UJ
         EYMuNLIiigkaCKAGEhWN78ToQqMLTTS60I3GzXHu2CpxCsGFJ5l0eu8959y50zr+DcrYAPoH+4RFcbOk
         M6jQaIXReDFQf9JRuptA4SqJhfMYAqUhSJLUWYTIe28ZHHzM8GeTiVQedRRvUli6iCN3rCHNxG1FqD1y
         JvIZZvmeCq1F7nMnER6nvXAccm+8Gmi9Z77JZorDEknvhhDfCohdkED9eZqfXUiaoBp9O4jYhs9eoHQ/
@@ -402,7 +402,7 @@
   <data name="dy.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAADmSURBVDhPlY6xDYMwFES9U3bKCmzACEh0FJmACRiAnoqK
+        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADmSURBVDhPlY6xDYMwFES9U3bKCmzACEh0FJmACRiAnoqK
         jo6OzvH7yVk/OFHg0MnC/vfuhzOq6zrK76vzIrRtm3nf92sgBpdlieu6ZgCe5xmAXEot0zTZMABBXLiU
         grRUVRWHYTATYpOfYR9kiGbMnQelUTu5wzmsoDWk796GOI6jGRDDzH0BxAyQ1Z5e4xhuGUSQWbkAaE2B
         FMRN05h9uAD4JoHato1d9yjCOjOAH9Y+QggDOW5gwZdfEgR7iAf4YG53yq0eBADzjlWk/+QP2WXf9xmk
@@ -412,7 +412,7 @@
   <data name="hb.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAGgSURBVDhPlZPPK8NhHMc/5T7tRM0cOCAHJXGbxQ7c/AEc
+        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGgSURBVDhPlZPPK8NhHMc/5T7tRM0cOCAHJXGbxQ7c/AEc
         d1EcjEwytSiH4SZcRHLQ7FemtlJDOPiZml8XSzMWMz9mK7Xevs/z7DvDzLzr9X2253k+r8+nvn0pM10t
         hGykjnMndRE1ZWJlVKvF+qdErytIF/1G6k72sMPTBULIRcCF4H2bcOMknC8SNsb/IXheJ8R8hAfPPwUH
         M4Qz6fKVlXBtJwRWxP99aX/NnKfgcJZwMkfwS9OwdW86TwFLc6MGmxPE2Zok+CwCzwjB5XDkLpbDJHYj
@@ -425,7 +425,7 @@
   <data name="tc.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
-        YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAADCSURBVDhPpZJdCoMwEIRzpxxJ6Ak2z/ZZnysIBXuUHMA7
+        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADCSURBVDhPpZJdCoMwEIRzpxxJ6Ak2z/ZZnysIBXuUHMA7
         bXeWrGBMYkoHh+gk8xl/XEneP7jXqXIWJkIgHscnT/PEy2vhz7ZhMQ/Dm5l3ObRcB1ACzAKQ6FTcV69G
         rgWTbUl3QFQtFgGpfAAoAVDOi2ZbrwW5hwY4N+P6FmDlkrsBq6zOy3AXIEkhGHMbIMaorgGgI8Cu7CsY
         wOZbAEgDBch/gOveRzgJAKLwH0CGJsDmxU1dAMiSu3R5iZr+oJuic1+SJ5jRbOqnmgAAAABJRU5ErkJg
diff --git a/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs b/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs
index 6a8549e..ad1d60a 100644
--- a/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_BadReasonController.cs
@@ -4529,7 +4529,7 @@
                 }
 
                 string sql1 = "select * from  h_v_Gy_CusType where 1 = 1";
-                string sql = sql1 + sWhere + " order by HNumber ";
+                string sql = sql1 + sWhere;
                 ds = oCN.RunProcReturn(sql, "h_v_Gy_CusType");
 
                 //娣诲姞鍒楀悕
diff --git a/WebAPI/Controllers/BaseSet/Gy_CheckItemController.cs b/WebAPI/Controllers/BaseSet/Gy_CheckItemController.cs
index b5e70f5..6dcf2d9 100644
--- a/WebAPI/Controllers/BaseSet/Gy_CheckItemController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_CheckItemController.cs
@@ -643,9 +643,9 @@
         #endregion
 
         #region 鏍¢獙椤圭洰鍒楄〃 鏂囦欢涓婁紶
-        [Route("Gy_CheckItem/Gy_Process_Excel")]
+        [Route("Gy_CheckItem/Gy_CheckItem_Excel")]
         [HttpPost]
-        public json Gy_Process_Excel()
+        public json Gy_CheckItem_Excel()
         {
             json res = new json();
             try
@@ -674,7 +674,7 @@
 
                 //妯℃澘缂哄皯鍒� 浣嗛渶瑕佷粠鏁版嵁搴撲腑鏌ヨ鍑烘潵鏄剧ず鍦ㄩ〉闈㈢殑瀛楁
                 provisional.Columns.Add("HOrgID", typeof(Int32));//缁勭粐ID
-                provisional.Columns.Add("HDeptID", typeof(Int32));//閮ㄩ棬ID
+                provisional.Columns.Add("HQCCheckClassID", typeof(Int32));//妫�楠岄」鐩垎绫籌D
 
                 //娣诲姞鏁版嵁
                 for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
@@ -700,22 +700,20 @@
 
                 for (int i = 0; i <= provisional.Rows.Count - 1; i++)
                 {
-                    string HNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["浠g爜"].ToString());
-                    string HUSEORGID = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["缁勭粐浠g爜"].ToString());
-                    string HQCCheckClassID = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["妫�楠岄」鐩被鍒唬鐮�"].ToString());
-                    string HQCCheckClassName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["妫�楠岄」鐩被鍒悕绉�"].ToString());
-                    string HName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["鍚嶇О"].ToString());
+                    string HCheckItemName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["妫�楠岄」鐩�"].ToString());
+                    string HCheckItemNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["妫�楠岄」鐩唬鐮�"].ToString());
+                    string HQCCheckClassName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["妫�楠岄」鐩垎绫�"].ToString());
+                    string HQCCheckClassNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["妫�楠岄」鐩垎绫讳唬鐮�"].ToString());
+                    string HORGNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["缁勭粐浠g爜"].ToString());
                     string HORGName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["缁勭粐鍚嶇О"].ToString());
-                    string HHelpCode = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["鍔╄鐮�"]);
-                    string HRemark = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["澶囨敞"].ToString());
 
                     //鑾峰彇鐪熷疄琛屾暟
                     int line = i + 1;
 
-                    if (HUSEORGID != "")
+                    if (HORGNumber != "")
                     {
                         //鏌ヨ缁勭粐
-                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HUSEORGID + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
+                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
 
                         if (ds.Tables[0].Rows.Count == 0)
                         {
@@ -731,8 +729,8 @@
                         }
                         string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
 
-                        //鏌ヨ妫�楠岄」鐩槸鍚﹀瓨鍦�
-                        DataSet checkClass = oCN.RunProcReturn("select * from Gy_QCCheckClass where HNumber = '" + HQCCheckClassID + "' and HName = '" + HQCCheckClassName + "'", "Gy_QCCheckClass");
+                        //鏌ヨ妫�楠岄」鐩垎绫绘槸鍚﹀瓨鍦�
+                        DataSet checkClass = oCN.RunProcReturn("select * from Gy_QCCheckClass where HNumber = '" + HQCCheckClassNumber + "' and HName = '" + HQCCheckClassName + "'", "Gy_QCCheckClass");
                         if (checkClass.Tables[0].Rows.Count == 0)
                         {
                             res.code = CodeConstant.FAIL;
@@ -740,6 +738,10 @@
                             res.Message = "绗�" + line + "琛�,妫�楠岄」鐩笉瀛樺湪锛�";
                             res.data = null;
                             return res;
+                        }
+                        else
+                        {
+                            provisional.Rows[i]["HQCCheckClassID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
                         }
                     }
                     else
@@ -781,14 +783,32 @@
             if (!provisional.Columns.Contains("缁勭粐浠g爜"))
                 error += "娌℃湁鎵惧埌銆愮粍缁囦唬鐮併�戠殑鏍囬,";
 
-            if(!provisional.Columns.Contains("妫�楠岄」鐩被鍒悕绉�"))
-                error += "娌℃湁鎵惧埌銆愭楠岄」鐩被鍒悕绉般�戠殑鏍囬,";
+            if(!provisional.Columns.Contains("妫�楠岄」鐩垎绫讳唬鐮�"))
+                error += "娌℃湁鎵惧埌銆愭楠岄」鐩垎绫讳唬鐮併�戠殑鏍囬,";
+
+            if (!provisional.Columns.Contains("缁勭粐鍚嶇О"))
+                error += "娌℃湁鎵惧埌銆愮粍缁囧悕绉般�戠殑鏍囬,";
+
+            if (!provisional.Columns.Contains("妫�楠岄」鐩垎绫�"))
+                error += "娌℃湁鎵惧埌銆愭楠岄」鐩垎绫汇�戠殑鏍囬,";
+
+            if (!provisional.Columns.Contains("妫�楠岄」鐩�"))
+                error += "娌℃湁鎵惧埌銆愭楠岄」鐩�戠殑鏍囬,";
+
+            if (!provisional.Columns.Contains("妫�楠岄」鐩唬鐮�"))
+                error += "娌℃湁鎵惧埌銆愭楠岄」鐩唬鐮併�戠殑鏍囬,";
+
+            if (!provisional.Columns.Contains("鍔╄鐮�"))
+                error += "娌℃湁鎵惧埌銆愬姪璁扮爜銆戠殑鏍囬,";
+
+            if (!provisional.Columns.Contains("澶囨敞"))
+                error += "娌℃湁鎵惧埌銆愬娉ㄣ�戠殑鏍囬,";
             return error;
         }
         #endregion
 
         #region 鏍¢獙椤圭洰鍒楄〃 瀵煎叆(淇濆瓨)
-        [Route("Gy_CheckItem/Gy_Process_btnSave")]
+        [Route("Gy_CheckItem/Gy_CheckItem_btnSave")]
         [HttpPost]
         public object Gy_Group_btnSave([FromBody] JObject sMainSub)
         {
@@ -799,7 +819,7 @@
             string user = sArray[1].ToString();
             try
             {
-                if (!DBUtility.ClsPub.Security_Log("Gy_Group_Edit", 1, false, user))
+                if (!DBUtility.ClsPub.Security_Log("Gy_QCCheckItem_Edit", 1, false, user))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -825,12 +845,11 @@
                 int i = 1;
                 foreach (Dictionary<string, string> item in list)
                 {
-                    string HNumber = item["浠g爜"].ToString();
-                    string HUSEORGID = item["缁勭粐浠g爜"].ToString();
-                    string HName = item["鍚嶇О"].ToString();
-                    string HORGName = item["缁勭粐鍚嶇О"].ToString();
+                    string HNumber = item["妫�楠岄」鐩唬鐮�"].ToString();
+                    string HUSEORGID = item["HOrgID"].ToString();
+                    string HName = item["妫�楠岄」鐩�"].ToString();
                     string HHelpCode = item["鍔╄鐮�"];
-                    string HQCCheckClassID = item["妫�楠岄」鐩被鍒唬鐮�"];
+                    string HQCCheckClassID = item["HQCCheckClassID"];
                     string HRemark = item["澶囨敞"].ToString();
 
                     string sShortNumber;
diff --git a/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs b/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
index cd5c648..414d5cd 100644
--- a/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_CustomerController.cs
@@ -9,6 +9,12 @@
 using System.Web.Http;
 using WebAPI.Models;
 using System.Text.RegularExpressions;
+using SyntacticSugar.constant;
+using System.Web;
+using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�;
+//using WebAPI.WebBLL.JCJM.GYZL;
+//using WebAPI.WebBLL.JCJM.IMPL;
+using System.IO;
 namespace WebAPI.Controllers
 {
     public class Gy_CustomerController : ApiController
@@ -19,9 +25,10 @@
 
         private json objJsonResult = new json();
         SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        //private Gy_CustomerService customerService = new Gy_CustomerImpl();
         DataSet ds;
 
-
+        #region 杩斿洖瀹㈡埛鍒楄〃
         /// <summary>
         /// 杩斿洖瀹㈡埛鍒楄〃
         ///鍙傛暟锛歴tring sql銆�
@@ -93,6 +100,7 @@
                 return objJsonResult;
             }
         }
+        #endregion
 
         #region 瀹㈡埛瀛愯〃[鍏宠仈鐢ㄦ埛] 鏌ヨ
         /// <summary>
@@ -137,6 +145,7 @@
         }
         #endregion
 
+        #region 瀹㈡埛鍒楄〃淇敼鎸夐挳鏂规硶
         /// <summary>
         /// 瀹㈡埛鍒楄〃淇敼鎸夐挳鏂规硶
         ///鍙傛暟锛歴tring sql銆�
@@ -174,7 +183,7 @@
                 return objJsonResult;
             }
         }
-
+        #endregion
 
         #region 鑾峰彇褰撳墠鏈�澶х殑瀹㈡埛浠g爜
         [Route("Gy_Customer/getMaxCusNumber")]
@@ -214,6 +223,7 @@
         }
         #endregion
 
+        #region 鑾峰彇鏈�澶ц祫鏂橧D鍙傛暟
         /// <summary>
         /// 鑾峰彇鏈�澶у熀纭�璧勬枡ID
         ///鍙傛暟锛歴tring sql銆�
@@ -242,6 +252,7 @@
                 return objJsonResult;
             }
         }
+        #endregion
 
         #region 瀹㈡埛鏍规嵁鍒嗙被鑾峰彇鏈�澶у鎴风紪鐮�
         [Route("Gy_Customer/getMaxNum")]
@@ -320,7 +331,7 @@
         }
         #endregion
 
-
+        #region 瀹㈡埛鍒楄〃鏍戝舰缁撴瀯
         /// <summary>
         /// 瀹㈡埛鍒楄〃鏍戝舰缁撴瀯
         ///鍙傛暟锛歴tring sql銆�
@@ -350,7 +361,9 @@
                 return objJsonResult;
             }
         }
+        #endregion
 
+        #region 鏂板鍗曟嵁
         /// <summary>
         /// 鏂板鍗曟嵁-淇濆瓨鎸夐挳
         ///鍙傛暟锛歴tring sql銆�
@@ -506,9 +519,14 @@
                 return objJsonResult;
             }
         }
+        #endregion
 
-
-
+        #region 淇濆瓨瀹㈡埛鍒楄〃
+        /// <summary>
+        /// 淇濆瓨瀹㈡埛鍒楄〃
+        /// </summary>
+        /// <param name="oMain"></param>
+        /// <returns></returns>
         [Route("Gy_Customer/SaveGy_CustomerListApi")]
         [HttpPost]
         public object SaveGy_CustomerListApi([FromBody] JObject oMain)
@@ -632,9 +650,9 @@
                 return objJsonResult;
             }
         }
+        #endregion
 
-
-
+        #region 淇敼鍗曟嵁-淇濆瓨鎸夐挳
         /// <summary>
         /// 淇敼鍗曟嵁-淇濆瓨鎸夐挳
         ///鍙傛暟锛歴tring sql銆�
@@ -805,9 +823,9 @@
                 return objJsonResult;
             }
         }
+        #endregion
 
-
-
+        # region 瀹㈡埛鍒楄〃鍒犻櫎鎸夐挳
         /// <summary>
         /// 瀹㈡埛鍒楄〃鍒犻櫎鎸夐挳
         ///鍙傛暟锛歴tring sql銆�
@@ -898,7 +916,7 @@
                 return objJsonResult;
             }
         }
-
+        #endregion
 
         #region 瀹㈡埛瀹℃牳銆佸弽瀹℃牳
         /// <summary>
@@ -1090,7 +1108,6 @@
         }
         #endregion
 
-
         #region [鍚屾鍩虹璧勬枡]
         [Route("Gy_Customer/Gy_CustomerViewApi")]
         [HttpGet]
@@ -1253,7 +1270,7 @@
         }
         #endregion
 
-         #region 瀹㈡埛鍒嗙被 鏍戝舰鍥�(鏍规嵁浠g爜灞曞紑鏍戠姸鍥�)
+        #region 瀹㈡埛鍒嗙被 鏍戝舰鍥�(鏍规嵁浠g爜灞曞紑鏍戠姸鍥�)
 
         [Route("Gy_BadReason/Gy_CusrTypeTreeList")]
         [HttpGet]
@@ -1309,7 +1326,7 @@
         {
             try
             {
-                string sql1 = string.Format("select hitemid,hnumber,hname,hparentid,hlevel from Gy_CusType order by hnumber");
+                string sql1 = string.Format("select hitemid,hnumber,hname,hparentid,hlevel from Gy_CusType order by hnumber ");
 
                 ds = oCN.RunProcReturn(sql1, "Gy_CusType");
 
@@ -1349,7 +1366,77 @@
         }
         #endregion
 
+        #region 瀹㈡埛鍒楄〃 鏂囦欢涓婁紶
+        //[Route("Gy_Customer/Gy_Process_Excel")]
+        //[HttpPost]
+        //public json Gy_Department_Excel()
+        //{
+        //    json res = new json();
+        //    try
+        //    {
+        //        //鑾峰彇鏂囦欢鍚嶇О
+        //        var file = HttpContext.Current.Request.Files[0];
+        //        //鑾峰彇鏂囦欢鐗╃悊璺緞
+        //        string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+        //        //淇濆瓨鏂囦欢
+        //        file.SaveAs(ExcelPath);
 
+        //        NpoiHelper np = new NpoiHelper();
+        //        DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+        //        //鍒犻櫎鏂囦欢
+        //        File.Delete(ExcelPath);
+        //        DataTable provisional = customerService.UploadExcel(ExcelDs);             
+                
+        //        res.code = CodeConstant.SUCCEED;
+        //        res.count = CountConstant.SUCCEED;
+        //        res.Message = "涓婁紶鎴愬姛";
+        //        res.data = provisional;
+        //        return res;
+        //    }
+        //    catch (Exception e)
+        //    {
+        //        res.code = "0";
+        //        res.count = 0;
+        //        res.Message = "Exception锛�" + e.ToString();
+        //        res.data = null;
+        //        return res;
+        //    }
+        //}
+
+        /// <summary>
+        /// 鍒ゆ柇褰撳墠鑱屽憳鏄惁瀛樺湪
+        /// </summary>
+        /// <param name="HEmpNumber"></param>
+        /// <param name="HEmpName"></param>
+        /// <returns></returns>
+        //private bool JudgeEmp(string HEmpNumber, string HEmpName)
+        //{
+        //    if (!String.IsNullOrEmpty(HEmpNumber) && !String.IsNullOrEmpty(HEmpName))
+        //    {
+        //        DataSet emp = oCN.RunProcReturn("select * from Gy_Employee where HNumber = '" + HEmpNumber + "' and HName = '" + HEmpName + "'", "Gy_Employee");
+        //        return emp.Tables[0].Rows.Count <= EmptyConstant.EMPTY ? true : false;
+        //    }
+        //    return false;
+        //}
+
+        /// <summary>
+        /// 鍒ゆ柇鍒�
+        /// </summary>
+        /// <param name="provisional"></param>
+        /// <returns></returns>
+        private static string JudgmentColumns(DataTable provisional)
+        {
+            var error = "";
+
+            //鏌ヨ娌℃湁鐨勫垪
+            if (!provisional.Columns.Contains("閮ㄩ棬浠g爜"))
+                error += "娌℃湁鎵惧埌銆愰儴闂ㄤ唬鐮併�戠殑鏍囬,";
+
+            if (!provisional.Columns.Contains("閮ㄩ棬鍚嶇О"))
+                error += "娌℃湁鎵惧埌銆愰儴闂ㄥ悕绉般�戠殑鏍囬,";
+            return error;
+        }
+        #endregion
 
         #region 鐗╂枡鍒嗙被 鏍戝舰鍥�(鏍规嵁浠g爜灞曞紑鏍戠姸鍥�)
 
@@ -1375,7 +1462,6 @@
                     getTreeByLevel(dt, tree[m].children, num + 1);//鍐嶆鐢ㄥ瓙闆嗗幓寰幆锛屾嬁鍑哄瓙闆嗙殑瀛愰泦
                 }
             }
-
         }
         public class TreeModel
         {
@@ -1386,6 +1472,7 @@
 
         #endregion
 
+        #region 閫掑綊鍑芥暟
         /// <summary>
         /// 閫掑綊鍑芥暟
         /// </summary>
@@ -1415,4 +1502,5 @@
         }
 
     }
+    #endregion
 }
\ No newline at end of file
diff --git a/WebAPI/Controllers/BaseSet/Gy_DepartmentController.cs b/WebAPI/Controllers/BaseSet/Gy_DepartmentController.cs
index 7abfd45..67f7da7 100644
--- a/WebAPI/Controllers/BaseSet/Gy_DepartmentController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_DepartmentController.cs
@@ -1,12 +1,16 @@
 锘縰sing Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
 using Pub_Class;
+using SyntacticSugar.constant;
 using System;
 using System.Collections;
 using System.Collections.Generic;
 using System.Data;
 using System.Data.SqlClient;
+using System.IO;
+using System.Web;
 using System.Web.Http;
+using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�;
 using WebAPI.Models;
 namespace WebAPI.Controllers
 {
@@ -1161,5 +1165,243 @@
         }
         #endregion
 
+        #region 閮ㄩ棬鍒楄〃 鏂囦欢涓婁紶
+        //[Route("Gy_Department/Gy_Process_Excel")]
+        //[HttpPost]
+        //public json Gy_Department_Excel()
+        //{
+        //    json res = new json();
+        //    try
+        //    {
+        //        //鑾峰彇鏂囦欢鍚嶇О
+        //        var file = HttpContext.Current.Request.Files[0];
+        //        //鑾峰彇鏂囦欢鐗╃悊璺緞
+        //        string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+        //        //淇濆瓨鏂囦欢
+        //        file.SaveAs(ExcelPath);
+
+        //        NpoiHelper np = new NpoiHelper();
+        //        DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+        //        //鍒犻櫎鏂囦欢
+        //        File.Delete(ExcelPath);
+
+        //        //鍒涘缓涓存椂琛�
+        //        DataTable provisional = new DataTable("dt2");
+
+        //        //娣诲姞鍒楀悕
+        //        for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+        //        {
+        //            provisional.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+        //        }
+
+        //        //娣诲姞鏁版嵁
+        //        for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+        //        {
+        //            DataRow row = provisional.NewRow();
+        //            for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+        //            {
+        //                row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+        //            }
+        //            provisional.Rows.Add(row);
+        //        }
+
+        //        //鍒ゆ柇鍒�
+        //        string error = JudgmentColumns(provisional);
+        //        if (error.Length > 0)
+        //        {
+        //            res.code = "0";
+        //            res.count = 0;
+        //            res.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+        //            res.data = null;
+        //            return res;
+        //        }
+
+        //        for (int i = 0; i <= provisional.Rows.Count - 1; i++)
+        //        {
+        //            string HNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["閮ㄩ棬浠g爜"].ToString());
+        //            string HName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["閮ㄩ棬鍚嶇О"].ToString());
+        //            string HEmpNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["璐熻矗浜轰唬鐮�"].ToString());
+        //            string HEmpName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["璐熻矗浜哄悕绉�"].ToString());
+        //            string HBarCode = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["鏉″舰鐮�"].ToString());
+        //            string HHelpCode = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["鍔╄鐮�"]);
+        //            string HRemark = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["澶囨敞"].ToString());
+
+        //            //鍒ゆ柇璐熻矗浜烘槸鍚﹀瓨鍦�
+        //            if (JudgeEmp(HEmpNumber, HEmpName))
+        //            {
+        //                res.code = CodeConstant.FAIL;
+        //                res.count = CountConstant.FAIL;
+        //                res.Message = "褰撳墠鑱屽憳涓嶅瓨鍦�";
+        //                res.data = null;
+        //                return res;
+        //            }
+        //            //鑾峰彇鐪熷疄琛屾暟
+        //            int line = i + 1;
+        //        }
+
+        //        res.code = "1";
+        //        res.count = 1;
+        //        res.Message = error;
+        //        res.data = provisional;
+        //        return res;
+        //    }
+        //    catch (Exception e)
+        //    {
+        //        res.code = "0";
+        //        res.count = 0;
+        //        res.Message = "Exception锛�" + e.ToString();
+        //        res.data = null;
+        //        return res;
+        //    }
+        //}
+
+        /// <summary>
+        /// 鍒ゆ柇褰撳墠鑱屽憳鏄惁瀛樺湪
+        /// </summary>
+        /// <param name="HEmpNumber"></param>
+        /// <param name="HEmpName"></param>
+        /// <returns></returns>
+        //private bool JudgeEmp(string HEmpNumber, string HEmpName)
+        //{
+        //    if (!String.IsNullOrEmpty(HEmpNumber) && !String.IsNullOrEmpty(HEmpName))
+        //    {
+        //        DataSet emp = oCN.RunProcReturn("select * from Gy_Employee where HNumber = '" + HEmpNumber + "' and HName = '" + HEmpName + "'", "Gy_Employee");
+        //        return emp.Tables[0].Rows.Count <= EmptyConstant.EMPTY ? true : false;
+        //    }
+        //    return false;
+        //}
+
+        /// <summary>
+        /// 鍒ゆ柇鍒�
+        /// </summary>
+        /// <param name="provisional"></param>
+        /// <returns></returns>
+        private static string JudgmentColumns(DataTable provisional)
+        {
+            var error = "";
+
+            //鏌ヨ娌℃湁鐨勫垪
+            if (!provisional.Columns.Contains("閮ㄩ棬浠g爜"))
+                error += "娌℃湁鎵惧埌銆愰儴闂ㄤ唬鐮併�戠殑鏍囬,";
+
+            if (!provisional.Columns.Contains("閮ㄩ棬鍚嶇О"))
+                error += "娌℃湁鎵惧埌銆愰儴闂ㄥ悕绉般�戠殑鏍囬,";
+            return error;
+        }
+        #endregion
+
+        #region 閮ㄩ棬鍒楄〃 瀵煎叆(淇濆瓨)
+        [Route("Gy_Department/Gy_Process_btnSave")]
+        [HttpPost]
+        public object Gy_InspectBasis_btnSave([FromBody] JObject sMainSub)
+        {
+            var _value = sMainSub["sMainSub"].ToString();
+            string msg1 = _value.ToString();
+            string[] sArray = msg1.Split(new string[] { "&鍜�" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString();
+            string user = sArray[1].ToString();
+            string organ = sArray[2].ToString();
+            json res = new json();
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_Group_Edit", 1, false, user))
+                {
+                    res.code = "0";
+                    res.count = 0;
+                    res.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    res.data = null;
+                    return res;
+                }
+
+                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+                foreach (JObject item in Excel)
+                {
+                    Dictionary<string, string> dic = new Dictionary<string, string>();
+                    foreach (var itm in item.Properties())
+                    {
+                        dic.Add(itm.Name, itm.Value.ToString());
+                    }
+                    list.Add(dic);
+                }
+
+                oCN.BeginTran();
+                int i = 1;
+                foreach (Dictionary<string, string> item in list)
+                {
+                    string HNumber = item["閮ㄩ棬浠g爜"].ToString();
+                    string HName = item["閮ㄩ棬鍚嶇О"].ToString();
+                    string HEmpNumber = item["璐熻矗浜轰唬鐮�"].ToString();
+                    string HEmpName = item["璐熻矗浜哄悕绉�"].ToString();
+                    string HBarCode = item["鏉″舰鐮�"].ToString();
+                    string HHelpCode = item["鍔╄鐮�"].ToString();
+                    string HRemark = item["澶囨敞"].ToString();
+                    int HEmpID = 0;
+                    if (!String.IsNullOrEmpty(HEmpName) && !String.IsNullOrEmpty(HEmpNumber))
+                    {
+                        DataSet emp = oCN.RunProcReturn("select HItemID from Gy_Employee where HNumber = '" + HEmpNumber + "' and HName = '" + HEmpName + "'", "Gy_Employee");
+                        HEmpID = (int)emp.Tables[0].Rows[0]["HItemID"];
+                    }
+                    string sShortNumber;
+                    sShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//鐭唬鐮�
+                    if (sShortNumber.Trim() == "")
+                    {
+                        res.code = "0";
+                        res.count = 0;
+                        res.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+                        res.data = 1;
+                        return res;
+                    }
+                    int HEndFlag = 1;//鏈骇鏍囧織
+                    int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //绛夌骇
+
+
+                    if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim()))
+                    {
+                        res.code = "0";
+                        res.count = 0;
+                        res.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                        res.data = 1;
+                        return res;
+                    }
+
+                    ds = oCN.RunProcReturn("select * from Gy_Department where HNumber='" + HNumber + "'", "Gy_InspectInstruMent");
+
+                    if (ds.Tables[0].Rows.Count == 0)
+                    {
+
+                        string sql = "insert into Gy_Department (HName,HNumber,HShortNumber,HLevel,HHelpCode,HParentID,HStopflag,HEndFlag,HRemark,HUseFlag, HUSEORGID, HCREATEORGID, HEmpID, HBarCodeForBase)" +
+                            $"values('{HName}', '{HNumber}', '{sShortNumber}',{HLevel},'',0,'0','0','{HRemark}', '鏈娇鐢�', '{organ}', '{organ}', '{HEmpID}', '{HBarCode}')";
+                        oCN.RunProc(sql);
+                    }
+                    else
+                    {
+                        oCN.RunProc("update Gy_Department  set  HName ='" + HName + "' , HHelpCode = '" + HHelpCode + " ', HBarCodeForBase = '" + HBarCode + "', HEmpID = '" + HEmpID + "', HModifyEmp = '" + user + "', HModifyTime = '" + System.DateTime.Now.ToString("G") + "' where HNumber= '" + HNumber + "'");
+                    }
+
+                    i++;
+                }
+
+                oCN.Commit();
+
+                res.code = "1";
+                res.count = 1;
+                res.Message = "瀵煎叆鎴愬姛!";
+                res.data = null;
+                return res;
+            }
+            catch (Exception e)
+            {
+                LogService.Write(e);
+                res.code = "0";
+                res.count = 0;
+                res.Message = "Exception锛�" + e.ToString();
+                res.data = null;
+                return res;
+            }
+        }
+        #endregion
     }
 }
\ No newline at end of file
diff --git a/WebAPI/Controllers/BaseSet/Gy_EmployeeController.cs b/WebAPI/Controllers/BaseSet/Gy_EmployeeController.cs
index a439450..7a1cf54 100644
--- a/WebAPI/Controllers/BaseSet/Gy_EmployeeController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_EmployeeController.cs
@@ -1348,7 +1348,8 @@
             try
             {
                 //杩斿洖鍒楄〃淇℃伅
-                ds = oCN.RunProcReturn("select * from h_v_IF_EmployeeList where 绂佺敤鏍囪='' and HGroupID=" + HGroupID + " order by 鑱屽憳浠g爜", "h_v_IF_EmployeeList");
+                ds = oCN.RunProcReturn("exec h_p_Pay_GetEmployeeByGroup " + HGroupID.ToString(), "h_p_Pay_GetEmployeeByGroup");
+                //ds = oCN.RunProcReturn("select * from h_v_IF_EmployeeList where 绂佺敤鏍囪='' and HGroupID=" + HGroupID + " order by 鑱屽憳浠g爜", "h_v_IF_EmployeeList");
                 if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
                     objJsonResult.code = "0";
diff --git a/WebAPI/Controllers/BaseSet/Gy_GroupController.cs b/WebAPI/Controllers/BaseSet/Gy_GroupController.cs
index d84dd94..8aec9bf 100644
--- a/WebAPI/Controllers/BaseSet/Gy_GroupController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_GroupController.cs
@@ -46,6 +46,11 @@
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
+
+                //鏍规嵁鐢ㄦ埛瀵瑰簲鐝粍鐨勫叧绯伙紝杩囨护鏉′欢涓鍔犲彧鏄剧ず瀵瑰簲鐨勭彮缁�
+                DataSet dsHitemID = oCN.RunProcReturn("exec h_p_Gy_GetSQLGroupByUser '" + user + "'", "h_p_Gy_GetSQLGroupByUser");
+                sWhere = sWhere + DBUtility.ClsPub.isStrNull(dsHitemID.Tables[0].Rows[0]["HBack"]);
+
                 if (sWhere == null || sWhere.Equals(""))
                 {
                     ds = oCN.RunProcReturn("select * from h_v_GroupList " + sWhere+ " order by 鐝粍浠g爜 ", "h_v_GroupList");
@@ -304,6 +309,7 @@
                 long HProcID = list[0].HProcID;
                 int HUSEORGID = list[0].HUSEORGID;
                 string HCompName = list[0].HCompName;
+                string HPayMentType = list[0].HPayMentType;
                 var HDeptNumber = "";
                 //var HEndFlag = 0;
                 long HLevel = 1;
@@ -344,10 +350,10 @@
                     oCN.RunProc("Insert into Gy_Group " +
                     " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
                     ",HEmpQty,HDeptID,HDeptNumber,HProcID" +
-                    ",HLevel,HEndFlag,HStopflag,HRemark,HBarCodeForBase,HUSEORGID,HCompName) " +
+                    ",HLevel,HEndFlag,HStopflag,HRemark,HBarCodeForBase,HUSEORGID,HCompName,HPayMentType) " +
                     " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + HParentID.ToString() +
                     "," + HEmpQty.ToString() + "," + HDeptID.ToString() + ",'" + HDeptNumber + "'," + HProcID.ToString() +
-                    "," + HLevel.ToString() + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "','" + HBarCodeForBase + "',"+ HUSEORGID + ",'" + HCompName + "')", ref DBUtility.ClsPub.sExeReturnInfo);
+                    "," + HLevel.ToString() + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "','" + HBarCodeForBase + "',"+ HUSEORGID + ",'" + HCompName +"','"+ HPayMentType + "')", ref DBUtility.ClsPub.sExeReturnInfo);
                     //淇敼涓婄骇涓洪潪鏈骇浠g爜
                     oCN.RunProc("Update Gy_Group set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                     oCN.Commit();
@@ -366,7 +372,8 @@
                                  ",HRemark= '" + HRemark + "'" +
                                  ",HDeptID=" + HDeptID +
                                  ",HEmpQty=" + HEmpQty +
-                                 ",HCompName='"+ HCompName+
+                                 ",HCompName='"+ HCompName+"'"+
+                                 ",HPayMentType='" + HPayMentType +
                                  "',HBarCodeForBase='" + HBarCodeForBase + "' " +
                                  ", HProcID = '" + HProcID + "'  Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
                     oCN.RunProc("Update Gy_Group set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
diff --git a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
index c4222fd..6763499 100644
--- a/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_MaterialController.cs
@@ -14,6 +14,8 @@
 using WebAPI.Models;
 using WebAPI.Service;
 using System.Text.RegularExpressions;
+using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�;
+using SyntacticSugar.constant;
 
 namespace WebAPI.Controllers
 {
@@ -656,6 +658,458 @@
             }
         }
 
+        #region 鐗╂枡 鏂囦欢瀵煎叆淇濆瓨
+        #region 鐗╂枡 鏂囦欢涓婁紶
+        [Route("Gy_Material/Gy_Material_Excel")]
+        [HttpPost]
+        public object Gy_Material_Excel()
+        {
+            try
+            {
+                //鑾峰彇鏂囦欢鍚嶇О
+                var file = HttpContext.Current.Request.Files[0];
+                //鑾峰彇鏂囦欢鐗╃悊璺緞
+                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+                //淇濆瓨鏂囦欢
+                file.SaveAs(ExcelPath);
+
+                NpoiHelper np = new NpoiHelper();
+                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+                //鍒犻櫎鏂囦欢
+                File.Delete(ExcelPath);
+
+                //鍒涘缓涓存椂琛�
+                DataTable tb2 = new DataTable("dt2");
+
+                //娣诲姞鍒楀悕
+                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+                {
+                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+                }
+
+                //妯℃澘缂哄皯鍒� 浣嗛渶瑕佷粠鏁版嵁搴撲腑鏌ヨ鍑烘潵鏄剧ず鍦ㄩ〉闈㈢殑瀛楁
+                tb2.Columns.Add("HOrgID", typeof(Int32));//缁勭粐ID
+                tb2.Columns.Add("HMaterClsID", typeof(Int32));//鐗╂枡灞炴�D
+                tb2.Columns.Add("HUnitGroupID", typeof(Int32));//璁¢噺鍗曚綅缁処D
+                tb2.Columns.Add("HUnitID", typeof(Int32));//鍗曚綅ID
+                tb2.Columns.Add("HSecUnitID", typeof(Int32));//杈呭姪璁¢噺鍗曚綅ID
+                tb2.Columns.Add("HWhID", typeof(Int32));//榛樿浠撳簱ID
+                //娣诲姞鏁版嵁
+                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+                {
+                    DataRow row = tb2.NewRow();
+                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+                    {
+                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+                    }
+                    tb2.Rows.Add(row);
+                }
+
+
+                var error = "";
+
+                //鍒ゆ柇瀵煎叆鏂囦欢鍒楁槸鍚﹀畬鏁�
+                if (!tb2.Columns.Contains("缁勭粐浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囦唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("缁勭粐鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囧悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鐗╂枡鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愮墿鏂欏悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鐗╂枡浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愮墿鏂欎唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("瑙勬牸鍨嬪彿"))
+                    error += "娌℃湁鎵惧埌銆愯鏍煎瀷鍙枫�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍔╄鐮�"))
+                    error += "娌℃湁鎵惧埌銆愬姪璁扮爜銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鐗堟湰鍙�"))
+                    error += "娌℃湁鎵惧埌銆愮増鏈彿銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鐗╂枡灞炴��"))
+                    error += "娌℃湁鎵惧埌銆愮墿鏂欏睘鎬с�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("璁¢噺鍗曚綅缁�"))
+                    error += "娌℃湁鎵惧埌銆愯閲忓崟浣嶇粍銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("璁¢噺鍗曚綅浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愯閲忓崟浣嶄唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("璁¢噺鍗曚綅"))
+                    error += "娌℃湁鎵惧埌銆愯閲忓崟浣嶃�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("杈呭姪璁¢噺鍗曚綅"))
+                    error += "娌℃湁鎵惧埌銆愯緟鍔╄閲忓崟浣嶃�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鎹㈢畻鐜�"))
+                    error += "娌℃湁鎵惧埌銆愭崲绠楃巼銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("榛樿浠撳簱"))
+                    error += "娌℃湁鎵惧埌銆愰粯璁や粨搴撱�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鏈�楂樺簱瀛�"))
+                    error += "娌℃湁鎵惧埌銆愭渶楂樺簱瀛樸�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鏈�浣庡簱瀛�"))
+                    error += "娌℃湁鎵惧埌銆愭渶浣庡簱瀛樸�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("瀹夊叏搴撳瓨"))
+                    error += "娌℃湁鎵惧埌銆愬畨鍏ㄥ簱瀛樸�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("閲囪喘鍗曚环"))
+                    error += "娌℃湁鎵惧埌銆愰噰璐崟浠枫�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("閿�鍞崟浠�"))
+                    error += "娌℃湁鎵惧埌銆愰攢鍞崟浠枫�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("璁″垝鍗曚环"))
+                    error += "娌℃湁鎵惧埌銆愯鍒掑崟浠枫�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鏍囧噯鎴愭湰"))
+                    error += "娌℃湁鎵惧埌銆愭爣鍑嗘垚鏈�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("淇濊川鏈�"))
+                    error += "娌℃湁鎵惧埌銆愪繚璐ㄦ湡銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鏈�灏忚璐ч噺"))
+                    error += "娌℃湁鎵惧埌銆愭渶灏忚璐ч噺銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鏈�澶ц璐ч噺"))
+                    error += "娌℃湁鎵惧埌銆愭渶澶ц璐ч噺銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鑻辨枃鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愯嫳鏂囧悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鑻辨枃瑙勬牸"))
+                    error += "娌℃湁鎵惧埌銆愯嫳鏂囪鏍笺�戠殑鏍囬,";
+
+
+                if (error.Length > 0)
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
+                {
+                    string HMaterName = "";
+                    string HMaterNumber = "";
+                    string HORGNumber = "";
+                    string HORGName = "";
+                    string HMaterClsName = "";
+                    string HUnitGroupName = "";
+                    string HUnitNumber = "";
+                    string HUnitName = "";
+                    string HSecUnitName = "";
+                    string HWhName = "";
+
+                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐浠g爜"].ToString());
+                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐鍚嶇О"].ToString());
+                    HMaterNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鐗╂枡浠g爜"].ToString());
+                    HMaterName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鐗╂枡鍚嶇О"].ToString());
+                    HMaterClsName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鐗╂枡灞炴��"].ToString());
+                    HUnitGroupName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["璁¢噺鍗曚綅缁�"].ToString());
+                    HUnitNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["璁¢噺鍗曚綅浠g爜"].ToString());
+                    HUnitName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["璁¢噺鍗曚綅"].ToString());
+                    HSecUnitName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["杈呭姪璁¢噺鍗曚綅"].ToString());
+                    HWhName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["榛樿浠撳簱"].ToString());
+                    //妫�鏌ョ墿鏂�
+                    int index = i + 1;
+
+                    if (HORGNumber != "")
+                    {
+
+                        //鏌ヨ缁勭粐
+                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,缁勭粐涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        //鏌ヨ灞炴��
+                        if (HMaterClsName == "澶栬喘")
+                        {
+                            tb2.Rows[i]["HMaterClsID"] = 1;
+                        }
+                        else if(HMaterClsName == "鑷埗")
+                        {
+                            tb2.Rows[i]["HMaterClsID"] = 2;
+                        }
+                        else if (HMaterClsName == "濮斿")
+                        {
+                            tb2.Rows[i]["HMaterClsID"] = 3;
+                        }
+                        else
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,鐗╂枡灞炴�т笉瀛樺湪锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        //鏌ヨ璁¢噺鍗曚綅缁�
+                        ds = oCN.RunProcReturn("select * from Gy_UnitGroup where  HName='" + HUnitGroupName + "'", "Gy_UnitGroup");
+
+                        if (ds.Tables[0].Rows.Count == 0 && HUnitGroupName != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "绗�" + index + "琛�,璇�" +  "璁¢噺鍗曚綅缁�:" + HUnitGroupName + ",涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else if (HMaterNumber == "")
+                        {
+                            tb2.Rows[i]["HUnitGroupID"] = 0;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HUnitGroupID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        //鏌ヨ鍗曚綅
+                        ds = oCN.RunProcReturn("select * from Gy_Unit where  HNumber='" + HUnitNumber + "'  and HUSEORGID=" + HORGid + "", "Gy_Unit");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "绗�" + index + "琛�,璇�" + HORGName + "缁勭粐,鍗曚綅:" + HUnitName + ",涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HUnitID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        //鏌ヨ杈呭姪鍗曚綅
+                        ds = oCN.RunProcReturn("select * from Gy_Unit where  HName='" + HSecUnitName + "'  and HUSEORGID=" + HORGid + "", "Gy_Unit");
+
+                        if (ds.Tables[0].Rows.Count == 0 && HSecUnitName != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "绗�" + index + "琛�,璇�" + HORGName + "缁勭粐,鍗曚綅:" + HSecUnitName + ",涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }else if (HSecUnitName == "")
+                        {
+                            tb2.Rows[i]["HSecUnitID"] = 0;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HSecUnitID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        //鏌ヨ浠撳簱
+                        ds = oCN.RunProcReturn("select * from Gy_Warehouse where  HName='" + HWhName + "'  and HUSEORGID=" + HORGid + "", "Gy_Warehouse");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "绗�" + index + "琛�,璇�" + HORGName + "缁勭粐,浠撳簱:" + HWhName + ",涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HWHID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        //鐗╂枡鍚嶇О
+                        if (HMaterName == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,鐗╂枡鍚嶇О涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+
+                        //鐗╂枡浠g爜
+                        if (HMaterNumber == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,鐗╂枡缂栧彿涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    else
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "绗�" + index + "琛�,缁勭粐浠g爜涓虹┖";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = error;
+                objJsonResult.data = tb2;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 鐗╂枡椤圭洰 瀵煎叆(淇濆瓨)
+        [Route("Gy_Material/Gy_Material_btnSave")]
+        [HttpPost]
+        public object Gy_Material_btnSave([FromBody] JObject sMainSub)
+        {
+            var _value = sMainSub["sMainSub"].ToString();
+            string msg1 = _value.ToString();
+            string[] sArray = msg1.Split(new string[] { "&鍜�" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString();
+            string user = sArray[1].ToString();
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_Material_Edit", 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+                foreach (JObject item in Excel)
+                {
+                    Dictionary<string, string> dic = new Dictionary<string, string>();
+                    foreach (var itm in item.Properties())
+                    {
+                        dic.Add(itm.Name, itm.Value.ToString());
+                    }
+                    list.Add(dic);
+                }
+
+                oCN.BeginTran();
+                int i = 1;
+                foreach (Dictionary<string, string> item in list)
+                {
+                    DLL.ClsGy_Material_Ctl oBill = new DLL.ClsGy_Material_Ctl();
+                    ClsGy_Material_Model oItem = new ClsGy_Material_Model();
+                    //璧嬪�煎墠绔紶鍏ョ殑
+                    oItem.HUSEORGID = int.Parse(item["HOrgID"].ToString());
+                    oItem.HNumber = item["鐗╂枡浠g爜"].ToString();
+                    oItem.HName = item["鐗╂枡鍚嶇О"].ToString();
+                    oItem.HModel = item["瑙勬牸鍨嬪彿"].ToString();
+                    oItem.HHelpCode = item["鍔╄鐮�"].ToString();
+                    oItem.HVersion = item["鐗堟湰鍙�"].ToString();
+                    oItem.HMaterClsID = int.Parse(item["HMaterClsID"].ToString());
+                    oItem.HUnitGroupID = int.Parse(item["HUnitGroupID"].ToString());
+                    oItem.HUnitID = int.Parse(item["HUnitID"].ToString());
+                    oItem.HSecUnitID = int.Parse(item["HSecUnitID"].ToString());
+                    oItem.HSecUnitRate = double.Parse(item["鎹㈢畻鐜�"].ToString()==""?"0": item["鎹㈢畻鐜�"].ToString());
+                    oItem.HWhID = int.Parse(item["HWhID"].ToString());
+                    oItem.HHighStock = int.Parse(item["鏈�楂樺簱瀛�"].ToString() == "" ? "0" : item["鏈�楂樺簱瀛�"].ToString());
+                    oItem.HLowStock = int.Parse(item["鏈�浣庡簱瀛�"].ToString() == "" ? "0" : item["鏈�浣庡簱瀛�"].ToString());
+                    oItem.HSafeStock = int.Parse(item["瀹夊叏搴撳瓨"].ToString() == "" ? "0" : item["瀹夊叏搴撳瓨"].ToString());
+                    oItem.HOrderPrice = int.Parse(item["閲囪喘鍗曚环"].ToString() == "" ? "0" : item["閲囪喘鍗曚环"].ToString());
+                    oItem.HSalePrice = int.Parse(item["閿�鍞崟浠�"].ToString() == "" ? "0" : item["閿�鍞崟浠�"].ToString());
+                    oItem.HPlanPrice = int.Parse(item["璁″垝鍗曚环"].ToString() == "" ? "0" : item["璁″垝鍗曚环"].ToString());
+                    oItem.HstdPrice = int.Parse(item["鏍囧噯鎴愭湰"].ToString() == "" ? "0" : item["鏍囧噯鎴愭湰"].ToString());
+                    oItem.HKeepDays = int.Parse(item["淇濊川鏈�"].ToString() == "" ? "0" : item["淇濊川鏈�"].ToString());
+                    oItem.HQtyMin = int.Parse(item["鏈�灏忚璐ч噺"].ToString() == "" ? "0" : item["鏈�灏忚璐ч噺"].ToString());
+                    oItem.HQtyMin = int.Parse(item["鏈�澶ц璐ч噺"].ToString() == "" ? "0" : item["鏈�澶ц璐ч噺"].ToString());
+                    oItem.HEngName = item["鑻辨枃鍚嶇О"].ToString();
+                    oItem.HEngModel = item["鑻辨枃瑙勬牸"].ToString();
+                    //甯歌璧嬪�艰祴绌哄�奸槻姝㈡姤閿�
+                    oItem.HMaterTypeID = 0;
+                    oItem.HColorRemark = "";
+                    oItem.HColorNo = "";
+                    oItem.HMaterRuleType = "";
+                    string sShortNumber;
+                    sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim());
+                    if (sShortNumber.Trim() == "")
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    oItem.HShortNumber = sShortNumber;//鐭唬鐮�
+                    oItem.HEndFlag = true;//鏈骇鏍囧織
+                    oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //绛夌骇
+                    oBill.oModel = oItem;
+                    if (!DBUtility.ClsPub.AllowNumber(oItem.HNumber.Trim()))
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+
+                    ds = oCN.RunProcReturn("select * from  Gy_Material where  HNumber='" + oItem.HNumber.Trim() + "'", "Gy_Material");
+
+                    if (ds.Tables[0].Rows.Count == 0)
+                    {
+
+                        oBill.AddNew();
+                    }
+                    else
+                    {
+
+                        int HItemID = int.Parse(ds.Tables[0].Rows[0]["HItemID"].ToString());
+                        oBill.oModel.HItemID = HItemID;
+                        oBill.ModifyByID(oBill.oModel.HItemID);
+
+                    }
+
+                    i++;
+                }
+
+                oCN.Commit();
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = "瀵煎叆鎴愬姛!";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                LogService.Write(e);
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+        #endregion
         /// <summary>
         /// 鐗╂枡璁剧疆鍒犻櫎鍔熻兘
         /// </summary>
@@ -1133,7 +1587,7 @@
                     return objJsonResult;
                 }
 
-                string sql1 = "select top 5000 * from h_v_IF_BarCodeBillList where 1 = 1 ";
+                string sql1 = "select top 15000 * from h_v_IF_BarCodeBillList where 1 = 1 ";
                 string sql = sql1 + sWhere + " order by hmainid desc";
                 ds = oCN.RunProcReturn(sql, "h_v_IF_BarCodeBillList");
 
@@ -1582,6 +2036,30 @@
                 string HMouldClass = mainList[0].HMouldClass;
                 int HNowWHID = mainList[0].HNowWHID;
                 int HNowSPID = mainList[0].HNowSPID;
+                string HMouldUseStatus = mainList[0].HMouldUseStatus;
+
+                //淇濆瓨鍓嶆帶鍒�=========================================
+                string HBillNote = "";
+                ds = oCN.RunProcReturn("Exec h_p_Gy_MouldFileMain_BeforeSaveCtrl " + HInterID.ToString() + ", '" + HBillNo + "','" + HBillNote + "',1 ", "h_p_Gy_MouldFileMain_BeforeSaveCtrl");
+                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]["HBackRemark"].ToString(); ;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                //=========================================================
+
 
                 //涓昏〃
                 oCN.RunProc("Insert Into Gy_MouldFileMain   " +
@@ -1594,7 +2072,7 @@
                 ",HPrintQty,HMouldStatus,HWhID,HRoutingID,HCaveQty" +
                 ",HBomID,HVersion,HSPGroupID,HSPID,HDesignLife,HNowSupID,HNowSupTypeID" +
                 ",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID,HBarCode,HMadeSupID" +
-                ",HMouldClass,HNowWHID,HNowSPID,HInitLife) " +
+                ",HMouldClass,HNowWHID,HNowSPID,HInitLife,HMouldUseStatus) " +
                 " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
                 "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()" +
                 ",'" + HMouldNo + "','" + HName + "','" + HModel + "','" + HModel2 + "','" + HDiameter + "'" +
@@ -1604,7 +2082,7 @@
                 "," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID + "," + HCaveQty +
                 "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "','" + HNowSupID + "','" + HNowSupTypeID + "'" +
                 ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID + "','" + HMouldMaintainRuleInterID + "','" + HBarCode + "'," + HMadeSupID +
-                ",'"+ HMouldClass + "'," + HNowWHID + "," + HNowSPID + ",'" + HInitLife + "') ");
+                ",'"+ HMouldClass + "'," + HNowWHID + "," + HNowSPID + ",'" + HInitLife + "','" + HMouldUseStatus + "') ");
 
                 //瀛愯〃
                 oCN.RunProc("Insert into Gy_MouldFileSub " +
@@ -1616,6 +2094,29 @@
                 ") ");
 
                 objJsonResult = AddBillSub(msg5,msg6,msg7,HInterID, HBillNo);
+
+                //淇濆瓨鍚庢帶鍒�=========================================
+                ds = oCN.RunProcReturn("Exec h_p_Gy_MouldFileMain_AfterSaveCtrl " + HInterID.ToString() + ", '" + HBillNo + "','" + HBillNote + "',1 ", "h_p_Gy_MouldFileMain_AfterSaveCtrl");
+                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]["HBackRemark"].ToString(); ;
+                    objJsonResult.data = null;
+                    oCN.RollBack();
+                    return objJsonResult;
+                }
+                //=========================================================
+
 
                 if (objJsonResult.code == "0")
                 {
@@ -1731,7 +2232,7 @@
                 string HMouldClass = mainList[0].HMouldClass;
                 int HNowWHID = mainList[0].HNowWHID;
                 int HNowSPID = mainList[0].HNowSPID;
-
+                string HMouldUseStatus = mainList[0].HMouldUseStatus;
                 //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
                 oCN.BeginTran();
                 //涓昏〃
@@ -1788,6 +2289,7 @@
                 ",HNowWHID=" + HNowWHID +
                 ",HNowSPID=" + HNowSPID +
                 ",HInitLife='" + HInitLife +
+                "',HMouldUseStatus='" + HMouldUseStatus +
                 "' where HInterID=" + HInterID.ToString());
 
                 //淇敼瀛愰」鐩唬鐮�
@@ -2710,5 +3212,589 @@
         }
         #endregion
 
+        #region 鍣ㄥ叿妗f 鏂囦欢瀵煎叆淇濆瓨
+        #region 鍣ㄥ叿妗f 鏂囦欢涓婁紶
+        [Route("Gy_MouldFile/Gy_MouldFile_Excel")]
+        [HttpPost]
+        public object Gy_Mould_Excel()
+        {
+            try
+            {
+                //鑾峰彇鏂囦欢鍚嶇О
+                var file = HttpContext.Current.Request.Files[0];
+                //鑾峰彇鏂囦欢鐗╃悊璺緞
+                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+                //淇濆瓨鏂囦欢
+                file.SaveAs(ExcelPath);
+
+                NpoiHelper np = new NpoiHelper();
+                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+                //鍒犻櫎鏂囦欢
+                File.Delete(ExcelPath);
+
+                //鍒涘缓涓存椂琛�
+                DataTable tb2 = new DataTable("dt2");
+
+                //娣诲姞鍒楀悕
+                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+                {
+                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+                }
+
+                //妯℃澘缂哄皯鍒� 浣嗛渶瑕佷粠鏁版嵁搴撲腑鏌ヨ鍑烘潵鏄剧ず鍦ㄩ〉闈㈢殑瀛楁
+                tb2.Columns.Add("HOrgID", typeof(Int32));//缁勭粐ID
+                tb2.Columns.Add("HMaterID", typeof(Int32));//鐗╂枡ID
+                tb2.Columns.Add("HMouldTypeID", typeof(Int32));//鍒嗙被ID
+                tb2.Columns.Add("HUnitID", typeof(Int32));//鍗曚綅ID
+                tb2.Columns.Add("HDeptID", typeof(Int32));//閮ㄩ棬ID
+                tb2.Columns.Add("HWHID", typeof(Int32));//浠撳簱ID
+                tb2.Columns.Add("HSupID", typeof(Int32));//渚涘簲鍟咺D
+                tb2.Columns.Add("HSPID", typeof(Int32));//浠撲綅ID
+                tb2.Columns.Add("HMadeSupID", typeof(Int32));//鍒堕�犲晢ID
+                //娣诲姞鏁版嵁
+                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+                {
+                    DataRow row = tb2.NewRow();
+                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+                    {
+                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+                    }
+                    tb2.Rows.Add(row);
+                }
+
+
+                var error = "";
+
+                //鍒ゆ柇瀵煎叆鏂囦欢鍒楁槸鍚﹀畬鏁�
+                if (!tb2.Columns.Contains("缁勭粐浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囦唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("缁勭粐鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囧悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍣ㄥ叿鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愬櫒鍏峰悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍣ㄥ叿缂栧彿"))
+                    error += "娌℃湁鎵惧埌銆愬櫒鍏风紪鍙枫�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍣ㄥ叿鍒嗙被"))
+                    error += "娌℃湁鎵惧埌銆愬櫒鍏峰垎绫汇�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍣ㄥ叿瑙勬牸"))
+                    error += "娌℃湁鎵惧埌銆愬櫒鍏疯鏍笺�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍣ㄥ叿鍨嬪彿"))
+                    error += "娌℃湁鎵惧埌銆愬櫒鍏峰瀷鍙枫�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("绌存暟"))
+                    error += "娌℃湁鎵惧埌銆愮┐鏁般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("杈呭姪灞炴��1"))
+                    error += "娌℃湁鎵惧埌銆愯緟鍔╁睘鎬�1銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("杈呭姪灞炴��2"))
+                    error += "娌℃湁鎵惧埌銆愯緟鍔╁睘鎬�2銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍥惧彿"))
+                    error += "娌℃湁鎵惧埌銆愬浘鍙枫�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("瀵瑰簲ERP鐗╂枡浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愬搴擡RP鐗╂枡浠g爜銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("瀵瑰簲ERP鐗╂枡"))
+                    error += "娌℃湁鎵惧埌銆愬搴擡RP鐗╂枡銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("璁¢噺鍗曚綅"))
+                    error += "娌℃湁鎵惧埌銆愯閲忓崟浣嶃�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍣ㄥ叿鍑哄巶缂栧彿"))
+                    error += "娌℃湁鎵惧埌銆愬櫒鍏峰嚭鍘傜紪鍙枫�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("浣跨敤閮ㄩ棬"))
+                    error += "娌℃湁鎵惧埌銆愪娇鐢ㄩ儴闂ㄣ�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鐘舵��"))
+                    error += "娌℃湁鎵惧埌銆愮姸鎬併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("榛樿浠撳簱"))
+                    error += "娌℃湁鎵惧埌銆愰粯璁や粨搴撱�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("榛樿浠撲綅"))
+                    error += "娌℃湁鎵惧埌銆愰粯璁や粨浣嶃�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鐗堟湰鍙�"))
+                    error += "娌℃湁鎵惧埌銆愮増鏈彿銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("璁捐瀵垮懡"))
+                    error += "娌℃湁鎵惧埌銆愯璁″鍛姐�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("浣跨敤瀵垮懡"))
+                    error += "娌℃湁鎵惧埌銆愪娇鐢ㄥ鍛姐�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鏉″舰鐮�"))
+                    error += "娌℃湁鎵惧埌銆愭潯褰㈢爜銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("渚涘簲鍟嗕唬鐮�"))
+                    error += "娌℃湁鎵惧埌銆愪緵搴斿晢浠g爜銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("渚涘簲鍟�"))
+                    error += "娌℃湁鎵惧埌銆愪緵搴斿晢銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍒堕�犲晢"))
+                    error += "娌℃湁鎵惧埌銆愬埗閫犲晢銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("澶囨敞"))
+                    error += "娌℃湁鎵惧埌銆愬娉ㄣ�戠殑鏍囬,";
+
+
+                if (error.Length > 0)
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
+                {
+                    string HMouldName = "";
+                    string HMouldNum = "";
+                    string HORGNumber = "";
+                    string HORGName = "";
+                    string HMaterNumber = "";
+                    string HMaterName = "";
+                    string HUnitName = "";
+                    string HDeptName = "";
+                    string HWHName = "";
+                    string HSPName = "";
+                    string HSupName = "";
+                    string HSupNumber = "";
+                    string HMadeSupName = "";
+                    string HMouldTypeName = "";
+
+                    HMouldName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鍣ㄥ叿鍚嶇О"].ToString());
+                    HMouldNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鍣ㄥ叿缂栧彿"].ToString());
+                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐浠g爜"].ToString());
+                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐鍚嶇О"].ToString());
+                    HMaterNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["瀵瑰簲ERP鐗╂枡浠g爜"].ToString());
+                    HMaterName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["瀵瑰簲ERP鐗╂枡"].ToString());
+                    HUnitName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["璁¢噺鍗曚綅"].ToString());
+                    HDeptName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["浣跨敤閮ㄩ棬"].ToString());
+                    HWHName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["榛樿浠撳簱"].ToString());
+                    HSPName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["榛樿浠撲綅"].ToString());
+                    HSupName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["渚涘簲鍟�"].ToString());
+                    HSupNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["渚涘簲鍟嗕唬鐮�"].ToString());
+                    HMadeSupName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鍒堕�犲晢"].ToString());
+                    HMouldTypeName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鍣ㄥ叿鍒嗙被"].ToString());
+                    //妫�鏌ョ墿鏂�
+                    int index = i + 1;
+
+                    if (HORGNumber != "")
+                    {
+
+                        //鏌ヨ缁勭粐
+                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,缁勭粐涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        //鏌ヨ鍒嗙被
+                        ds = oCN.RunProcReturn("select * from Gy_MouldType where  HName='" + HMouldTypeName + "' ", "Gy_MouldType");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "绗�" + index + "琛�,鍒嗙被:" + HMouldTypeName + ",涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HMouldTypeID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        //鏌ヨ鐗╂枡
+                        ds = oCN.RunProcReturn("select * from Gy_Material where  HNumber='" + HMaterNumber + "'  and HUSEORGID=" + HORGid + "", "Gy_Department");
+
+                        if (ds.Tables[0].Rows.Count == 0 && HMaterNumber != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "绗�" + index + "琛�,璇�" + HORGName + "缁勭粐,鐗╂枡:" + HMaterName + ",涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else if (HMaterNumber == "")
+                        {
+                            tb2.Rows[i]["HMaterID"] = 0;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HMaterID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        //鏌ヨ鍗曚綅
+                        ds = oCN.RunProcReturn("select * from Gy_Unit where  HName='" + HUnitName + "'  and HUSEORGID=" + HORGid + "", "Gy_Unit");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "绗�" + index + "琛�,璇�" + HORGName + "缁勭粐,鍗曚綅:" + HUnitName + ",涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HUnitID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        //鏌ヨ閮ㄩ棬
+                        ds = oCN.RunProcReturn("select * from Gy_Department where  HName='" + HDeptName + "'  and HUSEORGID=" + HORGid + "", "Gy_Department");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "绗�" + index + "琛�,璇�" + HORGName + "缁勭粐,閮ㄩ棬:" + HDeptName + ",涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HDeptID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        //鏌ヨ浠撳簱
+                        ds = oCN.RunProcReturn("select * from Gy_Warehouse where  HName='" + HWHName + "'  and HUSEORGID=" + HORGid + "", "Gy_Warehouse");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "绗�" + index + "琛�,璇�" + HORGName + "缁勭粐,浠撳簱:" + HWHName + ",涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HWHID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        string HWHID = tb2.Rows[i]["HWHID"].ToString();
+                        //鏌ヨ浠撲綅
+                        ds = oCN.RunProcReturn("select * from Gy_StockPlace where  HName='" + HSPName + "'and HSPGroupID=" + HWHID+ "  and HUSEORGID=" + HORGid + "", "Gy_Warehouse");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "绗�" + index + "琛�,璇�" + HORGName + "缁勭粐,浠撲綅:" + HSPName + ",涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HSPID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        //鏌ヨ渚涘簲鍟�
+                        ds = oCN.RunProcReturn("select * from Gy_Supplier where  HNumber='" + HSupNumber + "'  and HUSEORGID=" + HORGid + "", "Gy_Supplier");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "绗�" + index + "琛�,璇�" + HORGName + "缁勭粐,渚涘簲鍟�:" + HSupName + ",涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HSupID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        //鏌ヨ鍒堕�犲晢
+                        ds = oCN.RunProcReturn("select * from Gy_Supplier where  HName='" + HMadeSupName + "'  and HUSEORGID=" + HORGid + "", "Gy_Supplier");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "绗�" + index + "琛�,璇�" + HORGName + "缁勭粐,鍒堕�犲晢:" + HMadeSupName + ",涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HMadeSupID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+
+                        //鍣ㄥ叿妗f鍚嶇О
+                        if (HMouldName == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,鍣ㄥ叿妗f鍚嶇О涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+
+                        //鍣ㄥ叿妗f浠g爜
+                        if (HMouldNum == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,鍣ㄥ叿妗f浠g爜涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    else
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "绗�" + index + "琛�,缁勭粐浠g爜涓虹┖";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = error;
+                objJsonResult.data = tb2;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 鍣ㄥ叿妗f椤圭洰 瀵煎叆(淇濆瓨)
+        [Route("Gy_MouldFile/Gy_MouldFile_btnSave")]
+        [HttpPost]
+        public object Gy_Mould_btnSave([FromBody] JObject sMainSub)
+        {
+            var _value = sMainSub["sMainSub"].ToString();
+            string msg1 = _value.ToString();
+            string[] sArray = msg1.Split(new string[] { "&鍜�" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString();
+            string user = sArray[1].ToString();
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_MouldFile_Edit", 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+                foreach (JObject item in Excel)
+                {
+                    Dictionary<string, string> dic = new Dictionary<string, string>();
+                    foreach (var itm in item.Properties())
+                    {
+                        dic.Add(itm.Name, itm.Value.ToString());
+                    }
+                    list.Add(dic);
+                }
+
+                oCN.BeginTran();
+                int i = 1;
+                foreach (Dictionary<string, string> item in list)
+                {
+                    string HOrgID = item["HOrgID"].ToString();//缁勭粐ID
+                    string BillType = "3899";
+                    //寰楀埌mainid
+                    long HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+                    string HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true); ;//閫掑叆type寰楀埌鐨勫崟鎹彿
+                    DateTime HDate = DateTime.Now;//鏃ユ湡
+                    int HYear = DBUtility.ClsPub.isInt(DateTime.Now.Year);
+                    double HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
+                    string HMouldNo = item["鍣ㄥ叿缂栧彿"].ToString();
+                    string HBarCode = item["鏉″舰鐮�"].ToString();
+                    string HName = item["鍣ㄥ叿鍚嶇О"].ToString();
+                    string HModel = item["鍣ㄥ叿瑙勬牸"].ToString();
+                    string HModel2 = item["鍣ㄥ叿鍨嬪彿"].ToString();
+                    string HDiameter = "";//鐩村緞
+                    string HSubjoin = item["杈呭姪灞炴��1"].ToString();
+                    string HSubjoin2 = item["杈呭姪灞炴��2"].ToString();
+                    string HPICNo = item["鍥惧彿"].ToString();
+                    string HWorkMaterModel = "";//鐢熶骇浜у搧鍨嬪彿
+                    long HMaterID = int.Parse(item["HMaterID"].ToString());
+                    long HMouleTypeID = int.Parse(item["HMouldTypeID"].ToString());
+                    long HUnitID = int.Parse(item["HUnitID"].ToString());
+                    DateTime HOutComDate = DateTime.Now;
+                    string HOutComNo = item["鍣ㄥ叿鍑哄巶缂栧彿"].ToString();
+                    long HDeptID = int.Parse(item["HDeptID"].ToString());
+                    long HSupID = int.Parse(item["HSupID"].ToString());
+                    string HMouldStatus = item["鐘舵��"].ToString();
+                    long HWHID = int.Parse(item["HWHID"].ToString());
+                    long HRoutingID = 0;//宸ヨ壓璺嚎id
+                    long HBOMID = 0;
+                    string HVersion = "";//鐗堟湰
+                    long HSPGroupID = 0;//榛樿浠撲綅缁�
+                    long HSPID = int.Parse(item["HSPID"].ToString());//浠撲綅id
+                    Double HDesignLife = item["璁捐瀵垮懡"].ToString()=="" ? 0: double.Parse(item["璁捐瀵垮懡"].ToString());
+                    Double HUseLife = item["浣跨敤瀵垮懡"].ToString() == "" ? 0 : double.Parse(item["浣跨敤瀵垮懡"].ToString());
+                    Double HInitLife = 0;//涓婄嚎鍒濆鍖栧鍛�
+                    Double HLeaveLife = 0;//鍓╀綑瀵垮懡
+                    Double HProdQty = 0;//宸茬敓浜ф暟閲�
+                    Double HProdWeight = 0;//宸茬敓浜ч噸閲�
+                    string HRemark = item["澶囨敞"].ToString();
+                    string HMaker = user;
+                    string HMaterNumber = item["瀵瑰簲ERP鐗╂枡浠g爜"].ToString();
+                    string HSupNumber = item["渚涘簲鍟嗕唬鐮�"].ToString();
+                    long HPrintQty = 0;//宸茬敓浜ф暟閲�
+                    string HMouldOWNER = "鑷垂";//璐т富绫诲瀷
+                    string HSaveLife = "";//瀹夊叏瀵垮懡
+                    int HCaveQty = item["绌存暟"].ToString() == "" ? 0 : int.Parse(item["绌存暟"].ToString());
+                    int HMouldDotCheckRuleInterID = 0;
+                    int HMouldMaintainRuleInterID = 0;
+                    int HNowSupID = 0;//铏氭嫙浠�
+                    int HNowSupTypeID = 0;
+                    int HMadeSupID = 0;
+                    string HMouldClass = "妯″叿";//鍣ㄥ叿绫诲瀷
+                    int HNowWHID = 0;
+                    int HNowSPID = 0;
+
+
+                    if (!DBUtility.ClsPub.AllowNumber(HMouldNo.Trim()))
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+
+                    ds = oCN.RunProcReturn("select * from Gy_MouldFileMain where HMouldNo='" + HMouldNo + "'", "Gy_MouldFileMain");
+
+                    if (ds.Tables[0].Rows.Count == 0)
+                    {
+
+                        oCN.RunProc("Insert Into Gy_MouldFileMain   " +
+                        "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
+                        ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
+                        ",HMouldNo,HName,HModel,HModel2,HDiameter" +
+                        ",HSubjoin,HSubjoin2,HPICNo,HWorkMaterModel" +
+                        ",HMaterID,HMaterNumber,HMouldType,HUnitID" +
+                        ",HOutComDate,HOutComNo,HDeptID,HSupID,HSupNumber" +
+                        ",HPrintQty,HMouldStatus,HWhID,HRoutingID,HCaveQty" +
+                        ",HBomID,HVersion,HSPGroupID,HSPID,HDesignLife,HNowSupID,HNowSupTypeID" +
+                        ",HUseLife,HLeaveLife,HProdQty,HProdWeight,HMouldOWNER,HSaveLife,HMouldDotCheckRuleInterID,HMouldMaintainRuleInterID,HBarCode,HMadeSupID" +
+                        ",HMouldClass,HNowWHID,HNowSPID,HInitLife) " +
+                        " values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
+                        "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()" +
+                        ",'" + HMouldNo + "','" + HName + "','" + HModel + "','" + HModel2 + "','" + HDiameter + "'" +
+                        ",'" + HSubjoin + "','" + HSubjoin2 + "','" + HPICNo + "','" + HWorkMaterModel + "'" +
+                        "," + HMaterID + ",'" + HMaterNumber + "'," + HMouleTypeID + "," + HUnitID +
+                        ",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HSupID + ",'" + HSupNumber + "'" +
+                        "," + HPrintQty + ",'" + HMouldStatus + "'," + HWHID + "," + HRoutingID + "," + HCaveQty +
+                        "," + HBOMID + ",'" + HVersion + "'," + HSPGroupID + "," + HSPID + ",'" + HDesignLife + "','" + HNowSupID + "','" + HNowSupTypeID + "'" +
+                        ",'" + HUseLife + "','" + HLeaveLife + "','" + HProdQty + "','" + HProdWeight + "','" + HMouldOWNER + "','" + HSaveLife + "','" + HMouldDotCheckRuleInterID + "','" + HMouldMaintainRuleInterID + "','" + HBarCode + "'," + HMadeSupID +
+                        ",'" + HMouldClass + "'," + HNowWHID + "," + HNowSPID + ",'" + HInitLife + "') ");
+                    }
+                    else
+                    {
+                        oCN.RunProc("UpDate Gy_MouldFileMain set  " +
+                //" HBillNo='" + HBillNo + "'" +  //鍥哄畾璧嬪��===============
+                //",HDate='" + HDate + "'" +
+                //",HYear='" + HYear.ToString() + "'" +
+                //",HPeriod='" + HPeriod.ToString() + "'" +
+                "HRemark='" + HRemark + "'" +
+                ",HUpDater='" + user + "'" +
+                ",HUpDateDate=getdate()" +
+                //========================================
+                //",HMouldNo='" + HMouldNo + "'" +
+                ",HName='" + HName + "'" +
+                ",HModel='" + HModel + "'" +
+                ",HModel2='" + HModel2 + "'" +
+                ",HDiameter='" + HDiameter + "'" +
+                ",HSubjoin='" + HSubjoin + "'" +
+                ",HSubjoin2='" + HSubjoin2 + "'" +
+                ",HPICNo='" + HPICNo + "'" +
+                ",HWorkMaterModel='" + HWorkMaterModel + "'" +
+                ",HMaterID=" + HMaterID.ToString() +
+                ",HMaterNumber='" + HMaterNumber + "'" +
+                ",HMouldClass='" + HMouldClass + "'" +
+                ",HMouldType=" + HMouleTypeID.ToString() +
+                ",HUnitID=" + HUnitID.ToString() +
+                ",HOutComDate='" + HOutComDate + "'" +
+                ",HOutComNo='" + HOutComNo + "'" +
+                ",HDeptID=" + HDeptID.ToString() +
+                ",HSupID=" + HSupID.ToString() +
+                ",HSupNumber='" + HSupNumber + "'" +
+                ",HPrintQty=" + HPrintQty.ToString() +
+                ",HMouldStatus='" + HMouldStatus + "'" +
+                ",HSaveLife='" + HSaveLife + "'" +
+                ",HWhID=" + HWHID.ToString() +
+                ",HRoutingID=" + HRoutingID.ToString() +
+                ",HBomID=" + HBOMID.ToString() +
+                ",HVersion='" + HVersion + "'" +
+                ",HSPGroupID=" + HSPGroupID.ToString() +
+                ",HSPID=" + HSPID.ToString() +
+                ",HDesignLife=" + HDesignLife.ToString() +
+                ",HCaveQty=" + HCaveQty.ToString() +
+                ",HUseLife=" + HUseLife.ToString() +
+                ",HLeaveLife=" + HLeaveLife.ToString() +
+                ",HProdQty=" + HProdQty.ToString() +
+                ",HMouldDotCheckRuleInterID=" + HMouldDotCheckRuleInterID.ToString() +
+                ",HMouldMaintainRuleInterID=" + HMouldMaintainRuleInterID.ToString() +
+                ",HMouldOWNER='" + HMouldOWNER + "'" +
+                ",HNowSupID=" + HNowSupID.ToString() +
+                ",HNowSupTypeID=" + HNowSupTypeID.ToString() +
+                ",HProdWeight=" + HProdWeight.ToString() +
+                ",HBarCode='" + HBarCode.ToString() + "'" +
+                ",HMadeSupID=" + HMadeSupID +
+                ",HNowWHID=" + HNowWHID +
+                ",HNowSPID=" + HNowSPID +
+                ",HInitLife='" + HInitLife +
+                "' where HMouldNo='" + HMouldNo.ToString()+"'");
+                    }
+
+                    i++;
+                }
+
+                oCN.Commit();
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = "瀵煎叆鎴愬姛!";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                LogService.Write(e);
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+        #endregion
+
     }
 }
\ No newline at end of file
diff --git a/WebAPI/Controllers/BaseSet/Gy_ModelTypeController.cs b/WebAPI/Controllers/BaseSet/Gy_ModelTypeController.cs
index 43cab7d..8a8054d 100644
--- a/WebAPI/Controllers/BaseSet/Gy_ModelTypeController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_ModelTypeController.cs
@@ -9,7 +9,10 @@
 using System.Net.Http;
 using System.Web.Http;
 using WebAPI.Models;
-
+using System.Web;
+using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�;
+using System.IO;
+using SyntacticSugar.constant;
 namespace WebAPI.Controllers.BaseSet
 {
     public class Gy_ModelTypeController : ApiController
@@ -553,5 +556,265 @@
         }
         #endregion
 
+        #region 鍣ㄥ叿鍒嗙被 鏂囦欢瀵煎叆淇濆瓨
+        #region 鍣ㄥ叿鍒嗙被 鏂囦欢涓婁紶
+        [Route("Gy_MouldType/Gy_MouldType_Excel")]
+        [HttpPost]
+        public object Gy_MouldType_Excel()
+        {
+            try
+            {
+                //鑾峰彇鏂囦欢鍚嶇О
+                var file = HttpContext.Current.Request.Files[0];
+                //鑾峰彇鏂囦欢鐗╃悊璺緞
+                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+                //淇濆瓨鏂囦欢
+                file.SaveAs(ExcelPath);
+
+                NpoiHelper np = new NpoiHelper();
+                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+                //鍒犻櫎鏂囦欢
+                File.Delete(ExcelPath);
+
+                //鍒涘缓涓存椂琛�
+                DataTable tb2 = new DataTable("dt2");
+
+                //娣诲姞鍒楀悕
+                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+                {
+                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+                }
+
+                //妯℃澘缂哄皯鍒� 浣嗛渶瑕佷粠鏁版嵁搴撲腑鏌ヨ鍑烘潵鏄剧ず鍦ㄩ〉闈㈢殑瀛楁
+                tb2.Columns.Add("HOrgID", typeof(Int32));//缁勭粐ID
+
+                //娣诲姞鏁版嵁
+                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+                {
+                    DataRow row = tb2.NewRow();
+                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+                    {
+                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+                    }
+                    tb2.Rows.Add(row);
+                }
+
+
+                var error = "";
+
+                //鏌ヨ娌℃湁鐨勫垪
+                if (!tb2.Columns.Contains("缁勭粐浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囦唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("缁勭粐鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囧悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍣ㄥ叿鍒嗙被"))
+                    error += "娌℃湁鎵惧埌銆愬櫒鍏峰垎绫诲悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍣ㄥ叿鍒嗙被浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愬櫒鍏峰垎绫讳唬鐮併�戠殑鏍囬,";
+                if (!tb2.Columns.Contains("澶囨敞"))
+                    error += "娌℃湁鎵惧埌銆愬娉ㄣ�戠殑鏍囬,";
+                if (!tb2.Columns.Contains("鍔╄鐮�"))
+                    error += "娌℃湁鎵惧埌銆愬姪璁扮爜銆戠殑鏍囬,";
+
+                if (error.Length > 0)
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
+                {
+                    string HProcessName = "";
+                    string HProcessNum = "";
+                    string HORGNumber = "";
+                    string HORGName = "";
+
+
+                    HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鍣ㄥ叿鍒嗙被"].ToString());
+                    HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鍣ㄥ叿鍒嗙被浠g爜"].ToString());
+                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐浠g爜"].ToString());
+                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐鍚嶇О"].ToString());
+
+                    //妫�鏌ョ墿鏂�
+                    int index = i + 1;
+
+                    if (HORGNumber != "")
+                    {
+
+                        //鏌ヨ缁勭粐
+                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,缁勭粐涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
+
+                        //鍣ㄥ叿鍒嗙被鍚嶇О
+                        if (HProcessName == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,鍣ㄥ叿鍒嗙被鍚嶇О涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+
+                        //鍣ㄥ叿鍒嗙被浠g爜
+                        if (HProcessNum == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,鍣ㄥ叿鍒嗙被浠g爜涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    else
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "绗�" + index + "琛�,缁勭粐浠g爜涓虹┖";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = error;
+                objJsonResult.data = tb2;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 鍣ㄥ叿鍒嗙被椤圭洰 瀵煎叆(淇濆瓨)
+        [Route("Gy_MouldType/Gy_MouldType_btnSave")]
+        [HttpPost]
+        public object Gy_MouldType_btnSave([FromBody] JObject sMainSub)
+        {
+            var _value = sMainSub["sMainSub"].ToString();
+            string msg1 = _value.ToString();
+            string[] sArray = msg1.Split(new string[] { "&鍜�" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString();
+            string user = sArray[1].ToString();
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_ErrType_Edit", 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+                foreach (JObject item in Excel)
+                {
+                    Dictionary<string, string> dic = new Dictionary<string, string>();
+                    foreach (var itm in item.Properties())
+                    {
+                        dic.Add(itm.Name, itm.Value.ToString());
+                    }
+                    list.Add(dic);
+                }
+
+                oCN.BeginTran();
+                int i = 1;
+                foreach (Dictionary<string, string> item in list)
+                {
+                    string HOrgID = item["HOrgID"].ToString();//缁勭粐ID
+                    string HName = item["鍣ㄥ叿鍒嗙被"].ToString();
+                    string HNumber = item["鍣ㄥ叿鍒嗙被浠g爜"].ToString();
+                    string HRemark = item["澶囨敞"].ToString();
+                    string HHelpCode = item["鍔╄鐮�"].ToString();
+                    string sShortNumber;
+                    sShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//鐭唬鐮�
+                    if (sShortNumber.Trim() == "")
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    int HEndFlag = 1;//鏈骇鏍囧織
+                    int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //绛夌骇
+
+
+                    if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim()))
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+
+                    ds = oCN.RunProcReturn("select * from Gy_MouldType where HNumber='" + HNumber + "'", "Gy_MouldType");
+
+                    if (ds.Tables[0].Rows.Count == 0)
+                    {
+                        oCN.RunProc("Insert into Gy_MouldType " +
+                    " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+                    ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime) " +
+                    " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + sShortNumber + "'," + 0 +
+                        "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "',getdate())");
+                    }
+                    else
+                    {
+                        oCN.RunProc("update  Gy_MouldType set HUSEORGID=" + HOrgID + ",HHelpCode = '"+ HHelpCode + "',HRemark='" + HRemark + "'  where HNumber='" + HNumber + "'");
+                    }
+
+                    i++;
+                }
+
+                oCN.Commit();
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = "瀵煎叆鎴愬姛!";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                LogService.Write(e);
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+        #endregion
     }
 }
diff --git a/WebAPI/Controllers/BaseSet/Gy_ProcessController.cs b/WebAPI/Controllers/BaseSet/Gy_ProcessController.cs
index 899915b..4760f32 100644
--- a/WebAPI/Controllers/BaseSet/Gy_ProcessController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_ProcessController.cs
@@ -725,9 +725,6 @@
                 int HQCSchemeID_Proc = list[0].HQCSchemeID_Proc;
                 int HQCSchemeID_Patrol = list[0].HQCSchemeID_Patrol;
 
-
-
-
                 long HWorkCenterID = list[0].HWorkCenterID;    //宸ヤ綔涓績
 
                 long HBadWHID = list[0].HBadWHID; //涓嶈壇浠撳簱
@@ -736,6 +733,8 @@
                 long HWWBadWHID = list[0].HWWBadWHID; //濮斿涓嶈壇浠撳簱
                 long HWWWasterWHID = list[0].HWWWasterWHID; //濮斿鎶ュ簾浠撳簱
                 long HWHID = list[0].HWHID; //鑹搧浠撳簱
+
+                string HPayMentType = list[0].HPayMentType; //璁′欢宸ヨ祫绫诲瀷
 
 
                 //鍒ゆ柇鏉冮檺
@@ -776,13 +775,14 @@
                         ",HLevel,HEndFlag,HStopflag,HRemark,HDeptID,HBarCodeForBase,HProcessID_K3,HBillSubType,HAutoTrunFlag" +
                         ",HFixPrice,HOverFixPrice,HProcMulID,HProcCheckNote" +
                         ",HUSEORGID,HWorkCenterID,HBadWHID,HWasterWHID,HBadCountDevelopWHID,HWWBadWHID,HWWWasterWHID,HWHID,HTProcessFlag" +
-                        ",HQCSchemeID_Fst,HQCSchemeID_Proc,HQCSchemeID_Patrol) " +
+                        ",HQCSchemeID_Fst,HQCSchemeID_Proc,HQCSchemeID_Patrol,HPayMentType) " +
                         " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + HParentID.ToString() +
                         "," + Convert.ToString(HTypeFlow ? 1 : 0) + "," + Convert.ToString(HTypeCount ? 1 : 0) + ",'" + HDeptNumber + "','" + HSNo.ToString() +
                         "'," + HLevel.ToString() + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "'," + HDeptID +
                         ",'" + HBarCode + "'," + HProcessID_K3 + ",'" + HBillSubType + "'," + Convert.ToString(HAutoTrunFlag ? 1 : 0) +
                         ",'" + HFixPrice.ToString() + "'," + HOverFixPrice.ToString() + "," + HProcMulID.ToString() + ",'" + HProcCheckNote.ToString() + "'" +
-                        "," + HUSEORGID + "," + HWorkCenterID + "," + HBadWHID + "," + HWasterWHID + "," + HBadCountDevelopWHID + "," + HWWBadWHID + "," + HWWWasterWHID + "," + HWHID + "," + Convert.ToString(HTProcessFlag ? 1 : 0) + "," + HQCSchemeID_Fst + "," + HQCSchemeID_Proc + "," + HQCSchemeID_Patrol + ")", ref DBUtility.ClsPub.sExeReturnInfo);
+                        "," + HUSEORGID + "," + HWorkCenterID + "," + HBadWHID + "," + HWasterWHID + "," + HBadCountDevelopWHID + "," + HWWBadWHID + "," + HWWWasterWHID + "," + HWHID + "," + Convert.ToString(HTProcessFlag ? 1 : 0) + "," + HQCSchemeID_Fst + "," + HQCSchemeID_Proc + "," + HQCSchemeID_Patrol 
+                        + ",'" + HPayMentType + "'" + ")", ref DBUtility.ClsPub.sExeReturnInfo);
                     //淇敼涓婄骇涓洪潪鏈骇浠g爜
                     oCN.RunProc("Update Gy_Process set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
                     oCN.Commit();
@@ -824,6 +824,7 @@
                         ",HQCSchemeID_Fst= " + HQCSchemeID_Fst +
                         ",HQCSchemeID_Proc= " + HQCSchemeID_Proc +
                         ",HQCSchemeID_Patrol= " + HQCSchemeID_Patrol +
+                        ",HPayMentType= '" + HPayMentType + "'" +
                         ",HProcCheckNote='" + HProcCheckNote + "' Where HItemID=" + HItemID, ref DBUtility.ClsPub.sExeReturnInfo);
                     //淇敼涓婄骇涓洪潪鏈骇浠g爜
                     oCN.RunProc("Update Gy_Process set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
diff --git a/WebAPI/Controllers/BaseSet/Gy_QCCheckClassController.cs b/WebAPI/Controllers/BaseSet/Gy_QCCheckClassController.cs
index bec08dd..de7e222 100644
--- a/WebAPI/Controllers/BaseSet/Gy_QCCheckClassController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_QCCheckClassController.cs
@@ -463,10 +463,10 @@
         }
         #endregion
 
-        #region 鏍¢獙椤圭洰鍒楄〃 鏂囦欢涓婁紶
-        [Route("Gy_QCCheckClass/Gy_Process_Excel")]
+        #region 鏍¢獙椤圭洰鍒嗙被鍒楄〃 鏂囦欢涓婁紶
+        [Route("Gy_QCCheckClass/Gy_QCCheckClass_Excel")]
         [HttpPost]
-        public json Gy_Process_Excel()
+        public json Gy_QCCheckClass_Excel()
         {
             json res = new json();
             try
@@ -492,7 +492,8 @@
                 {
                     provisional.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
                 }
-
+                //妯℃澘缂哄皯鍒� 浣嗛渶瑕佷粠鏁版嵁搴撲腑鏌ヨ鍑烘潵鏄剧ず鍦ㄩ〉闈㈢殑瀛楁
+                provisional.Columns.Add("HOrgID", typeof(Int32));//缁勭粐ID
                 //娣诲姞鏁版嵁
                 for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
                 {
@@ -517,12 +518,39 @@
 
                 for (int i = 0; i <= provisional.Rows.Count - 1; i++)
                 {
-                    string HNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["浠g爜"].ToString());
-                    string HName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["鍚嶇О"].ToString());
-                    string HHelpCode = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["鍔╄鐮�"]);
-                    string HRemark = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["澶囨敞"].ToString());
+                    string HQCCheckClassName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["妫�楠岄」鐩垎绫�"].ToString());
+                    string HQCCheckClassNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["妫�楠岄」鐩垎绫讳唬鐮�"].ToString());
+                    string HORGNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["缁勭粐浠g爜"].ToString());
+                    string HORGName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["缁勭粐鍚嶇О"].ToString());
                     //鑾峰彇鐪熷疄琛屾暟
                     int line = i + 1;
+                    if (HORGNumber != "")
+                    {
+                        //鏌ヨ缁勭粐
+                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            res.code = "0";
+                            res.count = 0;
+                            res.Message = "绗�" + line + "琛�,缁勭粐涓嶅瓨鍦紒";
+                            res.data = null;
+                            return res;
+                        }
+                        else
+                        {
+                            provisional.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                    }
+                    else
+                    {
+                        res.code = CodeConstant.FAIL;
+                        res.count = CountConstant.FAIL;
+                        res.Message = "绗�" + line + "琛�,缁勭粐浠g爜涓虹┖";
+                        res.data = null;
+                        return res;
+                    }
                 }
 
                 res.code = "1";
@@ -551,17 +579,29 @@
             var error = "";
 
             //鏌ヨ娌℃湁鐨勫垪
-            if (!provisional.Columns.Contains("浠g爜"))
-                error += "娌℃湁鎵惧埌銆愪唬鐮併�戠殑鏍囬,";
+            if (!provisional.Columns.Contains("缁勭粐浠g爜"))
+                error += "娌℃湁鎵惧埌銆愮粍缁囦唬鐮併�戠殑鏍囬,";
 
-            if (!provisional.Columns.Contains("鍚嶇О"))
-                error += "娌℃湁鎵惧埌銆愬悕绉般�戠殑鏍囬,";
+            if(!provisional.Columns.Contains("妫�楠岄」鐩垎绫讳唬鐮�"))
+                error += "娌℃湁鎵惧埌銆愭楠岄」鐩垎绫讳唬鐮併�戠殑鏍囬,";
+
+            if (!provisional.Columns.Contains("缁勭粐鍚嶇О"))
+                error += "娌℃湁鎵惧埌銆愮粍缁囧悕绉般�戠殑鏍囬,";
+
+            if (!provisional.Columns.Contains("妫�楠岄」鐩垎绫�"))
+                error += "娌℃湁鎵惧埌銆愭楠岄」鐩垎绫汇�戠殑鏍囬,";
+
+            if (!provisional.Columns.Contains("鍔╄鐮�"))
+                error += "娌℃湁鎵惧埌銆愬姪璁扮爜銆戠殑鏍囬,";
+
+            if (!provisional.Columns.Contains("澶囨敞"))
+                error += "娌℃湁鎵惧埌銆愬娉ㄣ�戠殑鏍囬,";
             return error;
         }
         #endregion
 
-        #region 鏍¢獙椤圭洰鍒楄〃 瀵煎叆(淇濆瓨)
-        [Route("Gy_QCCheckClass/Gy_Process_btnSave")]
+        #region 鏍¢獙椤圭洰鍒嗙被鍒楄〃 瀵煎叆(淇濆瓨)
+        [Route("Gy_QCCheckClass/Gy_QCCheckClass_btnSave")]
         [HttpPost]
         public object Gy_Group_btnSave([FromBody] JObject sMainSub)
         {
@@ -573,7 +613,7 @@
             string organ = sArray[2].ToString();
             try
             {
-                if (!DBUtility.ClsPub.Security_Log("Gy_Group_Edit", 1, false, user))
+                if (!DBUtility.ClsPub.Security_Log("Gy_QCCheckClass_Edit", 1, false, user))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -599,8 +639,9 @@
                 int i = 1;
                 foreach (Dictionary<string, string> item in list)
                 {
-                    string HNumber = item["浠g爜"].ToString();
-                    string HName = item["鍚嶇О"].ToString();
+                    string HNumber = item["妫�楠岄」鐩垎绫讳唬鐮�"].ToString();
+                    string HUSEORGID = item["HOrgID"].ToString();
+                    string HName = item["妫�楠岄」鐩垎绫�"].ToString();
                     string HHelpCode = item["鍔╄鐮�"];
                     string HRemark = item["澶囨敞"].ToString();
 
@@ -633,12 +674,12 @@
                     {
 
                         string sql = "insert into Gy_QCCheckClass (HName,HNumber,HShortNumber,HLevel,HHelpCode,HParentID,HStopflag,HEndFlag,HRemark,HUseFlag, HUSEORGID, HCREATEORGID, HMakeTime,HMakeEmp)" +
-                            $"values('{HName}', '{HNumber}', '{sShortNumber}',{HLevel},'',0,'0','0','{HRemark}', '鏈娇鐢�', '{organ}', '{organ}', '{System.DateTime.Now.ToString("G")}', '{user}')";
+                            $"values('{HName}', '{HNumber}', '{sShortNumber}',{HLevel},'',0,'0','0','{HRemark}', '鏈娇鐢�', '{HUSEORGID}', '{HUSEORGID}', '{System.DateTime.Now.ToString("G")}', '{user}')";
                         oCN.RunProc(sql);
                     }
                     else
                     {
-                        oCN.RunProc("update  Gy_QCCheckClass  set  HName='" + HName + "', HHelpCode='" + HHelpCode + "', HModifyEmp = '" + user + "', HModifyTime = '" + System.DateTime.Now.ToString("G") + "'where HNumber='" + HNumber + "'");
+                        oCN.RunProc("update  Gy_QCCheckClass  set  HName='" + HName + "', HHelpCode='" + HHelpCode + "', HModifyEmp = '" + user + "', HModifyTime = '" + System.DateTime.Now.ToString("G") + "',HUSEORGID="+ HUSEORGID + ",HRemark='"+HRemark+"' where HNumber='" + HNumber + "'");
                     }
 
                     i++;
diff --git a/WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs b/WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs
index e8f092b..6aa9e2f 100644
--- a/WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_WarehouseController.cs
@@ -2,11 +2,14 @@
 using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
 using Pub_Class;
+using SyntacticSugar.constant;
 using System;
 using System.Collections;
 using System.Collections.Generic;
 using System.Data;
 using System.Data.SqlClient;
+using System.IO;
+using System.Web;
 using System.Web.Http;
 using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�;
 using WebAPI.Models;
@@ -781,8 +784,6 @@
         }
         #endregion
 
-
-
         #region 鐗╂枡鍒嗙被瀹℃牳銆佸弽瀹℃牳
         /// <summary>
         /// 
@@ -973,5 +974,242 @@
         }
         #endregion
 
+        #region 妫�楠屼緷鎹垪琛� 鏂囦欢涓婁紶
+        //[Route("Gy_Warehouse/Gy_Process_Excel")]
+        //[HttpPost]
+        //public json Gy_InspectBasis_Excel()
+        //{
+        //    json res = new json();
+        //    try
+        //    {
+        //        //鑾峰彇鏂囦欢鍚嶇О
+        //        var file = HttpContext.Current.Request.Files[0];
+        //        //鑾峰彇鏂囦欢鐗╃悊璺緞
+        //        string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+        //        //淇濆瓨鏂囦欢
+        //        file.SaveAs(ExcelPath);
+
+        //        NpoiHelper np = new NpoiHelper();
+        //        DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+        //        //鍒犻櫎鏂囦欢
+        //        File.Delete(ExcelPath);
+
+        //        //鍒涘缓涓存椂琛�
+        //        DataTable provisional = new DataTable("dt2");
+
+        //        //娣诲姞鍒楀悕
+        //        for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+        //        {
+        //            provisional.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+        //        }
+
+        //        //娣诲姞鏁版嵁
+        //        for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+        //        {
+        //            DataRow row = provisional.NewRow();
+        //            for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+        //            {
+        //                row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+        //            }
+        //            provisional.Rows.Add(row);
+        //        }
+
+        //        //鍒ゆ柇鍒�
+        //        string error = JudgmentColumns(provisional);
+        //        if (error.Length > 0)
+        //        {
+        //            res.code = "0";
+        //            res.count = 0;
+        //            res.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+        //            res.data = null;
+        //            return res;
+        //        }
+
+        //        for (int i = 0; i <= provisional.Rows.Count - 1; i++)
+        //        {
+        //            string HNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["浠撳簱浠g爜"].ToString());
+        //            string HName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["浠撳簱鍚嶇О"].ToString());
+        //            string phone = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["鑱旂郴鐢佃瘽"].ToString());
+        //            string HEmpNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["鑱屽憳浠g爜"].ToString());
+        //            string HEmpName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["鑱屽憳鍚嶇О"].ToString());
+        //            string HHelpCode = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["鍔╄鐮�"]);
+        //            string HRemark = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["澶囨敞"].ToString());
+        //            if(JudgeEmp(HEmpNumber, HEmpName))
+        //            {
+        //                res.code = CodeConstant.FAIL;
+        //                res.count = CountConstant.FAIL;
+        //                res.Message = "褰撳墠鑱屽憳涓嶅瓨鍦�";
+        //                res.data = null;
+        //                return res;
+        //            }
+        //            //鑾峰彇鐪熷疄琛屾暟
+        //            int line = i + 1;
+        //        }
+
+        //        res.code = "1";
+        //        res.count = 1;
+        //        res.Message = error;
+        //        res.data = provisional;
+        //        return res;
+        //    }
+        //    catch (Exception e)
+        //    {
+        //        res.code = "0";
+        //        res.count = 0;
+        //        res.Message = "Exception锛�" + e.ToString();
+        //        res.data = null;
+        //        return res;
+        //    }
+        //}
+
+        ///// <summary>
+        ///// 鍒ゆ柇褰撳墠鑱屽憳鏄惁瀛樺湪
+        ///// </summary>
+        ///// <param name="HEmpNumber"></param>
+        ///// <param name="HEmpName"></param>
+        ///// <returns></returns>
+        //private bool JudgeEmp(string HEmpNumber, string HEmpName)
+        //{
+        //    if (!String.IsNullOrEmpty(HEmpNumber) && !String.IsNullOrEmpty(HEmpName))
+        //    {
+        //        DataSet emp = oCN.RunProcReturn("select * from Gy_Employee where HNumber = '" + HEmpNumber + "' and HName = '" + HEmpName + "'", "Gy_Employee");
+        //        return emp.Tables[0].Rows.Count <= EmptyConstant.EMPTY ? true : false;
+        //    }
+        //    return false;
+        //}
+
+        /// <summary>
+        /// 鍒ゆ柇鍒�
+        /// </summary>
+        /// <param name="provisional"></param>
+        /// <returns></returns>
+        private static string JudgmentColumns(DataTable provisional)
+        {
+            var error = "";
+
+            //鏌ヨ娌℃湁鐨勫垪
+            if (!provisional.Columns.Contains("浠撳簱浠g爜"))
+                error += "娌℃湁鎵惧埌銆愪粨搴撲唬鐮併�戠殑鏍囬,";
+
+            if (!provisional.Columns.Contains("浠撳簱鍚嶇О"))
+                error += "娌℃湁鎵惧埌銆愪粨搴撳悕绉般�戠殑鏍囬,";
+            return error;
+        }
+        #endregion
+
+        #region 妫�楠屼緷鎹垪琛� 瀵煎叆(淇濆瓨)
+        [Route("Gy_Warehouse/Gy_Process_btnSave")]
+        [HttpPost]
+        public object Gy_InspectBasis_btnSave([FromBody] JObject sMainSub)
+        {
+            var _value = sMainSub["sMainSub"].ToString();
+            string msg1 = _value.ToString();
+            string[] sArray = msg1.Split(new string[] { "&鍜�" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString();
+            string user = sArray[1].ToString();
+            string organ = sArray[2].ToString();
+            json res = new json();
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_Group_Edit", 1, false, user))
+                {
+                    res.code = "0";
+                    res.count = 0;
+                    res.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    res.data = null;
+                    return res;
+                }
+
+                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+                foreach (JObject item in Excel)
+                {
+                    Dictionary<string, string> dic = new Dictionary<string, string>();
+                    foreach (var itm in item.Properties())
+                    {
+                        dic.Add(itm.Name, itm.Value.ToString());
+                    }
+                    list.Add(dic);
+                }
+
+                oCN.BeginTran();
+                int i = 1;
+                foreach (Dictionary<string, string> item in list)
+                {
+                    string HNumber = item["浠撳簱浠g爜"].ToString();
+                    string HName = item["浠撳簱鍚嶇О"].ToString();
+                    string phone = item["鑱旂郴鐢佃瘽"].ToString();
+                    string HEmpNumber = item["鑱屽憳浠g爜"].ToString();
+                    string HEmpName = item["鑱屽憳鍚嶇О"].ToString();
+                    string HHelpCode = item["鍔╄鐮�"].ToString();
+                    string HRemark = item["澶囨敞"].ToString();
+                    int HEmpID = 0;
+                    if (!String.IsNullOrEmpty(HEmpName) && !String.IsNullOrEmpty(HEmpNumber))
+                    {
+                        DataSet emp = oCN.RunProcReturn("select HItemID from Gy_Employee where HNumber = '" + HEmpNumber + "' and HName = '" + HEmpName + "'", "Gy_Employee");
+                        HEmpID = (int)emp.Tables[0].Rows[0]["HItemID"];
+                    }
+                    string sShortNumber;
+                    sShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//鐭唬鐮�
+                    if (sShortNumber.Trim() == "")
+                    {
+                        res.code = "0";
+                        res.count = 0;
+                        res.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+                        res.data = 1;
+                        return res;
+                    }
+                    int HEndFlag = 1;//鏈骇鏍囧織
+                    int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //绛夌骇
+
+
+                    if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim()))
+                    {
+                        res.code = "0";
+                        res.count = 0;
+                        res.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                        res.data = 1;
+                        return res;
+                    }
+
+                    ds = oCN.RunProcReturn("select * from Gy_Warehouse where HNumber='" + HNumber + "'", "Gy_InspectInstruMent");
+
+                    if (ds.Tables[0].Rows.Count == 0)
+                    {
+
+                        string sql = "insert into Gy_Warehouse (HName,HNumber,HShortNumber,HLevel,HHelpCode,HParentID,HStopflag,HEndFlag,HRemark,HUseFlag, HUSEORGID, HCREATEORGID, HEmpID, HPhone)" +
+                            $"values('{HName}', '{HNumber}', '{sShortNumber}',{HLevel},'',0,'0','0','{HRemark}', '鏈娇鐢�', '{organ}', '{organ}', '{HEmpID}', '{phone}')";
+                        oCN.RunProc(sql);
+                    }
+                    else
+                    {
+                        oCN.RunProc("update Gy_Warehouse  set  HName ='" + HName + "' , HHelpCode = '" + HHelpCode + " ', HPhone= '" + phone + "', HEmpID = '" + HEmpID + "', HModifyEmp = '" + user + "', HModifyTime = '" + System.DateTime.Now.ToString("G") + "' where HNumber= '" + HNumber + "'");
+                    }
+
+                    i++;
+                }
+
+                oCN.Commit();
+
+                res.code = "1";
+                res.count = 1;
+                res.Message = "瀵煎叆鎴愬姛!";
+                res.data = null;
+                return res;
+            }
+            catch (Exception e)
+            {
+                LogService.Write(e);
+                res.code = "0";
+                res.count = 0;
+                res.Message = "Exception锛�" + e.ToString();
+                res.data = null;
+                return res;
+            }
+        }
+        #endregion
+
     }
 }
\ No newline at end of file
diff --git a/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs b/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs
index bf7c8cd..d04822d 100644
--- a/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs
+++ b/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs
@@ -746,7 +746,8 @@
                 string HInnerBillNo = mainList[0].HInnerBillNo;//鍐呴儴鍗曟嵁鍙� 
                 long HWHID = mainList[0].HWHID;//浠撳簱 
                 long HProjectID = mainList[0].HProjectID;//浠撳簱 
-
+                string HLinkMan = mainList[0].HLinkMan;//鑱旂郴浜�
+                string HLinkPhone = mainList[0].HLinkPhone;//鑱旂郴浜虹數璇�
                 List<ClsCg_POOrderBillMain> mainList2 = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ClsCg_POOrderBillMain>>(msg2);
                 DateTime dt = DateTime.Now;
                 long HPURCHASEORGID = mainList2[0].HOrgID;
@@ -827,14 +828,14 @@
 	                    ,HMaker,HMakeDate
 	                    ,HERPInterID,HERPBillType,HPURCHASEORGID
                         ,HPURCHASERGROUPID,HPROVIDERID,HSETTLEID,HCHARGEID,HBUSINESSTYPE,HPROVIDERADDRESS,HCORRESPONDORGID,HPROVIDERCONTACTID
-                        ,HWHID,HProjectID)
+                        ,HWHID,HProjectID,HLinkMan,HLinkPhone)
                         values(" + HInterID + "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + 1102 + "','" +
                     1102 + "','" + HDate + "','" + HBillNo + "','" + HBillStatus + "','" + HAddress +
                     "'," + HSSID + ",'" + HSSDate + "'," + HPSStyleID + "," + HSupID + "," + HCurID +
                     "," + HExRate + "," + HEmpID + "," + HManagerID + "," + HDeptID + ",'" + HExplanation + "','" + HRemark + "','" + HInnerBillNo + "','" + HMaker + "',getdate()" + "," + HERPInterID + ",'" + HERPBillType + "'," + HPURCHASEORGID + "," + HPURCHASERGROUPID + ","
                     + HPROVIDERID + "," + HSETTLEID + "," + HCHARGEID + ",'" + HBUSINESSTYPE + "','" + HPROVIDERADDRESS + "',"
                     + HCORRESPONDORGID + "," + HPROVIDERCONTACTID + ","
-                    + HWHID+","+ HProjectID + ")");
+                    + HWHID+","+ HProjectID +",'"+HLinkMan+"','"+HLinkPhone+"'"+")");
                 }
                 else if (OperationType == 3 || ds.Tables[0].Rows.Count != 0)
                 { //淇敼
@@ -862,7 +863,7 @@
                                 "HRemark='" + HRemark + "', HUpDater='" + HMaker + "', HUpDateDate=getdate()" +
                                  ",HSSID=" + HSSID + ",HPSStyleID=" + HPSStyleID + ",HSupID=" + HSupID + ",HCurID=" + HCurID
                                  + ",HExRate=" + HExRate + ",HEmpID=" + HEmpID + ",HManagerID=" + HManagerID + ",HDeptID=" + HDeptID
-                                 + ",HAddress='" + HAddress + "',HSSDate='" + HSSDate + "',HWHID="+ HWHID + ",HProjectID="+ HProjectID + " where HInterID=" + HInterID);
+                                 + ",HAddress='" + HAddress + "',HSSDate='" + HSSDate + "',HWHID="+ HWHID + ",HProjectID="+ HProjectID +",HLinkMan = '"+HLinkMan+"',HLinkPhone = '"+HLinkPhone+ "' where HInterID=" + HInterID);
 
                     //鍒犻櫎瀛愯〃
                     oCN.RunProc("delete from Cg_POOrderBillSub where HInterID='" + HInterID + "'");
diff --git a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
index daace44..faf4efb 100644
--- a/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_SingleStationController.cs
@@ -734,6 +734,7 @@
                 ds = oCN.RunProcReturn(@"select * from h_v_Gy_BarCodeBill WITH(NOLOCK) where HBarCode='" + HBarCode + "'", "h_v_Gy_BarCodeBill");
                 if (ds.Tables[0].Rows.Count == 0)
                 {
+                    //鍒ゆ柇闀垮害鏄惁涓�29浣� 鏃犲皹杞﹂棿
                     if (HBarCode.Length == 29)
                     {
                         string str1 = HBarCode.Substring(18, 8);
@@ -741,7 +742,7 @@
                         DataSet dataSet = oCN.RunProcReturn(@"select  m.HNumber 鐗╂枡浠g爜,o.HNumber 缁勭粐浠g爜 from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
 left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID
 left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID 
-where HBillNo='" + HProcExchBillNo + "' and HProjectNum like'" + str1 + "%' and HPRDORGID="+ HOrgID, "Sc_ProcessExchangeBillMain");
+where HBillNo='" + HProcExchBillNo + "' and HProjectNum like'" + str1 + "%' and HPRDORGID=" + HOrgID, "Sc_ProcessExchangeBillMain");
 
                         if (dataSet.Tables[0].Rows.Count == 0)
                         {
@@ -767,7 +768,33 @@
                                 return get_HBardBillSave(HProcExchBillNo, HBarCode);
                             }
                         }
-                        else {
+                        else
+                        {
+                            ClsPub.CurUserName = user;
+                            //鏉$爜鐢熸垚
+                            return get_HBardBillSave(HProcExchBillNo, HBarCode);
+                        }
+                    }
+                    //鍒ゆ柇闀垮害鏄惁涓�50浣�  15杞﹂棿
+                    else if (HBarCode.Length == 50)
+                    {
+                        string str1 = HBarCode.Substring(42, 8);
+
+                        DataSet dataSet = oCN.RunProcReturn(@"select  m.HNumber 鐗╂枡浠g爜,o.HNumber 缁勭粐浠g爜 from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
+left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID
+left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID 
+where HBillNo='" + HProcExchBillNo + "' and HProjectNum like'" + str1 + "%' and HPRDORGID=" + HOrgID, "Sc_ProcessExchangeBillMain");
+
+                        if (dataSet.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
                             ClsPub.CurUserName = user;
                             //鏉$爜鐢熸垚
                             return get_HBardBillSave(HProcExchBillNo, HBarCode);
@@ -783,19 +810,41 @@
                     }
                 }
                 else {
-                   
-                    string str1 = HBarCode.Substring(18, 8);
+                    //鍒ゆ柇闀垮害鏄惁涓�29浣� 鏃犲皹杞﹂棿
+                    if (HBarCode.Length == 29)
+                    {
+                        string str1 = HBarCode.Substring(18, 8);
 
-                    DataSet dataSet = oCN.RunProcReturn(@"select  m.HNumber 鐗╂枡浠g爜,o.HNumber 缁勭粐浠g爜 from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
+                        DataSet dataSet = oCN.RunProcReturn(@"select  m.HNumber 鐗╂枡浠g爜,o.HNumber 缁勭粐浠g爜 from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
 left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID
 left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID 
 where HBillNo='" + HProcExchBillNo + "' and HProjectNum like'" + str1 + "%' and HPRDORGID=" + HOrgID, "Sc_ProcessExchangeBillMain");
 
-                    if (dataSet.Tables[0].Rows.Count == 0)
-                    {
-                        str1 = HBarCode.Substring(23, 3);
+                        if (dataSet.Tables[0].Rows.Count == 0)
+                        {
+                            str1 = HBarCode.Substring(23, 3);
 
-                        dataSet = oCN.RunProcReturn(@"select  m.HNumber 鐗╂枡浠g爜,o.HNumber 缁勭粐浠g爜 from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
+                            dataSet = oCN.RunProcReturn(@"select  m.HNumber 鐗╂枡浠g爜,o.HNumber 缁勭粐浠g爜 from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
+left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID
+left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID 
+where HBillNo='" + HProcExchBillNo + "' and HProjectNum like'" + str1 + "%' and HPRDORGID=" + HOrgID, "Sc_ProcessExchangeBillMain");
+
+                            if (dataSet.Tables[0].Rows.Count == 0)
+                            {
+                                objJsonResult.code = "0";
+                                objJsonResult.count = 0;
+                                objJsonResult.Message = "鏉$爜涓庢祦杞崱涓嶅瓨鍦ㄥ搴斿叧绯�!";
+                                objJsonResult.data = null;
+                                return objJsonResult;
+                            }
+                        }
+                    }
+                    //鍒ゆ柇闀垮害鏄惁涓�50浣�  15杞﹂棿
+                    else if (HBarCode.Length == 50)
+                    {
+                        string str1 = HBarCode.Substring(42, 8);
+
+                        DataSet dataSet = oCN.RunProcReturn(@"select  m.HNumber 鐗╂枡浠g爜,o.HNumber 缁勭粐浠g爜 from Sc_ProcessExchangeBillMain a WITH(NOLOCK)
 left join Gy_Material m WITH(NOLOCK) on a.HMaterID=m.HItemID
 left join Xt_ORGANIZATIONS o WITH(NOLOCK) on a.HPRDORGID=o.HItemID 
 where HBillNo='" + HProcExchBillNo + "' and HProjectNum like'" + str1 + "%' and HPRDORGID=" + HOrgID, "Sc_ProcessExchangeBillMain");
diff --git a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
index f0edc38..64fb9c4 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationEntrustInBillController.cs
@@ -226,6 +226,13 @@
                             }
                         }
                         break;
+                    case "P202"://娴佽浆鍗�
+                    case "P203"://娴佽浆鍗�
+                    case "P204"://娴佽浆鍗�
+                    case "P205"://娴佽浆鍗�
+                    case "P201"://娴佽浆鍗�
+                        ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillList  where 鍗曟嵁鍙�= '" + BillNo_PGD + "'", "h_v_Sc_ProcessExchangeBillList");
+                        break;
                 }
                 switch (BillNoType)
                 //寰楀埌淇℃伅
@@ -332,6 +339,51 @@
         }
         #endregion
 
+        #region 宸ュ簭鍑虹珯姹囨姤鍗昉DA鎵搷浣滃憳
+        [Route("Cj_StationBill/txtHBarCode_KeyDown_Operator")]
+        [HttpGet]
+        public object txtHBarCode_KeyDown_Operator(string HBarCode, string HInterID, string UserID, string HBillType)
+        {
+            try
+            {
+                if (HBarCode == null || HBarCode.Equals(""))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "绌虹櫧鐮�,鏉″舰鐮佷笉鑳戒负绌猴紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                ds = oCN.RunProcReturn("select * from h_v_Gy_EmployeeList_New  where 鑱屽憳浠g爜 = '" + HBarCode + "'", "h_v_Gy_EmployeeList_New");
+
+                //鍐欏叆淇℃伅
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏈煡璇㈠埌鏉$爜淇℃伅锛�";
+                    objJsonResult.data = null;
+                    
+                    return objJsonResult;
+                }
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
         #region 宸ュ簭杩涚珯鎵厤浠剁爜
         [Route("Cj_StationBill/txtHBarCode_Mater_KeyDown")]
         [HttpGet]
diff --git a/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
index 0e5dc14..6a5c68d 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
@@ -578,10 +578,10 @@
 Where a.HInterID={HProcExchInterID} and b.HEntryID={HProcExchEntryID}
 ) a
 inner join (
-select a.HICMOInterID,a.HICMOEntryID, b.HProcID 
+select a.HICMOInterID,a.HICMOEntryID,isnull(c.HItemID,0) HProcID 
 from Sc_PPBomBillMain a with(nolock) 
 inner join Sc_PPBomBillSub b with(nolock)  on a.HInterID=b.HInterID
-Where b.HKeyMaterID_Line<>0
+left join Gy_Process c on b.HProcName = c.HName
 )b on a.HICMOInterID=b.HICMOInterID and a.HICMOEntryID=b.HICMOEntryID and a.HProcID=b.HProcID", "Sc_ProcessExchangeBillMain");
 
                     if (ds.Tables[0].Rows.Count > 0) {
diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
index 578696e..997ba74 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -2,6 +2,7 @@
 using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
 using Pub_Class;
+using SyntacticSugar.constant;
 using System;
 using System.Collections;
 using System.Collections.Generic;
@@ -76,6 +77,7 @@
                 long HMainInterID = 0;
                 HMainInterID = list[0].HMainInterID;
                 string eventType = list[0].eventType;
+                string HDate = list[0].HDate;
                 string BillType = "3791";
                 string HBillSubType = "3791";
                 long HInterID = list[0].HInterID;//閫掑叆type寰楀埌鐨勫崟鎹甀D
@@ -225,7 +227,7 @@
                 if (oSystemParameter.ShowBill(ref Ret))
                 {
                     //鍒ゆ柇瀹㈡埛涓嶄负榫欏北姹介厤
-                    if (oSystemParameter.omodel.WMS_CampanyName != "榫欏北姹介厤" && oSystemParameter.omodel.WMS_CampanyName != "鐟炰笌绁�") //绯荤粺鍙傛暟                      
+                    if (oSystemParameter.omodel.WMS_CampanyName != "榫欏北姹介厤" && oSystemParameter.omodel.WMS_CampanyName != "鐟炰笌绁�" && oSystemParameter.omodel.WMS_CampanyName != "娣诲悍绉戞妧") //绯荤粺鍙傛暟                      
                     {
                         if (HSourceID == 0)
                         {
@@ -407,7 +409,7 @@
                     ",HmaterOutqty,HProcPriceRate,HTemporaryAreaID,HWasterQty_Work,HWasterQty_Mater,HBackWorkQty,HShiftsID" +
                     ",HToCheckQty,HLossQty,HBackWorkByMaterQty,HMouldID" +
                     ") " +
-                    " values('" + BillType + "','" + (OperationType == "5" ? "SUB" : HBillSubType)  + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate(),'" + HMouldNum + "'" +
+                    " values('" + BillType + "','" + (OperationType == "5" ? "SUB" : HBillSubType)  + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",'"+ HDate + "','" + HMaker + "',getdate(),'" + HMouldNum + "'" +
                     "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HSourceName + "'," + HPieceQty + "," + HWasterQty + "," + HPlanPieceQty + "," + HBadPNL +
                     "," + HICMOInterID + ",'" + HICMOBillNo + "'," + HProcPlanInterID + "," + HProcPlanEntryID + ",'" + HProcPlanBillNo + "'," + HProcExchInterID + "," + HProcExchEntryID +
                     ",'" + HProcExchBillNo + "'," + HMaterID + "," + HProcID + "," + HICMOQty + "," + HPlanQty + ",getdate()," + HSourceID + "," + HPayProcID +
@@ -602,6 +604,10 @@
                 string sReturn = "";
                 if (oSystemParameter.ShowBill(ref sReturn) == true)
                 {
+                    if (oSystemParameter.omodel.MES_StationOutBill_AutoCheck == "Y") //绯荤粺鍙傛暟  鑷姩瀹℃牳 
+                    {
+                        object objResult = set_CheckBill(HInterID.ToString(), user, HBillSubType);
+                    }
                     if (oSystemParameter.omodel.MES_StationOutBill_SaveAutoAddnew == "Y") //绯荤粺鍙傛暟  椤甸潰淇濆瓨鑷姩鍙樻垚鏂板鐘舵��
                     {
                         objJsonResult.Verify = "Y";
diff --git a/WebAPI/Controllers/CJGL/Gy_MaterPreventErrMouldBillController.cs b/WebAPI/Controllers/CJGL/Gy_MaterPreventErrMouldBillController.cs
index 87a755a..694171f 100644
--- a/WebAPI/Controllers/CJGL/Gy_MaterPreventErrMouldBillController.cs
+++ b/WebAPI/Controllers/CJGL/Gy_MaterPreventErrMouldBillController.cs
@@ -23,6 +23,63 @@
         public DAL.ClsGy_MaterPreventErrMouldBillMain BillOld = new DAL.ClsGy_MaterPreventErrMouldBillMain();
 
 
+        #region 浜у搧闃查敊楠岃瘉娓呭崟鍒楄〃 鏌ヨ 鍙樉绀轰富琛�      
+        [Route("Gy_MaterPreventErrMouldBill/get锘縂y_MaterPreventErrMouldBillMainList_Main")]
+        [HttpGet]
+        public object get锘縂y_MaterPreventErrMouldBillMainList_Main(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                //鏌ョ湅鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Gy_MaterPreventErrMouldBillMain_Check", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏌ヨ澶辫触锛佹棤鏉冮檺锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("select * from h_v_Gy_MaterPreventErrMouldBillMainList_Main order by 鍗曟嵁鍙� desc", "锘縣_v_Gy_MaterPreventErrMouldBillMainList_Main");
+                }
+                else
+                {
+                    string sql1 = "select * from  h_v_Gy_MaterPreventErrMouldBillMainList_Main  where 1 = 1 ";
+                    string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc";
+                    ds = oCN.RunProcReturn(sql, "锘縣_v_Gy_MaterPreventErrMouldBillMainList_Main");
+                }
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
         #region 浜у搧闃查敊楠岃瘉娓呭崟鍒楄〃 鏌ヨ       
         [Route("Gy_MaterPreventErrMouldBill/get锘縂y_MaterPreventErrMouldBillMainList")]
         [HttpGet]
diff --git a/WebAPI/Controllers/CJGL/Sc_KeyElementBindingController.cs b/WebAPI/Controllers/CJGL/Sc_KeyElementBindingController.cs
index 0c2d8d3..f32471c 100644
--- a/WebAPI/Controllers/CJGL/Sc_KeyElementBindingController.cs
+++ b/WebAPI/Controllers/CJGL/Sc_KeyElementBindingController.cs
@@ -190,6 +190,42 @@
         }
         #endregion
 
+        #region 鍏抽敭浠剁粦瀹氭煡璇㈠悓涓�杩芥函鍗曞彿涓嬬殑鍘嗗彶鎵爜璁板綍
+        [Route("Sc_KeyElementBinding/HistoryInfo_Temp")]
+        [HttpGet]
+        public object HistoryInfo_Temp(string sWhere, string user)
+        {
+            try
+            {
+
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "Sucess锛�";
+                    objJsonResult.data = new DataTable();
+                    return objJsonResult;
+                }
+
+                ds = oCN.RunProcReturn("select","select");
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
         #region 鍏抽敭浠剁粦瀹氫繚瀛� 鏂板/缂栬緫
         [Route("Sc_KeyElementBinding/Save")]
         [HttpPost]
diff --git a/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs b/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
index 28e33cc..e73414c 100644
--- a/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
+++ b/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
@@ -1,6 +1,7 @@
 锘縰sing Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
 using Pub_Class;
+using SyntacticSugar.constant;
 using System;
 using System.Collections;
 using System.Collections.Generic;
@@ -1911,6 +1912,59 @@
         }
         #endregion
 
+        #region 宸ュ簭娴佽浆鍗″垎椤靛垪琛�
+        [Route("Sc_ProcessExchangeBillList/page")]
+        [HttpGet]
+        public json page(string sWhere, string user, int page, int size)
+        {
+            json res = new json();
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //缂栬緫鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Sc_ProcessExchangeBill_SubQuery", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("exec h_p_Sc_ProcessExchangeBillList_Query " + page + "," + size + ",''", "h_p_Sc_ProcessExchangeBillList_Query");
+                }
+                else
+                {
+                    ds = oCN.RunProcReturn("exec h_p_Sc_ProcessExchangeBillList_Query " + page + "," + size + ",'" + sWhere + "'", "h_p_Sc_ProcessExchangeBillList_Query");
+                }
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                res.code = CodeConstant.SUCCEED;
+                res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+                res.Message = "Sucess锛�";
+                res.list = columnNameList;
+                res.data = ds.Tables[0];
+                return res;
+            }
+            catch (Exception e)
+            {
+                res.code = CodeConstant.FAIL;
+                res.count = CountConstant.FAIL;
+                res.Message = "Exception锛�" + e.ToString();
+                res.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
         #region 宸ュ簭娴佽浆鍗″垪琛�
         /// <summary>
         /// 鑾峰彇宸ュ簭娴佽浆鍗″垪琛ㄤ俊鎭�
@@ -2103,7 +2157,7 @@
                     HProQty = oItemSub.HProQty;
 
                     sql = "select * from h_v_Sc_ProcessExchangeBill_BatchSplit where hmainid = " + oItemSub.HICMOInterID + " and hentryid = " 
-                         + oItemSub.HICMOEntryID;
+                         + oItemSub.HICMOEntryID + " and HRoutingID = " + oItemSub.HRoutingInterID.ToString();
                     ds = oCN.RunProcReturn(sql, "h_v_Sc_ProcessExchangeBill_BatchSplit");
                     //涓昏〃璧嬪��
                     if (ds.Tables[0].Rows.Count > 0 && ds != null)
@@ -2242,7 +2296,7 @@
                         oItemSubs.HDeptID = Pub_Class.ClsPub.isLong(ds.Tables[0].Rows[i]["HDeptID"]);
                         oItemSubs.HDeptNumber = ds.Tables[0].Rows[i]["HDeptNumber"].ToString();
                         oItemSubs.HGroupID = 0;
-                        oItemSubs.HGroupNumber = "";
+                        oItemSubs.HGroupNumber = oItemSub.HGroupNumber;
                         oItemSubs.HWorkerID = 0;
                         oItemSubs.HWorkerNumber = "";
                         oItemSubs.HSourceID = 0;
diff --git a/WebAPI/Controllers/CJGL/Sc_WorkBeginDotCheckBillController.cs b/WebAPI/Controllers/CJGL/Sc_WorkBeginDotCheckBillController.cs
index eaa4236..223e3db 100644
--- a/WebAPI/Controllers/CJGL/Sc_WorkBeginDotCheckBillController.cs
+++ b/WebAPI/Controllers/CJGL/Sc_WorkBeginDotCheckBillController.cs
@@ -110,7 +110,7 @@
                     return objJsonResult;
                 }
 
-                ds = oCN.RunProcReturn("select * from h_v_Sc_WorkBeginDotCheckBillMainList where HInterID = " + HInterID, " h_v_Sc_WorkBeginDotCheckBillMainList");
+                ds = oCN.RunProcReturn("select * from h_v_Sc_WorkBeginDotCheckBillMainList_Edit where HInterID = " + HInterID, " h_v_Sc_WorkBeginDotCheckBillMainList_Edit");
 
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
@@ -909,7 +909,7 @@
                     return objJsonResult;
                 }
 
-                ds = oCN.RunProcReturn("select * from h_v_Gy_WorkBeginDotCheckListBillMainList where HInterID = " + HInterID, " h_v_Gy_WorkBeginDotCheckListBillMainList");
+                ds = oCN.RunProcReturn("select * from h_v_Gy_WorkBeginDotCheckListBillMainList_Edit where HInterID = " + HInterID, " h_v_Gy_WorkBeginDotCheckListBillMainList_Edit");
 
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
diff --git a/WebAPI/Controllers/CKGL/TMZD/Gy_BarCodeBillListController.cs b/WebAPI/Controllers/CKGL/TMZD/Gy_BarCodeBillListController.cs
new file mode 100644
index 0000000..6a713dd
--- /dev/null
+++ b/WebAPI/Controllers/CKGL/TMZD/Gy_BarCodeBillListController.cs
@@ -0,0 +1,77 @@
+锘縰sing Newtonsoft.Json;
+using SyntacticSugar.constant;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+
+namespace WebAPI.Controllers.CKGL.TMZD
+{
+    public class Gy_BarCodeBillListController : ApiController
+    {
+        //鑾峰彇绯荤粺鍙傛暟
+        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
+        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
+        public string sWhere = "";
+        private json objJsonResult = new json();
+        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        DataSet ds;
+
+        #region 鏉$爜涓绘。鍒嗛〉鍒楄〃
+        [Route("Gy_BarCodeBillList/page")]
+        [HttpGet]
+        public json page(string sWhere, string user, int page, int size)
+        {
+            json res = new json();
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //缂栬緫鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Gy_Material", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("exec h_p_IF_BarCodeBillList " + page + "," + size  + ",''", "h_p_IF_BarCodeBillList");
+                }
+                else
+                {
+                    ds = oCN.RunProcReturn("exec h_p_IF_BarCodeBillList " + page + "," + size  +  ",'" + sWhere + "'", "h_p_IF_BarCodeBillList");
+                }
+
+                //娣诲姞鍒楀悕
+                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鍒楀璞$殑鍒楀悕
+                }
+
+                res.code = CodeConstant.SUCCEED;
+                res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+                res.Message = "Sucess锛�";
+                res.list = columnNameList;
+                res.data = ds.Tables[0];
+                return res;
+            }
+            catch (Exception e)
+            {
+                res.code = CodeConstant.FAIL;
+                res.count = CountConstant.FAIL;
+                res.Message = "Exception锛�" + e.ToString();
+                res.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+    }
+}
\ No newline at end of file
diff --git a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
index c34401b..9d1b57f 100644
--- a/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
+++ b/WebAPI/Controllers/JHGL/Gy_RoutingBillController.cs
@@ -13,7 +13,7 @@
 using System.Windows.Forms;
 using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�;
 using WebAPI.Models;
-
+using SyntacticSugar.constant;
 namespace WebAPI.Controllers
 {
     //宸ヨ壓璺嚎Controller
@@ -198,7 +198,8 @@
                 int IsProNo = mainList[0].IsProNo;//鏄惁杞伐搴�                     
                 HName_LongShan = mainList[0].HName;//宸ヨ壓璺嚎鍚嶇О
                 string HProcPriceType = mainList[0].HProcPriceType;//瀹氶绫诲瀷锛堜复鏃跺畾棰濓紝姘镐箙瀹氶锛�
-
+                DateTime HBeginDate = mainList[0].HBeginDate;//寮�濮嬫棩鏈�
+                DateTime HEndDate = mainList[0].HEndDate;//澶辨晥鏃ユ湡
 
                 if (oSystemParameter.omodel.WMS_CampanyName == "鍑礉濂堢壒")
                 {
@@ -267,13 +268,13 @@
                     ",HRoutingGroupID,HUnitID,HMaterNumber,HUnitNumber,HStandard" +
                     ",HMainGroupID,HMainProcID,HMainCenterID,HMainTimeUnit,HMainUnitTime,HMainWorkQty" +
                     ",HMainPrice,HStdSourceQty,HAddSourceRate,HPRDORGID,HDelSourceRate" +
-                    ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HOrgID,HProcPriceType) " + 
+                    ",HPicNumVer,HPicNumAssemble,HMaterTexture,HProductNum,HVerNum,HOrgID,HProcPriceType,HBeginDate,HEndDate) " + 
                     " values('" + BillType + "','"+ HBillSubType + "'," + HInterID + ",'" + HBillNo + "','" + HDate + "'" +
                     "," + HYear + "," + HPeriod + ",'" + HRemark + "','" + HMaker + "',getdate()," + HMaterID + ",'" + HName + "'," + HMaterTypeID +
                     "," + HRoutingGroupID + "," + HUnitID + ",'" + HMaterNumber + "','" + HUnitNumber + "'," + Convert.ToString(HStandard ? 1 : 0) +
                     "," + HMainGroupID + "," + HMainProcID + "," + HMainCenterID + ",'" + HMainTimeUnit + "'," + HMainUnitTime + "," + HMainWorkQty +
                     "," + HMainPrice + "," + HStdSourceQty + "," + HAddSourceRate + "," + HPRDORGID + "," + HDelSourceRate +
-                    ",'" + HPicNumVer + "','" + HPicNumAssemble + "','" + HMaterTexture + "','" + HProductNum + "','" + HVerNum + "'," + HOrgID + ",'"+ HProcPriceType + "') ");
+                    ",'" + HPicNumVer + "','" + HPicNumAssemble + "','" + HMaterTexture + "','" + HProductNum + "','" + HVerNum + "'," + HOrgID + ",'"+ HProcPriceType + "','" + HBeginDate + "','" + HEndDate + "') ");
 
                     LogService.Write("鐢ㄦ埛:" + user + ",鏃ユ湡:" + DateTime.Now + ",鏂板宸ヨ壓璺嚎鍗曟嵁:" + HBillNo);
                     oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "鏂板宸ヨ壓璺嚎鍗曟嵁锛�" + HBillNo + "','LMES-宸ヨ壓璺嚎妯″潡','" + DBUtility.ClsPub.IPAddress + "','鏂板鍗曟嵁'", ref DBUtility.ClsPub.sExeReturnInfo);
@@ -289,7 +290,7 @@
                        "',HMainTimeUnit='" + HMainTimeUnit + "',HMainUnitTime='" + HMainUnitTime + "',HMainWorkQty='" + HMainWorkQty + "',HMainPrice='" + HMainPrice +
                        "',HStdSourceQty='" + HStdSourceQty + "',HAddSourceRate='" + HAddSourceRate + "',HDelSourceRate='" + HDelSourceRate +
                         "',HPicNumVer='" + HPicNumVer + "',HPicNumAssemble='" + HPicNumAssemble + "',HMaterTexture='" + HMaterTexture + "'" +
-                        ",HProductNum='" + HProductNum + "',HVerNum='" + HVerNum + "',HProcPriceType = '" + HProcPriceType + "' where HInterID='" + HInterID + "'");
+                        ",HProductNum='" + HProductNum + "',HVerNum='" + HVerNum + "',HProcPriceType = '" + HProcPriceType + "',HBeginDate = '" + HBeginDate + "',HEndDate = '" + HEndDate + "' where HInterID='" + HInterID + "'");
 
                     //鍒犻櫎瀛愯〃
                     oCN.RunProc("delete from Gy_RoutingBillSub where HInterID='" + HInterID + "'");
@@ -404,7 +405,7 @@
             foreach (Gy_RoutingBillSub oSub in DetailColl)
             {
                 i++;
-                if (oSystemParameter.omodel.WMS_CampanyName != "榫欏北姹介厤")
+                if (oSystemParameter.omodel.WMS_CampanyName != "榫欏北姹介厤" && oSystemParameter.omodel.WMS_CampanyName != "娣诲悍绉戞妧")
                 {
                     if (oSub.HWorkQty <= 0)
                     {
@@ -449,7 +450,7 @@
                     //璁′环鏂瑰紡涓嶄负璁℃椂锛屽垯鎶婅鏃舵殏浼板瓧娈垫洿鏂颁负绌�
                     if (oSub.HIsTime == false)
                     {
-                        oCN.RunProc("update Gy_RoutingBillSub set HEstimate = null where HInterID = " + HInterID + " and HEntryID = " + i);                  
+                        oCN.RunProc("update Gy_RoutingBillSub set HEstimate = 0 where HInterID = " + HInterID + " and HEntryID = " + i);                  
                     }
 
                     if (OperationType == 3 || ds.Tables[0].Rows.Count != 0)
@@ -493,7 +494,7 @@
                     //璁′环鏂瑰紡涓嶄负璁℃椂锛屽垯鎶婅鏃舵殏浼板瓧娈垫洿鏂颁负绌�
                     if (oSub.HIsTime == false)
                     {
-                        oCN.RunProc("update Gy_RoutingBillSub set HEstimate = null where HInterID = " + HInterID + " and HEntryID = " + i);
+                        oCN.RunProc("update Gy_RoutingBillSub set HEstimate = 0 where HInterID = " + HInterID + " and HEntryID = " + i);
                     }
 
                     if (OperationType == 3 || ds.Tables[0].Rows.Count != 0)
@@ -502,7 +503,28 @@
 
                         oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user_LongShan + "','" + HComputerName + "','" + "Gy_RoutingBill_Edit,宸ヨ壓璺嚎_缂栬緫" + "','LMES绯荤粺-宸ヨ壓璺嚎缂栬緫妯″潡','" + DBUtility.ClsPub.IPAddress + "','" + "淇敼浜嗗伐鑹鸿矾绾匡細" + HName_LongShan + " 宸ュ簭鍙凤細" + oSub.HProcNo + " 宸ヤ环涓猴細" + oSub.HProcPrice.ToString() + "'", ref DBUtility.ClsPub.sExeReturnInfo);
                     }
-                }                
+                }
+
+                //淇濆瓨鍚庢帶鍒�=========================================           娣诲姞瀹℃壒娴�
+                ds = oCN.RunProcReturn("exec h_p_Gy_RoutingBill_AfterSaveCtrl " + HInterID, "h_p_Gy_RoutingBill_AfterSaveCtrl");
+
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "淇濆瓨鍚庡垽鏂け璐ワ紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                //=========================================================
             }
 
             objJsonResult.code = "1";
@@ -1485,5 +1507,623 @@
         }
         #endregion
 
+        #region 宸ヨ壓璺嚎闇�瑕佹垜瀹℃壒娴佸鎵圭殑
+        [Route("Gy_Routing/NeedChecklist")]
+        [HttpGet]
+        public object NeedChecklist(string user, string userid)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+
+                if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Query", 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犳潈闄愭煡鐪�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                //鎼滅储闇�瑕佸鏍哥殑
+                string sql = "  select a.*,c.HItemID as HCheckFlowStatusID,m.HName as 瀹℃壒娴�,c.HCheckFlowID,i.HName as 瀹℃壒椤圭洰鍚嶇О,c.HCheckItemID,c.HChecker as 椤圭洰瀹℃牳浜�,c.HCheckNote as 瀹℃壒娴佸鏍稿缓璁�,c.HCheckDate 瀹℃壒娴佸鏍告棩鏈�   from h_v_Gy_RoutingBillList AS a LEFT JOIN Xt_BillCheckFlowStatus AS c ON a.hmainid = c.HBillInterID and a.鍗曟嵁绫诲瀷 = c.HBillTypeID" +
+                    " LEFT JOIN Xt_CheckFlowMain as m ON m.HInterID = c.HCheckFlowID" +
+                    " LEFT JOIN Gy_RoutingBillMain as po ON a.hmainid = po.HInterID" +
+                    " LEFT JOIN Xt_CheckItem as i ON i.HItemID = c.HCheckItemID" +
+                    " LEFT JOIN Xt_CheckUserRight as cr ON cr.HCheckItemID = i.HItemID and cr.HCheckFlowInterID = m.HInterID" +
+                    " where po.HBillStatus = 6 and po.HCheckItemNowID = i.HItemID  and cr.HUserID = '" + userid + "'";
+                ds = oCN.RunProcReturn(sql, "h_v_Gy_RoutingBillList");
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #region 宸ヨ壓璺嚎宸茬粡瀹℃壒娴佸鎵圭殑
+        [Route("Gy_Routing/Checkedlist")]
+        [HttpGet]
+        public object Checkedlist(string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+
+                if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Query", 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犳潈闄愭煡鐪�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                //鎼滅储闇�瑕佸鏍哥殑
+                string sql = "  select DISTINCT a.*,c.HItemID as HCheckFlowStatusID,m.HName as 瀹℃壒娴�,c.HCheckFlowID,i.HName as 瀹℃壒椤圭洰鍚嶇О,c.HCheckItemID,c.HChecker as 椤圭洰瀹℃牳浜�,c.HCheckNote as 瀹℃壒娴佸鏍稿缓璁�,c.HCheckDate 瀹℃壒娴佸鏍告棩鏈�   from h_v_Gy_RoutingBillList AS a LEFT JOIN Xt_BillCheckFlowStatus AS c ON a.hmainid = c.HBillInterID and a.鍗曟嵁绫诲瀷 = c.HBillTypeID" +
+                    " LEFT JOIN Xt_CheckFlowMain as m ON m.HInterID = c.HCheckFlowID" +
+                    " LEFT JOIN Xt_CheckItem as i ON i.HItemID = c.HCheckItemID" +
+                    " where c.HCheckDate is  not NUll and c.HChecker = '" + user + "'";
+                ds = oCN.RunProcReturn(sql, "h_v_Gy_RoutingBillList");
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #region 宸ヨ壓璺嚎椹冲洖
+        [Route("Gy_Routing/RejectCheckFlow")]
+        [HttpGet]
+        public object RejectCheckFlow(string HInterID, string CurUserID)
+        {
+            try
+            {
+                Int64 lngBillKey = 0;
+                lngBillKey = DBUtility.ClsPub.isLong(HInterID);      //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹�
+                DAL.ClsGy_RoutingBill oBill = new DAL.ClsGy_RoutingBill();                              //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣�
+                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁
+                {
+                    if (oBill.omodel.HBillStatus != 6)
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "鍗曟嵁鏈湪瀹℃牳涓笉鑳介┏鍥�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    //鍙戣捣椹冲洖
+                    if (oBill.RejectCheckFlowProgress(lngBillKey, oBill.omodel.HBillNo, CurUserID, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+                    {
+                        objJsonResult.code = CodeConstant.SUCCEED;
+                        objJsonResult.count = CountConstant.SUCCEED;
+                        objJsonResult.Message = "椹冲洖鎴愬姛";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "椹冲洖澶辫触澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+                else
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+            }
+            catch (Exception e)
+            {
+                oCN.RollBack();
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 宸ヨ壓璺嚎 鍙戣捣瀹℃壒
+        [Route("Gy_Routing/StartCheckFlow")]
+        [HttpGet]
+        public object StartCheckFlow(int HInterID, string CurUserName)
+        {
+            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 = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "HInterID灏忎簬0锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                Int64 lngBillKey = 0;
+                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹�
+                DAL.ClsGy_RoutingBill oBill = new DAL.ClsGy_RoutingBill();                              //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣�
+
+                //鍙戣捣瀹℃壒
+                if (oBill.startCheckFlow(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+                {
+                    objJsonResult.code = CodeConstant.SUCCEED;
+                    objJsonResult.count = CountConstant.SUCCEED;
+                    objJsonResult.Message = "鍙戣捣瀹℃壒鎴愬姛";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鍙戣捣瀹℃壒澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                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("Gy_Routing/AuditFlow")]
+        [HttpGet]
+        public object AuditGy_Routing_Flow(int HInterID, int IsAudit, string CurUserName, string CurUserID)
+        {
+            //string ModRightNameCheck = "Gy_Routing_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 = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "HInterID灏忎簬0锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                Int64 lngBillKey = 0;
+                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹�
+                DAL.ClsGy_RoutingBill oBill = new DAL.ClsGy_RoutingBill();                              //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣�
+
+                //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔
+                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁
+                {
+                    if (oBill.omodel.HCloseMan.Trim() != "")
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    if (oBill.omodel.HDeleteMan.Trim() != "")
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+
+                    if (IsAudit == TypeConstant.AUDIT)  //瀹℃牳鍒ゆ柇
+                    {
+                        //鍒ゆ柇鏄惁宸茬粡鍙戣捣瀹℃壒
+                        string sql0 = "select * from Xt_BillCheckFlowStatus where HBillInterID = " + lngBillKey + " and HBillTypeID = '" + oBill.BillType + "'";
+                        DataSet ds0 = oCN.RunProcReturn(sql0, "Xt_BillCheckFlowStatus");
+                        if (ds0 != null && ds0.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:鍗曟嵁鏈彂璧峰鎵癸紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+
+                        //鍒ゆ柇鍗曟嵁褰撳墠鐘舵��
+                        if (oBill.omodel.HChecker.Trim() != "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:鍗曟嵁宸插畬鎴愬鏍�!涓嶈兘缁х画瀹℃牳锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    if (IsAudit == TypeConstant.REVERSE_AUDIT) //鍙嶅鏍稿垽鏂�
+                    {
+                        //鍒ゆ柇鏄惁瀛樺湪瀹℃牳杩囩殑椤圭洰
+                        string sql0 = "select * from Xt_BillCheckFlowStatus where HBillInterID = " + lngBillKey + " and HBillTypeID = '" + oBill.BillType + "' and ISNULL(HChecker,'') <> ''";
+                        DataSet ds0 = oCN.RunProcReturn(sql0, "Xt_BillCheckFlowStatus");
+                        if (ds0 != null && ds0.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:鍗曟嵁涓嶅瓨鍦ㄥ凡缁忓鏍哥殑椤圭洰锛侊紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                }
+                else
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                oCN.BeginTran();
+                //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣�
+                if (IsAudit == TypeConstant.AUDIT) //瀹℃牳鎻愪氦
+                {
+                    #region 瀹℃牳鍓嶇殑鐩稿叧鍒ゆ柇
+                    //瀹℃牳鍓嶆帶鍒�=========================================      
+                    //string sql1 = "exec h_p_Gy_Routing_BeforeCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'";
+                    //ds = oCN.RunProcReturn(sql1, "h_p_Gy_Routing_BeforeCheckCtrl");
+                    //if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+                    //{
+                    //    objJsonResult.code = "0";
+                    //    objJsonResult.count = 0;
+                    //    objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:瀹℃牳鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+                    //    objJsonResult.data = null;
+                    //    return objJsonResult;
+                    //}
+
+                    //if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+                    //{
+                    //    objJsonResult.code = "0";
+                    //    objJsonResult.count = 0;
+                    //    objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+                    //    objJsonResult.data = null;
+                    //    return objJsonResult;
+                    //}
+                    //==================================================================================      
+
+                    //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗
+                    string s = "";
+                    int sYear = 0;
+                    int sPeriod = 0;
+                    DateTime HDate = DateTime.Now;
+                    if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
+                    {
+                        objJsonResult.Message = s;
+                        return objJsonResult;
+                    }
+                    #endregion
+
+                    //鑾峰彇褰撳墠瀹℃牳椤圭洰
+                    string sql0 = "select * from " + oBill.MvarItemKey + " where HInterID = " + lngBillKey;
+                    DataSet ds0 = oCN.RunProcReturn(sql0, oBill.MvarItemKey);
+                    string HCheckFlowID = ds0.Tables[0].Rows[0]["HCheckFlowID"].ToString();             //瀹℃壒娴佸唴鐮�
+                    string HCheckItemNowID = ds0.Tables[0].Rows[0]["HCheckItemNowID"].ToString();       //褰撳墠瀹℃壒椤圭洰鍐呯爜
+                    string HCheckItemNextID = ds0.Tables[0].Rows[0]["HCheckItemNextID"].ToString();     //寰呭鎵归」鐩唴鐮�
+
+                    //鍒ゆ柇鐢ㄦ埛鏄惁鏈夋潈闄� 瀹℃壒 褰撳墠瀹℃壒娴佺殑瀹℃壒椤圭洰
+                    //string sql01 = "select * from Xt_CheckUserRight where HUserID = '" + CurUserID + "' and HCheckFlowInterID = " + HCheckFlowID + " and HCheckItemID = " + HCheckItemNowID + " and HValue = 1";
+                    string sql01 = "select * from Xt_CheckUserRight where HUserID = '" + CurUserID + "' and HCheckFlowInterID = " + HCheckFlowID + " and HCheckItemID = " + HCheckItemNowID + "";
+                    DataSet ds01 = oCN.RunProcReturn(sql01, "Xt_CheckUserRight");
+                    if (ds01.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:鐢ㄦ埛鏃犲綋鍓嶅鏍搁」鐩殑瀹℃牳鏉冮檺锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+
+                    //鏇存柊 鍗曟嵁瀹℃壒鐘舵�佽〃 涓搴斿鏍搁」鐩殑瀹℃牳鐘舵��
+                    string sql02 = "update Xt_BillCheckFlowStatus set HChecker='" + CurUserName + "',HCheckDate=getdate() where HBillTypeID = '" + oBill.BillType + "' and HBillInterID=" + lngBillKey + " and HCheckFlowID=" + HCheckFlowID + " and HCheckItemID=" + HCheckItemNowID;
+                    oCN.RunProc(sql02);
+
+                    //鍒ゆ柇褰撳墠瀹℃牳椤圭洰鏄惁鏄渶鍚庝竴涓」鐩紝濡傛灉鏄紝瀹℃牳鍚庡弽鍐欏崟鎹殑鍗曟嵁鐘舵�併�傚鏋滀笉鏄紝鑾峰彇涓嬩竴涓鏍搁」鐩苟鏇存柊鍒伴攢鍞鍗曚富琛�
+                    if (HCheckItemNextID != "0")                //鍒氬垰瀹℃牳鐨勫鏍搁」鐩笉鏄渶鍚庝竴涓鏍搁」鐩�
+                    {
+                        string sql03 = "select b.HInterID,b.HCheckItemID from Xt_CheckFlowMain as a " +
+                                "inner join Xt_CheckFlowSub as b on a.HInterID = b.HInterID " +
+                                "where a.HBillTypeID = '" + oBill.BillType + "' " +
+                                "and a.HInterID = " + HCheckFlowID + " " +
+                                "order by b.HFlowNo asc";
+                        DataSet ds03 = oCN.RunProcReturn(sql03, "Xt_CheckFlowMain");
+
+                        //鑾峰彇鏂扮殑褰撳墠瀹℃牳椤圭洰鍜屽緟瀹℃牳椤圭洰
+                        for (int i = 0; i < ds03.Tables[0].Rows.Count; i++)
+                        {
+                            if (ds03.Tables[0].Rows[i]["HCheckItemID"].ToString() == HCheckItemNextID)
+                            {
+                                HCheckItemNowID = HCheckItemNextID;
+                            }
+                            else if (HCheckItemNowID == HCheckItemNextID)
+                            {
+                                HCheckItemNextID = ds03.Tables[0].Rows[i]["HCheckItemID"].ToString();
+                                break;
+                            }
+                        }
+                        //鏂扮殑褰撳墠瀹℃牳椤圭洰涓烘渶鍚庝竴涓鏍搁」鐩紝寰呭鏍搁」鐩笉瀛樺湪锛岃涓洪粯璁ゅ��"0"
+                        if (HCheckItemNowID == HCheckItemNextID)
+                        {
+                            HCheckItemNextID = "0";
+                        }
+
+                        //鏇存柊鍗曟嵁涓昏〃鐨勫鎵规祦鏁版嵁
+                        string sql04 = "update " + oBill.MvarItemKey + " set HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + " where HInterID = " + lngBillKey;
+                        oCN.RunProc(sql04);
+
+
+                        objJsonResult.code = CodeConstant.SUCCEED;
+                        objJsonResult.count = CountConstant.SUCCEED;
+                        objJsonResult.Message = "瀹℃牳鎴愬姛";
+                        objJsonResult.data = null;
+                    }
+                    else                                                                //鍒氬垰瀹℃牳鐨勫鏍搁」鐩槸鏈�鍚庝竴涓鏍搁」鐩�
+                    {
+                        //鏇存柊鍗曟嵁涓昏〃鐨勫鎵规祦鏁版嵁
+                        HCheckItemNowID = "0";
+                        HCheckItemNextID = "0";
+
+                        string sql04 = "update " + oBill.MvarItemKey + " set HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + " where HInterID = " + lngBillKey;
+                        oCN.RunProc(sql04);
+
+                        //鏇存柊鍗曟嵁鐨勫崟鎹姸鎬�
+                        if (oBill.CheckBill(oCN, oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Gy_RoutingBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+                        {
+                            objJsonResult.code = CodeConstant.SUCCEED;
+                            objJsonResult.count = CountConstant.SUCCEED;
+                            objJsonResult.Message = "瀹℃牳鎴愬姛";
+                            objJsonResult.data = null;
+                        }
+                        else
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                            objJsonResult.data = null;
+
+                            oCN.RollBack();
+                            return objJsonResult;
+                        }
+                    }
+                }
+                if (IsAudit == TypeConstant.REVERSE_AUDIT) //鍙嶅鏍告彁浜�
+                {
+                    #region 鍙嶅鏍稿墠鐨勭浉鍏冲垽鏂�
+                    //鍙嶅鏍稿墠鎺у埗=========================================
+                    DataSet ds = oCN.RunProcReturn("Exec h_p_Gy_Routing_BeforeUnCheckCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + CurUserName + "'", "h_p_Gy_Routing_BeforeUnCheckCtrl");
+                    if (ds == null)
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + "鍙嶅鏍稿墠鍒ゆ柇澶辫触锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    //=========================================================
+
+                    //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗
+                    string s = "";
+                    int sYear = 0;
+                    int sPeriod = 0;
+                    DateTime HDate = DateTime.Now;
+                    if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
+                    {
+                        objJsonResult.Message = s;
+                        return objJsonResult;
+                    }
+                    #endregion
+
+                    //鑾峰彇闇�瑕佸弽瀹℃牳鐨勫鏍搁」鐩�
+                    string sql0 = "select c.* from Xt_CheckFlowMain as a " +
+                                  "inner join Xt_CheckFlowSub as b on a.HInterID = b.HInterID " +
+                                  "inner join Xt_BillCheckFlowStatus as c on a.HBillTypeID = c.HBillTypeID and b.HCheckItemID = c.HCheckItemID " +
+                                  "where c.HBillTypeID = '" + oBill.BillType + "' and c.HBillInterID = " + lngBillKey + " " +
+                                  "order by b.HFlowNo asc";
+                    DataSet ds0 = oCN.RunProcReturn(sql0, "Xt_BillCheckFlowStatus");
+                    if (ds0 == null || ds0.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:鏈彂璧峰鎵癸紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    string HCheckFlowID = ds0.Tables[0].Rows[0]["HCheckFlowID"].ToString();             //瀹℃壒娴佸唴鐮�
+                    string HCheckItemNowID = "0";       //褰撳墠瀹℃壒椤圭洰鍐呯爜
+                    string HCheckItemNextID = "0";     //寰呭鎵归」鐩唴鐮�
+                    if (oBill.omodel.HBillStatus == 6)
+                    {
+                        for (int i = 0; i < ds0.Tables[0].Rows.Count; i++)
+                        {
+                            if (ds0.Tables[0].Rows[i]["HChecker"].ToString() != "")
+                            {
+                                HCheckItemNowID = ds0.Tables[0].Rows[i]["HCheckItemID"].ToString();
+                                HCheckItemNextID = ds0.Tables[0].Rows[i]["HCheckItemID"].ToString();
+                            }
+                            else
+                            {
+                                HCheckItemNextID = ds0.Tables[0].Rows[i]["HCheckItemID"].ToString();
+                                break;
+                            }
+                        }
+                        if (HCheckItemNowID == HCheckItemNextID)
+                        {
+                            HCheckItemNextID = "0";
+                        }
+                    }
+                    else
+                    {
+                        HCheckItemNowID = ds0.Tables[0].Rows[ds0.Tables[0].Rows.Count - 1]["HCheckItemID"].ToString();
+                        HCheckItemNextID = "0";
+                    }
+
+                    //鍒ゆ柇鐢ㄦ埛鏄惁鏈夋潈闄� 瀹℃壒 褰撳墠瀹℃壒娴佺殑瀹℃壒椤圭洰
+                    //string sql01 = "select * from Xt_CheckUserRight where HUserID = '" + CurUserID + "' and HCheckFlowInterID = " + HCheckFlowID + " and HCheckItemID = " + HCheckItemNowID + " and HValue = 1";
+                    string sql01 = "select * from Xt_CheckUserRight where HUserID = '" + CurUserID + "' and HCheckFlowInterID = " + HCheckFlowID + " and HCheckItemID = " + HCheckItemNowID + "";
+                    DataSet ds01 = oCN.RunProcReturn(sql01, "Xt_CheckUserRight");
+                    if (ds01.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:鐢ㄦ埛鏃犲綋鍓嶅鏍搁」鐩殑瀹℃牳鏉冮檺锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+
+
+                    //鏇存柊 鍗曟嵁瀹℃壒鐘舵�佽〃 涓搴斿鏍搁」鐩殑瀹℃牳鐘舵��
+                    string sql02 = "update Xt_BillCheckFlowStatus set HChecker='',HCheckDate='' where HBillTypeID = '" + oBill.BillType + "' and HBillInterID=" + lngBillKey + " and HCheckFlowID=" + HCheckFlowID + " and HCheckItemID=" + HCheckItemNowID;
+                    oCN.RunProc(sql02);
+
+                    //鍒ゆ柇鍙嶅鏍哥殑鍗曟嵁鏄惁宸茬粡瀹℃牳瀹屾垚锛岃嫢瀹℃牳瀹屾垚锛屽弽瀹℃牳闇�瑕佸彉鏇村崟鎹姸鎬併��
+                    if (oBill.omodel.HBillStatus == 6)
+                    {
+                        //鏇存柊鍗曟嵁涓昏〃鐨勫鎵规祦鏁版嵁
+                        string sql04 = "update " + oBill.MvarItemKey + " set HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + " where HInterID = " + lngBillKey;
+                        oCN.RunProc(sql04);
+
+
+                        objJsonResult.code = CodeConstant.SUCCEED;
+                        objJsonResult.count = CountConstant.SUCCEED;
+                        objJsonResult.Message = "瀹℃牳鎴愬姛";
+                        objJsonResult.data = null;
+                    }
+                    else
+                    {
+
+                        //鍙嶅鏍告彁浜bandonCheck
+                        if (oBill.AbandonCheck(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+                        {
+                            //鏇存柊鍗曟嵁涓昏〃鐨勫鎵规祦鏁版嵁
+                            string sql04 = "update " + oBill.MvarItemKey + " set HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + ",HBillStatus=6 " + " where HInterID = " + lngBillKey;
+                            oCN.RunProc(sql04);
+                            objJsonResult.code = CodeConstant.SUCCEED;
+                            objJsonResult.count = CountConstant.SUCCEED;
+                            objJsonResult.Message = "鍙嶅鏍告垚鍔�";
+                            objJsonResult.data = null;
+                        }
+                        else
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                            objJsonResult.data = null;
+
+                            oCN.RollBack();
+                            return objJsonResult;
+                        }
+                    }
+                }
+
+                oCN.Commit();
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+
+                oCN.RollBack();
+                return objJsonResult;
+            }
+        }
+        #endregion
+
     }
 }
\ No newline at end of file
diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index d878121..d4c4c9b 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -1,6 +1,7 @@
 锘縰sing Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
 using Pub_Class;
+using SyntacticSugar.constant;
 using System;
 using System.Collections;
 using System.Collections.Generic;
@@ -1206,6 +1207,60 @@
 
         #region 宸ヨ壓璺嚎
 
+        #region 宸ヨ壓璺嚎鍒嗛〉鍒楄〃
+        [Route("Gy_RoutingBill/page")]
+        [HttpGet]
+        public json Gy_RoutingBillPage(string sWhere, string user, int page, int size)
+        {
+            DataSet ds;
+            json res = new json();
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //缂栬緫鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Gy_RoutingBill_Query", 1, false, user))
+                {
+                    res.code = "0";
+                    res.count = 0;
+                    res.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    res.data = null;
+                    return res;
+                }
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("exec h_p_Gy_RoutingBillList " + page + "," + size + ",''", "h_p_Gy_RoutingBillList");
+                }
+                else
+                {
+                    ds = oCN.RunProcReturn("exec h_p_Gy_RoutingBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_Gy_RoutingBillList");
+                }
+
+                //娣诲姞鍒楀悕
+                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鍒楀璞$殑鍒楀悕
+                }
+
+                res.code = CodeConstant.SUCCEED;
+                res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+                res.Message = "Sucess锛�";
+                res.list = columnNameList;
+                res.data = ds.Tables[0];
+                return res;
+            }
+            catch (Exception e)
+            {
+                res.code = CodeConstant.FAIL;
+                res.count = CountConstant.FAIL;
+                res.Message = "Exception锛�" + e.ToString();
+                res.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
         #region 宸ヨ壓璺嚎鍒楄〃
         /// <summary>
         /// 杩斿洖宸ヨ壓璺嚎鍒楄〃
diff --git a/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs
index be44a06..43dbbd8 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs
@@ -343,7 +343,6 @@
             string msg4 = sArray[2].ToString();
             string msg5 = sArray[3].ToString();
 
-            string UserName = "";
             ListModels oListModels = new ListModels();
             try
             {
@@ -365,7 +364,7 @@
                 lsmain = oListModels.getObjectByJson_Sc_MouldMaintainRuleBillMain(msg2);
                 foreach (Model.ClsSc_MouldMaintainRuleBillMain oItem in lsmain)
                 {
-                    UserName = oItem.HMaker;  //鍒跺崟浜�
+                    DBUtility.ClsPub.CurUserName = oItem.HMaker;  //鍒跺崟浜�
                     oItem.HBillType = "3833";
                     oItem.HBillSubType = "3833";
 
diff --git a/WebAPI/Controllers/MJGL/Sc_MouldReportController.cs b/WebAPI/Controllers/MJGL/Sc_MouldReportController.cs
index c83b66b..3485d30 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldReportController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldReportController.cs
@@ -233,5 +233,54 @@
         }
         #endregion
 
+        #region  妯″叿淇濆吇閫炬湡棰勮鎶ヨ〃
+        [Route("Sc_MouldRepairCheckTaskReport/Sc_MoldMainoverdueWarnReport")]
+        [HttpGet]
+        public object Sc_MoldMainoverdueWarnReport(string HMouldTypeID, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                ds = oCN.RunProcReturn("exec h_p_Sc_MoldMainoverdueWarnReport " + HMouldTypeID, "h_p_Sc_MoldMainoverdueWarnReport");
+
+                if (ds.Tables[0].Rows.Count != 0 || ds != null)
+                {
+                    //娣诲姞鍒楀悕
+                    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;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳暟鎹�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
     }
 }
diff --git a/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs
index 1b4648c..97be4fa 100644
--- a/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs
+++ b/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs
@@ -1649,7 +1649,7 @@
                     return objJsonResult;
                 }
 
-                ds = oCN.RunProcReturn("exec h_p_Sc_AllowLoadData '" + HBarCode + "','"+ HSourceID + "'", "h_p_Sc_AllowLoadData");
+                ds = oCN.RunProcReturn("exec h_p_Sc_AllowLoadData '" + HBarCode + "','"+ HSourceID + "','"+ HBillType + "'", "h_p_Sc_AllowLoadData");
 
                 if (ds == null || ds .Tables.Count== 0 || ds.Tables[0].Rows.Count == 0)
                 {
@@ -1660,6 +1660,15 @@
                     return objJsonResult;
                 }
 
+                if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "淇濆瓨澶辫触锛�" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBackRemark"]);
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
                 objJsonResult.Message = "Sucess锛�";
diff --git a/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs b/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs
index dbb259b..9fe6dab 100644
--- a/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs
+++ b/WebAPI/Controllers/SBGL/Gy_EquipFileMainController.cs
@@ -9,7 +9,10 @@
 using System.Net.Http;
 using System.Web.Http;
 using WebAPI.Models;
-
+using System.Web;
+using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�;
+using System.IO;
+using SyntacticSugar.constant;
 namespace WebAPI.Controllers.SBGL
 {
     public class Gy_EquipFileMainController : ApiController
@@ -320,6 +323,27 @@
                 }
                 //鑻AINDI閲嶅鍒欓噸鏂拌幏鍙�
                 oCN.BeginTran();
+                //淇濆瓨鍓嶆帶鍒�=========================================
+                string HBillNote = "";
+                ds = oCN.RunProcReturn("Exec h_p_Gy_EquipFileBillMain_BeforeSaveCtrl " + HInterID.ToString() + ", '" + hbillno + "','" + HBillNote + "',1 ", "h_p_Gy_EquipFileBillMain_BeforeSaveCtrl");
+                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]["HBackRemark"].ToString(); ;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                //=========================================================
                 //涓昏〃
                 oCN.RunProc("Insert into Gy_EquipFileBillMain " +
                    " (HInterID,hbillno,HEquipFileNumber,HEquipFileNo,HName,HModel,HModel2,HMaterID,HUnitID,HOutComDate" +
@@ -331,6 +355,29 @@
                    "','" + HBarCode + "','" + HWorkArea + "','" + HLogo + "'," + HSellSupID + "," + HMakeSupID + ",'3308','" + HDate + "','" + HYear + "','" + HMaker + "','" + HMakeDate + "','" + HEquipMaintainRuleInterID + "','" + HEquipDotCheckRuleInterID +"'," + HSourceID + ",'" + HMainSourceFlag + "','" + HMacAddress + "','" + HMainSourceID + "')", ref DBUtility.ClsPub.sExeReturnInfo);
                 //淇敼涓婄骇涓洪潪鏈骇浠g爜
                 objJsonResult = AddBillSub(msg3, msg4, HInterID, hbillno, 1);
+
+                //淇濆瓨鍚庢帶鍒�=========================================
+                ds = oCN.RunProcReturn("Exec h_p_Gy_EquipFileBillMain_AfterSaveCtrl " + HInterID.ToString() + ", '" + hbillno + "','" + HBillNote + "',1 ", "h_p_Gy_EquipFileBillMain_AfterSaveCtrl");
+                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]["HBackRemark"].ToString(); ;
+                    objJsonResult.data = null;
+                    oCN.RollBack();
+                    return objJsonResult;                    
+                }
+                //=========================================================
+
                 oCN.Commit();
                 //objJsonResult.data = null;
                 return objJsonResult;
@@ -510,7 +557,7 @@
                     oCN.RunProc("delete from Gy_EquipFileBillSub_DotCheckRule where HInterID = " + HInterID );
                 }
                 int i = 0;
-                //淇濆瓨淇濆吇瑙勬牸
+                //淇濆瓨淇濆吇瑙勭▼
                 foreach (ClsGy_EquipFileBillSub_MaintainRule oSub in MaintainRuleColl)
                 {
                     i++;
@@ -518,9 +565,9 @@
                     {
                         objJsonResult.code = "0";
                         objJsonResult.count = 0;
-                        objJsonResult.Message = "绗�" + i + "琛�,淇濆吇瑙勬牸涓嶈兘涓虹┖";
+                        objJsonResult.Message = "绗�" + i + "琛�,淇濆吇瑙勭▼涓嶈兘涓虹┖";
                         objJsonResult.data = null;
-                        throw new Exception("淇濆吇瑙勬牸涓嶈兘涓虹┖");
+                        throw new Exception("淇濆吇瑙勭▼涓嶈兘涓虹┖");
                 }
                     DataSet Cs;
                     Int64 NewHEntryID = 1;
@@ -586,7 +633,7 @@
                 //淇敼涓婄骇涓洪潪鏈骇浠g爜
                 objJsonResult.code = "1";
                 objJsonResult.count = 1;
-                objJsonResult.Message = "淇濆瓨瀛愯〃鎴愬姛锛�";
+                objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
                 //objJsonResult.data = null;
                 return objJsonResult;
         }
@@ -1315,5 +1362,530 @@
 
         #endregion
 
+        #region 璁惧妗f 鏂囦欢瀵煎叆淇濆瓨
+        #region 璁惧妗f 鏂囦欢涓婁紶
+        [Route("Gy_EquipFileMain/Gy_EquipFileMain_Excel")]
+        [HttpPost]
+        public object Gy_EquipFile_Excel()
+        {
+            try
+            {
+                //鑾峰彇鏂囦欢鍚嶇О
+                var file = HttpContext.Current.Request.Files[0];
+                //鑾峰彇鏂囦欢鐗╃悊璺緞
+                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+                //淇濆瓨鏂囦欢
+                file.SaveAs(ExcelPath);
+
+                NpoiHelper np = new NpoiHelper();
+                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+                //鍒犻櫎鏂囦欢
+                File.Delete(ExcelPath);
+
+                //鍒涘缓涓存椂琛�
+                DataTable tb2 = new DataTable("dt2");
+
+                //娣诲姞鍒楀悕
+                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+                {
+                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+                }
+
+                //妯℃澘缂哄皯鍒� 浣嗛渶瑕佷粠鏁版嵁搴撲腑鏌ヨ鍑烘潵鏄剧ず鍦ㄩ〉闈㈢殑瀛楁
+                tb2.Columns.Add("HOrgID", typeof(Int32));//缁勭粐ID
+                tb2.Columns.Add("HMaterID", typeof(Int32));//鐗╂枡ID
+                tb2.Columns.Add("HEquipTypeID", typeof(Int32));//鍒嗙被ID
+                tb2.Columns.Add("HUnitID", typeof(Int32));//鍗曚綅ID
+                tb2.Columns.Add("HDeptID", typeof(Int32));//閮ㄩ棬ID
+                tb2.Columns.Add("HUseEmpID", typeof(Int32));//浣跨敤璐熻矗浜篒D
+                tb2.Columns.Add("HRepairEmpID", typeof(Int32));//缁存姢璐熻矗浜篒D
+                tb2.Columns.Add("HSupID", typeof(Int32));//渚涘簲鍟咺D
+                tb2.Columns.Add("HMadeSupID", typeof(Int32));//鍒堕�犲晢ID
+                //娣诲姞鏁版嵁
+                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+                {
+                    DataRow row = tb2.NewRow();
+                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+                    {
+                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+                    }
+                    tb2.Rows.Add(row);
+                }
+
+
+                var error = "";
+
+                //鍒ゆ柇瀵煎叆鏂囦欢鍒楁槸鍚﹀畬鏁�
+                if (!tb2.Columns.Contains("缁勭粐浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囦唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("缁勭粐鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囧悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("璁惧鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愯澶囧悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("璁惧缂栧彿"))
+                    error += "娌℃湁鎵惧埌銆愯澶囩紪鍙枫�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("璁惧鍒嗙被"))
+                    error += "娌℃湁鎵惧埌銆愯澶囧垎绫汇�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("璁惧瑙勬牸"))
+                    error += "娌℃湁鎵惧埌銆愯澶囪鏍笺�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("璁惧鍨嬪彿"))
+                    error += "娌℃湁鎵惧埌銆愯澶囧瀷鍙枫�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("瀵瑰簲ERP鐗╂枡浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愬搴擡RP鐗╂枡浠g爜銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("瀵瑰簲ERP鐗╂枡"))
+                    error += "娌℃湁鎵惧埌銆愬搴擡RP鐗╂枡銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("璁¢噺鍗曚綅"))
+                    error += "娌℃湁鎵惧埌銆愯閲忓崟浣嶃�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("璁惧鍑哄巶鏃ユ湡"))
+                    error += "娌℃湁鎵惧埌銆愯澶囧嚭鍘傛棩鏈熴�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("璁惧鍑哄巶缂栧彿"))
+                    error += "娌℃湁鎵惧埌銆愯澶囧嚭鍘傜紪鍙枫�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("浣跨敤閮ㄩ棬"))
+                    error += "娌℃湁鎵惧埌銆愪娇鐢ㄩ儴闂ㄣ�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("浣跨敤璐熻矗浜�"))
+                    error += "娌℃湁鎵惧埌銆愪娇鐢ㄨ礋璐d汉銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("缁存姢璐熻矗浜�"))
+                    error += "娌℃湁鎵惧埌銆愮淮鎶よ礋璐d汉銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("瀹夎鍦扮偣"))
+                    error += "娌℃湁鎵惧埌銆愬畨瑁呭湴鐐广�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("瀹夎鏃ユ湡"))
+                    error += "娌℃湁鎵惧埌銆愬畨瑁呮棩鏈熴�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("杩愯寮�濮嬫棩鏈�"))
+                    error += "娌℃湁鎵惧埌銆愯繍琛屽紑濮嬫棩鏈熴�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("宸ョ▼缂栫爜"))
+                    error += "娌℃湁鎵惧埌銆愬伐绋嬬紪鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鏉″舰鐮�"))
+                    error += "娌℃湁鎵惧埌銆愭潯褰㈢爜銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("浜у湴"))
+                    error += "娌℃湁鎵惧埌銆愪骇鍦般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍝佺墝"))
+                    error += "娌℃湁鎵惧埌銆愬搧鐗屻�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("渚涘簲鍟�"))
+                    error += "娌℃湁鎵惧埌銆愪緵搴斿晢銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍒堕�犲晢"))
+                    error += "娌℃湁鎵惧埌銆愬埗閫犲晢銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("澶囨敞"))
+                    error += "娌℃湁鎵惧埌銆愬娉ㄣ�戠殑鏍囬,";
+
+
+                if (error.Length > 0)
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
+                {
+                    string HEquipName = "";
+                    string HEquipNo = "";
+                    string HORGNumber = "";
+                    string HORGName = "";
+                    string HMaterNumber = "";
+                    string HMaterName = "";
+                    string HUnitName = "";
+                    string HDeptName = "";
+                    string HUseEmpName = "";
+                    string HRepairEmpName = "";
+                    string HSupName = "";
+                    string HMadeSupName = "";
+                    string HEquipTypeName = "";
+
+                    HEquipName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["璁惧鍚嶇О"].ToString());
+                    HEquipNo = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["璁惧缂栧彿"].ToString());
+                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐浠g爜"].ToString());
+                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐鍚嶇О"].ToString());
+                    HMaterNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["瀵瑰簲ERP鐗╂枡浠g爜"].ToString());
+                    HMaterName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["瀵瑰簲ERP鐗╂枡"].ToString());
+                    HUnitName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["璁¢噺鍗曚綅"].ToString());
+                    HDeptName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["浣跨敤閮ㄩ棬"].ToString());
+                    HUseEmpName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["浣跨敤璐熻矗浜�"].ToString());
+                    HRepairEmpName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁存姢璐熻矗浜�"].ToString());
+                    HSupName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["渚涘簲鍟�"].ToString());;
+                    HMadeSupName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鍒堕�犲晢"].ToString());
+                    HEquipTypeName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["璁惧鍒嗙被"].ToString());
+                    //妫�鏌ョ墿鏂�
+                    int index = i + 1;
+
+                    if (HORGNumber != "")
+                    {
+
+                        //鏌ヨ缁勭粐
+                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,缁勭粐涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        //鏌ヨ鍒嗙被
+                        ds = oCN.RunProcReturn("select * from Gy_EquipFileType  where  HName='" + HEquipTypeName + "' ", "EquipFileType");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "绗�" + index + "琛�,鍒嗙被:" + HEquipTypeName + ",涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HEquipTypeID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        //鏌ヨ鐗╂枡
+                        ds = oCN.RunProcReturn("select * from Gy_Material where  HNumber='" + HMaterNumber + "'  and HUSEORGID=" + HORGid + "", "Gy_Department");
+
+                        if (ds.Tables[0].Rows.Count == 0 && HMaterNumber != "")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "绗�" + index + "琛�,璇�" + HORGName + "缁勭粐,鐗╂枡:" + HMaterName + ",涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else if (HMaterNumber == "")
+                        {
+                            tb2.Rows[i]["HMaterID"] = 0;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HMaterID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        //鏌ヨ鍗曚綅
+                        ds = oCN.RunProcReturn("select * from Gy_Unit where  HName='" + HUnitName + "'  and HUSEORGID=" + HORGid + "", "Gy_Unit");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "绗�" + index + "琛�,璇�" + HORGName + "缁勭粐,鍗曚綅:" + HUnitName + ",涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HUnitID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        //鏌ヨ閮ㄩ棬
+                        ds = oCN.RunProcReturn("select * from Gy_Department where  HName='" + HDeptName + "'  and HUSEORGID=" + HORGid + "", "Gy_Department");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "绗�" + index + "琛�,璇�" + HORGName + "缁勭粐,閮ㄩ棬:" + HDeptName + ",涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HDeptID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        //鏌ヨ浣跨敤璐熻矗浜�
+                        ds = oCN.RunProcReturn("select * from Gy_Employee where  HName='" + HUseEmpName + "'  and HUSEORGID=" + HORGid + "", "Gy_Employee");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "绗�" + index + "琛�,璇�" + HORGName + "缁勭粐,浣跨敤璐熻矗浜�:" + HUseEmpName + ",涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HUseEmpID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        //鏌ヨ缁存姢璐熻矗浜�
+                        ds = oCN.RunProcReturn("select * from Gy_Employee where  HName='" + HRepairEmpName + "'  and HUSEORGID=" + HORGid + "", "Gy_Employee");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "绗�" + index + "琛�,璇�" + HORGName + "缁勭粐,缁存姢璐熻矗浜轰汉:" + HRepairEmpName + ",涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HRepairEmpID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        //鏌ヨ渚涘簲鍟�
+                        ds = oCN.RunProcReturn("select * from Gy_Supplier where  HName='" + HSupName + "'  and HUSEORGID=" + HORGid + "", "Gy_Supplier");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "绗�" + index + "琛�,璇�" + HORGName + "缁勭粐,渚涘簲鍟�:" + HSupName + ",涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HSupID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        //鏌ヨ鍒堕�犲晢
+                        ds = oCN.RunProcReturn("select * from Gy_Supplier where  HName='" + HMadeSupName + "'  and HUSEORGID=" + HORGid + "", "Gy_Supplier");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "绗�" + index + "琛�,璇�" + HORGName + "缁勭粐,鍒堕�犲晢:" + HMadeSupName + ",涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HMadeSupID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+
+                        //璁惧妗f鍚嶇О
+                        if (HEquipName == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,璁惧妗f鍚嶇О涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+
+                        //璁惧妗f浠g爜
+                        if (HEquipNo == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,璁惧妗f缂栧彿涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    else
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "绗�" + index + "琛�,缁勭粐浠g爜涓虹┖";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = error;
+                objJsonResult.data = tb2;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 璁惧妗f椤圭洰 瀵煎叆(淇濆瓨)
+        [Route("Gy_EquipFileMain/Gy_EquipFileMain_btnSave")]
+        [HttpPost]
+        public object Gy_EquipFile_btnSave([FromBody] JObject sMainSub)
+        {
+            var _value = sMainSub["sMainSub"].ToString();
+            string msg1 = _value.ToString();
+            string[] sArray = msg1.Split(new string[] { "&鍜�" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString();
+            string user = sArray[1].ToString();
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_EquipFile_Edit", 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+                foreach (JObject item in Excel)
+                {
+                    Dictionary<string, string> dic = new Dictionary<string, string>();
+                    foreach (var itm in item.Properties())
+                    {
+                        dic.Add(itm.Name, itm.Value.ToString());
+                    }
+                    list.Add(dic);
+                }
+
+                oCN.BeginTran();
+                int i = 1;
+                foreach (Dictionary<string, string> item in list)
+                {
+                    string HOrgID = item["HOrgID"].ToString();//缁勭粐ID
+                    string BillType = "3308";
+                    //寰楀埌mainid
+                    long HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
+                    string HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true); ;//閫掑叆type寰楀埌鐨勫崟鎹彿
+                    DateTime HDate = DateTime.Now;//鏃ユ湡
+                    string HYear = DateTime.Now.Year.ToString();
+                    string HEquipFileNumber = "";
+                    string HEquipFileNo = item["璁惧缂栧彿"].ToString();         //	varchar(50)	//璁惧缂栫爜(鍞竴)
+                    string HName = item["璁惧鍚嶇О"].ToString();                //    鈭�	varchar(100)     	//璁惧鍚嶇О
+                    string HModel = item["璁惧瑙勬牸"].ToString();               //   鈭� 	varchar(100)     	//璁惧瑙勬牸
+                    string HModel2 = item["璁惧鍨嬪彿"].ToString();              //    鈭�	varchar(100)    	//璁惧鍨嬪彿 
+                    int HMaterID = int.Parse(item["HMaterID"].ToString());                //   鈭�	int    		//瀵瑰簲鐗╂枡 
+                    int HUnitID = int.Parse(item["HUnitID"].ToString());                 //    鈭�	int    		//鍗曚綅
+                    string HOutComDate = item["璁惧鍑哄巶鏃ユ湡"].ToString() == "" ? DateTime.Now.ToString() : item["璁惧鍑哄巶鏃ユ湡"].ToString();        // 鈭� 	datetime   	//璁惧鍑哄巶鏃ユ湡
+                    string HOutComNo = item["璁惧鍑哄巶缂栧彿"].ToString();            //  鈭� 	varchar(100)   	//璁惧鍑哄巶缂栧彿
+                    int HDeptID = int.Parse(item["HDeptID"].ToString());                 //    鈭�	int    		//浣跨敤閮ㄩ棬锛坓y_Department锛�
+                    int HUseEmpID = int.Parse(item["HUseEmpID"].ToString());               //鈭�	int		//浣跨敤璐熻矗浜猴紙gy_Employee锛�
+                    int HRepairEmpID = int.Parse(item["HRepairEmpID"].ToString());            //鈭�	int		//缁存姢璐熻矗浜猴紙gy_Employee锛�
+                    string HAddress = item["瀹夎鍦扮偣"].ToString();             // 鈭� 	varchar(500)      	//瀹夎鍦扮偣
+                    string HSetupDate = item["瀹夎鏃ユ湡"].ToString() == "" ? DateTime.Now.ToString() : item["瀹夎鏃ユ湡"].ToString();         //鈭�	datetime		//瀹夎鏃ユ湡
+                    string HStartupDate = item["杩愯寮�濮嬫棩鏈�"].ToString() == "" ? DateTime.Now.ToString() : item["杩愯寮�濮嬫棩鏈�"].ToString();         //鈭�	datetime		//杩愯寮�濮嬫棩鏈� 
+                    string HStatus = "绌洪棽";              //	鈭�	varchar(20)	//褰撳墠鐘舵�侊紙绌洪棽銆佸崰鐢ㄣ�佸姞宸ャ�佸叧鏈恒�佸紓甯稿仠鏈猴級
+                    int HEquipFileTypeID = int.Parse(item["HEquipTypeID"].ToString());        //鈭�	int		//璁惧绫诲埆锛圙y_EquipFileType)
+                    string HProNum = item["宸ョ▼缂栫爜"].ToString();              //	鈭�	varchar(100)	//宸ョ▼缂栫爜
+                    string HBarCode = item["鏉″舰鐮�"].ToString();             //鈭�	varchar(100)	//鏉″舰鐮�(鏆傛椂淇濆瓨姝ゅ瓧娈�)
+                    string HWorkArea = item["浜у湴"].ToString();            //鈭�	varchar(50)	//浜у湴
+                    string HLogo = item["鍝佺墝"].ToString();                //鈭�		varchar(50)	//鍝佺墝
+                    int HSellSupID = int.Parse(item["HSupID"].ToString());                // 鈭�	int		//渚涘簲鍟�(Gy_Supplier)
+                    int HMakeSupID = int.Parse(item["HMadeSupID"].ToString());             // int		//鍒堕�犲晢 (Gy_Supplier) 
+                    string HMainSourceFlag = "鍚�";             //varchar(10) //鏄惁涓荤敓浜ц澶�(鍚︼紝鏄�)
+                    string HMacAddress = "";   // varchar(50) //鏁伴噰鐗╃悊鍦板潃
+                    int HMainSourceID = 0;  //int //鎵�灞炰富鐢熶骇璁惧锛圙y_EquipFileBillMain锛�
+                    string HMaker = user;
+                    string HMakeDate = DateTime.Now.Date.ToString();
+                    int HEquipDotCheckRuleInterID = 0;
+                    int HEquipMaintainRuleInterID = 0;
+                    int HSourceID = 0;
+
+
+                    if (!DBUtility.ClsPub.AllowNumber(HEquipFileNo.Trim()))
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+
+                    ds = oCN.RunProcReturn("select * from Gy_EquipFileBillMain where HEquipFileNo='" + HEquipFileNo + "'", "Gy_EquipFileBillMain");
+
+                    if (ds.Tables[0].Rows.Count == 0)
+                    {
+
+                        oCN.RunProc("Insert into Gy_EquipFileBillMain " +
+                   " (HInterID,hbillno,HEquipFileNumber,HEquipFileNo,HName,HModel,HModel2,HMaterID,HUnitID,HOutComDate" +
+                   ",HOutComNo,HDeptID,HUseEmpID,HRepairEmpID,HAddress,HSetupDate,HStartupDate,HStatus," +
+"HEquipFileTypeID,HProNum,HBarCode,HWorkArea,HLogo,HSellSupID,HMakeSupID,hbilltype,HDate,HYear,HMaker,HMakeDate,HEquipMaintainRuleInterID,HEquipDotCheckRuleInterID,HSourceID,HMainSourceFlag,HMacAddress,HMainSourceID) " +
+                   " Values(" + HInterID + ",'" + HBillNo + "','" + HEquipFileNumber + "','" + HEquipFileNo + "','" + HName + "','" + HModel + "','" + HModel2 + "'," + HMaterID + "," + HUnitID +
+                   ",'" + HOutComDate + "','" + HOutComNo + "'," + HDeptID + "," + HUseEmpID + "," + HRepairEmpID + ",'" + HAddress +
+                   "','" + HSetupDate + "','" + HStartupDate + "','" + HStatus + "'," + HEquipFileTypeID + ",'" + HProNum +
+                   "','" + HBarCode + "','" + HWorkArea + "','" + HLogo + "'," + HSellSupID + "," + HMakeSupID + ",'3308','" + HDate + "','" + HYear + "','" + HMaker + "','" + HMakeDate + "','" + HEquipMaintainRuleInterID + "','" + HEquipDotCheckRuleInterID + "'," + HSourceID + ",'" + HMainSourceFlag + "','" + HMacAddress + "','" + HMainSourceID + "')");
+                    }
+                    else
+                    {
+                        oCN.RunProc("Update Gy_EquipFileBillMain set " +
+                    " HEquipFileNumber='" + HEquipFileNumber + "'" +
+                    //",HEquipFileNo='" + HEquipFileNo + "'" +
+                    ",HName='" + HName + "'" +
+                    ",HModel='" + HModel + "'" +
+                    ",HModel2='" + HModel2 + "'" +
+                    ",HMaterID=" + HMaterID +
+                    ",HUnitID=" + HUnitID +
+                    ",HOutComDate='" + HOutComDate + "'" +
+                    ",HOutComNo='" + HOutComNo + "'" +
+                    ",HDeptID=" + HDeptID +
+                    ",HUseEmpID=" + HUseEmpID +
+                    ",HRepairEmpID=" + HRepairEmpID +
+                    ",HAddress='" + HAddress + "'" +
+                    ",HSetupDate='" + HSetupDate + "'" +
+                    ",HStartupDate='" + HStartupDate + "'" +
+                    ",HStatus='" + HStatus + "'" +
+                    ",HEquipFileTypeID=" + HEquipFileTypeID +
+                    ",HProNum='" + HProNum + "'" +
+                    ",HBarCode='" + HBarCode + "'" +
+                    ",HWorkArea='" + HWorkArea + "'" +
+                    ",HLogo='" + HLogo + "'" +
+                    ",HSellSupID=" + HSellSupID +
+                    ",HMakeSupID= " + HMakeSupID +
+                    ",HUpDater= '" + user + "'" +
+                    ",HUpDateDate= getdate()" + "" +
+                    ",HEquipDotCheckRuleInterID='" + HEquipDotCheckRuleInterID + "'" +
+                    ",HEquipMaintainRuleInterID='" + HEquipMaintainRuleInterID + "'" +
+                    ",HSourceID='" + HSourceID + "'" +
+                    ",HMainSourceFlag= '" + HMainSourceFlag + "'" +
+                    ",HMacAddress= '" + HMacAddress + "'" +
+                    ",HMainSourceID = '" + HMainSourceID + "'" +
+                    " Where HEquipFileNo='" + HEquipFileNo + "'");
+                    }
+
+                    i++;
+                }
+
+                oCN.Commit();
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = "瀵煎叆鎴愬姛!";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                LogService.Write(e);
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+        #endregion
+
     }
 }
diff --git a/WebAPI/Controllers/SBGL/Gy_EquipTypeController.cs b/WebAPI/Controllers/SBGL/Gy_EquipTypeController.cs
index 8470eb3..898371b 100644
--- a/WebAPI/Controllers/SBGL/Gy_EquipTypeController.cs
+++ b/WebAPI/Controllers/SBGL/Gy_EquipTypeController.cs
@@ -8,7 +8,10 @@
 using System.Net.Http;
 using System.Web.Http;
 using WebAPI.Models;
-
+using System.Web;
+using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�;
+using System.IO;
+using SyntacticSugar.constant;
 namespace WebAPI.Controllers.SBGL
 {
     public class Gy_EquipTypeController : ApiController
@@ -569,5 +572,266 @@
         }
         #endregion
 
+        #region 璁惧鍒嗙被 鏂囦欢瀵煎叆淇濆瓨
+        #region 璁惧鍒嗙被 鏂囦欢涓婁紶
+        [Route("Gy_EquipType/Gy_EquipType_Excel")]
+        [HttpPost]
+        public object Gy_EquipType_Excel()
+        {
+            try
+            {
+                //鑾峰彇鏂囦欢鍚嶇О
+                var file = HttpContext.Current.Request.Files[0];
+                //鑾峰彇鏂囦欢鐗╃悊璺緞
+                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+                //淇濆瓨鏂囦欢
+                file.SaveAs(ExcelPath);
+
+                NpoiHelper np = new NpoiHelper();
+                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+                //鍒犻櫎鏂囦欢
+                File.Delete(ExcelPath);
+
+                //鍒涘缓涓存椂琛�
+                DataTable tb2 = new DataTable("dt2");
+
+                //娣诲姞鍒楀悕
+                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+                {
+                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+                }
+
+                //妯℃澘缂哄皯鍒� 浣嗛渶瑕佷粠鏁版嵁搴撲腑鏌ヨ鍑烘潵鏄剧ず鍦ㄩ〉闈㈢殑瀛楁
+                tb2.Columns.Add("HOrgID", typeof(Int32));//缁勭粐ID
+
+                //娣诲姞鏁版嵁
+                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+                {
+                    DataRow row = tb2.NewRow();
+                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+                    {
+                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+                    }
+                    tb2.Rows.Add(row);
+                }
+
+
+                var error = "";
+
+                //鏌ヨ娌℃湁鐨勫垪
+                if (!tb2.Columns.Contains("缁勭粐浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囦唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("缁勭粐鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囧悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("璁惧鍒嗙被"))
+                    error += "娌℃湁鎵惧埌銆愯澶囧垎绫诲悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("璁惧鍒嗙被浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愯澶囧垎绫讳唬鐮併�戠殑鏍囬,";
+                if (!tb2.Columns.Contains("澶囨敞"))
+                    error += "娌℃湁鎵惧埌銆愬娉ㄣ�戠殑鏍囬,";
+                if (!tb2.Columns.Contains("鍔╄鐮�"))
+                    error += "娌℃湁鎵惧埌銆愬姪璁扮爜銆戠殑鏍囬,";
+
+                if (error.Length > 0)
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
+                {
+                    string HProcessName = "";
+                    string HProcessNum = "";
+                    string HORGNumber = "";
+                    string HORGName = "";
+
+
+                    HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["璁惧鍒嗙被"].ToString());
+                    HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["璁惧鍒嗙被浠g爜"].ToString());
+                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐浠g爜"].ToString());
+                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐鍚嶇О"].ToString());
+
+                    //妫�鏌ョ墿鏂�
+                    int index = i + 1;
+
+                    if (HORGNumber != "")
+                    {
+
+                        //鏌ヨ缁勭粐
+                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,缁勭粐涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
+
+                        //璁惧鍒嗙被鍚嶇О
+                        if (HProcessName == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,璁惧鍒嗙被鍚嶇О涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+
+                        //璁惧鍒嗙被浠g爜
+                        if (HProcessNum == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,璁惧鍒嗙被浠g爜涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    else
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "绗�" + index + "琛�,缁勭粐浠g爜涓虹┖";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = error;
+                objJsonResult.data = tb2;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 璁惧鍒嗙被椤圭洰 瀵煎叆(淇濆瓨)
+        [Route("Gy_EquipType/Gy_EquipType_btnSave")]
+        [HttpPost]
+        public object Gy_EquipType_btnSave([FromBody] JObject sMainSub)
+        {
+            var _value = sMainSub["sMainSub"].ToString();
+            string msg1 = _value.ToString();
+            string[] sArray = msg1.Split(new string[] { "&鍜�" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString();
+            string user = sArray[1].ToString();
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_ErrType_Edit", 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+                foreach (JObject item in Excel)
+                {
+                    Dictionary<string, string> dic = new Dictionary<string, string>();
+                    foreach (var itm in item.Properties())
+                    {
+                        dic.Add(itm.Name, itm.Value.ToString());
+                    }
+                    list.Add(dic);
+                }
+
+                oCN.BeginTran();
+                int i = 1;
+                foreach (Dictionary<string, string> item in list)
+                {
+                    string HOrgID = item["HOrgID"].ToString();//缁勭粐ID
+                    string HName = item["璁惧鍒嗙被"].ToString();
+                    string HNumber = item["璁惧鍒嗙被浠g爜"].ToString();
+                    string HRemark = item["澶囨敞"].ToString();
+                    string HHelpCode = item["鍔╄鐮�"].ToString();
+                    string sShortNumber;
+                    sShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//鐭唬鐮�
+                    if (sShortNumber.Trim() == "")
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    int HEndFlag = 1;//鏈骇鏍囧織
+                    int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //绛夌骇
+
+
+                    if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim()))
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+
+                    ds = oCN.RunProcReturn("select * from Gy_EquipFileType where HNumber='" + HNumber + "'", "Gy_EquipType");
+
+                    if (ds.Tables[0].Rows.Count == 0)
+                    {
+                        oCN.RunProc("Insert into Gy_EquipFileType " +
+                   " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+                   ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HMakeEmp) " +
+                   " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + sShortNumber + "'," + 0 +
+                   "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "',getdate(),'" + user + "')");
+                    }
+                    else
+                    {
+                        oCN.RunProc("update  Gy_EquipFileType set HHelpCode='" + HHelpCode + "',HRemark='" + HRemark + "'  where HNumber='" + HNumber + "'");
+                    }
+
+                    i++;
+                }
+
+                oCN.Commit();
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = "瀵煎叆鎴愬姛!";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                LogService.Write(e);
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+        #endregion
+
     }
 }
diff --git a/WebAPI/Controllers/SBGL/SBBB/Sb_EquipMentCollectionTechParam_TempController.cs b/WebAPI/Controllers/SBGL/SBBB/Sb_EquipMentCollectionTechParam_TempController.cs
index 11f896a..f08d474 100644
--- a/WebAPI/Controllers/SBGL/SBBB/Sb_EquipMentCollectionTechParam_TempController.cs
+++ b/WebAPI/Controllers/SBGL/SBBB/Sb_EquipMentCollectionTechParam_TempController.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json;
+锘縰sing Model;
+using Newtonsoft.Json;
 using SyntacticSugar.constant;
 using System;
 using System.Collections.Generic;
@@ -36,6 +37,8 @@
                 string sql = "select * from h_v_Sb_EquipMentCollectionTechParam_TempList where 1 = 1" + sWhere;
                 DataSet ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipMentCollectionTechParam_TempList");
 
+
+
                 //鏁版嵁閬嶅巻, 鑾峰彇鍒楀悕
                 List<object> columnNameList = new List<object>();
                 foreach (DataColumn col in ds.Tables[0].Columns)
diff --git a/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs
index 99abdc1..2ef736a 100644
--- a/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs
@@ -883,14 +883,15 @@
                         string sReturn = "";
                         if (oSystemParameter.ShowBill(ref sReturn) == true)
                         {
-                            if (oSystemParameter.omodel.Sc_ICMOBillWorkQtyStatus_AutoCheck == "Y") //绯荤粺鍙傛暟  鑷姩瀹℃牳 
-                            {
-                                objJsonResult.Verify = "Y";
-                            }
-                            else
-                            {
-                                objJsonResult.Verify = "N";
-                            }
+                            objJsonResult.Verify = "Y";
+                            //if (oSystemParameter.omodel.Sc_ICMOBillWorkQtyStatus_AutoCheck == "Y") //绯荤粺鍙傛暟  鑷姩瀹℃牳 
+                            //{
+                            //    objJsonResult.Verify = "Y";
+                            //}
+                            //else
+                            //{
+                            //    objJsonResult.Verify = "N";
+                            //}
                         }
                     }
 
diff --git a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
index 6d03813..8b463ff 100644
--- a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
@@ -530,7 +530,7 @@
             string sql =string.Format(@"select A.HInterID,b.HEntryID,A.HBillStatus,A.HBillNo,A.HDate,A.HContext,A.HDescription,A.HRemark,
                                       A.HQty,A.HSendType,a.HForm,a.HChangeNote,a.HNote,a.HBadProcMan,f1.HName HBadProcManName,
 										a.HQEMan,f2.HName HQEManName,a.HSourceID,s.HName HSourceName,a.HShiftsID,s1.HName HShiftsName,
-                                        A.HDeptID,D.HName HDeptName, A.HSendMan, 
+                                        A.HDeptID,D.HName HDeptName, A.HSendMan,a.HCenterID HCenterID,wo.HName HCenterName, 
                                         A.HReceiveMan,A.HCopyMan,A.HHasten,
                                         A.HLevel,A.HMaterNumber,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,
@@ -545,6 +545,7 @@
 										left join Gy_Employee f2 on a.HQEMan=f2.HItemID
 										left join Gy_Source s on a.HSourceID=s.HItemID
 										left join Gy_Shifts s1 on a.HShiftsID=s1.HItemID
+                                        left join Gy_WorkCenter wo on a.HCenterID=wo.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/SCGL/Sc_PPBomBillController.cs b/WebAPI/Controllers/SCGL/Sc_PPBomBillController.cs
index dde2295..6465722 100644
--- a/WebAPI/Controllers/SCGL/Sc_PPBomBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_PPBomBillController.cs
@@ -90,6 +90,60 @@
                 return objJsonResult;
             }
         }
+
+
+        #region 鐢熶骇鐢ㄦ枡娓呭崟鍒楄〃鍒嗛〉鍒楄〃
+        [Route("Sc_PPBomBill/page")]
+        [HttpGet]
+        public object page(string sWhere, string user,int page,int size)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //缂栬緫鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Sc_PPBomBillList_Query", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("exec h_p_Sc_PPBomBillList " + page + "," + size + "," + "''", "h_p_Sc_PPBomBillList");
+                }
+                else
+                {
+                    ds = oCN.RunProcReturn("exec h_p_Sc_PPBomBillList " + page + "," + size + ",'"  + sWhere + "'", "h_p_Sc_PPBomBillList");
+                }
+
+                //娣诲姞鍒楀悕
+                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 = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.list = columnNameList;
+                objJsonResult.data = ds.Tables[0];
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
         #region 鐢熶骇鐢ㄦ枡娓呭崟 瀹℃牳/鍙嶅鏍�
         [Route("Sc_PPBomBill/DeOrAuditBill")]
         [HttpGet]
diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
index 7668c3f..081f353 100644
--- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
+++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs
@@ -4092,7 +4092,7 @@
                 lsmain = oListModels.getObjectByJson_Gy_MouldRepairWorkBillMain(msg2);
                 foreach (Model.ClsSb_MouldRepairWorkBillMain oItem in lsmain)
                 {
-                    //oItem.HMaker = "";
+                    oItem.HMaker = msg4;
                     UserName = msg4;  //鍒跺崟浜�
                     oItem.HBillType = "3807";
                     oItem.HBillSubType = "3807";
@@ -5162,7 +5162,7 @@
             string msg3 = sArray[1].ToString();
             string msg4 = sArray[2].ToString();
             string msg5 = sArray[3].ToString();
-
+            string msg6 = sArray[4].ToString();
 
             string UserName = "";
             ListModels oListModels = new ListModels();
@@ -5196,6 +5196,7 @@
                     //oItem.HBillNo = "";
                     oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd"));//  --鏃ユ湡
                     oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year);
+                    oItem.HPeriod = DBUtility.ClsPub.isLong(DateTime.Now.Month);
                     //oItem.HMakeDate = "";
                     //oItem.HYear = "";
                     //oItem.HPeriod = "";
@@ -5282,6 +5283,32 @@
                     oBill.DetailColl.Add(oItemSub);
 
                 }
+
+                //琛ㄤ綋鏁版嵁
+                //鎸� },{鏉ユ媶鍒嗘暟缁� //鍘绘帀銆愬拰銆�
+                //濡傛灉鏄紪杈戝氨鍏佽淇濆瓨,鍚﹀垯涓嶅厑璁�
+                if (oBill.omodel.HInterID != 0)
+                {
+                    msg6 = msg6.Substring(1, msg6.Length - 2);
+                    msg6 = msg6.Replace("\\", "");
+                    msg6 = msg6.Replace("\n", "");  
+                    List<Model.ClsSc_MouldMaintainPlanBillSub_Plan> lss = new List<Model.ClsSc_MouldMaintainPlanBillSub_Plan>();
+                    lss = oListModels.getObjectByJson_Sc_MouldMaintainPlanBillSub_Plan(msg6);
+                    int l = 0;
+                    foreach (Model.ClsSc_MouldMaintainPlanBillSub_Plan oItem in lss)
+                    {
+
+                        l++;
+                        oItem.HEntryID = l;
+                        oItem.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+                        oItem.HCloseType = false;   //鍏抽棴绫诲瀷
+                        oItem.HSourceInterID = 0;     // 婧愬崟涓诲唴鐮�
+                        oItem.HSourceEntryID = 0;   //婧愬崟瀛愬唴鐮�
+                        oItem.HRelationQty = 0;     //鍏宠仈鏁伴噺                  
+                        oBill.DetailCol2.Add(oItem);
+                    }
+                }
+                
                 //淇濆瓨
                 //淇濆瓨瀹屾瘯鍚庡鐞�
                 bool bResult;
@@ -5597,7 +5624,7 @@
                 foreach (Model.ClsSc_MouldMaintainBillMain oItem in lsmain)
                 {
                     UserName = oItem.HMaker;  //鍒跺崟浜�
-                    DBUtility.ClsPub.CurUserName = UserName;
+                    DBUtility.ClsPub.CurUserName = msg5;
                     oItem.HBillType = "3819";
                     oItem.HBillSubType = "3819";
 
diff --git a/WebAPI/Controllers/WebAPIController.cs b/WebAPI/Controllers/WebAPIController.cs
index cb6c853..c6db297 100644
--- a/WebAPI/Controllers/WebAPIController.cs
+++ b/WebAPI/Controllers/WebAPIController.cs
@@ -18,6 +18,10 @@
 using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�;
 using WebAPI.Models;
 using WebAPI.Service;
+using System.Web;
+using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�;
+using System.IO;
+using SyntacticSugar.constant;
 
 namespace WebAPI.Controllers
 {
@@ -116,6 +120,68 @@
                 Int64 HInterID = 0;//鏄剧ず鐨勫瓧娈�
                 HInterID = DBUtility.ClsPub.CreateBillID_Prod(HBillType, ref sErrMsg);
                 HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(HBillType, ref sErrMsg, true);
+
+                DataSet ds;
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                ds = oCN.RunProcReturn("exec h_p_IF_CheckBillIDExists_WMS  " + HInterID + ",'" + HBillNo + "'", "h_p_IF_CheckBillIDExists_WMS");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    sErrMsg = "瀛樺湪閲嶅鍗曟嵁鍐呯爜鎴栧崟鎹彿鐨勫崟鎹紝涓嶅厑璁告柊澧烇紝璇烽��鍑哄悗閲嶆柊鐧诲綍锛�";
+                    objjson.code = "0";
+                    objjson.count = 0;
+                    objjson.Message = sErrMsg;
+                    objjson.data = null;
+                    return objjson;
+                }
+                else if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0][0]) == "1")
+                {
+                    sErrMsg = "瀛樺湪閲嶅鍗曟嵁鍐呯爜鎴栧崟鎹彿鐨勫崟鎹紝涓嶅厑璁告柊澧烇紝璇烽��鍑哄悗閲嶆柊鐧诲綍锛�";
+                    objjson.code = "0";
+                    objjson.count = 0;
+                    objjson.Message = sErrMsg;
+                    objjson.data = null;
+                    return objjson;
+                }
+                else
+                {
+                    //----------鍒涘缓铏氳〃------------------------
+                    DataTable dt_Main = new DataTable("Json");
+                    dt_Main.Columns.Add("HBillNo", typeof(string));
+                    dt_Main.Columns.Add("HInterID", typeof(Int64));
+                    //---------鍒涘缓鏂拌------------------------
+                    DataRow dr_main = dt_Main.NewRow();//鍒涘缓鏂拌 
+                    dt_Main.Rows.Add(dr_main);//灏嗘柊琛屽姞鍏ュ埌琛ㄤ腑
+                    dr_main["HBillNo"] = DBUtility.ClsPub.isStrNull(HBillNo);
+                    dr_main["HInterID"] = DBUtility.ClsPub.isLong(HInterID);
+                    //杩斿洖鏁版嵁
+                    objjson.code = "0";
+                    objjson.count = 1;
+                    objjson.Message = "鑾峰彇鎴愬姛";
+                    objjson.data = dt_Main;
+                    return objjson;
+                }
+            }
+            catch (Exception e)
+            {
+                objjson.code = "0";
+                objjson.count = 0;
+                objjson.Message = "鑾峰彇澶辫触" + e.ToString();
+                objjson.data = null;
+                return objjson;
+            }
+        }
+
+        [Route("Web/GetMAXNum_ProcExchange")]
+        [HttpGet]
+        public object GetMAXNum_ProcExchange(string HBillType)
+        {
+            try
+            {
+                string HBillNo = "";
+                string sErrMsg = "";
+                Int64 HInterID = 0;//鏄剧ず鐨勫瓧娈�
+                HInterID = DBUtility.ClsPub.CreateBillID_Prod(HBillType, ref sErrMsg);
+                //HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(HBillType, ref sErrMsg, true);
 
                 DataSet ds;
                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
@@ -369,47 +435,57 @@
         /// <returns></returns>
         [Route("Web/GetXGPassword")]
         [HttpGet]
-        public object GetXGPassword(string UserName, string oldPassword, string PassWord, string Repassword)
+        public object GetXGPassword(string UserName, string oldPassword, string PassWord, string Repassword,string HCloudUserName,string HCloudUserPsd)
         {
             try
             {
                 ClsCN oCn = new ClsCN();
                 DataSet oDs = new DataSet();
                 //==========
-                oDs = oCn.RunProcReturn("select Czmm from  Gy_Czygl where Czybm='" + UserName + "'", "Gy_Czygl");
-                if (PassWord.Trim() != Repassword.Trim())
+                
+                if(PassWord!=null)
                 {
-                    objjson.code = "0";
-                    objjson.count = 0;
-                    objjson.Message = "2娆″瘑鐮佷笉涓�鑷达紒";
-                    objjson.data = oDs.Tables[0];
-                    return objjson; ;
-                }
-                //===========
-                if (oDs == null || oDs.Tables[0].Rows.Count == 0)
-                {
-                    objjson.code = "0";
-                    objjson.count = 0;
-                    objjson.Message = "娌℃湁杩欎釜鐢ㄦ埛锛屼笉鑳戒慨鏀瑰瘑鐮侊紒";
-                    objjson.data = null;
-                    return objjson; ;
-                }
-                else
-                {
-                    oCn.RunProc("update  Gy_Czygl set Czmm='" + ClsPub.StrToPsd(PassWord.Trim()) + "' where Czybm='" + UserName.Trim() + "'");
+                    oDs = oCn.RunProcReturn("select Czmm from  Gy_Czygl where Czybm='" + UserName + "'", "Gy_Czygl");
+                    if (PassWord.Trim() != Repassword.Trim())
+                    {
+                        objjson.code = "0";
+                        objjson.count = 0;
+                        objjson.Message = "2娆″瘑鐮佷笉涓�鑷达紒";
+                        objjson.data = oDs.Tables[0];
+                        return objjson; ;
+                    }
+                    //===========
+                    if (oDs == null || oDs.Tables[0].Rows.Count == 0)
+                    {
+                        objjson.code = "0";
+                        objjson.count = 0;
+                        objjson.Message = "娌℃湁杩欎釜鐢ㄦ埛锛屼笉鑳戒慨鏀瑰瘑鐮侊紒";
+                        objjson.data = null;
+                        return objjson; ;
+                    }
+                    oCn.RunProc("update  Gy_Czygl set Czmm='" + ClsPub.StrToPsd(PassWord.Trim()) + "',HCloudUserName = '" + HCloudUserName+ "',HCloudUserPsd = '" + HCloudUserPsd+ "' where Czybm='" + UserName.Trim() + "'");
                     objjson.code = "0";
                     objjson.count = 1;
                     objjson.Message = "* 瀵嗙爜淇敼鎴愬姛锛�";
                     objjson.data = null;
+                    return objjson; 
+                }
+                else
+                {
+                    oCn.RunProc("update  Gy_Czygl set HCloudUserName = '" + HCloudUserName + "',HCloudUserPsd = '" + HCloudUserPsd + "' where Czybm='" + UserName.Trim() + "'");
+                    objjson.code = "0";
+                    objjson.count = 1;
+                    objjson.Message = "* 閲戣澏浜戣处鍙蜂慨鏀规垚鍔燂紒";
+                    objjson.data = null;
                     return objjson; ;
                 }
             }
-            catch (Exception)
+            catch (Exception e)
             {
 
                 objjson.code = "0";
                 objjson.count = 0;
-                objjson.Message = "淇敼瀵嗙爜寮傚父锛�";
+                objjson.Message = "淇敼瀵嗙爜寮傚父锛�" + e.ToString();
                 objjson.data = null;
                 return objjson; ;
             }
@@ -1432,6 +1508,52 @@
             {
                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                 ds = oCN.RunProcReturn("Select HItemID,鐝粍浠g爜 鐝粍浠g爜,鐝粍鍚嶇О 鐝粍 from h_v_GroupList where 1=1 " + sWhere + " Order by HItemID ", "h_v_GroupList");
+                if (ds == null || ds.Tables[0].Rows.Count <= 0)
+                {
+                    objjson.code = "0";
+                    objjson.count = 0;
+                    objjson.Message = "鑾峰彇澶辫触";
+                    objjson.data = null;
+                    return objjson;
+                }
+                else
+                {
+                    objjson.code = "0";
+                    objjson.count = 1;
+                    objjson.Message = "鑾峰彇鎴愬姛!";
+                    objjson.data = ds.Tables[0];
+                    return objjson;
+                }
+            }
+            catch (Exception e)
+            {
+
+                objjson.code = "0";
+                objjson.count = 0;
+                objjson.Message = "鑾峰彇澶辫触" + e.ToString();
+                objjson.data = null;
+                return objjson;
+            }
+        }
+
+        /// <summary>
+        /// 鑾峰彇鐝粍鍒楄〃  鏍规嵁鐢ㄦ埛瀵瑰簲鐝粍鍏崇郴锛岃幏鍙栫敤鎴峰搴旂殑鐝粍
+        ///鍙傛暟锛歴tring sql銆�
+        ///杩斿洖鍊硷細object銆�
+        /// </summary>
+        [Route("Web/GetGroupListByUser_Json")]
+        [HttpGet]
+        public object GetGroupListByUser_Json(string sWhere, string user)
+        {
+            try
+            {
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+                //鏍规嵁鐢ㄦ埛瀵瑰簲鐝粍鐨勫叧绯伙紝杩囨护鏉′欢涓鍔犲彧鏄剧ず瀵瑰簲鐨勭彮缁�
+                DataSet dsHitemID = oCN.RunProcReturn("exec h_p_Gy_GetSQLGroupByUser '" + user + "'", "h_p_Gy_GetSQLGroupByUser");
+                sWhere = sWhere + DBUtility.ClsPub.isStrNull(dsHitemID.Tables[0].Rows[0]["HBack"]);
+
+                DataSet ds = oCN.RunProcReturn("Select HItemID,鐝粍浠g爜 鐝粍浠g爜,鐝粍鍚嶇О 鐝粍 from h_v_GroupList where 1=1 " + sWhere + " Order by HItemID ", "h_v_GroupList");
                 if (ds == null || ds.Tables[0].Rows.Count <= 0)
                 {
                     objjson.code = "0";
@@ -3094,6 +3216,263 @@
                 return objJsonResult;
             }
         }
+        #endregion
+
+        #region 寮傚父绫诲瀷 鏂囦欢瀵煎叆淇濆瓨
+        #region 寮傚父绫诲瀷 鏂囦欢涓婁紶
+        [Route("Gy_ErrType/Gy_ErrType_Excel")]
+        [HttpPost]
+        public object Gy_ErrType_Excel()
+        {
+            try
+            {
+                //鑾峰彇鏂囦欢鍚嶇О
+                var file = HttpContext.Current.Request.Files[0];
+                //鑾峰彇鏂囦欢鐗╃悊璺緞
+                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+                //淇濆瓨鏂囦欢
+                file.SaveAs(ExcelPath);
+
+                NpoiHelper np = new NpoiHelper();
+                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+                //鍒犻櫎鏂囦欢
+                File.Delete(ExcelPath);
+
+                //鍒涘缓涓存椂琛�
+                DataTable tb2 = new DataTable("dt2");
+
+                //娣诲姞鍒楀悕
+                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+                {
+                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+                }
+
+                //妯℃澘缂哄皯鍒� 浣嗛渶瑕佷粠鏁版嵁搴撲腑鏌ヨ鍑烘潵鏄剧ず鍦ㄩ〉闈㈢殑瀛楁
+                tb2.Columns.Add("HOrgID", typeof(Int32));//缁勭粐ID
+
+                //娣诲姞鏁版嵁
+                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+                {
+                    DataRow row = tb2.NewRow();
+                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+                    {
+                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+                    }
+                    tb2.Rows.Add(row);
+                }
+
+
+                var error = "";
+
+                //鏌ヨ宸ヨ壓璺嚎娌℃湁鐨勫垪
+                if (!tb2.Columns.Contains("缁勭粐浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囦唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("缁勭粐鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囧悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("寮傚父绫诲瀷"))
+                    error += "娌℃湁鎵惧埌銆愬紓甯哥被鍨嬪悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("寮傚父绫诲瀷浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愬紓甯哥被鍨嬩唬鐮併�戠殑鏍囬,";
+
+                if (error.Length > 0)
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
+                {
+                    string HProcessName = "";
+                    string HProcessNum = "";
+                    string HORGNumber = "";
+                    string HORGName = "";
+
+
+                    HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["寮傚父绫诲瀷"].ToString());
+                    HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["寮傚父绫诲瀷浠g爜"].ToString());
+                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐浠g爜"].ToString());
+                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐鍚嶇О"].ToString());
+
+                    //妫�鏌ョ墿鏂�
+                    int index = i + 1;
+
+                    if (HORGNumber != "")
+                    {
+
+                        //鏌ヨ缁勭粐
+                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,缁勭粐涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
+
+                        //寮傚父绫诲瀷鍚嶇О
+                        if (HProcessName == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,寮傚父绫诲瀷鍚嶇О涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+
+                        //寮傚父绫诲瀷浠g爜
+                        if (HProcessNum == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,寮傚父绫诲瀷浠g爜涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    else
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "绗�" + index + "琛�,缁勭粐浠g爜涓虹┖";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = error;
+                objJsonResult.data = tb2;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 寮傚父绫诲瀷椤圭洰 瀵煎叆(淇濆瓨)
+        [Route("Gy_ErrType/Gy_ErrType_btnSave")]
+        [HttpPost]
+        public object Gy_ErrType_btnSave([FromBody] JObject sMainSub)
+        {
+            var _value = sMainSub["sMainSub"].ToString();
+            string msg1 = _value.ToString();
+            string[] sArray = msg1.Split(new string[] { "&鍜�" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString();
+            string user = sArray[1].ToString();
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_ErrType_Edit", 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+                foreach (JObject item in Excel)
+                {
+                    Dictionary<string, string> dic = new Dictionary<string, string>();
+                    foreach (var itm in item.Properties())
+                    {
+                        dic.Add(itm.Name, itm.Value.ToString());
+                    }
+                    list.Add(dic);
+                }
+
+                oCN.BeginTran();
+                int i = 1;
+                foreach (Dictionary<string, string> item in list)
+                {
+                    string HOrgID = item["HOrgID"].ToString();//缁勭粐ID
+                    string HProcessName = item["寮傚父绫诲瀷"].ToString();
+                    string HProcessNum = item["寮傚父绫诲瀷浠g爜"].ToString();
+                    string HRemark = item["澶囨敞"].ToString();
+                    string sShortNumber;
+                    sShortNumber = DBUtility.ClsPub.GetShortNumber(HProcessNum);//鐭唬鐮�
+                    if (sShortNumber.Trim() == "")
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    int HEndFlag = 1;//鏈骇鏍囧織
+                    int HLevel = DBUtility.ClsPub.GetLevel(HProcessNum); //绛夌骇
+
+
+                    if (!DBUtility.ClsPub.AllowNumber(HProcessNum.Trim()))
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+
+                    ds = oCN.RunProcReturn("select * from Gy_ErrType where HNumber='" + HProcessNum + "'", "Gy_ErrType");
+
+                    if (ds.Tables[0].Rows.Count == 0)
+                    {
+
+                        oCN.RunProc("Insert into " + "Gy_ErrType" +
+                        " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+                        ",HLevel,HEndFlag,HStopflag,HRemark,HBarCode,HUSEORGID,HCREATEORGID,HUseFlag) " +
+                        " Values('" + HProcessNum + "','" + HProcessName + "','" + "','" + sShortNumber + "'," + 0 +
+                        "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "','" + "'," + HOrgID + "," + HOrgID + ",'" + "鏈娴�" + "')");
+                    }
+                    else
+                    {
+                        oCN.RunProc("update  Gy_ErrType set HUSEORGID=" + HOrgID + ",HRemark='" + HRemark + "'  where HNumber='" + HProcessNum + "'");
+                    }
+
+                    i++;
+                }
+
+                oCN.Commit();
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = "瀵煎叆鎴愬姛!";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                LogService.Write(e);
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
         #endregion
 
         /// <summary>
@@ -5486,6 +5865,309 @@
         #endregion
 
 
+        #region 宀椾綅鎶�鑳� 鏂囦欢瀵煎叆淇濆瓨
+        #region 宀椾綅鎶�鑳� 鏂囦欢涓婁紶
+        [Route("Gy_PostSkill/Gy_PostSkill_Excel")]
+        [HttpPost]
+        public object Gy_PostSkill_Excel()
+        {
+            try
+            {
+                //鑾峰彇鏂囦欢鍚嶇О
+                var file = HttpContext.Current.Request.Files[0];
+                //鑾峰彇鏂囦欢鐗╃悊璺緞
+                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+                //淇濆瓨鏂囦欢
+                file.SaveAs(ExcelPath);
+
+                NpoiHelper np = new NpoiHelper();
+                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+                //鍒犻櫎鏂囦欢
+                File.Delete(ExcelPath);
+
+                //鍒涘缓涓存椂琛�
+                DataTable tb2 = new DataTable("dt2");
+
+                //娣诲姞鍒楀悕
+                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+                {
+                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+                }
+
+                //妯℃澘缂哄皯鍒� 浣嗛渶瑕佷粠鏁版嵁搴撲腑鏌ヨ鍑烘潵鏄剧ず鍦ㄩ〉闈㈢殑瀛楁
+                tb2.Columns.Add("HOrgID", typeof(Int32));//缁勭粐ID
+                tb2.Columns.Add("HPostID", typeof(Int32));//宀椾綅id
+
+                //娣诲姞鏁版嵁
+                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+                {
+                    DataRow row = tb2.NewRow();
+                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+                    {
+                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+                    }
+                    tb2.Rows.Add(row);
+                }
+
+
+                var error = "";
+
+                //鏌ヨ娌℃湁鐨勫垪
+                if (!tb2.Columns.Contains("缁勭粐浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囦唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("缁勭粐鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囧悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("宀椾綅鎶�鑳�"))
+                    error += "娌℃湁鎵惧埌銆愬矖浣嶆妧鑳姐�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("宀椾綅鎶�鑳戒唬鐮�"))
+                    error += "娌℃湁鎵惧埌銆愬矖浣嶆妧鑳戒唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("宀椾綅"))
+                    error += "娌℃湁鎵惧埌銆愬矖浣嶃�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("宀椾綅浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愬矖浣嶄唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("澶囨敞"))
+                    error += "娌℃湁鎵惧埌銆愬娉ㄣ�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍔╄鐮�"))
+                    error += "娌℃湁鎵惧埌銆愬姪璁扮爜銆戠殑鏍囬,";
+
+                if (error.Length > 0)
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
+                {
+                    string HProcessName = "";
+                    string HProcessNum = "";
+                    string HORGNumber = "";
+                    string HORGName = "";
+                    string HPostName = "";
+                    string HPostNumber = "";
+
+
+                    HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["宀椾綅鎶�鑳�"].ToString());
+                    HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["宀椾綅鎶�鑳戒唬鐮�"].ToString());
+                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐浠g爜"].ToString());
+                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐鍚嶇О"].ToString());
+                    HPostName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["宀椾綅"].ToString());
+                    HPostNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["宀椾綅浠g爜"].ToString());
+
+                    //妫�鏌ョ墿鏂�
+                    int index = i + 1;
+
+                    if (HORGNumber != "")
+                    {
+
+                        //鏌ヨ缁勭粐
+                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,缁勭粐涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        //鏌ヨ宀椾綅
+                        ds = oCN.RunProcReturn("select * from Gy_Post where  HNumber='" + HPostNumber + "' and Hname='" + HPostName + "' and HUSEORGID = "+ HORGid, "Gy_Post");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,宀椾綅涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HPostID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+
+
+
+                        //宀椾綅鎶�鑳藉悕绉�
+                        if (HProcessName == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,宀椾綅鎶�鑳戒笉鑳戒负绌猴紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+
+                        //宀椾綅鎶�鑳戒唬鐮�
+                        if (HProcessNum == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,宀椾綅鎶�鑳戒唬鐮佷笉鑳戒负绌猴紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    else
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "绗�" + index + "琛�,缁勭粐浠g爜涓虹┖";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = error;
+                objJsonResult.data = tb2;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 宀椾綅鎶�鑳介」鐩� 瀵煎叆(淇濆瓨)
+        [Route("Gy_PostSkill/Gy_PostSkill_btnSave")]
+        [HttpPost]
+        public object Gy_PostSkill_btnSave([FromBody] JObject sMainSub)
+        {
+            var _value = sMainSub["sMainSub"].ToString();
+            string msg1 = _value.ToString();
+            string[] sArray = msg1.Split(new string[] { "&鍜�" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString();
+            string user = sArray[1].ToString();
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_PostSkill_Edit", 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+                foreach (JObject item in Excel)
+                {
+                    Dictionary<string, string> dic = new Dictionary<string, string>();
+                    foreach (var itm in item.Properties())
+                    {
+                        dic.Add(itm.Name, itm.Value.ToString());
+                    }
+                    list.Add(dic);
+                }
+
+                oCN.BeginTran();
+                int i = 1;
+                foreach (Dictionary<string, string> item in list)
+                {
+                    string HOrgID = item["HOrgID"].ToString();//缁勭粐ID
+                    string HPostID = item["HPostID"].ToString();//缁勭粐ID
+                    string HName = item["宀椾綅鎶�鑳�"].ToString();
+                    string HNumber = item["宀椾綅鎶�鑳戒唬鐮�"].ToString();
+                    string HRemark = item["澶囨敞"].ToString();
+                    string HHelpCode = item["鍔╄鐮�"].ToString();
+                    string HUseFlag = "鏈娴�";
+                    string HShortNumber;
+                    HShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//鐭唬鐮�
+                    if (HShortNumber.Trim() == "")
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    int HEndFlag = 1;//鏈骇鏍囧織
+                    int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //绛夌骇
+
+
+                    if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim()))
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+
+                    ds = oCN.RunProcReturn("select * from Gy_PostSkill where HNumber='" + HNumber + "'", "Gy_PostSkill");
+
+                    if (ds.Tables[0].Rows.Count == 0)
+                    {
+                        oCN.RunProc("Insert into " + "Gy_PostSkill" +
+                        " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+                        ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HUSEORGID,HUseFlag,HMakeEmp,HCREATEORGID,HPostID,HProcID) " +
+                        " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + 0 +
+                        "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "','" + DateTime.Now + "','" + HOrgID + "','" + HUseFlag + "','" + user + "','" + HOrgID + "','" + HPostID + "','" + 0 + "')");
+
+
+                    }
+                    else
+                    {
+                        oCN.RunProc("Update " + "Gy_PostSkill" + " set " +
+                        "HName='" + HName + "'" +
+                        ",HShortNumber='" + HShortNumber + "'" +
+                        ",HHelpCode='" + HHelpCode + "'" +
+                        ",HModifyTime='" + DateTime.Now + "'" +
+                        ",HUSEORGID='" + HOrgID + "'" +
+                        ",HModifyEmp ='" + user + "'" +
+                         ",HPostID ='" + HPostID + "'" +
+                        ",HRemark= '" + HRemark + "' Where HNumber='" + HNumber + "'");
+                    }
+
+                    i++;
+                }
+
+                oCN.Commit();
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = "瀵煎叆鎴愬姛!";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                LogService.Write(e);
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+        #endregion
+
         #region  宀椾綅 璁剧疆鍒楄〃/淇濆瓨/缂栬緫/鍒犻櫎鏂规硶
         /// <summary>
         /// 淇濆瓨宀椾綅
@@ -5764,6 +6446,279 @@
                 return objJsonResult;
             }
         }
+        #endregion
+
+        #region 宀椾綅 鏂囦欢瀵煎叆淇濆瓨
+        #region 宀椾綅 鏂囦欢涓婁紶
+        [Route("Gy_Post/Gy_Post_Excel")]
+        [HttpPost]
+        public object Gy_Post_Excel()
+        {
+            try
+            {
+                //鑾峰彇鏂囦欢鍚嶇О
+                var file = HttpContext.Current.Request.Files[0];
+                //鑾峰彇鏂囦欢鐗╃悊璺緞
+                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+                //淇濆瓨鏂囦欢
+                file.SaveAs(ExcelPath);
+
+                NpoiHelper np = new NpoiHelper();
+                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+                //鍒犻櫎鏂囦欢
+                File.Delete(ExcelPath);
+
+                //鍒涘缓涓存椂琛�
+                DataTable tb2 = new DataTable("dt2");
+
+                //娣诲姞鍒楀悕
+                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+                {
+                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+                }
+
+                //妯℃澘缂哄皯鍒� 浣嗛渶瑕佷粠鏁版嵁搴撲腑鏌ヨ鍑烘潵鏄剧ず鍦ㄩ〉闈㈢殑瀛楁
+                tb2.Columns.Add("HOrgID", typeof(Int32));//缁勭粐ID
+
+                //娣诲姞鏁版嵁
+                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+                {
+                    DataRow row = tb2.NewRow();
+                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+                    {
+                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+                    }
+                    tb2.Rows.Add(row);
+                }
+
+
+                var error = "";
+
+                //鏌ヨ娌℃湁鐨勫垪
+                if (!tb2.Columns.Contains("缁勭粐浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囦唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("缁勭粐鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囧悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("宀椾綅"))
+                    error += "娌℃湁鎵惧埌銆愬矖浣嶅悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("宀椾綅浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愬矖浣嶄唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("澶囨敞"))
+                    error += "娌℃湁鎵惧埌銆愬娉ㄣ�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍔╄鐮�"))
+                    error += "娌℃湁鎵惧埌銆愬姪璁扮爜銆戠殑鏍囬,";
+
+                if (error.Length > 0)
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
+                {
+                    string HProcessName = "";
+                    string HProcessNum = "";
+                    string HORGNumber = "";
+                    string HORGName = "";
+
+
+                    HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["宀椾綅"].ToString());
+                    HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["宀椾綅浠g爜"].ToString());
+                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐浠g爜"].ToString());
+                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐鍚嶇О"].ToString());
+
+                    //妫�鏌ョ墿鏂�
+                    int index = i + 1;
+
+                    if (HORGNumber != "")
+                    {
+
+                        //鏌ヨ缁勭粐
+                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,缁勭粐涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
+
+                        //宀椾綅鍚嶇О
+                        if (HProcessName == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,宀椾綅鍚嶇О涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+
+                        //宀椾綅浠g爜
+                        if (HProcessNum == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,宀椾綅浠g爜涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    else
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "绗�" + index + "琛�,缁勭粐浠g爜涓虹┖";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = error;
+                objJsonResult.data = tb2;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 宀椾綅椤圭洰 瀵煎叆(淇濆瓨)
+        [Route("Gy_Post/Gy_Post_btnSave")]
+        [HttpPost]
+        public object Gy_Post_btnSave([FromBody] JObject sMainSub)
+        {
+            var _value = sMainSub["sMainSub"].ToString();
+            string msg1 = _value.ToString();
+            string[] sArray = msg1.Split(new string[] { "&鍜�" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString();
+            string user = sArray[1].ToString();
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_Post_Edit", 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+                foreach (JObject item in Excel)
+                {
+                    Dictionary<string, string> dic = new Dictionary<string, string>();
+                    foreach (var itm in item.Properties())
+                    {
+                        dic.Add(itm.Name, itm.Value.ToString());
+                    }
+                    list.Add(dic);
+                }
+
+                oCN.BeginTran();
+                int i = 1;
+                foreach (Dictionary<string, string> item in list)
+                {
+                    string HOrgID = item["HOrgID"].ToString();//缁勭粐ID
+                    string HName = item["宀椾綅"].ToString();
+                    string HNumber = item["宀椾綅浠g爜"].ToString();
+                    string HRemark = item["澶囨敞"].ToString();
+                    string HHelpCode = item["鍔╄鐮�"].ToString();
+                    string HUseFlag = "鏈娴�";
+                    string HShortNumber;
+                    HShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//鐭唬鐮�
+                    if (HShortNumber.Trim() == "")
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    int HEndFlag = 1;//鏈骇鏍囧織
+                    int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //绛夌骇
+
+
+                    if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim()))
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+
+                    ds = oCN.RunProcReturn("select * from Gy_Post where HNumber='" + HNumber + "'", "Gy_Post");
+
+                    if (ds.Tables[0].Rows.Count == 0)
+                    {
+                        oCN.RunProc("Insert into " + "Gy_Post" +
+                    " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+                    ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HUSEORGID,HUseFlag,HMakeEmp,HCREATEORGID) " +
+                    " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + 0 +
+                    "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "','" + DateTime.Now + "','" + HOrgID + "','" + HUseFlag + "','" + user + "','" + HOrgID + "')");
+
+
+                    }
+                    else
+                    {
+                        oCN.RunProc("Update " + "Gy_Post" + " set " +
+                        "HName='" + HName + "'" +
+                        ",HShortNumber='" + HShortNumber + "'" +
+                        ",HHelpCode='" + HHelpCode + "'" +
+                        ",HModifyTime='" + DateTime.Now + "'" +
+                        ",HUSEORGID='" + HOrgID + "'" +
+                        ",HModifyEmp ='" + user + "'" +
+                        ",HRemark= '" + HRemark + "' Where HNumber='" + HNumber + "'");
+                    }
+
+                    i++;
+                }
+
+                oCN.Commit();
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = "瀵煎叆鎴愬姛!";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                LogService.Write(e);
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
         #endregion
 
         #region  璋冩嫧绫诲瀷  璁剧疆鍒楄〃/淇濆瓨/缂栬緫/鍒犻櫎鏂规硶
@@ -9170,6 +10125,262 @@
         }
         #endregion
 
+        #region 寮傚父鍙嶉绫诲瀷 鏂囦欢瀵煎叆淇濆瓨
+        #region 寮傚父鍙嶉绫诲瀷 鏂囦欢涓婁紶
+        [Route("Gy_ErrMsgBackType/Gy_ErrMsgBackType_Excel")]
+        [HttpPost]
+        public object Gy_ErrMsgBackType_Excel()
+        {
+            try
+            {
+                //鑾峰彇鏂囦欢鍚嶇О
+                var file = HttpContext.Current.Request.Files[0];
+                //鑾峰彇鏂囦欢鐗╃悊璺緞
+                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+                //淇濆瓨鏂囦欢
+                file.SaveAs(ExcelPath);
+
+                NpoiHelper np = new NpoiHelper();
+                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+                //鍒犻櫎鏂囦欢
+                File.Delete(ExcelPath);
+
+                //鍒涘缓涓存椂琛�
+                DataTable tb2 = new DataTable("dt2");
+
+                //娣诲姞鍒楀悕
+                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+                {
+                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+                }
+
+                //妯℃澘缂哄皯鍒� 浣嗛渶瑕佷粠鏁版嵁搴撲腑鏌ヨ鍑烘潵鏄剧ず鍦ㄩ〉闈㈢殑瀛楁
+                tb2.Columns.Add("HOrgID", typeof(Int32));//缁勭粐ID
+
+                //娣诲姞鏁版嵁
+                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+                {
+                    DataRow row = tb2.NewRow();
+                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+                    {
+                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+                    }
+                    tb2.Rows.Add(row);
+                }
+
+
+                var error = "";
+
+                //鏌ヨ宸ヨ壓璺嚎娌℃湁鐨勫垪
+                if (!tb2.Columns.Contains("缁勭粐浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囦唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("缁勭粐鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囧悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("寮傚父鍙嶉绫诲瀷"))
+                    error += "娌℃湁鎵惧埌銆愬紓甯稿弽棣堢被鍨嬪悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("寮傚父鍙嶉绫诲瀷浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愬紓甯稿弽棣堢被鍨嬩唬鐮併�戠殑鏍囬,";
+
+                if (error.Length > 0)
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
+                {
+                    string HProcessName = "";
+                    string HProcessNum = "";
+                    string HORGNumber = "";
+                    string HORGName = "";
+
+
+                    HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["寮傚父鍙嶉绫诲瀷"].ToString());
+                    HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["寮傚父鍙嶉绫诲瀷浠g爜"].ToString());
+                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐浠g爜"].ToString());
+                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐鍚嶇О"].ToString());
+
+                    //妫�鏌ョ墿鏂�
+                    int index = i + 1;
+
+                    if (HORGNumber != "")
+                    {
+
+                        //鏌ヨ缁勭粐
+                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,缁勭粐涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
+
+                        //寮傚父绫诲瀷鍚嶇О
+                        if (HProcessName == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,寮傚父鍙嶉绫诲瀷鍚嶇О涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+
+                        //寮傚父绫诲瀷浠g爜
+                        if (HProcessNum == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,寮傚父鍙嶉绫诲瀷浠g爜涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    else
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "绗�" + index + "琛�,缁勭粐浠g爜涓虹┖";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = error;
+                objJsonResult.data = tb2;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 寮傚父鍙嶉椤圭洰 瀵煎叆(淇濆瓨)
+        [Route("Gy_ErrMsgBackType/Gy_ErrMsgBackType_btnSave")]
+        [HttpPost]
+        public object Gy_ErrMsgBackType_btnSave([FromBody] JObject sMainSub)
+        {
+            var _value = sMainSub["sMainSub"].ToString();
+            string msg1 = _value.ToString();
+            string[] sArray = msg1.Split(new string[] { "&鍜�" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString();
+            string user = sArray[1].ToString();
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_ErrType_Edit", 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+                foreach (JObject item in Excel)
+                {
+                    Dictionary<string, string> dic = new Dictionary<string, string>();
+                    foreach (var itm in item.Properties())
+                    {
+                        dic.Add(itm.Name, itm.Value.ToString());
+                    }
+                    list.Add(dic);
+                }
+
+                oCN.BeginTran();
+                int i = 1;
+                foreach (Dictionary<string, string> item in list)
+                {
+                    string HOrgID = item["HOrgID"].ToString();//缁勭粐ID
+                    string HProcessName = item["寮傚父鍙嶉绫诲瀷"].ToString();
+                    string HProcessNum = item["寮傚父鍙嶉绫诲瀷浠g爜"].ToString();
+                    string HRemark = item["澶囨敞"].ToString();
+                    string sShortNumber;
+                    sShortNumber = DBUtility.ClsPub.GetShortNumber(HProcessNum);//鐭唬鐮�
+                    if (sShortNumber.Trim() == "")
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    int HEndFlag = 1;//鏈骇鏍囧織
+                    int HLevel = DBUtility.ClsPub.GetLevel(HProcessNum); //绛夌骇
+
+
+                    if (!DBUtility.ClsPub.AllowNumber(HProcessNum.Trim()))
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+
+                    ds = oCN.RunProcReturn("select * from Gy_ErrMsgBackType where HNumber='" + HProcessNum + "'", "Gy_ErrMsgBackType");
+
+                    if (ds.Tables[0].Rows.Count == 0)
+                    {
+                        oCN.RunProc("Insert into "  + "Gy_ErrMsgBackType " +
+                    " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+                    ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HUSEORGID,HUseFlag,HMakeEmp,HCREATEORGID) " +
+                    " Values('" + HProcessNum + "','" + HProcessName + "','" +  "','" + sShortNumber + "'," + 0 +
+                    "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "','" + DateTime.Now + "','" + HOrgID + "','" + "鏈娴�" + "','" + user + "','" + HOrgID + "')");
+                    }
+                    else
+                    {
+                        oCN.RunProc("update  Gy_ErrMsgBackType set HUSEORGID=" + HOrgID + ",HRemark='" + HRemark + "'  where HNumber='" + HProcessNum + "'");
+                    }
+
+                    i++;
+                }
+
+                oCN.Commit();
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = "瀵煎叆鎴愬姛!";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                LogService.Write(e);
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+        #endregion
+
         #region  涓嶈壇鐜拌薄  璁剧疆鍒楄〃/淇濆瓨/缂栬緫/鍒犻櫎鏂规硶
         /// <summary>
         ///  涓嶈壇鐜拌薄 淇濆瓨
@@ -10073,6 +11284,274 @@
         }
         #endregion
 
+        #region 闃查敊瑁呯疆 鏂囦欢瀵煎叆淇濆瓨
+        #region 闃查敊瑁呯疆 鏂囦欢涓婁紶
+        [Route("Gy_PreventErrMould/Gy_PreventErrMould_Excel")]
+        [HttpPost]
+        public object Gy_PreventErrMould_Excel()
+        {
+            try
+            {
+                //鑾峰彇鏂囦欢鍚嶇О
+                var file = HttpContext.Current.Request.Files[0];
+                //鑾峰彇鏂囦欢鐗╃悊璺緞
+                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+                //淇濆瓨鏂囦欢
+                file.SaveAs(ExcelPath);
+
+                NpoiHelper np = new NpoiHelper();
+                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+                //鍒犻櫎鏂囦欢
+                File.Delete(ExcelPath);
+
+                //鍒涘缓涓存椂琛�
+                DataTable tb2 = new DataTable("dt2");
+
+                //娣诲姞鍒楀悕
+                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+                {
+                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+                }
+
+                //妯℃澘缂哄皯鍒� 浣嗛渶瑕佷粠鏁版嵁搴撲腑鏌ヨ鍑烘潵鏄剧ず鍦ㄩ〉闈㈢殑瀛楁
+                tb2.Columns.Add("HOrgID", typeof(Int32));//缁勭粐ID
+
+                //娣诲姞鏁版嵁
+                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+                {
+                    DataRow row = tb2.NewRow();
+                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+                    {
+                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+                    }
+                    tb2.Rows.Add(row);
+                }
+
+
+                var error = "";
+
+                //鏌ヨ娌℃湁鐨勫垪
+                if (!tb2.Columns.Contains("缁勭粐浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囦唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("缁勭粐鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囧悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("闃查敊瑁呯疆鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愰槻閿欒缃悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("闃查敊瑁呯疆浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愰槻閿欒缃唬鐮併�戠殑鏍囬,";
+                if (!tb2.Columns.Contains("澶囨敞"))
+                    error += "娌℃湁鎵惧埌銆愬娉ㄣ�戠殑鏍囬,";
+                if (!tb2.Columns.Contains("鍔╄鐮�"))
+                    error += "娌℃湁鎵惧埌銆愬姪璁扮爜銆戠殑鏍囬,";
+
+                if (error.Length > 0)
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
+                {
+                    string HProcessName = "";
+                    string HProcessNum = "";
+                    string HORGNumber = "";
+                    string HORGName = "";
+
+
+                    HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["闃查敊瑁呯疆鍚嶇О"].ToString());
+                    HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["闃查敊瑁呯疆浠g爜"].ToString());
+                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐浠g爜"].ToString());
+                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐鍚嶇О"].ToString());
+
+                    //妫�鏌ョ墿鏂�
+                    int index = i + 1;
+
+                    if (HORGNumber != "")
+                    {
+
+                        //鏌ヨ缁勭粐
+                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,缁勭粐涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
+
+                        //闃查敊瑁呯疆鍚嶇О
+                        if (HProcessName == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,闃查敊瑁呯疆鍚嶇О涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+
+                        //闃查敊瑁呯疆浠g爜
+                        if (HProcessNum == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,闃查敊瑁呯疆浠g爜涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    else
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "绗�" + index + "琛�,缁勭粐浠g爜涓虹┖";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = error;
+                objJsonResult.data = tb2;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 闃查敊瑁呯疆椤圭洰 瀵煎叆(淇濆瓨)
+        [Route("Gy_PreventErrMould/Gy_PreventErrMould_btnSave")]
+        [HttpPost]
+        public object Gy_PreventErrMould_btnSave([FromBody] JObject sMainSub)
+        {
+            var _value = sMainSub["sMainSub"].ToString();
+            string msg1 = _value.ToString();
+            string[] sArray = msg1.Split(new string[] { "&鍜�" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString();
+            string user = sArray[1].ToString();
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_PreventErrMould_Edit", 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+                foreach (JObject item in Excel)
+                {
+                    Dictionary<string, string> dic = new Dictionary<string, string>();
+                    foreach (var itm in item.Properties())
+                    {
+                        dic.Add(itm.Name, itm.Value.ToString());
+                    }
+                    list.Add(dic);
+                }
+
+                oCN.BeginTran();
+                int i = 1;
+                foreach (Dictionary<string, string> item in list)
+                {
+                    string HOrgID = item["HOrgID"].ToString();//缁勭粐ID
+                    string HName = item["闃查敊瑁呯疆鍚嶇О"].ToString();
+                    string HNumber = item["闃查敊瑁呯疆浠g爜"].ToString();
+                    string HRemark = item["澶囨敞"].ToString();
+                    string HHelpCode = item["鍔╄鐮�"].ToString();
+                    string HShortNumber;
+                    HShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//鐭唬鐮�
+                    if (HShortNumber.Trim() == "")
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    int HEndFlag = 1;//鏈骇鏍囧織
+                    int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //绛夌骇
+
+
+                    if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim()))
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+
+                    ds = oCN.RunProcReturn("select * from Gy_PreventErrMould where HNumber='" + HNumber + "'", "Gy_PreventErrMould");
+
+                    if (ds.Tables[0].Rows.Count == 0)
+                    {
+                        oCN.RunProc("Insert into " + "Gy_PreventErrMould" +
+                    " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+                    ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HUSEORGID,HUseFlag,HMakeEmp,HCREATEORGID) " +
+                    " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + 0 +
+                    "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "','" + DateTime.Now + "','" + HOrgID + "','" + "鏈娴�" + "','" + user + "','" + HOrgID + "')");
+                    }
+                    else
+                    {
+                        oCN.RunProc("Update " + "Gy_PreventErrMould" + " set " +
+                        "HName='" + HName + "'" +
+                        ",HShortNumber='" + HShortNumber + "'" +
+                        ",HHelpCode='" + HHelpCode + "'" +
+                        ",HModifyTime='" + DateTime.Now + "'" +
+                        ",HUSEORGID='" + HOrgID + "'" +
+                        ",HModifyEmp ='" + user + "'" +
+                        ",HRemark= '" + HRemark + "' Where HNumber='" + HNumber + "'");
+                    }
+
+                    i++;
+                }
+
+                oCN.Commit();
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = "瀵煎叆鎴愬姛!";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                LogService.Write(e);
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+        #endregion
+
         #region  闃查敊瑁呯疆  璁剧疆鍒楄〃/淇濆瓨/缂栬緫/鍒犻櫎鏂规硶
         /// <summary>
         ///  闃查敊瑁呯疆 淇濆瓨
@@ -10844,7 +12323,7 @@
             try
             {
                 //鍒犻櫎鏉冮檺
-                if (!DBUtility.ClsPub.Security_Log("Gy_CheckNoteItem_Drop", 1, false, user))
+                if (!DBUtility.ClsPub.Security_Log("Gy_CheckNoteItem_Delete", 1, false, user))
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
@@ -10883,6 +12362,279 @@
                 return objJsonResult;
             }
         }
+        #endregion
+
+        #region 鍚姩妫�鏌ラ」鐩� 鏂囦欢瀵煎叆淇濆瓨
+        #region 鍚姩妫�鏌ラ」鐩� 鏂囦欢涓婁紶
+        [Route("Gy_CheckNoteItem/Gy_CheckNoteItem_Excel")]
+        [HttpPost]
+        public object Gy_CheckNoteItem_Excel()
+        {
+            try
+            {
+                //鑾峰彇鏂囦欢鍚嶇О
+                var file = HttpContext.Current.Request.Files[0];
+                //鑾峰彇鏂囦欢鐗╃悊璺緞
+                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+                //淇濆瓨鏂囦欢
+                file.SaveAs(ExcelPath);
+
+                NpoiHelper np = new NpoiHelper();
+                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+                //鍒犻櫎鏂囦欢
+                File.Delete(ExcelPath);
+
+                //鍒涘缓涓存椂琛�
+                DataTable tb2 = new DataTable("dt2");
+
+                //娣诲姞鍒楀悕
+                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+                {
+                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+                }
+
+                //妯℃澘缂哄皯鍒� 浣嗛渶瑕佷粠鏁版嵁搴撲腑鏌ヨ鍑烘潵鏄剧ず鍦ㄩ〉闈㈢殑瀛楁
+                tb2.Columns.Add("HOrgID", typeof(Int32));//缁勭粐ID
+
+                //娣诲姞鏁版嵁
+                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+                {
+                    DataRow row = tb2.NewRow();
+                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+                    {
+                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+                    }
+                    tb2.Rows.Add(row);
+                }
+
+
+                var error = "";
+
+                //鏌ヨ娌℃湁鐨勫垪
+                if (!tb2.Columns.Contains("缁勭粐浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囦唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("缁勭粐鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囧悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍚姩妫�鏌ラ」鐩悕绉�"))
+                    error += "娌℃湁鎵惧埌銆愬惎鍔ㄦ鏌ラ」鐩悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍚姩妫�鏌ラ」鐩唬鐮�"))
+                    error += "娌℃湁鎵惧埌銆愬惎鍔ㄦ鏌ラ」鐩唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("澶囨敞"))
+                    error += "娌℃湁鎵惧埌銆愬娉ㄣ�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍔╄鐮�"))
+                    error += "娌℃湁鎵惧埌銆愬姪璁扮爜銆戠殑鏍囬,";
+
+                if (error.Length > 0)
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
+                {
+                    string HProcessName = "";
+                    string HProcessNum = "";
+                    string HORGNumber = "";
+                    string HORGName = "";
+
+
+                    HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鍚姩妫�鏌ラ」鐩悕绉�"].ToString());
+                    HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鍚姩妫�鏌ラ」鐩唬鐮�"].ToString());
+                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐浠g爜"].ToString());
+                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐鍚嶇О"].ToString());
+
+                    //妫�鏌ョ墿鏂�
+                    int index = i + 1;
+
+                    if (HORGNumber != "")
+                    {
+
+                        //鏌ヨ缁勭粐
+                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,缁勭粐涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
+
+                        //鍚姩妫�鏌ラ」鐩悕绉�
+                        if (HProcessName == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,鍚姩妫�鏌ラ」鐩悕绉颁笉鑳戒负绌猴紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+
+                        //鍚姩妫�鏌ラ」鐩唬鐮�
+                        if (HProcessNum == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,鍚姩妫�鏌ラ」鐩唬鐮佷笉鑳戒负绌猴紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    else
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "绗�" + index + "琛�,缁勭粐浠g爜涓虹┖";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = error;
+                objJsonResult.data = tb2;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 鍚姩妫�鏌ラ」鐩」鐩� 瀵煎叆(淇濆瓨)
+        [Route("Gy_CheckNoteItem/Gy_CheckNoteItem_btnSave")]
+        [HttpPost]
+        public object Gy_CheckNoteItem_btnSave([FromBody] JObject sMainSub)
+        {
+            var _value = sMainSub["sMainSub"].ToString();
+            string msg1 = _value.ToString();
+            string[] sArray = msg1.Split(new string[] { "&鍜�" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString();
+            string user = sArray[1].ToString();
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_CheckNoteItem_Edit", 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+                foreach (JObject item in Excel)
+                {
+                    Dictionary<string, string> dic = new Dictionary<string, string>();
+                    foreach (var itm in item.Properties())
+                    {
+                        dic.Add(itm.Name, itm.Value.ToString());
+                    }
+                    list.Add(dic);
+                }
+
+                oCN.BeginTran();
+                int i = 1;
+                foreach (Dictionary<string, string> item in list)
+                {
+                    string HOrgID = item["HOrgID"].ToString();//缁勭粐ID
+                    string HName = item["鍚姩妫�鏌ラ」鐩悕绉�"].ToString();
+                    string HNumber = item["鍚姩妫�鏌ラ」鐩唬鐮�"].ToString();
+                    string HRemark = item["澶囨敞"].ToString();
+                    string HHelpCode = item["鍔╄鐮�"].ToString();
+                    string HShortNumber;
+                    HShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//鐭唬鐮�
+                    if (HShortNumber.Trim() == "")
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    int HEndFlag = 1;//鏈骇鏍囧織
+                    int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //绛夌骇
+                    string HUseFlag = "鏈娴�";
+
+                    if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim()))
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+
+                    ds = oCN.RunProcReturn("select * from Gy_CheckNoteItem where HNumber='" + HNumber + "'", "Gy_CheckNoteItem");
+
+                    if (ds.Tables[0].Rows.Count == 0)
+                    {
+                        oCN.RunProc("Insert into " + "Gy_CheckNoteItem" + 
+                    " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+                    ",HLevel,HEndFlag,HStopflag,HRemark,HMakeTime,HUSEORGID,HUseFlag,HMakeEmp,HCREATEORGID,HCheckPostID) " +
+                    " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + 0 +
+                    "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "','" + DateTime.Now + "','" + HOrgID + "','" + HUseFlag + "','" + user + "','" + HOrgID + "','" + 0 + "')");
+
+
+                    }
+                    else
+                    {
+                        oCN.RunProc("Update " + "Gy_CheckNoteItem" + " set " +
+                        
+                        "HName='" + HName + "'" +
+                        ",HShortNumber='" + HShortNumber + "'" +
+                        ",HHelpCode='" + HHelpCode + "'" +
+                        ",HModifyTime='" + DateTime.Now + "'" +
+                        ",HUSEORGID='" + HOrgID + "'" +
+                        ",HModifyEmp ='" + user + "'" +
+                        ",HRemark= '" + HRemark + "' Where HNumber='" + HNumber + "'");
+                    }
+
+                    i++;
+                }
+
+                oCN.Commit();
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = "瀵煎叆鎴愬姛!";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                LogService.Write(e);
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
         #endregion
 
         #region  浼戞伅鏃�  璁剧疆鍒楄〃/淇濆瓨/缂栬緫/鍒犻櫎鏂规硶
@@ -13016,6 +14768,61 @@
                 return objjson;
             }
         }
+
+        #region 鏉$爜涓绘。鍒嗛〉鍒楄〃
+        [Route("Gy_BarCodeBillList/page")]
+        [HttpGet]
+        public json Gy_BarCodeBillListPage(string sWhere, string user, int page, int size)
+        {
+            DataSet ds;
+            json res = new json();
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+                if (!DBUtility.ClsPub.Security_Log("Gy_BarCodeBill_Query", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳潈闄愭煡璇�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("exec h_p_IF_BarCodeBillList " + page + "," + size + ",''", "h_p_IF_BarCodeBillList");
+                }
+                else
+                {
+                    ds = oCN.RunProcReturn("exec h_p_IF_BarCodeBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_IF_BarCodeBillList");
+                }
+
+                //娣诲姞鍒楀悕
+                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鍒楀璞$殑鍒楀悕
+                }
+
+                res.code = CodeConstant.SUCCEED;
+                res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+                res.Message = "Sucess锛�";
+                res.list = columnNameList;
+                res.data = ds.Tables[0];
+                return res;
+            }
+            catch (Exception e)
+            {
+                res.code = CodeConstant.FAIL;
+                res.count = CountConstant.FAIL;
+                res.Message = "Exception锛�" + e.ToString();
+                res.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
         /// <summary>
         /// 鏍规嵁璁惧淇濆吇瑙勭▼鏄剧ず璁惧淇濆吇瑙勭▼椤圭洰
         /// </summary>
diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\241\346\243\200\345\215\225/QC_PatrolProcCheckOtherBillController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\241\346\243\200\345\215\225/QC_PatrolProcCheckOtherBillController.cs"
index 0a0f39f..9c38576 100644
--- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\241\346\243\200\345\215\225/QC_PatrolProcCheckOtherBillController.cs"
+++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\241\346\243\200\345\215\225/QC_PatrolProcCheckOtherBillController.cs"
@@ -177,6 +177,7 @@
                 BillNew.omodel.HProcExchBillNo = ClsPub.isStrNull(mainList[0].HProcExchBillNo);
                 BillNew.omodel.HProcExchQty = ClsPub.isLong(mainList[0].HProcExchQty);
                 BillNew.omodel.HMaterID = ClsPub.isLong(mainList[0].HMaterID);
+                BillNew.omodel.HProcID = ClsPub.isLong(mainList[0].HProcID);
                 BillNew.omodel.HFirstCheckEmp = ClsPub.isLong(mainList[0].HFirstCheckEmp);
                 BillNew.omodel.HLastResult = ClsPub.isBool(mainList[0].HLastResult);
                 BillNew.omodel.HMainSourceInterID = ClsPub.isLong(mainList[0].HMainSourceInterID);
@@ -230,10 +231,10 @@
                         oSub.HInspectValB = DBUtility.ClsPub.isLong(mainList[0].HInspectValB == null ? 0 : mainList[0].HInspectValB);
                         oSub.HTargetValB = DBUtility.ClsPub.isLong(mainList[0].HTargetValB == null ? 0 : mainList[0].HTargetValB);
 
-                        oSub.HInspectVal= DBUtility.ClsPub.isStrNull(mainList[0].HInspectVal);
-                        oSub.HTargetVal= DBUtility.ClsPub.isStrNull(mainList[0].HTargetVal);
-                        oSub.HUpLimit= DBUtility.ClsPub.isStrNull(mainList[0].HUpLimit);
-                        oSub.HDownLimit= DBUtility.ClsPub.isStrNull(mainList[0].HDownLimit);
+                        oSub.HInspectVal= DBUtility.ClsPub.isStrNull(subList[i].HInspectVal);
+                        oSub.HTargetVal= DBUtility.ClsPub.isStrNull(subList[i].HTargetVal);
+                        oSub.HUpLimit= DBUtility.ClsPub.isStrNull(subList[i].HUpLimit);
+                        oSub.HDownLimit= DBUtility.ClsPub.isStrNull(subList[i].HDownLimit);
                         //*
                         oSub.HUpOffSet= DBUtility.ClsPub.isStrNull(subList[i].HUpOffSet);
                         oSub.HDownOffSet= DBUtility.ClsPub.isStrNull(subList[i].HDownOffSet);
diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs"
index 0095bd2..ab1c5dd 100644
--- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs"
+++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/QC_ProcessCheckBillController.cs"
@@ -880,6 +880,7 @@
                         oSub.HTargetVal = DBUtility.ClsPub.isStrNull(subList[i].HTargetVal);
                         oSub.HUpLimit = DBUtility.ClsPub.isStrNull(subList[i].HUpLimit);
                         oSub.HDownLimit = DBUtility.ClsPub.isStrNull(subList[i].HDownLimit);
+                        oSub.HQCNote = DBUtility.ClsPub.isStrNull(subList[i].HQCNote);
                         oSub.HUpOffSet = DBUtility.ClsPub.isStrNull(subList[i].HUpOffSet);
                         oSub.HDownOffSet = DBUtility.ClsPub.isStrNull(subList[i].HDownOffSet);
                         oSub.HAnalysisMethod = DBUtility.ClsPub.isStrNull(subList[i].HAnalysisMethod);
diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_QualityReportsController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_QualityReportsController.cs"
index 242e17d..2ea5941 100644
--- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_QualityReportsController.cs"
+++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\264\250\351\207\217\346\212\245\350\241\250/QC_QualityReportsController.cs"
@@ -545,8 +545,11 @@
                 string HMonth = dic["HMonth"].ToString();
                 int HDeptName = int.Parse(dic["HDeptName"].ToString());
                 int HOrgID = int.Parse(dic["HOrgID"].ToString());
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
 
-                ds = oCN.RunProcReturn("exec h_p_QC_QualityStatisticsDailyReport '" + HYear + "','" + HMonth + "'," + HDeptName + "," + HOrgID, "h_p_QC_QualityStatisticsDailyReport");
+                ds = oCN.RunProcReturn("exec h_p_QC_QualityStatisticsDailyReport '" + HYear + "','" + HMonth + "'," + HDeptName + "," + HOrgID+ ",'" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_QualityStatisticsDailyReport");
 
                 //娣诲姞鍒楀悕
                 foreach (DataColumn col in ds.Tables[0].Columns)
@@ -603,8 +606,11 @@
                 string HEndDate = dic["HEndDate"].ToString();
                 string HResult = dic["HResult"].ToString();
                 int HSourceID = int.Parse(dic["HSourceID"].ToString());
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
 
-                ds = oCN.RunProcReturn("exec h_p_QC_MoistureContentDataLedger '" + HBeginDate + "','" + HEndDate + "','" + HResult + "'," + HSourceID, "h_p_QC_MoistureContentDataLedger");
+                ds = oCN.RunProcReturn("exec h_p_QC_MoistureContentDataLedger '" + HBeginDate + "','" + HEndDate + "','" + HResult + "'," + HSourceID+ ",'" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_MoistureContentDataLedger");
 
                 //娣诲姞鍒楀悕
                 foreach (DataColumn col in ds.Tables[0].Columns)
@@ -645,11 +651,15 @@
 
                 string HYear = dic["HYear"].ToString();
                 string HMonth = dic["HMonth"].ToString();
-                string HDivisionName = dic["HDivisionName"].ToString();
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
                 string HProcName = dic["HProcName"].ToString();
                 string HMaterName = dic["HMaterName"].ToString();
-                
-                ds = oCN.RunProcReturn("exec h_p_Sc_StationOutBillQuery_HProc '" + HYear + "','" + HMonth + "','" + HDivisionName + "','" + HProcName + "','" + HMaterName + "'", "h_p_SB_EquipICMOTechParamBillList");
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDeptID = dic["HDeptID"].ToString();//閮ㄩ棬
+
+
+                ds = oCN.RunProcReturn("exec h_p_Sc_StationOutBillQuery_HProc '" + HYear + "','" + HMonth + "','" + HDivisionName + "','" + HProcName + "','" + HMaterName + "','" + HProject + "','" + HBatchWork + "','"+ HDeptID + "'", "h_p_SB_EquipICMOTechParamBillList");
 
 
                 //娣诲姞鍒楀悕
@@ -856,8 +866,11 @@
                 string HEndDate = dic["HEndDate"].ToString();
                 string HBatchNo = dic["HBatchNo"].ToString();
                 int HMaterID = int.Parse(dic["HMaterID"].ToString());
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
 
-                ds = oCN.RunProcReturn("exec h_p_QC_PerformanceScrapLedger '" + HBeginDate + "','" + HEndDate + "','" + HMaterID + "','" + HBatchNo+"'", "h_p_QC_PerformanceScrapLedger");
+                ds = oCN.RunProcReturn("exec h_p_QC_PerformanceScrapLedger '" + HBeginDate + "','" + HEndDate + "','" + HMaterID + "','" + HBatchNo+ "','" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_PerformanceScrapLedger");
 
                 //娣诲姞鍒楀悕
                 foreach (DataColumn col in ds.Tables[0].Columns)
@@ -914,8 +927,11 @@
                 string HEndDate = dic["HEndDate"].ToString();
                 string HBatchNo = dic["HBatchNo"].ToString();
                 int HMaterID = int.Parse(dic["HMaterID"].ToString());
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
 
-                ds = oCN.RunProcReturn("exec h_p_QC_RegistrationForTestingReport '" + HBeginDate + "','" + HEndDate + "','" + HMaterID + "','" + HBatchNo + "'", "h_p_QC_RegistrationForTestingReport");
+                ds = oCN.RunProcReturn("exec h_p_QC_RegistrationForTestingReport '" + HBeginDate + "','" + HEndDate + "','" + HMaterID + "','" + HBatchNo + "','" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_RegistrationForTestingReport");
 
                 //娣诲姞鍒楀悕
                 foreach (DataColumn col in ds.Tables[0].Columns)
@@ -1055,7 +1071,7 @@
                 else
                 {
                     string sql1 = "select * from h_v_OA_ErrMsgBackBillList_Query where 1 = 1 ";
-                    string sql = sql1 + sWhere + " order by 鏃ユ湡 ";
+                    string sql = sql1 + sWhere + " order by 鏃ユ湡 desc ";
                     ds = oCN.RunProcReturn(sql, "h_v_OA_ErrMsgBackBillList_Query");
                 }
 
@@ -1113,13 +1129,11 @@
                 string HBeginDate = dic["HBeginDate"].ToString();
                 string HEndDate = dic["HEndDate"].ToString();
                 int HDeptID = int.Parse(dic["HDeptID"].ToString());
-                string HMaterModel = dic["HMaterModel"].ToString();
-                string HSourceName = dic["HSourceName"].ToString();
-                string HProSource = dic["HProSource"].ToString();
-                string HShiftsName = dic["HShiftsName"].ToString();
-                string HCustomize = dic["HCustomize"].ToString();
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
 
-                ds = oCN.RunProcReturn("exec h_p_QC_ErrManagerLedgerReport '" + HBeginDate + "','" + HEndDate + "'," + HDeptID + ",'" + HMaterModel + "','" + HSourceName + "','" + HProSource + "','" + HShiftsName + "','" + HCustomize + "'", "h_p_QC_ErrManagerLedgerReport");
+                ds = oCN.RunProcReturn("exec h_p_QC_ErrManagerLedgerReport '" + HBeginDate + "','" + HEndDate + "'," + HDeptID + ",'" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_ErrManagerLedgerReport");
 
                 //娣诲姞鍒楀悕
                 foreach (DataColumn col in ds.Tables[0].Columns)
@@ -1174,14 +1188,11 @@
 
                 string HBeginDate = dic["HBeginDate"].ToString();
                 string HEndDate = dic["HEndDate"].ToString();
-                string HMaterNumber = dic["HMaterNumber"].ToString();
-                string HMaterModel = dic["HMaterModel"].ToString();
-                string HProcessName = dic["HProcessName"].ToString();
-                string HDealingType = dic["HDealingType"].ToString();
-                string HSendManName = dic["HSendManName"].ToString();
-                string HCustomize = dic["HCustomize"].ToString();
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
 
-                ds = oCN.RunProcReturn("exec h_p_QC_BadProductsReport '" + HBeginDate + "','" + HEndDate + "','" + HMaterNumber + "','" + HMaterModel + "','" + HProcessName + "','" + HDealingType + "','" + HSendManName + "','" + HCustomize + "'", "h_p_QC_BadProductsReport");
+                ds = oCN.RunProcReturn("exec h_p_QC_BadProductsReport '" + HBeginDate + "','" + HEndDate + "','" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_BadProductsReport");
 
                 //娣诲姞鍒楀悕
                 foreach (DataColumn col in ds.Tables[0].Columns)
@@ -1217,13 +1228,24 @@
         /// </summary>
         [Route("QC_CustomerAppealReport/QC_ErrManagerLedgerReport_Source")]
         [HttpGet]
-        public object QC_ErrManagerLedgerReport_Source(string HYear, string HMonth, string user)
+        public object QC_ErrManagerLedgerReport_Source(string sWhere, string user)
         {
             try
             {
+
+
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+
+                string HYear = dic["HYear"].ToString();
+                string HMonth = dic["HMonth"].ToString();
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+
                 List<object> columnNameList = new List<object>();
 
-                ds = oCN.RunProcReturn("exec h_p_QC_ErrManagerLedgerReport_Source '" + HYear + "','" + HMonth + "'", "h_p_QC_ErrManagerLedgerReport_Source");
+                ds = oCN.RunProcReturn("exec h_p_QC_ErrManagerLedgerReport_Source '" + HYear + "','" + HMonth + "','" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_ErrManagerLedgerReport_Source");
 
                 //娣诲姞鍒楀悕
                 foreach (DataColumn col in ds.Tables[0].Columns)
@@ -1259,13 +1281,20 @@
         /// </summary>
         [Route("QC_CustomerAppealReport/QC_ErrManagerLedgerReport_Issue")]
         [HttpGet]
-        public object QC_ErrManagerLedgerReport_Issue(string HYear, string HMonth, string user)
+        public object QC_ErrManagerLedgerReport_Issue(string sWhere, string user)
         {
             try
             {
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HYear = dic["HYear"].ToString();
+                string HMonth = dic["HMonth"].ToString();
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
                 List<object> columnNameList = new List<object>();
 
-                ds = oCN.RunProcReturn("exec h_p_QC_ErrManagerLedgerReport_Issue '" + HYear + "','" + HMonth + "'", "h_p_QC_ErrManagerLedgerReport_Issue");
+                ds = oCN.RunProcReturn("exec h_p_QC_ErrManagerLedgerReport_Issue '" + HYear + "','" + HMonth + "','" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_ErrManagerLedgerReport_Issue");
 
                 //娣诲姞鍒楀悕
                 foreach (DataColumn col in ds.Tables[0].Columns)
@@ -1301,13 +1330,21 @@
         /// </summary>
         [Route("QC_CustomerAppealReport/QC_ErrManagerLedgerReport_SourceOfTheProblem")]
         [HttpGet]
-        public object QC_ErrManagerLedgerReport_SourceOfTheProblem(string HYear, string HMonth, string user)
+        public object QC_ErrManagerLedgerReport_SourceOfTheProblem(string sWhere, string user)
         {
             try
             {
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HYear = dic["HYear"].ToString();
+                string HMonth = dic["HMonth"].ToString();
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+
                 List<object> columnNameList = new List<object>();
 
-                ds = oCN.RunProcReturn("exec h_p_QC_ErrManagerLedgerReport_SourceOfTheProblem '" + HYear + "','" + HMonth + "'", "h_p_QC_ErrManagerLedgerReport_SourceOfTheProblem");
+                ds = oCN.RunProcReturn("exec h_p_QC_ErrManagerLedgerReport_SourceOfTheProblem '" + HYear + "','" + HMonth + "','" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_ErrManagerLedgerReport_SourceOfTheProblem");
 
                 //娣诲姞鍒楀悕
                 foreach (DataColumn col in ds.Tables[0].Columns)
@@ -1343,13 +1380,21 @@
         /// </summary>
         [Route("QC_CustomerAppealReport/QC_ErrManagerLedgerReport_EquipTop3Issue")]
         [HttpGet]
-        public object QC_ErrManagerLedgerReport_EquipTop3Issue(string HYear, string HMonth, string user)
+        public object QC_ErrManagerLedgerReport_EquipTop3Issue(string sWhere,  string user)
         {
             try
             {
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HYear = dic["HYear"].ToString();
+                string HMonth = dic["HMonth"].ToString();
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+
                 List<object> columnNameList = new List<object>();
 
-                ds = oCN.RunProcReturn("exec h_p_QC_ErrManagerLedgerReport_EquipTop3Issue '" + HYear + "','" + HMonth + "'", "h_p_QC_ErrManagerLedgerReport_EquipTop3Issue");
+                ds = oCN.RunProcReturn("exec h_p_QC_ErrManagerLedgerReport_EquipTop3Issue '" + HYear + "','" + HMonth + "','" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_ErrManagerLedgerReport_EquipTop3Issue");
 
                 //娣诲姞鍒楀悕
                 foreach (DataColumn col in ds.Tables[0].Columns)
@@ -1387,16 +1432,15 @@
             {
                 List<object> columnNameList = new List<object>();
 
-                if (sWhere == null || sWhere.Equals(""))
-                {
-                    ds = oCN.RunProcReturn("select * from h_v_Sb_EquipMentCollectionTechParam order by 閲囬泦鏃ユ湡 desc", "h_v_Sb_EquipMentCollectionTechParam");
-                }
-                else
-                {
-                    string sql1 = "select * from h_v_Sb_EquipMentCollectionTechParam where 1 = 1 ";
-                    string sql = sql1 + sWhere + " order by 閲囬泦鏃ユ湡 ";
-                    ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipMentCollectionTechParam");
-                }
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HEquipNumber = dic["HEquipNumber"].ToString();//璁惧缂栫爜
+                string HTechParamName = dic["HTechParamName"].ToString();//宸ヨ壓浜ф暟
+                string HDate = dic["HDate"].ToString();//閲囬泦鏃ユ湡
+                string HDate1 = dic["HDate1"].ToString();//閲囬泦鏃ユ湡
+                string HEquipType = dic["HEquipType"].ToString();//鏌ヨ绫诲瀷
+
+                ds = oCN.RunProcReturn("exec h_p_Sb_EquipMentCollectionTechParam '"+ HEquipNumber + "','"+ HTechParamName + "','"+ HDate + "','"+ HDate1 + "','"+ HEquipType + "'", "h_p_Sb_EquipMentCollectionTechParam");
 
                 //娣诲姞鍒楀悕
                 foreach (DataColumn col in ds.Tables[0].Columns)
@@ -1524,11 +1568,20 @@
         /// <returns></returns>
         [Route("QC_QualityReportsController/GetQC_SkillExamMonthSumReport_Json")]
         [HttpGet]
-        public object GetQC_SkillExamMonthSumReport_Json(Int64 HYear, Int64 HDeptID)
+        public object GetQC_SkillExamMonthSumReport_Json(string sWhere)
         {
             try
             {
-                ds = oCN.RunProcReturn("exec h_p_QC_SkillExamMonthSumReport '" + HYear.ToString() + "'," + HDeptID.ToString(), "h_p_QC_SkillExamMonthSumReport");
+
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HYear = dic["HYear"].ToString();//骞�
+                string HDeptID = dic["HDeptID"].ToString();//閮ㄩ棬
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+
+                ds = oCN.RunProcReturn("exec h_p_QC_SkillExamMonthSumReport '" + HYear.ToString() + "'," + HDeptID.ToString()+",'" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_SkillExamMonthSumReport");
                 List<object> columnNameList = new List<object>();
                 //娣诲姞鍒楀悕
                 foreach (DataColumn col in ds.Tables[0].Columns)
@@ -1565,11 +1618,19 @@
         /// <returns></returns>
         [Route("QC_QualityReportsController/GetQC_QualityMonthSumReport_Json")]
         [HttpGet]
-        public object GetQC_QualityMonthSumReport_Json(Int64 HYear, Int64 HDeptID)
+        public object GetQC_QualityMonthSumReport_Json(string sWhere)
         {
             try
             {
-                ds = oCN.RunProcReturn("exec h_p_QC_QualityMonthSumReport '" + HYear.ToString() + "'," + HDeptID.ToString(), "h_p_QC_QualityMonthSumReport");
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HYear = dic["HYear"].ToString();//骞�
+                string HDeptID = dic["HDeptID"].ToString();//閮ㄩ棬
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+
+                ds = oCN.RunProcReturn("exec h_p_QC_QualityMonthSumReport '" + HYear.ToString() + "'," + HDeptID.ToString() + ",'" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_QualityMonthSumReport");
                 List<object> columnNameList = new List<object>();
                 //娣诲姞鍒楀悕
                 foreach (DataColumn col in ds.Tables[0].Columns)
@@ -1606,11 +1667,19 @@
         /// <returns></returns>
         [Route("QC_QualityReportsController/GetQC_PPMReport_Json")]
         [HttpGet]
-        public object GetQC_PPMReport_Json(Int64 HYear, Int64 HDeptID)
+        public object GetQC_PPMReport_Json(string sWhere)
         {
             try
             {
-                ds = oCN.RunProcReturn("exec h_p_QC_PPMReport '" + HYear.ToString() + "'," + HDeptID.ToString(), "h_p_QC_PPMReport");
+                Dictionary<object, object> dic = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<object, object>>(sWhere);
+
+                string HYear = dic["HYear"].ToString();//骞�
+                string HDeptID = dic["HDeptID"].ToString();//閮ㄩ棬
+                string HProject = dic["HProject"].ToString();//椤圭洰鍙�
+                string HBatchWork = dic["HBatchWork"].ToString();//鏄惁閲忎骇
+                string HDivisionName = dic["HDivisionName"].ToString();//浜嬩笟閮�
+
+                ds = oCN.RunProcReturn("exec h_p_QC_PPMReport '" + HYear.ToString() + "'," + HDeptID.ToString() + ",'" + HProject + "','" + HBatchWork + "','" + HDivisionName + "'", "h_p_QC_PPMReport");
                 List<object> columnNameList = new List<object>();
                 //娣诲姞鍒楀悕
                 foreach (DataColumn col in ds.Tables[0].Columns)
diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\275\246\351\227\264\350\207\252\346\243\200\345\215\225/QC_WorkSelfCheckBillController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\275\246\351\227\264\350\207\252\346\243\200\345\215\225/QC_WorkSelfCheckBillController.cs"
index be696a8..8efdb66 100644
--- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\275\246\351\227\264\350\207\252\346\243\200\345\215\225/QC_WorkSelfCheckBillController.cs"
+++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\350\275\246\351\227\264\350\207\252\346\243\200\345\215\225/QC_WorkSelfCheckBillController.cs"
@@ -138,6 +138,7 @@
                 BillNew.omodel.HProcExchEntryID = ClsPub.isLong(mainList[0].HProcExchEntryID);
                 BillNew.omodel.HProcExchBillNo = ClsPub.isStrNull(mainList[0].HProcExchBillNo);
                 BillNew.omodel.HProcExchQty = ClsPub.isLong(mainList[0].HProcExchQty);
+                BillNew.omodel.HProcID = ClsPub.isLong(mainList[0].HProcID);
                 BillNew.omodel.HMaterID = ClsPub.isLong(mainList[0].HMaterID);
                 BillNew.omodel.HFirstCheckEmp = ClsPub.isLong(mainList[0].HFirstCheckEmp);
                 BillNew.omodel.HLastResult = ClsPub.isBool(mainList[0].HLastResult);
@@ -197,7 +198,7 @@
                         oSub.HUpOffSet= DBUtility.ClsPub.isStrNull(subList[i].HUpOffSet);
                         oSub.HDownOffSet= DBUtility.ClsPub.isStrNull(subList[i].HDownOffSet);
                         oSub.HAnalysisMethod = DBUtility.ClsPub.isStrNull(subList[i].HAnalysisMethod);
-                        oSub.HKeyInspect = DBUtility.ClsPub.isLong(subList[i].HKeyInspect);
+                        oSub.HKeyInspect = DBUtility.ClsPub.isBool(subList[i].HKeyInspect);
                         oSub.HInspectInstruMentID = DBUtility.ClsPub.isLong(subList[i].HInspectInstruMentID);
                         oSub.HInspectResult = DBUtility.ClsPub.isStrNull(subList[i].HResult);
                         BillNew.DetailColl.Add(oSub);
diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs"
index 3d60667..b0ba0c8 100644
--- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs"
+++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs"
@@ -252,6 +252,7 @@
                 BillNew.omodel.HProcExchEntryID = ClsPub.isLong(mainList[0].HProcExchEntryID);
                 BillNew.omodel.HProcExchBillNo = ClsPub.isStrNull(mainList[0].HProcExchBillNo);
                 BillNew.omodel.HProcExchQty = ClsPub.isLong(mainList[0].HProcExchQty);
+                BillNew.omodel.HProcID = ClsPub.isLong(mainList[0].HProcID);
                 BillNew.omodel.HMaterID = ClsPub.isLong(mainList[0].HMaterID);
                 BillNew.omodel.HFirstCheckEmp = ClsPub.isLong(mainList[0].HFirstCheckEmp);
                 BillNew.omodel.HLastResult = ClsPub.isBool(mainList[0].HLastResult);
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ConkReasonBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ConkReasonBillController.cs"
index 80e89fe..5874a8d 100644
--- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ConkReasonBillController.cs"
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ConkReasonBillController.cs"
@@ -8,7 +8,10 @@
 using System.Net.Http;
 using System.Web.Http;
 using WebAPI.Models;
-
+using System.Web;
+using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�;
+using System.IO;
+using SyntacticSugar.constant;
 namespace WebAPI.Controllers.鍩虹璧勬枡.鍩虹璧勬枡
 {
     public class Gy_ConkReasonBillController : ApiController
@@ -284,7 +287,6 @@
         #endregion
 
 
-
         #region [鏁呴殰鍘熷洜鍒犻櫎鍔熻兘]
         [Route("Gy_ConkReasonBill/set_DeleteBill")]
         [HttpGet]
@@ -487,5 +489,279 @@
             }
         }
         #endregion
+
+        #region 鏁呴殰鍘熷洜 鏂囦欢瀵煎叆淇濆瓨
+        #region 鏁呴殰鍘熷洜 鏂囦欢涓婁紶
+        [Route("Gy_ConkReason/Gy_ConkReason_Excel")]
+        [HttpPost]
+        public object Gy_ConkReason_Excel()
+        {
+            try
+            {
+                //鑾峰彇鏂囦欢鍚嶇О
+                var file = HttpContext.Current.Request.Files[0];
+                //鑾峰彇鏂囦欢鐗╃悊璺緞
+                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+                //淇濆瓨鏂囦欢
+                file.SaveAs(ExcelPath);
+
+                NpoiHelper np = new NpoiHelper();
+                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+                //鍒犻櫎鏂囦欢
+                File.Delete(ExcelPath);
+
+                //鍒涘缓涓存椂琛�
+                DataTable tb2 = new DataTable("dt2");
+
+                //娣诲姞鍒楀悕
+                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+                {
+                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+                }
+
+                //妯℃澘缂哄皯鍒� 浣嗛渶瑕佷粠鏁版嵁搴撲腑鏌ヨ鍑烘潵鏄剧ず鍦ㄩ〉闈㈢殑瀛楁
+                tb2.Columns.Add("HOrgID", typeof(Int32));//缁勭粐ID
+
+                //娣诲姞鏁版嵁
+                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+                {
+                    DataRow row = tb2.NewRow();
+                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+                    {
+                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+                    }
+                    tb2.Rows.Add(row);
+                }
+
+
+                var error = "";
+
+                //鏌ヨ娌℃湁鐨勫垪
+                if (!tb2.Columns.Contains("缁勭粐浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囦唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("缁勭粐鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囧悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鏁呴殰鍘熷洜"))
+                    error += "娌℃湁鎵惧埌銆愭晠闅滃師鍥犲悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鏁呴殰鍘熷洜浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愭晠闅滃師鍥犱唬鐮併�戠殑鏍囬,";
+                if (!tb2.Columns.Contains("澶囨敞"))
+                    error += "娌℃湁鎵惧埌銆愬娉ㄣ�戠殑鏍囬,";
+                if (!tb2.Columns.Contains("鍔╄鐮�"))
+                    error += "娌℃湁鎵惧埌銆愬姪璁扮爜銆戠殑鏍囬,";
+
+                if (error.Length > 0)
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
+                {
+                    string HProcessName = "";
+                    string HProcessNum = "";
+                    string HORGNumber = "";
+                    string HORGName = "";
+
+
+                    HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鏁呴殰鍘熷洜"].ToString());
+                    HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鏁呴殰鍘熷洜浠g爜"].ToString());
+                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐浠g爜"].ToString());
+                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐鍚嶇О"].ToString());
+
+                    //妫�鏌ョ墿鏂�
+                    int index = i + 1;
+
+                    if (HORGNumber != "")
+                    {
+
+                        //鏌ヨ缁勭粐
+                        ds = oCn.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,缁勭粐涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
+
+                        //鏁呴殰鍘熷洜鍚嶇О
+                        if (HProcessName == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,鏁呴殰鍘熷洜鍚嶇О涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+
+                        //鏁呴殰鍘熷洜浠g爜
+                        if (HProcessNum == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,鏁呴殰鍘熷洜浠g爜涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    else
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "绗�" + index + "琛�,缁勭粐浠g爜涓虹┖";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = error;
+                objJsonResult.data = tb2;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 鏁呴殰鍘熷洜椤圭洰 瀵煎叆(淇濆瓨)
+        [Route("Gy_ConkReason/Gy_ConkReason_btnSave")]
+        [HttpPost]
+        public object Gy_ConkReason_btnSave([FromBody] JObject sMainSub)
+        {
+            var _value = sMainSub["sMainSub"].ToString();
+            string msg1 = _value.ToString();
+            string[] sArray = msg1.Split(new string[] { "&鍜�" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString();
+            string user = sArray[1].ToString();
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_ConkReason_Edit", 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+                foreach (JObject item in Excel)
+                {
+                    Dictionary<string, string> dic = new Dictionary<string, string>();
+                    foreach (var itm in item.Properties())
+                    {
+                        dic.Add(itm.Name, itm.Value.ToString());
+                    }
+                    list.Add(dic);
+                }
+
+                oCn.BeginTran();
+                int i = 1;
+                foreach (Dictionary<string, string> item in list)
+                {
+                    string HOrgID = item["HOrgID"].ToString();//缁勭粐ID
+                    string HName = item["鏁呴殰鍘熷洜"].ToString();
+                    string HNumber = item["鏁呴殰鍘熷洜浠g爜"].ToString();
+                    string HRemark = item["澶囨敞"].ToString();
+                    string HHelpCode = item["鍔╄鐮�"].ToString();
+                    string HUseFlag = "鏈娴�";
+                    string HShortNumber;
+                    HShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//鐭唬鐮�
+                    if (HShortNumber.Trim() == "")
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    int HEndFlag = 1;//鏈骇鏍囧織
+                    int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //绛夌骇
+
+
+                    if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim()))
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+
+                    ds = oCn.RunProcReturn("select * from Gy_ConkReason where HNumber='" + HNumber + "'", "Gy_ConkReason");
+
+                    if (ds.Tables[0].Rows.Count == 0)
+                    {
+                        oCn.RunProc("Insert into Gy_ConkReason " +
+                    " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+                    ",HLevel,HEndFlag,HStopflag,HRemark,HUseFlag,HMakeTime,HMakeEmp,HExplanation,HConkTypeID) " +
+                    " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + 0 +
+                    "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark +
+                    "','" + HUseFlag + "',getdate(),'" + user + "','" + "" + "',0" +
+                    ")", ref DBUtility.ClsPub.sExeReturnInfo);
+                       
+                       
+                    }
+                    else
+                    {
+                        oCn.RunProc("UpDate Gy_ConkReason set  " +
+                    //鍥哄畾璧嬪��===============
+                    "HName='" + HName + "'" +
+                    ",HShortNumber='" + HShortNumber + "'" +
+                    ",HHelpCode='" + HHelpCode + "'" +
+                    ",HRemark='" + HRemark + "'" +
+                    ",HModifyTime=getdate()" +
+                    ",HModifyEmp='" + user + "'" +
+                    " where HNumber='" + HNumber + "'");
+                    }
+
+                    i++;
+                }
+
+                oCn.Commit();
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = "瀵煎叆鎴愬姛!";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                LogService.Write(e);
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+        #endregion
     }
 }
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DisposeWayController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DisposeWayController.cs"
index 91006da..b8aa3fb 100644
--- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DisposeWayController.cs"
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_DisposeWayController.cs"
@@ -10,7 +10,10 @@
 using System.Web.Http;
 using System.Windows.Forms;
 using WebAPI.Models;
-
+using System.Web;
+using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�;
+using System.IO;
+using SyntacticSugar.constant;
 namespace WebAPI.Controllers
 {
     public class Gy_DisposeWayController : ApiController
@@ -432,5 +435,279 @@
         }
         #endregion
 
+
+        #region 澶勭悊鏂规 鏂囦欢瀵煎叆淇濆瓨
+        #region 澶勭悊鏂规 鏂囦欢涓婁紶
+        [Route("Gy_DisposeWay/Gy_DisposeWay_Excel")]
+        [HttpPost]
+        public object Gy_DisposeWay_Excel()
+        {
+            try
+            {
+                //鑾峰彇鏂囦欢鍚嶇О
+                var file = HttpContext.Current.Request.Files[0];
+                //鑾峰彇鏂囦欢鐗╃悊璺緞
+                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+                //淇濆瓨鏂囦欢
+                file.SaveAs(ExcelPath);
+
+                NpoiHelper np = new NpoiHelper();
+                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+                //鍒犻櫎鏂囦欢
+                File.Delete(ExcelPath);
+
+                //鍒涘缓涓存椂琛�
+                DataTable tb2 = new DataTable("dt2");
+
+                //娣诲姞鍒楀悕
+                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+                {
+                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+                }
+
+                //妯℃澘缂哄皯鍒� 浣嗛渶瑕佷粠鏁版嵁搴撲腑鏌ヨ鍑烘潵鏄剧ず鍦ㄩ〉闈㈢殑瀛楁
+                tb2.Columns.Add("HOrgID", typeof(Int32));//缁勭粐ID
+
+                //娣诲姞鏁版嵁
+                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+                {
+                    DataRow row = tb2.NewRow();
+                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+                    {
+                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+                    }
+                    tb2.Rows.Add(row);
+                }
+
+
+                var error = "";
+
+                //鏌ヨ娌℃湁鐨勫垪
+                if (!tb2.Columns.Contains("缁勭粐浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囦唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("缁勭粐鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囧悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("澶勭悊鏂规"))
+                    error += "娌℃湁鎵惧埌銆愬鐞嗘柟妗堝悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("澶勭悊鏂规浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愬鐞嗘柟妗堜唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("澶囨敞"))
+                    error += "娌℃湁鎵惧埌銆愬娉ㄣ�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍔╄鐮�"))
+                    error += "娌℃湁鎵惧埌銆愬姪璁扮爜銆戠殑鏍囬,";
+
+                if (error.Length > 0)
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
+                {
+                    string HProcessName = "";
+                    string HProcessNum = "";
+                    string HORGNumber = "";
+                    string HORGName = "";
+
+
+                    HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["澶勭悊鏂规"].ToString());
+                    HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["澶勭悊鏂规浠g爜"].ToString());
+                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐浠g爜"].ToString());
+                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐鍚嶇О"].ToString());
+
+                    //妫�鏌ョ墿鏂�
+                    int index = i + 1;
+
+                    if (HORGNumber != "")
+                    {
+
+                        //鏌ヨ缁勭粐
+                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,缁勭粐涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
+
+                        //澶勭悊鏂规鍚嶇О
+                        if (HProcessName == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,澶勭悊鏂规鍚嶇О涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+
+                        //澶勭悊鏂规浠g爜
+                        if (HProcessNum == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,澶勭悊鏂规浠g爜涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    else
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "绗�" + index + "琛�,缁勭粐浠g爜涓虹┖";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = error;
+                objJsonResult.data = tb2;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 澶勭悊鏂规椤圭洰 瀵煎叆(淇濆瓨)
+        [Route("Gy_DisposeWay/Gy_DisposeWay_btnSave")]
+        [HttpPost]
+        public object Gy_DisposeWay_btnSave([FromBody] JObject sMainSub)
+        {
+            var _value = sMainSub["sMainSub"].ToString();
+            string msg1 = _value.ToString();
+            string[] sArray = msg1.Split(new string[] { "&鍜�" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString();
+            string user = sArray[1].ToString();
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_DisposeWay_Edit", 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+                foreach (JObject item in Excel)
+                {
+                    Dictionary<string, string> dic = new Dictionary<string, string>();
+                    foreach (var itm in item.Properties())
+                    {
+                        dic.Add(itm.Name, itm.Value.ToString());
+                    }
+                    list.Add(dic);
+                }
+
+                oCN.BeginTran();
+                int i = 1;
+                foreach (Dictionary<string, string> item in list)
+                {
+                    string HOrgID = item["HOrgID"].ToString();//缁勭粐ID
+                    string HName = item["澶勭悊鏂规"].ToString();
+                    string HNumber = item["澶勭悊鏂规浠g爜"].ToString();
+                    string HRemark = item["澶囨敞"].ToString();
+                    string HHelpCode = item["鍔╄鐮�"].ToString();
+                    string HUseFlag = "鏈娴�";
+                    string HShortNumber;
+                    HShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//鐭唬鐮�
+                    if (HShortNumber.Trim() == "")
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    int HEndFlag = 1;//鏈骇鏍囧織
+                    int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //绛夌骇
+
+
+                    if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim()))
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+
+                    ds = oCN.RunProcReturn("select * from Gy_DisposeWay where HNumber='" + HNumber + "'", "Gy_DisposeWay");
+
+                    if (ds.Tables[0].Rows.Count == 0)
+                    {
+                        oCN.RunProc("Insert into " + "Gy_DisposeWay" +
+                        " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+                        ",HLevel,HEndFlag,HStopflag,HRemark,HUseFlag,HUSEORGID,HCREATEORGID,HMakeEmp,HMakeTime) " +
+                        " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + 0 +
+                        "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "','" + HUseFlag + "'," + HOrgID + "," + HOrgID + ",'" + user + "',GETDATE()" + ")");
+
+
+                    }
+                    else
+                    {
+                        oCN.RunProc("Update " + "Gy_DisposeWay" + " set " +
+                        "HName='" + HName + "'" +
+                        ",HShortNumber='" + HShortNumber + "'" +
+                        ",HHelpCode='" + HHelpCode + "'" +
+                        ",HLevel=" + HLevel +
+                        ",HModifyEmp='" + user + "'" +
+                        ",HModifyTime=GETDATE()" +
+                        ",HRemark= '" + HRemark + "' Where HNumber='" + HNumber + "'");
+                    }
+
+                    i++;
+                }
+
+                oCN.Commit();
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = "瀵煎叆鎴愬姛!";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                LogService.Write(e);
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+        #endregion
+
     }
 }
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaterTypeBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaterTypeBillController.cs"
index eedb205..498d545 100644
--- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaterTypeBillController.cs"
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MaterTypeBillController.cs"
@@ -7,7 +7,10 @@
 using System.Web;
 using System.Web.Http;
 using WebAPI.Models;
-
+using System.Web;
+using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�;
+using System.IO;
+using SyntacticSugar.constant;
 namespace WebAPI.Controllers.鍩虹璧勬枡.鍩虹璧勬枡
 {
     public class Gy_MaterTypeBillController : ApiController
@@ -199,6 +202,327 @@
                 return objJsonResult;
             }
         }
+        #endregion
+
+        #region 鐗╂枡鍒嗙被 鏂囦欢瀵煎叆淇濆瓨
+        #region 鐗╂枡鍒嗙被 鏂囦欢涓婁紶
+        [Route("Gy_MaterType/Gy_MaterType_Excel")]
+        [HttpPost]
+        public object Gy_MaterType_Excel()
+        {
+            try
+            {
+                //鑾峰彇鏂囦欢鍚嶇О
+                var file = HttpContext.Current.Request.Files[0];
+                //鑾峰彇鏂囦欢鐗╃悊璺緞
+                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+                //淇濆瓨鏂囦欢
+                file.SaveAs(ExcelPath);
+
+                NpoiHelper np = new NpoiHelper();
+                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+                //鍒犻櫎鏂囦欢
+                File.Delete(ExcelPath);
+
+                //鍒涘缓涓存椂琛�
+                DataTable tb2 = new DataTable("dt2");
+
+                //娣诲姞鍒楀悕
+                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+                {
+                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+                }
+
+                //妯℃澘缂哄皯鍒� 浣嗛渶瑕佷粠鏁版嵁搴撲腑鏌ヨ鍑烘潵鏄剧ず鍦ㄩ〉闈㈢殑瀛楁
+                tb2.Columns.Add("HOrgID", typeof(Int32));//缁勭粐ID
+                tb2.Columns.Add("HParentID", typeof(Int32));//鐖剁被ID
+
+                //娣诲姞鏁版嵁
+                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+                {
+                    DataRow row = tb2.NewRow();
+                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+                    {
+                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+                    }
+                    tb2.Rows.Add(row);
+                }
+
+
+                var error = "";
+
+                //鏌ヨ娌℃湁鐨勫垪
+                if (!tb2.Columns.Contains("缁勭粐浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囦唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("缁勭粐鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囧悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鐗╂枡鍒嗙被"))
+                    error += "娌℃湁鎵惧埌銆愮墿鏂欏垎绫诲悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鐗╂枡鍒嗙被浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愮墿鏂欏垎绫讳唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鐖剁被鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愮埗绫诲悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鐖剁被浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愮埗绫讳唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("澶囨敞"))
+                    error += "娌℃湁鎵惧埌銆愬娉ㄣ�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍔╄鐮�"))
+                    error += "娌℃湁鎵惧埌銆愬姪璁扮爜銆戠殑鏍囬,";
+
+                if (error.Length > 0)
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
+                {
+                    string HMaterTypeName = "";
+                    string HMaterTypeNum = "";
+                    string HORGNumber = "";
+                    string HORGName = "";
+                    string HParentNumber = "";
+                    string HParentName = "";
+
+                    HMaterTypeName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鐗╂枡鍒嗙被"].ToString());
+                    HMaterTypeNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鐗╂枡鍒嗙被浠g爜"].ToString());
+                    HParentName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鐖剁被鍚嶇О"].ToString());
+                    HParentNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["鐖剁被浠g爜"].ToString());
+                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐浠g爜"].ToString());
+                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐鍚嶇О"].ToString());
+
+                    //妫�鏌ョ墿鏂�
+                    int index = i + 1;
+
+                    if (HORGNumber != "")
+                    {
+
+                        //鏌ヨ缁勭粐
+                        ds = oCN.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,缁勭粐涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
+
+                        if(HParentNumber!="" && HParentName != "")
+                        {
+                            //鏌ヨ鐖剁被id
+                            ds = oCN.RunProcReturn("select * from Gy_MaterType where  HNumber='" + HParentNumber + "' and Hname='" + HParentName + "'", "Gy_MaterType");
+
+                            if (ds.Tables[0].Rows.Count == 0)
+                            {
+                                objJsonResult.code = CodeConstant.FAIL;
+                                objJsonResult.count = CountConstant.FAIL;
+                                objJsonResult.Message = "绗�" + index + "琛�,鐖剁被涓嶅瓨鍦紒";
+                                objJsonResult.data = null;
+                                return objJsonResult;
+                            }
+                            else
+                            {
+                                tb2.Rows[i]["HParentID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                            }
+                            string HParentID = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        else {
+                            tb2.Rows[i]["HParentID"] = "0";
+                        }
+                        
+
+                        //鐗╂枡鍒嗙被鍚嶇О
+                        if (HMaterTypeName == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,鐗╂枡鍒嗙被鍚嶇О涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+
+                        //鐗╂枡鍒嗙被鍚嶇О
+                        if (HMaterTypeNum == HParentNumber)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,鐗╂枡绫诲瀷鐖剁被涓嶈兘鏄嚜宸憋紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+
+                        //鐗╂枡鍒嗙被浠g爜
+                        if (HMaterTypeNum == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,鐗╂枡鍒嗙被浠g爜涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    else
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "绗�" + index + "琛�,缁勭粐浠g爜涓虹┖";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = error;
+                objJsonResult.data = tb2;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 鐗╂枡鍒嗙被椤圭洰 瀵煎叆(淇濆瓨)
+        [Route("Gy_MaterType/Gy_MaterType_btnSave")]
+        [HttpPost]
+        public object Gy_MaterType_btnSave([FromBody] JObject sMainSub)
+        {
+            var _value = sMainSub["sMainSub"].ToString();
+            string msg1 = _value.ToString();
+            string[] sArray = msg1.Split(new string[] { "&鍜�" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString();
+            string user = sArray[1].ToString();
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_ErrType_Edit", 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+                foreach (JObject item in Excel)
+                {
+                    Dictionary<string, string> dic = new Dictionary<string, string>();
+                    foreach (var itm in item.Properties())
+                    {
+                        dic.Add(itm.Name, itm.Value.ToString());
+                    }
+                    list.Add(dic);
+                }
+
+                oCN.BeginTran();
+                int i = 1;
+                foreach (Dictionary<string, string> item in list)
+                {
+                    string HOrgID = item["HOrgID"].ToString();//缁勭粐ID
+                    string HName = item["鐗╂枡鍒嗙被"].ToString();
+                    string HNumber = item["鐗╂枡鍒嗙被浠g爜"].ToString();
+                    string HRemark = item["澶囨敞"].ToString();
+                    string HHelpCode = item["鍔╄鐮�"].ToString();
+                    string HParentID = item["HParentID"].ToString();
+                    string sShortNumber;
+                    sShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//鐭唬鐮�
+                    if (sShortNumber.Trim() == "")
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    int HEndFlag = 1;//鏈骇鏍囧織
+                    int HLevel = 1; //绛夌骇
+                    DataSet ds2 = oCN.RunProcReturn("select HLevel from  Gy_MaterType where HItemID =" + HParentID, "Gy_MaterType");//鎼滅储鐖剁被绛夌骇
+                    //oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber); //绛夌骇
+                    if (ds2.Tables[0].Rows.Count > 0)
+                    {
+                        HLevel = (int)ds2.Tables[0].Rows[0]["HLevel"] + 1;
+                    }
+                    else
+                    {
+                        HLevel = 1;
+                    }
+
+                    if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim()))
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    
+                    ds = oCN.RunProcReturn("select * from Gy_MaterType where HNumber='" + HNumber + "'", "Gy_MaterType");
+
+                    if (ds.Tables[0].Rows.Count == 0)
+                    {
+                            oCN.RunProc("Insert into "  + "Gy_MaterType" +
+                        " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+                        ",HLevel,HEndFlag,HStopflag,HRemark,HMakeEmp,HMakeTime,HStopEmp,HStopTime,HUSEORGID,HCREATEORGID,HUseFlag) " +
+                        " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + sShortNumber + "'," + HParentID.ToString() +
+                        "," + HLevel + "," + HEndFlag + "," +  0 + ",'" + HRemark + "','" + user + "',getdate(),'" + "" + "','" +  "" + "'," + HOrgID + "," + HOrgID + ",'" + "鏈娴�" + "')");
+                        //淇敼涓婄骇涓洪潪鏈骇浠g爜
+                        oCN.RunProc("Update Gy_MaterType" + " set HEndflag=0 where HItemID=" + HParentID);
+                    }
+                    else
+                    {
+                        oCN.RunProc("update  Gy_MaterType set HUSEORGID=" + HOrgID + ",HParentID = " + HParentID + ",HHelpCode = '" + HHelpCode + "',HRemark='" + HRemark + "'  where HNumber='" + HNumber + "'");
+                        //淇敼涓婄骇涓洪潪鏈骇浠g爜
+                        oCN.RunProc("Update Gy_MaterType" + " set HEndflag=0 where HItemID=" + HParentID);
+                    }
+
+                    i++;
+                }
+
+                oCN.Commit();
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = "瀵煎叆鎴愬姛!";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                LogService.Write(e);
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
         #endregion
 
 
@@ -544,11 +868,11 @@
 
         [Route("Gy_MaterType/Gy_MaterTypeTreeListByLevel")]
         [HttpGet]
-        public object Gy_MaterTypeTreeListByLevel()
+        public object Gy_MaterTypeTreeListByLevel(string HOrgID)
         {
             try
             {
-                string sql1 = string.Format("select hitemid,hnumber,hname,hparentid,hlevel from Gy_MaterType order by hnumber");
+                string sql1 = string.Format("select hitemid,hnumber,hname,hparentid,hlevel from Gy_MaterType where HUSEORGID = '" + HOrgID + "' order by hnumber");
 
                 ds = oCN.RunProcReturn(sql1, "Gy_MaterType");
 
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ProcMulController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ProcMulController.cs"
new file mode 100644
index 0000000..5e92cd5
--- /dev/null
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ProcMulController.cs"
@@ -0,0 +1,537 @@
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using WebAPI.Models;
+using SyntacticSugar.constant;
+namespace WebAPI.Controllers.鍩虹璧勬枡.鍩虹璧勬枡
+{
+    public class Gy_ProcMulController : ApiController
+    {
+        private json objJsonResult = new json();
+        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        DataSet ds;
+
+        #region  宸ユ  鏌ヨ
+        [Route("Gy_ProcMul/Gy_ProcMulList")]
+        [HttpGet]
+        public object Gy_ProcMulList(string sWhere, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //鏌ョ湅鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Gy_ProcMul_Query", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                string sql1 = "select * from  h_v_Gy_ProcMulList where 1 = 1";
+                string sql = sql1 + sWhere + " order by 宸ユ浠g爜 ";
+                ds = oCN.RunProcReturn(sql, "h_v_Gy_ProcMulList");
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region  宸ユ 瀹℃牳锛屽弽瀹℃牳
+        [Route("Gy_ProcMul/AuditGy_ProcMul")]
+        [HttpGet]
+        public object AuditGy_ProcMul(int HInterID, int IsAudit, string CurUserName)
+        {
+            try
+            {
+                //瀹℃牳鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Gy_ProcMul_Check", 1, false, CurUserName))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "瀹℃牳澶辫触锛佹棤鏉冮檺锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                var ds = oCN.RunProcReturn("select * from Gy_ProcMul where HItemID=" + HInterID, "Gy_ProcMul");
+                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_ProcMul 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_ProcMul 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;
+            }
+        }
+        #endregion
+
+        #region  宸ユ  绂佺敤锛屽弽绂佺敤
+        [Route("Gy_ProcMul/StopGy_ProcMul")]
+        [HttpGet]
+        public object StopGy_ProcMul(int HInterID, int IsStop, string CurUserName)
+        {
+            try
+            {
+                //瀹℃牳鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log_second("Gy_ProcMul_Close", 1, false, CurUserName))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "绂佺敤澶辫触锛佹棤鏉冮檺锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                var ds = oCN.RunProcReturn("select * from Gy_ProcMul where HItemID=" + HInterID, "Gy_ProcMul");
+                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_ProcMul 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_ProcMul 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
+
+        #region  宸ユ 淇濆瓨
+        [Route("Gy_ProcMul/SaveGy_ProcMulList")]
+        [HttpPost]
+        public object SaveGy_ProcMulList([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_ProcMul_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_ProcMul ", "Gy_ProcMul");
+            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_ProcMul_Ctl oBill = new WebAPI.DLL.ClsGy_ProcMul_Ctl();
+                List<Model.ClsGy_ProcMul_Model> lsmain = new List<Model.ClsGy_ProcMul_Model>();
+                msg1 = msg1.Replace("\\", "");
+                msg1 = msg1.Replace("\n", "");  //\n
+                string jsonString = "[" + msg1.ToString() + "]";
+                List<Model.ClsGy_ProcMul_Model> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsGy_ProcMul_Model>>(jsonString);
+                lsmain = list;
+                foreach (Model.ClsGy_ProcMul_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_ProcMul where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_ProcMul");
+                    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;
+            }
+        }
+        #endregion
+
+        #region  宸ユ 鍒犻櫎
+        [Route("Gy_ProcMul/DeltetGy_ProcMul")]
+        [HttpGet]
+        public object DeltetGy_ProcMul(string HItemID, string user)
+        {
+            DataSet ds;
+            //string ModRightNameCheck = "Sc_ProcessReport_check";
+            try
+            {
+                //鍒犻櫎鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Gy_ProcMul_Delete", 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_ProcMul where HItemID=" + HItemID, "Gy_ProcMul");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒";
+                    objJsonResult.data = null;
+                    return objJsonResult; ;
+                }
+
+
+                oCN.RunProc("delete Gy_ProcMul 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
+
+        #region 宸ユ 缂栬緫鑾峰彇缁嗚妭
+        [Route("Gy_ProcMul/GetGy_ProcMulDetail")]
+        [HttpGet]
+        public object GetGy_ProcMulDetail(string HID)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                string sql1 = "select * from  h_v_Gy_ProcMulList where  HItemID= " + HID + " ";
+                ds = oCN.RunProcReturn(sql1, "h_v_Gy_ProcMulList");
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                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
+
+    }
+}
\ No newline at end of file
diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockPlace_Controller.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockPlace_Controller.cs"
index 2ea6909..8c37a9f 100644
--- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockPlace_Controller.cs"
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockPlace_Controller.cs"
@@ -37,7 +37,7 @@
             {
                 List<object> columnNameList = new List<object>();
           
-                string sql1 = string.Format(@"select * from h_v_IF_StockPlaceList_ where 浣跨敤缁勭粐='" + Organization + "'");
+                string sql1 = string.Format(@"select top 1000 * from h_v_IF_StockPlaceList_ where 浣跨敤缁勭粐='" + Organization + "'");
                 if (sWhere == null || sWhere.Equals(""))
                 {
                     ds = oCN.RunProcReturn(sql1 + sWhere + " order by HMainID", "h_v_IF_StockPlaceList_");
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 ff98ed7..58ccd2c 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"
@@ -9,7 +9,10 @@
 using System.Net.Http;
 using System.Web.Http;
 using WebAPI.Models;
-
+using System.Web;
+using WebAPI.Controllers.SCGL.鏃ヨ鍒掔鐞�;
+using System.IO;
+using SyntacticSugar.constant;
 namespace WebAPI.Controllers
 {
     public class Gy_WorkTypeController : ApiController
@@ -556,5 +559,295 @@
 
         #endregion
 
+        #region 宸ョ 鏂囦欢瀵煎叆淇濆瓨
+        #region 宸ョ 鏂囦欢涓婁紶
+        [Route("Gy_WorkTypeController/Gy_WorkTypeController_Excel")]
+        [HttpPost]
+        public object Gy_WorkTypeController_Excel()
+        {
+            try
+            {
+                //鑾峰彇鏂囦欢鍚嶇О
+                var file = HttpContext.Current.Request.Files[0];
+                //鑾峰彇鏂囦欢鐗╃悊璺緞
+                string ExcelPath = HttpContext.Current.Server.MapPath("~/" + file.FileName);
+                //淇濆瓨鏂囦欢
+                file.SaveAs(ExcelPath);
+
+                NpoiHelper np = new NpoiHelper();
+                DataSet ExcelDs = np.ReadExcel(ExcelPath, 1, 1, "0");
+
+                //鍒犻櫎鏂囦欢
+                File.Delete(ExcelPath);
+
+                //鍒涘缓涓存椂琛�
+                DataTable tb2 = new DataTable("dt2");
+
+                //娣诲姞鍒楀悕
+                for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+                {
+                    tb2.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+                }
+
+                //妯℃澘缂哄皯鍒� 浣嗛渶瑕佷粠鏁版嵁搴撲腑鏌ヨ鍑烘潵鏄剧ず鍦ㄩ〉闈㈢殑瀛楁
+                tb2.Columns.Add("HOrgID", typeof(Int32));//缁勭粐ID
+
+                //娣诲姞鏁版嵁
+                for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+                {
+                    DataRow row = tb2.NewRow();
+                    for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+                    {
+                        row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+                    }
+                    tb2.Rows.Add(row);
+                }
+
+
+                var error = "";
+
+                //鏌ヨ娌℃湁鐨勫垪
+                if (!tb2.Columns.Contains("缁勭粐浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囦唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("缁勭粐鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愮粍缁囧悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("宸ョ鍚嶇О"))
+                    error += "娌℃湁鎵惧埌銆愬伐绉嶅悕绉般�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("宸ョ浠g爜"))
+                    error += "娌℃湁鎵惧埌銆愬伐绉嶄唬鐮併�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鏃ュ伐璧�"))
+                    error += "娌℃湁鎵惧埌銆愭棩宸ヨ祫銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("灏忔椂宸ヨ祫"))
+                    error += "娌℃湁鎵惧埌銆愬皬鏃跺伐璧勩�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鑰冭檻浜烘暟"))
+                    error += "娌℃湁鎵惧埌銆愯�冭檻浜烘暟銆戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("澶囨敞"))
+                    error += "娌℃湁鎵惧埌銆愬娉ㄣ�戠殑鏍囬,";
+
+                if (!tb2.Columns.Contains("鍔╄鐮�"))
+                    error += "娌℃湁鎵惧埌銆愬姪璁扮爜銆戠殑鏍囬,";
+
+                if (error.Length > 0)
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = $"Excel妯℃澘瀛樺湪閿欒,{error}\r\n";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                for (int i = 0; i <= tb2.Rows.Count - 1; i++)
+                {
+                    string HProcessName = "";
+                    string HProcessNum = "";
+                    string HORGNumber = "";
+                    string HORGName = "";
+
+
+                    HProcessName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["宸ョ鍚嶇О"].ToString());
+                    HProcessNum = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["宸ョ浠g爜"].ToString());
+                    HORGNumber = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐浠g爜"].ToString());
+                    HORGName = DBUtility.ClsPub.isStrNull(tb2.Rows[i]["缁勭粐鍚嶇О"].ToString());
+
+                    //妫�鏌ョ墿鏂�
+                    int index = i + 1;
+
+                    if (HORGNumber != "")
+                    {
+
+                        //鏌ヨ缁勭粐
+                        ds = oCn.RunProcReturn("select * from Xt_ORGANIZATIONS where  HNumber='" + HORGNumber + "' and Hname='" + HORGName + "'", "Xt_ORGANIZATIONS");
+
+                        if (ds.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,缁勭粐涓嶅瓨鍦紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                        else
+                        {
+                            tb2.Rows[i]["HOrgID"] = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                        }
+                        string HORGid = ds.Tables[0].Rows[0]["HItemID"].ToString();
+
+                        //宸ョ鍚嶇О
+                        if (HProcessName == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,宸ョ鍚嶇О涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+
+                        //宸ョ浠g爜
+                        if (HProcessNum == "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "绗�" + index + "琛�,宸ョ浠g爜涓嶈兘涓虹┖锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    else
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "绗�" + index + "琛�,缁勭粐浠g爜涓虹┖";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = error;
+                objJsonResult.data = tb2;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 宸ョ椤圭洰 瀵煎叆(淇濆瓨)
+        [Route("Gy_WorkTypeController/Gy_WorkTypeController_btnSave")]
+        [HttpPost]
+        public object Gy_WorkTypeController_btnSave([FromBody] JObject sMainSub)
+        {
+            var _value = sMainSub["sMainSub"].ToString();
+            string msg1 = _value.ToString();
+            string[] sArray = msg1.Split(new string[] { "&鍜�" }, StringSplitOptions.RemoveEmptyEntries);
+            string msg2 = sArray[0].ToString();
+            string user = sArray[1].ToString();
+            try
+            {
+                if (!DBUtility.ClsPub.Security_Log("Gy_ErrType_Edit", 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犱繚瀛樻潈闄愶紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                List<object> Excel = Newtonsoft.Json.JsonConvert.DeserializeObject<List<object>>(msg2);
+                List<Dictionary<string, string>> list = new List<Dictionary<string, string>>();
+
+                foreach (JObject item in Excel)
+                {
+                    Dictionary<string, string> dic = new Dictionary<string, string>();
+                    foreach (var itm in item.Properties())
+                    {
+                        dic.Add(itm.Name, itm.Value.ToString());
+                    }
+                    list.Add(dic);
+                }
+
+                oCn.BeginTran();
+                int i = 1;
+                foreach (Dictionary<string, string> item in list)
+                {
+                    string HOrgID = item["HOrgID"].ToString();//缁勭粐ID
+                    string HName = item["宸ョ鍚嶇О"].ToString();
+                    string HNumber = item["宸ョ浠g爜"].ToString();
+                    string HRemark = item["澶囨敞"].ToString();
+                    string HHelpCode = item["鍔╄鐮�"].ToString();
+                    string HPayMoney = item["灏忔椂宸ヨ祫"].ToString();
+                    string HDayMoney = item["鏃ュ伐璧�"].ToString();
+                    string HForEmp = item["鑰冭檻浜烘暟"].ToString();
+                    string sShortNumber;
+                    sShortNumber = DBUtility.ClsPub.GetShortNumber(HNumber);//鐭唬鐮�
+                    if (sShortNumber.Trim() == "")
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佺煭浠g爜涓虹┖锛�";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+                    int HEndFlag = 1;//鏈骇鏍囧織
+                    int HLevel = DBUtility.ClsPub.GetLevel(HNumber); //绛夌骇
+
+
+                    if (!DBUtility.ClsPub.AllowNumber(HNumber.Trim()))
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "淇濆瓨澶辫触锛佷唬鐮佷腑涓嶈兘鍑虹幇杩炵画鈥�.鈥欏苟涓旈浣嶆湯浣嶄笉鑳戒负鈥�.鈥欙紒";
+                        objJsonResult.data = 1;
+                        return objJsonResult;
+                    }
+
+                    ds = oCn.RunProcReturn("select * from Gy_WorkType where HNumber='" + HNumber + "'", "Gy_WorkTypeController");
+
+                    if (ds.Tables[0].Rows.Count == 0)
+                    {
+                        oCn.RunProc("Insert into " + "Gy_WorkType" +
+                        " (HNumber,HName,HHelpCode,HShortNumber,HParentID" +
+                        ",HLevel,HEndFlag,HStopflag,HRemark" +
+                        ",HMakeEmp,HMakeTime,HUSEORGID,HCREATEORGID" +
+                        ",HPayMoney,HDayMoney,HForEmp) " +
+                        " Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + sShortNumber + "'," + 0 +
+                        "," + HLevel + "," + HEndFlag + "," + 0 + ",'" + HRemark + "'" +
+                        ",'" + user + "',getdate()" + "," + HOrgID + "," + HOrgID +
+                        "," + HPayMoney + "," + HDayMoney + ",'" + HForEmp + "'" +
+                        ")");
+                    }
+                    else
+                    {
+                        oCn.RunProc("Update " + "Gy_WorkType " + " set " +
+                        "HName='" + HName + "'" +
+                        ",HShortNumber='" + sShortNumber + "'" +
+                        ",HRemark= '" + HRemark + "'" +
+                        ",HModifyEmp= '" + user + "'" +
+                        ",HModifyTime=getdate()" +
+                        ",HUSEORGID=" + HOrgID +
+                        ",HPayMoney=" + HPayMoney +
+                        ",HDayMoney=" + HDayMoney +
+                        ",HForEmp='" + HForEmp + "'" +
+                        " where HNumber='" + HNumber + "'");
+                    }
+
+                    i++;
+                }
+
+                oCn.Commit();
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = "瀵煎叆鎴愬姛!";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                LogService.Write(e);
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+        #endregion
+
     }
 }
diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_ProcPriceRequestBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_ProcPriceRequestBillController.cs"
index 010cf89..2928630 100644
--- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_ProcPriceRequestBillController.cs"
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_ProcPriceRequestBillController.cs"
@@ -9,7 +9,7 @@
 using System.Web.Http;
 using WebAPI.Models;
 using System.Windows.Forms;
-
+using SyntacticSugar.constant;
 namespace WebAPI.Controllers
 {
     //鐝粍Controller
@@ -1014,5 +1014,629 @@
             }
         }
         #endregion
+
+
+        #region 瀹氶鐢宠鍗曢渶瑕佹垜瀹℃壒娴佸鎵圭殑
+        [Route("Pay_ProcPriceRequestBill/NeedChecklist")]
+        [HttpGet]
+        public object NeedChecklist(string user, string userid)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+
+                if (!DBUtility.ClsPub.Security_Log(ModRightNameList, 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犳潈闄愭煡鐪�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                //鎼滅储闇�瑕佸鏍哥殑
+                string sql = "  select a.*,c.HItemID as HCheckFlowStatusID,m.HName as 瀹℃壒娴�,c.HCheckFlowID,i.HName as 瀹℃壒椤圭洰鍚嶇О,c.HCheckItemID,c.HChecker as 椤圭洰瀹℃牳浜�,c.HCheckNote as 瀹℃壒娴佸鏍稿缓璁�,c.HCheckDate 瀹℃壒娴佸鏍告棩鏈�   from h_v_Pay_ProcPriceRequestBillList AS a LEFT JOIN Xt_BillCheckFlowStatus AS c ON a.hmainid = c.HBillInterID and a.HBillType = c.HBillTypeID" +
+                    " LEFT JOIN Xt_CheckFlowMain as m ON m.HInterID = c.HCheckFlowID" +
+                    " LEFT JOIN Pay_ProcPriceRequestBillMain as po ON a.hmainid = po.HInterID" +
+                    " LEFT JOIN Xt_CheckItem as i ON i.HItemID = c.HCheckItemID" +
+                    " LEFT JOIN Xt_CheckUserRight as cr ON cr.HCheckItemID = i.HItemID and cr.HCheckFlowInterID = m.HInterID" +
+                    " where po.HBillStatus = 6 and po.HCheckItemNowID = i.HItemID  and cr.HUserID = '" + userid + "'";
+                ds = oCn.RunProcReturn(sql, "h_v_Pay_ProcPriceRequestBillList");
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #region 瀹氶鐢宠鍗曞凡缁忓鎵规祦瀹℃壒鐨�
+        [Route("Pay_ProcPriceRequestBill/Checkedlist")]
+        [HttpGet]
+        public object Checkedlist(string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+
+                if (!DBUtility.ClsPub.Security_Log(ModRightNameList, 1, false, user))
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鏃犳潈闄愭煡鐪�!";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                //鎼滅储闇�瑕佸鏍哥殑
+                string sql = "  select DISTINCT a.*,c.HItemID as HCheckFlowStatusID,m.HName as 瀹℃壒娴�,c.HCheckFlowID,i.HName as 瀹℃壒椤圭洰鍚嶇О,c.HCheckItemID,c.HChecker as 椤圭洰瀹℃牳浜�,c.HCheckNote as 瀹℃壒娴佸鏍稿缓璁�,c.HCheckDate 瀹℃壒娴佸鏍告棩鏈�   from h_v_Pay_ProcPriceRequestBillList AS a LEFT JOIN Xt_BillCheckFlowStatus AS c ON a.hmainid = c.HBillInterID and a.HBillType = c.HBillTypeID" +
+                    " LEFT JOIN Xt_CheckFlowMain as m ON m.HInterID = c.HCheckFlowID" +
+                    " LEFT JOIN Xt_CheckItem as i ON i.HItemID = c.HCheckItemID" +
+                    " where c.HCheckDate is  not NUll and c.HChecker = '" + user + "'";
+                ds = oCn.RunProcReturn(sql, "h_v_Pay_ProcPriceRequestBillList");
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                objJsonResult.code = CodeConstant.SUCCEED;
+                objJsonResult.count = CountConstant.SUCCEED;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        #endregion
+
+        #region 瀹氶鐢宠鍗曢┏鍥�
+        [Route("Pay_ProcPriceRequestBill/RejectCheckFlow")]
+        [HttpGet]
+        public object RejectCheckFlow(string HInterID, string CurUserID)
+        {
+            try
+            {
+                Int64 lngBillKey = 0;
+                lngBillKey = DBUtility.ClsPub.isLong(HInterID);      //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹�
+                DAL.ClsPay_ProcPriceRequestBill oBill = new DAL.ClsPay_ProcPriceRequestBill();                              //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣�
+                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁
+                {
+                    if (oBill.omodel.HBillStatus != 6)
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "鍗曟嵁鏈湪瀹℃牳涓笉鑳介┏鍥�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    //鍙戣捣椹冲洖
+                    if (oBill.RejectCheckFlowProgress(lngBillKey, oBill.omodel.HBillNo, CurUserID, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+                    {
+                        objJsonResult.code = CodeConstant.SUCCEED;
+                        objJsonResult.count = CountConstant.SUCCEED;
+                        objJsonResult.Message = "椹冲洖鎴愬姛";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "椹冲洖澶辫触澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                }
+                else
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+            }
+            catch (Exception e)
+            {
+                oCn.RollBack();
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
+        #region 瀹氶鐢宠鍗� 鍙戣捣瀹℃壒
+        [Route("Pay_ProcPriceRequestBill/StartCheckFlow")]
+        [HttpGet]
+        public object StartCheckFlow(int HInterID, string CurUserName)
+        {
+            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 = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "HInterID灏忎簬0锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                Int64 lngBillKey = 0;
+                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹�
+                DAL.ClsPay_ProcPriceRequestBill oBill = new DAL.ClsPay_ProcPriceRequestBill();                              //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣�
+
+                //鍙戣捣瀹℃壒
+                if (oBill.startCheckFlow(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+                {
+                    objJsonResult.code = CodeConstant.SUCCEED;
+                    objJsonResult.count = CountConstant.SUCCEED;
+                    objJsonResult.Message = "鍙戣捣瀹℃壒鎴愬姛";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鍙戣捣瀹℃壒澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                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("Pay_ProcPriceRequestBill/AuditFlow")]
+        [HttpGet]
+        public object AuditPay_ProcPriceRequestBill_Flow(int HInterID, int IsAudit, string CurUserName, string CurUserID)
+        {
+            //string ModRightNameCheck = "Pay_ProcPriceRequestBill_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 = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "HInterID灏忎簬0锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                Int64 lngBillKey = 0;
+                lngBillKey = DBUtility.ClsPub.isLong(HInterID);                                         //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹�
+                DAL.ClsPay_ProcPriceRequestBill oBill = new DAL.ClsPay_ProcPriceRequestBill();                              //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣�
+
+                //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔
+                if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))                    //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁
+                {
+                    if (oBill.omodel.HCloseMan.Trim() != "")
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    if (oBill.omodel.HDeleteMan.Trim() != "")
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+
+                    if (IsAudit == TypeConstant.AUDIT)  //瀹℃牳鍒ゆ柇
+                    {
+                        //鍒ゆ柇鏄惁宸茬粡鍙戣捣瀹℃壒
+                        string sql0 = "select * from Xt_BillCheckFlowStatus where HBillInterID = " + lngBillKey + " and HBillTypeID = '" + oBill.BillType + "'";
+                        DataSet ds0 = oCn.RunProcReturn(sql0, "Xt_BillCheckFlowStatus");
+                        if (ds0 != null && ds0.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:鍗曟嵁鏈彂璧峰鎵癸紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+
+                        //鍒ゆ柇鍗曟嵁褰撳墠鐘舵��
+                        if (oBill.omodel.HChecker.Trim() != "")
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:鍗曟嵁宸插畬鎴愬鏍�!涓嶈兘缁х画瀹℃牳锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    if (IsAudit == TypeConstant.REVERSE_AUDIT) //鍙嶅鏍稿垽鏂�
+                    {
+                        //鍒ゆ柇鏄惁瀛樺湪瀹℃牳杩囩殑椤圭洰
+                        string sql0 = "select * from Xt_BillCheckFlowStatus where HBillInterID = " + lngBillKey + " and HBillTypeID = '" + oBill.BillType + "' and ISNULL(HChecker,'') <> ''";
+                        DataSet ds0 = oCn.RunProcReturn(sql0, "Xt_BillCheckFlowStatus");
+                        if (ds0 != null && ds0.Tables[0].Rows.Count == 0)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:鍗曟嵁涓嶅瓨鍦ㄥ凡缁忓鏍哥殑椤圭洰锛侊紒";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                }
+                else
+                {
+                    objJsonResult.code = CodeConstant.FAIL;
+                    objJsonResult.count = CountConstant.FAIL;
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+
+                oCn.BeginTran();
+                //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣�
+                if (IsAudit == TypeConstant.AUDIT) //瀹℃牳鎻愪氦
+                {
+                    #region 瀹℃牳鍓嶇殑鐩稿叧鍒ゆ柇
+                    //瀹℃牳鍓嶆帶鍒�=========================================      
+                    DataSet BeforeDs = oCn.RunProcReturn("Exec h_p_Pay_ProcPriceRequestBill_BeforeCheckCtrl " + HInterID.ToString() + ",'" + CurUserName + "'", "h_p_Pay_ProcPriceRequestBill_BeforeCheckCtrl");
+                    if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "瀹℃牳鍓嶅垽鏂け璐ワ紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "瀹℃牳澶辫触锛�" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]);
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    //==================================================================================      
+
+                    //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗
+                    string s = "";
+                    int sYear = 0;
+                    int sPeriod = 0;
+                    DateTime HDate = DateTime.Now;
+                    if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
+                    {
+                        objJsonResult.Message = s;
+                        return objJsonResult;
+                    }
+                    #endregion
+
+                    //鑾峰彇褰撳墠瀹℃牳椤圭洰
+                    string sql0 = "select * from " + oBill.MvarItemKey + " where HInterID = " + lngBillKey;
+                    DataSet ds0 = oCn.RunProcReturn(sql0, oBill.MvarItemKey);
+                    string HCheckFlowID = ds0.Tables[0].Rows[0]["HCheckFlowID"].ToString();             //瀹℃壒娴佸唴鐮�
+                    string HCheckItemNowID = ds0.Tables[0].Rows[0]["HCheckItemNowID"].ToString();       //褰撳墠瀹℃壒椤圭洰鍐呯爜
+                    string HCheckItemNextID = ds0.Tables[0].Rows[0]["HCheckItemNextID"].ToString();     //寰呭鎵归」鐩唴鐮�
+
+                    //鍒ゆ柇鐢ㄦ埛鏄惁鏈夋潈闄� 瀹℃壒 褰撳墠瀹℃壒娴佺殑瀹℃壒椤圭洰
+                    //string sql01 = "select * from Xt_CheckUserRight where HUserID = '" + CurUserID + "' and HCheckFlowInterID = " + HCheckFlowID + " and HCheckItemID = " + HCheckItemNowID + " and HValue = 1";
+                    string sql01 = "select * from Xt_CheckUserRight where HUserID = '" + CurUserID + "' and HCheckFlowInterID = " + HCheckFlowID + " and HCheckItemID = " + HCheckItemNowID + "";
+                    DataSet ds01 = oCn.RunProcReturn(sql01, "Xt_CheckUserRight");
+                    if (ds01.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:鐢ㄦ埛鏃犲綋鍓嶅鏍搁」鐩殑瀹℃牳鏉冮檺锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+
+                    //鏇存柊 鍗曟嵁瀹℃壒鐘舵�佽〃 涓搴斿鏍搁」鐩殑瀹℃牳鐘舵��
+                    string sql02 = "update Xt_BillCheckFlowStatus set HChecker='" + CurUserName + "',HCheckDate=getdate() where HBillTypeID = '" + oBill.BillType + "' and HBillInterID=" + lngBillKey + " and HCheckFlowID=" + HCheckFlowID + " and HCheckItemID=" + HCheckItemNowID;
+                    oCn.RunProc(sql02);
+
+                    //鍒ゆ柇褰撳墠瀹℃牳椤圭洰鏄惁鏄渶鍚庝竴涓」鐩紝濡傛灉鏄紝瀹℃牳鍚庡弽鍐欏崟鎹殑鍗曟嵁鐘舵�併�傚鏋滀笉鏄紝鑾峰彇涓嬩竴涓鏍搁」鐩苟鏇存柊鍒伴攢鍞鍗曚富琛�
+                    if (HCheckItemNextID != "0")                //鍒氬垰瀹℃牳鐨勫鏍搁」鐩笉鏄渶鍚庝竴涓鏍搁」鐩�
+                    {
+                        string sql03 = "select b.HInterID,b.HCheckItemID from Xt_CheckFlowMain as a " +
+                                "inner join Xt_CheckFlowSub as b on a.HInterID = b.HInterID " +
+                                "where a.HBillTypeID = '" + oBill.BillType + "' " +
+                                "and a.HInterID = " + HCheckFlowID + " " +
+                                "order by b.HFlowNo asc";
+                        DataSet ds03 = oCn.RunProcReturn(sql03, "Xt_CheckFlowMain");
+
+                        //鑾峰彇鏂扮殑褰撳墠瀹℃牳椤圭洰鍜屽緟瀹℃牳椤圭洰
+                        for (int i = 0; i < ds03.Tables[0].Rows.Count; i++)
+                        {
+                            if (ds03.Tables[0].Rows[i]["HCheckItemID"].ToString() == HCheckItemNextID)
+                            {
+                                HCheckItemNowID = HCheckItemNextID;
+                            }
+                            else if (HCheckItemNowID == HCheckItemNextID)
+                            {
+                                HCheckItemNextID = ds03.Tables[0].Rows[i]["HCheckItemID"].ToString();
+                                break;
+                            }
+                        }
+                        //鏂扮殑褰撳墠瀹℃牳椤圭洰涓烘渶鍚庝竴涓鏍搁」鐩紝寰呭鏍搁」鐩笉瀛樺湪锛岃涓洪粯璁ゅ��"0"
+                        if (HCheckItemNowID == HCheckItemNextID)
+                        {
+                            HCheckItemNextID = "0";
+                        }
+
+                        //鏇存柊鍗曟嵁涓昏〃鐨勫鎵规祦鏁版嵁
+                        string sql04 = "update " + oBill.MvarItemKey + " set HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + " where HInterID = " + lngBillKey;
+                        oCn.RunProc(sql04);
+
+
+                        objJsonResult.code = CodeConstant.SUCCEED;
+                        objJsonResult.count = CountConstant.SUCCEED;
+                        objJsonResult.Message = "瀹℃牳鎴愬姛";
+                        objJsonResult.data = null;
+                    }
+                    else                                                                //鍒氬垰瀹℃牳鐨勫鏍搁」鐩槸鏈�鍚庝竴涓鏍搁」鐩�
+                    {
+                        //鏇存柊鍗曟嵁涓昏〃鐨勫鎵规祦鏁版嵁
+                        HCheckItemNowID = "0";
+                        HCheckItemNextID = "0";
+
+                        string sql04 = "update " + oBill.MvarItemKey + " set HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + " where HInterID = " + lngBillKey;
+                        oCn.RunProc(sql04);
+
+                        //鏇存柊鍗曟嵁鐨勫崟鎹姸鎬�
+                        if (oBill.CheckBill(oCn, oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Pay_ProcPriceRequestBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+                        {
+                            objJsonResult.code = CodeConstant.SUCCEED;
+                            objJsonResult.count = CountConstant.SUCCEED;
+                            objJsonResult.Message = "瀹℃牳鎴愬姛";
+                            objJsonResult.data = null;
+                        }
+                        else
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                            objJsonResult.data = null;
+
+                            oCn.RollBack();
+                            return objJsonResult;
+                        }
+                    }
+                }
+                if (IsAudit == TypeConstant.REVERSE_AUDIT) //鍙嶅鏍告彁浜�
+                {
+                    #region 鍙嶅鏍稿墠鐨勭浉鍏冲垽鏂�
+                    //鍙嶅鏍稿墠鎺у埗=========================================
+                    DataSet BeforeDs = oCn.RunProcReturn("Exec h_p_Pay_ProcPriceRequestBill_BeforeUnCheckCtrl " + HInterID.ToString() + ",'" + CurUserName + "'", "h_p_Pay_ProcPriceRequestBill_BeforeUnCheckCtrl");
+                    if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "鍙嶅鏍稿墠鍒ゆ柇澶辫触锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1)
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "鍙嶅鏍稿け璐ワ紒" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]);
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    //=========================================================
+
+                    //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗
+                    string s = "";
+                    int sYear = 0;
+                    int sPeriod = 0;
+                    DateTime HDate = DateTime.Now;
+                    if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
+                    {
+                        objJsonResult.Message = s;
+                        return objJsonResult;
+                    }
+                    #endregion
+
+                    //鑾峰彇闇�瑕佸弽瀹℃牳鐨勫鏍搁」鐩�
+                    string sql0 = "select c.* from Xt_CheckFlowMain as a " +
+                                  "inner join Xt_CheckFlowSub as b on a.HInterID = b.HInterID " +
+                                  "inner join Xt_BillCheckFlowStatus as c on a.HBillTypeID = c.HBillTypeID and b.HCheckItemID = c.HCheckItemID " +
+                                  "where c.HBillTypeID = '" + oBill.BillType + "' and c.HBillInterID = " + lngBillKey + " " +
+                                  "order by b.HFlowNo asc";
+                    DataSet ds0 = oCn.RunProcReturn(sql0, "Xt_BillCheckFlowStatus");
+                    if (ds0 == null || ds0.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:鏈彂璧峰鎵癸紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    string HCheckFlowID = ds0.Tables[0].Rows[0]["HCheckFlowID"].ToString();             //瀹℃壒娴佸唴鐮�
+                    string HCheckItemNowID = "0";       //褰撳墠瀹℃壒椤圭洰鍐呯爜
+                    string HCheckItemNextID = "0";     //寰呭鎵归」鐩唴鐮�
+                    if (oBill.omodel.HBillStatus == 6)
+                    {
+                        for (int i = 0; i < ds0.Tables[0].Rows.Count; i++)
+                        {
+                            if (ds0.Tables[0].Rows[i]["HChecker"].ToString() != "")
+                            {
+                                HCheckItemNowID = ds0.Tables[0].Rows[i]["HCheckItemID"].ToString();
+                                HCheckItemNextID = ds0.Tables[0].Rows[i]["HCheckItemID"].ToString();
+                            }
+                            else
+                            {
+                                HCheckItemNextID = ds0.Tables[0].Rows[i]["HCheckItemID"].ToString();
+                                break;
+                            }
+                        }
+                        if (HCheckItemNowID == HCheckItemNextID)
+                        {
+                            HCheckItemNextID = "0";
+                        }
+                    }
+                    else
+                    {
+                        HCheckItemNowID = ds0.Tables[0].Rows[ds0.Tables[0].Rows.Count - 1]["HCheckItemID"].ToString();
+                        HCheckItemNextID = "0";
+                    }
+
+                    //鍒ゆ柇鐢ㄦ埛鏄惁鏈夋潈闄� 瀹℃壒 褰撳墠瀹℃壒娴佺殑瀹℃壒椤圭洰
+                    //string sql01 = "select * from Xt_CheckUserRight where HUserID = '" + CurUserID + "' and HCheckFlowInterID = " + HCheckFlowID + " and HCheckItemID = " + HCheckItemNowID + " and HValue = 1";
+                    string sql01 = "select * from Xt_CheckUserRight where HUserID = '" + CurUserID + "' and HCheckFlowInterID = " + HCheckFlowID + " and HCheckItemID = " + HCheckItemNowID + "";
+                    DataSet ds01 = oCn.RunProcReturn(sql01, "Xt_CheckUserRight");
+                    if (ds01.Tables[0].Rows.Count == 0)
+                    {
+                        objJsonResult.code = CodeConstant.FAIL;
+                        objJsonResult.count = CountConstant.FAIL;
+                        objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:鐢ㄦ埛鏃犲綋鍓嶅鏍搁」鐩殑瀹℃牳鏉冮檺锛�";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+
+
+                    //鏇存柊 鍗曟嵁瀹℃壒鐘舵�佽〃 涓搴斿鏍搁」鐩殑瀹℃牳鐘舵��
+                    string sql02 = "update Xt_BillCheckFlowStatus set HChecker='',HCheckDate='' where HBillTypeID = '" + oBill.BillType + "' and HBillInterID=" + lngBillKey + " and HCheckFlowID=" + HCheckFlowID + " and HCheckItemID=" + HCheckItemNowID;
+                    oCn.RunProc(sql02);
+
+                    //鍒ゆ柇鍙嶅鏍哥殑鍗曟嵁鏄惁宸茬粡瀹℃牳瀹屾垚锛岃嫢瀹℃牳瀹屾垚锛屽弽瀹℃牳闇�瑕佸彉鏇村崟鎹姸鎬併��
+                    if (oBill.omodel.HBillStatus == 6)
+                    {
+                        //鏇存柊鍗曟嵁涓昏〃鐨勫鎵规祦鏁版嵁
+                        string sql04 = "update " + oBill.MvarItemKey + " set HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + " where HInterID = " + lngBillKey;
+                        oCn.RunProc(sql04);
+
+
+                        objJsonResult.code = CodeConstant.SUCCEED;
+                        objJsonResult.count = CountConstant.SUCCEED;
+                        objJsonResult.Message = "瀹℃牳鎴愬姛";
+                        objJsonResult.data = null;
+                    }
+                    else
+                    {
+
+                        //鍙嶅鏍告彁浜bandonCheck
+                        if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Pay_ProcPriceRequestBill_AfterUnCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+                        {
+                            //鏇存柊鍗曟嵁涓昏〃鐨勫鎵规祦鏁版嵁
+                            string sql04 = "update " + oBill.MvarItemKey + " set HCheckItemNowID=" + HCheckItemNowID + ",HCheckItemNextID=" + HCheckItemNextID + ",HBillStatus=6 " + " where HInterID = " + lngBillKey;
+                            oCn.RunProc(sql04);
+                            objJsonResult.code = CodeConstant.SUCCEED;
+                            objJsonResult.count = CountConstant.SUCCEED;
+                            objJsonResult.Message = "鍙嶅鏍告垚鍔�";
+                            objJsonResult.data = null;
+                        }
+                        else
+                        {
+                            objJsonResult.code = CodeConstant.FAIL;
+                            objJsonResult.count = CountConstant.FAIL;
+                            objJsonResult.Message = "鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo;
+                            objJsonResult.data = null;
+
+                            oCn.RollBack();
+                            return objJsonResult;
+                        }
+                    }
+                }
+
+                oCn.Commit();
+                return objJsonResult;
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = CodeConstant.FAIL;
+                objJsonResult.count = CountConstant.FAIL;
+                objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+
+                oCn.RollBack();
+                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/Pay_SalaryCalculateController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SalaryCalculateController.cs"
index f39f0ed..4b86c75 100644
--- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SalaryCalculateController.cs"
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SalaryCalculateController.cs"
@@ -25,6 +25,58 @@
         string user_LongShan = "";
         string HName_LongShan = "";
 
+
+        #region 宸ヨ祫杩愮畻
+        /// <summary>
+        /// 鏍规嵁寮�濮嬫棩鏈熴�佺粨鏉熸棩鏈熴�佺彮缁勮繘琛屽伐璧勮繍绠�
+        /// </summary>
+        /// <returns></returns>
+        [Route("Pay_SalaryCulateController/GetSalaryCalculate_Json")]
+        [HttpGet]
+        public object GetSalaryCalculate_Json(DateTime HBeginDate, DateTime HEndDate, Int64 HGroupID, string HSourceBillType, string HMaker, Int64 HStockOrgID)
+        {
+            try
+            {
+                ds = oCN.RunProcReturn("exec h_p_Pay_SalaryCalculate '" + HBeginDate + "','" + HEndDate + "'," + HGroupID.ToString() + ",'" + HSourceBillType + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_Pay_SalaryCalculate");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "宸ヨ祫杩愮畻鏃跺嚭鐜伴敊璇紝璇烽噸鏂拌繍绠楋紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
+                    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>
         /// 杩斿洖椤圭洰闃舵鍒楄〃
diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SingleBalBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SingleBalBillController.cs"
index fafa6d8..2373dea 100644
--- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SingleBalBillController.cs"
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SingleBalBillController.cs"
@@ -783,12 +783,20 @@
         {
             try
             {
-                DAL.ClsGy_ProcPrice_Ctl oProcPrice = new DAL.ClsGy_ProcPrice_Ctl();
-                double HPrice = oProcPrice.LoadProcPrice(HMaterID, HProcID, HSourceID, true);
+                double HPrice=0;
+                ds = oCn.RunProcReturn("exec h_p_Pay_GetPriceByMaterHProcHSource " + HMaterID.ToString() + "," + HProcID.ToString() + "," + HSourceID.ToString(), "h_p_Pay_GetPriceByMaterHProcHSource");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    HPrice = 0;
+                }
+                else
+                {
+                    HPrice = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[0]["HPrice"]);
+                }
 
-                objJsonResult.code = "1";
+                objJsonResult.code = "0";
                 objJsonResult.count = 1;
-                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.Message = "鎴愬姛锛�";
                 objJsonResult.data = HPrice;
                 return objJsonResult;
             }
diff --git "a/WebAPI/Controllers/\346\225\260\346\215\256\345\220\214\346\255\245/\351\222\211\351\222\211\345\220\214\346\255\245/DD_DataSynchronizationController.cs" "b/WebAPI/Controllers/\346\225\260\346\215\256\345\220\214\346\255\245/\351\222\211\351\222\211\345\220\214\346\255\245/DD_DataSynchronizationController.cs"
index 44f4ba3..4bb6860 100644
--- "a/WebAPI/Controllers/\346\225\260\346\215\256\345\220\214\346\255\245/\351\222\211\351\222\211\345\220\214\346\255\245/DD_DataSynchronizationController.cs"
+++ "b/WebAPI/Controllers/\346\225\260\346\215\256\345\220\214\346\255\245/\351\222\211\351\222\211\345\220\214\346\255\245/DD_DataSynchronizationController.cs"
@@ -16,6 +16,7 @@
 using DingTalk.Api;
 using DingTalk.Api.Response;
 using System.Globalization;
+using System.Linq;
 
 namespace WebAPI.Controllers
 {
@@ -268,15 +269,26 @@
             public string HExplanation;//   varchar(500)    --缁翠慨瑕佹眰        
             public string HInnerBillNo;//   varchar(50)   --鍐呴儴鍗曟嵁鍙�
             public Int64 HMouldID;
+            public Int64 HMouldMaintainRuleInterID;
+            public Int64 HMaintainItemID;
             public Int64 HSupID;//		int	--渚涘簲鍟嗭紙Gy_Supplier锛�					addnew
             public string HRepairType;//	varchar(10)		--缁翠慨绫诲瀷锛堝唴閮ㄧ淮淇紝濮斿缁翠慨锛�   	addnew
             public string HNewModel;//	varchar(100)		--缁翠慨鍚庢柊瑙勬牸				addnew
             public Single HNewDesignLife;//	money			--鏂拌璁″鍛�
             public string HRemark;
-          
+            public string HPlanNo;
+            public string HPlanInterID;
+            public DateTime HRequestComDate;
+            public double HRecentMainModule;
+            public double HCumulativeModule;
+            public double HProductionModule;
+            public DateTime HRepairAccepDate;
+            public string HMaintainLevID;
+
 
 
             //鍗曟嵁鍐呭
+            public string HBillNo;                                //鍗曟嵁鍙�
             public string HDate;                                //鏃ユ湡
             public string HCheckLevel;                          //瀹℃牳绛夌骇
             public string HArea;                                //鍖哄煙
@@ -332,6 +344,10 @@
             public Single HPlanTimes;// money         --璁″垝缁翠慨宸ユ椂
             public Single HTimes;// money       --瀹為檯缁翠慨宸ユ椂
             public string HRemark2;//澶囨敞
+            public string HRepairCategory;
+            public string HUrgenLevel;
+            public string HRepairer;
+            public string HIsCapacityImpact;
 
             //鍗曟嵁鍐呭
             public string HDate;                                //鏃ユ湡
@@ -510,8 +526,8 @@
                 //OriginatorId = "12",                                                                                          //鏍规嵁娴佺▼鍙戣捣浜哄伐鍙锋煡璇€��
 
                 //TaskId = "12",                                                                                                //浠诲姟ID銆�
-                //CreateFromTimeGMT = DateTime.Now.ToString("dd") == "01" ? "2022-01-01" : DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"),                                          //鍒涘缓鏃堕棿璧峰鍊笺��
-                //CreateToTimeGMT = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"),                                               //鍒涘缓鏃堕棿缁堟鍊笺��
+                //CreateFromTimeGMT = DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd"),                                          //鍒涘缓鏃堕棿璧峰鍊笺��
+                //CreateToTimeGMT = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd hh:mm:ss"),                                               //鍒涘缓鏃堕棿缁堟鍊笺��
                 ModifiedFromTimeGMT = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"),                                          //淇敼鏃堕棿璧峰鍊笺��
                 ModifiedToTimeGMT = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"),                                               //淇敼鏃堕棿缁堟鍊笺��
 
@@ -2058,7 +2074,38 @@
 
                             if (getInstanceByIdResponse.Body.InstanceStatus != "COMPLETED")
                             {
-                                continue;
+                                //continue;
+                            }
+
+                            //寮�鍗曟棩鏈�
+                            if (keys.Contains("dateField_lq0v65sv"))
+                            {
+                                double HDate_Temp = double.Parse(response.Body.Result[i].FormData["dateField_lq0v65sv"].ToString());
+                                oItem.HDate = convertFromMillisecondsToDateString(HDate_Temp, "yyyy-MM-dd HH:mm");
+                            }
+
+                            //妯″叿淇濆吇绾у埆
+                            if (keys.Contains("selectField_m1ip9j31"))
+                            {
+                                string HDate_Temp = response.Body.Result[i].FormData["selectField_m1ip9j31"].ToString();
+                                if (!HDate_Temp.Contains("涓夌骇"))
+                                {
+                                    ds = oCN.RunProcReturn("select  * from h_v_Gy_MaintainLev where 淇濆吇绾у埆浠g爜='BY-SE-002'", "h_v_Gy_MaintainLev");
+                                    if (ds.Tables[0].Rows.Count > 0)
+                                    {
+                                        HDate_Temp = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                                    }
+                                }
+                                else if (HDate_Temp.Contains("涓夌骇"))
+                                {
+                                    ds = oCN.RunProcReturn("select  * from h_v_Gy_MaintainLev where 淇濆吇绾у埆浠g爜='BY-SE-003'", "h_v_Gy_MaintainLev");
+                                    if (ds.Tables[0].Rows.Count > 0)
+                                    {
+                                        HDate_Temp = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                                    }
+                                }
+                              
+                                oItem.HMaintainLevID = HDate_Temp;
                             }
 
                             //淇ā寮�濮嬫椂闂�
@@ -2075,17 +2122,52 @@
                                 oItem.HRepairEndDate = DateTime.Parse(convertFromMillisecondsToDateString(HDate_Temp, "yyyy-MM-dd HH:mm"));
                             }
 
-                            //妯″叿鎵规鍙�
+                            //妯″叿鍗曟嵁鍙�
                             if (keys.Contains("serialNumberField_lqaak4ts"))
                             {
                                 string HDate_Temp = response.Body.Result[i].FormData["serialNumberField_lqaak4ts"].ToString();
-                                oItem.HRemark = HDate_Temp;
+                                oItem.HBillNo = HDate_Temp;
                             }
 
-                            //妯″叿缂栫爜
-                            if (keys.Contains("dateField_lq4gf2ii"))
+                            //瑕佹眰瀹屾垚鏃ユ湡
+                            if (keys.Contains("dateField_lq3idkvd"))
                             {
-                                string HDate_Temp = response.Body.Result[i].FormData["dateField_lq4gf2ii"].ToString();
+                                double HDate_Temp = double.Parse(response.Body.Result[i].FormData["dateField_lq3idkvd"].ToString());
+                                oItem.HRequestComDate = DateTime.Parse(convertFromMillisecondsToDateString(HDate_Temp, "yyyy-MM-dd HH:mm:ss"));
+                            }
+
+                            //缁翠慨鍙楃悊鏃ユ湡
+                            if (keys.Contains("dateField_lq4gf2ih"))
+                            {
+                                double HDate_Temp = double.Parse(response.Body.Result[i].FormData["dateField_lq4gf2ih"].ToString());
+                                oItem.HRepairAccepDate = DateTime.Parse(convertFromMillisecondsToDateString(HDate_Temp, "yyyy-MM-dd HH:mm:ss"));
+                            }
+
+                            //鏈�杩戜繚鍏绘ā鏁�
+                            if (keys.Contains("numberField_lq3idkvi"))
+                            {
+                                string HDate_Temp = response.Body.Result[i].FormData["numberField_lq3idkvi"].ToString();
+                                oItem.HRecentMainModule = double.Parse(HDate_Temp);
+                            }
+
+                            //绱妯℃暟
+                            if (keys.Contains("numberField_lq3idkvj"))
+                            {
+                                string HDate_Temp = response.Body.Result[i].FormData["numberField_lq3idkvj"].ToString();
+                                oItem.HCumulativeModule = double.Parse(HDate_Temp);
+                            }
+
+                            //鏈鐢熶骇妯℃暟
+                            if (keys.Contains("textField_lq4vdvgh"))
+                            {
+                                string HDate_Temp = response.Body.Result[i].FormData["textField_lq4vdvgh"].ToString();
+                                oItem.HProductionModule = double.Parse(HDate_Temp);
+                            }
+                            
+                            //妯″叿缂栫爜
+                            if (keys.Contains("selectField_lq3idkvg"))
+                            {
+                                string HDate_Temp = response.Body.Result[i].FormData["selectField_lq3idkvg"].ToString();
                                 DataSet ds = oCN.RunProcReturn("select * from Gy_MouldFileMain with(nolock)  where HNumber='" + HDate_Temp + "'", "Gy_MouldFileMain");
                                 string HMouldID = "0";
                                 if (ds.Tables[0].Rows.Count > 0)
@@ -2093,6 +2175,18 @@
                                     HMouldID = ds.Tables[0].Rows[0]["HInterID"].ToString();
                                 }
                                 oItem.HMouldID = long.Parse(HMouldID);
+                                oItem.HRemark = HDate_Temp;
+
+
+                                //鏌ヨ淇濆吇璁″垝
+                                ds = oCN.RunProcReturn(@"select  a.HInterID,a.HBillNo from  Sc_MouldMaintainPlanBillMain a
+                                    inner join Sc_MouldMaintainPlanBillSub b on a.HInterID = b.HInterID
+                                    where a.HMouldID =" + oItem.HMouldID + " and a.HMaintainLevID = " + oItem.HMaintainLevID, "Sc_MouldMaintainPlanBillMain");
+
+                                if (ds.Tables[0].Rows.Count > 0) {
+                                    oItem.HPlanInterID = ds.Tables[0].Rows[0]["HInterID"].ToString();
+                                    oItem.HPlanNo = ds.Tables[0].Rows[0]["HInterID"].ToString();
+                                }
                             }
 
 
@@ -2116,7 +2210,7 @@
                             if (keys.Contains("employeeField_lq3idkvh"))
                             {
                                 string[] HDate_Temp = JsonConvert.DeserializeObject<string[]>(JsonConvert.SerializeObject(response.Body.Result[i].FormData["employeeField_lq3idkvh"]));
-                                DataSet ds = oCN.RunProcReturn("select * from Gy_Employee with(nolock)  where HNumber='" + HDate_Temp[0] + "'", "Gy_Employee");
+                                DataSet ds = oCN.RunProcReturn("select * from Gy_Employee with(nolock)  where hname='" + HDate_Temp[0] + "'", "Gy_Employee");
                                 string HEmpID = "0";
                                 if (ds.Tables[0].Rows.Count > 0)
                                 {
@@ -2233,6 +2327,7 @@
             }
             catch (Exception e)
             {
+                LogService.Write(e.Message);
                 msg = e.Message;
                 return false;
             }
@@ -2268,11 +2363,33 @@
             try
             {
                 oCN.BeginTran();
+
+                string HMouldMaintainRuleInterID = "0";
+                string HMaintainItemID = "0";
+                string HRepairID = "0";
+                DataSet dataSet = oCN.RunProcReturn(@"select  a.HInterID,item.HMaintainItemID    from Sc_MouldMaintainRuleBillMain a with(nolock)
+inner join Sc_MouldMaintainRuleBillSub_Item item with(nolock) on  a.HInterID = item.HInterID
+where a.HRemark like'%閽夐拤鍚屾%'", "Sc_MouldMaintainRuleBillMain");
+
+                if (dataSet.Tables[0].Rows.Count > 0)
+                {
+                    HMouldMaintainRuleInterID = dataSet.Tables[0].Rows[0]["HInterID"].ToString();
+                    HMaintainItemID = dataSet.Tables[0].Rows[0]["HMaintainItemID"].ToString();
+                }
+
+                dataSet = oCN.RunProcReturn(@"select HItemID from Gy_Repair a with(nolock) where a.HRemark like'%閽夐拤鍚屾%' and HName like'%妯″叿缁翠慨%'", "Gy_Repair");
+
+                if (dataSet.Tables[0].Rows.Count > 0)
+                {
+                    HRepairID = dataSet.Tables[0].Rows[0]["HItemID"].ToString();
+                }
+
                 foreach (MouldFileWeiXiuBaoYang oItem in lsmain)
                 {
                     //淇濆吇璁板綍
                     if (oItem.DetailColMouldMaintain.Count != 0)
                     {
+                       
                         string BillType = "3819";
                         string sql = $@"select HInnerBillNo from Sc_MouldMaintainBillMain
                             where HInnerBillNo = '{oItem.HInstanceID}'";
@@ -2281,7 +2398,7 @@
                         if (ds.Tables[0].Rows.Count == 0)
                         {
                             long HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
-                            string HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
+                            //string HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
                             //long HInterID = 0;
                             //string HBillNo = "";
                             string sql_main = "Insert Into Sc_MouldMaintainBillMain " +
@@ -2290,11 +2407,16 @@
                 ",HPlanNo,HPlanInterID,HMouldID,HBeginDate" +
                 ",HEndDate" +
                 ",HInnerBillNo,HExplanation,HMouldMaintainRuleInterID,HMaintainLevID,HLastResult" +
-                ")values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',getdate(),'" + oItem.HOriginator + "','" + oItem.HMakeDate + "'" +
+                ",HRequestComDate,HRecentMainModule,HCumulativeModule,HProductionModule" +
+                ",HPlanInterID,HPlanNo,HMaintainLevID)" +
+                "values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + oItem.HBillNo + "','"+ oItem.HDate + "','" + oItem.HOriginator + "','" + oItem.HMakeDate + "'" +
                       ",'" + DateTime.Now.Year + "','" + DateTime.Now.Month + "','"+ oItem.HRemark + "','" + oItem.HUpdateDate + "'" +
                       ",'','0','" + oItem.HMouldID + "','" + oItem.HRepairBeginDate + "'" +
                       ",'" + oItem.HRepairEndDate + "'" +
-                      ",'" + oItem.HInstanceID + "','',0,0,'OK')";
+                      ",'" + oItem.HInstanceID + "','',"+ HMouldMaintainRuleInterID + ",0,'OK'" +
+                      ",'"+ oItem.HRequestComDate + "'," + oItem.HRecentMainModule + "," + oItem.HCumulativeModule + "," + oItem.HProductionModule + "" +
+                      "," + oItem.HPlanInterID + "," + oItem.HPlanNo + "," + oItem.HMaintainLevID + ")";
+                            LogService.Write(sql_main);
                             oCN.RunProc(sql_main);
                             int i = 1;
                             foreach (Sc_MouldMaintainBillSub oItem_Detail in oItem.DetailColMouldMaintain)
@@ -2305,11 +2427,13 @@
                           ",HManagerID" +
                           ",HCloseMan,HCloseType,HRemark" +
                           ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaintainResult" +
-                          ") values('" + HInterID + "'," + i + ",0,'" + oItem_Detail.HClaim + "'" +
+                          ") " +
+                          "values('" + HInterID + "'," + i + ","+ HMaintainItemID + ",'" + oItem_Detail.HClaim + "'" +
                      ",'','" + oItem_Detail.HClaim + "'" +
                      ",'" + oItem.HEmpID + "'" +
                      ",'','','" + oItem_Detail.HMaintainResult + "'" +
-                     ",'0','0','','',0,0,'')";
+                     ",'0','0','','',0,0,'Y')";
+                                LogService.Write(sql_sub);
                                 oCN.RunProc(sql_sub);
                                 i += 1;
                             }
@@ -2328,7 +2452,7 @@
                         if (ds.Tables[0].Rows.Count == 0)
                         {
                             long HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
-                            string HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
+                            //string HBillNo = DBUtility.ClsPub.CreateBillCode_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
                             //long HInterID = 0;
                             //string HBillNo = "";
                             string sql_main = "Insert Into Sc_MouldRepairWorkBillMain " +
@@ -2338,13 +2462,15 @@
                 ",HCycleUnit,HPlanTimes,HTimes,HEmpID,HManagerID" +
                 ",HDeptID,HExplanation,HInnerBillNo,HMouldID" +
                 ",HSupID,HRepairType,HNewModel,HNewDesignLife,HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID" +
-                ")values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',getdate()" +
-                ",'" + DateTime.Now.Year + "','" + DateTime.Now.Month + "','','" + oItem.HOriginator + "','" + oItem.HMakeDate + "'" +
-                      ",'0','0','" + oItem.HRepairBeginDate + "','" + oItem.HUpdateDate + "',''" +
+                ",HRepairAccepDate)values" +
+                "('" + BillType + "','" + BillType + "'," + HInterID + ",'" + oItem.HBillNo + "','"+ oItem .HDate+ "'" +
+                ",'" + DateTime.Now.Year + "','" + DateTime.Now.Month + "','"+ oItem.HRemark + "','" + oItem.HOriginator + "','" + oItem.HMakeDate + "'" +
+                      ",'0','"+ HRepairID + "','" + oItem.HRepairBeginDate + "','" + oItem.HRepairEndDate + "',''" +
                       ",'灏忔椂','" + oItem.HPlanTimes + "','" + oItem.HTimes + "','" + oItem.HEmpID + "',0" +
                       ",'" + oItem.HDeptID + "','','" + oItem.HInstanceID + "','" + oItem.HMouldID + "'" +
-                      ",'0','鍐呴儴缁翠慨','','" + oItem.HNewDesignLife + "','',0,0)";
-
+                      ",'0','鍐呴儴缁翠慨','','" + oItem.HNewDesignLife + "','1',0,0" +
+                      ",'"+ oItem.HRepairAccepDate + "')";
+                            LogService.Write(sql_main);
                             oCN.RunProc(sql_main);
                             int i = 1;
                             foreach (Sc_MouldRepairWorkBillSub oItem_Detail in oItem.DetailColMouldRepair)
@@ -2355,7 +2481,8 @@
                        ",HRepairID,HRepairExplanation,HManagerID,HMoney) values" +
                        "('" + HInterID + "'," + i + ",'','','','" + oItem_Detail.HRemark + "'" +
                           ",0,0,'','',0,0" +
-                          ",0,'" + oItem_Detail.HRepairExplanation + "','" + oItem.HEmpID + "',0)";
+                          ","+ HRepairID + ",'" + oItem_Detail.HRepairExplanation + "','" + oItem.HEmpID + "',0)";
+                                LogService.Write(sql_sub);
                                 oCN.RunProc(sql_sub);
                                 i += 1;
                             }
@@ -2370,6 +2497,7 @@
             }
             catch (Exception e)
             {
+                LogService.Write(e.Message);
                 msg = e.Message;
                 oCN.RollBack();
                 return false;
@@ -2382,7 +2510,7 @@
         #region 鑾峰彇 瀹滄惌-璁惧缁翠慨璁板綍鍗� 瀹炰緥ID鍒楄〃瀵瑰簲鐨勫疄渚嬭鎯�
         public bool getInstanceDetailList___EquipRepairWeiXiu_YiDa(string appType, string systemToken, string userID, string formUuid, List<string> IDList, ref List<EquipRepairWeiXiu> lsmain, ref string msg, int size = 500)
         {
-
+            string a = "";
             try
             {
                 int startIndex = 0;
@@ -2434,20 +2562,27 @@
                                 continue;
                             }
 
+                            if (oItem.HInstanceID != "9b6e108c-b7bf-45e4-910d-5629ac30d4aa") {
+                                continue;
+                            }
+
                             //璁惧缂栫爜
                             if (keys.Contains("textField_lfg9hgys"))
                             {
                                 string HDate_Temp = response.Body.Result[i].FormData["textField_lfg9hgys"].ToString();
-                                DataSet ds = oCN.RunProcReturn("select * from Gy_MouldFileMain with(nolock)  where HNumber='" + HDate_Temp + "'", "Gy_MouldFileMain");
+                                DataSet ds = oCN.RunProcReturn("select * from Gy_EquipFileBillMain with(nolock)  where HEquipFileNo='" + HDate_Temp + "'", "Gy_EquipFileBillMain");
                                 string HEquipID = "0";
                                 if (ds.Tables[0].Rows.Count > 0)
                                 {
                                     HEquipID = ds.Tables[0].Rows[0]["HInterID"].ToString();
+                                    oItem.HEquipID = long.Parse(HEquipID);
+                                    oItem.HRemark2 = HDate_Temp;
                                 }
-                                oItem.HEquipID = long.Parse(HEquipID);
-                                oItem.HRemark2 = HDate_Temp;
+                                else
+                                {
+                                    continue;
+                                }
                             }
-
 
                             //缁翠慨閮ㄩ棬
                             if (keys.Contains("selectField_kzgkw10a"))
@@ -2458,31 +2593,31 @@
                                 if (ds.Tables[0].Rows.Count > 0)
                                 {
                                     HDeptID = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                                    oItem.HDeptID = long.Parse(HDeptID);
                                 }
-                                oItem.HDeptID = long.Parse(HDeptID);
-                            }
+                                else
+                                {
+                                    continue;
+                                }
 
+                            }
 
                             //缁翠慨浜�
                             if (keys.Contains("employeeField_lthwkdh2"))
                             {
                                 string[] HDate_Temp = JsonConvert.DeserializeObject<string[]>(JsonConvert.SerializeObject(response.Body.Result[i].FormData["employeeField_lthwkdh2"]));
-                                DataSet ds = oCN.RunProcReturn("select * from Gy_Employee with(nolock)  where HNumber='" + HDate_Temp[0] + "'", "Gy_Employee");
+                                DataSet ds = oCN.RunProcReturn("select * from Gy_Employee with(nolock)  where HName='" + HDate_Temp[0] + "'", "Gy_Employee");
                                 string HEmpID = "0";
                                 if (ds.Tables[0].Rows.Count > 0)
                                 {
                                     HEmpID = ds.Tables[0].Rows[0]["HItemID"].ToString();
+                                    oItem.HEmpID = long.Parse(HEmpID);
                                 }
-                                oItem.HEmpID = long.Parse(HEmpID);
-                            }
+                                else
+                                {
+                                    continue;
+                                }
 
-                            //缁翠慨鏃堕棿
-                            if (keys.Contains("textField_l2r95oo2"))
-                            {
-                                string HDate_Temp = response.Body.Result[i].FormData["textField_l2r95oo2"].ToString();
-
-                                oItem.HTimes = long.Parse(HDate_Temp);
-                                oItem.HPlanTimes = long.Parse(HDate_Temp);
                             }
 
                             //缁翠慨鍐呭
@@ -2493,6 +2628,53 @@
                                 oItem.HRepairContent = HDate_Temp;
                             }
 
+                            //鎶ヤ慨绫诲埆
+                            if (keys.Contains("multiSelectField_lfg9hgyv"))
+                            {
+                                string[] HDate_Temp = JsonConvert.DeserializeObject<string[]>(JsonConvert.SerializeObject(response.Body.Result[i].FormData["multiSelectField_lfg9hgyv"]));
+
+                                oItem.HRepairCategory = HDate_Temp[0];
+                            }
+
+                            //绱ф�ョ▼搴�
+                            if (keys.Contains("radioField_kzgkw10c"))
+                            {
+                                string HDate_Temp = response.Body.Result[i].FormData["radioField_kzgkw10c"].ToString();
+
+                                oItem.HUrgenLevel = HDate_Temp;
+                            }
+
+                            //鎶ヤ慨浜�
+                            if (keys.Contains("employeeField_lkasesrk"))
+                            {
+                                string[] HDate_Temp = JsonConvert.DeserializeObject<string[]>(JsonConvert.SerializeObject(response.Body.Result[i].FormData["employeeField_lkasesrk"]));
+
+                                oItem.HRepairer = HDate_Temp[0];
+                            }
+
+                            //鏄惁鏈変骇鑳藉奖鍝�
+                            if (keys.Contains("textField_lyjddw0r"))
+                            {
+                                string HDate_Temp = response.Body.Result[i].FormData["textField_lyjddw0r"].ToString();
+
+                                oItem.HIsCapacityImpact = HDate_Temp;
+                            }
+                         
+                            //缁翠慨鏃堕棿
+                            if (keys.Contains("textField_l2r95oo2"))
+                            {
+                                string HDate_Temp = response.Body.Result[i].FormData["textField_l2r95oo2"].ToString();
+                                bool containsNumber = HDate_Temp.Any(c => char.IsDigit(c));
+                           
+                                if (!containsNumber)
+                                {
+                                    HDate_Temp = "0";
+                                }
+                                //LogService.Write("1:------"+HDate_Temp+ ",2:------" + int.Parse(new string(HDate_Temp.Where(char.IsDigit).ToArray())));
+                                //a = HDate_Temp;
+                                oItem.HTimes = int.Parse(new string(HDate_Temp.Where(char.IsDigit).ToArray()));
+                                oItem.HPlanTimes = int.Parse(new string(HDate_Temp.Where(char.IsDigit).ToArray()));
+                            }
 
                             //瀛愯〃 缁翠慨瑕佹眰 缁翠慨澶囨敞(闂鎻忚堪)
 
@@ -2502,7 +2684,7 @@
                             if (keys.Contains("textareaField_lthwo99r"))
                             {
                                 string HDate_Temp = response.Body.Result[i].FormData["textareaField_lthwo99r"].ToString();
-
+                                oItem.HExplanation = HDate_Temp;
                                 sub.HRepairExplanation = HDate_Temp;
                             }
 
@@ -2548,6 +2730,8 @@
                         }
                         catch (Exception e)
                         {
+                            LogService.Write(e.Message);
+                            a = "";
                             continue;
                         }
                     }
@@ -2583,7 +2767,7 @@
             int pageNumber = 1;
             int pageSize = 100;
 
-            //鑾峰彇妯″叿缁翠慨淇濆吇琛ㄧ殑瀹炰緥ID鍒楄〃
+            //鑾峰彇璁惧缁翠慨淇濆吇琛ㄧ殑瀹炰緥ID鍒楄〃
             List<string> IDList = new List<string>();
             if (getInstanceIDList_YiDa(appType, systemToken, userID, formUuid, pageNumber, pageSize, ref IDList, ref msg) == false)
             {
@@ -2600,6 +2784,14 @@
             try
             {
                 oCN.BeginTran();
+
+               DataSet dataSet = oCN.RunProcReturn(@"select HItemID from Gy_Repair a with(nolock) where a.HRemark like'%閽夐拤鍚屾%' and HName like'%璁惧缁翠慨%'", "Gy_Repair");
+                string HRepairID = "0";
+                if (dataSet.Tables[0].Rows.Count > 0)
+                {
+                    HRepairID = dataSet.Tables[0].Rows[0]["HItemID"].ToString();
+                }
+
                 foreach (EquipRepairWeiXiu oItem in lsmain)
                 {
                     //缁翠慨璁板綍
@@ -2622,12 +2814,14 @@
                 ",HEquipID,HRepairID,HPlanTimes,HEmpID,HManagerID,HTimes" +
                 ",HDeptID,HExplanation,HInnerBillNo,HRepairBeginDate,HRepairEndDate" +
                 ",HRepairContent,HCycleUnit,HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID" +
-                ")values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',getdate()" +
+                ",HRepairCategory,HUrgenLevel,HRepairer,HIsCapacityImpact)" +
+                "values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + HBillNo + "',getdate()" +
                 ",'" + DateTime.Now.Year + "','" + DateTime.Now.Month + "','"+ oItem.HRemark2 + "','" + oItem.HOriginator + "','" + oItem.HMakeDate + "'" +
-                      ",'" + oItem.HEquipID + "','0','" + oItem.HTimes + "','" + oItem.HEmpID + "','" + oItem.HEmpID + "','" + oItem.HTimes + "'" +
-                      ",'" + oItem.HDeptID + "','" + oItem.HExplanation + "','" + oItem.HInstanceID + "','',''" +
-                      ",'" + oItem.HRepairContent + "','灏忔椂','','0',0)";
-
+                      ",'" + oItem.HEquipID + "','"+ HRepairID + "','" + oItem.HTimes + "','" + oItem.HEmpID + "','" + oItem.HEmpID + "','" + oItem.HTimes + "'" +
+                      ",'" + oItem.HDeptID + "','"+ oItem.HExplanation + "','" + oItem.HInstanceID + "','"+ oItem.HMakeDate + "','" + oItem.HUpdateDate + "'" +
+                      ",'" + oItem.HRepairContent + "','灏忔椂','鎵嬪伐褰曞叆','0',0" +
+                      ",'"+ oItem.HRepairCategory + "','" + oItem.HUrgenLevel + "','" + oItem.HRepairer + "','" + oItem.HIsCapacityImpact + "')";
+                            LogService.Write(sql_main);
                             oCN.RunProc(sql_main);
                             int i = 1;
                             foreach (Sc_MouldRepairWorkBillSub oItem_Detail in oItem.DetailColMouldRepair)
@@ -2638,7 +2832,8 @@
                        ",HRepairID,HManagerID,HRepairExplanation,HEmpID)" +
                        "values('" + HInterID + "'," + i + ",'','','','" + oItem_Detail.HRemark + "'" +
                           ",0,0,'','',0,0" +
-                          ",0,'" + oItem.HEmpID + "','" + oItem_Detail.HRepairExplanation + "','" + oItem.HEmpID + "')";
+                          "," + HRepairID + ",'" + oItem.HEmpID + "','" + oItem_Detail.HRepairExplanation + "','" + oItem.HEmpID + "')";
+                                LogService.Write(sql_sub);
                                 oCN.RunProc(sql_sub);
                                 i += 1;
                             }
@@ -2653,6 +2848,7 @@
             }
             catch (Exception e)
             {
+                LogService.Write(e.Message);
                 msg = e.Message;
                 oCN.RollBack();
                 return false;
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 82da6b9..6ee3a96 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"
@@ -16,7 +16,6 @@
 using WebAPI;
 using WebAPI.Models;
 using WebAPI.Service;
-
 namespace WebAPI.Controllers
 {
     public class WEBSController : ApiController
@@ -509,7 +508,7 @@
                 //鐣岄潰涓婃湭閫夋嫨浠撳簱 鎴� 浠撲綅閫夋嫨鍒楄〃鐣岄潰杈撳叆杩囨护鏉′欢
                 if (HWhID == 0)
                 {
-                    ds = oCn.RunProcReturn("select HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and (HNumber like '%" + StockPlace + "%' or HName like '%" + StockPlace + "%')", "h_v_IF_StockPlace");
+                    ds = oCn.RunProcReturn("select top 50 HItemID,HNumber,HName,HWHID,HWhNumber,HWhName from h_v_IF_StockPlace where HStopflag=0 and HUSEORGID=" + HStockOrgID.ToString() + " and (HNumber like '%" + StockPlace + "%' or HName like '%" + StockPlace + "%')", "h_v_IF_StockPlace");
                     if (ds == null || ds.Tables[0].Rows.Count == 0)
                     {
                         objJsonResult.code = "0";
@@ -1201,6 +1200,56 @@
         #endregion
 
 
+        #region 鎵爜妯″潡    杩斿洖婧愬崟鍒楄〃淇℃伅
+        /// <summary>
+        /// 婧愬崟鍒楄〃淇℃伅锛屾牴鎹崟鎹被鍨嬨�佹簮鍗曠被鍨嬨�佺粍缁嘔D杩斿洖婧愬崟鍒楄〃淇℃伅
+        /// </summary>
+        /// <returns></returns>
+        [Route("WEBSController/GetSourceBillList_Json")]
+        [HttpGet]
+        public object GetSourceBillList_Json(string HBillType, string HSourceBillType, Int64 HStockOrgID, string HSourceBillNo, string HMater, string HCustom)
+        {
+            try
+            {
+                ds = oCn.RunProcReturn("exec h_p_WMS_GetSourceBillList '" + HBillType + "','" + HSourceBillType + "'," + HStockOrgID.ToString() + ",'" + HSourceBillNo + "','" + HMater + "','" + HCustom + "'", "h_p_WMS_GetSourceBillList");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁杩斿洖浠讳綍婧愬崟淇℃伅锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    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>
@@ -1847,6 +1896,15 @@
 
                 if (oWebs.set_SaveICMOReportBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo))
                 {
+                    string sReturn = "";
+                    if (oSystemParameter.ShowBill(ref sReturn) == true)
+                    {
+                        if (oSystemParameter.omodel.MES_StationOutBill_AutoCheck == "Y") //绯荤粺鍙傛暟  鑷姩瀹℃牳 
+                        {
+                            Cj_StationOutBillController cj_StationOutBillController = new Cj_StationOutBillController();
+                            object objResult = cj_StationOutBillController.set_CheckBill(lsmain[0].HInterID.ToString(), lsmain[0].HMaker, "3791");
+                        }
+                    }
                     objJsonResult.code = "0";
                     objJsonResult.count = 1;
                     objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //鎴愬姛锛�
@@ -2273,6 +2331,10 @@
                 {
                     websLsmain.HMainSourceBillType = "鐢熶骇澶囨枡鍗�";
                 }
+                else if (lsmain[0].HMainSourceBillType == "3710")
+                {
+                    websLsmain.HMainSourceBillType = "鐢熶骇璁㈠崟";
+                }
                 else
                 {
                     websLsmain.HMainSourceBillType = "鎵嬪伐褰曞叆";
@@ -2282,6 +2344,11 @@
                 websLsmain.HSTOCKORGID = lsmain[0].HSTOCKORGID;
                 websLsmain.HOWNERID = lsmain[0].HSTOCKORGID;
 
+                if(sSourceType== "3710")
+                {
+                    sSourceType = "3720";
+                }
+
                 if (oWebs.set_SaveMateOutBill_New(websLsmain, sSourceType, ref DBUtility.ClsPub.sErrInfo))
                 {
                     objJsonResult.code = "0";
diff --git "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs" "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs"
index eece527..59fb125 100644
--- "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs"
+++ "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs"
@@ -98,6 +98,8 @@
             public string HPicNo;
             public string HWorkTask;
             public string HProjectNote;
+            public string HContacts;
+            public string HContactNumber;
 
         }
         #endregion
@@ -250,6 +252,8 @@
                 string HPicNo = mainList[0].HPicNo;
                 string HWorkTask = mainList[0].HWorkTask;
                 string HProjectNote = mainList[0].HProjectNote;
+                string HContacts = mainList[0].HContacts;
+                string HContactNumber = mainList[0].HContactNumber;
                 if (OperationType == 2)
                 {
                     ds = oCN.RunProcReturn("select * from PM_ProjectBillMain where HBillNo ='" + HBillNo + "'", "PM_ProjectBillMain");
@@ -269,7 +273,7 @@
                 {
                     string sql = "insert into PM_ProjectBillMain" +
                         "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HDate,HBillNo,HBillStatus,HRemark,HMaker,HMakeDate,HProNumber,HProName,HCusID,HBeginDate,HEndDate,HSumMoney," +
-                        "HProMoney,HWorkMoney,HOtherMoney,HProType,HPMEmpID,HWorkEmpID,HDepEmpID,HConWorkDays,HDepDays,HLastMoney,HPayCusID,HOrgID,HMaterID,HProjectClassID,HBuildComp,HBuildAddress,HWorkNo,HReDate,HPicNo,HWorkTask,HProjectNote) " +
+                        "HProMoney,HWorkMoney,HOtherMoney,HProType,HPMEmpID,HWorkEmpID,HDepEmpID,HConWorkDays,HDepDays,HLastMoney,HPayCusID,HOrgID,HMaterID,HProjectClassID,HBuildComp,HBuildAddress,HWorkNo,HReDate,HPicNo,HWorkTask,HProjectNote,HContacts,HContactNumber) " +
                         "values(" +
                         "" + HYear +
                         "," + HPeriod +
@@ -309,6 +313,8 @@
                         "','" + HPicNo +
                         "','" + HWorkTask +
                         "','" + HProjectNote +
+                        "','" + HContacts +
+                        "','" + HContactNumber +
                         "')";
 
                     //涓昏〃
@@ -356,6 +362,8 @@
                         "',HPicNo = '" + HPicNo +
                         "',HWorkTask = '" + HWorkTask +
                         "',HProjectNote ='" + HProjectNote +
+                        "',HContacts ='" + HContacts +
+                        "',HContactNumber ='" + HContactNumber +
                         "' where HInterID = " + HInterID;
 
                     oCN.RunProc(sql);
diff --git a/WebAPI/DLL/ClsGy_Material_Ctl.cs b/WebAPI/DLL/ClsGy_Material_Ctl.cs
index bfa0808..c0adc2c 100644
--- a/WebAPI/DLL/ClsGy_Material_Ctl.cs
+++ b/WebAPI/DLL/ClsGy_Material_Ctl.cs
@@ -226,6 +226,7 @@
                     ",HProfitRate=" + oModel.HProfitRate.ToString() +
                     ",HProjectBillMainID='" + oModel.HProjectBillMainID + "'" +
                     ",HDivisionID='" + oModel.HDivisionID + "'" +
+                    ",HLotcardQty='" + oModel.HLotcardQty + "'" +                    
                     " Where HItemID=" + sItemID, ref DBUtility.ClsPub.sExeReturnInfo);
                 //淇敼瀛愰」鐩唬鐮�
                 oCn.RunProc("exec h_p_Gy_UpdateNumber '" + MvarItemKey + "','" + oModel.HNumber + ".','" + this.HOldNumber + ".'", ref DBUtility.ClsPub.sExeReturnInfo);
diff --git a/WebAPI/DLL/ClsGy_ProcMul_Ctl.cs b/WebAPI/DLL/ClsGy_ProcMul_Ctl.cs
new file mode 100644
index 0000000..6c0c90d
--- /dev/null
+++ b/WebAPI/DLL/ClsGy_ProcMul_Ctl.cs
@@ -0,0 +1,102 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+using System.Data;
+
+namespace WebAPI.DLL
+{
+    public class ClsGy_ProcMul_Ctl : DBUtility.ClsGy_Base_Ctl 
+    {
+        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
+        //鍘熶唬鐮� 鐢ㄤ簬 鏇挎崲瀛愰」鐩�
+        public string HOldNumber;
+        public Model.ClsGy_ProcMul_Model oModel = new Model.ClsGy_ProcMul_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,HDeptID) " +
+                    " 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 +"'," + oModel.HDeptID+")", 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 + "',"+
+                    "HDeptID = "+ oModel.HDeptID + " 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_ProcMul_Ctl()
+        {
+            MvarItemKey = "Gy_ProcMul";
+            MvarReportTitle = "宸ユ璁剧疆";
+            oModel = new Model.ClsGy_ProcMul_Model();
+        }
+
+    
+
+    }
+}
diff --git a/WebAPI/DLL/ClsOA_ErrMsgBackBill.cs b/WebAPI/DLL/ClsOA_ErrMsgBackBill.cs
index bc7664e..06a336f 100644
--- a/WebAPI/DLL/ClsOA_ErrMsgBackBill.cs
+++ b/WebAPI/DLL/ClsOA_ErrMsgBackBill.cs
@@ -70,6 +70,7 @@
                 ",HForm='" + omodel.HForm + "'" +
                 ",HChangeNote='" + omodel.HChangeNote + "'" +
                 ",HNote='" + omodel.HNote + "'" +
+                ",HCenterID='" + omodel.HCenterID + "'" +
                 ",HBadProcMan='" + omodel.HBadProcMan.ToString() + "'" +
                 ",HQEMan='" + omodel.HQEMan.ToString() + "'" +
                 ",HSourceID='" + omodel.HSourceID.ToString() + "'" +
@@ -147,7 +148,7 @@
                 ",HCopyMan,HHasten,HLevel,HReTransmitMan,HBillTypeName"+
                 ",HPlanBillNo,HMaterName,HMaterModel,HQty,HSendType"+
                 ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRecDeptID,HMaterNumber,HErrMsgBackTypeID,HHandleEmpID,HCloseFlag" +
-                ",HForm,HChangeNote,HNote,HBadProcMan,HQEMan,HSourceID,HShiftsID,HErrLev" +
+                ",HForm,HChangeNote,HNote,HBadProcMan,HQEMan,HSourceID,HShiftsID,HErrLev,HCenterID" +
                 ") " +
                 " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
                 "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" +
@@ -156,7 +157,7 @@
                 ",'" + 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.HHandleEmpID + ", '"+ "0"+
-                "','" + omodel.HForm + "','" + omodel.HChangeNote + "','" + omodel.HNote + "','" + omodel.HBadProcMan + "','" + omodel.HQEMan + "','" + omodel.HSourceID + "','" + omodel.HShiftsID + "','" + omodel.HErrLev+ "') ");
+                "','" + omodel.HForm + "','" + omodel.HChangeNote + "','" + omodel.HNote + "','" + omodel.HBadProcMan + "','" + omodel.HQEMan + "','" + omodel.HSourceID + "','" + omodel.HShiftsID + "','" + omodel.HErrLev+ "','" + omodel.HCenterID + "') ");
                 //鎻掑叆瀛愯〃
                 //foreach (Models.ClsOA_ErrMsgBackBillSub oSub in DetailColl)
                 //{
diff --git a/WebAPI/DLL/ClsSb_EquipRepairWorkBill.cs b/WebAPI/DLL/ClsSb_EquipRepairWorkBill.cs
index 658339a..bd1cce7 100644
--- a/WebAPI/DLL/ClsSb_EquipRepairWorkBill.cs
+++ b/WebAPI/DLL/ClsSb_EquipRepairWorkBill.cs
@@ -75,6 +75,10 @@
                 ",HPlanTimes=" + omodel.HPlanTimes.ToString() +
                 ",HDeptID=" + omodel.HDeptID.ToString() +
                 ",HExplanation='" + omodel.HExplanation + "'" +
+                ",HRepairCategory='" + omodel.HRepairCategory + "'" +
+                ",HUrgenLevel='" + omodel.HUrgenLevel + "'" +
+                ",HRepairer='" + omodel.HRepairer + "'" +
+                ",HIsCapacityImpact='" + omodel.HIsCapacityImpact + "'" +
                 ",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
                 ",HRepairContent='" + omodel.HRepairContent + "'" +
                 ",HMainSourceBillType='"+ omodel.HMainSourceBillType+"'"+
@@ -194,13 +198,14 @@
                 ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
                 ",HEquipID,HRepairID,HPlanTimes,HEmpID,HManagerID,HTimes" +
                 ",HDeptID,HExplanation,HInnerBillNo,HRepairBeginDate,HRepairEndDate,HRepairContent,HCycleUnit,HMainSourceBillType,HMainSourceInterID,HMainSourceEntryID" +
+                ",HRepairCategory,HUrgenLevel,HRepairer,HIsCapacityImpact" +
                 ") " +
                 " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" +
                 ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HMaker + "',getdate()" +
                 ", " + omodel.HEquipID.ToString() + "," + omodel.HRepairID.ToString() + "," + omodel.HPlanTimes.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HTimes.ToString() +
                 ", " + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "','" + omodel.HRepairBeginDate + "','" + omodel.HRepairEndDate + "','" + omodel.HRepairContent + "','" + omodel.HCycleUnit + "','" +
                  omodel.HMainSourceBillType+"',"+ omodel.HMainSourceInterID.ToString()+","+ omodel.HMainSourceEntryID.ToString() +
-                ") ");
+                ",'"+ omodel.HRepairCategory + "','" + omodel.HUrgenLevel + "','" + omodel.HRepairer + "','" + omodel.HIsCapacityImpact + "') ");
                 //鎻掑叆瀛愯〃
                 foreach (Models.ClsSb_EquipRepairWorkBillSub oSub in DetailColl)
                 {
diff --git a/WebAPI/Exceptions/EmptyException.cs b/WebAPI/Exceptions/EmptyException.cs
new file mode 100644
index 0000000..6d9211b
--- /dev/null
+++ b/WebAPI/Exceptions/EmptyException.cs
@@ -0,0 +1,17 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace WebAPI.Exceptions
+{
+    /// <summary>
+    /// 绌烘暟鎹紓甯�
+    /// </summary>
+    public class EmptyException : Exception
+    {
+        public EmptyException(string message): base(message)
+        { 
+        }
+    }
+}
\ No newline at end of file
diff --git a/WebAPI/Exceptions/ExcelException.cs b/WebAPI/Exceptions/ExcelException.cs
new file mode 100644
index 0000000..f7583df
--- /dev/null
+++ b/WebAPI/Exceptions/ExcelException.cs
@@ -0,0 +1,17 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace WebAPI.Exceptions
+{
+    /// <summary>
+    /// EXCEL寮傚父鎶ラ敊绫�
+    /// </summary>
+    public class ExcelException : Exception
+    {
+        public ExcelException(string message) : base(message)
+        {
+        }
+    }
+}
\ No newline at end of file
diff --git a/WebAPI/ListModels.cs b/WebAPI/ListModels.cs
index a1b3896..dd4e323 100644
--- a/WebAPI/ListModels.cs
+++ b/WebAPI/ListModels.cs
@@ -873,6 +873,19 @@
         }
 
         /// <summary>
+        /// 澶勭悊鏂板妯″叿淇濆吇璁″垝鍗曞瓙琛╛璁″垝鐨刯son
+        /// </summary>
+        /// <param name="jsonString"></param>
+        /// <returns></returns>
+        public List<Model.ClsSc_MouldMaintainPlanBillSub_Plan> getObjectByJson_Sc_MouldMaintainPlanBillSub_Plan(string jsonString)
+        {
+            jsonString = "[" + jsonString.ToString() + "]";
+            List<Model.ClsSc_MouldMaintainPlanBillSub_Plan> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSc_MouldMaintainPlanBillSub_Plan>>(jsonString);
+            return list;
+        }
+
+
+        /// <summary>
         /// 澶勭悊鏂板妯″叿淇濆吇璁″垝鍗曞瓙琛ㄤ繚鍏讳俊鎭殑json
         /// </summary>
         /// <param name="jsonString"></param>
diff --git a/WebAPI/Models/ClsOA_ErrMsgBackBillMain.cs b/WebAPI/Models/ClsOA_ErrMsgBackBillMain.cs
index 3211b23..04f0a91 100644
--- a/WebAPI/Models/ClsOA_ErrMsgBackBillMain.cs
+++ b/WebAPI/Models/ClsOA_ErrMsgBackBillMain.cs
@@ -36,5 +36,6 @@
         public Int64 HSourceID; // int --生产资源 
         public Int64 HShiftsID; // int --生产班次(Gy_Shifts) 
         public string HErrLev; // varchar(100) --影响面程度(停线、批量不良、偶发不良、无法判断)
+        public Int64 HCenterID; // int --工作中心
     }
 }
diff --git a/WebAPI/Models/ClsSb_EquipRepairWorkBillMain.cs b/WebAPI/Models/ClsSb_EquipRepairWorkBillMain.cs
index 9d2c6bc..a1fa11b 100644
--- a/WebAPI/Models/ClsSb_EquipRepairWorkBillMain.cs
+++ b/WebAPI/Models/ClsSb_EquipRepairWorkBillMain.cs
@@ -23,6 +23,10 @@
         public string HCycleUnit;//varchar(10)	--时间单位(小时,天)
         public Single HPlanTimes;// money         --计划维修工时
         public Single HTimes;// money       --实际维修工时
-        
+        public string HRepairCategory;//        --报修类别
+        public string HUrgenLevel;//        --紧急程度
+        public string HRepairer;//        --报修人
+        public string HIsCapacityImpact;//       --是否有产能影响
+
     }
 }
diff --git a/WebAPI/Models/Gy_Group.cs b/WebAPI/Models/Gy_Group.cs
index f9652d8..22e4f7d 100644
--- a/WebAPI/Models/Gy_Group.cs
+++ b/WebAPI/Models/Gy_Group.cs
@@ -26,6 +26,8 @@
 
         public string HCompName { get; set; }//鍔冲姟鍗曚綅
 
+        public string HPayMentType { get; set; }//璁颁欢绫诲瀷
+
 
     }
 }
\ No newline at end of file
diff --git a/WebAPI/Models/Gy_Mould.cs b/WebAPI/Models/Gy_Mould.cs
index fdca95b..2d4d1ac 100644
--- a/WebAPI/Models/Gy_Mould.cs
+++ b/WebAPI/Models/Gy_Mould.cs
@@ -69,6 +69,7 @@
         public int HNowSPID { get; set; }
 
         public double HInitLife { get; set; }
+        public string HMouldUseStatus { get; set; }
 
     }
 }
\ No newline at end of file
diff --git a/WebAPI/Models/Query/QueryModel.cs b/WebAPI/Models/Query/QueryModel.cs
new file mode 100644
index 0000000..4e813c0
--- /dev/null
+++ b/WebAPI/Models/Query/QueryModel.cs
@@ -0,0 +1,23 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace WebAPI.Models.Query
+{
+    /// <summary>
+    /// 鏌ヨ绫�
+    /// </summary>
+    public class QueryModel
+    {
+        /// <summary>
+        /// sql鏌ヨ璇彞
+        /// </summary>
+        public string sWhere { get; set; }
+
+        /// <summary>
+        /// 鏌ヨ鐢ㄦ埛
+        /// </summary>
+        public string user { get; set; }
+    }
+}
\ No newline at end of file
diff --git a/WebAPI/Models/QueryModel.cs b/WebAPI/Models/QueryModel.cs
new file mode 100644
index 0000000..3c3ffa1
--- /dev/null
+++ b/WebAPI/Models/QueryModel.cs
@@ -0,0 +1,21 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Model
+{
+    public class QueryModel
+    {
+        /// <summary>
+        /// sql鏌ヨ璇彞
+        /// </summary>
+        public string sWhere { get; set; }
+
+        /// <summary>
+        /// 鏌ヨ鐢ㄦ埛
+        /// </summary>
+        public string user { get; set; }
+    }
+}
diff --git a/WebAPI/Models/StationBill.cs b/WebAPI/Models/StationBill.cs
index 2061bf9..b7f91d3 100644
--- a/WebAPI/Models/StationBill.cs
+++ b/WebAPI/Models/StationBill.cs
@@ -92,5 +92,6 @@
         public long HMaterToSourceInterID { get; set; }
         public string HMaterToSourceBillNo { get; set; }
         public int HMouldID { get; set; }
+        public string HDate { get; set; }
     }
 }
\ No newline at end of file
diff --git "a/WebAPI/Models/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Process.cs" "b/WebAPI/Models/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Process.cs"
index a1a1b3a..925ed86 100644
--- "a/WebAPI/Models/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Process.cs"
+++ "b/WebAPI/Models/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Process.cs"
@@ -48,5 +48,7 @@
         public int HQCSchemeID_Fst { get; set; }
         public int HQCSchemeID_Proc { get; set; }
         public int HQCSchemeID_Patrol { get; set; }
+        public string HPayMentType { get; set; }
+
     }
 }
\ No newline at end of file
diff --git a/WebAPI/Properties/PublishProfiles/FolderProfile10.pubxml.user b/WebAPI/Properties/PublishProfiles/FolderProfile10.pubxml.user
index 52cdfaa..11fe073 100644
--- a/WebAPI/Properties/PublishProfiles/FolderProfile10.pubxml.user
+++ b/WebAPI/Properties/PublishProfiles/FolderProfile10.pubxml.user
@@ -4,12 +4,16 @@
 -->
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
+<<<<<<< HEAD
     <History>True|2024-10-10T01:20:57.7783364Z;False|2024-10-10T09:20:10.8221644+08:00;True|2024-10-09T08:49:22.1848893+08:00;False|2024-10-09T08:48:40.5932270+08:00;True|2024-10-09T08:40:29.9989815+08:00;False|2024-10-09T08:39:45.7279311+08:00;True|2024-09-29T10:44:45.8122563+08:00;True|2024-09-29T10:37:04.9148934+08:00;False|2024-09-29T10:36:08.2864165+08:00;True|2024-09-26T20:54:30.2118641+08:00;True|2024-09-26T20:42:07.9287721+08:00;True|2024-09-26T20:22:41.4824127+08:00;True|2024-09-26T16:31:50.6152466+08:00;True|2024-09-26T15:53:40.7117538+08:00;True|2024-09-26T15:13:00.9866970+08:00;True|2024-09-26T14:35:36.7604454+08:00;True|2024-09-26T11:11:47.9891891+08:00;False|2024-09-26T11:11:01.5036268+08:00;True|2024-09-26T10:45:07.1552480+08:00;False|2024-09-26T10:44:06.6593537+08:00;True|2024-09-25T16:07:11.4134593+08:00;False|2024-09-25T16:06:08.0731439+08:00;True|2024-09-25T14:39:10.0505260+08:00;True|2024-09-25T13:18:18.1313831+08:00;True|2024-09-25T10:37:26.6757003+08:00;False|2024-09-25T10:36:48.1910470+08:00;True|2024-09-24T20:10:41.0520259+08:00;False|2024-09-24T20:09:45.7807962+08:00;True|2024-09-19T16:42:08.0598619+08:00;True|2024-09-19T16:32:26.7785955+08:00;False|2024-09-19T16:31:43.4990851+08:00;True|2024-09-19T15:36:45.2033244+08:00;False|2024-09-19T15:35:51.1927491+08:00;True|2024-09-18T16:52:00.1148169+08:00;True|2024-09-18T15:38:57.9090829+08:00;True|2024-09-18T14:31:35.3097924+08:00;True|2024-09-18T14:14:45.1332631+08:00;True|2024-09-18T10:03:32.4149929+08:00;True|2024-09-18T09:59:34.6584259+08:00;False|2024-09-18T09:59:28.1320018+08:00;True|2024-09-16T09:25:02.1321635+08:00;False|2024-09-16T09:24:52.9179557+08:00;True|2024-09-14T16:00:39.9413222+08:00;True|2024-09-14T15:57:04.7663346+08:00;True|2024-09-14T15:53:17.2804503+08:00;False|2024-09-14T15:53:10.3529010+08:00;True|2024-09-14T11:12:47.6871531+08:00;True|2024-09-14T11:09:14.5541471+08:00;True|2024-09-14T11:04:01.8286675+08:00;False|2024-09-14T11:03:52.5770773+08:00;True|2024-09-13T14:33:50.5043085+08:00;False|2024-09-13T14:33:44.9903004+08:00;True|2024-09-13T13:37:51.1937510+08:00;True|2024-09-13T10:20:53.2644847+08:00;False|2024-09-13T10:19:33.7686753+08:00;True|2024-09-12T19:15:21.9135805+08:00;False|2024-09-12T19:15:07.2717017+08:00;True|2024-09-12T17:25:26.5527019+08:00;True|2024-09-12T17:20:42.2498355+08:00;True|2024-09-12T17:16:44.8817635+08:00;True|2024-09-12T17:16:02.4132675+08:00;True|2024-09-12T17:08:14.2819047+08:00;True|2024-09-12T16:07:15.3675281+08:00;True|2024-09-12T16:06:23.8568906+08:00;True|2024-09-12T15:48:45.1455315+08:00;True|2024-09-12T14:59:30.0679595+08:00;True|2024-09-12T14:18:21.9534092+08:00;True|2024-09-12T14:07:35.2885035+08:00;False|2024-09-12T14:06:30.5732168+08:00;False|2024-09-12T14:06:17.1404767+08:00;True|2024-09-12T14:03:12.8150228+08:00;True|2024-09-12T13:53:20.7537798+08:00;True|2024-09-12T13:48:43.2408012+08:00;False|2024-09-12T13:48:36.5217018+08:00;True|2024-09-11T20:20:57.7845361+08:00;False|2024-09-11T20:20:38.9732855+08:00;True|2024-09-10T15:15:04.6204983+08:00;True|2024-09-10T11:33:55.3963324+08:00;True|2024-09-10T11:10:10.3836571+08:00;True|2024-09-10T10:39:06.5850395+08:00;True|2024-09-10T10:27:33.2463582+08:00;False|2024-09-10T10:26:05.4608008+08:00;True|2024-09-09T19:14:08.0718627+08:00;True|2024-09-09T19:08:42.5709780+08:00;False|2024-09-09T19:08:33.7817129+08:00;True|2024-09-06T17:00:13.2484828+08:00;False|2024-09-06T17:00:06.1281061+08:00;True|2024-09-05T11:39:53.4537518+08:00;False|2024-09-05T11:39:04.6111418+08:00;True|2024-09-04T12:39:24.8111127+08:00;True|2024-09-04T12:12:57.9411095+08:00;False|2024-09-04T12:12:28.6748628+08:00;True|2024-09-03T14:45:30.8259459+08:00;False|2024-09-03T14:45:19.1997455+08:00;True|2024-08-30T16:08:31.2415230+08:00;True|2024-08-30T15:18:36.6727666+08:00;True|2024-08-28T09:49:18.1543721+08:00;False|2024-08-28T09:49:11.7260337+08:00;True|2024-08-27T13:18:40.6234335+08:00;False|2024-08-27T13:18:33.9730040+08:00;True|2024-08-26T17:40:29.9158973+08:00;True|2024-08-26T17:21:30.8800173+08:00;True|2024-08-26T17:19:23.9260010+08:00;True|2024-08-26T14:27:20.8154004+08:00;True|2024-08-26T14:16:14.4482284+08:00;True|2024-08-26T13:12:42.9574127+08:00;True|2024-08-26T12:48:31.2107630+08:00;True|2024-08-26T11:07:15.1181342+08:00;False|2024-08-26T11:07:09.9429791+08:00;True|2024-08-26T10:49:20.8494484+08:00;True|2024-08-26T10:13:11.5222607+08:00;False|2024-08-26T10:12:59.1146882+08:00;True|2024-08-23T15:39:39.9842990+08:00;False|2024-08-23T15:39:33.9824708+08:00;True|2024-08-22T16:55:46.4689463+08:00;True|2024-08-22T16:44:25.0981764+08:00;True|2024-08-22T16:19:29.9801909+08:00;True|2024-08-22T14:25:13.5120259+08:00;True|2024-08-22T09:48:50.0760398+08:00;True|2024-08-21T16:09:41.0487181+08:00;True|2024-08-21T15:42:13.7474317+08:00;True|2024-08-21T15:10:24.6912112+08:00;True|2024-08-21T14:56:51.3255866+08:00;True|2024-08-21T14:50:12.3359730+08:00;True|2024-08-19T15:43:16.1549663+08:00;True|2024-08-19T15:27:26.4219971+08:00;True|2024-08-19T09:41:45.7449029+08:00;True|2024-06-08T12:38:30.4153773+08:00;True|2024-06-07T21:22:19.4545597+08:00;True|2024-06-07T21:05:53.1963741+08:00;True|2024-06-07T21:00:57.2568708+08:00;True|2024-06-07T14:39:19.6618679+08:00;True|2024-06-07T14:21:51.5169962+08:00;True|2024-06-07T11:29:08.0690999+08:00;True|2024-06-07T11:26:29.1494329+08:00;True|2024-06-07T11:20:41.2024309+08:00;True|2024-06-07T10:12:26.5905597+08:00;False|2024-06-07T10:11:35.3679434+08:00;</History>
+=======
+    <History>True|2024-10-09T08:29:57.1468906Z;True|2024-10-09T14:03:09.2281786+08:00;True|2024-10-09T13:21:06.6101996+08:00;True|2024-10-09T13:02:11.2267277+08:00;True|2024-10-09T12:55:32.8160247+08:00;True|2024-10-09T11:43:26.9890355+08:00;True|2024-10-09T10:24:01.6949058+08:00;True|2024-10-09T10:11:25.4766977+08:00;False|2024-10-09T10:11:19.1851145+08:00;True|2024-10-08T20:15:35.4234814+08:00;True|2024-10-08T20:06:06.2945727+08:00;True|2024-10-08T19:49:49.1754103+08:00;True|2024-10-08T17:34:17.5322468+08:00;True|2024-10-08T17:12:12.3620840+08:00;False|2024-10-08T17:12:04.5176642+08:00;True|2024-10-08T12:14:49.3930712+08:00;True|2024-10-08T11:02:49.9540132+08:00;False|2024-10-08T11:02:39.1418793+08:00;True|2024-09-27T15:00:21.0482043+08:00;True|2024-09-27T14:57:07.0747471+08:00;True|2024-09-27T14:53:52.8423718+08:00;True|2024-09-27T13:29:58.8925618+08:00;False|2024-09-27T13:29:52.7163123+08:00;True|2024-09-26T20:27:04.5201970+08:00;True|2024-09-26T19:16:26.6734751+08:00;True|2024-09-26T19:13:46.3429211+08:00;True|2024-09-26T18:50:55.3033341+08:00;True|2024-09-26T18:35:44.3607797+08:00;True|2024-09-26T18:33:11.2986890+08:00;True|2024-09-26T18:08:00.5018121+08:00;True|2024-09-26T17:57:04.3987105+08:00;False|2024-09-26T17:55:37.3316215+08:00;True|2024-09-26T17:53:52.1377436+08:00;False|2024-09-26T17:53:46.2067050+08:00;True|2024-09-25T17:21:24.1078881+08:00;True|2024-09-25T17:04:17.9619045+08:00;True|2024-09-23T10:58:34.6129284+08:00;True|2024-09-23T10:58:28.2863739+08:00;True|2024-09-23T10:46:39.8062504+08:00;False|2024-09-23T10:46:28.2127212+08:00;True|2024-09-23T10:41:36.7887633+08:00;False|2024-09-23T10:41:31.1693720+08:00;True|2024-09-20T14:36:35.1508292+08:00;True|2024-09-20T14:23:14.7828767+08:00;True|2024-09-20T10:20:42.4614808+08:00;False|2024-09-20T10:20:30.9842799+08:00;True|2024-09-19T14:20:56.6643781+08:00;True|2024-09-19T09:54:32.7563188+08:00;False|2024-09-19T09:54:16.5345071+08:00;True|2024-09-19T09:07:11.2182586+08:00;False|2024-09-19T09:07:00.2356340+08:00;True|2024-09-18T16:52:00.1148169+08:00;True|2024-09-18T15:38:57.9090829+08:00;True|2024-09-18T14:31:35.3097924+08:00;True|2024-09-18T14:14:45.1332631+08:00;True|2024-09-18T10:03:32.4149929+08:00;True|2024-09-18T09:59:34.6584259+08:00;False|2024-09-18T09:59:28.1320018+08:00;True|2024-09-16T09:25:02.1321635+08:00;False|2024-09-16T09:24:52.9179557+08:00;True|2024-09-14T16:00:39.9413222+08:00;True|2024-09-14T15:57:04.7663346+08:00;True|2024-09-14T15:53:17.2804503+08:00;False|2024-09-14T15:53:10.3529010+08:00;True|2024-09-14T11:12:47.6871531+08:00;True|2024-09-14T11:09:14.5541471+08:00;True|2024-09-14T11:04:01.8286675+08:00;False|2024-09-14T11:03:52.5770773+08:00;True|2024-09-13T14:33:50.5043085+08:00;False|2024-09-13T14:33:44.9903004+08:00;True|2024-09-13T13:37:51.1937510+08:00;True|2024-09-13T10:20:53.2644847+08:00;False|2024-09-13T10:19:33.7686753+08:00;True|2024-09-12T19:15:21.9135805+08:00;False|2024-09-12T19:15:07.2717017+08:00;True|2024-09-12T17:25:26.5527019+08:00;True|2024-09-12T17:20:42.2498355+08:00;True|2024-09-12T17:16:44.8817635+08:00;True|2024-09-12T17:16:02.4132675+08:00;True|2024-09-12T17:08:14.2819047+08:00;True|2024-09-12T16:07:15.3675281+08:00;True|2024-09-12T16:06:23.8568906+08:00;True|2024-09-12T15:48:45.1455315+08:00;True|2024-09-12T14:59:30.0679595+08:00;True|2024-09-12T14:18:21.9534092+08:00;True|2024-09-12T14:07:35.2885035+08:00;False|2024-09-12T14:06:30.5732168+08:00;False|2024-09-12T14:06:17.1404767+08:00;True|2024-09-12T14:03:12.8150228+08:00;True|2024-09-12T13:53:20.7537798+08:00;True|2024-09-12T13:48:43.2408012+08:00;False|2024-09-12T13:48:36.5217018+08:00;True|2024-09-11T20:20:57.7845361+08:00;False|2024-09-11T20:20:38.9732855+08:00;True|2024-09-10T15:15:04.6204983+08:00;True|2024-09-10T11:33:55.3963324+08:00;True|2024-09-10T11:10:10.3836571+08:00;True|2024-09-10T10:39:06.5850395+08:00;True|2024-09-10T10:27:33.2463582+08:00;False|2024-09-10T10:26:05.4608008+08:00;True|2024-09-09T19:14:08.0718627+08:00;True|2024-09-09T19:08:42.5709780+08:00;False|2024-09-09T19:08:33.7817129+08:00;True|2024-09-06T17:00:13.2484828+08:00;False|2024-09-06T17:00:06.1281061+08:00;True|2024-09-05T11:39:53.4537518+08:00;False|2024-09-05T11:39:04.6111418+08:00;True|2024-09-04T12:39:24.8111127+08:00;True|2024-09-04T12:12:57.9411095+08:00;False|2024-09-04T12:12:28.6748628+08:00;True|2024-09-03T14:45:30.8259459+08:00;False|2024-09-03T14:45:19.1997455+08:00;True|2024-08-30T16:08:31.2415230+08:00;True|2024-08-30T15:18:36.6727666+08:00;True|2024-08-28T09:49:18.1543721+08:00;False|2024-08-28T09:49:11.7260337+08:00;True|2024-08-27T13:18:40.6234335+08:00;False|2024-08-27T13:18:33.9730040+08:00;True|2024-08-26T17:40:29.9158973+08:00;True|2024-08-26T17:21:30.8800173+08:00;True|2024-08-26T17:19:23.9260010+08:00;True|2024-08-26T14:27:20.8154004+08:00;True|2024-08-26T14:16:14.4482284+08:00;True|2024-08-26T13:12:42.9574127+08:00;True|2024-08-26T12:48:31.2107630+08:00;True|2024-08-26T11:07:15.1181342+08:00;False|2024-08-26T11:07:09.9429791+08:00;True|2024-08-26T10:49:20.8494484+08:00;True|2024-08-26T10:13:11.5222607+08:00;False|2024-08-26T10:12:59.1146882+08:00;True|2024-08-23T15:39:39.9842990+08:00;False|2024-08-23T15:39:33.9824708+08:00;True|2024-08-22T16:55:46.4689463+08:00;True|2024-08-22T16:44:25.0981764+08:00;True|2024-08-22T16:19:29.9801909+08:00;True|2024-08-22T14:25:13.5120259+08:00;True|2024-08-22T09:48:50.0760398+08:00;True|2024-08-21T16:09:41.0487181+08:00;True|2024-08-21T15:42:13.7474317+08:00;True|2024-08-21T15:10:24.6912112+08:00;True|2024-08-21T14:56:51.3255866+08:00;True|2024-08-21T14:50:12.3359730+08:00;True|2024-08-19T15:43:16.1549663+08:00;True|2024-08-19T15:27:26.4219971+08:00;True|2024-08-19T09:41:45.7449029+08:00;True|2024-06-08T12:38:30.4153773+08:00;True|2024-06-07T21:22:19.4545597+08:00;True|2024-06-07T21:05:53.1963741+08:00;True|2024-06-07T21:00:57.2568708+08:00;True|2024-06-07T14:39:19.6618679+08:00;True|2024-06-07T14:21:51.5169962+08:00;True|2024-06-07T11:29:08.0690999+08:00;True|2024-06-07T11:26:29.1494329+08:00;True|2024-06-07T11:20:41.2024309+08:00;True|2024-06-07T10:12:26.5905597+08:00;False|2024-06-07T10:11:35.3679434+08:00;</History>
+>>>>>>> fa997fd4354db116cfae04f1232779ce0b38f629
     <_PublishTargetUrl>D:\缃戠珯鍙戝竷\鏅轰簯MESWMS\API</_PublishTargetUrl>
   </PropertyGroup>
   <ItemGroup>
     <File Include="apiapp.json">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="bin/AlibabaCloud.EndpointUtil.dll">
       <publishTime>04/07/2020 16:33:48</publishTime>
@@ -45,28 +49,49 @@
       <publishTime>02/22/2013 16:43:40</publishTime>
     </File>
     <File Include="bin/BLL.dll">
+<<<<<<< HEAD
       <publishTime>10/10/2024 09:20:24</publishTime>
     </File>
     <File Include="bin/BLL.pdb">
       <publishTime>10/10/2024 09:20:24</publishTime>
+=======
+      <publishTime>10/09/2024 16:29:38</publishTime>
+    </File>
+    <File Include="bin/BLL.pdb">
+      <publishTime>10/09/2024 16:29:38</publishTime>
+>>>>>>> fa997fd4354db116cfae04f1232779ce0b38f629
     </File>
     <File Include="bin/BouncyCastle.Crypto.dll">
       <publishTime>12/18/2020 05:32:28</publishTime>
     </File>
     <File Include="bin/DAL.dll">
+<<<<<<< HEAD
       <publishTime>10/10/2024 09:20:23</publishTime>
     </File>
     <File Include="bin/DAL.pdb">
       <publishTime>10/10/2024 09:20:23</publishTime>
+=======
+      <publishTime>10/09/2024 16:29:37</publishTime>
+    </File>
+    <File Include="bin/DAL.pdb">
+      <publishTime>10/09/2024 16:29:37</publishTime>
+>>>>>>> fa997fd4354db116cfae04f1232779ce0b38f629
     </File>
     <File Include="bin/Dapper.dll">
       <publishTime>07/22/2016 22:52:40</publishTime>
     </File>
     <File Include="bin/DBUtility.dll">
+<<<<<<< HEAD
       <publishTime>10/10/2024 09:20:18</publishTime>
     </File>
     <File Include="bin/DBUtility.pdb">
       <publishTime>10/10/2024 09:20:18</publishTime>
+=======
+      <publishTime>10/09/2024 16:29:34</publishTime>
+    </File>
+    <File Include="bin/DBUtility.pdb">
+      <publishTime>10/09/2024 16:29:34</publishTime>
+>>>>>>> fa997fd4354db116cfae04f1232779ce0b38f629
     </File>
     <File Include="bin/Grpc.Core.Api.dll">
       <publishTime>03/22/2022 13:17:26</publishTime>
@@ -93,7 +118,7 @@
       <publishTime>05/09/2021 01:08:30</publishTime>
     </File>
     <File Include="bin/Kingdee.BOS.WebApi.Client.dll">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="bin/libgrpc_csharp_ext.x64.dylib">
       <publishTime>03/19/2022 07:38:44</publishTime>
@@ -111,13 +136,20 @@
       <publishTime>07/25/2012 19:48:56</publishTime>
     </File>
     <File Include="bin/Model.dll">
+<<<<<<< HEAD
       <publishTime>10/10/2024 09:20:19</publishTime>
     </File>
     <File Include="bin/Model.pdb">
       <publishTime>10/10/2024 09:20:19</publishTime>
+=======
+      <publishTime>10/09/2024 16:29:35</publishTime>
+    </File>
+    <File Include="bin/Model.pdb">
+      <publishTime>10/09/2024 16:29:35</publishTime>
+>>>>>>> fa997fd4354db116cfae04f1232779ce0b38f629
     </File>
     <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="bin/Newtonsoft.Json.dll">
       <publishTime>03/08/2023 15:09:56</publishTime>
@@ -147,6 +179,7 @@
       <publishTime>10/23/2021 17:07:54</publishTime>
     </File>
     <File Include="bin/Pub_Class.dll">
+<<<<<<< HEAD
       <publishTime>10/10/2024 09:20:17</publishTime>
     </File>
     <File Include="bin/Pub_Class.pdb">
@@ -157,24 +190,50 @@
     </File>
     <File Include="bin/Pub_Control.pdb">
       <publishTime>10/10/2024 09:20:18</publishTime>
+=======
+      <publishTime>10/09/2024 16:29:33</publishTime>
+    </File>
+    <File Include="bin/Pub_Class.pdb">
+      <publishTime>10/09/2024 16:29:33</publishTime>
+    </File>
+    <File Include="bin/Pub_Control.dll">
+      <publishTime>10/09/2024 16:29:34</publishTime>
+    </File>
+    <File Include="bin/Pub_Control.pdb">
+      <publishTime>10/09/2024 16:29:34</publishTime>
+>>>>>>> fa997fd4354db116cfae04f1232779ce0b38f629
     </File>
     <File Include="bin/RestSharp.dll">
       <publishTime>08/31/2012 06:22:50</publishTime>
     </File>
     <File Include="bin/SQLHelper.dll">
+<<<<<<< HEAD
       <publishTime>10/10/2024 09:20:18</publishTime>
     </File>
     <File Include="bin/SQLHelper.pdb">
       <publishTime>10/10/2024 09:20:18</publishTime>
+=======
+      <publishTime>10/09/2024 16:29:34</publishTime>
+    </File>
+    <File Include="bin/SQLHelper.pdb">
+      <publishTime>10/09/2024 16:29:34</publishTime>
+>>>>>>> fa997fd4354db116cfae04f1232779ce0b38f629
     </File>
     <File Include="bin/Swashbuckle.Core.dll">
       <publishTime>02/16/2015 01:57:08</publishTime>
     </File>
     <File Include="bin/SyntacticSugar.dll">
+<<<<<<< HEAD
       <publishTime>10/10/2024 09:17:57</publishTime>
     </File>
     <File Include="bin/SyntacticSugar.pdb">
       <publishTime>10/10/2024 09:17:57</publishTime>
+=======
+      <publishTime>10/09/2024 16:29:27</publishTime>
+    </File>
+    <File Include="bin/SyntacticSugar.pdb">
+      <publishTime>10/09/2024 16:29:27</publishTime>
+>>>>>>> fa997fd4354db116cfae04f1232779ce0b38f629
     </File>
     <File Include="bin/System.Buffers.dll">
       <publishTime>07/19/2017 18:01:28</publishTime>
@@ -252,7 +311,7 @@
       <publishTime>11/28/2018 21:01:00</publishTime>
     </File>
     <File Include="bin/System.Web.Http.WebHost.dll">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="bin/System.Web.Mvc.dll">
       <publishTime>01/28/2015 12:02:18</publishTime>
@@ -285,19 +344,33 @@
       <publishTime>05/09/2023 10:43:40</publishTime>
     </File>
     <File Include="bin/TopSdk.dll">
+<<<<<<< HEAD
       <publishTime>10/10/2024 09:18:03</publishTime>
     </File>
     <File Include="bin/TopSdk.pdb">
       <publishTime>10/10/2024 09:18:03</publishTime>
+=======
+      <publishTime>10/09/2024 16:29:24</publishTime>
+    </File>
+    <File Include="bin/TopSdk.pdb">
+      <publishTime>10/09/2024 16:29:24</publishTime>
+>>>>>>> fa997fd4354db116cfae04f1232779ce0b38f629
     </File>
     <File Include="bin/WebActivatorEx.dll">
       <publishTime>11/24/2014 19:18:48</publishTime>
     </File>
     <File Include="bin/WebAPI.dll">
+<<<<<<< HEAD
       <publishTime>10/10/2024 09:20:55</publishTime>
     </File>
     <File Include="bin/WebAPI.pdb">
       <publishTime>10/10/2024 09:20:55</publishTime>
+=======
+      <publishTime>10/09/2024 16:29:55</publishTime>
+    </File>
+    <File Include="bin/WebAPI.pdb">
+      <publishTime>10/09/2024 16:29:55</publishTime>
+>>>>>>> fa997fd4354db116cfae04f1232779ce0b38f629
     </File>
     <File Include="bin/WebGrease.dll">
       <publishTime>07/18/2013 01:03:52</publishTime>
@@ -309,58 +382,58 @@
       <publishTime>11/29/2018 21:26:30</publishTime>
     </File>
     <File Include="Config/kdapi.config">
-      <publishTime>04/06/2023 15:57:01</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Content/bootstrap.css">
-      <publishTime>04/06/2023 15:57:01</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Content/bootstrap.min.css">
-      <publishTime>04/06/2023 15:57:01</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Content/Site.css">
-      <publishTime>04/06/2023 15:57:01</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="DLL/BLL.dll">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="DLL/DAL.dll">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="DLL/DBUtility.dll">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="DLL/Kingdee.BOS.WebApi.Client.dll">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="DLL/Model.dll">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="DLL/Newtonsoft.Json.Net35.dll">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="DLL/Pub_Class.dll">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="DLL/Pub_Control.dll">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="DLL/SQLHelper.dll">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="fonts/glyphicons-halflings-regular.eot">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="fonts/glyphicons-halflings-regular.svg">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="fonts/glyphicons-halflings-regular.ttf">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="fonts/glyphicons-halflings-regular.woff">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Global.asax">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="grpc_csharp_ext.x64.dll">
       <publishTime>03/22/2022 13:17:22</publishTime>
@@ -369,7 +442,7 @@
       <publishTime>03/22/2022 13:17:22</publishTime>
     </File>
     <File Include="Index.html">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="libgrpc_csharp_ext.x64.dylib">
       <publishTime>03/19/2022 07:38:44</publishTime>
@@ -378,121 +451,129 @@
       <publishTime>03/19/2022 07:38:42</publishTime>
     </File>
     <File Include="libman.json">
-      <publishTime>07/12/2023 08:14:21</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Metadata/deploymentTemplates/apiappconfig.azureresource.json">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="packages.config">
+<<<<<<< HEAD
       <publishTime>09/19/2024 10:10:46</publishTime>
+=======
+      <publishTime>09/19/2024 09:05:04</publishTime>
+>>>>>>> fa997fd4354db116cfae04f1232779ce0b38f629
     </File>
     <File Include="Views/Scripts/bootstrap.js">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Views/Scripts/bootstrap.min.js">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Views/Scripts/jquery-1.10.2.js">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Views/Scripts/jquery-1.10.2.min.js">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Views/Scripts/jquery-1.10.2.min.map">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Views/Scripts/jquery.validate.js">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Views/Scripts/jquery.validate.min.js">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Views/Scripts/jquery.validate.unobtrusive.js">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Views/Scripts/jquery.validate.unobtrusive.min.js">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Views/Scripts/modernizr-2.6.2.js">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Views/Shared/Error.cshtml">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Views/Shared/_Layout.cshtml">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Views/web.config">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Views/_ViewStart.cshtml">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_Customer_Model.datasource">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_Department_Model.datasource">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_Employee_Model.datasource">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_StockPlace_Model.datasource">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_Supplier_Model.datasource">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsCLD_Warehouse_Model.datasource">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_BadReason_Model.datasource">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_BarCodeBill_WMS_Model.datasource">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_BarCodeBill_WMS_Model_View.datasource">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Customer_Model.datasource">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Department_Model.datasource">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Employee_Model.datasource">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Group_Model.datasource">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Item30JiTai_Model.datasource">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Source_Model.datasource">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_StockPlace_Model.datasource">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Supplier_Model.datasource">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsGy_Warehouse_Model.datasource">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsKf_ICStockBill_Mould.datasource">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web References/WebS/ClsKf_ICStockBill_WMS.datasource">
-      <publishTime>04/06/2023 15:57:02</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web References/WebS/Reference.map">
-      <publishTime>05/06/2024 13:47:57</publishTime>
+      <publishTime>05/25/2024 09:46:41</publishTime>
     </File>
     <File Include="Web.config">
+<<<<<<< HEAD
       <publishTime>09/19/2024 15:36:40</publishTime>
+=======
+      <publishTime>10/09/2024 16:29:56</publishTime>
+>>>>>>> fa997fd4354db116cfae04f1232779ce0b38f629
     </File>
   </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/WebAPI/Properties/PublishProfiles/FolderProfilewtt.pubxml.user b/WebAPI/Properties/PublishProfiles/FolderProfilewtt.pubxml.user
index af6ed9a..b25b7c5 100644
--- a/WebAPI/Properties/PublishProfiles/FolderProfilewtt.pubxml.user
+++ b/WebAPI/Properties/PublishProfiles/FolderProfilewtt.pubxml.user
@@ -4,7 +4,7 @@
 -->
 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup>
-    <History>True|2024-09-12T12:40:58.7161451Z;False|2024-09-12T20:40:00.0672966+08:00;True|2024-09-12T16:47:22.7671323+08:00;True|2024-09-12T16:34:18.5850144+08:00;True|2024-09-12T16:13:32.1929032+08:00;True|2024-09-12T09:12:54.4456999+08:00;False|2024-09-12T09:12:06.1002866+08:00;False|2024-09-11T21:06:15.4423786+08:00;True|2024-09-10T15:26:48.7055081+08:00;True|2024-09-10T09:26:36.8509916+08:00;True|2024-09-09T19:51:32.6059511+08:00;True|2024-09-09T19:05:47.5349922+08:00;True|2024-09-09T09:26:23.2022383+08:00;False|2024-09-09T09:25:27.3736749+08:00;True|2024-09-06T15:32:52.1865278+08:00;True|2024-09-06T15:16:01.1405794+08:00;True|2024-09-06T14:21:05.7482343+08:00;True|2024-09-06T14:09:17.1494566+08:00;True|2024-09-06T13:49:56.4128481+08:00;True|2024-09-06T13:11:53.0863947+08:00;True|2024-09-06T09:34:54.5934463+08:00;True|2024-09-06T08:47:19.9744092+08:00;True|2024-09-05T15:01:38.6968629+08:00;True|2024-09-05T14:56:09.3505818+08:00;True|2024-09-05T14:49:56.8774757+08:00;True|2024-09-05T08:14:13.2359921+08:00;False|2024-09-05T08:13:11.8797534+08:00;True|2024-09-03T16:52:02.8227375+08:00;False|2024-09-03T16:51:32.4250926+08:00;True|2024-09-03T16:33:05.7269609+08:00;True|2024-09-03T16:00:15.0288548+08:00;True|2024-08-29T08:06:32.4732067+08:00;False|2024-08-29T08:06:02.4801886+08:00;True|2024-08-26T10:17:08.7733750+08:00;False|2024-08-26T10:11:05.1864217+08:00;False|2024-08-26T09:50:31.1539306+08:00;False|2024-08-26T09:47:37.4351309+08:00;True|2024-08-16T16:55:32.0918962+08:00;True|2024-08-16T16:53:23.3505641+08:00;False|2024-08-16T16:49:30.4579212+08:00;False|2024-08-16T16:47:01.9799743+08:00;</History>
+    <History>True|2024-10-10T02:59:36.7878419Z;False|2024-10-10T10:58:40.9900315+08:00;True|2024-10-03T10:57:02.9299524+08:00;True|2024-10-03T10:02:10.1156720+08:00;True|2024-09-30T11:07:22.5376794+08:00;True|2024-09-30T10:15:40.3990343+08:00;True|2024-09-30T10:04:38.1942221+08:00;True|2024-09-29T19:22:01.5340857+08:00;False|2024-09-29T19:21:12.2387012+08:00;True|2024-09-26T09:50:22.2637977+08:00;True|2024-09-25T20:44:33.3994634+08:00;True|2024-09-25T16:07:23.2747063+08:00;True|2024-09-25T14:55:37.9194143+08:00;True|2024-09-24T20:03:43.9841995+08:00;True|2024-09-24T19:42:48.7479102+08:00;True|2024-09-24T19:38:31.5777012+08:00;True|2024-09-24T16:26:58.5969765+08:00;True|2024-09-24T15:31:00.7140362+08:00;True|2024-09-24T10:17:46.7830753+08:00;True|2024-09-24T09:40:19.5788062+08:00;False|2024-09-24T09:39:27.4521802+08:00;True|2024-09-23T19:35:55.3572583+08:00;True|2024-09-23T18:53:15.4480118+08:00;False|2024-09-23T18:52:22.0135173+08:00;True|2024-09-20T09:59:12.9943442+08:00;False|2024-09-20T09:58:18.6945854+08:00;True|2024-09-12T20:40:58.7161451+08:00;False|2024-09-12T20:40:00.0672966+08:00;True|2024-09-12T16:47:22.7671323+08:00;True|2024-09-12T16:34:18.5850144+08:00;True|2024-09-12T16:13:32.1929032+08:00;True|2024-09-12T09:12:54.4456999+08:00;False|2024-09-12T09:12:06.1002866+08:00;False|2024-09-11T21:06:15.4423786+08:00;True|2024-09-10T15:26:48.7055081+08:00;True|2024-09-10T09:26:36.8509916+08:00;True|2024-09-09T19:51:32.6059511+08:00;True|2024-09-09T19:05:47.5349922+08:00;True|2024-09-09T09:26:23.2022383+08:00;False|2024-09-09T09:25:27.3736749+08:00;True|2024-09-06T15:32:52.1865278+08:00;True|2024-09-06T15:16:01.1405794+08:00;True|2024-09-06T14:21:05.7482343+08:00;True|2024-09-06T14:09:17.1494566+08:00;True|2024-09-06T13:49:56.4128481+08:00;True|2024-09-06T13:11:53.0863947+08:00;True|2024-09-06T09:34:54.5934463+08:00;True|2024-09-06T08:47:19.9744092+08:00;True|2024-09-05T15:01:38.6968629+08:00;True|2024-09-05T14:56:09.3505818+08:00;True|2024-09-05T14:49:56.8774757+08:00;True|2024-09-05T08:14:13.2359921+08:00;False|2024-09-05T08:13:11.8797534+08:00;True|2024-09-03T16:52:02.8227375+08:00;False|2024-09-03T16:51:32.4250926+08:00;True|2024-09-03T16:33:05.7269609+08:00;True|2024-09-03T16:00:15.0288548+08:00;True|2024-08-29T08:06:32.4732067+08:00;False|2024-08-29T08:06:02.4801886+08:00;True|2024-08-26T10:17:08.7733750+08:00;False|2024-08-26T10:11:05.1864217+08:00;False|2024-08-26T09:50:31.1539306+08:00;False|2024-08-26T09:47:37.4351309+08:00;True|2024-08-16T16:55:32.0918962+08:00;True|2024-08-16T16:53:23.3505641+08:00;False|2024-08-16T16:49:30.4579212+08:00;False|2024-08-16T16:47:01.9799743+08:00;</History>
     <_PublishTargetUrl>G:\issWeb\缃戠珯鍙戝竷\API</_PublishTargetUrl>
   </PropertyGroup>
   <ItemGroup>
@@ -45,28 +45,28 @@
       <publishTime>02/22/2013 16:43:40</publishTime>
     </File>
     <File Include="bin/BLL.dll">
-      <publishTime>09/13/2024 15:10:57</publishTime>
+      <publishTime>10/10/2024 10:59:01</publishTime>
     </File>
     <File Include="bin/BLL.pdb">
-      <publishTime>09/13/2024 15:10:57</publishTime>
+      <publishTime>10/10/2024 10:59:01</publishTime>
     </File>
     <File Include="bin/BouncyCastle.Crypto.dll">
       <publishTime>12/18/2020 05:32:28</publishTime>
     </File>
     <File Include="bin/DAL.dll">
-      <publishTime>09/13/2024 15:10:55</publishTime>
+      <publishTime>10/10/2024 10:58:59</publishTime>
     </File>
     <File Include="bin/DAL.pdb">
-      <publishTime>09/13/2024 15:10:55</publishTime>
+      <publishTime>10/10/2024 10:58:59</publishTime>
     </File>
     <File Include="bin/Dapper.dll">
       <publishTime>07/22/2016 22:52:40</publishTime>
     </File>
     <File Include="bin/DBUtility.dll">
-      <publishTime>09/13/2024 15:10:49</publishTime>
+      <publishTime>10/10/2024 10:58:53</publishTime>
     </File>
     <File Include="bin/DBUtility.pdb">
-      <publishTime>09/13/2024 15:10:49</publishTime>
+      <publishTime>10/10/2024 10:58:53</publishTime>
     </File>
     <File Include="bin/Grpc.Core.Api.dll">
       <publishTime>03/22/2022 13:17:26</publishTime>
@@ -111,10 +111,10 @@
       <publishTime>07/25/2012 19:48:56</publishTime>
     </File>
     <File Include="bin/Model.dll">
-      <publishTime>09/13/2024 15:10:50</publishTime>
+      <publishTime>10/10/2024 10:58:55</publishTime>
     </File>
     <File Include="bin/Model.pdb">
-      <publishTime>09/13/2024 15:10:50</publishTime>
+      <publishTime>10/10/2024 10:58:55</publishTime>
     </File>
     <File Include="bin/Models/ClsSc_MouldScrapOutBillMain.cs">
       <publishTime>04/15/2024 12:55:45</publishTime>
@@ -147,34 +147,34 @@
       <publishTime>10/23/2021 17:07:54</publishTime>
     </File>
     <File Include="bin/Pub_Class.dll">
-      <publishTime>09/13/2024 15:10:47</publishTime>
+      <publishTime>10/10/2024 10:58:51</publishTime>
     </File>
     <File Include="bin/Pub_Class.pdb">
-      <publishTime>09/13/2024 15:10:47</publishTime>
+      <publishTime>10/10/2024 10:58:51</publishTime>
     </File>
     <File Include="bin/Pub_Control.dll">
-      <publishTime>09/13/2024 15:10:48</publishTime>
+      <publishTime>10/10/2024 10:58:52</publishTime>
     </File>
     <File Include="bin/Pub_Control.pdb">
-      <publishTime>09/13/2024 15:10:48</publishTime>
+      <publishTime>10/10/2024 10:58:52</publishTime>
     </File>
     <File Include="bin/RestSharp.dll">
       <publishTime>08/31/2012 06:22:50</publishTime>
     </File>
     <File Include="bin/SQLHelper.dll">
-      <publishTime>09/13/2024 15:10:48</publishTime>
+      <publishTime>10/10/2024 10:58:53</publishTime>
     </File>
     <File Include="bin/SQLHelper.pdb">
-      <publishTime>09/13/2024 15:10:48</publishTime>
+      <publishTime>10/10/2024 10:58:53</publishTime>
     </File>
     <File Include="bin/Swashbuckle.Core.dll">
       <publishTime>02/16/2015 01:57:08</publishTime>
     </File>
     <File Include="bin/SyntacticSugar.dll">
-      <publishTime>09/13/2024 15:08:19</publishTime>
+      <publishTime>10/10/2024 10:56:45</publishTime>
     </File>
     <File Include="bin/SyntacticSugar.pdb">
-      <publishTime>09/13/2024 15:08:19</publishTime>
+      <publishTime>10/10/2024 10:56:45</publishTime>
     </File>
     <File Include="bin/System.Buffers.dll">
       <publishTime>07/19/2017 18:01:28</publishTime>
@@ -285,19 +285,19 @@
       <publishTime>05/09/2023 10:43:40</publishTime>
     </File>
     <File Include="bin/TopSdk.dll">
-      <publishTime>09/11/2024 21:15:43</publishTime>
+      <publishTime>10/10/2024 10:56:51</publishTime>
     </File>
     <File Include="bin/TopSdk.pdb">
-      <publishTime>09/11/2024 21:15:51</publishTime>
+      <publishTime>10/10/2024 10:56:51</publishTime>
     </File>
     <File Include="bin/WebActivatorEx.dll">
       <publishTime>11/24/2014 19:18:48</publishTime>
     </File>
     <File Include="bin/WebAPI.dll">
-      <publishTime>09/13/2024 15:11:26</publishTime>
+      <publishTime>10/10/2024 10:59:35</publishTime>
     </File>
     <File Include="bin/WebAPI.pdb">
-      <publishTime>09/13/2024 15:11:26</publishTime>
+      <publishTime>10/10/2024 10:59:35</publishTime>
     </File>
     <File Include="bin/WebAPI.XmlSerializers.dll">
       <publishTime>08/16/2024 16:55:28</publishTime>
@@ -387,7 +387,7 @@
       <publishTime>04/15/2024 12:55:45</publishTime>
     </File>
     <File Include="packages.config">
-      <publishTime>08/16/2024 08:34:04</publishTime>
+      <publishTime>09/20/2024 09:12:39</publishTime>
     </File>
     <File Include="Views/Scripts/bootstrap.js">
       <publishTime>04/15/2024 12:55:46</publishTime>
@@ -495,7 +495,7 @@
       <publishTime>04/29/2024 08:30:03</publishTime>
     </File>
     <File Include="Web.config">
-      <publishTime>09/12/2024 09:12:52</publishTime>
+      <publishTime>10/09/2024 15:06:19</publishTime>
     </File>
   </ItemGroup>
 </Project>
\ No newline at end of file
diff --git a/WebAPI/Utility/TreeUtil.cs b/WebAPI/Utility/TreeUtil.cs
new file mode 100644
index 0000000..9214747
--- /dev/null
+++ b/WebAPI/Utility/TreeUtil.cs
@@ -0,0 +1,74 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Web;
+
+namespace WebAPI.Utility
+{
+    public class TreeUtil
+    {
+        public class TreeModel
+        {
+            public string id { get; set; }
+            public string title { get; set; }
+            public List<TreeModel> children = new List<TreeModel>();
+        }
+
+        #region 閫掑綊鍑芥暟
+        /// <summary>
+        /// 閫掑綊鍑芥暟
+        /// </summary>
+        public void digui(DataTable dt, List<TreeModel> tree, int num)
+        {
+            for (int m = 0; m < tree.Count; m++)
+            {
+                tree[m].children = new List<TreeModel>();
+                for (int i = 0; i < dt.Rows.Count; i++)//绗竴娆″惊鐜紝寰楀埌鎵�鏈夋牴鑺傜偣鐨勫瓙闆�
+                {
+                    var strLen = dt.Rows[i]["hnumber"].ToString().Split('.');
+                    if (strLen.Length == num && dt.Rows[i]["hnumber"].ToString().Contains(tree[m].id + "."))
+                    {
+                        TreeModel tbjson = new TreeModel();
+                        tbjson.id = dt.Rows[i]["hitemid"].ToString();
+                        tbjson.title = dt.Rows[i]["hname"].ToString();
+                        tree[m].children.Add(tbjson);
+                    }
+                }
+                var strLens = tree[m].id.Split('.');
+                for (int i = 0; i < tree[m].children.Count; i++)
+                {
+                    digui(dt, tree[m].children, strLens.Length + 2);//鍐嶆鐢ㄥ瓙闆嗗幓寰幆锛屾嬁鍑哄瓙闆嗙殑瀛愰泦
+                }
+            }
+
+        }
+        #endregion
+
+        #region 鍒嗙被 鏍戝舰鍥�(鏍规嵁浠g爜灞曞紑鏍戠姸鍥�)
+        public void getTreeByLevel(DataTable dt, List<TreeModel> tree, int num)
+        {
+            for (int m = 0; m < tree.Count; m++)
+            {
+                tree[m].children = new List<TreeModel>();
+                for (int i = 0; i < dt.Rows.Count; i++)//绗竴娆″惊鐜紝寰楀埌鎵�鏈夋牴鑺傜偣鐨勫瓙闆�
+                {
+                    var HLevel = (int)dt.Rows[i]["hlevel"];
+                    var HParentID = dt.Rows[i]["hparentid"].ToString();
+                    if (HLevel == num && HParentID == tree[m].id)
+                    {
+                        TreeModel tbjson = new TreeModel();
+                        tbjson.id = dt.Rows[i]["hitemid"].ToString();
+                        tbjson.title = dt.Rows[i]["hname"].ToString();
+                        tree[m].children.Add(tbjson);
+                    }
+                }
+                for (int i = 0; i < tree[m].children.Count; i++)
+                {
+                    getTreeByLevel(dt, tree[m].children, num + 1);//鍐嶆鐢ㄥ瓙闆嗗幓寰幆锛屾嬁鍑哄瓙闆嗙殑瀛愰泦
+                }
+            }
+        }
+        #endregion
+    }
+}
\ No newline at end of file
diff --git a/WebAPI/Web.config b/WebAPI/Web.config
index 1a295c0..ad764f1 100644
--- a/WebAPI/Web.config
+++ b/WebAPI/Web.config
@@ -22,9 +22,7 @@
 		<!--<add key="FileIP" value="http://localhost:8082/LuBaoAPI"/>-->
 		<!--<add key="FileIP" value="http://localhost:8080/" />-->
 		<!--<add key="sUrl" value="http://183.129.128.86:9090/WEBS-WMSTest/WebService1.asmx"/>    -->
-		<!--<add key="sUrl" value="http://192.168.0.11/WEBS-WMS/WebService1.asmx" />--><!--棰滃彴寮忔満-->
-		<!--<add key="sUrl" value="http://192.168.0.11/WEBS-WMS/WebService1.asmx"/>-->
-		<!--棰滃彴寮忔満-->
+		<add key="sUrl" value="http://192.168.0.11/WEBS-WMS/WebService1.asmx" />	<!--棰滃彴寮忔満-->
 		<!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> 澶忓疂-->
 		<!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> -->
 		<!--<add key="sUrl" value="http://10.10.130.181/WEBS-WMS/WebService1.asmx"/>    鍗氭棩绉戞妧-->
@@ -34,11 +32,10 @@
 		<!--<add key="sUrl" value="http://192.168.80.90:9090/WEBS/WebService1.asmx"/>     瀹夌憺鏈嶅姟鍣�-->
 		<!--<add key="sUrl" value="http://122.227.133.186:8090/WEBS/WebService1.asmx"/>	-->
 		<!--<add key="sUrl" value="http://192.168.80.90:9090/WEBS-WMS/WebService1.asmx"/>     瀹夌憺鏈嶅姟鍣�-->
-		<!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/> -->
-		<!--娴嬭瘯鏈嶅姟鍣�-->
+		<!--<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"/>--><!--鏂帿灏�-->
 		
@@ -109,13 +106,13 @@
 			</basicHttpBinding>
 		</bindings>
 		<client>
-			<endpoint address="http://10.10.1.2:8090/WEBS-WMS/WebService1.asmx" binding="basicHttpBinding" bindingConfiguration="WebService1Soap" contract="Webs1.WebService1Soap" name="WebService1Soap" />
+			<endpoint address="http://192.168.0.11/WEBS-WMS/WebService1.asmx" binding="basicHttpBinding" bindingConfiguration="WebService1Soap" contract="Webs1.WebService1Soap" name="WebService1Soap" />
 		</client>
 	</system.serviceModel>
 	<applicationSettings>
 		<WebAPI.Properties.Settings>
 			<setting name="WebAPI_WebS_WebService1" serializeAs="String">
-				<value>http://10.10.1.2:8090/WEBS-WMS/WebService1.asmx</value>
+				<value>http://192.168.0.11/WEBS-WMS/WebService1.asmx</value>
 			</setting>
 		</WebAPI.Properties.Settings>
 	</applicationSettings>
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index fd4af09..a86231e 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -599,6 +599,7 @@
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_OperatorController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_PaymentConditionListBillController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_DisposeWayController.cs" />
+    <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_ProcMulController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_ScrapReasonController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_TemporaryAreaController.cs" />
     <Compile Include="Controllers\鍩虹璧勬枡\鍩虹璧勬枡\Gy_RateTypeController.cs" />
@@ -725,6 +726,7 @@
     <Compile Include="Dapper\SqlPools.cs" />
     <Compile Include="DbUntil\DataFormatUntil.cs" />
     <Compile Include="DLL\ClsGy_BadPhenomena_Ctl.cs" />
+    <Compile Include="DLL\ClsGy_ProcMul_Ctl.cs" />
     <Compile Include="DLL\ClsGy_TechnologyParameterType_Ctl.cs" />
     <Compile Include="DLL\ClsGy_InspectInstruMent_Ctl.cs" />
     <Compile Include="DLL\ClsGy_InspectBasis_Ctl.cs" />
@@ -798,6 +800,8 @@
     <Compile Include="DLL\宸ヨ祫绠$悊\ClsPay_WorkTimesBill.cs" />
     <Compile Include="DLL\閽夐拤娑堟伅\Cls_DDMsg.cs" />
     <Compile Include="DLL\椤圭洰绠$悊\椤圭洰闃舵\ClsPM_CustomerProInfoBill_Ctl.cs" />
+    <Compile Include="Exceptions\EmptyException.cs" />
+    <Compile Include="Exceptions\ExcelException.cs" />
     <Compile Include="HttpClient.cs" />
     <Compile Include="InvokeHelper.cs" />
     <Compile Include="Log.cs" />
diff --git a/WebAPI/WebAPI.csproj.user b/WebAPI/WebAPI.csproj.user
index f043589..95bfb95 100644
--- a/WebAPI/WebAPI.csproj.user
+++ b/WebAPI/WebAPI.csproj.user
@@ -18,7 +18,7 @@
     <IISExpressWindowsAuthentication>disabled</IISExpressWindowsAuthentication>
     <IISExpressUseClassicPipelineMode>false</IISExpressUseClassicPipelineMode>
     <UseGlobalApplicationHostFile />
-    <ProjectView>ProjectFiles</ProjectView>
+    <ProjectView>ShowAllFiles</ProjectView>
     <Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID>
     <Controller_SelectedScaffolderCategoryPath>root/Common/Web API</Controller_SelectedScaffolderCategoryPath>
   </PropertyGroup>
diff --git a/WebAPI/WebBLL/JCJM/GYZL/Gy_CustomerService.cs b/WebAPI/WebBLL/JCJM/GYZL/Gy_CustomerService.cs
new file mode 100644
index 0000000..3c33e30
--- /dev/null
+++ b/WebAPI/WebBLL/JCJM/GYZL/Gy_CustomerService.cs
@@ -0,0 +1,25 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WebAPI.WebBLL.JCJM.GYZL
+{
+    interface Gy_CustomerService
+    {
+        /// <summary>
+        /// 瀵煎叆excel
+        /// </summary>
+        void ImportExcel();
+
+        /// <summary>
+        /// 涓婁紶excel
+        /// </summary>
+        /// <returns></returns>
+        DataTable UploadExcel(DataSet ExcelDs);
+    }
+
+
+}
diff --git a/WebAPI/WebBLL/JCJM/IMPL/Gy_CustomerImpl.cs b/WebAPI/WebBLL/JCJM/IMPL/Gy_CustomerImpl.cs
new file mode 100644
index 0000000..53ae588
--- /dev/null
+++ b/WebAPI/WebBLL/JCJM/IMPL/Gy_CustomerImpl.cs
@@ -0,0 +1,207 @@
+锘縰sing SyntacticSugar.constant;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Web;
+using WebAPI.Exceptions;
+using WebAPI.WebBLL.JCJM.GYZL;
+
+namespace WebAPI.WebBLL.JCJM.IMPL
+{
+    public class Gy_CustomerImpl : Gy_CustomerService
+    {
+        // 绾跨▼璁℃暟鍣�
+        List<Task> taskList = new List<Task>();
+        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+        #region 瀵煎叆EXCEL
+        public void ImportExcel()
+        {
+            throw new NotImplementedException();
+        }
+        #endregion
+
+
+        /// <summary>
+        /// 鍒ゆ柇鍒�
+        /// </summary>
+        /// <param name="provisional"></param>
+        /// <returns></returns>
+        private static string JudgmentColumns(DataTable provisional)
+        {
+            var error = "";
+            //鏌ヨ娌℃湁鐨勫垪
+            if (!provisional.Columns.Contains("瀹㈡埛浠g爜"))
+                error += "娌℃湁鎵惧埌銆愬鎴蜂唬鐮併�戠殑鏍囬,";
+
+            if (!provisional.Columns.Contains("瀹㈡埛鍚嶇О"))
+                error += "娌℃湁鎵惧埌銆愬鎴峰悕绉般�戠殑鏍囬,";
+            return error;
+        }
+
+        #region 涓婁紶EXCEL
+        public DataTable UploadExcel(DataSet ExcelDs)
+        {
+            //鍒涘缓涓存椂琛�
+            DataTable provisional = new DataTable("dt2");
+
+            //娣诲姞鍒楀悕
+            for (int i = 0; i < ExcelDs.Tables[0].Columns.Count; i++)
+            {
+                provisional.Columns.Add(ExcelDs.Tables[0].Rows[0][i].ToString());
+            }
+
+            //娣诲姞鏁版嵁
+            for (int i = 1; i < ExcelDs.Tables[0].Rows.Count; i++)
+            {
+                DataRow row = provisional.NewRow();
+                for (int j = 0; j < ExcelDs.Tables[0].Columns.Count; j++)
+                {
+                    row[j] = ExcelDs.Tables[0].Rows[i][j].ToString();
+                }
+                provisional.Rows.Add(row);
+            }
+
+            //鍒ゆ柇鍒�
+            string error = JudgmentColumns(provisional);
+            if (error.Length > 0)
+            {
+                throw new ExcelException($"Excel妯℃澘瀛樺湪閿欒,{error}\r\n");
+            }
+
+            for (int i = 0; i <= provisional.Rows.Count - 1; i++)
+            {
+                string HRegionNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["鍦板尯浠g爜"].ToString());
+                string HRegionName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["鍦板尯鍚嶇О"].ToString());
+                string HCurrencyNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["榛樿璐у竵浠g爜"].ToString());
+                string HCurrencyName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["榛樿璐у竵鍚嶇О"].ToString());
+                //string HBillingNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["缁撶畻鏂瑰紡浠g爜"].ToString());
+                //string HBillingName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["缁撶畻鏂瑰紡鍚嶇О"].ToString());
+
+                string HCusTypeNumber = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["瀹㈡埛鍒嗙被浠g爜"].ToString());
+                string HCusTypeName = DBUtility.ClsPub.isStrNull(provisional.Rows[i]["瀹㈡埛鍒嗙被鍚嶇О"].ToString());
+
+                //璁板綍浠诲姟
+                var tasks = new List<Task>();
+
+                //濡傛灉褰撳墠鍦板尯浠g爜鍜屽湴鍖哄悕绉颁笉涓虹┖鍒欏垽鏂槸鍚﹀瓨鍦�
+                if (!String.IsNullOrEmpty(HRegionName) || !String.IsNullOrEmpty(HRegionNumber))
+                {
+                    tasks.Add(JudgeRegion(HRegionNumber, HRegionName));
+                }
+
+                // 濡傛灉褰撳墠璐у竵浠g爜鍜岃揣甯佸悕绉颁笉涓虹┖鍒欏垽鏂槸鍚﹀瓨鍦�
+                if (!String.IsNullOrEmpty(HCurrencyName) || !String.IsNullOrEmpty(HCurrencyNumber))
+                    {
+                        tasks.Add(JudgeCurrency(HCurrencyNumber, HCurrencyName));
+                    }
+
+                //濡傛灉褰撳墠瀹㈡埛鍒嗙被浠g爜鍜屽悕绉�
+                if (!String.IsNullOrEmpty(HCusTypeName) || !String.IsNullOrEmpty(HCusTypeNumber))
+                    {
+                        tasks.Add(JudgeCusType(HCusTypeNumber, HCusTypeName));
+                    }
+                try
+                {
+                    //绛夊緟浠诲姟瀹屾垚
+                    Task.WaitAll(tasks.ToArray());
+                }
+                catch (AggregateException ae)
+                {
+                    string msg = ae.Message;
+                    ae.Handle(ex => {
+                        if (ex is EmptyException)
+                            msg = ex.Message;
+                            Console.WriteLine(ex.Message);
+                        return ex is EmptyException;
+                    });
+                    throw new Exception("绗�" + i +1 +"鏈夐棶棰�: " +msg);
+                }
+                  
+    
+                //鑾峰彇鐪熷疄琛屾暟
+                int line = i + 1;
+            }
+            return provisional;
+        }
+
+        /// <summary>
+        /// 鍒ゆ柇鍦板尯鏄惁姝g‘
+        /// </summary>
+        private Task<int> JudgeRegion(string HNumber, string HName)
+        {
+            return Task<int>.Factory.StartNew(() =>
+            {
+                try
+                {
+                    SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                    DataSet ds = oCN.RunProcReturn("select * from Gy_AreaSet where HNumber = '" + HNumber + "' and HName = '" + HName + "'", "Gy_AreaSet");
+                    if (ds.Tables[0].Rows.Count == EmptyConstant.EMPTY)
+                    {
+                        throw new EmptyException("褰撳墠鍦板尯涓嶅瓨鍦紝璇烽噸鏂伴�夋嫨");
+                    }
+                    return (int)ds.Tables[0].Rows[0][0];
+                }
+                catch (Exception e)
+                {
+                    throw new EmptyException(e.Message);
+                }
+            });
+        }
+
+        /// <summary>
+        /// 鍒ゆ柇璐у竵鏄惁姝g‘
+        /// </summary>
+        private Task<int> JudgeCurrency(string HNumber, string HName)
+        {
+            {
+                return Task<int>.Factory.StartNew(() =>
+                {
+                    try
+                    {
+                        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                        DataSet ds = oCN.RunProcReturn("select * from Gy_Currency where HNumber = '" + HNumber + "' and HName = '" + HName + "'", "Gy_Currency");
+                        if (ds.Tables[0].Rows.Count == EmptyConstant.EMPTY)
+                        {
+                            throw new EmptyException("褰撳墠璐у竵涓嶅瓨鍦紝璇烽噸鏂伴�夋嫨");
+                        }
+                        return (int)ds.Tables[0].Rows[0][0];
+                    }
+                    catch (Exception e)
+                    {
+                        throw new EmptyException(e.Message);
+                    }
+                });
+            }
+        }
+
+        /// <summary>
+        /// 鍒ゆ柇瀹㈡埛鍒嗙被
+        /// </summary>
+        private Task<int> JudgeCusType(string HNumber, string HName)
+        {
+            {
+                return Task<int>.Factory.StartNew(() =>
+                {
+                    try
+                    {
+                        SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                        DataSet ds = oCN.RunProcReturn("select * from Gy_CusType where HNumber = '" + HNumber + "' and HName = '" + HName + "'", "Gy_CusType");
+                        if (ds.Tables[0].Rows.Count == EmptyConstant.EMPTY)
+                        {
+                            throw new EmptyException("褰撳墠鍒嗙被涓嶅瓨鍦紝璇烽噸鏂伴�夋嫨");
+                        }
+                        return (int)ds.Tables[0].Rows[0][0];
+                    }
+                    catch (Exception e)
+                    {
+                        throw new EmptyException(e.Message);
+                    }
+                });
+            }
+        }
+        #endregion
+    }
+
+}
\ No newline at end of file
diff --git a/sdk_dingding/TopSdk/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/sdk_dingding/TopSdk/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index d7d8856..0000000
--- a/sdk_dingding/TopSdk/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
+++ /dev/null
Binary files differ
diff --git a/sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.FileListAbsolute.txt b/sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.FileListAbsolute.txt
index cc295df..5cbbb34 100644
--- a/sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.FileListAbsolute.txt
+++ b/sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.FileListAbsolute.txt
@@ -1,6 +1,18 @@
-D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.dll
-D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.pdb
-D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.CoreCompileInputs.cache
-D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.dll
-D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.pdb
-D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-API\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.AssemblyReference.cache
+E:\鏅轰簯mes\mes\MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.dll
+E:\鏅轰簯mes\mes\MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.pdb
+E:\鏅轰簯mes\mes\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.CoreCompileInputs.cache
+E:\鏅轰簯mes\mes\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.dll
+E:\鏅轰簯mes\mes\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.pdb
+E:\鏅轰簯mes\mes\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.AssemblyReference.cache
+D:\鏅轰簯杩堟�漒MES\MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.dll
+D:\鏅轰簯杩堟�漒MES\MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.pdb
+D:\鏅轰簯杩堟�漒MES\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.AssemblyReference.cache
+D:\鏅轰簯杩堟�漒MES\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.CoreCompileInputs.cache
+D:\鏅轰簯杩堟�漒MES\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.dll
+D:\鏅轰簯杩堟�漒MES\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.pdb
+C:\Users\86130\Desktop\鏅轰簯杩堟�漒MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.dll
+C:\Users\86130\Desktop\鏅轰簯杩堟�漒MES-WEB-API\sdk_dingding\TopSdk\bin\Debug\TopSdk.pdb
+C:\Users\86130\Desktop\鏅轰簯杩堟�漒MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.CoreCompileInputs.cache
+C:\Users\86130\Desktop\鏅轰簯杩堟�漒MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.dll
+C:\Users\86130\Desktop\鏅轰簯杩堟�漒MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.pdb
+C:\Users\86130\Desktop\鏅轰簯杩堟�漒MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.AssemblyReference.cache
diff --git a/sdk_dingding/TopSdk/obj/Release/TopSdk.csproj.CoreCompileInputs.cache b/sdk_dingding/TopSdk/obj/Release/TopSdk.csproj.CoreCompileInputs.cache
deleted file mode 100644
index 8d92211..0000000
--- a/sdk_dingding/TopSdk/obj/Release/TopSdk.csproj.CoreCompileInputs.cache
+++ /dev/null
@@ -1 +0,0 @@
-95b844bca438eeedc97b9071d4f77d77549b3f29e8c2ab391f1243fa58b84136
diff --git a/sdk_dingding/TopSdk/obj/Release/TopSdk.dll b/sdk_dingding/TopSdk/obj/Release/TopSdk.dll
deleted file mode 100644
index 90d22f2..0000000
--- a/sdk_dingding/TopSdk/obj/Release/TopSdk.dll
+++ /dev/null
Binary files differ
diff --git a/sdk_dingding/TopSdk/obj/Release/TopSdk.pdb b/sdk_dingding/TopSdk/obj/Release/TopSdk.pdb
deleted file mode 100644
index 5cbab97..0000000
--- a/sdk_dingding/TopSdk/obj/Release/TopSdk.pdb
+++ /dev/null
Binary files differ

--
Gitblit v1.9.1