فهرست منبع

对接恒洁3车间乾润的接口单独处理Ex_HGS3_QR

chenxy 5 سال پیش
والد
کامیت
05b18635a4

+ 22 - 0
WCF.Service/WCF.Contracts/Ex/IEx_HGS3_QR.cs

@@ -0,0 +1,22 @@
+
+using Dongke.IBOSS.PRD.WCF.DataModels;
+using System.Data;
+using System.ServiceModel;
+using System.ServiceModel.Web;
+
+namespace Dongke.IBOSS.PRD.WCF.Contracts
+{
+    /// <summary>
+    /// 智能设备对接服务(恒洁三水三车间对接乾润扫码)
+    /// </summary>
+    [ServiceContract(ConfigurationName = "Ex_HGS3_QR.IEx_HGS3_QR",
+    Name = "IEx_HGS3_QR",
+    Namespace = "Dongke.IBOSS.PRD.WCF.Contracts")]
+    public interface IEx_HGS3_QR
+    {
+        #region 恒洁三水三车间对接乾润扫码
+        [OperationContract]
+        string AddWorkInfoHGS3_QR_TEST(string barcode, string procedure_no, int road_no, double weight);
+        #endregion
+    }
+}

+ 14 - 0
WCF.Service/WCF.Contracts/ISmartDevice.cs

@@ -59,6 +59,20 @@ namespace Dongke.IBOSS.PRD.WCF.Contracts
             int procedureID, string barcode, string remarks);
 
         /// <summary>
+        /// 自动扫描计件(3车间)_集中采集(包装)
+        /// </summary>
+        /// <param name="accountCode"></param>
+        /// <param name="userCode"></param>
+        /// <param name="userPassword"></param>
+        /// <param name="procedureID"></param>
+        /// <param name="barcode"></param>
+        /// <param name="remarks"></param>
+        /// <returns></returns>
+        [OperationContract]
+        string AddWorkPieceByStatus3_packing(string accountCode, string userCode, string userPassword,
+            int procedureID, string[] barcodes, string remarks);
+
+        /// <summary>
         /// 注浆接口 xuwei add 2019-11-19
         /// </summary>
         /// <param name="accountCode"></param>

+ 1 - 0
WCF.Service/WCF.Contracts/WCF.Contracts.csproj

@@ -96,6 +96,7 @@
     <Compile Include="IPublicModule.cs" />
     <Compile Include="IReportModule.cs" />
     <Compile Include="ISAPData.cs" />
+    <Compile Include="Ex\IEx_HGS3_QR.cs" />
     <Compile Include="ISmartDeviceWeb.cs" />
     <Compile Include="ISmartDevice.cs" />
     <Compile Include="ISystemModule.cs" />

+ 7 - 0
WCF.Service/WCF.Hosting/App.config

@@ -275,6 +275,12 @@
                   behaviorConfiguration="endpointBehavior_DKIBOSSPRDService"
                   contract="SmartDeviceService.ISmartDevice"/>
       </service>
+      <!-- 智能设备数据服务 -->
+      <service name="Ex_HGS3_QR" behaviorConfiguration="serviceBehavior_DKIBOSSPRDService">
+        <endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_DKIBOSSPRDService"
+                  behaviorConfiguration="endpointBehavior_DKIBOSSPRDService"
+                  contract="Ex_HGS3_QR.IEx_HGS3_QR"/>
+      </service>
       <!-- WEB智能设备数据服务 -->
       <service name="SmartDeviceWeb" behaviorConfiguration="serviceBehavior_DKIBOSSPRDService">
         <endpoint address=""
@@ -346,5 +352,6 @@
     <add type="Dongke.IBOSS.PRD.WCF.Services.SmartDeviceService, WCF.Services" />
     <add type="Dongke.IBOSS.PRD.WCF.Services.SAPDataService, WCF.Services" />
     <add type="Dongke.IBOSS.PRD.WCF.Services.SmartDeviceWeb, WCF.Services" />
+    <add type="Dongke.IBOSS.PRD.WCF.Services.Ex_HGS3_QR, WCF.Services" />
   </dongke.batchingHosting>
 </configuration>

+ 267 - 0
WCF.Service/WCF.Services/Ex/Ex_HGS3_QR.cs

