From 40c85336921fd04d617e2285e995e1495ab238e3 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 15 十二月 2023 16:26:00 +0800
Subject: [PATCH] 1

---
 PayM/bin/x86/Debug/SQLHelper.dll                              |    0 
 PlanM/计划管理/Gy_RoutingBill.cs                                  |   13 +
 Model/车间管理/ClsSc_ProcessExchangeBillSub.cs                    |    1 
 PayM/bin/x86/Debug/DAL.dll                                    |    0 
 PayM/bin/x86/Debug/DBUtility.pdb                              |    0 
 WorkM/流转卡管理/Sc_ProcessExchangeBill.cs                         |   13 +
 DAL/计划管理/ClsGy_RoutingBill.cs                                 |    9 
 PayM/bin/x86/Debug/Pub_Control.pdb                            |    0 
 DAL/车间管理/ClsSc_ProcessExchangeBill.cs                         |   11 +
 WebAPI/Controllers/工资管理/Pay_OtherBalBillController.cs         |    3 
 PayM/bin/x86/Debug/Pub_Class.pdb                              |    0 
 PayM/obj/x86/Debug/PayM.pdb                                   |    0 
 PayM/bin/x86/Debug/Pub_Control.dll                            |    0 
 WebAPI/Web.config                                             |    2 
 PayM/obj/x86/Debug/PayM.dll                                   |    0 
 PayM/bin/x86/Debug/Model.dll                                  |    0 
 PayM/bin/x86/Debug/Pub_Class.dll                              |    0 
 PayM/bin/x86/Debug/SQLHelper.pdb                              |    0 
 WebAPI/Controllers/工资管理/Pay_GroupBalBillController.cs         |    4 
 WebAPI/DLL/工资管理/ClsPay_OtherBalBill.cs                        |    4 
 PayM/bin/x86/Debug/Model.pdb                                  |    0 
 Model/计划管理/ClsGy_RoutingBillSub.cs                            |    1 
 PayM/bin/x86/Debug/BLL.dll                                    |    0 
 WebAPI/Controllers/工资管理/Pay_ProcPriceRequestBillController.cs |    4 
 PayM/obj/x86/Debug/PayM.csproj.AssemblyReference.cache        |    0 
 WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs      |   22 +-
 PayM/bin/x86/Debug/BLL.pdb                                    |    0 
 WebAPI/Controllers/PublicPageMethodController.cs              |    6 
 PayM/bin/x86/Debug/DAL.pdb                                    |    0 
 WebAPI/Controllers/工资管理/Pay_WorkTimesBillController.cs        |    3 
 WebAPI/DLL/工资管理/ClsPay_WorkTimesBill.cs                       |    4 
 PayM/bin/x86/Debug/PayM.dll                                   |    0 
 PayM/bin/x86/Debug/PayM.pdb                                   |    0 
 WebAPI/Controllers/工资管理/Pay_SingleBalBillController.cs        |    4 
 WebAPI/Controllers/Sc_ProcessMangementController.cs           |    1 
 WebAPI/DLL/ClsSc_ICMOReportBill.cs                            |  279 +++++++++++++++++----------------------
 PayM/bin/x86/Debug/DBUtility.dll                              |    0 
 WebAPI/Controllers/工资管理/Pay_PayMentBillController.cs          |    4 
 38 files changed, 192 insertions(+), 196 deletions(-)

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 100f7b8..79a54e7 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"
@@ -92,7 +92,7 @@
                       ",HProcID_S,HCenterID_S,HWorkQty_S,HSubStdEmpQty_S,HMouldNo,HChangeMould" +
                       ",HPackStd,HPack,HPutArea,HMyWorkDays,HMyFixWorkDays,HPassRate" +
                       ",HTechnologyParameter,HPicNum,HProcCheckNote" +
-                      ",HOverRate,HWorkTimes_S" +
+                      ",HOverRate,HWorkTimes_S,HSNCtrl" +
                       ") values("
                       + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HProcNo.ToString() + "," + oSub.HSupID.ToString() + "," + Convert.ToString(oSub.HSupFlag ? 1 : 0) + "" +
                       "," + oSub.HWorkQty.ToString() + "," + oSub.HCenterID.ToString() + ",'" + oSub.HTimeUnit.ToString() + "'," + oSub.HUnitTime.ToString() +
@@ -104,7 +104,7 @@
                      "," + oSub.HProcID_S.ToString() + "," + oSub.HCenterID_S.ToString() + "," + oSub.HWorkQty_S.ToString() + "," + oSub.HSubStdEmpQty_S.ToString() + ",'" + oSub.HMouldNo + "'," + oSub.HChangeMould.ToString() +
                      ",'" + oSub.HPackStd + "','" + oSub.HPack + "','" + oSub.HPutArea + "'," + oSub.HMyWorkDays.ToString() + "," + oSub.HMyFixWorkDays.ToString() + "," + oSub.HPassRate.ToString() + 
                      ",'" + oSub.HTechnologyParameter.ToString() + "','" + oSub.HPicNum.ToString() + "','" + oSub.HProcCheckNote.ToString() +
-                     "', " + oSub.HOverRate.ToString() + "," + oSub.HWorkTimes_S.ToString() +
+                     "', " + oSub.HOverRate.ToString() + "," + oSub.HWorkTimes_S.ToString() + "," + Convert.ToString(oSub.HSNCtrl ? 1 : 0) +
                       ") ");
                 }
                 //
@@ -226,7 +226,7 @@
                       ",HProcID_S,HCenterID_S,HWorkQty_S,HSubStdEmpQty_S,HMouldNo,HChangeMould" +
                       ",HPackStd,HPack,HPutArea,HMyWorkDays,HMyFixWorkDays,HPassRate" +
                       ",HTechnologyParameter,HPicNum,HProcCheckNote" +
-                      ",HOverRate,HProcWorkNum,HWorkTimes_S" +
+                      ",HOverRate,HProcWorkNum,HWorkTimes_S,HSNCtrl" +
                       ") values("
                       + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HProcNo.ToString() + "," + oSub.HSupID.ToString() + "," + Convert.ToString(oSub.HSupFlag ? 1 : 0) + "" +
                       "," + oSub.HWorkQty.ToString() + "," + oSub.HCenterID.ToString() + ",'" + oSub.HTimeUnit.ToString() + "'," + oSub.HUnitTime.ToString() +
@@ -238,7 +238,7 @@
                      "," + oSub.HProcID_S.ToString() + "," + oSub.HCenterID_S.ToString() + "," + oSub.HWorkQty_S.ToString() + ", " + oSub.HSubStdEmpQty_S.ToString() + ",'" + oSub.HMouldNo + "'," + oSub.HChangeMould.ToString() +
                      ",'" + oSub.HPackStd + "','" + oSub.HPack + "','" + oSub.HPutArea + "'," + oSub.HMyWorkDays.ToString() + "," + oSub.HMyFixWorkDays.ToString() + "," + oSub.HPassRate.ToString() +
                      ",'"+ oSub.HTechnologyParameter.ToString() + "','" + oSub.HPicNum.ToString() + "','" + oSub.HProcCheckNote.ToString() +
-                     "', " + oSub.HOverRate.ToString() + ",'" + oSub.HProcWorkNum.ToString() + "'," + oSub.HWorkTimes_S.ToString() +
+                     "', " + oSub.HOverRate.ToString() + ",'" + oSub.HProcWorkNum.ToString() + "'," + oSub.HWorkTimes_S.ToString() + "," + Convert.ToString(oSub.HSNCtrl ? 1 : 0) +
                       ") ");
                 }
                 //
@@ -406,6 +406,7 @@
                     oSub.HProcCheckNote = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HProcCheckNote"]);
                     oSub.HOverRate = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HOverRate"]);
                     oSub.HWorkTimes_S = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HWorkTimes_S"]);
+                    oSub.HSNCtrl = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HSNCtrl"]);
                     DetailColl.Add(oSub);
                 }
                 sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
diff --git "a/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBill.cs" "b/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBill.cs"
index 96c09c0..4351173 100644
--- "a/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBill.cs"
+++ "b/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBill.cs"
@@ -192,7 +192,7 @@
                       ",HLastProc,HKeyProc,HFstProc,HICMOInterID,HICMOBillNo,HWWOrderInterID," +
                       "HWWOrderEntryID,HWWOrderBillNo,HReportQty,HBackProc" +
                       ",HSupID,HSupFlag,HOverRate,HMaxQty,HTechnologyParameter,HProcCheckNote,HPicNum" +
-                      ",HMouldNo,HProcWorkNum,HSeOrderInterID,HSeOrderEntryID,HRelationQty_OutBad" +
+                      ",HMouldNo,HProcWorkNum,HSeOrderInterID,HSeOrderEntryID,HRelationQty_OutBad,HSNCtrl" +
                       ") values("
                       + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + omodel.HBillNo + "'" +
                       ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
