Sfoglia il codice sorgente

Merge branch 'develop' of http://132.232.92.186:3000/XinXiBu/OA2023 into develop

yuanrf 3 giorni fa
parent
commit
479b1f795c

+ 34 - 15
OASystem/OASystem.Api/Controllers/FinancialController.cs

@@ -3893,13 +3893,13 @@ namespace OASystem.API.Controllers
                             string airPayType = setDatas.Find(it => it.Id == payInfo.PayDId)?.Name ?? "-";
                             priName = $"{flightsCode}【{airPayType}】";
                             break;
-                        case 98:  //  98	其他款项
+                        case 98:  //  98 其他款项
                             priName = $"[费用名称:{otherMoneyDatas.Find(it => payInfo.DIId == it.DiId && payInfo.CId == it.Id)?.PriceName ?? " -"}]";
                             break;
                         case 285:  //  285 收款退还
                             priName = $"[费用名称:{refundPaymentDatas.Find(it => payInfo.DIId == it.DiId && payInfo.CId == it.Id)?.PriceName ?? " -"}]";
                             break;
-                        case 1015:  //  1015	超支费用
+                        case 1015:  //  1015 超支费用
                             priName = $"[费用名称:{ExtraCostDatas.Find(it => payInfo.DIId == it.DiId && payInfo.CId == it.Id)?.PriceName ?? " -"}]";
                             break;
                         default:
@@ -3958,7 +3958,7 @@ namespace OASystem.API.Controllers
                                 PayRate = hotelContent.Rate,
                                 CNYSubTotalAmount = _CNYSubTotalAmount1,
                                 AuditStatus = payInfo.IsAuditGM,
-                                IsBgColorShown = Setting_IsBgColorShown(payInfo.CTable, payInfo.IsAuditGM)
+                                IsBgColorShown = ShouldShowBackgroundColor(payInfo.CTable, payInfo.IsAuditGM,groupInfo.TeamDid)
                             };
                             string remaksDescription1 = $"【{childInfo1.PayType}】【{childInfo1.ModuleName}】{rouNumber}、[申请人:{childInfo1.Applicant}]{subPriceName}[收款方:{childInfo1.Payee}] {childInfo1.PayCurrCode} {_PaymentAmount1:#0.00}、CNY:{childInfo1.CNYSubTotalAmount:#0.00}(团组:{groupInfo.TeamName})";
 
@@ -4006,7 +4006,7 @@ namespace OASystem.API.Controllers
                             PayRate = payInfo.DayRate,
                             CNYSubTotalAmount = _CNYSubTotalAmount,
                             AuditStatus = payInfo.IsAuditGM,
-                            IsBgColorShown = Setting_IsBgColorShown(payInfo.CTable, payInfo.IsAuditGM)
+                            IsBgColorShown = ShouldShowBackgroundColor(payInfo.CTable, payInfo.IsAuditGM,groupInfo.TeamDid)
                         };
 
                         string remaksDescription = $"【{childInfo.PayType}】【{childInfo.ModuleName}】{rouNumber}、[申请人:{childInfo.Applicant}]{priName}[收款方:{childInfo.Payee}] {childInfo.PayCurrCode} {_PaymentAmount:#0.00}、CNY:{childInfo.CNYSubTotalAmount:#0.00}(团组:{groupInfo.TeamName})";
@@ -4034,22 +4034,41 @@ namespace OASystem.API.Controllers
         }
 
         /// <summary>
-        /// 设置背景颜色显示与否
-        /// 费用类型限制:76-酒店预订、79-车/导游地接、85-机票预订
+        /// 判断是否显示背景颜色
+        /// 费用类型限制:76-酒店预订、79-车/导游地接、85-机票预订、98-其他款项(团组类型为会务、高校)
         /// </summary>
-        /// <param name="cType"></param>
-        /// <param name="auditStatus"></param>
-        /// <returns></returns>
-        private static bool Setting_IsBgColorShown(int cType, int auditStatus)
+        /// <param name="costType">费用类型</param>
+        /// <param name="auditStatus">审核状态</param>
+        /// <param name="groupType">团组类型</param>
+        /// <returns>是否显示背景颜色</returns>
+        private static bool ShouldShowBackgroundColor(int costType, int auditStatus, int groupType)
         {
-            //费用类型限制
-            var types = new List<int>() { 76, 79, 85, };
+            // 定义允许的费用类型集合
+            var allowedCostTypes = new HashSet<int> { 76, 79, 85, 98 };
 
-            if (types.Contains(cType) && auditStatus == 1)
+            // 基本条件检查
+            if (!allowedCostTypes.Contains(costType) || auditStatus != 1)
             {
-                return true;
+                return false;
             }
-            return false;
+
+            // 特殊处理:费用类型98需要检查团组类型
+            if (costType == 98)
+            {
+                // 定义允许的团组类型集合
+                var allowedGroupTypes = new HashSet<int>
+                {
+                    302,  // 成都-会务活动
+                    691,  // 四川-会务活动
+                    762,  // 四川-赛事项目收入
+                    1047, // 成都-赛事项目收入
+                };
+
+                return allowedGroupTypes.Contains(groupType);
+            }
+
+            // 其他允许的费用类型直接返回true
+            return true;
         }
 
         /// <summary>

