From ed046e69610462580075f7a01ec7fa73fb571438 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期三, 24 七月 2024 08:10:55 +0800
Subject: [PATCH] 1

---
 DAL/生产管理/设备管理/ClsSb_EquipMaintainPlanBill.cs                         |   11 +
 WebAPI/Controllers/仓存管理/领料发货/Kf_MateOutRequestBillController.cs      |    2 
 WebAPI/Controllers/品质管理/巡检单/QC_PatrolProcCheckOtherBillController.cs |    2 
 WebAPI/Controllers/QC_ManagementController.cs                        |   47 +++++++++
 WebAPI/Controllers/条码管理/WEBSController.cs                            |   52 +++++++--
 DAL/生产管理/设备管理/ClsSb_EquipDotCheckPlanBill.cs                         |    8 +
 WebAPI/Controllers/LMESController.cs                                 |   11 ++
 WebAPI/Controllers/ProductInController.cs                            |    7 +
 WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs          |   39 +++++++
 Model/生产管理/设备管理/ClsSb_EquipDotCheckPlanBillMain.cs                   |    6 
 Model/生产管理/模具管理/ClsSc_MouldDotCheckPlanBillMain.cs                   |    3 
 WebAPI/Controllers/BaseSet/Gy_DepartmentController.cs                |   26 ++++-
 Model/生产管理/模具管理/ClsSc_MouldMaintainPlanBillMain.cs                   |    4 
 Model/生产管理/设备管理/ClsSb_EquipMaintainPlanBillMain.cs                   |    4 
 WebAPI/Controllers/品质管理/车间自检单/QC_WorkSelfCheckBillController.cs      |    2 
 DAL/生产管理/模具管理/ClsSc_MouldDotCheckPlanBill.cs                         |    6 +
 WebAPI/Controllers/品质管理/首件检验单/QC_FirstPieceCheckBillController.cs    |    4 
 DAL/生产管理/模具管理/ClsSc_MouldMaintainPlanBill.cs                         |    7 +
 WebAPI/Controllers/品质管理/工序检验单/QC_ProcessCheckBillController.cs       |    2 
 19 files changed, 205 insertions(+), 38 deletions(-)

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_MouldDotCheckPlanBill.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_MouldDotCheckPlanBill.cs"
index 8e34344..ea1696f 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_MouldDotCheckPlanBill.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_MouldDotCheckPlanBill.cs"
@@ -60,7 +60,9 @@
                 ",HEndDate='" + omodel.HEndDate + "'" +
                 ",HExplanation='" + omodel.HExplanation + "'" +
                 ",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
-
+                ",HUSEORGID=" + omodel.HUSEORGID +
+                //",HCREATEORGID=" + omodel.HCREATEORGID +
+                ",HDeptID=" + omodel.HDeptID +
 
                 " where HInterID=" + lngBillKey.ToString());
                 //鍒犻櫎鍏宠仈
@@ -142,12 +144,14 @@
                 ",HMouldID,HBeginDate"+
                 ",HEndDate,HCycleUnit,HCheckCycle" +
                 ",HInnerBillNo,HExplanation,HMouldDotCheckRuleID" +
+                ",HUSEORGID,HCREATEORGID,HDeptID" +
                 ") " +
                 " 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.HMouldID.ToString() + ",'" + omodel.HBeginDate + "'" +
                 ",'" + omodel.HEndDate + "','" + omodel.HCycleUnit + "'," + omodel.HCheckCycle.ToString() + 
                 ",'" + omodel.HInnerBillNo + "','" + omodel.HExplanation + "'" + "," + omodel.HMouldDotCheckRuleID +
