Pārlūkot izejas kodu

增加立库对接接口

xuwei 3 gadi atpakaļ
vecāks
revīzija
d5561d69d7

+ 48 - 0
DK.Service/SmartDeviceService/SmartDeviceLogic.cs

@@ -223,5 +223,53 @@ namespace Dongke.IBOSS.PRD.Service.SmartDeviceService
         }
 
         //xuwei end
+
+        #region 恒洁三水三车间对接乾润工序用
+        /// <summary>
+        /// 获取条码返回数据
+        /// </summary>
+        /// <param name="barcode"></param>
+        /// <returns></returns>
+        public static DataTable GetGroutingdailydetail(string barcode)
+        {
+            IDBConnection conn = ClsDbFactory.CreateDBConnection(DataBaseType.ORACLE, DataManager.ConnectionString);
+            try
+            {
+                string sqlString = "SELECT \n" +
+                    "       t.barcode\n" +
+                    "      ,t.goodscode\n" +
+                    "      ,t.materialcode\n" +
+                    "      ,g.goodstypeid\n" +
+                    "      ,g.goods_line_type\n" +
+                    "      ,t.goodsleveltypeid\n" +
+                    "      ,t.GROUTINGLINECODE\n" +
+                    "      ,t.GROUTINGLINENAME\n" +
+                    "  FROM tp_pm_groutingdailydetail t\n" +
+                    " INNER JOIN tp_mst_goods g\n" +
+                    "    ON g.goodsid = t.goodsid\n" +
+                    " WHERE t.barcode = :barcode";
+                OracleParameter[] paras = new OracleParameter[]
+{
+                new OracleParameter(":barcode", barcode),
+};
+                DataTable data = conn.GetSqlResultToDt(sqlString, paras);
+
+                return data;
+            }
+            catch (Exception ex)
+            {
+                throw ex;
+            }
+            finally
+            {
+                conn.Close();
+            }
+        }
+
+        //public static string AddSmartLog(string )
+        //{
+
+        //}
+        #endregion 
     }
 }

+ 19 - 0
IBOSS.PRD.sln

@@ -137,6 +137,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PPModule", "DK.Client\PPMod
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InvoiceLayout", "DK.Service\InvoiceLayout\InvoiceLayout.csproj", "{440B03E6-474C-439A-AF83-900A01A57ABE}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WCF.ExHGS3QRS", "WCF.Service\WCF.Ex_HGS3_QRS\WCF.ExHGS3QRS.csproj", "{157CB7A7-8B8A-4043-AB3A-2C5BF32A1A27}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -982,6 +984,22 @@ Global
 		{440B03E6-474C-439A-AF83-900A01A57ABE}.Release|x64.Build.0 = Release|Any CPU
 		{440B03E6-474C-439A-AF83-900A01A57ABE}.Release|x86.ActiveCfg = Release|x86
 		{440B03E6-474C-439A-AF83-900A01A57ABE}.Release|x86.Build.0 = Release|x86
