Преглед изворни кода

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

LEIYI пре 1 недеља
родитељ
комит
2df4e8848d

+ 31 - 0
OASystem/OASystem.Infrastructure/Repositories/Groups/DecreasePaymentsRepository.cs

@@ -1,6 +1,7 @@
 using AutoMapper;
 using NPOI.SS.Formula.Functions;
 using OASystem.Domain;
+using OASystem.Domain.AesEncryption;
 using OASystem.Domain.Dtos.Groups;
 using OASystem.Domain.Entities.Financial;
 using OASystem.Domain.Entities.Groups;
@@ -253,6 +254,36 @@ namespace OASystem.Infrastructure.Repositories.Groups
                     int cId = await _sqlSugar.Insertable(C).ExecuteReturnIdentityAsync();
                     if (cId > 1)
                     {
+
+                        #region 策划部内容同步添加至资料库
+                        var userInfo = _sqlSugar.Queryable<Sys_Users>()
+                            .LeftJoin<Sys_Department>((u,d)=> d.IsDel == 0 && u.DepId == d.Id )
+                            .Where((u, d) => u.Id == dto.CreateUserId && d.DepName == "策划部" && u.IsDel == 0)
+                            .First();
+
+                        if (userInfo != null)
+                        {
+                            Res_MediaSuppliers mediaSuppliersData = new Res_MediaSuppliers
+                            {
+                                CreateTime = DateTime.Now,
+                                CreateUserId = dto.CreateUserId,
+                                UnitName = dto.SupplierName,
+                                TypeId = dto.SupplierTypeId,
+                                UnitAddress = dto.SupplierAddress,
+                                Contact = dto.SupplierContact,
+                                Tel = dto.SupplierContactNumber,
+                                Email = dto.SupplierEmail,
+                                Privince = dto.SupplierArea == 1 ? "国内" :"国外",
+                            };
+
+                            EncryptionProcessor.EncryptProperties(mediaSuppliersData);
+                            _sqlSugar.Insertable(mediaSuppliersData).ExecuteCommand();
+                        }
+
+                        #endregion
+
+
+
                         CommitTran();
                         var data = new { ccpId = cId, sign = 1,dataId = id };
                         return new JsonView() { Code = 200, Msg = "添加成功!", Data = data };

+ 1 - 1
OASystem/OASystem.Infrastructure/Repositories/Resource/MediaSuppliersRepository.cs

@@ -160,7 +160,7 @@ namespace OASystem.Infrastructure.Repositories.Resource
             var info = _mapper.Map<Res_MediaSuppliers>(dto);
             info.CreateUserId = userId;
 
-            EncryptionProcessor.DecryptProperties(info);
+            EncryptionProcessor.EncryptProperties(info);
 
             if (info.Id < 1) //添加
             {