@@ -0,0 +1,267 @@
+/*******************************************************************************
+ * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
+ * 类的信息:
+ *      1.程序名称:SmartDeviceService.cs
+ *      2.功能描述:接收智能设备请求
+ * 编辑履历:
+ *      作者            日期                版本            修改内容
+ *      陈晓野          2018/10/25          1.00            新建
+ *******************************************************************************/
+
+using System;
+using System.Data;
+using System.ServiceModel;
+using System.ServiceModel.Activation;
+
+using Dongke.IBOSS.PRD.Basics.BaseResources;
+using Dongke.IBOSS.PRD.Basics.Library;
+using Dongke.IBOSS.PRD.Service.BarcodePrintService;
+using Dongke.IBOSS.PRD.Service.DataModels;
+using Dongke.IBOSS.PRD.Service.PMModuleLogic;
+using Dongke.IBOSS.PRD.Service.SmartDeviceService;
+using Dongke.IBOSS.PRD.WCF.Contracts;
+using Dongke.IBOSS.PRD.WCF.DataModels;
+using Dongke.WinForm.Controls.InvoiceLayout;
+using Newtonsoft.Json.Linq;
+
+namespace Dongke.IBOSS.PRD.WCF.Services
+{
+    /// <summary>
+    /// 智能设备对接服务
+    /// </summary>
+    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
+    [ServiceBehavior(ConfigurationName = "Ex_HGS3_QR",
+    InstanceContextMode = InstanceContextMode.PerCall,
+    ConcurrencyMode = ConcurrencyMode.Multiple,
+    UseSynchronizationContext = false)]
+    public class Ex_HGS3_QR : IEx_HGS3_QR
+    {
+        #region 恒洁三水三车间对接乾润扫码
+        public string AddWorkInfoHGS3_QR_TEST(string barcode, string procedure_no, int road_no, double weight)
+        {
+            return $"OK:{barcode}#{"H0122L"}#{"ABCDEFG"}#{1}#{1}#{1}";
+        }
+
+        /// <summary>
+        /// 恒洁三水三车间对接乾润扫码
+        /// </summary>
+        /// <param name="barcode"></param>
+        /// <param name="procedure_no">工序号</param>
+        /// <param name="road_no">道口号</param>
+        /// <param name="weight">重量</param>
+        /// <returns></returns>
+        public string AddWorkInfoHGS3_QR(string barcode, string procedure_no, int road_no, double weight)
+        {
+            /*
+工序号	工序名	道口号
+3_5_1	预干区(入)	1-6
+3_4_1	阴干区(入)	1
+3_4_2	烘干区(入)	1
+3_4_3	烘干区(出)	1
+3_3_1	毛坯库(入)	1-2
+3_3_2	毛坯库(出)	1
+3_3_3	精坯库(入)	1
+3_2_1	釉坯库(入)	1
+3_1_1	光瓷库(入)	1
+
+             */
+            string inputCode = $" barcode:{barcode} procedure_no:{procedure_no} road_no:{road_no} weight:{weight}";
+            SUserInfo sUserInfo = new SUserInfo();
+            sUserInfo.AccountID = 1;
+            sUserInfo.AccountCode = "dongke";
+            string returnMessage = "OK";
+            try
+            {
+                DataTable gdata = SmartDeviceLogic.GetGroutingdailydetail(barcode);
+
+                if (gdata == null || gdata.Rows.Count == 0)
+                {
+                    return $"NG:条码[{barcode}]不存在";
+                }
+                DataRow dataRow = gdata.Rows[0];
+                int goodstypeid = Convert.ToInt32(dataRow["goodstypeid"]);
+                string zhineng = (goodstypeid == 18 || goodstypeid == 19) ? "1" : "2";
+                int goods_line_type = Convert.ToInt32(dataRow["goods_line_type"]);
+                string gaoya = (goods_line_type == 1) ? "1" : "2";
+                int goodsleveltypeid = Convert.ToInt32(dataRow["goodsleveltypeid"]);
+                string level = goodsleveltypeid.ToString();
+                if (goodsleveltypeid == 4 || goodsleveltypeid == 5)
+                {
+                    level = "1";
+                }
+                else if (goodsleveltypeid == 15)
+                {
+                    level = "1";
+                }
+                else if (goodsleveltypeid == 8)
+                {
+                    level = "3";
+                }
+
+                //OK: 返回字符串(条码#型号#SKU码#结果#智能:1\连体:2#高压:1\普通:2)
+                returnMessage = $"OK:{barcode}#{dataRow["goodscode"]}#{dataRow["materialcode"]}#{level}#{zhineng}#{gaoya}";
+
+                int procedureID = 0;
+                if (procedure_no == "3_5_1")
+                {
+                    // 预干区(入)
+                    // TODO
+                    procedureID = 5;
+                    switch (road_no)
+                    {
+                        case 1:
+                            sUserInfo.UserID = 1;
+                            sUserInfo.UserCode = "SC35_1";
+                            break;
+                        case 2:
+                            sUserInfo.UserID = 2;
+                            sUserInfo.UserCode = "SC35_2";
+                            break;
+                        case 3:
+                            sUserInfo.UserID = 3;
+                            sUserInfo.UserCode = "SC35_3";
+                            break;
+                        case 4:
+                            sUserInfo.UserID = 4;
+                            sUserInfo.UserCode = "SC35_4";
+                            break;
+                        case 5:
+                            sUserInfo.UserID = 5;
+                            sUserInfo.UserCode = "SC35_5";
+                            break;
+                        case 6:
+                            sUserInfo.UserID = 6;
+                            sUserInfo.UserCode = "SC35_6";
+                            break;
+                        default:
+                            returnMessage = $"NG:工序[5_1]预干区(入)不存在道口号[{road_no}]";
+                            return returnMessage;
+                    }
+                }
+                else if (procedure_no == "3_4_1")
+                {
+                    // 阴干区(入)
+                    // TODO
+                    procedureID = 0;
+                    sUserInfo.UserID = 4;
+                    sUserInfo.UserCode = "SC35_4";
+
+                }
+                else if (procedure_no == "3_4_2")
+                {
+                    // 烘干区(入)
+                    // TODO
+                    procedureID = 0;
+                    sUserInfo.UserID = 4;
+                    sUserInfo.UserCode = "SC35_4";
+
+                }
+                else if (procedure_no == "3_4_3")
+                {
+                    // 烘干区(出)
+                    // TODO
+                    procedureID = 0;
+                    sUserInfo.UserID = 4;
+                    sUserInfo.UserCode = "SC35_4";
+
+                }
+                else if (procedure_no == "3_3_1")
+                {
+                    // 毛坯库(入)
+                    // TODO
+                    procedureID = 0;
+                    sUserInfo.UserID = 4;
+                    sUserInfo.UserCode = "SC35_4";
+                    if (road_no == 2)
+                    {
+
+                    }
+
+                }
+                else if (procedure_no == "3_3_2")
+                {
+                    // 毛坯库(出)
+                    // TODO
+                    procedureID = 0;
+                    sUserInfo.UserID = 4;
+                    sUserInfo.UserCode = "SC35_4";
+
+                }
+                else if (procedure_no == "3_3_3")
+                {
+                    // 精坯库(入)
+                    // TODO
+                    procedureID = 0;
+                    sUserInfo.UserID = 4;
+                    sUserInfo.UserCode = "SC35_4";
+
+                }
+                else if (procedure_no == "3_2_1")
+                {
+                    // 釉坯库(入)
+                    // TODO
+                    procedureID = 0;
+                    sUserInfo.UserID = 4;
+                    sUserInfo.UserCode = "SC35_4";
+
+                }
+                else if (procedure_no == "3_1_1")
+                {
+                    // 光瓷库(入)
+                    // TODO
+                    procedureID = 0;
+                    sUserInfo.UserID = 4;
+                    sUserInfo.UserCode = "SC35_4";
+
+                }
+
+                if (procedureID > 0)
+                {
+                    DataTable barcodeTable = new DataTable();
+                    barcodeTable.Columns.Add("LogoID");
+                    barcodeTable.Columns.Add("BarCode");
+                    barcodeTable.Columns.Add("Remarks");
+
+                    barcodeTable.Rows[0]["BarCode"] = barcode;
+                    barcodeTable.Rows[0]["Remarks"] = (weight > 0 ? weight+"KG" : null);
+
+                    ProcedureEntity procedureInfo = null;
+                    DataTable dt = PMModuleLogicDAL.AddWorkPiece(procedureID, barcodeTable, sUserInfo, out procedureInfo);
+
+                    if (dt != null && dt.Rows.Count > 0)
+                    {
+                        string out_msg = dt.Rows[0]["out_errMsg"].ToString();
+                        if (!string.IsNullOrWhiteSpace(out_msg))
+                        {
+                            OutputLog.TraceLog(LogPriority.Warning,
+                                    this.ToString(),
+                                    System.Reflection.MethodBase.GetCurrentMethod().Name,
+                                    inputCode + JsonHelper.ToJson(dt),
+                                    LocalPath.LogExePath + "SmartDevice\\");
+                            //if (out_msg.StartsWith("无效条码"))
+                            //{
+                            //    return "EP-01=" + out_msg;
+                            //}
+                            //if (out_msg.Contains("不能到达该工序"))
+                            //{
+                            //    return "EP-02=" + out_msg;
+                            //}
+                            return "NG:" + out_msg;
+                        }
+                    }
+                }
+                return returnMessage;
+            }
+            catch (Exception ex)
+            {
+                OutputLog.TraceLog(LogPriority.Error,
+                        this.ToString(),
+                        System.Reflection.MethodBase.GetCurrentMethod().Name,
+                        inputCode + ex.ToString(),
+                        LocalPath.LogExePath);
+                return "NG:MES系统异常";
+            }
+        }
+        #endregion
+    }
+}