+                "," + omodel.HUSEORGID + "," + omodel.HCREATEORGID + "," + omodel.HDeptID +
                 ") ");
                 //鎻掑叆瀛愯〃    //鐐规椤圭洰
                 foreach (Model.ClsSc_MouldDotCheckPlanBillSub 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_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 0db8750..98dece1 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"
@@ -68,6 +68,9 @@
                 ",HMainSourceInterID=" + omodel.HMainSourceInterID +
                 ",HMainSourceBillNo='" + omodel.HMainSourceBillNo + "'" +
                 ",HMouldID=" + omodel.HMouldID +
+                ",HUSEORGID=" + omodel.HUSEORGID +
+                //",HCREATEORGID=" + omodel.HCREATEORGID +
+                ",HDeptID=" + omodel.HDeptID +
                 " where HInterID=" + lngBillKey.ToString());
                 //鍒犻櫎鍏宠仈
                 DeleteRelation(ref sReturn, lngBillKey);
@@ -147,12 +150,14 @@
                 ",HYear,HPeriod,HRemark" +
                 ",HCycleUnit,HCheckCycle,HBeginDate,HEndDate"+
                 ",HInnerBillNo,HExplanation,HMouldMaintainRuleID,HMaintainLevID,HMainSourceInterID,HMainSourceBillNo,HMouldID" +
+                ",HUSEORGID,HCREATEORGID,HDeptID" +
                 ") " +
                 " 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.HMainSourceInterID + ",'" + omodel.HMainSourceBillNo + "'," + omodel.HMouldID + "," + omodel.HUSEORGID + 
+                "," + omodel.HCREATEORGID + "," + omodel.HDeptID +
                 ") ");
                 //鎻掑叆瀛愯〃閰嶄欢淇℃伅
                 foreach (Model.ClsSc_MouldMaintainPlanBillSub oSub in DetailColl)
diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckPlanBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckPlanBill.cs"
index 4a90c79..cceebe6 100644
--- "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckPlanBill.cs"
+++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckPlanBill.cs"
@@ -55,6 +55,9 @@
                 ",HCheckCycle=" + omodel.HCheckCycle.ToString() +
                 ",HExplanation='" + omodel.HExplanation+"'" +
                 ",HInnerBillNo='" + omodel.HInnerBillNo+"'" +
+                ",HUSEORGID=" + omodel.HUSEORGID +
+                //",HCREATEORGID=" + omodel.HCREATEORGID +
+                ",HDeptID=" + omodel.HDeptID +
                 " where HInterID=" + lngBillKey.ToString());
                 //鍒犻櫎鍏宠仈
                 DeleteRelation(ref sReturn, lngBillKey);
@@ -115,10 +118,11 @@
                 "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
                 ",HYear,HPeriod,HRemark,HEquipID" +
                 ",HBeginDate,HEndDate,HCheckCycle,HCycleUnit,HExplanation,HInnerBillNo,HMouldDotCheckRuleID" +
-                ") "+
+                ",HUSEORGID,HCREATEORGID,HDeptID" +
+                ") " +
                 " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
                 "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," + omodel.HEquipID.ToString() +
-                ",'" + omodel.HBeginDate +"','" +omodel.HEndDate + "'," + omodel.HCheckCycle.ToString() +",'"+ omodel.HCycleUnit + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo +"','" + omodel.HMouldDotCheckRuleID + "'"+
+                ",'" + omodel.HBeginDate +"','" +omodel.HEndDate + "'," + omodel.HCheckCycle.ToString() +",'"+ omodel.HCycleUnit + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo +"','" + omodel.HMouldDotCheckRuleID + "',"+ omodel.HUSEORGID + "," + omodel.HCREATEORGID + "," + omodel.HDeptID +
                 ") ");
                 //鎻掑叆瀛愯〃
                 foreach (Model.ClsSb_EquipDotCheckPlanBillSub oSub in DetailColl)
diff --git "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainPlanBill.cs" "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainPlanBill.cs"
index 2cd1bfd..2207397 100644
--- "a/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainPlanBill.cs"
+++ "b/DAL/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainPlanBill.cs"
@@ -58,6 +58,9 @@
                 ",HMaintainLevID=" + omodel.HMaintainLevID +
                 ",HMainSourceInterID=" + omodel.HMainSourceInterID +
                 ",HMainSourceBillNo='" + omodel.HMainSourceBillNo + "'" +