+ 90 - 52
OASystem/OASystem.Api/Controllers/GroupsController.cs

@@ -6413,20 +6413,84 @@ FROM
                             }
                             #endregion
 
+                            // 父母的监护权(针对未成年人)/法定监护人(姓氏、名字、地址(若与申请人的地址不同)、电话号码、电子邮箱地址以及国籍)
+                            SetFieldValue(formFields, "parental_authority", "");
+                            //(如适用)国民身份号码
+                            SetFieldValue(formFields, "id_number", idCard);
 
-                            SetFieldValue(formFields, "IdNo", idCard);                   // 身份证号码
+                            #region 护照信息
+                            //清除值
+                            SetFieldValue(formFields, "travel_type_ordinary_passport", "Off");    // 旅行证件类型 - 普通护照
+                            SetFieldValue(formFields, "travel_type_diplomatic_passport", "Off");  // 旅行证件类型 - 外交护照
+                            SetFieldValue(formFields, "travel_type_service_passport", "Off");     // 旅行证件类型 - 服务护照
+                            SetFieldValue(formFields, "travel_type_offical_passport", "Off");     // 旅行证件类型 - 公务护照
+                            SetFieldValue(formFields, "travel_type_special_passport", "Off");     // 旅行证件类型 - 特别护照
+                            SetFieldValue(formFields, "travel_type_other_passport_details", "");  // 其他旅行证件(请注明)
+                            //设置值
+                            if (passportInfo != null)
+                            {
+                                // 签证类型
+                                var visatypeInfo = await _sqlSugar.Queryable<Sys_SetData>().FirstAsync(x => x.Id == passportInfo.PassportType);
+                                if (visatypeInfo != null)
+                                {
+                                    string visaName = visatypeInfo?.Name ?? "-";
+                                    if (visaName.contains("普通")) SetFieldValue(formFields, "travel_type_ordinary_passport", "Yes");        // 旅行证件类型 - 普通护照
+                                    else if (visaName.contains("外交")) SetFieldValue(formFields, "travel_type_diplomatic_passport", "Yes"); // 旅行证件类型 - 外交护照
+                                    else if (visaName.contains("服务")) SetFieldValue(formFields, "travel_type_service_passport", "Yes");    // 旅行证件类型 - 服务护照
+                                    else if (visaName.contains("公务")) SetFieldValue(formFields, "travel_type_offical_passport", "Yes");    // 旅行证件类型 - 公务护照
+                                    else                                                                                                     // 旅行证件类型 - 特别护照
+                                    {
+                                        SetFieldValue(formFields, "travel_type_other_passport", "Yes");
+                                        SetFieldValue(formFields, "travel_type_other_passport_details", "");
+                                    }
+                                }
 
+                                #region 护照信息
+                                SetFieldValue(formFields, "travel_number", passportInfo.CertNo);         // 签证 编号
+                                SetFieldValue(formFields, "travel_issue_country", passportInfo.Country); // 签发 国
+                                SetFieldValue(formFields, "travel_issue_date", passportInfo.IssueDt?.ToString("yyyy-MM-dd") ?? "");  // 签发日期
+                                SetFieldValue(formFields, "travel_issue_vaild", passportInfo.ExpiryDt?.ToString("yyyy-MM-dd") ?? ""); // 有效期至
+                                #endregion
+                            }
 
+                            #endregion
 
+                            #region 适用情况下,欧盟、欧洲经济区或瑞士公民,或英国籍且为《欧盟-英国脱欧协议》受益人的家庭成员的个人资料 “默认空”
 
-                            string selected = "√";
+                            SetFieldValue(formFields, "eu_info_surname", "");      // 姓氏(家族名)
+                            SetFieldValue(formFields, "eu_info_first_name", "");  // 名字(名字)
+                            SetFieldValue(formFields, "eu_info_birthday", "");    // 出生日期 (日-月-年)
+                            SetFieldValue(formFields, "eu_info_nationality", ""); // 国籍
+                            SetFieldValue(formFields, "eu_info_id_number", "");   // 旅行证件或身份证号码
 