@@ -210,7 +210,7 @@
                       ",'" + oSub.HKeyProc + "','" + oSub.HFstProc + "'," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "'," + oSub.HWWOrderInterID.ToString() +
                       "," + oSub.HWWOrderEntryID.ToString() + ",'" + oSub.HWWOrderBillNo + "'," + oSub.HReportQty.ToString() + "," + Convert.ToString(oSub.HBackProc ? 1 : 0) +
                       "," + oSub.HSupID.ToString() + "," + Convert.ToString(oSub.HSupFlag ? 1 : 0) + "," + oSub.HOverRate.ToString() + "," + oSub.HMaxQty.ToString() + ",'" + oSub.HTechnologyParameter + "','" + oSub.HProcCheckNote + "','" + oSub.HPicNum + "'" +
-                      ",'" + oSub.HMouldNo + "','" + oSub.HProcWorkNum + "','" + DBUtility.ClsPub.isInt(omodel.HSeOrderInterID) + "','" + DBUtility.ClsPub.isInt(omodel.HSeOrderEntryID) + "','" + DBUtility.ClsPub.isInt(oSub.HRelationQty_OutBad) + "'" +
+                      ",'" + oSub.HMouldNo + "','" + oSub.HProcWorkNum + "','" + DBUtility.ClsPub.isInt(omodel.HSeOrderInterID) + "','" + DBUtility.ClsPub.isInt(omodel.HSeOrderEntryID) + "','" + DBUtility.ClsPub.isInt(oSub.HRelationQty_OutBad) + "'," + Convert.ToString(oSub.HSNCtrl ? 1 : 0) +
                       ") ");
                     oCn.RunProc(sql1);
                 }
@@ -407,7 +407,7 @@
                       ",HLastProc,HKeyProc,HFstProc,HICMOInterID,HICMOBillNo,HWWOrderInterID," +
                       "HWWOrderEntryID,HWWOrderBillNo,HReportQty,HBackProc" +
                       ",HSupID,HSupFlag,HOverRate,HMaxQty,HTechnologyParameter,HProcCheckNote,HPicNum" +
-                      ",HMouldNo,HProcWorkNum,HSeOrderInterID,HSeOrderEntryID" +
+                      ",HMouldNo,HProcWorkNum,HSeOrderInterID,HSeOrderEntryID,HSNCtrl" +
                       ") values("
                       + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + omodel.HBillNo + "'" +
                       ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
@@ -425,7 +425,7 @@
                       ",'" + oSub.HKeyProc + "','" + oSub.HFstProc + "'," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "'," + oSub.HWWOrderInterID.ToString() +
                       "," + oSub.HWWOrderEntryID.ToString() + ",'" + oSub.HWWOrderBillNo + "'," + oSub.HReportQty.ToString() + "," + Convert.ToString(oSub.HBackProc ? 1 : 0) +
                       "," + oSub.HSupID.ToString() + "," + Convert.ToString(oSub.HSupFlag ? 1 : 0) + "," + oSub.HOverRate.ToString() + "," + oSub.HMaxQty.ToString() + ",'" + oSub.HTechnologyParameter + "','" + oSub.HProcCheckNote + "','" + oSub.HPicNum + "'" +
-                      ",'" + oSub.HMouldNo + "','" + oSub.HProcWorkNum + "','" + DBUtility.ClsPub.isStrNull( omodel.HSeOrderInterID) + "','" + DBUtility.ClsPub.isStrNull(omodel.HSeOrderEntryID) + "'" +
+                      ",'" + oSub.HMouldNo + "','" + oSub.HProcWorkNum + "','" + DBUtility.ClsPub.isStrNull( omodel.HSeOrderInterID) + "','" + DBUtility.ClsPub.isStrNull(omodel.HSeOrderEntryID) + "'," + Convert.ToString(oSub.HSNCtrl ? 1 : 0) +
                       ") ");
                     sErr = sErr + sql1 + "2;";
                     oCn.RunProc(sql1);
@@ -713,6 +713,7 @@
                     oSub.HProcCheckNote = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HProcCheckNote"]);
                     oSub.HMouldNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HMouldNo"]);
                     oSub.HProcWorkNum = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HProcWorkNum"]);
+                    oSub.HSNCtrl = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HSNCtrl"]);
 
                     DetailColl.Add(oSub);
                 }
@@ -954,6 +955,7 @@
                     oSub.HProcCheckNote = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HProcCheckNote"]);
                     oSub.HMouldNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HMouldNo"]);
                     oSub.HProcWorkNum = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HProcWorkNum"]);
+                    oSub.HSNCtrl = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HSNCtrl"]);
                     DetailColl.Add(oSub);
                 }
                 sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
@@ -1106,6 +1108,7 @@
                     oSub.HTechnologyParameter = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HTechnologyParameter"]);
                     oSub.HPicNum = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HPicNum"]);
                     oSub.HProcCheckNote = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HProcCheckNote"]);
+                    oSub.HSNCtrl = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HSNCtrl"]);
                     DetailColl.Add(oSub);
                 }
                 sReturn = "鏄剧ず鍗曟嵁鎴愬姛锛�";
diff --git "a/Model/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_RoutingBillSub.cs" "b/Model/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_RoutingBillSub.cs"
index 926564b..313a96e 100644
--- "a/Model/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_RoutingBillSub.cs"
+++ "b/Model/\350\256\241\345\210\222\347\256\241\347\220\206/ClsGy_RoutingBillSub.cs"
@@ -64,6 +64,7 @@
         public string HProcCheckNote = "";        // varchar(2000)  本工序确认记录
         public string HProcWorkNum = "";        // varchar(100)  程序号
         public double HWorkTimes_S;     //产品单件工时
+        public bool HSNCtrl;            //SN码过站
 
     }
 }
diff --git "a/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBillSub.cs" "b/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBillSub.cs"
index 7b46ba5..18b0096 100644
--- "a/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBillSub.cs"
+++ "b/Model/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_ProcessExchangeBillSub.cs"
@@ -72,6 +72,7 @@
         public string HMouldNo;//模具编号
         public string HProcWorkNum;//程序号
         public string HRelationQty_OutBad;//不合格数量
+        public bool HSNCtrl;            //SN码过站
     }
 }
 