+                ",HUSEORGID=" + omodel.HUSEORGID +
+                //",HCREATEORGID=" + omodel.HCREATEORGID +
+                ",HDeptID=" + omodel.HDeptID +
                 " where HInterID=" + lngBillKey.ToString());
                 //鍒犻櫎鍏宠仈
                 DeleteRelation(ref sReturn, lngBillKey);
@@ -124,11 +127,13 @@
                 oCn.RunProc("Insert Into Sb_EquipMaintainPlanBillMain   " +
                 "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
                 ",HYear,HPeriod,HRemark,HEquipID" +
-                ",HBeginDate,HEndDate,HCheckCycle,HCycleUnit,HExplanation,HInnerBillNo,HMouldMaintainRuleID,HMaintainLevID,HMainSourceInterID,HMainSourceBillNo" +
-                ") "+
+                ",HBeginDate,HEndDate,HCheckCycle,HCycleUnit,HExplanation,HInnerBillNo" +
+                ",HMouldMaintainRuleID,HMaintainLevID,HMainSourceInterID,HMainSourceBillNo" +
+                ",HUSEORGID,HCREATEORGID,HDeptID" +
+                ") " +
                 " values('" + this.BillType + "','"  + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + omodel.HMaker + "',getdate()" +
                 "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," + omodel.HEquipID.ToString() +
-                ",'" + omodel.HBeginDate +"','" +omodel.HEndDate + "'," + omodel.HCheckCycle.ToString() +",'"+ omodel.HCycleUnit + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo +"','" + omodel.HMouldMaintainRuleID + "'," + omodel.HMaintainLevID + "," + omodel.HMainSourceInterID + ",'" + omodel.HMainSourceBillNo + "'" +
+                ",'" + omodel.HBeginDate +"','" +omodel.HEndDate + "'," + omodel.HCheckCycle.ToString() +",'"+ omodel.HCycleUnit + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo +"','" + omodel.HMouldMaintainRuleID + "'," + omodel.HMaintainLevID + "," + omodel.HMainSourceInterID + ",'" + omodel.HMainSourceBillNo + "'," + omodel.HUSEORGID + "," + omodel.HCREATEORGID + "," + omodel.HDeptID +
                 ") ");
                 if (DetailColl != null)
                 {
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_MouldDotCheckPlanBillMain.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_MouldDotCheckPlanBillMain.cs"
index bc9ad7b..dd37e0c 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_MouldDotCheckPlanBillMain.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_MouldDotCheckPlanBillMain.cs"
@@ -17,5 +17,8 @@
         public string HInnerBillNo;//    varchar(50)   --内部单据号
         public int HMouldDotCheckRuleID;//器具点检规程id
 
+        public int HUSEORGID;
+        public int HCREATEORGID;
+        public int HDeptID;
     }
 }
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\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 add8370..3e9af70 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,5 +19,9 @@
 
         public Int64 HMaintainLevID; //保养级别(gy_HMaintainLev)
         public Int64 HMouldID; //器具内码
+
+        public int HUSEORGID;
+        public int HCREATEORGID;
+        public int HDeptID;
     }
 }
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckPlanBillMain.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckPlanBillMain.cs"
index ced5ce2..fe357b6 100644
--- "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckPlanBillMain.cs"
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipDotCheckPlanBillMain.cs"
@@ -14,7 +14,9 @@
         public string HExplanation;
         public string HInnerBillNo;
         public int HMouldDotCheckRuleID;//设备点检规程id
-        
-        
+
+        public int HUSEORGID;
+        public int HCREATEORGID;
+        public int HDeptID;
     }
 }
diff --git "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainPlanBillMain.cs" "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainPlanBillMain.cs"
index d7c2b13..a0cd5c0 100644
--- "a/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainPlanBillMain.cs"
+++ "b/Model/\347\224\237\344\272\247\347\256\241\347\220\206/\350\256\276\345\244\207\347\256\241\347\220\206/ClsSb_EquipMaintainPlanBillMain.cs"
@@ -17,5 +17,9 @@
         public string HMouldMaintainRuleNo;//保养规程单号
 
         public Int64 HMaintainLevID; //保养级别(gy_HMaintainLev)
