20230313修改更新人员状态接口方法

This commit is contained in:
杨红卫 2023-03-13 16:50:22 +08:00
parent 30e0673db6
commit 065af2b532
7 changed files with 70 additions and 67 deletions

View File

@ -49,7 +49,7 @@
<HintPath>..\packages\Portable.BouncyCastle.1.8.9\lib\net40\BouncyCastle.Crypto.dll</HintPath>
</Reference>
<Reference Include="EmitMapper, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EmitMapper.1.0.0\lib\EmitMapper.dll</HintPath>
<HintPath>..\FineUIPro\Reference BLL\EmitMapper.dll</HintPath>
</Reference>
<Reference Include="FineUIPro, Version=3.1.0.2, Culture=neutral, PublicKeyToken=9cbe753c029f291a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@ -126,7 +126,7 @@
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="ThoughtWorks.QRCode">
<HintPath>..\..\..\..\五环施工平台\SGGL_CWCEC\SGGL\BLL\bin\Debug\ThoughtWorks.QRCode.dll</HintPath>
<HintPath>..\FineUIPro\Reference BLL\ThoughtWorks.QRCode.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>

View File

@ -69,10 +69,10 @@
<HintPath>FakesAssemblies\Apache.NMS.Fakes.dll</HintPath>
</Reference>
<Reference Include="Aspose.Words">
<HintPath>.\bin\Aspose.Words.dll</HintPath>
<HintPath>..\FineUIPro\Reference BLL\Aspose.Words.dll</HintPath>
</Reference>
<Reference Include="AxInterop.SYNCARDOCXLib">
<HintPath>.\bin\AxInterop.SYNCARDOCXLib.dll</HintPath>
<HintPath>..\FineUIPro\Reference BLL\AxInterop.SYNCARDOCXLib.dll</HintPath>
</Reference>
<Reference Include="BouncyCastle.Crypto, Version=1.8.9.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@ -98,7 +98,7 @@
<HintPath>..\..\..\..\ELECO\SGGL_ELECO\SGGL\packages\SharpZipLib.1.3.3\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath>
</Reference>
<Reference Include="Interop.WIA">
<HintPath>bin\Interop.WIA.dll</HintPath>
<HintPath>..\FineUIPro\Reference BLL\Interop.WIA.dll</HintPath>
<EmbedInteropTypes>False</EmbedInteropTypes>
</Reference>
<Reference Include="Microsoft.CSharp" />
@ -155,7 +155,7 @@
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Xml.Linq" />
<Reference Include="ThoughtWorks.QRCode">
<HintPath>\bin\ThoughtWorks.QRCode.dll</HintPath>
<HintPath>..\FineUIPro\Reference BLL\ThoughtWorks.QRCode.dll</HintPath>
</Reference>
<Reference Include="ThoughtWorks.QRCode.Fakes">
<HintPath>FakesAssemblies\ThoughtWorks.QRCode.Fakes.dll</HintPath>

View File

@ -155,11 +155,11 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-0.85.4.369" newVersion="0.85.4.369" />
<bindingRedirect oldVersion="0.0.0.0-1.3.3.11" newVersion="1.3.3.11" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />

View File

@ -35,7 +35,7 @@
<HintPath>..\FineUIPro\Reference BLL\AipSdk.dll</HintPath>
</Reference>
<Reference Include="AOP.Common">
<HintPath>..\..\..\..\五环施工平台\SGGL_CWCEC\SGGL\SgManager.AI\bin\Debug\AOP.Common.dll</HintPath>
<HintPath>..\FineUIPro\Reference BLL\AOP.Common.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
@ -44,6 +44,9 @@
<Reference Include="System.configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Reflection.DispatchProxy, Version=4.0.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Reflection.DispatchProxy.4.5.1\lib\net461\System.Reflection.DispatchProxy.dll</HintPath>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />

View File

@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AOP" version="1.0.0" targetFramework="net461" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net45" />
<package id="System.Reflection.DispatchProxy" version="4.5.1" targetFramework="net461" />
</packages>

View File