diff --git a/PayM/bin/x86/Debug/BLL.dll b/PayM/bin/x86/Debug/BLL.dll
index 89adaa7..28e51e3 100644
--- a/PayM/bin/x86/Debug/BLL.dll
+++ b/PayM/bin/x86/Debug/BLL.dll
Binary files differ
diff --git a/PayM/bin/x86/Debug/BLL.pdb b/PayM/bin/x86/Debug/BLL.pdb
index 5302ad7..600b067 100644
--- a/PayM/bin/x86/Debug/BLL.pdb
+++ b/PayM/bin/x86/Debug/BLL.pdb
Binary files differ
diff --git a/PayM/bin/x86/Debug/DAL.dll b/PayM/bin/x86/Debug/DAL.dll
index 0a64e1d..63d7605 100644
--- a/PayM/bin/x86/Debug/DAL.dll
+++ b/PayM/bin/x86/Debug/DAL.dll
Binary files differ
diff --git a/PayM/bin/x86/Debug/DAL.pdb b/PayM/bin/x86/Debug/DAL.pdb
index 60eb376..4455fe5 100644
--- a/PayM/bin/x86/Debug/DAL.pdb
+++ b/PayM/bin/x86/Debug/DAL.pdb
Binary files differ
diff --git a/PayM/bin/x86/Debug/DBUtility.dll b/PayM/bin/x86/Debug/DBUtility.dll
index edf71f3..f1e09cc 100644
--- a/PayM/bin/x86/Debug/DBUtility.dll
+++ b/PayM/bin/x86/Debug/DBUtility.dll
Binary files differ
diff --git a/PayM/bin/x86/Debug/DBUtility.pdb b/PayM/bin/x86/Debug/DBUtility.pdb
index 7e33084..fb87076 100644
--- a/PayM/bin/x86/Debug/DBUtility.pdb
+++ b/PayM/bin/x86/Debug/DBUtility.pdb
Binary files differ
diff --git a/PayM/bin/x86/Debug/Model.dll b/PayM/bin/x86/Debug/Model.dll
index ab939d1..3e34fa8 100644
--- a/PayM/bin/x86/Debug/Model.dll
+++ b/PayM/bin/x86/Debug/Model.dll
Binary files differ
diff --git a/PayM/bin/x86/Debug/Model.pdb b/PayM/bin/x86/Debug/Model.pdb
index 379c4ec..c577807 100644
--- a/PayM/bin/x86/Debug/Model.pdb
+++ b/PayM/bin/x86/Debug/Model.pdb
Binary files differ
diff --git a/PayM/bin/x86/Debug/PayM.dll b/PayM/bin/x86/Debug/PayM.dll
index e8db84a..df4987b 100644
--- a/PayM/bin/x86/Debug/PayM.dll
+++ b/PayM/bin/x86/Debug/PayM.dll
Binary files differ
diff --git a/PayM/bin/x86/Debug/PayM.pdb b/PayM/bin/x86/Debug/PayM.pdb
index 2ffef59..35a06b4 100644
--- a/PayM/bin/x86/Debug/PayM.pdb
+++ b/PayM/bin/x86/Debug/PayM.pdb
Binary files differ
diff --git a/PayM/bin/x86/Debug/Pub_Class.dll b/PayM/bin/x86/Debug/Pub_Class.dll
index 709a45e..7a678b6 100644
--- a/PayM/bin/x86/Debug/Pub_Class.dll
+++ b/PayM/bin/x86/Debug/Pub_Class.dll
Binary files differ
diff --git a/PayM/bin/x86/Debug/Pub_Class.pdb b/PayM/bin/x86/Debug/Pub_Class.pdb
index c28a7d9..0c5e497 100644
--- a/PayM/bin/x86/Debug/Pub_Class.pdb
+++ b/PayM/bin/x86/Debug/Pub_Class.pdb
Binary files differ
diff --git a/PayM/bin/x86/Debug/Pub_Control.dll b/PayM/bin/x86/Debug/Pub_Control.dll
index 23fec98..1a89788 100644
--- a/PayM/bin/x86/Debug/Pub_Control.dll
+++ b/PayM/bin/x86/Debug/Pub_Control.dll
Binary files differ
diff --git a/PayM/bin/x86/Debug/Pub_Control.pdb b/PayM/bin/x86/Debug/Pub_Control.pdb
index 10cd4c5..8546f0f 100644
--- a/PayM/bin/x86/Debug/Pub_Control.pdb
+++ b/PayM/bin/x86/Debug/Pub_Control.pdb
Binary files differ
diff --git a/PayM/bin/x86/Debug/SQLHelper.dll b/PayM/bin/x86/Debug/SQLHelper.dll
index 94dc7bb..87a7943 100644
--- a/PayM/bin/x86/Debug/SQLHelper.dll
+++ b/PayM/bin/x86/Debug/SQLHelper.dll
Binary files differ
diff --git a/PayM/bin/x86/Debug/SQLHelper.pdb b/PayM/bin/x86/Debug/SQLHelper.pdb
index b17b510..50d0f56 100644
--- a/PayM/bin/x86/Debug/SQLHelper.pdb
+++ b/PayM/bin/x86/Debug/SQLHelper.pdb
Binary files differ
diff --git a/PayM/obj/x86/Debug/PayM.csproj.AssemblyReference.cache b/PayM/obj/x86/Debug/PayM.csproj.AssemblyReference.cache
index cd9a069..c5b7125 100644
--- a/PayM/obj/x86/Debug/PayM.csproj.AssemblyReference.cache
+++ b/PayM/obj/x86/Debug/PayM.csproj.AssemblyReference.cache
Binary files differ
diff --git a/PayM/obj/x86/Debug/PayM.dll b/PayM/obj/x86/Debug/PayM.dll
index e8db84a..df4987b 100644
--- a/PayM/obj/x86/Debug/PayM.dll
+++ b/PayM/obj/x86/Debug/PayM.dll
Binary files differ
diff --git a/PayM/obj/x86/Debug/PayM.pdb b/PayM/obj/x86/Debug/PayM.pdb
index 2ffef59..35a06b4 100644
--- a/PayM/obj/x86/Debug/PayM.pdb
+++ b/PayM/obj/x86/Debug/PayM.pdb
Binary files differ
diff --git "a/PlanM/\350\256\241\345\210\222\347\256\241\347\220\206/Gy_RoutingBill.cs" "b/PlanM/\350\256\241\345\210\222\347\256\241\347\220\206/Gy_RoutingBill.cs"
index 9d76bd3..167d8b9 100644
--- "a/PlanM/\350\256\241\345\210\222\347\256\241\347\220\206/Gy_RoutingBill.cs"
+++ "b/PlanM/\350\256\241\345\210\222\347\256\241\347\220\206/Gy_RoutingBill.cs"
@@ -93,6 +93,7 @@
         public const Int16 HProcCheckNoteCol = 62;
         public const Int16 HProcWorkNumCol = 63;
         public const Int16 HWorkTimes_SCol = 64;
+        public const Int16 HSNCtrlCol = 65;
 
         //
         public  string ModName = "3301";
@@ -1113,6 +1114,7 @@
                 grdMain.Rows[i].Cells[HSumPassRateCol].Value = oSub.HSumPassRate.ToString();
                 grdMain.Rows[i].Cells[HOverRateCol].Value = oSub.HOverRate.ToString();
                 grdMain.Rows[i].Cells[HWorkTimes_SCol].Value = oSub.HWorkTimes_S.ToString();
+                grdMain.Rows[i].Cells[HSNCtrlCol].Value = DBUtility.ClsPub.isBool(oSub.HSNCtrl);
                 //涓嬮亾娴佽浆宸ュ簭
                 grdMain.Rows[i].Cells[HNextProcFlagCol].Value = DBUtility.ClsPub.isBool(oSub.HNextProcFlag);
                 grdMain.Rows[i].Cells[HFlowProcCol].Value = DBUtility.ClsPub.isBool(oSub.HFlowProc);
@@ -1354,6 +1356,7 @@
                     oSub.HAutoTrunFlag = DBUtility.ClsPub.isBool(grdMain.Rows[i].Cells[HAutoTrunFlagCol].Value);
                     oSub.HProcType = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HProcTypeCol].Value);
                     oSub.HWorkTimes_S = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells[HWorkTimes_SCol].Value);
+                    oSub.HSNCtrl = DBUtility.ClsPub.isBool(grdMain.Rows[i].Cells[HSNCtrlCol].Value);
 
                     oSub.HProcWorkNum = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HProcWorkNumCol].Value);
                     if (DBUtility.ClsPub.isSingle(grdMain.Rows[i].Cells[HPassRateCol].Value) > 0)