+
+        public int HUSEORGID;
+        public int HCREATEORGID;
+        public int HDeptID;
     }
 }
diff --git a/WebAPI/Controllers/BaseSet/Gy_DepartmentController.cs b/WebAPI/Controllers/BaseSet/Gy_DepartmentController.cs
index 8dfc115..7abfd45 100644
--- a/WebAPI/Controllers/BaseSet/Gy_DepartmentController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_DepartmentController.cs
@@ -61,12 +61,26 @@
                     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;
+                if (ds.Tables[0].Rows.Count > 0 && ds != null)
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "Sucess锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    objJsonResult.list = columnNameList;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鏌ヨ鍒伴儴闂ㄦ暟鎹紝璇疯仈绯荤郴缁熺鐞嗗憳杩涜鏍稿";
+                    objJsonResult.data = ds.Tables[0];
+                    objJsonResult.list = columnNameList;
+                    return objJsonResult;
+                }
+
+               
             }
             catch (Exception e)
             {
diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index 267935f..80a45d3 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -510,7 +510,16 @@
                         objJsonResult.data = null;
                         return objJsonResult;
                     }
-
+                    ds = oCN.RunProcReturn(@"select * from Sc_ICMOBillStatus_Tmp where HSourceInterID='"+ HInterID + "'   and  HSourceEntryID='"+ HEntryID + "'", "Sc_ICMOBillStatus_Tmp");
+                    if (ds.Tables[0].Rows.Count != 0)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "璇ュ伐搴忓凡娲惧崟,涓嶅厑璁搁噸澶嶆帓鍗曪紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                   
                     oCN.BeginTran();
 
                     oCN.RunProc("update Sc_ProcessExchangeBillSub set HSourceID=" + HSourceID + " where HInterID=" + HInterID + " and HEntryID=" + HEntryID);
diff --git a/WebAPI/Controllers/ProductInController.cs b/WebAPI/Controllers/ProductInController.cs
index 81e5847..a9a1b45 100644
--- a/WebAPI/Controllers/ProductInController.cs
+++ b/WebAPI/Controllers/ProductInController.cs
@@ -264,8 +264,11 @@
             //oBar = webserver.get_CheckTypeByBarCode(sCode, sInterID, sBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, ref DBUtility.ClsPub.sErrInfo);
             WebS.WebService1 oWebs = new WebS.WebService1();
             WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