@ -372,54 +372,7 @@ namespace WebAPI.Controllers
}
#endregion
#region
/// <summary>
/// 更新人员数据交换时间
/// </summary>
/// <param name="projectCode"></param>
/// <param name="idCard"></param>
/// <param name="type"></param>
/// <returns></returns>
public Model.ResponeData getUpdatePersonExchangeTime(string projectCode, string idCard, string type)
{
var responeData = new Model.ResponeData();
try
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var getProject = db.Base_Project.FirstOrDefault(e => e.ProjectCode == projectCode);
if (getProject != null)
{
var getPerson = db.SitePerson_Person.FirstOrDefault(e => e.ProjectId == getProject.ProjectId && e.IdentityCard == idCard);
if (getPerson != null && !string.IsNullOrEmpty(type))
{
if (type == "1")
{
getPerson.ExchangeTime2 = DateTime.Now;
if (!getPerson.ExchangeTime.HasValue)
{
getPerson.ExchangeTime = DateTime.Now;
}
}
else
{
getPerson.ExchangeTime = DateTime.Now;
}
db.SubmitChanges();
}
}
}
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
ErrLogInfo.WriteLog(ex, "WX接口-更新人员数据交换时间", "PersonController.getUpdatePersonExchangeTime");
}
return responeData;
}
#endregion
#region
/// <summary>
/// 获取离场人员
@ -549,7 +502,7 @@ namespace WebAPI.Controllers
provinceCode = x.ProvinceCode,
positiveIdcardImage = db.AttachFile.First(t => (x.PersonId + "#1") == t.ToKeyId).ImageByte,
negativeIdcardImage = db.AttachFile.First(t => (x.PersonId + "#5") == t.ToKeyId).ImageByte,
headImage = x.HeadImage,
// headImage = x.HeadImage,
mobile = x.Telephone,
teamLeaderFlag = (T.GroupLeaderId == x.PersonId ? "Y" : "N"),
userType = ((w.PostType == "1" || w.PostType == "4") ? "LAB_USER_MANAGE" : "LAB_USER_BULIDER"),
@ -577,6 +530,52 @@ namespace WebAPI.Controllers
}
#endregion
#region
/// <summary>
/// 更新人员数据交换时间
/// </summary>
/// <param name="projectCode"></param>
/// <param name="idCard"></param>
/// <param name="type"></param>
/// <returns></returns>
public Model.ResponeData getUpdatePersonExchangeTime(string projectCode, string idCard, string type)
{
var responeData = new Model.ResponeData();
try
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var getProject = db.Base_Project.FirstOrDefault(e => e.ProjectCode == projectCode);
if (getProject != null)
{
var getPerson = db.SitePerson_Person.FirstOrDefault(e => e.ProjectId == getProject.ProjectId && e.IdentityCard == idCard);
if (getPerson != null && !string.IsNullOrEmpty(type))
{
getPerson.ExchangeTime2 = DateTime.Now;
if (type == "1")
{
if (!getPerson.ExchangeTime.HasValue)
{
getPerson.ExchangeTime = DateTime.Now;
}
}
else
{
getPerson.ExchangeTime = DateTime.Now;
}
db.SubmitChanges();
}
}
}
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
ErrLogInfo.WriteLog(ex, "WX接口-更新人员数据交换时间", "PersonController.getUpdatePersonExchangeTime");
}
return responeData;
}
#endregion
}
}

View File

@ -51,18 +51,21 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Apache.NMS.Fakes">
<HintPath>bin\Apache.NMS.Fakes.dll</HintPath>
<HintPath>..\FineUIPro\Reference BLL\Apache.NMS.Fakes.dll</HintPath>
</Reference>
<Reference Include="Aspose.Words">
<HintPath>bin\Aspose.Words.dll</HintPath>
<HintPath>..\FineUIPro\Reference BLL\Aspose.Words.dll</HintPath>
</Reference>
<Reference Include="FineUIPro, Version=6.3.0.0, Culture=neutral, PublicKeyToken=9cbe753c029f291a">
<HintPath>..\FineUIPro\FineUIPro.dll</HintPath>
</Reference>
<Reference Include="FineUIPro, Version=6.3.0.0, Culture=neutral, PublicKeyToken=9cbe753c029f291a" />
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.5.0.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>bin\Newtonsoft.Json.dll</HintPath>
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Pipelines.Sockets.Unofficial, Version=1.0.0.0, Culture=neutral, PublicKeyToken=42ea0a778e13fbe2, processorArchitecture=MSIL">
<HintPath>..\packages\Pipelines.Sockets.Unofficial.2.2.2\lib\net461\Pipelines.Sockets.Unofficial.dll</HintPath>
@ -172,10 +175,6 @@
<Private>True</Private>
<HintPath>..\packages\WebGrease.1.6.0\lib\WebGrease.dll</HintPath>
</Reference>
<Reference Include="Antlr3.Runtime">
<Private>True</Private>
<HintPath>..\packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform">