Selaa lähdekoodia

切换商标时,只显示产品关联商标

chenxy 6 vuotta sitten
vanhempi
commit
24cb37c53f

+ 1 - 1
DK.Client/PCModule/F_PC_0102_1_1.cs

@@ -350,7 +350,7 @@ namespace Dongke.IBOSS.PRD.Client.PCModule
                 }
 
                 if (LogInUserInfo.CurrentUser.CurrentUserEntity.AccountCode == "imex" &&
-                this.scbUser1.SearchedItem == null)
+                this.scbUser1.SearchedValue == null)
                 {
                     MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "成型班长"),
                         this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);

+ 1 - 1
DK.Client/PCModule/F_PC_0103_1.cs

@@ -206,7 +206,7 @@ namespace Dongke.IBOSS.PRD.Client.PCModule
 				}
 
                 if (LogInUserInfo.CurrentUser.CurrentUserEntity.AccountCode == "imex" &&
-                   this.scbUser1.SearchedItem == null)
+                   this.scbUser1.SearchedValue == null)
                 {
                     MessageBox.Show(string.Format(Messages.MSG_CMN_W005, "成型班长"),
                         this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);

+ 1 - 1
DK.Service/PMModuleLogic/PMModuleLogic.cs

@@ -2872,7 +2872,7 @@ namespace Dongke.IBOSS.PRD.Service.PMModuleLogic
                                 };
                 barcode = con.GetSqlResultToStr(sqlString, paras1);
 
-                sqlString = @"select g.LogoID,l.logocode,l.logoname, g.glazetypeid, d.DICTIONARYVALUE glazetypename
+                sqlString = @"select g.LogoID,l.logocode,l.logoname, g.glazetypeid, d.DICTIONARYVALUE glazetypename, g.goodsid
                                 from tp_pm_groutingdailydetail g
                                      left join tp_mst_logo l
                                      on g.logoid=l.logoid

+ 1 - 1
DK.Service/PMModuleLogic/PMModuleLogicDAL.cs

@@ -16702,7 +16702,7 @@ updateuserid=:updateuserid where barcode=:barcode";
                     new OracleParameter(":barcode",OracleDbType.Varchar2,
                         barcode,ParameterDirection.Input)
                     };
-                returnRows = oracleTrConn.ExecuteNonQuery(sql, Paras);
+                returnRows += oracleTrConn.ExecuteNonQuery(sql, Paras);
 
                 oracleTrConn.Commit();
             }

+ 70 - 9
DK.Service/SystemModuleLogic/SystemModuleLogic.cs

@@ -3313,15 +3313,76 @@ namespace Dongke.IBOSS.PRD.Service.SystemModuleLogic
 			}
 		}
 