+ 2 - 1
WCF.Service/WCF.Services/PDAModuleService.cs

@@ -681,7 +681,8 @@ namespace Dongke.IBOSS.PRD.WCF.Services
 		/// <param name="sessionKey">本次登陆密钥</param>
 		/// <param name="procedureID">工序ID</param>
 		/// <param name="productionDataEntitys">条码信息</param>
-		public ActionResult AddWorkPiece(string accountCode, string userCode, string userPassword, string sessionKey, int procedureID, ProductionDataEntity[] productionDataEntitys)
+		public ActionResult AddWorkPiece(string accountCode, string userCode, string userPassword, string sessionKey, int procedureID,
+            ProductionDataEntity[] productionDataEntitys)
 		{
 			ActionResult actionResult = new ActionResult();
 			try

+ 78 - 221
WCF.Service/WCF.Services/SmartDeviceService.cs

@@ -264,6 +264,84 @@ namespace Dongke.IBOSS.PRD.WCF.Services
         }
 
         /// <summary>
+        /// 自动扫描计件(3车间)_集中采集(包装)
+        /// </summary>
+        /// <returns></returns>
+        public string AddWorkPieceByStatus3_packing(string accountCode, string userCode, string userPassword,
+            int procedureID, string[] barcodes, string remarks)
+        {
+            string inputCode = $" accountCode:{accountCode} userCode:{userCode} userPassword:{userPassword} procedureID:{procedureID} barcodes:{ JsonHelper.ToJson(barcodes)} remarks:{remarks}";
+            try
+            {
+                DataTable userInfo = SmartDeviceLogic.CheckUserCode(accountCode, userCode);
+                if (userInfo == null)
+                {
+                    OutputLog.TraceLog(LogPriority.Warning,
+                            this.ToString(),
+                            System.Reflection.MethodBase.GetCurrentMethod().Name,
+                            " userInfo is null " + inputCode,
+                            LocalPath.LogExePath + "SmartDevice\\");
+                    return "EU-01";
+                }
+                SUserInfo sUserInfo = new SUserInfo();
+                sUserInfo.AccountID = Convert.ToInt32(userInfo.Rows[0]["AccountID"]);
+                sUserInfo.AccountCode = accountCode;
+                sUserInfo.UserID = Convert.ToInt32(userInfo.Rows[0]["userid"]);
+                sUserInfo.UserCode = userCode;
+
+                DataTable barcodeTable = userInfo;
+                barcodeTable.Columns.Add("LogoID");
+                barcodeTable.Columns.Add("BarCode");
+                barcodeTable.Columns.Add("Remarks");
+
+                for (int i = 0; i < barcodes.Length; i++)
+                {
+                    if (i > 0)
+                    {
+                        barcodeTable.Rows.Add(barcodeTable.Rows[0].ItemArray);
+                    }
+                    barcodeTable.Rows[i]["BarCode"] = barcodes[i];
+                    barcodeTable.Rows[i]["Remarks"] = remarks;
+                }
+
+                ProcedureEntity procedureInfo = null;
+                DataTable dt = PMModuleLogicDAL.AddWorkPiece(procedureID, barcodeTable, sUserInfo, out procedureInfo);
+
+                if (dt != null && dt.Rows.Count > 0)
+                {
+                    string out_msg = dt.Rows[0]["out_errMsg"].ToString();
+                    if (!string.IsNullOrWhiteSpace(out_msg))
+                    {
+                        OutputLog.TraceLog(LogPriority.Warning,
+                                this.ToString(),
+                                System.Reflection.MethodBase.GetCurrentMethod().Name,
+                                inputCode + JsonHelper.ToJson(dt),
+                                LocalPath.LogExePath + "SmartDevice\\");
+                        //if (out_msg.StartsWith("无效条码"))
+                        //{
+                        //    return "EP-01=" + out_msg;
+                        //}
+                        //if (out_msg.Contains("不能到达该工序"))
+                        //{
+                        //    return "EP-02=" + out_msg;
+                        //}
+                        return "EP-00=" + out_msg;
+                    }
+                }
+                return "OK";
+            }
+            catch (Exception ex)
+            {
+                OutputLog.TraceLog(LogPriority.Error,
+                        this.ToString(),
+                        System.Reflection.MethodBase.GetCurrentMethod().Name,
+                        inputCode + ex.ToString(),
+                        LocalPath.LogExePath);
+                return "EE";
+            }
+        }
+
+        /// <summary>
         /// 注浆接口 xuwei add 2019-11-19
         /// </summary>
         /// <param name="accountCode"></param>
