Преглед на файлове

回收后,不能撤销计件工序的bug

chenxy преди 6 години
родител
ревизия
4144feeb70
променени са 3 файла, в които са добавени 36 реда и са изтрити 30 реда
  1. 25 23
      DK.Service/PMModuleLogic/PMModuleLogicDAL.cs
  2. 3 1
      DK.Service/PMModuleService/PMModuleLogic.cs
  3. 8 6
      WCF.Service/WCF.Services/PDAModuleService.cs

+ 25 - 23
DK.Service/PMModuleLogic/PMModuleLogicDAL.cs

@@ -15195,28 +15195,30 @@ namespace Dongke.IBOSS.PRD.Service.PMModuleLogic
                     }
                 }
 
-                // 如果不合格,查询报损表里是否回收
-                sql = "select recyclingflag from TP_PM_ScrapProduct "
-                  + " where BarCode=:BarCode and CreateTime=(select max(CreateTime) "
-                  + " from TP_PM_ScrapProduct "
-                  + " where BarCode=:BarCode and ValueFlag=1)"
-                  + "  and ValueFlag=1";
-                Paras = new OracleParameter[]{
-                            new OracleParameter(":BarCode",OracleDbType.NVarchar2,barcode,ParameterDirection.Input),
-                         };
-                DataSet dsResult2 = oracleTrConn.GetSqlResultToDs(sql, Paras);
-                if (dsResult2 != null && dsResult2.Tables[0].Rows.Count > 0)
-                {
-                    if (Convert.ToInt32(dsResult2.Tables[0].Rows[0]["recyclingflag"]) > 0)
-                    {
-                        returnRows = -200;
-                        oracleTrConn.Rollback();
-                        oracleTrConn.Disconnect();
-                        entity.Result = returnRows;
-                        entity.Message = "此产品已经回收,不能撤销";
-                        return entity;
-                    }
-                }
+                // 计件撤销 应该不用验证是否回收了 by chenxiaoye 2020-02-28
+                //// 如果不合格,查询报损表里是否回收
+                //sql = "select recyclingflag from TP_PM_ScrapProduct "
+                //  + " where BarCode=:BarCode and CreateTime=(select max(CreateTime) "
+                //  + " from TP_PM_ScrapProduct "
+                //  + " where BarCode=:BarCode and ValueFlag=1)"
+                //  + "  and ValueFlag=1";
+                //Paras = new OracleParameter[]{
+                //            new OracleParameter(":BarCode",OracleDbType.NVarchar2,barcode,ParameterDirection.Input),
+                //         };
+                //DataSet dsResult2 = oracleTrConn.GetSqlResultToDs(sql, Paras);
+                //if (dsResult2 != null && dsResult2.Tables[0].Rows.Count > 0)
+                //{
+                //    if (Convert.ToInt32(dsResult2.Tables[0].Rows[0]["recyclingflag"]) > 0)
+                //    {
+                //        returnRows = -200;
+                //        oracleTrConn.Rollback();
+                //        oracleTrConn.Disconnect();
+                //        entity.Result = returnRows;
+                //        entity.Message = "此产品已经回收,不能撤销";
+                //        return entity;
+                //    }
+                //}
+                // 计件撤销 应该不用验证是否回收了 by chenxiaoye 2020-02-28
 
                 // 判断是否有撤销范围权限
 
@@ -15240,7 +15242,7 @@ namespace Dongke.IBOSS.PRD.Service.PMModuleLogic
                 }
                 //
 