-            string sExpressNumber = "";
-            //WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
+
+            Kf_MateOutBillController obill = new Kf_MateOutBillController();
+            //閲嶆柊鍚屾鐢熶骇棰嗘枡鍗�
+            objJsonResult = obill.GetKf_MateOutBill_Sync_Json(HBillNo, HBillType);
+
             WebSoBar = oWebs.get_BillBarCode_MateOutCheck(HBillNo, HBillType, HMaker, HOwnerID, ref DBUtility.ClsPub.sErrInfo);
             if (WebSoBar == null)
             {
diff --git a/WebAPI/Controllers/QC_ManagementController.cs b/WebAPI/Controllers/QC_ManagementController.cs
index 76b8b9b..d24128a 100644
--- a/WebAPI/Controllers/QC_ManagementController.cs
+++ b/WebAPI/Controllers/QC_ManagementController.cs
@@ -111,6 +111,53 @@
         #endregion
 
         #region 鏌ヨ鍒楄〃鏂规硶
+
+        /// <summary>
+        /// 杩斿洖妫�楠屾柟妗堝崟鍒楄〃 浠呭寘鍚富琛�
+        /// </summary>
+        /// <param name="sWhere"></param>
+        /// <returns></returns>
+        [Route("QC_Management/MES_QC_CheckProjectList_Json_Main")]
+        [HttpGet]
+        public object MES_QC_CheckProjectList_Json_Main(string sWhere, string user)
+        {
+            DataSet ds;
+            try
+            {
+                //鍒ゆ柇鏉冮檺
+                if (!DBUtility.ClsPub.Security_Log("Gy_QCCheckProject_Query", 1, false, user))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏃犳煡璇㈡潈闄�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("select  * from h_v_Gy_QCCheckProjectList_Main order by 鏃ユ湡 desc ", "h_v_Gy_QCCheckProjectList_Main");
+                }
+                else
+                {
+                    string sql1 = "select * from h_v_Gy_QCCheckProjectList_Main where 1=1";
+                    string sql = sql1 + sWhere + " order by 鏃ユ湡 desc ";
+                    ds = oCN.RunProcReturn(sql, "h_v_Gy_QCCheckProjectList_Main");
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            return GetObjectJson(ds);
+        }
+
+
         /// <summary>
         /// 杩斿洖妫�楠屾柟妗堝崟鍒楄〃
         /// </summary>
diff --git a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
index b0a1306..1cfaf5b 100644
--- a/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
@@ -6907,6 +6907,45 @@
         }
         #endregion
 
+        #region 鎶ュ伐鍙拌烦杞紓甯稿弽棣堝崟 寮圭獥鑾峰彇 璁惧缂栫爜
+
+        [Route("Sc_MESTransFerWorkBill/set_EquipFile")]
+        [HttpGet]
+        public object set_EquipFile(string HSourceName)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                string sql = "select a.HEquipFileNumber 璁惧缂栫爜 ,a.HName 璁惧鍚嶇О from Gy_EquipFileBillMain a left join Gy_Source b on a.HSourceID = b.HItemID where b.HName ='" + HSourceName   + "'";
+                ds = oCN.RunProcReturn(sql, "Gy_ErrMsgBackType");
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "Sucess锛�";
+                objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
+                return objJsonResult;
+            }
+            catch (Exception ex)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�" + ex.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
         #region 寮傚父鍙嶉鍗� 璺熻釜鏌ヨ
         [Route("Sc_MESTransFerWorkBill/GetErrMsgBackResumeList")]
         [HttpGet]
diff --git "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_MateOutRequestBillController.cs" "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_MateOutRequestBillController.cs"
index 5130162..8d56be4 100644
--- "a/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_MateOutRequestBillController.cs"
+++ "b/WebAPI/Controllers/\344\273\223\345\255\230\347\256\241\347\220\206/\351\242\206\346\226\231\345\217\221\350\264\247/Kf_MateOutRequestBillController.cs"
@@ -11,7 +11,7 @@
 using WebAPI.Models;
 
 