@@ -599,227 +677,6 @@ namespace Dongke.IBOSS.PRD.WCF.Services
         {
             return $"OK:{barcode}#{"H0122L"}#{"ABCDEFG"}#{1}#{1}#{1}";
         }
-
-        /// <summary>
-        /// 恒洁三水三车间对接乾润扫码
-        /// </summary>
-        /// <param name="barcode"></param>
-        /// <param name="procedure_no">工序号</param>
-        /// <param name="road_no">道口号</param>
-        /// <param name="weight">重量</param>
-        /// <returns></returns>
-        public string AddWorkInfoHGS3_QR(string barcode, string procedure_no, int road_no, double weight)
-        {
-            /*
-工序号	工序名	道口号
-3_5_1	预干区(入)	1-6
-3_4_1	阴干区(入)	1
-3_4_2	烘干区(入)	1
-3_4_3	烘干区(出)	1
-3_3_1	毛坯库(入)	1-2
-3_3_2	毛坯库(出)	1
-3_3_3	精坯库(入)	1
-3_2_1	釉坯库(入)	1
-3_1_1	光瓷库(入)	1
-
-             */
-            string inputCode = $" barcode:{barcode} procedure_no:{procedure_no} road_no:{road_no} weight:{weight}";
-            SUserInfo sUserInfo = new SUserInfo();
-            sUserInfo.AccountID = 1;
-            sUserInfo.AccountCode = "dongke";
-            string returnMessage = "OK";
-            try
-            {
-                DataTable gdata = SmartDeviceLogic.GetGroutingdailydetail(barcode);
-
-                if (gdata == null || gdata.Rows.Count == 0)
-                {
-                    return $"NG:条码[{barcode}]不存在";
-                }
-                DataRow dataRow = gdata.Rows[0];
-                int goodstypeid = Convert.ToInt32(dataRow["goodstypeid"]);
-                string zhineng = (goodstypeid == 18 || goodstypeid == 19) ? "1" : "2";
-                int goods_line_type = Convert.ToInt32(dataRow["goods_line_type"]);
-                string gaoya = (goods_line_type == 1) ? "1" : "2";
-                int goodsleveltypeid = Convert.ToInt32(dataRow["goodsleveltypeid"]);
-                string level = goodsleveltypeid.ToString();
-                if (goodsleveltypeid == 4 || goodsleveltypeid == 5)
-                {
-                    level = "1";
-                }
-                else if (goodsleveltypeid == 15)
-                {
-                    level = "1";
-                }
-                else if (goodsleveltypeid == 8)
-                {
-                    level = "3";
-                }
-
-                //OK: 返回字符串(条码#型号#SKU码#结果#智能:1\连体:2#高压:1\普通:2)
-                returnMessage = $"OK:{barcode}#{dataRow["goodscode"]}#{dataRow["materialcode"]}#{level}#{zhineng}#{gaoya}";
-
-                int procedureID = 0;
-                if (procedure_no == "3_5_1")
-                {
-                    // 预干区(入)
-                    // TODO
-                    procedureID = 5;
-                    switch (road_no)
-                    {
-                        case 1:
-                            sUserInfo.UserID = 1;
-                            sUserInfo.UserCode = "SC35_1";
-                            break;
-                        case 2:
-                            sUserInfo.UserID = 2;
-                            sUserInfo.UserCode = "SC35_2";
-                            break;
-                        case 3:
-                            sUserInfo.UserID = 3;
-                            sUserInfo.UserCode = "SC35_3";
-                            break;
-                        case 4:
-                            sUserInfo.UserID = 4;
-                            sUserInfo.UserCode = "SC35_4";
-                            break;
-                        case 5:
-                            sUserInfo.UserID = 5;
-                            sUserInfo.UserCode = "SC35_5";
-                            break;
-                        case 6:
-                            sUserInfo.UserID = 6;
-                            sUserInfo.UserCode = "SC35_6";
-                            break;
-                        default:
-                            returnMessage = $"NG:工序[5_1]预干区(入)不存在道口号[{road_no}]";
-                            return returnMessage;
-                    }
-                }
-                else if (procedure_no == "3_4_1")
-                {
-                    // 阴干区(入)
-                    // TODO
-                    procedureID = 0;
-                    sUserInfo.UserID = 4;
-                    sUserInfo.UserCode = "SC35_4";
-
-                }
-                else if (procedure_no == "3_4_2")
-                {
-                    // 烘干区(入)
-                    // TODO
-                    procedureID = 0;
-                    sUserInfo.UserID = 4;
-                    sUserInfo.UserCode = "SC35_4";
-
-                }
-                else if (procedure_no == "3_4_3")
-                {
-                    // 烘干区(出)
-                    // TODO
-                    procedureID = 0;
-                    sUserInfo.UserID = 4;
-                    sUserInfo.UserCode = "SC35_4";
-
-                }
-                else if (procedure_no == "3_3_1")
-                {
-                    // 毛坯库(入)
-                    // TODO
-                    procedureID = 0;
-                    sUserInfo.UserID = 4;
-                    sUserInfo.UserCode = "SC35_4";
-                    if (road_no == 2)
-                    {
-
-                    }
-
-                }
-                else if (procedure_no == "3_3_2")
-                {
-                    // 毛坯库(出)
-                    // TODO
-                    procedureID = 0;
-                    sUserInfo.UserID = 4;
-                    sUserInfo.UserCode = "SC35_4";
-
-                }
-                else if (procedure_no == "3_3_3")
-                {
-                    // 精坯库(入)
-                    // TODO
-                    procedureID = 0;
-                    sUserInfo.UserID = 4;
-                    sUserInfo.UserCode = "SC35_4";
-
-                }
-                else if (procedure_no == "3_2_1")
-                {
-                    // 釉坯库(入)
-                    // TODO
-                    procedureID = 0;
-                    sUserInfo.UserID = 4;
-                    sUserInfo.UserCode = "SC35_4";
-
-                }
-                else if (procedure_no == "3_1_1")
-                {
-                    // 光瓷库(入)
-                    // TODO
-                    procedureID = 0;
-                    sUserInfo.UserID = 4;
-                    sUserInfo.UserCode = "SC35_4";
-
-                }
-
-                if (procedureID > 0)
-                {
-                    DataTable barcodeTable = new DataTable();
-                    barcodeTable.Columns.Add("LogoID");
-                    barcodeTable.Columns.Add("BarCode");
-                    barcodeTable.Columns.Add("Remarks");
-
-                    barcodeTable.Rows[0]["BarCode"] = barcode;
-                    barcodeTable.Rows[0]["Remarks"] = (weight > 0 ? weight+"KG" : null);
-
-                    ProcedureEntity procedureInfo = null;
-                    DataTable dt = PMModuleLogicDAL.AddWorkPiece(procedureID, barcodeTable, sUserInfo, out procedureInfo);
-
-                    if (dt != null && dt.Rows.Count > 0)
-                    {
-                        string out_msg = dt.Rows[0]["out_errMsg"].ToString();
-                        if (!string.IsNullOrWhiteSpace(out_msg))
-                        {
-                            OutputLog.TraceLog(LogPriority.Warning,
-                                    this.ToString(),
-                                    System.Reflection.MethodBase.GetCurrentMethod().Name,
-                                    inputCode + JsonHelper.ToJson(dt),
-                                    LocalPath.LogExePath + "SmartDevice\\");
-                            //if (out_msg.StartsWith("无效条码"))
-                            //{
-                            //    return "EP-01=" + out_msg;
-                            //}
-                            //if (out_msg.Contains("不能到达该工序"))
-                            //{
-                            //    return "EP-02=" + out_msg;
-                            //}
-                            return "NG:" + out_msg;
-                        }
-                    }
-                }
-                return returnMessage;
-            }
-            catch (Exception ex)
-            {
-                OutputLog.TraceLog(LogPriority.Error,
-                        this.ToString(),
-                        System.Reflection.MethodBase.GetCurrentMethod().Name,
-                        inputCode + ex.ToString(),
-                        LocalPath.LogExePath);
-                return "NG:MES系统异常";
-            }
-        }
         #endregion
     }
 }