-                #region  是否启用交坯撤销限制天数
+                #region  是否启用撤销限制天数
                 if (flowProcedureTime != null)
                 {
                     sql = "select settingvalue from TP_MST_SystemSetting where settingcode=:settingcode and accountid=:accountid";

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

@@ -606,6 +606,7 @@ namespace Dongke.IBOSS.PRD.Service.PMModuleService
                     "       U.UserCode," +
                     "       GL.monitorid," +
                     "       mu.usercode monitorcode," +
+                    //"       mu.username || '[' || mu.usercode || ']' monitorcode," +
                     // 成型线变更 ver41 by chenxy begin
                     /*
                     "       GL.UserCount," +
@@ -712,7 +713,7 @@ namespace Dongke.IBOSS.PRD.Service.PMModuleService
                     "       decode(GMT.CanManyTimes, '1', decode(GL.LastGroutingDate, null, 1, :GroutingDate, NVL(GL.LastGroutingBatchNo, 1) + 1, 1), 1) GroutingBatchNo," +
                     //"       GMT.CanManyTimes," +
                     "       GL.monitorid," +
-                    "       mu.usercode monitorcode," +
+                    "       mu.username || '[' || mu.usercode || ']' monitorcode," +
                     "       GMT.GMouldTypeID," +
                     "       GMT.GMouldTypeName," +
                     // 成型线变更 ver41 by chenxy end
@@ -835,6 +836,7 @@ namespace Dongke.IBOSS.PRD.Service.PMModuleService
                     "       GL.LastGroutingBatchNo," +
                     "       GL.monitorid," +
                     "       mu.usercode monitorcode," +
+                    //"       mu.username || '[' || mu.usercode || ']' monitorcode," +
                     "       decode(GMT.CanManyTimes, '1', NULL, 1) GroutingNum," +
                     "       GMT.CanManyTimes" +
                     // 成型线变更 ver41 by chenxy end

+ 8 - 6
WCF.Service/WCF.Services/PDAModuleService.cs

@@ -333,10 +333,11 @@ namespace Dongke.IBOSS.PRD.WCF.Services
 					}
 					PDAFunctionResult pdaFunctionChild = new PDAFunctionResult();
 
-					//xuwei add 2020-01-02
-					pdaFunctionChild.IsGlazeChange = string.IsNullOrEmpty(newRow["IsGlazeChange"].ToString()) ? 0 : Convert.ToInt32(newRow["IsGlazeChange"].ToString());
+                    //xuwei add 2020-01-02
+                    //pdaFunctionChild.IsGlazeChange = string.IsNullOrEmpty(newRow["IsGlazeChange"].ToString()) ? 0 : Convert.ToInt32(newRow["IsGlazeChange"].ToString());
+                    pdaFunctionChild.IsGlazeChange = 0;
 
-					pdaFunctionChild.MenuCode = newRow["MenuCode"].ToString();
+                    pdaFunctionChild.MenuCode = newRow["MenuCode"].ToString();
 					pdaFunctionChild.MenuName = newRow["MenuName"].ToString();
 					pdaFunctionChild.ProcedureID = intProcedureID;
 					pdaFunctionChild.ProcedureModel = newRow["ProcedureModel"].ToString();
@@ -391,10 +392,11 @@ namespace Dongke.IBOSS.PRD.WCF.Services
 				}
 				PDAFunctionResult pdaFunctionChild = new PDAFunctionResult();
 
-				//xuwei add 2020-01-02
-				pdaFunctionChild.IsGlazeChange = string.IsNullOrEmpty(newRow["IsGlazeChange"].ToString()) ? 0 : Convert.ToInt32(newRow["IsGlazeChange"].ToString());
+                //xuwei add 2020-01-02
+                //pdaFunctionChild.IsGlazeChange = string.IsNullOrEmpty(newRow["IsGlazeChange"].ToString()) ? 0 : Convert.ToInt32(newRow["IsGlazeChange"].ToString());
+                pdaFunctionChild.IsGlazeChange = 0;
 
-				pdaFunctionChild.MenuCode = newRow["MenuCode"].ToString();
+                pdaFunctionChild.MenuCode = newRow["MenuCode"].ToString();
 				pdaFunctionChild.MenuName = newRow["MenuName"].ToString();
 				pdaFunctionChild.ProcedureID = intProcedureID;
 				pdaFunctionChild.ProcedureModel = newRow["ProcedureModel"].ToString();