Просмотр исходного кода

成型工产量PDA报表当月和前月查询不同逻辑

qinqi 5 месяцев назад
Родитель
Сommit
3a71fd86df
1 измененных файлов с 24 добавлено и 5 удалено
  1. 24 5
      DK.Service/PDAModuleLogic/PDAModuleLogic.cs

+ 24 - 5
DK.Service/PDAModuleLogic/PDAModuleLogic.cs

@@ -5849,7 +5849,7 @@ namespace Dongke.IBOSS.PRD.Service.PDAModuleLogic
         /// 成型月度结算表(总表)
         /// </summary>
         /// <returns></returns>
-        public static ServiceResultEntity GetGroutingSettlementInfo(SUserInfo sUserInfo, DateTime month)
+        public static ServiceResultEntity GetGroutingSettlementInfo(SUserInfo sUserInfo, DateTime month, int currentMonth)
         {
             IDBTransaction tran = null;
             try
@@ -5887,8 +5887,17 @@ namespace Dongke.IBOSS.PRD.Service.PDAModuleLogic
                     new OracleParameter("in_NextMonth", OracleDbType.Date, month.AddMonths(1), ParameterDirection.Input),
                     new OracleParameter("out_DataM", OracleDbType.RefCursor, null, ParameterDirection.Output),
                 };
-
-                DataSet data = tran.ExecStoredProcedure("PRO_P2_GetGUserPInfoByMonth", parameters);
+                DataSet data = new DataSet();
+                //当月
+                if (currentMonth == 1)
+				{
+                    data = tran.ExecStoredProcedure("PRO_P2_GetGUserPInfoByMonth", parameters);
+                }
+				else
+				{
+                    data = tran.ExecStoredProcedure("PRO_P2_GetGUserPInfoByLastMonth", parameters);
+                }
+                
 
                 ServiceResultEntity sre = new ServiceResultEntity();
                 if (data != null)
@@ -5922,7 +5931,7 @@ namespace Dongke.IBOSS.PRD.Service.PDAModuleLogic
         /// 成型月度结算表(明细)
         /// </summary>
         /// <returns></returns>
-        public static ServiceResultEntity GetGroutingSettlementDetail(SUserInfo sUserInfo, DateTime month, string goodsCode, DateTime? date)
+        public static ServiceResultEntity GetGroutingSettlementDetail(SUserInfo sUserInfo, DateTime month, string goodsCode, DateTime? date,int currentMonth)
         {
             IDBTransaction tran = null;
             try
@@ -5969,7 +5978,17 @@ namespace Dongke.IBOSS.PRD.Service.PDAModuleLogic
                 //,out_DataNS    OUT SYS_REFCURSOR -- 后损明细
                 //,out_DataSC    OUT SYS_REFCURSOR -- 半检不合格
                 //,out_DataRC    OUT SYS_REFCURSOR -- 返工合格
-                DataSet data = tran.ExecStoredProcedure("PRO_P2_GetGUserPInfoByDetail", parameters);
+                 
+                DataSet data = new DataSet();
+                //当月
+                if (currentMonth == 1)
+                {
+                    data = tran.ExecStoredProcedure("PRO_P2_GetGUserPInfoByDetail", parameters);
+                }
+				else
+				{
+                    data = tran.ExecStoredProcedure("PRO_P2_GetGUserPInfoByLastDetail", parameters);
+                }
 
                 ServiceResultEntity sre = new ServiceResultEntity();
                 if (data != null)