-                            #region 1. 个人信息
+                            #region 与欧盟、欧洲经济区或瑞士公民,或作为《欧盟-英国脱欧协议》受益人的英国国民之间的家庭关系(如适用)
+                            SetFieldValue(formFields, "eu_family_relationship_spouse", "Off");      // 夫妻
+                            SetFieldValue(formFields, "eu_family_relationship_child", "Off");       // 子女
+                            SetFieldValue(formFields, "eu_family_relationship_grandchild", "Off");  // 孙子女
+                            SetFieldValue(formFields, "eu_family_relationship_ascendant", "Off");   // 有赡养关系的长辈
+                            SetFieldValue(formFields, "eu_family_relationship_registered", "Off");  // 注册伴侣关系
+                            #endregion
+                            #endregion
 
+                            string applicantAddressAndEmail = $"{custInfo.Address} {custInfo.Email}";
+                            SetFieldValue(formFields, "applicant_address_and_email", applicantAddressAndEmail);   // 申请人的家庭住址和电子邮箱地址
+                            SetFieldValue(formFields, "applicant_tel", custInfo.Tel);   // 申请人的电话
+
+                            #region 在非当前国籍所属国家的居住情况 “默认空”
+                            SetFieldValue(formFields, "uncurrent_count_no", "Yes");      // 否
+                            SetFieldValue(formFields, "uncurrent_count_yes", "Off");     // 是
+                            SetFieldValue(formFields, "uncurrent_country_residence", "");// 居留许可或同等证明
+                            SetFieldValue(formFields, "uncurrent_country_no", "");        // No
+                            SetFieldValue(formFields, "uncurrent_country_valid_until", "");// 有效期至
+                            #endregion
 
 
 
 
+                            string selected = "√";
+
+                            #region 1. 个人信息
+
                             #region 是否曾用别名从韩国出入境
                             SetFieldValue(formFields, "applicant_no", selected);   // 否 默认选中
                             SetFieldValue(formFields, "applicant_yes", "");
@@ -6462,53 +6526,7 @@ FROM
 
                             #endregion
 
-                            #region 3. 护照信息
 
-                            //清除值
-                            SetFieldValue(formFields, "passport_type_diplomatic", ""); // 旅行证件类型 - 外交护照
-                            SetFieldValue(formFields, "passport_type__official", "");  // 旅行证件类型 - 公务护照
-                            SetFieldValue(formFields, "passport_type__regular", "");   // 旅行证件类型 - 普通护照
-                            SetFieldValue(formFields, "passport_type__other", "");     // 旅行证件类型 - 其它
-                            //设置值
-                            if (passportInfo != null)
-                            {
-                                // 签证类型
-                                var visatypeInfo = await _sqlSugar.Queryable<Sys_SetData>().FirstAsync(x => x.Id == passportInfo.PassportType);
-                                if (visatypeInfo != null)
-                                {
-                                    string visaName = visatypeInfo?.Name ?? "-";
-                                    if (visaName.contains("外交")) SetFieldValue(formFields, "passport_type_diplomatic", selected);     // 旅行证件类型 - 外交护照
-                                    else if (visaName.contains("公务")) SetFieldValue(formFields, "passport_type__official", selected); // 旅行证件类型 - 公务护照
-                                    else if (visaName.contains("普通")) SetFieldValue(formFields, "passport_type__regular", selected);  // 旅行证件类型 - 普通护照
-                                    else if (visaName.contains("其它"))                                                                 // 旅行证件类型 - 其它
-                                    {
-                                        SetFieldValue(formFields, "passport_type__other", selected);
-                                        SetFieldValue(formFields, "passport_type__other_remark", "");
-                                    }
-                                    else SetFieldValue(formFields, "passport_ordinary", selected);                                      // 旅行证件类型 - 普通护照
-                                }
-
-                                SetFieldValue(formFields, "passport_no", passportInfo.CertNo);        // 签证 编号
-                                SetFieldValue(formFields, "passport_country", passportInfo.Country);  // 签发 国
-                                SetFieldValue(formFields, "passport_issuePlace", passportInfo.Area);  // 签发 地
-                                SetFieldValue(formFields, "passport_issue_date", passportInfo.IssueDt?.ToString("yyyy-MM-dd") ?? "");  // 签发日期
-                                SetFieldValue(formFields, "passport_expiryDate", passportInfo.ExpiryDt?.ToString("yyyy-MM-dd") ?? ""); // 有效期至
-
-                                #region 是否有其他护照信息
-                                SetFieldValue(formFields, "otherPassport_no", selected);  // 否 默认选中
-                                SetFieldValue(formFields, "otherPassport_yes", ""); // 是
-                                //清除值
-                                SetFieldValue(formFields, "other_passport_type_diplomatic", ""); // 旅行证件类型 - 外交护照
-                                SetFieldValue(formFields, "other_passport_type_official", "");   // 旅行证件类型 - 公务护照
-                                SetFieldValue(formFields, "other_passport_type_regular", "");    // 旅行证件类型 - 普通护照
-                                SetFieldValue(formFields, "other_passport_type_other", "");      // 旅行证件类型 - 其它
-                                SetFieldValue(formFields, "other_passport_no", "");              // 签证 编号
-                                SetFieldValue(formFields, "other_passport_country", "");         // 签发 国
-                                SetFieldValue(formFields, "other_passport_expiry_date", "");    // 有效期至
-                                #endregion
-                            }
-
-                            #endregion
 
                             #region 4. 联系信息
 
