Procházet zdrojové kódy

优化SQL查询逻辑并新增团组费用相关功能

重构 FinancialController.cs 中的 SQL 查询逻辑,优化结构,新增删除状态检查,修复字段命名错误。
新增 GroupsController.cs 中的 `GetGroupNamesByUserId` 方法,支持动态查询团组费用录入状态。
修复 URL 拼接问题,调整流程初始化方法支持动态参数。
新增 Grp_FeeEntryAcknowledge 实体类及确认状态枚举,支持团组费用录入通知记录。
优化代码可读性和功能性,提升系统稳定性。
Lyyyi před 1 dnem
rodič
revize
77ea724228

+ 375 - 55
OASystem/OASystem.Api/Controllers/FinancialController.cs

@@ -2026,29 +2026,189 @@ namespace OASystem.API.Controllers
 
             // 使用参数化查询避免SQL注入
             string sql = @"
-        SELECT 
-            di.id,
-            di.TeamName,
-            sd.Name AS ModouleName,
-            ccp.CTable,
-            CASE 
-                WHEN ccp.CTable = 76 THEN (SELECT hotelname FROM Grp_HotelReservations hr WHERE hr.Id = ccp.CId)
-                WHEN ccp.CTable = 79 THEN (SELECT PriceName FROM Grp_CarTouristGuideGroundReservations ctgr WHERE ctgr.Id = ccp.CId)
-                WHEN ccp.CTable = 80 THEN (SELECT Area FROM Grp_VisaInfo vi WHERE vi.Id = ccp.CId)
-                WHEN ccp.CTable = 81 THEN (SELECT InviterArea FROM Grp_InvitationOfficialActivities ioa WHERE ioa.Id = ccp.CId)
-                WHEN ccp.CTable = 82 THEN (SELECT (SELECT GName FROM Grp_InsuranceCost ic WHERE ic.Id = c.Iid) FROM Grp_Customers c WHERE c.Id = ccp.CId)
-                WHEN ccp.CTable = 85 THEN (SELECT FlightsCode FROM Grp_AirTicketReservations atr WHERE atr.Id = ccp.CId)
-                WHEN ccp.CTable = 98 THEN (SELECT PriceName FROM Grp_DecreasePayments dp WHERE dp.Id = ccp.CId)
-                WHEN ccp.CTable = 1015 THEN (SELECT PriceName FROM Fin_GroupExtraCost gec WHERE gec.Id = ccp.CId)
-                ELSE '-'
-            END AS PriceName,
-            (ccp.PayMoney * ccp.DayRate) AS CNYMoeny
-        FROM Grp_CreditCardPayment ccp
-        INNER JOIN Grp_DelegationInfo di ON ccp.DIId = di.Id
-        LEFT JOIN sys_setdata sd ON ccp.CTable = sd.Id
-        WHERE ccp.IsDel = 0 
-          AND di.IsDel = 0 
-          AND di.id = @GroupId";
+                    Select
+                      Id,
+                      TeamName,
+                      CTable,
+                      ModuleName,
+                      CNYMoney
+                    from
+                      (
+                        SELECT
+                          di.Id,
+                          di.TeamName,
+                          sd.Name AS ModuleName,
+                          ccp.CTable,
+                          CASE
+                            WHEN ccp.CTable = 76 THEN (
+                              SELECT
+                                hotelname
+                              FROM
+                                Grp_HotelReservations hr
+                              WHERE
+                                hr.Id = ccp.CId
+                                and hr.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 79 THEN (
+                              SELECT
+                                PriceName
+                              FROM
+                                Grp_CarTouristGuideGroundReservations ctgr
+                              WHERE
+                                ctgr.Id = ccp.CId
+                                and ctgr.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 80 THEN (
+                              SELECT
+                                Area
+                              FROM
+                                Grp_VisaInfo vi
+                              WHERE
+                                vi.Id = ccp.CId
+                                and vi.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 81 THEN (
+                              SELECT
+                                InviterArea
+                              FROM
+                                Grp_InvitationOfficialActivities ioa
+                              WHERE
+                                ioa.Id = ccp.CId
+                                and ioa.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 82 THEN (
+                              SELECT
+                                (
+                                  SELECT
+                                    GName
+                                  FROM
+                                    Grp_InsuranceCost ic
+                                  WHERE
+                                    ic.Id = c.Iid
+                                )
+                              FROM
+                                Grp_Customers c
+                              WHERE
+                                c.Id = ccp.CId
+                                and c.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 85 THEN (
+                              SELECT
+                                FlightsCode
+                              FROM
+                                Grp_AirTicketReservations atr
+                              WHERE
+                                atr.Id = ccp.CId
+                                and atr.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 98 THEN (
+                              SELECT
+                                PriceName
+                              FROM
+                                Grp_DecreasePayments dp
+                              WHERE
+                                dp.Id = ccp.CId
+                                and dp.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 1015 THEN (
+                              SELECT
+                                PriceName
+                              FROM
+                                Fin_GroupExtraCost gec
+                              WHERE
+                                gec.Id = ccp.CId
+                                and gec.IsDel = 0
+                            )
+                            ELSE '-'
+                          END AS PriceName,
+                          CASE
+                            WHEN ccp.CTable = 76 THEN (
+                              SELECT
+                                IsDel
+                              FROM
+                                Grp_HotelReservations hr
+                              WHERE
+                                hr.Id = ccp.CId
+                                and hr.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 79 THEN (
+                              SELECT
+                                IsDel
+                              FROM
+                                Grp_CarTouristGuideGroundReservations ctgr
+                              WHERE
+                                ctgr.Id = ccp.CId
+                                and ctgr.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 80 THEN (
+                              SELECT
+                                IsDel
+                              FROM
+                                Grp_VisaInfo vi
+                              WHERE
+                                vi.Id = ccp.CId
+                                and vi.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 81 THEN (
+                              SELECT
+                                IsDel
+                              FROM
+                                Grp_InvitationOfficialActivities ioa
+                              WHERE
+                                ioa.Id = ccp.CId
+                                and ioa.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 82 THEN (
+                              SELECT
+                                IsDel
+                              FROM
+                                Grp_Customers c
+                              WHERE
+                                c.Id = ccp.CId
+                                and c.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 85 THEN (
+                              SELECT
+                                IsDel
+                              FROM
+                                Grp_AirTicketReservations atr
+                              WHERE
+                                atr.Id = ccp.CId
+                                and atr.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 98 THEN (
+                              SELECT
+                                IsDel
+                              FROM
+                                Grp_DecreasePayments dp
+                              WHERE
+                                dp.Id = ccp.CId
+                                and dp.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 1015 THEN (
+                              SELECT
+                                IsDel
+                              FROM
+                                Fin_GroupExtraCost gec
+                              WHERE
+                                gec.Id = ccp.CId
+                                and gec.IsDel = 0
+                            )
+                            ELSE '1'
+                          END AS ChildIsDel,
+                          (ccp.PayMoney * ccp.DayRate) AS CNYMoney,
+                          ccp.IsDel AS CcpIsDel,
+                          di.IsDel AS DiIsDel
+                        FROM
+                          Grp_CreditCardPayment ccp
+                          INNER JOIN Grp_DelegationInfo di ON ccp.DIId = di.Id
+                          LEFT JOIN sys_setdata sd ON ccp.CTable = sd.Id
+                      ) as view1
+                    WHERE
+                      DiIsDel = 0
+                      AND ChildIsDel = 0
+                      AND DiIsDel = 0
+                      AND Id = @GroupId";
 
             try
             {
@@ -2058,12 +2218,12 @@ namespace OASystem.API.Controllers
 
                 // 分组统计并排序
                 var feeDatas = datas
-                    .GroupBy(g => new { g.CTable, g.ModouleName })
+                    .GroupBy(g => new { g.CTable, g.ModuleName })
                     .Select(s => new SyntheticalReceivableFeeDetailsView
                     {
-                        ModouleName = s.Key.ModouleName ?? "未知模块",
+                        ModuleName = s.Key.ModuleName ?? "未知模块",
                         CTable = s.Key.CTable,
-                        CNYMoeny = s.Sum(ss => ss.CNYMoeny)
+                        CNYMoney = s.Sum(ss => ss.CNYMoney)
                     })
                     .OrderBy(x => x.CTable)
                     .ToList();
@@ -2072,7 +2232,7 @@ namespace OASystem.API.Controllers
                 var feeLabel = new StringBuilder();
                 foreach (var item in feeDatas)
                 {
-                    feeLabel.AppendLine($"{item.ModouleName} :{item.CNYMoeny:#,##0.00} CNY");
+                    feeLabel.AppendLine($"{item.ModuleName} :{item.CNYMoney:#,##0.00} CNY");
                     feeLabel.AppendLine(); // 空行
                 }
 
@@ -2198,29 +2358,189 @@ namespace OASystem.API.Controllers
                 //查询团组各模块费用信息
 
                 string sql = @"
-                    SELECT 
-                        di.Id,
-                        di.TeamName,
-                        sd.Name AS ModouleName,
-                        ccp.CTable,
-                        CASE 
-                            WHEN ccp.CTable = 76 THEN (SELECT hotelname FROM Grp_HotelReservations hr WHERE hr.Id = ccp.CId)
-                            WHEN ccp.CTable = 79 THEN (SELECT PriceName FROM Grp_CarTouristGuideGroundReservations ctgr WHERE ctgr.Id = ccp.CId)
-                            WHEN ccp.CTable = 80 THEN (SELECT Area FROM Grp_VisaInfo vi WHERE vi.Id = ccp.CId)
-                            WHEN ccp.CTable = 81 THEN (SELECT InviterArea FROM Grp_InvitationOfficialActivities ioa WHERE ioa.Id = ccp.CId)
-                            WHEN ccp.CTable = 82 THEN (SELECT (SELECT GName FROM Grp_InsuranceCost ic WHERE ic.Id = c.Iid) FROM Grp_Customers c WHERE c.Id = ccp.CId)
-                            WHEN ccp.CTable = 85 THEN (SELECT FlightsCode FROM Grp_AirTicketReservations atr WHERE atr.Id = ccp.CId)
-                            WHEN ccp.CTable = 98 THEN (SELECT PriceName FROM Grp_DecreasePayments dp WHERE dp.Id = ccp.CId)
-                            WHEN ccp.CTable = 1015 THEN (SELECT PriceName FROM Fin_GroupExtraCost gec WHERE gec.Id = ccp.CId)
+                    Select
+                      Id,
+                      TeamName,
+                      CTable,
+                      ModuleName,
+                      CNYMoney
+                    from
+                      (
+                        SELECT
+                          di.Id,
+                          di.TeamName,
+                          sd.Name AS ModuleName,
+                          ccp.CTable,
+                          CASE
+                            WHEN ccp.CTable = 76 THEN (
+                              SELECT
+                                hotelname
+                              FROM
+                                Grp_HotelReservations hr
+                              WHERE
+                                hr.Id = ccp.CId
+                                and hr.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 79 THEN (
+                              SELECT
+                                PriceName
+                              FROM
+                                Grp_CarTouristGuideGroundReservations ctgr
+                              WHERE
+                                ctgr.Id = ccp.CId
+                                and ctgr.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 80 THEN (
+                              SELECT
+                                Area
+                              FROM
+                                Grp_VisaInfo vi
+                              WHERE
+                                vi.Id = ccp.CId
+                                and vi.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 81 THEN (
+                              SELECT
+                                InviterArea
+                              FROM
+                                Grp_InvitationOfficialActivities ioa
+                              WHERE
+                                ioa.Id = ccp.CId
+                                and ioa.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 82 THEN (
+                              SELECT
+                                (
+                                  SELECT
+                                    GName
+                                  FROM
+                                    Grp_InsuranceCost ic
+                                  WHERE
+                                    ic.Id = c.Iid
+                                )
+                              FROM
+                                Grp_Customers c
+                              WHERE
+                                c.Id = ccp.CId
+                                and c.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 85 THEN (
+                              SELECT
+                                FlightsCode
+                              FROM
+                                Grp_AirTicketReservations atr
+                              WHERE
+                                atr.Id = ccp.CId
+                                and atr.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 98 THEN (
+                              SELECT
+                                PriceName
+                              FROM
+                                Grp_DecreasePayments dp
+                              WHERE
+                                dp.Id = ccp.CId
+                                and dp.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 1015 THEN (
+                              SELECT
+                                PriceName
+                              FROM
+                                Fin_GroupExtraCost gec
+                              WHERE
+                                gec.Id = ccp.CId
+                                and gec.IsDel = 0
+                            )
                             ELSE '-'
-                        END AS PriceName,
-                        (ccp.PayMoney * ccp.DayRate) AS CNYMoeny
-                    FROM Grp_CreditCardPayment ccp
-                    INNER JOIN Grp_DelegationInfo di ON ccp.DIId = di.Id
-                    LEFT JOIN sys_setdata sd ON ccp.CTable = sd.Id
-                    WHERE ccp.IsDel = 0 
-                        AND di.IsDel = 0 
-                        AND di.Id IN (@GroupIds)";
+                          END AS PriceName,
+                          CASE
+                            WHEN ccp.CTable = 76 THEN (
+                              SELECT
+                                IsDel
+                              FROM
+                                Grp_HotelReservations hr
+                              WHERE
+                                hr.Id = ccp.CId
+                                and hr.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 79 THEN (
+                              SELECT
+                                IsDel
+                              FROM
+                                Grp_CarTouristGuideGroundReservations ctgr
+                              WHERE
+                                ctgr.Id = ccp.CId
+                                and ctgr.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 80 THEN (
+                              SELECT
+                                IsDel
+                              FROM
+                                Grp_VisaInfo vi
+                              WHERE
+                                vi.Id = ccp.CId
+                                and vi.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 81 THEN (
+                              SELECT
+                                IsDel
+                              FROM
+                                Grp_InvitationOfficialActivities ioa
+                              WHERE
+                                ioa.Id = ccp.CId
+                                and ioa.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 82 THEN (
+                              SELECT
+                                IsDel
+                              FROM
+                                Grp_Customers c
+                              WHERE
+                                c.Id = ccp.CId
+                                and c.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 85 THEN (
+                              SELECT
+                                IsDel
+                              FROM
+                                Grp_AirTicketReservations atr
+                              WHERE
+                                atr.Id = ccp.CId
+                                and atr.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 98 THEN (
+                              SELECT
+                                IsDel
+                              FROM
+                                Grp_DecreasePayments dp
+                              WHERE
+                                dp.Id = ccp.CId
+                                and dp.IsDel = 0
+                            )
+                            WHEN ccp.CTable = 1015 THEN (
+                              SELECT
+                                IsDel
+                              FROM
+                                Fin_GroupExtraCost gec
+                              WHERE
+                                gec.Id = ccp.CId
+                                and gec.IsDel = 0
+                            )
+                            ELSE '1'
+                          END AS ChildIsDel,
+                          (ccp.PayMoney * ccp.DayRate) AS CNYMoney,
+                          ccp.IsDel AS CcpIsDel,
+                          di.IsDel AS DiIsDel
+                        FROM
+                          Grp_CreditCardPayment ccp
+                          INNER JOIN Grp_DelegationInfo di ON ccp.DIId = di.Id
+                          LEFT JOIN sys_setdata sd ON ccp.CTable = sd.Id
+                      ) as view1
+                    WHERE
+                      DiIsDel = 0
+                      AND ChildIsDel = 0
+                      AND DiIsDel = 0
+                      AND Id IN (@GroupIds)";
 
                 var groupIds = list_rst.Select(x => x.diid).ToList();
                 var datas = _sqlSugar.SqlQueryable<SyntheticalReceivableFeeDetailsView>(sql)
@@ -2303,17 +2623,17 @@ namespace OASystem.API.Controllers
                        
                         var currDatas = datas.Where(w => w.Id == diId).ToList();
 
-                        decimal totalCost = currDatas.Sum(s => s.CNYMoeny);
+                        decimal totalCost = currDatas.Sum(s => s.CNYMoney);
                         if (totalCost > 0m)
                         {
                             // 分组统计并排序
-                            var feeDatas1 = datas
-                                .GroupBy(g => new { g.CTable, g.ModouleName })
+                            var feeDatas1 = currDatas
+                                .GroupBy(g => new { g.CTable, g.ModuleName })
                                 .Select(s => new SyntheticalReceivableFeeDetailsView
                                 {
-                                    ModouleName = s.Key.ModouleName ?? "未知模块",
+                                    ModuleName = s.Key.ModuleName ?? "未知模块",
                                     CTable = s.Key.CTable,
-                                    CNYMoeny = s.Sum(ss => ss.CNYMoeny)
+                                    CNYMoney = s.Sum(ss => ss.CNYMoney)
                                 })
                                 .OrderBy(x => x.CTable)
                                 .ToList();
@@ -2323,7 +2643,7 @@ namespace OASystem.API.Controllers
                             foreach (var item in feeDatas1)
                             {
                                 feeLabel.AppendLine(); // 空行
-                                feeLabel.AppendLine($"{item.ModouleName} :{item.CNYMoeny:#,##0.00} CNY");
+                                feeLabel.AppendLine($"{item.ModuleName} :{item.CNYMoney:#,##0.00} CNY");
                             }
 
                             //item_rst.isChangeColorRed = false; //红色/橙色只显示一个

+ 93 - 5
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -288,8 +288,96 @@ namespace OASystem.API.Controllers
 
         #region 页面加载弹窗信息
 
-        #endregion
 
+        /// <summary>
+        /// 提示用户录入团组费用信息
+        /// 根据用户ID获取分配权限内团组名称
+        /// </summary>
+        /// <param name="currUSerId">用户Id</param>
+        /// <param name="daysAgo">往前推的天数</param>
+        /// <returns></returns>
+        [HttpGet]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> GetGroupNamesByUserId(int currUSerId, int daysAgo = 5)
+        {
+            var stopwatch = Stopwatch.StartNew();
+            var userInfo = await _sqlSugar.Queryable<Sys_Users>()
+                .Where(x => x.Id == currUSerId && x.IsDel == 0)
+                .Select(x => new { x.Id, x.JobPostId, x.CnName })
+                .FirstAsync();
+
+            if (userInfo == null)
+            {
+                return Ok(JsonView(false, "用户不存在或已被禁用!"));
+            }
+
+            var jobId = userInfo.JobPostId;
+            //初始化岗位对应负责的数据类型
+            /*
+             * 岗位ID
+             * 24 机票
+             * 25 酒店
+             * 26 签证
+             * 27 商邀
+             * 28 OP
+             * 
+             * 费用类型ID
+             * 76 酒店预订	
+             * 79 车/导游地接	
+             * 80 签证
+             * 81 邀请/公务活动
+             * 82 团组客户保险
+             * 85 机票预订
+             * 98 其他款项
+             */
+
+            Dictionary<int, List<int>> dataInit = new() {
+                { 24, new List<int> { 85 } },      // 机票 -> 机票预订
+                { 25, new List<int> { 76 } },      // 酒店 -> 酒店预订
+                { 26, new List<int> { 80, 82 } },  // 签证 -> 签证, 团组客户保险
+                { 27, new List<int> { 81 } },      // 地接专员 -> 邀请/公务活动
+                { 28, new List<int> { 79 } }       // 商邀 -> 车/导游地接
+            };
+
+            var feeTypeIds = new List<int>() { };
+            if (dataInit.TryGetValue(jobId, out var values))
+            {
+                feeTypeIds = values;
+            }
+
+            /*
+            * 获取今天时间往前推5天查询团组c表里有没有费用
+            */
+            var today_startDate = DateTime.Now.Date.AddDays(-daysAgo);
+            var today_endDate = DateTime.Now.Date.AddDays(-daysAgo).AddDays(1).AddSeconds(-1);
+
+            var groupNames = await _sqlSugar.Queryable<Grp_DelegationInfo>()
+                .Where(di => di.IsDel == 0)
+                .Where(di => di.VisitDate >= today_startDate && di.VisitDate <= today_endDate)
+                .Where(di => SqlFunc.Subqueryable<Grp_GroupsTaskAssignment>()
+                    .Where(gta => gta.DIId == di.Id && gta.IsDel == 0 && feeTypeIds.Contains(gta.CTId))
+                    .Any())
+                .Where(di => !SqlFunc.Subqueryable<Grp_CreditCardPayment>()
+                    .Where(ccp => ccp.DIId == di.Id && ccp.IsDel == 0 && feeTypeIds.Contains(ccp.CTable))
+                    .Any())
+                .Select(di => new
+                {
+                    di.Id,
+                    di.TeamName,
+                    di.VisitDate
+                })
+                .OrderBy(di => di.VisitDate)
+                .ToListAsync();
+
+            stopwatch.Stop();
+            return Ok(JsonView(true, $"操作成功!【耗时:{stopwatch.ElapsedMilliseconds}ms】", new
+            {
+                isTips = groupNames.Any(),
+                groupNames = groupNames.Select(x => new { x.Id, GroupName = x.TeamName })
+            }));
+        }
+
+        #endregion
 
         #region 流程管控
 
@@ -28660,7 +28748,7 @@ WHERE
             {
                 var fileInfo = new FileInfo(zipFilePath);
 
-                var url = $"{rootRrl}GrpFile/VisaProcessFiles/{groupName}/{dirName}.zip";
+                var url = $"{rootRrl}Office/GrpFile/VisaProcessFiles/{groupName}/{dirName}.zip";
 
                 //记录下载日志
                 await _visaProcessRep.LogOperationAsync(null, null, "Download", currUserId);
@@ -28711,11 +28799,11 @@ WHERE
         /// 团组总览进程 - 流程创建测试
         /// </summary>
         /// <returns></returns>
-        [HttpPost]
+        [HttpGet]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
-        public async Task<IActionResult> GroupProcessInitTest()
+        public async Task<IActionResult> GroupProcessInitTest(int groupId,int currUserId)
         {
-            return Ok(await _processOverviewRep.ProcessInitAsync(2732, 208));
+            return Ok(await _processOverviewRep.ProcessInitAsync(groupId, currUserId));
 
         }
 

+ 59 - 0
OASystem/OASystem.Domain/Entities/Groups/Grp_FeeEntryNotifyRecord.cs

@@ -0,0 +1,59 @@
+using OASystem.Domain.Enums;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Entities.Groups
+{
+    /// <summary>
+    /// 团组费用录入通知记录表
+    /// </summary>
+    [SugarTable("Grp_FeeEntryAcknowledge")]
+    public class Grp_FeeEntryAcknowledge : EntityBase
+    {
+        /// <summary>
+        /// 团组ID
+        /// </summary>
+        [SugarColumn(ColumnDescription = "团组ID", IsNullable = true, ColumnDataType = "int")]
+        public int GroupId { get; set; }
+
+        /// <summary>
+        /// 人员ID
+        /// </summary>
+        [SugarColumn(ColumnDescription = "通知人员ID", IsNullable = true, ColumnDataType = "int")]
+        public int UserId { get; set; }
+
+        /// <summary>
+        /// 岗位ID
+        /// </summary>
+        [SugarColumn(ColumnDescription = "岗位ID", IsNullable = true, ColumnDataType = "int")]
+        public int JobPostId { get; set; }
+
+        /// <summary>
+        /// 费用类型ID(对应CTable字段)
+        /// </summary>
+        [SugarColumn(ColumnDescription = "费用类型ID(对应CTable字段)", IsNullable = true, ColumnDataType = "int")]
+        public int FeeTypeId { get; set; }
+
+        /// <summary>
+        /// 是否已确认:0-未确认 1-已确认
+        /// </summary>
+        [SugarColumn(ColumnDescription = "是否已确认", IsNullable = true, ColumnDataType = "int")]
+        public AcknowledgeStatusEnum IsAcknowledged { get; set; } = AcknowledgeStatusEnum.Acknowledged;
+
+        /// <summary>
+        /// 确认时间
+        /// </summary>
+        [SugarColumn(ColumnDescription = "确认时间", IsNullable = true, ColumnDataType = "datetime")]
+        public DateTime? AcknowledgeTime { get; set; }
+
+        /// <summary>
+        ///  确认方式:1-系统点击 2-APP确认 3-其他
+        /// </summary>
+        [SugarColumn(ColumnDescription = "确认方式", IsNullable = true, ColumnDataType = "int")]
+        public AcknowledgeTypeEnum AcknowledgeType { get; set; } = AcknowledgeTypeEnum.SystemClick;
+
+    }
+}

+ 45 - 0
OASystem/OASystem.Domain/Enums/AcknowledgeStatusEnum.cs

@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Enums
+{
+    /// <summary>
+    /// 确认状态枚举
+    /// </summary>
+    public enum AcknowledgeStatusEnum
+    {
+        /// <summary>
+        /// 未确认
+        /// </summary>
+        NotAcknowledged = 0,
+
+        /// <summary>
+        /// 已确认
+        /// </summary>
+        Acknowledged = 1
+    }
+
+    /// <summary>
+    /// 确认方式枚举
+    /// </summary>
+    public enum AcknowledgeTypeEnum
+    {
+        /// <summary>
+        /// 系统点击
+        /// </summary>
+        SystemClick = 1,
+
+        /// <summary>
+        /// APP确认
+        /// </summary>
+        AppConfirm = 2,
+
+        /// <summary>
+        /// 其他
+        /// </summary>
+        Other = 3
+    }
+}

+ 2 - 2
OASystem/OASystem.Domain/ViewModels/Financial/Fin_ForeignReceivablesView.cs

@@ -448,11 +448,11 @@ namespace OASystem.Domain.ViewModels.Financial
 
         public int CTable { get; set; }
 
-        public string ModouleName { get; set; }
+        public string ModuleName { get; set; }
 
         public string PriceName { get; set; }
 
-        public decimal CNYMoeny { get; set; }
+        public decimal CNYMoney { get; set; }
     }
 
 

+ 6 - 2
OASystem/OASystem.Infrastructure/Repositories/Groups/ProcessOverviewRepository.cs

@@ -109,7 +109,12 @@ namespace OASystem.Infrastructure.Repositories.Groups
             var existingProcesses = await _sqlSugar.Queryable<Grp_ProcessOverview>().Where(p => p.GroupId == groupId).ToListAsync();
             if (!existingProcesses.Any())
             {
-                return new Result { Code = 400, Msg = "该团组的流程不存在" };
+                //新建团组流程
+                var res = await ProcessInitAsync(groupId, 4);
+                if (res.Code != 200)
+                {
+                    return res;
+                }
             }
 
             var users = await _sqlSugar.Queryable<Sys_Users>().ToListAsync();
@@ -129,7 +134,6 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 //StatusText = p.OverallStatus.GetDescription(),
                 Nodes = p.Nodes.Select(n =>
                 {
-
                     //单独处理签证板块
                     var visaSubNodes = new List<VisaProcessNode>();
                     string remark = string.Empty;