@@ -1428,7 +1431,7 @@
         private void initGrid()
         {
             //
-            grdMain.ColumnCount = 65;                       //鎬诲垪鏁�
+            grdMain.ColumnCount = 66;                       //鎬诲垪鏁�
             DBUtility.Xt_BaseBillFun.initGridFst(grdMain, this.Name);
             //
             grdMain.RowsDefaultCellStyle.WrapMode = DataGridViewTriState.True;
@@ -1493,6 +1496,7 @@
             grdMain.Columns[HFlowProcCol].HeaderText = "娴佽浆宸ュ簭";
             grdMain.Columns[HOverRateCol].HeaderText = "瓒呴姣斾緥";
             grdMain.Columns[HWorkTimes_SCol].HeaderText = "浜у搧鍗曚欢宸ユ椂";
+            grdMain.Columns[HSNCtrlCol].HeaderText = "SN鐮佽繃绔�";
             ////鍥哄畾璧嬪��=====================================================
             grdMain.Columns[HSnoCol].HeaderText = "搴忓彿";
             grdMain.Columns[HRemarkCol].HeaderText = "澶囨敞";
@@ -1561,6 +1565,7 @@
                              "," + HPicNumCol.ToString() +
                              "," + HProcCheckNoteCol.ToString() +
                              "," + HWorkTimes_SCol.ToString() +
+                             "," + HSNCtrlCol.ToString() +
                             "," + HOverRateCol.ToString();
             //璁剧疆鍚堣鍒�
             string sTotalCol = HTimeUnitCol.ToString();
@@ -1596,6 +1601,12 @@
                 oCell5.Value = 0;
                 oCell5.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
                 grdMain.Rows[i].Cells[HFlowProcCol] = oCell5;
+                //SN鐮佽繃绔�
+                DataGridViewCheckBoxCell oCell6 = new DataGridViewCheckBoxCell();
+                oCell6.ThreeState = false;
+                oCell6.Value = 0;
+                oCell6.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
+                grdMain.Rows[i].Cells[HSNCtrlCol] = oCell6;
                 //
                 DataGridViewComboBoxCell column = new DataGridViewComboBoxCell();
                 column.Items.Add(" ");
diff --git a/WebAPI/Controllers/PublicPageMethodController.cs b/WebAPI/Controllers/PublicPageMethodController.cs
index 80faac1..8a9a2a5 100644
--- a/WebAPI/Controllers/PublicPageMethodController.cs
+++ b/WebAPI/Controllers/PublicPageMethodController.cs
@@ -3672,13 +3672,13 @@
                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                 if (sWhere == null || sWhere.Equals(""))
                 {
-                    ds = oCN.RunProcReturn("Select HItemID,HNumber ,HName  from Gy_ClassTimePrjGroup where HStopflag=0 Order by HItemID ", "Gy_ClassTimePrjGroup");
+                    ds = oCN.RunProcReturn("Select HItemID,HNumber ,HName  from Gy_ClassTimePrj where HStopflag=0 Order by HItemID ", "Gy_ClassTimePrj");
                 }
                 else
                 {
-                    string sql1 = "Select HItemID,HNumber ,HName  from Gy_ClassTimePrjGroup where HStopflag=0  ";
+                    string sql1 = "Select HItemID,HNumber ,HName  from Gy_ClassTimePrj where HStopflag=0  ";
                     string sql = sql1 + sWhere;
-                    ds = oCN.RunProcReturn(sql, "Gy_ClassTimePrjGroup");
+                    ds = oCN.RunProcReturn(sql, "Gy_ClassTimePrj");
                 }
 
                 //ds = webserver.GetUnitList(sWhere, ref DBUtility.ClsPub.sErrInfo);
diff --git a/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs
index 8f391a6..0f9d62f 100644
--- a/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_MESBeginWorkBillController.cs
@@ -892,17 +892,17 @@
 
         public static DataSet Sc_GetMESProductReportBillList(string sWhere)
         {
-            string sql = string.Format(@"select a.HInterID, a.HBillNo,a.HDate,a.HBillType,a.HBillStatus,a.HMaterID,m.HNumber HMaterCode,m.HName HMaterName,m.HModel HMaterSpec 
-                                   ,a.HSourceID,s.HNumber HSourceCode,s.HName HSourceName,a.HGroupID,g.HNumber HGroupCode,g.HName HGroupName
-                                   ,a.HWorkManID,e.HName HWorkManName,a.HMaker,a.HMakeDate, a.HReportType  
-                                   ,a.HQty,a.HICMOBillNo,a.HICMOInterID,a.HICMOEntryID 
-                                   ,a.HSourceInterID,a.HSourceEntryID,a.HSourceBillNo, a.HSourceBillType
-                                   from Sc_ICMOBillWorkQtyStatus_Tmp a 
-                                   left join Gy_Material m on a.HMaterID=m.hitemid
-                                   left join Gy_Source s on a.HSourceID=s.HItemID
-                                   left join Gy_Group g on a.HGroupID=g.HItemID
-                                   left join Gy_Employee e on a.HWorkManID=e.HItemID " + sWhere + " and HRelationInterID='0'");
-            return new SQLHelper.ClsCN().RunProcReturn(sql, "Sc_ICMOBillWorkQtyStatus_Tmp");
+            string sql = "";
+            if (sWhere != null && sWhere != "")
+            {
+                sql = "select * from h_v_Sc_ICMOBillWorkQtyTmpList_ReportingPlatform " + sWhere;
+            }
+            else
+            {
+                sql = "select * from h_v_Sc_ICMOBillWorkQtyTmpList_ReportingPlatform " ;
+            }
+            
+            return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_ICMOBillWorkQtyTmpList_ReportingPlatform");
         }
         #endregion
 
diff --git a/WebAPI/Controllers/Sc_ProcessMangementController.cs b/WebAPI/Controllers/Sc_ProcessMangementController.cs
index e835f1e..749364a 100644
--- a/WebAPI/Controllers/Sc_ProcessMangementController.cs
+++ b/WebAPI/Controllers/Sc_ProcessMangementController.cs
@@ -590,6 +590,7 @@
                     FentityModel.Add("FFinishQty", item["鎺ユ敹鏁伴噺"].ToString());//瀹屾垚鏁伴噺1
                     FentityModel.Add("FQuaQty", item["鍚堟牸鏁伴噺"].ToString());//鍚堟牸鏁伴噺1FFailQty
                     FentityModel.Add("FFailQty", item["涓嶈壇鏁伴噺"].ToString());//涓嶅悎鏍兼暟閲�
+                    FentityModel.Add("FScrapQty", item["鎶ュ簾鏁伴噺"].ToString());//鎶ュ簾鏁伴噺                    
                     FentityModel.Add("FStockInOrgId ", new JObject() { ["Fnumber"] = OrganizationNUM });// 鍏ュ簱缁勭粐 
                     FentityModel.Add("FStockId", new JObject() { ["Fnumber"] = dr1["FStockNUM"].ToString() }); // 浠撳簱 
                     FentityModel.Add("FMOID", dr1["FMOID"].ToString());//  
diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_GroupBalBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_GroupBalBillController.cs"
index 14df8f7..a908599 100644
--- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_GroupBalBillController.cs"
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_GroupBalBillController.cs"
@@ -540,9 +540,9 @@
                 string HExplanation = mainList[0].HExplanation;
                 string HRemark = mainList[0].HRemark;
                 string HMaker = mainList[0].HMaker;
-                string HMakerDate = mainList[0].HMakerDate;
+                DateTime HMakerDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString());
                 string HUpdater = mainList[0].HUpdater;
-                string HUpdaterDate = mainList[0].HUpdaterDate;
+                DateTime HUpdaterDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString());
                 string HChecker = mainList[0].HChecker;
                 string HCheckerDate = mainList[0].HCheckerDate;
                 string HCloseMan = mainList[0].HCloseMan;
diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_OtherBalBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_OtherBalBillController.cs"
index 76bf4f8..f52baec 100644
--- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_OtherBalBillController.cs"
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_OtherBalBillController.cs"
@@ -146,6 +146,7 @@
             string UserName = "";
             string s = "";
             long mouldid;
+            DBUtility.ClsPub.CurUserName = msg4;  //鎿嶄綔浜�
             ListModels oListModels = new ListModels();
             try
             {
@@ -266,7 +267,7 @@
                     //oItemSub.HRepairCheckContent = ""; //楠屾敹鍐呭
                     //oItemSub.HManagerID = 0;   //璐熻矗浜篒D
                     //oItemSub.HCloseMan = "";       //琛屽叧闂�
-                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate("");
                     oItemSub.HCloseType = false;   //鍏抽棴绫诲瀷
                     //oItemSub.HRemark = "";         //澶囨敞
                     oItemSub.HSourceInterID = 0;     // 婧愬崟涓诲唴鐮�
diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_PayMentBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_PayMentBillController.cs"
index d399a15..9fcc17f 100644
--- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_PayMentBillController.cs"
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_PayMentBillController.cs"
@@ -175,9 +175,9 @@
 
 
                 string HMaker = mainList[0].HMaker;
-                string HMakerDate = mainList[0].HMakerDate;
+                DateTime HMakerDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString());
                 string HUpdater = mainList[0].HUpdater;
-                string HUpdaterDate = mainList[0].HUpdaterDate;
+                DateTime HUpdaterDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString());
                 string HChecker = mainList[0].HChecker;
                 string HCheckerDate = mainList[0].HCheckerDate;
                 string HCloseMan = mainList[0].HCloseMan;
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 4a5d3df..20dd9a9 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"
@@ -173,9 +173,9 @@
                 string HRemark = mainList[0].HRemark;
 
                 string HMaker = mainList[0].HMaker;
-                string HMakerDate = mainList[0].HMakerDate;
+                DateTime HMakerDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString());
                 string HUpdater = mainList[0].HUpdater;
-                string HUpdaterDate = mainList[0].HUpdaterDate;
+                DateTime HUpdaterDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString());
                 string HChecker = mainList[0].HChecker;
                 string HCheckerDate = mainList[0].HCheckerDate;
                 string HCloseMan = mainList[0].HCloseMan;
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 a16f817..db2e970 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"
@@ -604,9 +604,9 @@
                 
                 //鍒跺崟銆佷慨鏀�
                 string HMaker = mainList[0].HMaker;
-                string HMakerDate = mainList[0].HMakerDate;
+                DateTime HMakerDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString());
                 string HUpdater = mainList[0].HUpdater;
-                string HUpdaterDate = mainList[0].HUpdaterDate;
+                DateTime HUpdaterDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString());
                 
 
                 //if (OperationType == 2)
diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_WorkTimesBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_WorkTimesBillController.cs"
index 175fa43..4030707 100644
--- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_WorkTimesBillController.cs"
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_WorkTimesBillController.cs"
@@ -147,6 +147,7 @@
 
             string UserName = "";
             string s = "";