+ 1 - 0
WCF.Service/WCF.Services/WCF.Services.csproj

@@ -99,6 +99,7 @@
     <Compile Include="ServiceHost\ServiceInvoker.cs" />
     <Compile Include="ServiceInterpector\MyServiceBehavior.cs" />
     <Compile Include="ServiceInterpector\ServiceInterpector.cs" />
+    <Compile Include="Ex\Ex_HGS3_QR.cs" />
     <Compile Include="SmartDeviceWeb.cs" />
     <Compile Include="SmartDeviceService.cs" />
     <Compile Include="SystemModuleService.cs" />

+ 9 - 0
WCF.Service/WCF.WebHosting/Global.asax.cs

@@ -4,8 +4,10 @@ using System.ServiceModel.Activation;
 using System.Timers;
 using System.Web;
 using System.Web.Routing;
+
 using Curtain.DataAccess;
 using Curtain.Log;
+
 using Dongke.IBOSS.PRD.Basics.BaseResources;
 using Dongke.IBOSS.PRD.Basics.DataAccess;
 using Dongke.IBOSS.PRD.Basics.Library;
@@ -160,6 +162,13 @@ namespace Dongke.IBOSS.PRD.WCF.WebHosting
             (
                 new ServiceRoute
                 (
+                    "DKService/Ex_HGS3_QR", new WebServiceHostFactory(), typeof(Ex_HGS3_QR)
+                )
+            );
+            RouteTable.Routes.Add
+            (
+                new ServiceRoute
+                (
                     "DKService/SmartDeviceWeb", new WebServiceHostFactory(), typeof(SmartDeviceWeb)
                 )
             );

+ 4 - 0
WCF.Service/WCF.WebHosting/Web.config

@@ -184,6 +184,10 @@
         <endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_DKIBOSSPRDService"
           behaviorConfiguration="endpointBehavior_DKIBOSSPRDService" contract="SmartDeviceService.ISmartDevice"/>
       </service>
+      <service name="Ex_HGS3_QR" behaviorConfiguration="serviceBehavior_DKIBOSSPRDService">
+        <endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_DKIBOSSPRDService"
+          behaviorConfiguration="endpointBehavior_DKIBOSSPRDService" contract="Ex_HGS3_QR.IEx_HGS3_QR"/>
+      </service>
       <service name="SmartDeviceWeb" behaviorConfiguration="serviceBehavior_DKIBOSSPRDService">
         <endpoint address="" binding="webHttpBinding" bindingConfiguration="webHttpBinding_DKIBOSSPRDService"
           behaviorConfiguration="endpointBehavior_DKIBOSSPRD_PDAService" contract="SmartDeviceWeb.ISmartDeviceWeb"/>