20220908 人员培训记录保存错误修改。

This commit is contained in:
2022-09-08 14:15:28 +08:00
parent 2b07be5792
commit f38675c06a
7 changed files with 24 additions and 16 deletions
+4 -5
View File
@@ -46,7 +46,7 @@
<HintPath>..\packages\Apache.NMS.ActiveMQ.1.7.2\lib\net40\Apache.NMS.ActiveMQ.dll</HintPath>
</Reference>
<Reference Include="Aspose.Words">
<HintPath>bin\Debug\Aspose.Words.dll</HintPath>
<HintPath>..\FineUIPro\Reference BLL\Aspose.Words.dll</HintPath>
</Reference>
<Reference Include="BouncyCastle.Crypto, Version=1.8.9.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
<HintPath>..\packages\Portable.BouncyCastle.1.8.9\lib\net40\BouncyCastle.Crypto.dll</HintPath>
@@ -54,9 +54,8 @@
<Reference Include="EmitMapper, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EmitMapper.1.0.0\lib\EmitMapper.dll</HintPath>
</Reference>
<Reference Include="FineUIPro, Version=6.3.0.0, Culture=neutral, PublicKeyToken=9cbe753c029f291a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>bin\Debug\FineUIPro.dll</HintPath>
<Reference Include="FineUIPro">
<HintPath>..\..\..\SGGL_SeDin\SGGL\FineUIPro\FineUIPro.dll</HintPath>
</Reference>
<Reference Include="ICSharpCode.SharpZipLib, Version=1.3.3.11, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
<HintPath>..\packages\SharpZipLib.1.3.3\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
@@ -116,7 +115,7 @@
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="ThoughtWorks.QRCode">
<HintPath>bin\Debug\ThoughtWorks.QRCode.dll</HintPath>
<HintPath>..\FineUIPro\Reference BLL\ThoughtWorks.QRCode.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -634,9 +634,18 @@ namespace BLL
var getSitePerson = GetSitePersonByProjectIdPersonId(projectId, personId);
if (getSitePerson != null && string.IsNullOrEmpty(getSitePerson.CardNo))
{
cardNo = SQLHelper.RunProcNewId("SpGetNewNumber", "SitePerson_Person", "CardNo", getSitePerson.ProjectId, UnitService.GetUnitCodeByUnitId(getSitePerson.UnitId));
getSitePerson.CardNo = cardNo;
Funs.DB.SubmitChanges();
string prefix = UnitService.GetUnitCodeByUnitId(getSitePerson.UnitId);
var getMaxCarNo = Funs.DB.SitePerson_Person.Where(x => x.ProjectId == projectId && x.CardNo.Contains(prefix)).Max(x => x.CardNo);
if (!string.IsNullOrEmpty(getMaxCarNo) && getMaxCarNo.Length > 5)
{
var getInt = Funs.GetNewInt(Funs.GetSubStr(getMaxCarNo, 5));
if (getInt.HasValue)
{
cardNo = SQLHelper.RunProcNewId("SpGetNewNumber", "SitePerson_Person", "CardNo", getSitePerson.ProjectId, prefix);
getSitePerson.CardNo = cardNo;
Funs.DB.SubmitChanges();
}
}
}
return cardNo;
+1 -1
View File
@@ -936,7 +936,7 @@ namespace BLL
public static string JudgementDelete(Model.Person_Persons getData)
{
string content = string.Empty;
if (Funs.DB.SitePerson_Person.FirstOrDefault(x => x.IdentityCard == getData.IdentityCard) != null)
if (Funs.DB.SitePerson_Person.FirstOrDefault(x => x.PersonId == getData.PersonId) != null)
{
content += "已在【现场人员】中使用,不能删除!";
}