+            DBUtility.ClsPub.CurUserName = msg4;  //鎿嶄綔浜�
             ListModels oListModels = new ListModels();
             try
             {
@@ -244,7 +245,7 @@
                 {
                     i++;
                     oItemSub.HEntryID = i;
-                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now);
+                    oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate("");
                     oItemSub.HCloseType = false;   //鍏抽棴绫诲瀷
                     oItemSub.HSourceInterID = 0;     // 婧愬崟涓诲唴鐮�
                     oItemSub.HSourceEntryID = 0;   //婧愬崟瀛愬唴鐮�
diff --git a/WebAPI/DLL/ClsSc_ICMOReportBill.cs b/WebAPI/DLL/ClsSc_ICMOReportBill.cs
index 2db1745..04de2d0 100644
--- a/WebAPI/DLL/ClsSc_ICMOReportBill.cs
+++ b/WebAPI/DLL/ClsSc_ICMOReportBill.cs
@@ -193,13 +193,22 @@
                       "," + oSub.HQty.ToString() + "," + oSub.HBadQty.ToString() + "," + oSub.HUnitID.ToString() + ",'" + oSub.HUnitNumber + "'," + oSub.HTimes.ToString() + "," + oSub.HSourceID.ToString() +
                       "," + oSub.HQtyMust.ToString() + "," + oSub.HWorkerID.ToString() + ",'" + oSub.HWorkerNumber + "'," + oSub.HBadCount.ToString() + "," + oSub.HWasterQty.ToString() +
                       ",'" + oSub.HCloseMan + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
-                      "," + oSub.HSourceInterID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+                      "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                       "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" +
                       "," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "','" + oSub.HBarCode + "','" + oSub.HOWNERTYPEID + "'," +
                       oSub.HISENTRUST + "," + oSub.HSTOCKINORGID + "," + oSub.HOWNERID + "," + oSub.HCHECKPRODUCT + ",'" + oSub.HQAIP + "'," +
                       oSub.HCOSTRATE + "," + oSub.HISBACKFLUSH + ",'" + oSub.HREQSRC + "','" + oSub.HREQBILLNO + "'," + oSub.HREQBILLID + "," + 
-                      oSub.HREQENTRYSEQ + "," + oSub.HREQENTRYID + "," + oSub.HMOMAINENTRYID + "," + oSub.HSTOCKINQUASELQTY + "," + oSub.HPRODUCTTYPE + ",'" + oSub.HPROJECTNO + "'," + oSub.HICMOENTRYSEQ + "," + oSub.HSEQ + ",'" + oSub.HPRODUCEDATE + "','" + oSub.HEXPIRYDATE + "'," + oSub.HBASEUNITID + "," + oSub.HDEPTID + "," + oSub.HGroupID + ",'" + oSub.HDESCRIPTION + "','" + oSub.HSourceNumber + "'," + oSub.HQPQty + ","  + oSub.HSourceEntryID + ","  + oSub.HICMOEntryID + ","  +  oSub.HWhID + "," + oSub.HSPID + ",'" + oSub.HBatChNo + "'," + oSub.HAuxPropID + ",'" + oSub.HMTONo + "'," + oSub.HPlanMode + "," + oSub.HERPInterID + "," + oSub.HERPEntryID +
+                      oSub.HREQENTRYSEQ + "," + oSub.HREQENTRYID + "," + oSub.HMOMAINENTRYID + "," + oSub.HSTOCKINQUASELQTY + "," + oSub.HPRODUCTTYPE + ",'" + oSub.HPROJECTNO + "'," + oSub.HICMOENTRYSEQ + "," + oSub.HSEQ + ",'" + oSub.HPRODUCEDATE + "','" + oSub.HEXPIRYDATE + "'," + oSub.HBASEUNITID + "," + oSub.HDEPTID + "," + oSub.HGroupID + ",'" + oSub.HDESCRIPTION + "','" + oSub.HSourceNumber + "'," + oSub.HQPQty + ","  + oSub.HICMOEntryID + ","  +  oSub.HWhID + "," + oSub.HSPID + ",'" + oSub.HBatChNo + "'," + oSub.HAuxPropID + ",'" + oSub.HMTONo + "'," + oSub.HPlanMode + "," + oSub.HERPInterID + "," + oSub.HERPEntryID +
                       ") ");
+
+                    //鍙嶅啓浜ч噺姹囨姤鍗曚复鏃惰〃鍏宠仈瀛楁淇℃伅
+                    string sql = string.Format(@"update Sc_ICMOBillWorkQtyStatus_Tmp  set 
+                                                                    HICMOReportInterID ='" + omodel.HInterID +
+                                                                   "', HICMOReportBillNo='" + omodel.HBillNo +
+                                                                   "', HRelationInterID='" + omodel.HInterID +
+                                                                   "', HRelationEntryID='" + oSub.HEntryID +
+                                                                   "' from Sc_ICMOBillWorkQtyStatus_Tmp a where a.HICMOBillNo='" + DetailColl[0].HICMOBillNo + "' and a.HSourceID='" + DetailColl[0].HSourceID + "' and  HICMOInterID='" + DetailColl[0].HICMOInterID + "' and a.HICMOEntryID='" + DetailColl[0].HICMOEntryID + "' and a.HMaker='" + omodel.HMaker + "'  and HRelationInterID='0'");
+                    oCn.RunProc(sql);
                 }
                 //
                 //foreach (Model.ClsSc_ICMOReportBillSub oSub in DetailColl)
@@ -213,7 +222,8 @@
                 //        return false;
                 //    }
                 //}
-                //
+                //               
+
                 sReturn = "鏂板鍗曟嵁鎴愬姛锛�";
                 oCn.Commit();
                 return true;
