2 Commits 28f788abfe ... 93d2989f0f

Author SHA1 Message Date
  wangh 93d2989f0f Merge branch 'develop' of http://132.232.92.186:3000/XinXiBu/OA2021 into develop 1 year ago
  wangh bc870a5b16 提成排查 1 year ago
2 changed files with 18 additions and 3 deletions
  1. 1 1
      DAL/VisaService.cs
  2. 17 2
      OA2021/finance/Royalty.aspx.cs

+ 1 - 1
DAL/VisaService.cs

@@ -76,7 +76,7 @@ namespace DAL
         public List<Visa> GetVisaByDIIDAndUserId(int diid,int UserId)
         {
             //调用获取单个对象的方法
-            return excuteSql("select * from Visa where DIId = @Diid and Operators="+UserId+" and isdel=0", new SqlParameter("@Diid", diid));
+            return excuteSql("select * from Visa where DIId = @Diid and Operator="+UserId+" and isdel=0", new SqlParameter("@Diid", diid));
         }
 
         /// <summary>

+ 17 - 2
OA2021/finance/Royalty.aspx.cs

@@ -379,7 +379,7 @@ namespace OA2021.finance
                         cTemp.DeleteTime = "";
                         cTemp.Remark = "";
                         cTemp.IsDel = 0;
-                        //if (cTemp.Money!=0)
+                        if (cTemp.Money!=0)
                         {
                             new Fin_CommissionService().add(cTemp);
                         }
@@ -488,12 +488,25 @@ namespace OA2021.finance
             cTemp.Detail = "";
             //机票
             List<AirTicketReservations> listAir = new AirTicketReservationsService().GetAirTicketReservationsByDIIDAndUId(dele.Id, cTemp.Personnel);
+            if (listAir==null)
+            {
+                listAir = new List<AirTicketReservations>();
+            }
             //酒店
             List<HotelReservations> listHotel = new HotelReservationsService().GetByDIIdUId(dele.Id, cTemp.Personnel);
+            if (listHotel == null)
+            {
+                listHotel = new List<HotelReservations>();
+            }
             //地接
             List<CarTouristGuideGroundReservations> listOP = new CarTouristGuideGroundReservationsService().GetCarTouristGuideGroundReservationsByDIID(dele.Id);
+            if (listOP == null)
+            {
+                listOP = new List<CarTouristGuideGroundReservations>();
+            }
             //签证
             List<Visa> listVisa = new VisaService().GetVisaByDIIDAndUserId(dele.Id, cTemp.Personnel);
+
             //if (Profitstr > 0)
             {
                 cTemp.IsMakeLoss = 0;
@@ -990,7 +1003,8 @@ namespace OA2021.finance
                                 }
                             }
                             cTemp.Detail += "额外提成为" + comMoney + ",";
-                            cTemp.Detail += "总提成为" + comMoney + cost + "。";
+                            cTemp.Detail += "总提成为" + (comMoney + cost) + "。";
+                            comMoney = (comMoney + cost);
                         }
                     }
                     else
@@ -1042,6 +1056,7 @@ namespace OA2021.finance
                 {
                     int count1 = 0;
                     int count2 = 0;
+                    
                     foreach (Visa visa in listVisa)
                     {
                         CreditCardPayment c = new CreditCardPaymentService().GetCreditCardPaymentByCid(visa.Id, 80);