From 76bdc39320bfe8ffb282a0cc2145917591efb973 Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 6 Dec 2023 14:59:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=B8=AA=E5=8D=95?= =?UTF-8?q?=E7=8B=AC=E4=BF=AE=E6=94=B9=E7=BB=9F=E4=B8=80=E4=BF=A1=E7=94=A8?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=9A=84=E6=8E=A5=E5=8F=A3=E6=96=B9=E4=BE=BF?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E8=B0=83=E7=94=A8=EF=BC=8C=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E6=97=B6=E6=8C=87=E5=AE=9A=E8=BA=AB=E4=BB=BD?= =?UTF-8?q?=E4=B8=BA=E5=BE=8B=E5=B8=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/LawyerArchivesController.cs | 45 +++++++++++++++++-- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/24Hour/Controllers/Common/LawyerArchivesController.cs b/24Hour/Controllers/Common/LawyerArchivesController.cs index 37475d9..052b6e3 100644 --- a/24Hour/Controllers/Common/LawyerArchivesController.cs +++ b/24Hour/Controllers/Common/LawyerArchivesController.cs @@ -107,6 +107,43 @@ namespace _24Hour.Controllers.Common return res; } /// + /// 修改律师事务所统一信用代码 + /// + /// + /// + /// + [HttpGet("ChangeSccCodeByLawyer")] + public async Task ChangeSccCodeByLawyer(string lawyerid, string sccCode) + { + var lawyer = await _db.Queryable().Where(x => x.Id == lawyerid).FirstAsync(); + if (lawyer == null) + { + return Result.Error("数据不存在"); + } + else + { + if (lawyer.departmentUnifiedSocialCreditCode == sccCode) + { + return Result.Success("数据无需修改"); + } + else + { + lawyer.departmentUnifiedSocialCreditCode = sccCode; + + var num = await _db.Updateable(lawyer).UpdateColumns(x => x.departmentUnifiedSocialCreditCode).ExecuteCommandAsync(); + if (num>0) + { + return Result.Success("更新成功"); + } + else + { + return Result.Error("更新失败"); + } + } + + } + } + /// /// 修改内网律师信息 /// /// @@ -129,7 +166,6 @@ namespace _24Hour.Controllers.Common { result.IsSucceed = true; result.result = "修改成功"; - } } else @@ -216,6 +252,7 @@ namespace _24Hour.Controllers.Common { item.name = lawyerinfo.name; item.sex = lawyerinfo.sex; + item.identity = "律师"; item.phone = lawyerinfo.phone; item.departmentName = lawyerinfo.departmentName; item.cardId = lawyerinfo.cardId; @@ -2161,7 +2198,7 @@ namespace _24Hour.Controllers.Common } else { - if (item?.cardId.Length>=18) + if (item?.cardId.Length >= 18) { var sexdd = StringExtension.GetGenderByIdCard(item?.cardId); if (sexdd) @@ -2173,14 +2210,14 @@ namespace _24Hour.Controllers.Common editentity.sex = 1; } } - + editentity.unitCode = _userdata.unitCode; editentity.phone = item.phone; editentity.phone = item.phone; editentity.departmentName = item.departmentName; editentity.identitycardId = item.identitycardId; - editentity.identity = item.identitycardId; + editentity.identity = "律师"; editentity.usertype = 1; editentity.audit = 0; editentity.isdeactivate = 0;