@@ -349,157 +359,118 @@
 
                 if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0)
                 {
-                    LogService.Write("鐢熶骇姹囨姤鍗曞鏍革紝鑾峰彇json瀛愯〃淇℃伅澶辫触");
+                    sReturn = "webapi鐢熶骇姹囨姤鍗曞鏍革紝鑾峰彇json瀛愯〃淇℃伅澶辫触";
                     oCn.RollBack();
                     return false;
                 }
                 else
                 {
-                    LogService.Write("鑾峰彇json瀛愯〃淇℃伅鎴愬姛");
-                    string sJson_ZYMESFLAG = "";    //鐢熶骇姹囨姤鍗曞悓姝ES鏍囪
-                    sJson_ZYMESFLAG = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FHZYMESFLAG"]);
+                    JObject model = new JObject();
+                    model.Add("FBillType", new JObject() { ["FNumber"] = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBillType"]) }); //鍗曟嵁绫诲瀷
+                    model.Add("FDate", Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDate"])); //鍗曟嵁鏃ユ湡                   
+                    model.Add("FPrdOrgId", new JObject() { ["FNumber"] = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FPRDORGID"] )}); //鐢熶骇缁勭粐浠g爜
+                    model.Add("FBillNo", HBillNo);
 
-                    string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," +
-                        "\"IsEntryBatchFill\":\"false\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," +
-                        "\"Model\": { \"FBILLNO\":\"" + HBillNo + "\"," +
-                        //"\"FID\":\"" + oMain.HInterID.ToString() + "\"," +
-                        "\"FBillType\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBillType"]) + "\"}," +
-                        //\"FDocumentStatus\":\"\",
-                        "\"FDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDate"]) + "\"," +
-                        "\"FPRDORGID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FPRDORGID"]) + "\"}," +
-                        //\"FWorkshipIdH\":{\"FNumber\":\"\"},
-                        //\"FDescription\":\"\",
-                        sJson_ZYMESFLAG +
-                        "\"FEntity\": [   ";
-                    string sJson_Entry = "";
-                    for (int i = 0; i < Ds.Tables[1].Rows.Count; i++)
-                    {
-                        if (sJson_Entry != "")
-                        {
-                            sJson_Entry = sJson_Entry + " , ";
-                        }
-                        string sJson_BatchNo = "";
-                        string sJson_StockPlace = "";
-                        string sJson_EntryCustom = "";
-                        if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1") //鏄惁鍚敤鎵规绠$悊
-                        {
-                            sJson_BatchNo = "  \"FLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"},    \"FLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"  , ";
-                        }
-                        else
-                        {
-                            sJson_BatchNo = "";
-                        }
-                        //浠撲綅
-                        if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSTOCKLOCID"]) == "")
-                        {
-                            sJson_StockPlace = "";
-                        }
-                        else
-                        {
-                            sJson_StockPlace = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSTOCKLOCID"]) + "\"}},";
-                        }
+                    JArray Fentity = new JArray();
+                    foreach (DataRow item in Ds.Tables[1].Rows)
+                    {                       
+                        JObject FentityModel = new JObject();
+                        FentityModel.Add("FSrcEntryId", item["FSRCENTRYID"].ToString());//  婧愬崟鍒嗗綍鍐呯爜銆�
+                        FentityModel.Add("FIsNew", item["FIsNew"].ToString());//  婧愬崟绫诲瀷 
+                        FentityModel.Add("FMaterialId", new JObject() { ["FNumber"] = item["FMaterialId"].ToString() }); // 鐗╂枡缂栫爜 
+                        FentityModel.Add("FREPORTTYPE", new JObject() { ["FNumber"] = item["FREPORTTYPE"].ToString() });  // 鐢熶骇姹囨姤绫诲瀷
+                        FentityModel.Add("FProductType", item["FPRODUCTTYPE"].ToString());// 	 浜у搧绫诲瀷
+                        FentityModel.Add("FUNITID", new JObject() { ["FNumber"] = item["FUNITID"].ToString() });//鍗曚綅
+                        FentityModel.Add("FWORKSHIPID", new JObject() { ["FNumber"] = item["FWORKSHOPID"].ToString() });//鐢熶骇杞﹂棿
+                        FentityModel.Add("FMTONO", item["FMTONO"].ToString());//   璁″垝璺熻釜鍙�
+                        FentityModel.Add("FCheckProduct", item["FCheckProduct"].ToString());//   浜у搧妫�楠�
+                        FentityModel.Add("FISENTRUST", item["FISENTRUST"].ToString());//  	 缁勭粐濮旀墭鍔犲伐
+                        FentityModel.Add("FSrcBillType", "FSRCBILLTYPE");//   婧愬崟绫诲瀷
+                        FentityModel.Add("FMOBILLNO", item["FMOBILLNO"].ToString());//  鐢熶骇璁㈠崟
+                        FentityModel.Add("FSrcBillNo", item["FSrcBillNo"].ToString());//   婧愬崟缂栧彿
+                        FentityModel.Add("FMoEntrySeq", item["FMoEntrySeq"].ToString());//鐢熶骇璁㈠崟琛屽彿
+                        FentityModel.Add("FPROJECTNO", item["FPROJECTNO"].ToString());//  椤圭洰缂栧彿
+                        FentityModel.Add("FSTDMANHOUR", item["FSTDMANHOUR"].ToString());//  鍗曚綅鏍囧噯宸ユ椂
+                        FentityModel.Add("FHRPREPARETIME", item["FHRPREPARETIME"].ToString());//  浜哄憳鍑嗗宸ユ椂
+                        FentityModel.Add("FMACPREPARETIME", item["FMACPREPARETIME"].ToString());//  鏈哄櫒鍑嗗宸ユ椂
+                        FentityModel.Add("FSrcInterId", item["FSrcInterId"].ToString());//  婧愬崟鍐呯爜
+                        FentityModel.Add("FSrcEntrySeq", item["FSrcEntrySeq"].ToString());//  婧愬崟琛屽彿
+                        FentityModel.Add("FMoId", item["FMoId"].ToString());//鐢熶骇璁㈠崟鍐呯爜
+                        FentityModel.Add("FMoEntryId", item["FMoEntryId"].ToString());//鐢熶骇璁㈠崟鍒嗗綍鍙�
+                        FentityModel.Add("FBaseUnitID", new JObject() { ["FNumber"] = item["FBaseUnitID"].ToString() });//鍗曚綅
+                        FentityModel.Add("FSTOCKINORGID", new JObject() { ["FNumber"] = item["FSTOCKINORGID"].ToString() });//鍏ュ簱缁勭粐
+                        FentityModel.Add("FBOMID", new JObject() { ["FNumber"] = item["FBOMID"].ToString() });// BOM鐗堟湰
+                        FentityModel.Add("FOwnerTypeId", item["FOwnerTypeId"].ToString());// 璐т富绫诲瀷
+                        FentityModel.Add("FOwnerId", new JObject() { ["FNumber"] = item["FOwnerId"].ToString() });// 璐т富
+                        FentityModel.Add("FSTOCKID", new JObject() { ["FNumber"] = item["FSTOCKID"].ToString() });//浠撳簱
+                        FentityModel.Add("FCostRate", item["FCOSTRATE"].ToString());//	 鎴愭湰鏉冮噸
+                        FentityModel.Add("FSNUNITID", new JObject() { ["FNumber"] = item["FSNUNITID"].ToString() });//搴忓垪鍙峰崟浣�
+                        FentityModel.Add("FISBACKFLUSH", item["FISBACKFLUSH"].ToString());//  鍊掑啿棰嗘枡
+                        FentityModel.Add("FMOMAINENTRYID", item["FMOMAINENTRYID"].ToString());// 鐢熶骇璁㈠崟涓讳骇鍝佸垎褰�
+                        FentityModel.Add("FQAIP", item["FQAIP"].ToString());//绱ф�ユ斁琛�
+                        FentityModel.Add("FREQSRC", item["FREQSRC"].ToString());//闇�姹傛潵婧�
+                        FentityModel.Add("FREQBILLNO", item["FREQBILLNO"].ToString());//闇�姹傚崟鎹�
+                        FentityModel.Add("FREQBILLID", item["FREQBILLID"].ToString());// 闇�姹傚崟鎹唴鐮�
+                        FentityModel.Add("FREQENTRYSEQ", item["FREQENTRYSEQ"].ToString());//闇�姹傚崟鎹鍙�
+                        FentityModel.Add("FREQENTRYID", item["FREQENTRYID"].ToString());// 闇�姹傚崟鎹垎褰曞唴鐮�
+                        FentityModel.Add("FBASEQUAQTY", item["FBASEQUAQTY"].ToString());// 鍩烘湰鍗曚綅鍚堟牸鏁伴噺
+                        FentityModel.Add("FQUAQTY", item["FQUAQTY"].ToString());//鍚堟牸鏁伴噺
+                        FentityModel.Add("FFailQty", item["FFailQty"].ToString());//涓嶅悎鏍兼暟閲�
+                        FentityModel.Add("FScrapQty", item["FScrapQty"].ToString());//鎶ュ簾鏁伴噺
+                        FentityModel.Add("FBASEFINISHQTY", item["FBASEFINISHQTY"].ToString());//鍩烘湰鍗曚綅瀹屾垚鏁伴噺
+                        FentityModel.Add("FFINISHQTY", item["FFINISHQTY"].ToString());//瀹屾垚鏁伴噺
+                        FentityModel.Add("FLot", new JObject() { ["FNumber"] = item["FLot"].ToString() });//鎵瑰彿
+                        
+                        //sJson_BatchNo +
+                        //sJson_StockPlace +
+                        //" \"FAUXPROPID\":{\"FAUXPROPID__FF100002\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}}," +
 
-                        //鑷畾涔夊瓧娈靛鐞�
-                        if (oSystemParameter.omodel.WMS_CampanyName == "鍥涚淮灏�") //绯荤粺鍙傛暟  瀹㈡埛瀹氬埗鍖栧悕绉�     绌虹櫧涓洪�氱敤
-                        {
-                            sJson_EntryCustom = "\"FBILLSTATUS\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBILLSTATUS"]) + "\"," +         //鍗曟嵁鐘舵��
-                                                "\"F_abcd_Datetime\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["F_abcd_Datetime"]) + "\","; //璁″垝寮�宸ユ棩鏈�
-                        }
-                        //
-                        sJson_Entry = sJson_Entry + " {" +
-                        //" \"FEntryID\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HEntryID"]) + "," +
-                        " \"FSRCENTRYID\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSRCENTRYID"]) + "," +
-                        " \"FIsNew\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FIsNew"]) + "," +
-                        " \"FMATERIALID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FMATERIALID"]) + "\"}," +
-                        " \"FPRODUCTTYPE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FPRODUCTTYPE"]) + "\"," +
-                        " \"FREPORTTYPE\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FREPORTTYPE"]) + "\"}," +
-                        " \"FUNITID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FUNITID"]) + "\"}," +
-                        " \"FWORKSHIPID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FWORKSHOPID"]) + "\"}," +
-                        //\"FShiftGroupId\":{\"FNumber\":\"\"},
-                        sJson_BatchNo +
-                        //\"FDeptId\":{\"FNumber\":\"\"},
-                        sJson_StockPlace +
-                        " \"FMTONO\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FMTONO"]) + "\"," +
-                        " \"FCHECKPRODUCT\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FCHECKPRODUCT"]) + "," +
-                        " \"FISENTRUST\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FISENTRUST"]) + "," +
-                        " \"FSRCBILLTYPE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSRCBILLTYPE"]) + "\"," +
-                        " \"FMOBILLNO\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FMOBILLNO"]) + "\"," +
-                        " \"FAUXPROPID\":{\"FAUXPROPID__FF100002\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}}," +
-                        //\"FHumanQty\":\"0\",
-                        " \"FSRCBILLNO\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSRCBILLNO"]) + "\"," +
-                        //\"FMachineQty\":\"0\",
-                        //\"FMaterialUnitID\":{\"FNumber\":\"\"},
-                        //\"FStartTime\":\"1900-01-01\",
-                        //\"FEndTime\":\"1900-01-01\",
-                        //\"FTimeUnitId\":\"\",
-                        " \"FMOENTRYSEQ\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FMOENTRYSEQ"]) + "," +
-                        //" \"FSTANDHOURUNITID\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSTANDHOURUNITID"]) + "\"," +
-                        " \"FPROJECTNO\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FPROJECTNO"]) + "\"," +
-                        " \"FSTDMANHOUR\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSTDMANHOUR"]) + "," +
-                        " \"FHRPREPARETIME\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FHRPREPARETIME"]) + "," +
-                        //\"FHrWorkTime\":\"0\",
-                        " \"FMACPREPARETIME\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FMACPREPARETIME"]) + "," +
-                        //\"FMacWorkTime\":\"0\",
-                        //\"FDescriptionE\":\"\",
-                        " \"FSRCINTERID\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSRCINTERID"]) + "," +
-                        " \"FSRCENTRYSEQ\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSRCENTRYSEQ"]) + "," +
-                        " \"FMOID\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FMOID"]) + "," +
-                        " \"FMOENTRYID\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FMOENTRYID"]) + "," +
-                        " \"FBASEUNITID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBASEUNITID"]) + "\"}," +
-                        " \"FSTOCKINORGID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSTOCKINORGID"]) + "\"}," +
-                        " \"FBOMID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBOMID"]) + "\"}," +
-                        " \"FOWNERTYPEID\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FOWNERTYPEID"]) + "\"," +
-                        " \"FOWNERID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FOWNERID"]) + "\"}," +
-                        " \"FSTOCKID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSTOCKID"]) + "\"}," +
-                        " \"FCOSTRATE\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FCOSTRATE"]) + "," +
-                        " \"FSNUNITID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSNUNITID"]) + "\"}," +
-                        //\"FSNQty\":\"0\",
-                        //\"FProduceDate\":\"1900-01-01\",
-                        //\"FExpiryDate\":\"1900-01-01\",
-                        " \"FISBACKFLUSH\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FISBACKFLUSH"]) + "," +
-                        " \"FMOMAINENTRYID\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FMOMAINENTRYID"]) + "," +
-                        " \"FQAIP\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FQAIP"]) + "\"," +
-                        " \"FREQSRC\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FREQSRC"]) + "\"," +
-                        " \"FREQBILLNO\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FREQBILLNO"]) + "\"," +
-                        " \"FREQBILLID\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FREQBILLID"]) + "," +
-                        " \"FREQENTRYSEQ\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FREQENTRYSEQ"]) + "," +
-                        " \"FREQENTRYID\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FREQENTRYID"]) + "," +
-                        " \"FBASEQUAQTY\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBASEQUAQTY"]) + "," +
-                        " \"FQUAQTY\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FQUAQTY"]) + "," +
-                        " \"FBASEFINISHQTY\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBASEFINISHQTY"]) + "," +
-                        " \"FFINISHQTY\":" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FFINISHQTY"]) + "," +
-                        sJson_EntryCustom +
-
-                        //\"FSerialSubEntity\":[{\"FDetailID\":\"0\",
-                        //\"FQCMaterialId\":{\"FNUMBER\":\"\"},
-                        //\"FInspectResult\":\"\",
-                        //\"FQcAuxPropId\":{\"FQCAUXPROPID__FF100002\":{\"FNumber\":\"\"}},
-                        //\"FQCQty\":\"0\",
-                        //\"FSerialNo\":\"\",
-                        //\"FSerialId\":{\"FNUMBER\":\"\"},
-                        //\"FQCStockInSelQty\":\"0\",
-                        //\"FSerialNote\":\"\",
-                        //\"FBaseQCQty\":\"0\",
-                        //\"FBaseQCStockInSelQty\":\"0\"}]
-
-                        " \"FEntity_Link\": [{" +
-                            " \"FEntity_Link_FFlowId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FFlowId"]) + "\"," +
-                            " \"FEntity_Link_FFlowLineId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FFlowLineId"]) + "\"," +
-                            " \"FEntity_Link_FRuleId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FRuleId"]) + "\"," +
-                            " \"FEntity_Link_FSTableName\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FSTableName"]) + "\"," +
-                            " \"FEntity_Link_FSBillId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FSBillId"]) + "\"," +
-                            " \"FEntity_Link_FSId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FSId"]) + "\"" +
-                        " } ]," +
-                        " \"FBFLOWID\":{\"FID\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBFLOWID"]) + "\"}}";
+                        JArray Fentity2 = new JArray();
+                        JObject FentityModel2 = new JObject();
+                        FentityModel2.Add("FEntity_Link_FFlowId", item["FEntity_Link_FFlowId"].ToString());
+                        FentityModel2.Add("FEntity_Link_FFlowLineId", item["FEntity_Link_FFlowLineId"].ToString());
+                        FentityModel2.Add("FEntity_Link_FRuleId", item["FEntity_Link_FRuleId"].ToString());
+                        FentityModel2.Add("FEntity_Link_FSTableName", item["FEntity_Link_FSTableName"].ToString());
+                        FentityModel2.Add("FEntity_Link_FSBillId", item["FEntity_Link_FSBillId"].ToString());
+                        FentityModel2.Add("FEntity_Link_FSId", item["FEntity_Link_FSId"].ToString());
+                        Fentity2.Add(FentityModel2);
+                        FentityModel.Add("FEntity_Link", Fentity2);
+                        FentityModel.Add("FBFLowId", new JObject() { ["FID"] = item["FBFLOWID"].ToString() }); //
+                        Fentity.Add(FentityModel);
                     }