-		/// <summary>
-		/// 获取商标数据源
-		/// </summary>
-		/// <param name="sUserInfo">用户基本信息</param>
-		/// <returns></returns>
-		/// <remarks>
-		/// 2016.05.10          陈晓野          新建
-		/// </remarks>
-		public static DataSet GetLogoInfo(SUserInfo sUserInfo)
+        /// <summary>
+        /// 获取商标管理的全部数据
+        /// </summary>
+        /// <param name="sUserInfo">用户基本信息</param>
+        /// <returns></returns>
+        /// <remarks>
+        /// 2015.11.12          王鑫          新建
+        /// </remarks>
+        public static DataSet GetLogoInfoForChange(SUserInfo sUserInfo, int goodsid)
+        {
+            IDBConnection oracleConn = ClsDbFactory.CreateDBConnection(DataBaseType.ORACLE, DataManager.ConnectionString);
+            try
+            {
+                string sqlString = null;
+                if (sUserInfo.AccountCode == "imex")
+                {
+                    sqlString = "SELECT l.LogoID\n" +
+                    "      ,l.LogoCode\n" +
+                    "      ,l.LogoName\n" +
+                    "      ,l.LogoName || '[' || l.LogoCode || ']' AS LogoNameCode\n" +
+                    "  FROM tp_mst_goodslogosap t\n" +
+                    " INNER JOIN tp_mst_logo l\n" +
+                    "    ON l.logoid = t.logoid\n" +
+                    " WHERE t.goodsid = :goodsid\n" +
+                    "   AND l.valueflag = '1'";
+
+                    OracleParameter[] pImex = new OracleParameter[]
+                    {
+                        new OracleParameter(":goodsid", goodsid)
+                    };
+                    oracleConn.Open();
+                    DataSet resultImex = oracleConn.GetSqlResultToDs(sqlString, pImex);
+                    if (resultImex != null && resultImex.Tables.Count > 0 && resultImex.Tables[0].Rows.Count > 0)
+                    {
+                        oracleConn.Close();
+                        return resultImex;
+                    }
+                }
+
+                sqlString = "Select LogoID,LogoCode,LogoName,LogoName||'['||LogoCode||']' as LogoNameCode "
+                                 + "from tp_mst_logo where AccountID = :AccountID and valueflag ='1' order by isdefault desc, displayno";
+
+                OracleParameter[] oracleParameter = new OracleParameter[]
+                {
+                        new OracleParameter(":AccountID",sUserInfo.AccountID)
+                };
+                oracleConn.Open();
+                DataSet result = oracleConn.GetSqlResultToDs(sqlString, oracleParameter);
+                oracleConn.Close();
+                return result;
+            }
+            catch (Exception ex)
+            {
+                if (oracleConn.ConnState == ConnectionState.Open)
+                {
+                    oracleConn.Close();
+                }
+                throw ex;
+            }
+        }
+
+        /// <summary>
+        /// 获取商标数据源
+        /// </summary>
+        /// <param name="sUserInfo">用户基本信息</param>
+        /// <returns></returns>
+        /// <remarks>
+        /// 2016.05.10          陈晓野          新建
+        /// </remarks>
+        public static DataSet GetLogoInfo(SUserInfo sUserInfo)
 		{
 			IDBConnection oracleConn = ClsDbFactory.CreateDBConnection(DataBaseType.ORACLE, DataManager.ConnectionString);
 			try

+ 6 - 0
WCF.Service/WCF.Contracts/IPDAModule.cs

@@ -1693,6 +1693,12 @@ namespace Dongke.IBOSS.PRD.WCF.Contracts
       , ResponseFormat = WebMessageFormat.Json
       , RequestFormat = WebMessageFormat.Json)]
         [OperationContract]
+        ActionResult GetLogoInfoForChange(string accountCode, string userCode, string userPassword, string sessionKey, int goodsid);
+
+        [WebInvoke(BodyStyle = WebMessageBodyStyle.WrappedRequest
+      , ResponseFormat = WebMessageFormat.Json
+      , RequestFormat = WebMessageFormat.Json)]
+        [OperationContract]
         ActionResult GetLogoID(string accountCode, string userCode, string userPassword, string sessionKey, int procedureID);
 
         [WebInvoke(BodyStyle = WebMessageBodyStyle.WrappedRequest

+ 55 - 5
WCF.Service/WCF.Services/PDAModuleService.cs

@@ -6136,9 +6136,9 @@ namespace Dongke.IBOSS.PRD.WCF.Services
 				}
 
 				DataSet returnValue = ServiceInvoker.Invoke<DataSet>(this,
-				   //() => SystemModuleLogic.GetAllLogoInfo(sUserInfo));
-				   () => SystemModuleLogic.GetLogoInfo(sUserInfo));
-				if (returnValue != null && returnValue.Tables[0].Rows.Count > 0)
+                   //() => SystemModuleLogic.GetAllLogoInfo(sUserInfo));
+                   () => SystemModuleLogic.GetLogoInfo(sUserInfo));
+                if (returnValue != null && returnValue.Tables[0].Rows.Count > 0)
 				{
 					//DataView dv = returnValue.Tables[0].DefaultView;
 					//dv.RowFilter = "ValueFlag=1";
@@ -6159,9 +6159,59 @@ namespace Dongke.IBOSS.PRD.WCF.Services
 				actionResult.Message = Constant.PDA_RESULT_EXCEPTION;
 			}
 			return actionResult;