+		{157CB7A7-8B8A-4043-AB3A-2C5BF32A1A27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{157CB7A7-8B8A-4043-AB3A-2C5BF32A1A27}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{157CB7A7-8B8A-4043-AB3A-2C5BF32A1A27}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+		{157CB7A7-8B8A-4043-AB3A-2C5BF32A1A27}.Debug|Mixed Platforms.Build.0 = Debug|x86
+		{157CB7A7-8B8A-4043-AB3A-2C5BF32A1A27}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{157CB7A7-8B8A-4043-AB3A-2C5BF32A1A27}.Debug|x64.Build.0 = Debug|Any CPU
+		{157CB7A7-8B8A-4043-AB3A-2C5BF32A1A27}.Debug|x86.ActiveCfg = Debug|x86
+		{157CB7A7-8B8A-4043-AB3A-2C5BF32A1A27}.Debug|x86.Build.0 = Debug|x86
+		{157CB7A7-8B8A-4043-AB3A-2C5BF32A1A27}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{157CB7A7-8B8A-4043-AB3A-2C5BF32A1A27}.Release|Any CPU.Build.0 = Release|Any CPU
+		{157CB7A7-8B8A-4043-AB3A-2C5BF32A1A27}.Release|Mixed Platforms.ActiveCfg = Release|x86
+		{157CB7A7-8B8A-4043-AB3A-2C5BF32A1A27}.Release|Mixed Platforms.Build.0 = Release|x86
+		{157CB7A7-8B8A-4043-AB3A-2C5BF32A1A27}.Release|x64.ActiveCfg = Release|Any CPU
+		{157CB7A7-8B8A-4043-AB3A-2C5BF32A1A27}.Release|x64.Build.0 = Release|Any CPU
+		{157CB7A7-8B8A-4043-AB3A-2C5BF32A1A27}.Release|x86.ActiveCfg = Release|x86
+		{157CB7A7-8B8A-4043-AB3A-2C5BF32A1A27}.Release|x86.Build.0 = Release|x86
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -1038,6 +1056,7 @@ Global
 		{812E21A4-4925-4129-AF25-FD15B1BDA1AA} = {4F444F96-11BB-4747-85BB-1AA1C90BD882}
 		{3ADEFD6C-64B4-41B3-A157-84A99CCA9A5C} = {E9343424-91E2-493F-B0F0-3761452B9899}
 		{440B03E6-474C-439A-AF83-900A01A57ABE} = {4F444F96-11BB-4747-85BB-1AA1C90BD882}
+		{157CB7A7-8B8A-4043-AB3A-2C5BF32A1A27} = {30200D07-8FA7-4A96-A0A3-BE8A4906CA50}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {76578E1C-DBEC-4554-A011-D4113926C5B3}

+ 436 - 0
WCF.Service/WCF.Ex_HGS3_QRS/Ex_HGS3_QR.cs

@@ -0,0 +1,436 @@
+/*******************************************************************************
+ * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
+ * 类的信息:
+ *      1.程序名称:SmartDeviceService.cs
+ *      2.功能描述:接收智能设备请求
+ * 编辑履历:
+ *      作者            日期                版本            修改内容
+ *      陈晓野          2018/10/25          1.00            新建
+ *      徐伟			2020/07/30			2.00			重组结构优化代码
+ *******************************************************************************/
+
+using System;
+using System.Collections;
+using System.Data;
+using System.ServiceModel;
+using System.ServiceModel.Activation;
+
+using Curtain.DataAccess;
+
+using Dongke.IBOSS.PRD.Basics.BaseResources;
+using Dongke.IBOSS.PRD.Basics.DataAccess;
+using Dongke.IBOSS.PRD.Basics.Library;
+using Dongke.IBOSS.PRD.Service.DataModels;
+using Dongke.IBOSS.PRD.Service.PDAModuleLogic;
+using Dongke.IBOSS.PRD.Service.PMModuleLogic;
+using Dongke.IBOSS.PRD.Service.SmartDeviceService;
+using Dongke.IBOSS.PRD.WCF.DataModels;
+
+using Newtonsoft.Json.Linq;
+
+using Oracle.ManagedDataAccess.Client;
+
+namespace Dongke.IBOSS.PRD.WCF.ExHGS3QRS
+{
+    /// <summary>
+    /// 智能设备对接服务
+    /// </summary>
+    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
+    [ServiceBehavior(ConfigurationName = "ExHGS3QR",
+    InstanceContextMode = InstanceContextMode.PerCall,
+    ConcurrencyMode = ConcurrencyMode.Multiple,
+    UseSynchronizationContext = false)]
+    public class ExHGS3QR : IExHGS3QR
+    {
+        #region 恒洁三水三车间对接金马扫码
+        public string AddWorkInfoHGS3_QR_TEST(string barcode, string procedure_no, int road_no, double weight)
+        {
+            return "{\"success\":true,\"message\":\"产品库位调度成功!\"}";
+        }
+
+        /// <summary>
+        /// 恒洁三水三车间对接金马扫码
+        /// TP_SYS_SMARTDEVICEPOINT
+        /// 工序号 工序名 道口号
+        ///	3_3_1	预干区(入)	1-8
+        ///	3_3_2	烘干区(入)	1-8
+        ///	3_3_3   干坏区(入)
+        ///	3_2_1   毛坯区(入)
+        ///	3_2_2   精坯库(入)
+        ///	3_2_3   釉坯库(入)
+        /// </summary>
+        /// <param name="barcode">条码,多个条码以逗号分隔</param>
+        /// <param name="procedure_no">工序号</param>
+        /// <param name="road_no">道口号</param>
+        /// <param name="rack">货架号</param>
+        /// <param name="position">区域号</param>
+        /// <param name="procedure_in">工序计件</param>
+        /// <returns></returns>
+        public string AddWorkInfoHGS3_QR(
+            string barcode,
+            string procedure_no,
+            string road_no,
+            string rack,
+            string position,
+            int procedure_in = 1)
+        {
+            //修正参数,去掉多余的特殊字符
+            barcode = barCodeFix(barcode);
+            road_no = roadNoFix(road_no);
+
+            //返回JSON数据格式
+            JObject returnMessage = new JObject(
+                new JProperty("success", true),
+                new JProperty("message", "产品库位调度成功!"),
+                new JProperty("barcode", barcode)
+                );
+
+            string inputCode = $" barcode:{barcode} procedure_no:{procedure_no} road_no:{road_no} rack:{rack} position:{position} procedure_in:{procedure_in}";
+            string[] barCodes = barcode.Split(',');
+
+            try
+            {
+
+                #region 必须:读取设备对接点配置信息 TP_SYS_SMARTDEVICEPOINT
+                DataTable smartDevicePoint = getSmartDevicePoint(procedure_no, road_no);
+                if (smartDevicePoint.Rows.Count == 0)
+                {
+                    OutputLog.TraceLog(LogPriority.Warning,
+                        this.ToString(),
+                        System.Reflection.MethodBase.GetCurrentMethod().Name,
+                        inputCode + "设备对接工序点未配置",
+                        LocalPath.LogExePath + "SmartDevice\\");
+                    returnMessage["success"] = false;
+                    returnMessage["message"] = "设备对接工序点未配置";
+                    return returnMessage.ToString();
+                }
+                #endregion
+
+                #region 通用:procedure_in = 0 验证处理,支持多条码
+                if (procedure_in == 0)
+                {
+                    string msg = "";
+                    //标准验证是否可到达,支持多条码
+                    msg = checkBarcode(Convert.ToInt32(smartDevicePoint.Rows[0]["PROCEDUREID"]), barCodes);
+                    if (msg != "")
+                    {
+                        returnMessage["success"] = false;
+                        returnMessage["message"] = msg;
+                        return returnMessage.ToString();
+                    }
+                    else
+                    {
+                        returnMessage["success"] = true;
+                        returnMessage["message"] = "产品库位调度验证成功!";
+                        return returnMessage.ToString();
+                    }
+                }
+                #endregion
+
+                #region 通用:procedure_in = 1 计件处理,支持多条码
+                if (procedure_in == 1)
+                {
+                    DataTable addWorkPiece = doAddWorkPiece(barCodes, smartDevicePoint);
+                    string out_msg = addWorkPiece?.Rows[0]["out_errMsg"].ToString();
+                    if (!string.IsNullOrWhiteSpace(out_msg))
+                    {
+                        OutputLog.TraceLog(LogPriority.Warning,
+                                this.ToString(),
+                                System.Reflection.MethodBase.GetCurrentMethod().Name,
+                                inputCode + JsonHelper.ToJson(addWorkPiece),
+                                LocalPath.LogExePath + "SmartDevice\\");
+                        returnMessage["success"] = false;
+                        returnMessage["message"] = out_msg;
+                        return returnMessage.ToString();
+                    }
+                }
+                #endregion
+
+                //返回正常结果
+                return returnMessage.ToString();
+            }
+            catch (Exception ex)
+            {
+                OutputLog.TraceLog(LogPriority.Error,
+                        this.ToString(),
+                        System.Reflection.MethodBase.GetCurrentMethod().Name,
+                        inputCode + ex.ToString(),
+                        LocalPath.LogExePath);
+                returnMessage["success"] = false;
+                returnMessage["message"] = "MES系统异常";
+                return returnMessage.ToString();
+            }
+        }
+
+        #region 通用私有方法
+
+        /// <summary>
+        /// 修正barcode,去掉barcode中的特殊字符 xuwei 2020-07-13
+        /// </summary>
+        /// <param name="barCode"></param>
+        /// <returns></returns>
+        private string barCodeFix(string barCode)
+        {
+            return barCode
+                .Replace("%0a", "")
+                .Replace("%0d", "")
+                .Replace("\n", "")
+                .Replace("\r", "");
+        }
+
+        /// <summary>
+        /// 修正road_no值,为0时更新为1 xuwei 2020-07-13
+        /// </summary>
+        /// <param name="road_no"></param>
+        /// <returns></returns>
+        private string roadNoFix(string road_no)
+        {
+            if (road_no == "0")
+                return "1";
+            else
+                return road_no;
+        }
+
+        /// <summary>
+        /// 获取产品注浆信息
+        /// </summary>
+        /// <param name="barCode"></param>
+        /// <returns></returns>
+        private Hashtable getGroutingDailyDetail(string barCode)
+        {
+            Hashtable ht = new Hashtable();
+            DataTable gdata = SmartDeviceLogic.GetGroutingdailydetail(barCode);
+            if (gdata.Rows.Count > 0)
+            {
+                //产品等级 GOODSLEVELTYPEID 
+                //1良品 2返工 3废品 4正品 5副品 6重烧 7次品 8损坯 9干补
+                //10丢失 11撤销装车 12撤销入窑 13不合格 14不合格(返) 15复检
+                string level = gdata.Rows[0]["goodsleveltypeid"].ToString();
+                switch (Convert.ToInt32(gdata.Rows[0]["goodsleveltypeid"]))
+                {
+                    case 4:
+                    case 5:
+                    case 15:
+                        level = "1";
+                        break;
+                    case 6:
+                        level = "2";
+                        break;
+                    default:
+                        //2020-08-03 默认值改为1 
+                        level = "1";
+                        break;
+                }
+
+                //条码
+                ht["barcode"] = barCode;
+                //产品编码
+                ht["goodscode"] = gdata.Rows[0]["goodscode"];
+                //产品分级
+                ht["goodsleveltypeid"] = gdata.Rows[0]["goodsleveltypeid"];
+                //SKU码
+                ht["materialcode"] = gdata.Rows[0]["materialcode"];
+                //结果
+                ht["level"] = level;
+                //智能
+                ht["zhineng"] = (gdata.Rows[0]["goodstypeid"].ToString() == "18" || gdata.Rows[0]["goodstypeid"].ToString() == "19") ? "1" : "2";
+                //高压
+                ht["gaoya"] = (gdata.Rows[0]["goods_line_type"].ToString() == "1") ? "1" : "2";
+                //成型线号 xuwei add 2021-1-12
+                //ht["lineno"] = gdata.Rows[0]["GROUTINGLINENAME"];
+                ht["lineno"] = gdata.Rows[0]["GROUTINGLINECODE"];
+            }
+
+            return ht;
+        }
+
+        /// <summary>
+        /// 验证条码是否可到达
+        /// </summary>
+        /// <param name="conn"></param>
+        /// <param name="procedureId"></param>
+        /// <param name="barCode"></param>
+        /// <returns></returns>
+        private string checkBarcode(int procedureId, string[] barCodes)
+        {
+            IDBConnection conn = ClsDbFactory.CreateDBConnection(Basics.DataAccess.DataBaseType.ORACLE, DataManager.ConnectionString);
+            string msg = "";
+            try
+            {
+                conn.Open();
+                for (int i = 0; i < barCodes.Length; i++)
+                {
+                    // 工序可以多次扫码,条码所在工序与验证工序一致时,直接通过
+                    /*
+                    string sql = "select t.flowprocedureid from tp_pm_inproduction t where t.barcode = :in_barcode";
+                    OracleParameter[] para1 = new OracleParameter[]{
+                        new OracleParameter(":in_barcode",OracleDbType.Varchar2,barCodes[i],ParameterDirection.Input),
+                    };
+                    string pid = conn.GetSqlResultToStr(sql, para1);
+                    if (pid == procedureId + "")
+                    {
+                        continue;
+                    }*/
+
+                    OracleParameter[] para = new OracleParameter[]{
+                        new OracleParameter("in_procedureid",OracleDbType.Int32,procedureId,ParameterDirection.Input),
+                        new OracleParameter("in_barcode",OracleDbType.Varchar2,barCodes[i],ParameterDirection.Input),
+                        new OracleParameter("out_errMsg",OracleDbType.Varchar2,2000,"",ParameterDirection.Output),
+                        new OracleParameter("out_goodsID",OracleDbType.Int32,ParameterDirection.Output),
+                        new OracleParameter("out_goodsCode",OracleDbType.Varchar2,50,"",ParameterDirection.Output),
+                        new OracleParameter("out_goodsName",OracleDbType.Varchar2,50,"",ParameterDirection.Output),
+                        new OracleParameter("out_groutingUserCode",OracleDbType.NVarchar2,50,null,ParameterDirection.Output),
+                        new OracleParameter("out_errMsg_Status",OracleDbType.Varchar2,50,"",ParameterDirection.Output),
+                    };
+                    conn.ExecStoredProcedure("PRO_PM_CheckBarcode", para);
+                    msg += para[2].Value.ToString().Replace("\\n\\r", "").Replace("null", "");
+                }
+                //conn.Close();
+            }
+            catch (Exception ex)
+            {
+                throw ex;
+            }
+            finally
+            {
+                conn.Close();
+            }
+            return msg;
+        }
+
+        /// <summary>
+        /// 获取设备对接点配置数据
+        /// </summary>
+        /// <param name="conn"></param>
+        /// <param name="procedureNo"></param>
+        /// <param name="roadNo"></param>
+        /// <returns></returns>
+        private DataTable getSmartDevicePoint(string procedureNo, string roadNo)
+        {
+            using (IDataAccess conn = DataAccess.Create())
+            {
+                DataTable dt = conn.ExecuteDatatable(@"
+					SELECT
+						SDP.PROCEDUREID,
+						SDP.USERID,
+						U.USERCODE,
+						U.USERNAME 
+					FROM
+						TP_SYS_SMARTDEVICEPOINT SDP
+						LEFT JOIN TP_MST_USER U ON U.USERID = SDP.USERID 
+					WHERE
+						SDP.POINTCODE = @POINTCODE@
+						AND SDP.ROADNO = @ROADNO@
+					",
+                    new CDAParameter("POINTCODE", procedureNo),
+                    new CDAParameter("ROADNO", roadNo)
+                );
+                return dt;
+            }
+        }
+
+        /// <summary>
+        /// 通用计件方法
+        /// </summary>
+        /// <param name="barCodes"></param>
+        /// <param name="smartDevicePoint"></param>
+        /// <returns></returns>
+        private DataTable doAddWorkPiece(string[] barCodes, DataTable smartDevicePoint)
+        {
+            int procedureID = 0;
+            int.TryParse(smartDevicePoint.Rows[0]["ProcedureID"] + "", out procedureID);
+
+            if (procedureID > 0)
+            {
+                //初始条码信息
+                DataTable barcodeTable = new DataTable();
+                barcodeTable.Columns.Add("LogoID");
+                barcodeTable.Columns.Add("BarCode");
+                barcodeTable.Columns.Add("Remarks");
+                barcodeTable.Columns.Add("UserID");
+                barcodeTable.Columns.Add("UserCode");
+                barcodeTable.Columns.Add("UserName");
+                barcodeTable.Columns.Add("GroutingUserCode");
+
+                //初始化用户信息
+                SUserInfo sUserInfo = new SUserInfo();
+                sUserInfo.AccountID = 1;
+                sUserInfo.AccountCode = "dongke";
+                sUserInfo.UserID = Convert.ToInt32(smartDevicePoint.Rows[0]["UserID"]);
+                sUserInfo.UserCode = smartDevicePoint.Rows[0]["UserCode"].ToString();
+
+                // 工序可以多次扫码,条码所在工序与验证工序一致时,直接通过
+                using (IDataAccess conn = DataAccess.Create())
+                {
+                    string sql = "select t.flowprocedureid from tp_pm_inproduction t where t.barcode = @barcode@";
+                    //支持多条码
+                    for (int i = 0; i < barCodes.Length; i++)
+                    {
+                        //条码为空的不计件 xuwei add 2022-04-13
+                        if (barCodes[i].ToString() == "" || barCodes[i].ToString() == "0")
+                        {
+                            continue;
+                        }
+                        //相同工序的不调用
+                        string pid = conn.ExecuteScalar(sql, new CDAParameter("barcode", barCodes[i])) + "";
+                        if (pid == procedureID + "")
+                        {
+                            continue;
+                        }
+                        //验证不通过的不调用 xuwei add 2022-04-13
+                        string[] temp = new string[1];
+                        temp[0] = barCodes[i];
+                        string msg = checkBarcode(procedureID, temp);
+                        if (msg != "")
+                        {
+                            continue;
+                        }
+                        //重复条码不要加进去,处在首节点会报错
+                        barcodeTable.PrimaryKey = new DataColumn[] { barcodeTable.Columns["BarCode"] };
+                        if (barcodeTable.Rows.Contains(barCodes[i]))
+                        {
+                            continue;
+                        }
+
+                        //记录可以计件的条码
+                        DataRow dr = barcodeTable.NewRow();
+                        dr["BarCode"] = barCodes[i];
+                        dr["UserID"] = Convert.ToInt32(smartDevicePoint.Rows[0]["UserID"]);
+                        dr["UserCode"] = smartDevicePoint.Rows[0]["UserCode"] + "";
+                        dr["UserName"] = smartDevicePoint.Rows[0]["UserName"] + "";
+
+                        //fly add 2022-05-10 交坯节点必须有这个参数
+                        dr["GroutingUserCode"] = conn.ExecuteScalar(@"
+                                SELECT
+	                                P.USERCODE 
+                                FROM
+	                                TP_PM_GROUTINGDAILYDETAIL P 
+                                WHERE
+	                                P.BARCODE = @barcode@
+	                                AND P.VALUEFLAG = '1'
+                            ",
+                            new CDAParameter("barcode", barCodes[i])
+                            );
+
+                        barcodeTable.Rows.Add(dr);
+                    }
+                }
+
+                if (barcodeTable.Rows.Count > 0)
+                {
+                    //调用通用计件方法
+                    ProcedureEntity procedureInfo = null;
+                    return PMModuleLogicDAL.AddWorkPiece(procedureID, barcodeTable, sUserInfo, out procedureInfo);
+                }
+            }
+
+            return null;
+        }
+
+        #endregion
+
+        #endregion
+
+
+    }
+}

+ 50 - 0
WCF.Service/WCF.Ex_HGS3_QRS/IEx_HGS3_QR.cs

@@ -0,0 +1,50 @@
+
+using System.ServiceModel;
+using System.ServiceModel.Web;
+
+namespace Dongke.IBOSS.PRD.WCF.ExHGS3QRS
+{
+    /// <summary>
+    /// 智能设备对接服务(恒洁三水三车间对接乾润扫码)
+    /// </summary>
+    [ServiceContract(ConfigurationName = "ExHGS3QR.IExHGS3QR",
+    Name = "IExHGS3QR",
+    Namespace = "Dongke.IBOSS.PRD.WCF.ExHGS3QRS")]
+    public interface IExHGS3QR
+    {
+        #region 恒洁三水三车间对接乾润扫码
+        [OperationContract]
+        //[WebInvoke(BodyStyle = WebMessageBodyStyle.WrappedRequest
+        //    , ResponseFormat = WebMessageFormat.Json
+        //    , RequestFormat = WebMessageFormat.Json)]
+        [WebGet(
+            RequestFormat = WebMessageFormat.Json ,
+            ResponseFormat = WebMessageFormat.Json )]
+        string AddWorkInfoHGS3_QR_TEST(string barcode, string procedure_no, int road_no, double weight);
+
+        /// <summary>
+        /// 恒洁三水三车间对接乾润扫码
+        /// </summary>
+        /// <param name="barcode"></param>
+        /// <param name="procedure_no">工序号</param>
+        /// <param name="road_no">道口号</param>
+        /// <param name="weight">重量</param>
+        /// <returns></returns>
+        [OperationContract]
+        //[WebInvoke(BodyStyle = WebMessageBodyStyle.WrappedRequest
+        //    , ResponseFormat = WebMessageFormat.Json
+        //    , RequestFormat = WebMessageFormat.Json)]
+        [WebGet(
+            RequestFormat = WebMessageFormat.Json,
+            ResponseFormat = WebMessageFormat.Json)]
+        string AddWorkInfoHGS3_QR(string barcode,
+            string procedure_no,
+            string road_no,
+            string rack,
+            string position,
+            int procedure_in = 1);
+
+
+        #endregion
+    }
+}

+ 36 - 0
WCF.Service/WCF.Ex_HGS3_QRS/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("WCF.ExHGS3QRS")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("北京东科企信软件有限公司")]
+[assembly: AssemblyProduct("IBOSS-PRD")]
+[assembly: AssemblyCopyright("Copyright (C) 2014 DongkeSoft Co., Ltd. All rights reserved.")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 会使此程序集中的类型
+//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
+[assembly: Guid("157cb7a7-8b8a-4043-ab3a-2c5bf32a1a27")]
+
+// 程序集的版本信息由下列四个值组成: 
+//
+//      主版本
+//      次版本
+//      生成号
+//      修订号
+//
+// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
+//通过使用 "*",如下所示:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 109 - 0
WCF.Service/WCF.Ex_HGS3_QRS/WCF.ExHGS3QRS.csproj

@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{157CB7A7-8B8A-4043-AB3A-2C5BF32A1A27}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Dongke.IBOSS.PRD.WCF.ExHGS3QRS</RootNamespace>
+    <AssemblyName>WCF.ExHGS3QRS</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <Deterministic>true</Deterministic>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Curtain.DataAccess, Version=1.1.7285.24561, Culture=neutral, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\DLL\Curtain.DataAccess.dll</HintPath>
+    </Reference>
+    <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\DLL\Newtonsoft.Json.dll</HintPath>
+    </Reference>
+    <Reference Include="Oracle.ManagedDataAccess, Version=4.122.19.1, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\DLL\Oracle.ManagedDataAccess.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.ServiceModel" />
+    <Reference Include="System.ServiceModel.Web" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Ex_HGS3_QR.cs" />
+    <Compile Include="IEx_HGS3_QR.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\DK.Basics\BaseResources\BaseResources.csproj">
+      <Project>{61710211-9b80-45c1-b338-fdf984c9ae43}</Project>
+      <Name>BaseResources</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\DK.Basics\DataAccess\DataAccess.csproj">
+      <Project>{D0492C0B-7B65-4D8F-8EA5-BC0570E19050}</Project>
+      <Name>DataAccess</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\DK.Basics\Library\Library.csproj">
+      <Project>{922D0F0F-01C2-4FA5-A4AD-00064232F455}</Project>
+      <Name>Library</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\DK.Service\PDAModuleLogic\PDAModuleLogic.csproj">
+      <Project>{75a1a28d-7076-4dc7-a1d4-703b884ecdeb}</Project>
+      <Name>PDAModuleLogic</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\DK.Service\PMModuleLogic\PMModuleLogic.csproj">
+      <Project>{0492B0D6-2908-4AFF-BE1E-0E4F7B07622D}</Project>
+      <Name>PMModuleLogic</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\DK.Service\Service.DataModels\Service.DataModels.csproj">
+      <Project>{16C72702-C162-4CD3-9CCC-40B9D8491CCD}</Project>
+      <Name>Service.DataModels</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\DK.Service\SmartDeviceService\SmartDeviceService.csproj">
+      <Project>{0B637813-6AE3-4AEE-8317-0FF1EC7C0584}</Project>
+      <Name>SmartDeviceService</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\WCF.DataModels\WCF.DataModels.csproj">
+      <Project>{4C4BFBDC-125C-488A-8B35-5A0637478C66}</Project>
+      <Name>WCF.DataModels</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>

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

@@ -275,6 +275,23 @@
                   behaviorConfiguration="endpointBehavior_DKIBOSSPRDService"
                   contract="SmartDeviceService.ISmartDevice"/>
       </service>
+
+		<!--恒洁三水三车-乾润对接接口-->
+		<service name="ExHGS3QR" behaviorConfiguration="serviceBehavior_DKIBOSSPRDService">
+			<endpoint address=""
+					  binding="webHttpBinding"
+					  bindingConfiguration="webHttpBinding_DKIBOSSPRDService"
+					  behaviorConfiguration="endpointBehavior_DKIBOSSPRD_PDAService"
+					  contract="ExHGS3QR.IExHGS3QR"/>
+		</service>
+		<service name="Ex_HGS3_QR" behaviorConfiguration="serviceBehavior_DKIBOSSPRDService">
+			<endpoint address=""
+					  binding="webHttpBinding"
+					  bindingConfiguration="webHttpBinding_DKIBOSSPRDService"
+					  behaviorConfiguration="endpointBehavior_DKIBOSSPRD_PDAService"
+					  contract="Ex_HGS3_QR.IEx_HGS3_QR"/>
+		</service>
+		
       <!-- SAP数据接口 -->
       <service name="SAPDataService" behaviorConfiguration="serviceBehavior_DKIBOSSPRDService">
         <endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_DKIBOSSPRDService"

+ 4 - 0
WCF.Service/WCF.Hosting/WCF.Hosting.csproj

@@ -167,6 +167,10 @@
       <Project>{9709de66-52b3-4f9e-adea-ea639586080b}</Project>
       <Name>WCF.Contracts</Name>
     </ProjectReference>
+    <ProjectReference Include="..\WCF.Ex_HGS3_QRS\WCF.ExHGS3QRS.csproj">
+      <Project>{157cb7a7-8b8a-4043-ab3a-2c5bf32a1a27}</Project>
+      <Name>WCF.ExHGS3QRS</Name>
+    </ProjectReference>
     <ProjectReference Include="..\WCF.Services\WCF.Services.csproj">
       <Project>{20e7bf78-5301-4d5a-a7a0-fa24c0f32cdc}</Project>
       <Name>WCF.Services</Name>

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

@@ -10,6 +10,7 @@ using Dongke.IBOSS.PRD.Basics.BaseResources;
 using Dongke.IBOSS.PRD.Basics.DataAccess;
 using Dongke.IBOSS.PRD.Basics.Library;
 using Dongke.IBOSS.PRD.WCF.Services;
+using Dongke.IBOSS.PRD.WCF.ExHGS3QRS;
 
 namespace Dongke.IBOSS.PRD.WCF.WebHosting
 {
@@ -160,6 +161,13 @@ namespace Dongke.IBOSS.PRD.WCF.WebHosting
             (
                 new ServiceRoute
                 (
+                    "DKService/ExHGS3QR", new WebServiceHostFactory(), typeof(ExHGS3QR)
+                )
+            );
+            RouteTable.Routes.Add
+            (
+                new ServiceRoute
+                (
                     "DKService/SAPDataService", new WebServiceHostFactory(), typeof(SAPDataService)
                 )
             );           

+ 4 - 0
WCF.Service/WCF.WebHosting/WCF.WebHosting.csproj

@@ -95,6 +95,10 @@
       <Project>{9709de66-52b3-4f9e-adea-ea639586080b}</Project>
       <Name>WCF.Contracts</Name>
     </ProjectReference>
+    <ProjectReference Include="..\WCF.Ex_HGS3_QRS\WCF.ExHGS3QRS.csproj">
+      <Project>{157cb7a7-8b8a-4043-ab3a-2c5bf32a1a27}</Project>
+      <Name>WCF.ExHGS3QRS</Name>
+    </ProjectReference>
     <ProjectReference Include="..\WCF.Services\WCF.Services.csproj">
       <Project>{20e7bf78-5301-4d5a-a7a0-fa24c0f32cdc}</Project>
       <Name>WCF.Services</Name>

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

@@ -184,6 +184,12 @@
         <endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_DKIBOSSPRDService"
           behaviorConfiguration="endpointBehavior_DKIBOSSPRDService" contract="SmartDeviceService.ISmartDevice"/>
       </service>
+		
+    <!--恒洁三水三车-乾润对接接口-->
+      <service name="ExHGS3QR" behaviorConfiguration="serviceBehavior_DKIBOSSPRDService">
+        <endpoint address="" binding="webHttpBinding" bindingConfiguration="webHttpBinding_DKIBOSSPRDService" behaviorConfiguration="endpointBehavior_DKIBOSSPRD_PDAService" contract="ExHGS3QR.IExHGS3QR"/>
+      </service>
+		
       <!-- SAP数据接口 -->
       <service name="SAPDataService" behaviorConfiguration="serviceBehavior_DKIBOSSPRDService">
         <endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_DKIBOSSPRDService"
@@ -222,6 +228,7 @@
         <add service="Dongke.IBOSS.PRD.WCF.Services.WCFTestService" relativeAddress="DKService/WCFTestService.svc"/>
         <add service="Dongke.IBOSS.PRD.WCF.Services.SmartDeviceService" relativeAddress="DKService/SmartDeviceService.svc"/>
         <add service="Dongke.IBOSS.PRD.WCF.Services.SAPDataService" relativeAddress="DKService/SAPDataService.svc"/>
+		<add service="Dongke.IBOSS.PRD.WCF.ExHGS3QRS.ExHGS3QR" relativeAddress="DKService/ExHGS3QR.svc"/>
       </serviceActivations>
     </serviceHostingEnvironment>
   </system.serviceModel>