-                    string sJson_End = "  ]  }}";
-                    string sJson = sJson_Main + sJson_Entry + sJson_End;
+                    model.Add("FEntity", Fentity); //鏄庣粏淇℃伅                       
+                    JObject jsonRoot = new JObject()
+                    {
+                        ["Creator"] = "",
+                        ["NeedUpDateFields"] = new JArray(),
+                        ["NeedReturnFields"] = new JArray(),
+                        //["IsDeleteEntry"] = "true",
+                        //["SubSystemId"] = "",
+                        //["IsVerifyBaseDataField"] = "false",
+                        ["IsDeleteEntry"] = "true",
+                        ["SubSystemId"] = "",
+                        ["IsVerifyBaseDataField"] = "true",
+                        ["IsEntryBatchFill"] = "false",
+                        ["ValidateFlag"] = "true",
+                        ["NumberSearch"] = "true",
+                        ["IsAutoAdjustField"] = "false",
+                        ["InterationFlags"] = "",
+                        ["IgnoreInterationFlag"] = "",
+                        //["IsAutoSubmitAndAudit"] = true,//鑷姩璋冪敤鎻愪氦鍜屽鏍稿姛鑳�
+                        ["Model"] = model
+                    };
+
+
+                    //string sJson_ZYMESFLAG = "";    //鐢熶骇姹囨姤鍗曞悓姝ES鏍囪
+                    //sJson_ZYMESFLAG = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FHZYMESFLAG"]);
+
+                 
 
                     //浠庨厤缃枃浠惰幏鍙� CLOUD缃戝潃銆佽处濂椾俊鎭�佺櫥褰曠敤鎴枫�佺櫥褰曞瘑鐮�
                     if (!Pub_Class.ClsPub.GetCLOUDLoginInfo(ref Pub_Class.ClsPub.sExeReturnInfo))
                     {
-                        LogService.Write("鐢熶骇姹囨姤鍗曞鏍革紝鍚屾鑾峰彇鐧诲綍璐﹀彿瀵嗙爜澶辫触");
-
+                        sReturn = "鐢熶骇姹囨姤鍗曞鏍革紝鍚屾鑾峰彇鐧诲綍璐﹀彿瀵嗙爜澶辫触";
+                        oCn.RollBack();
                         return false;
                     }
 