@@ -6811,6 +6829,8 @@ FROM
                             SetFieldValue(formFields, "declaration_applicant_name", applicant_name);  // 申请人姓名
                             #endregion
 
+
+
                             filePaths.Add(outputPath);
                         }
                         catch (Exception ex)
@@ -26416,11 +26436,29 @@ AirHotelPrice
 
             #endregion
 
-            //验证 
+            //验证:团回归30天后不能更改
             if (_dto.Id > 0)
             {
-                (bool valid, string msg) = await GeneralMethod.FeeOpValid(_dto.Id, 76);
-                if (!valid) return Ok(JsonView(false, msg));
+                //// 审核、付款 验证
+                //(bool valid, string msg) = await GeneralMethod.FeeOpValid(_dto.Id, 76);
+                //if (!valid) return Ok(JsonView(false, msg));
+
+                var groupInfo = await _sqlSugar.Queryable<Grp_DelegationInfo>()
+                                        .Where(x => x.Id == _dto.DiId && x.IsDel == 0)
+                                        .FirstAsync();
+                if (groupInfo == null)
+                {
+                    return Ok(JsonView(false, "团组信息不存在"));
+                }
+                // 截止日期:团回归日期+30天
+                var deadline = groupInfo.VisitEndDate.AddDays(30).Date;
+                // 当前日期
+                var currDate = DateTime.Today;
+
+                if (currDate > deadline)
+                {
+                    return Ok(JsonView(false, "当前日期已超过截止日期(团回归日期+30天),不可编辑。"));
+                }
             }
 
             JsonView _view = await _hotelPriceRep.AddOrEdit(_dto);

+ 8 - 5
OASystem/OASystem.Api/Controllers/StatisticsController.cs

@@ -5739,11 +5739,14 @@ Group By CnName");
             {
                 var defaultParentIds = new List<int>()
                 {
-                    48,//  人员费用
-                    49,//  办公费用
-                    50,//  销售费用
-                    51,//  其他费用
-                    55,//  大运会
+                    48,  // 人员费用
+                    49,  // 办公费用
+                    50,  // 销售费用
+                    51,  // 其他费用
+                    55,  // 大运会
+                    90,  // 各部门基础固定费用明细
+                    104, // 团组费用
+                    116, // 物资采购
                 };
 
                 var dailypaymentTypeData = await RedisRepository.RedisFactory

+ 7 - 0
OASystem/OASystem.Api/OAMethodLib/GeneralMethod.cs

@@ -548,6 +548,13 @@ namespace OASystem.API.OAMethodLib
             if (ccpInfo == null)
                 return (false, "当前费用不存在,不可操作!");
 
+            // 自动审核 费用类型为签证时不校验
+            if (feeType !=  80)
+            {
+                if (ccpInfo.IsAuditGM == 3)
+                    return (false, "当前费用已自动审核,不可操作!");
+            }
+           
             // 已审核
             if (ccpInfo.IsAuditGM == 1)
                 return (false, "当前费用已审核,不可操作!");

+ 9 - 3
OASystem/OASystem.Api/OAMethodLib/QiYeWeChatAPI/AppNotice/Config.cs

@@ -596,10 +596,16 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
         /// <returns></returns>
         public static string TaskAssignment_Create_ToUser(TaskAssignment_Create_ToUserModel dto)
         {
-            string result = string.Format(@" `任务分配通知` 
 
->团组:<font color='info'>{0}</font>  
+            //团组名称=“未选择”时 不显示 团名称行
+            string groupLabel = string.Empty;
+            if (dto != null && dto.GroupName != "未选择") {
+                groupLabel = @$">团组:<font color='info'>{dto.GroupName}</font>
+";
+            }
 
+            string result = string.Format(@" `任务分配通知` 
+{0}
 <font color='info'>{1}</font>
 
 >操作人员:{2}
@@ -607,7 +613,7 @@ namespace OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice
 
 [详细信息请前往OA系统查看](http://oa.pan-american-intl.com:4399/) 
 
- ", dto.GroupName, dto.Title, dto.CreateUser, dto.RefreshDate);
+ ", groupLabel, dto.Title, dto.CreateUser, dto.RefreshDate);
 
             return result;
         }