Bläddra i källkod

超支费用接口修改

jiangjc 1 år sedan
förälder
incheckning
e235f6a149

+ 30 - 6
OASystem/OASystem.Api/Controllers/FinancialController.cs

@@ -2592,6 +2592,9 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
             _entity.PriceDetailType = dto.priceDetailType;
             _entity.FilePath = dto.filePath;
             _entity.Remark = dto.remark;
+            _entity.PriceCount = dto.PriceCount;
+            _entity.PriceDt = DateTime.Parse(dto.PriceDt);
+            _entity.PriceSum = dto.price * dto.PriceCount;
 
             _daiRep.BeginTran();
             if (dto.editType == 1)
@@ -2617,7 +2620,10 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
                     PriceDetailType = dto.priceDetailType,
                     Coefficient = dto.coefficient,
                     FilePath = dto.filePath,
-                    Remark = dto.remark
+                    Remark = dto.remark,
+                    PriceCount = dto.PriceCount,
+                    PriceDt = _entity.PriceDt,
+                    PriceSum = _entity.PriceSum
                 });
                 if (!res)
                 {
@@ -2825,7 +2831,8 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
             int endIndex = startIndex + dto.PageSize - 1;
             string sql_data = string.Format(@"Select * From (	
                                                 Select row_number() over (order by f.Id Desc) as RowNumber,f.Id,f.DiId,
-												f.PriceName,f.PriceType,CAST(f.Price as varchar)+' '+s.[Name] as PriceStr,f.FilePath,f.CreateUserId,f.CreateTime,c.IsAuditGM
+												f.PriceName,f.PriceType,f.PriceDetailType,f.Price,f.PriceCount,CAST(f.PriceSum as varchar)+' '+s.[Name] as PriceStr,
+                                                f.CreateUserId,f.PriceDt,c.IsAuditGM												
                                                 From Fin_GroupExtraCost f
                                                 Inner Join Grp_CreditCardPayment c On f.Id = c.CId
                                                 Inner Join Sys_SetData s On f.PriceCurrency = s.Id
@@ -2852,16 +2859,16 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
 
                 foreach (var item in dataList)
                 {
-                    DateTime dtTemp_CreateTime;
-                    bool b_ct = DateTime.TryParse(item.CreateTime, out dtTemp_CreateTime);
+                    DateTime dtTemp_PriceDt;
+                    bool b_ct = DateTime.TryParse(item.PriceDt, out dtTemp_PriceDt);
                     if (b_ct)
                     {
-                        item.CreateTime = dtTemp_CreateTime.ToString("yyyy-MM-dd HH:mm");
+                        item.PriceDt = dtTemp_PriceDt.ToString("yyyy-MM-dd HH:mm");
                     }
 
 
 
-                    //费用详细类型
+                    //费用类型
                     if (dic_setData.ContainsKey(item.PriceType))
                     {
                         item.PriceTypeStr = dic_setData[item.PriceType];
@@ -2877,6 +2884,23 @@ Where c.CTable = 1015 And c.IsPay = 1 And f.IsDel = 0 And c.IsDel = 0 And f.DiId
                         }
                     }
 
+                    if (item.PriceDetailType > 0) {
+                        if (dic_setData.ContainsKey(item.PriceDetailType))
+                        {
+                            item.PriceTypeStr = item.PriceTypeStr + " - " + dic_setData[item.PriceDetailType];
+                        }
+                        else
+                        {
+                            Sys_SetData sd_priceTypeDetail = _daiRep.Query<Sys_SetData>(s => s.Id == item.PriceDetailType).First();
+                            if (sd_priceTypeDetail != null)
+                            {
+                                string tempName = sd_priceTypeDetail.Name.Replace("n", "");
+                                item.PriceTypeStr = item.PriceTypeStr + " - " + tempName;
+                                dic_setData.Add(item.PriceDetailType, tempName);
+                            }
+                        }
+                    }
+
                     //系统用户
                     if (dic_user.ContainsKey(item.CreateUserId))
                     {

+ 3 - 0
OASystem/OASystem.Domain/Dtos/Financial/Fin_GroupExtraCostDto.cs

@@ -81,6 +81,9 @@ namespace OASystem.Domain.Dtos.Financial
         /// 操作人员
         /// </summary>
         public int createUser { get; set; }
+
+        public string PriceDt { get; set; }
+        public int PriceCount { get; set; }
     }
 
     public class Fin_GroupExtraCostDto_Search : DtoBase

+ 6 - 2
OASystem/OASystem.Domain/ViewModels/Financial/Fin_GroupExtraCostView.cs

@@ -13,12 +13,14 @@ namespace OASystem.Domain.ViewModels.Financial
         public int DiId { get; set; }
         public string PriceName { get; set; }
         public int PriceType { get; set; }
+        public int PriceDetailType { get; set; }
         public string PriceTypeStr { get; set; }
+        public string Price { get; set; }
+        public int PriceCount { get; set; }
         public string PriceStr { get; set; }
-        public string FilePath { get; set; }
         public int CreateUserId { get; set; }
         public string CreateUserIdStr { get; set; }
-        public string CreateTime { get; set; }
+        public string PriceDt { get; set; }
         public int IsAuditGM { get; set; }
         public string IsAuditGMStr { get; set; }
         
@@ -30,6 +32,8 @@ namespace OASystem.Domain.ViewModels.Financial
         public int DiId { get; set; }
         public string PriceName { get; set; }
         public decimal Price { get; set; }
+        public int PriceCount { get; set; }
+        public string PriceDt { get; set; }
         public int PriceCurrency { get; set; }
         public string Payee { get; set; }
         public int OrbitalPrivateTransfer { get; set; }