@@ -507,22 +478,19 @@
                     var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>();
                     if (isSuccess == 0)
                     {
+                        sReturn = "鐧诲綍閲戣澏澶辫触!";
                         oCn.RollBack();
                         return false;
                     }
                     else
                     {
-                        LogService.Write("寮�濮嬭皟鐢ㄤ繚瀛樻柟娉�");
-                        string result = InvokeHelper.Save("PRD_MORPT", JsonConvert.SerializeObject(sJson));//淇濆瓨
+                        LogService.Write(JsonConvert.SerializeObject(jsonRoot));
+                        string result = InvokeHelper.Save("PRD_MORPT", JsonConvert.SerializeObject(jsonRoot));//淇濆瓨
 
                         if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
                         {
-                            LogService.Write("鐢熶骇姹囨姤閿欒jsonRoot:" + sJson);
-                            oCn.RollBack();
-                            objJsonResult.code = "0";
-                            objJsonResult.count = 0;
-                            objJsonResult.Message = $"鐢熶骇姹囨姤鍗曞悓姝ラ噾铦朵簯澶辫触锛佸崟鍙�:{HBillNo.ToString()}" + result + sJson;
-                            objJsonResult.data = null;
+                            sReturn = "鐢熶骇姹囨姤鍗曞悓姝ラ噾铦朵簯澶辫触锛佸崟鍙�:" + HBillNo + result + jsonRoot;
+                            oCn.RollBack();                         
                             return false;
                         }
 
@@ -531,17 +499,14 @@
                         string result2 = string.Empty;
                         if (oSystemParameter.omodel.Sc_ICMOReportBill_AutoCheck == "Y") //绯荤粺鍙傛暟  鑷姩瀹℃牳 
                         {
-                            result1 = InvokeHelper.Submit("PRD_MORPT", JsonConvert.SerializeObject(sJson));//鎻愪氦
-                            result2 = InvokeHelper.Audit("PRD_MORPT", JsonConvert.SerializeObject(sJson));//瀹℃牳
+                            result1 = InvokeHelper.Submit("PRD_MORPT", JsonConvert.SerializeObject(jsonRoot));//鎻愪氦
+                            result2 = InvokeHelper.Audit("PRD_MORPT", JsonConvert.SerializeObject(jsonRoot));//瀹℃牳
 
                             if (JObject.Parse(result1)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE")
                             {
+                                sReturn = "鐢熶骇姹囨姤鍗曞崟鍙�:" + HBillNo + ",鎻愪氦澶辫触" + result;
                                 oCn.RollBack();
-                                objJsonResult.code = "0";
-                                objJsonResult.count = 0;
-                                objJsonResult.Message = $"鐢熶骇姹囨姤鍗曞崟鍙凤細{HBillNo}锛屾彁浜ゅけ璐�" + result;
-                                objJsonResult.data = null;
-                                return false;
+                                return false;                              
                             }
                         }                       
                     }                   
diff --git "a/WebAPI/DLL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_OtherBalBill.cs" "b/WebAPI/DLL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_OtherBalBill.cs"
index ef24bcd..047a231 100644
--- "a/WebAPI/DLL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_OtherBalBill.cs"
+++ "b/WebAPI/DLL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_OtherBalBill.cs"
@@ -72,7 +72,7 @@
                       ",HPriceRate,HSubsidyTotal,HDeuctTotal,HSubsidyID,HDeuctID" +
                       ",HPackQty,HPackPrice,HPackMoney,HPackMaterID,HSubsidyQty,HSubsidyMoney" +
                       ") values("
-                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
+                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'," + (oSub.HEntryCloseDate.ToShortDateString() == "1900/1/1" ? "NULL" : "'" + oSub.HEntryCloseDate.ToShortDateString() + "'") + "," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
                       "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                       "," + oSub.HMaterID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HEmpID.ToString() + "," + oSub.HSourceID.ToString()
                       + "," + oSub.HTimes.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HSqty.ToString() +
@@ -136,7 +136,7 @@
                       ",HPriceRate,HSubsidyTotal,HDeuctTotal,HSubsidyID,HDeuctID" +
                       ",HPackQty,HPackPrice,HPackMoney,HPackMaterID,HSubsidyQty,HSubsidyMoney" +
                       ") values("
-                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
+                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'," + (oSub.HEntryCloseDate.ToShortDateString() == "1900/1/1" ? "NULL" : "'" + oSub.HEntryCloseDate.ToShortDateString() + "'")  + "," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
                       "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                       "," + oSub.HMaterID.ToString() + "," + oSub.HProcID.ToString() + "," + oSub.HEmpID.ToString() + "," + oSub.HSourceID.ToString()
                       + "," + oSub.HTimes.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HSqty.ToString() +
diff --git "a/WebAPI/DLL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_WorkTimesBill.cs" "b/WebAPI/DLL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_WorkTimesBill.cs"
index 008f634..2267225 100644
--- "a/WebAPI/DLL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_WorkTimesBill.cs"
+++ "b/WebAPI/DLL/\345\267\245\350\265\204\347\256\241\347\220\206/ClsPay_WorkTimesBill.cs"
@@ -69,7 +69,7 @@
                       ",HEarlyQty,HEarlyTimes,HOutForEmpQty,HOutForEmpTimes,HOutForComQty,HOutForComTimes" +
                       ",HAbsentDays,HRestFlag,HSchClassID,HCTPrjID,HWorkTypeID,HPayMoney,HMoney" +
                       ") values("
-                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
+                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'," + (oSub.HEntryCloseDate.ToShortDateString() == "1900/1/1" ? "NULL" : "'" + oSub.HEntryCloseDate.ToShortDateString() + "'") + "," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
                       "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                       "," + oSub.HEmpID.ToString() + "," + oSub.HEmpRate.ToString() + "," + oSub.HPMTimes.ToString() + "," + oSub.HAMTimes.ToString() + "," + oSub.HBaseTimes.ToString() + "," + oSub.HBaseDays.ToString() +
                       "," + oSub.HOverTimes.ToString() + "," + oSub.HOverDays.ToString() + "," + oSub.HLeaveTimes.ToString() + "," + oSub.HLeaveDays.ToString() + "," + oSub.HLateQty.ToString() + "," + oSub.HLateTimes.ToString() +
@@ -130,7 +130,7 @@
                       ",HEarlyQty,HEarlyTimes,HOutForEmpQty,HOutForEmpTimes,HOutForComQty,HOutForComTimes" +
                       ",HAbsentDays,HRestFlag,HSchClassID,HCTPrjID,HWorkTypeID,HPayMoney,HMoney" +
                       ") values("
-                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
+                      + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "'," + (oSub.HEntryCloseDate.ToShortDateString() == "1900/1/1" ? "NULL" : "'" + oSub.HEntryCloseDate.ToShortDateString() + "'") + "," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" +
                       "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                       "," + oSub.HEmpID.ToString() + "," + oSub.HEmpRate.ToString() + "," + oSub.HPMTimes.ToString() + "," + oSub.HAMTimes.ToString() + "," + oSub.HBaseTimes.ToString() + "," + oSub.HBaseDays.ToString() +
                       "," + oSub.HOverTimes.ToString() + "," + oSub.HOverDays.ToString() + "," + oSub.HLeaveTimes.ToString() + "," + oSub.HLeaveDays.ToString() + "," + oSub.HLateQty.ToString() + "," + oSub.HLateTimes.ToString() +
diff --git a/WebAPI/Web.config b/WebAPI/Web.config
index 94f8736..3b1c9e8 100644
--- a/WebAPI/Web.config
+++ b/WebAPI/Web.config
@@ -35,7 +35,7 @@
 		<!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/> -->	<!--娴嬭瘯鏈嶅姟鍣�-->
 		<!--<add key="sUrl" value="http://localhost:8082/WEBS/WebService1.asmx"/>    鏈湴-->
 		<!--<add key="sUrl" value="http://192.168.56.1:81/web/WebService1.asmx"/>-->	<!--闄堥洴闈欐湰鍦伴厤缃�-->
-		<add key="sUrl" value="http://192.168.1.57:8082/WEBS-WMS/WebService1.asmx"/><!--涔濊彵-->
+		<!--<add key="sUrl" value="http://192.168.1.57:8082/WEBS-WMS/WebService1.asmx"/>--> <!--涔濊彵-->
 
 		<add key="webpages:Version" value="3.0.0.0" />
 		<add key="webpages:Enabled" value="false" />
diff --git "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/Sc_ProcessExchangeBill.cs" "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/Sc_ProcessExchangeBill.cs"
index fa63144..3b24b89 100644
--- "a/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/Sc_ProcessExchangeBill.cs"
+++ "b/WorkM/\346\265\201\350\275\254\345\215\241\347\256\241\347\220\206/Sc_ProcessExchangeBill.cs"
@@ -105,6 +105,7 @@
         public const Int16 HMouldNoCol = 79;
         public const Int16 HProcWorkNumCol = 80;
         public const Int16 HICMOEntryIDCol = 81;
+        public const Int16 HSNCtrlCol = 82;
 
 
 
@@ -1214,6 +1215,7 @@
                     grdMain.Rows[i].Cells[HTechnologyParameterCol].Value = oSub.HTechnologyParameter.ToString();
                     grdMain.Rows[i].Cells[HOverRateCol].Value = oSub.HOverRate.ToString();
                     grdMain.Rows[i].Cells[HMaxQtyCol].Value = oSub.HMaxQty.ToString();
+                    grdMain.Rows[i].Cells[HSNCtrlCol].Value = DBUtility.ClsPub.isBool(oSub.HSNCtrl);
 
                     //
                     grdMain.Rows[i].Cells[HICMOBillNoCol].Value = oSub.HICMOBillNo;
@@ -1565,6 +1567,7 @@
                         oSub.HProcCheckNote = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HProcCheckNoteCol].Value);
                         oSub.HMouldNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HMouldNoCol].Value);
                         oSub.HProcWorkNum = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HProcWorkNumCol].Value);
+                        oSub.HSNCtrl = DBUtility.ClsPub.isBool(grdMain.Rows[i].Cells[HSNCtrlCol].Value);
                         BillNew.DetailColl.Add(oSub);
                     }
                 }
@@ -1617,7 +1620,7 @@
         {
 
             //
-            grdMain.ColumnCount = 82;                       //鎬诲垪鏁�
+            grdMain.ColumnCount = 83;                       //鎬诲垪鏁�
             DBUtility.Xt_BaseBillFun.initGridFst(grdMain, this.Name);
             //
             grdMain.RowsDefaultCellStyle.WrapMode = DataGridViewTriState.True;
@@ -1736,6 +1739,7 @@
             grdMain.Columns[HEditCol].HeaderText = "涓嶅彲缂栬緫";
             grdMain.Columns[HOverRateCol].HeaderText = "瓒呴姣斾緥";
             grdMain.Columns[HMaxQtyCol].HeaderText = " 鏈�楂樹笂闄�";
+            grdMain.Columns[HSNCtrlCol].HeaderText = "SN鐮佽繃绔�";
 
 
             //鏍煎紡鍖� 
@@ -1878,6 +1882,12 @@
                 oCell2.Value = 0;
                 oCell2.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
                 grdMain.Rows[i].Cells[HEditCol] = oCell2;
+                //SN鐮佽繃绔�
+                DataGridViewCheckBoxCell oCell3 = new DataGridViewCheckBoxCell();
+                oCell3.ThreeState = false;
+                oCell3.Value = 0;
+                oCell3.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
+                grdMain.Rows[i].Cells[HSNCtrlCol] = oCell3;
             }
             //鏍煎紡鍖栫綉鏍�
             DBUtility.Xt_BaseBillFun.initGridLast(sAllowCol, sTotalCol, oSumGrid);
@@ -3544,6 +3554,7 @@
                 grdMain.Rows[i].Cells[HMaxQtyCol].Value = oTable.Rows[i]["鏈�楂樹笂闄�"].ToString();
                 grdMain.Rows[i].Cells[HMouldNoCol].Value = oTable.Rows[i]["妯″叿缂栧彿"].ToString();
                 grdMain.Rows[i].Cells[HProcWorkNumCol].Value = oTable.Rows[i]["绋嬪簭鍙�"].ToString();
+                grdMain.Rows[i].Cells[HSNCtrlCol].Value = oTable.Rows[i]["SN鐮佽繃绔�"].ToString();
             }
 
             Sub_CountProcExchQty();

--
Gitblit v1.9.1