-namespace WebAPI.Controllers.浠撳瓨绠$悊.棰嗘枡鍙戣揣
+namespace WebAPI.Controllers
 {
     public class Kf_MateOutRequestBillController : ApiController
     {
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 6263785..52e6cd7 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"
@@ -34,7 +34,7 @@
                 List<object> columnNameList = new List<object>();
 
                 string sql1 = "select * from h_v_QC_PatrolProcCheckOtherBill where 1 = 1  ";
-                string sql = sql1 + sWhere + " order by hmainid ";
+                string sql = sql1 + sWhere + " order by 鍒跺崟鏃ユ湡 desc ";
                 ds = oCN.RunProcReturn(sql, "h_v_QC_PatrolProcCheckOtherBill");
 
                 //娣诲姞鍒楀悕
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 05ae380..924a72a 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"
@@ -136,7 +136,7 @@
                 List<object> columnNameList = new List<object>();
 
                 string sql1 = "select * from h_v_QC_ProcessCheckBillMainList where 1 = 1  ";
-                string sql = sql1 + sWhere + " order by hmainid desc";
+                string sql = sql1 + sWhere + " order by 鍒跺崟鏃ユ湡 desc";
                 ds = oCN.RunProcReturn(sql, "h_v_QC_ProcessCheckBillMainList");
 
                 //娣诲姞鍒楀悕
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 2bdf992..0459c16 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"
@@ -910,7 +910,7 @@
         }
         #endregion
 
-        #region 搴撳瓨/宸ュ簭 妫�楠屽崟鏍规嵁婧愬崟绫诲瀷鑾峰彇淇℃伅-婧愬崟涓哄伐搴忔祦杞崱
+        #region 杞﹂棿妫�楠屽崟鏍规嵁婧愬崟绫诲瀷鑾峰彇淇℃伅-婧愬崟涓哄伐搴忔祦杞崱
         [Route("QC_WorkSelfCheckBill/get_ProcessExchangeBill")]
         [HttpGet]
         public object get_ProcessExchangeBill(string HInterID, string user)
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 1ad168a..e3124e8 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"
@@ -34,7 +34,7 @@
                 List<object> columnNameList = new List<object>();
 
                 string sql1 = "select * from h_v_QC_FirstPieceCheckBill where 1 = 1  ";
-                string sql = sql1 + sWhere + " order by hmainid desc";
+                string sql = sql1 + sWhere + " order by 鍒跺崟鏃ユ湡 desc";
                 ds = oCN.RunProcReturn(sql, "h_v_QC_FirstPieceCheckBill");
 
                 //娣诲姞鍒楀悕
@@ -85,7 +85,7 @@
                 List<object> columnNameList = new List<object>();
 
                 string sql1 = "select * from h_v_QC_FirstPieceCheckBillMainList where 1 = 1  ";
-                string sql = sql1 + sWhere + " order by 鍒跺崟鏃ユ湡 desc";
+                string sql = sql1 + sWhere + "  ";
                 ds = oCN.RunProcReturn(sql, "h_v_QC_FirstPieceCheckBillMainList");
 
                 //娣诲姞鍒楀悕
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 32aaaca..6d9b83c 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"
@@ -3778,31 +3778,55 @@
         [HttpGet]
         public object get_SourceBarCode_MateOut_Json(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Double HPTQty, Int64 HPlanMode, Int64 HFIFOWhID, Int64 HStockOrgID)
         {
-            try
+            //鑾峰彇绯荤粺鍙傛暟
+            string sErrMsg = "";
+            if (oSystemParameter.ShowBill(ref sErrMsg) == true)
             {
-                WebSoBar = oWebs.get_SourceBarCode_MateOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HPTQty, HPlanMode, HFIFOWhID, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
-                if (WebSoBar == null)
+                if (oSystemParameter.omodel.WMS_CloudMode.ToUpper() == "N") //绯荤粺鍙傛暟鏄惁涓虹鏈変簯妯″紡,N涓哄叕鏈変簯妯″紡锛孻涓虹鏈変簯妯″紡
+                {
+                    if(HSourceBillType == "1214")
+                    {
+                        //閲嶆柊鍚屾鐢熶骇鍙戞枡閫氱煡鍗�
+                        Kf_MateOutRequestBillController obill = new Kf_MateOutRequestBillController();
+                        objJsonResult = obill.GetKf_MateOutRequestBill_Sync_Json(HSourceBillNo, HSourceBillType);
+                    }
+                }
+
+                try
+                {
+                    WebSoBar = oWebs.get_SourceBarCode_MateOut(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HPTQty, HPlanMode, HFIFOWhID, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
+                    if (WebSoBar == null)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+                    else
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 1;
+                        objJsonResult.Message = "鎴愬姛";
+                        objJsonResult.data = WebSoBar;
+                        return objJsonResult;
+                    }
+                }
+                catch (Exception e)
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+                    objJsonResult.Message = "鎵弿婧愬崟鏉$爜澶辫触锛�" + e.ToString();
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
-                else
-                {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 1;
-                    objJsonResult.Message = "鎴愬姛";
-                    objJsonResult.data = WebSoBar;
-                    return objJsonResult;
-                }
+
             }
-            catch (Exception e)
+            else
             {
                 objJsonResult.code = "0";
                 objJsonResult.count = 0;
-                objJsonResult.Message = "鎵弿婧愬崟鏉$爜澶辫触锛�" + e.ToString();
+                objJsonResult.Message = "鑾峰彇绯荤粺鍙傛暟澶辫触锛� " + sErrMsg;
                 objJsonResult.data = null;
                 return objJsonResult;
             }

--
Gitblit v1.9.1