chenxy 6 лет назад
Родитель
Сommit
6c8df50e6f

+ 14 - 4
DK.Service/PMModuleLogic/PMModuleLogicDAL.cs

@@ -16537,7 +16537,7 @@ namespace Dongke.IBOSS.PRD.Service.PMModuleLogic
         /// 设置条码商标 釉料
         /// </summary>
         /// <returns></returns>
-        public static int SaveBarCodeLogoAndGlazetypeid(string barcode, int logoid, int glazetypeid, SUserInfo sUserInfo)
+        public static int SaveBarCodeLogoAndGlazetype(string barcode, int logoid, int glazetypeid, SUserInfo sUserInfo)
         {
             int returnRows = 0;
             IDBTransaction oracleTrConn = ClsDbFactory.CreateDBTransaction(DataBaseType.ORACLE, DataManager.ConnectionString);
@@ -16633,7 +16633,7 @@ namespace Dongke.IBOSS.PRD.Service.PMModuleLogic
         /// 设置条码商标 釉料
         /// </summary>
         /// <returns></returns>
-        public static int SaveBarCodesLogoAndGlazetypeid(string[] barcodes, int logoid, int glazetypeid, SUserInfo sUserInfo)
+        public static int SaveBarCodesLogoAndGlazetype(string[] barcodes, int logoid, int glazetypeid, int procedureID, SUserInfo sUserInfo)
         {
             int returnRows = 0;
             IDBTransaction oracleTrConn = ClsDbFactory.CreateDBTransaction(DataBaseType.ORACLE, DataManager.ConnectionString);
@@ -16643,6 +16643,8 @@ namespace Dongke.IBOSS.PRD.Service.PMModuleLogic
                 string sql = "select g.groutingdailydetailid, g.logoid, g.glazetypeid, t.PROCEDUREID from tp_pm_groutingdailydetail g \n" +
                     " left join tp_pm_inproduction t on t.barcode = g.barcode\n" +
                     "where g.barcode = :barcode";
+                string sql0 = "select g.groutingdailydetailid, g.logoid, g.glazetypeid from tp_pm_groutingdailydetail g \n" +
+                    "where g.barcode = :barcode";
                 // 釉料变更履历
                 string sql1 = "insert into TP_PM_GlazetypeRecord\n" +
                 "values\n" +
@@ -16669,7 +16671,15 @@ namespace Dongke.IBOSS.PRD.Service.PMModuleLogic
                         new OracleParameter(":barcode",OracleDbType.NVarchar2,
                             barcode,ParameterDirection.Input), };
 
-                    DataTable dt = oracleTrConn.GetSqlResultToDt(sql, Paras);
+                    DataTable dt = null;
+                    if (procedureID > 0)
+                    {
+                        dt = oracleTrConn.GetSqlResultToDt(sql0, Paras);
+                    }
+                    else
+                    {
+                        dt = oracleTrConn.GetSqlResultToDt(sql, Paras);
+                    }
                     if (dt == null || dt.Rows.Count == 0)
                     {
                         //continue;
@@ -16684,7 +16694,7 @@ namespace Dongke.IBOSS.PRD.Service.PMModuleLogic
                         new OracleParameter(":NewGlazetypeid",OracleDbType.Int32,
                             glazetypeid,ParameterDirection.Input),
                         new OracleParameter(":ProcedureID",OracleDbType.Int32,
-                            dt.Rows[0]["PROCEDUREID"],ParameterDirection.Input),
+                            (procedureID > 0 ? procedureID : dt.Rows[0]["PROCEDUREID"]),ParameterDirection.Input),
                         new OracleParameter(":Remarks",OracleDbType.NVarchar2,
                             null,ParameterDirection.Input),
                         new OracleParameter(":AccountID",OracleDbType.Int32,

+ 1 - 1
WCF.Service/WCF.Contracts/IPDAModule.cs

@@ -1700,7 +1700,7 @@ namespace Dongke.IBOSS.PRD.WCF.Contracts
    , RequestFormat = WebMessageFormat.Json)]
         [OperationContract]
         ActionResult SaveBarCodesLogoAndGlazetype(string accountCode, string userCode, string userPassword, string sessionKey,
-            string[] barcodes, int logoid, int glazetypeid);
+            string[] barcodes, int logoid, int glazetypeid, int procedureID);
 
         [WebInvoke(BodyStyle = WebMessageBodyStyle.WrappedRequest
 , ResponseFormat = WebMessageFormat.Json

+ 3 - 3
WCF.Service/WCF.Services/PDAModuleService.cs

@@ -6182,7 +6182,7 @@ namespace Dongke.IBOSS.PRD.WCF.Services
                 }
 
                 int returnValue = ServiceInvoker.Invoke<int>(this,
-                   () => PMModuleLogicDAL.SaveBarCodeLogoAndGlazetypeid(barcode, logoid, glazetypeid, sUserInfo));
+                   () => PMModuleLogicDAL.SaveBarCodeLogoAndGlazetype(barcode, logoid, glazetypeid, sUserInfo));
                 actionResult.Result = JsonHelper.ToJson(returnValue);
                 if (returnValue > 0)
                 {
@@ -6209,7 +6209,7 @@ namespace Dongke.IBOSS.PRD.WCF.Services
         }
 
         public ActionResult SaveBarCodesLogoAndGlazetype(string accountCode, string userCode, string userPassword, string sessionKey,
-            string[] barcodes, int logoid, int glazetypeid)
+            string[] barcodes, int logoid, int glazetypeid, int procedureID)
         {
             ActionResult actionResult = new ActionResult();
             try
@@ -6224,7 +6224,7 @@ namespace Dongke.IBOSS.PRD.WCF.Services
                 }
 
                 int returnValue = ServiceInvoker.Invoke<int>(this,
-                   () => PMModuleLogicDAL.SaveBarCodesLogoAndGlazetypeid(barcodes, logoid, glazetypeid, sUserInfo));
+                   () => PMModuleLogicDAL.SaveBarCodesLogoAndGlazetype(barcodes, logoid, glazetypeid, procedureID, sUserInfo));
                 actionResult.Result = JsonHelper.ToJson(returnValue);
                 if (returnValue > 0)
                 {