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> <HintPath>..\packages\Apache.NMS.ActiveMQ.1.7.2\lib\net40\Apache.NMS.ActiveMQ.dll</HintPath>
</Reference> </Reference>
<Reference Include="Aspose.Words"> <Reference Include="Aspose.Words">
<HintPath>bin\Debug\Aspose.Words.dll</HintPath> <HintPath>..\FineUIPro\Reference BLL\Aspose.Words.dll</HintPath>
</Reference> </Reference>
<Reference Include="BouncyCastle.Crypto, Version=1.8.9.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL"> <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> <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"> <Reference Include="EmitMapper, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EmitMapper.1.0.0\lib\EmitMapper.dll</HintPath> <HintPath>..\packages\EmitMapper.1.0.0\lib\EmitMapper.dll</HintPath>
</Reference> </Reference>
<Reference Include="FineUIPro, Version=6.3.0.0, Culture=neutral, PublicKeyToken=9cbe753c029f291a, processorArchitecture=MSIL"> <Reference Include="FineUIPro">
<SpecificVersion>False</SpecificVersion> <HintPath>..\..\..\SGGL_SeDin\SGGL\FineUIPro\FineUIPro.dll</HintPath>
<HintPath>bin\Debug\FineUIPro.dll</HintPath>
</Reference> </Reference>
<Reference Include="ICSharpCode.SharpZipLib, Version=1.3.3.11, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL"> <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> <HintPath>..\packages\SharpZipLib.1.3.3\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
@@ -116,7 +115,7 @@
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="ThoughtWorks.QRCode"> <Reference Include="ThoughtWorks.QRCode">
<HintPath>bin\Debug\ThoughtWorks.QRCode.dll</HintPath> <HintPath>..\FineUIPro\Reference BLL\ThoughtWorks.QRCode.dll</HintPath>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -634,9 +634,18 @@ namespace BLL
var getSitePerson = GetSitePersonByProjectIdPersonId(projectId, personId); var getSitePerson = GetSitePersonByProjectIdPersonId(projectId, personId);
if (getSitePerson != null && string.IsNullOrEmpty(getSitePerson.CardNo)) if (getSitePerson != null && string.IsNullOrEmpty(getSitePerson.CardNo))
{ {
cardNo = SQLHelper.RunProcNewId("SpGetNewNumber", "SitePerson_Person", "CardNo", getSitePerson.ProjectId, UnitService.GetUnitCodeByUnitId(getSitePerson.UnitId)); string prefix = UnitService.GetUnitCodeByUnitId(getSitePerson.UnitId);
getSitePerson.CardNo = cardNo; var getMaxCarNo = Funs.DB.SitePerson_Person.Where(x => x.ProjectId == projectId && x.CardNo.Contains(prefix)).Max(x => x.CardNo);
Funs.DB.SubmitChanges(); 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; return cardNo;
+1 -1
View File
@@ -936,7 +936,7 @@ namespace BLL
public static string JudgementDelete(Model.Person_Persons getData) public static string JudgementDelete(Model.Person_Persons getData)
{ {
string content = string.Empty; 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 += "已在【现场人员】中使用,不能删除!"; content += "已在【现场人员】中使用,不能删除!";
} }
@@ -141,7 +141,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
+ @" FROM View_SitePerson_Person AS viewPerSon " + @" FROM View_SitePerson_Person AS viewPerSon "
//+ @" LEFT JOIN EduTrain_TrainRecordDetail AS TrainRecordDetail ON viewPerSon.PersonId=TrainRecordDetail.PersonId " //+ @" LEFT JOIN EduTrain_TrainRecordDetail AS TrainRecordDetail ON viewPerSon.PersonId=TrainRecordDetail.PersonId "
//+ @" LEFT JOIN EduTrain_TrainRecord AS TrainRecord ON TrainRecord.TrainingId=TrainRecordDetail.TrainingId " //+ @" LEFT JOIN EduTrain_TrainRecord AS TrainRecord ON TrainRecord.TrainingId=TrainRecordDetail.TrainingId "
+ @" WHERE viewPerSon.ProjectId='" + this.ProjectId + "' AND viewPerSon.IsUsed='1' "; + @" WHERE viewPerSon.ProjectId='" + this.ProjectId + "' AND viewPerSon.States=" + Const.ProjectPersonStates_1;
List<SqlParameter> listStr = new List<SqlParameter>(); List<SqlParameter> listStr = new List<SqlParameter>();
if (BLL.EduTrain_TrainRecordDetailService.GetTrainRecordDetailByTrainingId(this.TrainingId).Count() > 0) if (BLL.EduTrain_TrainRecordDetailService.GetTrainRecordDetailByTrainingId(this.TrainingId).Count() > 0)
@@ -14,7 +14,7 @@
<Items> <Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="培训记录" EnableCollapse="true" <f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="培训记录" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="TrainingId" EnableColumnLines="true" DataIDField="TrainingId" AllowSorting="true" runat="server" BoxFlex="1" DataKeyNames="TrainingId" EnableColumnLines="true" DataIDField="TrainingId" AllowSorting="true"
SortField="TrainingCode" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true" ForceFit="true" SortField="TrainStartDate" SortDirection="DESC" OnSort="Grid1_Sort" AllowPaging="true" ForceFit="true"
IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick"
EnableTextSelection="True" EnableSummary="true" SummaryPosition="Flow"> EnableTextSelection="True" EnableSummary="true" SummaryPosition="Flow">
@@ -351,7 +351,7 @@ namespace FineUIPro.Web.HSSE.EduTrain
} }
else else
{ {
trainRecord.TrainingId = SQLHelper.GetNewID(typeof(Model.EduTrain_TrainRecord)); trainRecord.TrainingId = SQLHelper.GetNewID();
this.TrainingId = trainRecord.TrainingId; this.TrainingId = trainRecord.TrainingId;
trainRecord.CompileMan = this.CurrUser.PersonId; trainRecord.CompileMan = this.CurrUser.PersonId;
BLL.EduTrain_TrainRecordService.AddTraining(trainRecord); BLL.EduTrain_TrainRecordService.AddTraining(trainRecord);
+4 -4
View File
@@ -586,10 +586,10 @@ namespace FineUIPro.Web
} }
this.CurrUser.LastMenuType = type; this.CurrUser.LastMenuType = type;
//if (!string.IsNullOrEmpty(type)) if (!string.IsNullOrEmpty(type))
//{ {
// Person_PersonsService.UpdateLastUserInfo(this.CurrUser.PersonId, type, false, this.CurrUser.LoginProjectId); Person_PersonsService.UpdateLastUserInfo(this.CurrUser.PersonId, type, false, this.CurrUser.LoginProjectId);
//} }
InitTreeMenu(); InitTreeMenu();
} }