-		}
+        }
+        /// <summary>
+        /// 变更产品商标用
+        /// </summary>
+        /// <param name="accountCode"></param>
+        /// <param name="userCode"></param>
+        /// <param name="userPassword"></param>
+        /// <param name="sessionKey"></param>
+        /// <param name="goodsid"></param>
+        /// <returns></returns>
+        public ActionResult GetLogoInfoForChange(string accountCode, string userCode, string userPassword, string sessionKey
+            , int goodsid)
+        {
+            ActionResult actionResult = new ActionResult();
+            try
+            {
+                // 验证请求头信息
+                actionResult = this.DoPDACheck(accountCode, userCode, userPassword, sessionKey);
+
+                // 验证失败
+                if (actionResult.Status != (int)Constant.PDAResult.Success)
+                {
+                    return actionResult;
+                }
+
+                DataSet returnValue = ServiceInvoker.Invoke<DataSet>(this,
+                   //() => SystemModuleLogic.GetAllLogoInfo(sUserInfo));
+                   //() => SystemModuleLogic.GetLogoInfo(sUserInfo));
+                   () => SystemModuleLogic.GetLogoInfoForChange(sUserInfo, goodsid));
+                if (returnValue != null && returnValue.Tables[0].Rows.Count > 0)
+                {
+                    //DataView dv = returnValue.Tables[0].DefaultView;
+                    //dv.RowFilter = "ValueFlag=1";
+                    //actionResult.Result = JsonHelper.ToJson(dv.ToTable());
+                    actionResult.Result = JsonHelper.ToJson(returnValue.Tables[0]);
+                    actionResult.Status = (int)Constant.PDAResult.Success;
+                }
+            }
+            catch (Exception ex)
+            {
+                //LogFileOperation.Error(DataManager.LogFileName, ex.Message);
+                OutputLog.TraceLog(LogPriority.Error,
+                                this.ToString(),
+                                System.Reflection.MethodBase.GetCurrentMethod().Name,
+                                ex.ToString(),
+                                LocalPath.LogExePath);
+                actionResult.Status = (int)Constant.PDAResult.Exception;
+                actionResult.Message = Constant.PDA_RESULT_EXCEPTION;
+            }
+            return actionResult;
+        }
 
-		public ActionResult GetLogoID(string accountCode, string userCode, string userPassword, string sessionKey, int procedureID)
+        public ActionResult GetLogoID(string accountCode, string userCode, string userPassword, string sessionKey, int procedureID)
 		{
 			ActionResult actionResult = new ActionResult();
 			try

+ 21 - 0
WCF.Service/WCF.Services/SystemModuleService.cs

@@ -1978,6 +1978,27 @@ namespace Dongke.IBOSS.PRD.WCF.Services
         }
 
         /// <summary>
+        /// 获取商标管理的全部数据
+        /// </summary>
+        /// <param name="sUserInfo">用户基本信息</param>
+        /// <returns></returns>
+        /// <remarks>
+        /// 2015.11.12          王鑫          新建
+        /// </remarks>
+        public DataSet GetLogoInfoForChange(int goodsid)
+        {
+            try
+            {
+                DataSet result = ServiceInvoker.Invoke<DataSet>(this, () => SystemModuleLogic.GetLogoInfoForChange(SUserInfo, goodsid));
+                return result;
+            }
+            catch (Exception ex)
+            {
+                throw ex;
+            }
+        }
+
+        /// <summary>
         /// 获取商标数据源
         /// </summary>
         /// <returns></returns>