This commit is contained in:
2026-07-23 15:34:34 +08:00
7 changed files with 72 additions and 19 deletions
+47 -11
View File
@@ -109,7 +109,7 @@ namespace BLL.API
UsingPlanItem planItem = new UsingPlanItem();
planItem.UsingPlanId = x.UsingPlanId;
planItem.WeldId = x.WeldId;
planItem.UnitStoreId= BLL.UnitStoreService.GetUnitStoreNameById(x.UnitStoreId);
planItem.UnitStoreId = BLL.UnitStoreService.GetUnitStoreNameById(x.UnitStoreId);
planItem.ProjectId = x.ProjectId;
planItem.UsePosition = x.UsePosition;
planItem.Amount = x.Amount;
@@ -412,16 +412,16 @@ namespace BLL.API
Model.ResponeData respone = new ResponeData();
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
DateTime dateTime =DateTime.Parse("1753-01-02");
DateTime dateTime = DateTime.Parse("1753-01-02");
if (!string.IsNullOrEmpty(date) && date != "null")
{
dateTime = DateTime.Parse(date);
dateTime = DateTime.Parse(date);
}
var q = (from pw in db.Project_Welder
join w in db.HJGL_BS_Welder on pw.WED_ID equals w.WED_ID
where w.PhotoUrl !=null && pw.ExchangeTime > dateTime
select w).Distinct();
join w in db.HJGL_BS_Welder on pw.WED_ID equals w.WED_ID
where w.PhotoUrl != null && pw.ExchangeTime > dateTime
select w).Distinct();
List<WelderItem> res = new List<WelderItem>();
foreach (var p in q)
{
@@ -466,9 +466,9 @@ namespace BLL.API
item.PhotoUrl = p.PhotoUrl;
item.IsFaceTrain = p.IsFaceTrain;
item.ExchangeTime = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss");
res.Add(item);
}
respone.data = res;
res.Add(item);
}
respone.data = res;
}
return respone;
}
@@ -491,7 +491,7 @@ namespace BLL.API
{
var getPerson = db.Project_Welder.FirstOrDefault(e => e.ProjectId == projectId && e.WED_ID == wedId);
getPerson.ExchangeTime = DateTime.Now;
db.SubmitChanges();
db.SubmitChanges();
}
}
catch (Exception ex)
@@ -504,5 +504,41 @@ namespace BLL.API
}
#endregion
#region id获取焊工信息列表
/// <summary>
/// 根据项目id获取焊工信息列表
/// </summary>
/// <param name="personId">人员ID</param>
/// <param name="type">交换类型</param>
/// <returns></returns>
public static Model.ResponeData getProjectWelderList(string projectId, int page, int pageSize)
{
var responeData = new Model.ResponeData();
try
{
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var res = from x in db.Project_Welder
join y in db.HJGL_BS_Welder on x.WED_ID equals y.WED_ID
where x.ProjectId == projectId
select new
{
WED_Code = y.WED_Code,
WED_Name = y.WED_Name,
};
responeData.data = res.Skip(page * pageSize).Take(pageSize);
}
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
ErrLogInfo.WriteLog(ex, "根据项目id获取焊工信息列表", "WeldController.getProjectWelderList");
}
return responeData;
}
#endregion
}
}
+1 -1
View File
@@ -14,7 +14,7 @@ namespace BLL.Common
{
public class OpenAIhelper
{
private const string ApiKey = "sk-a5014a22a49049d1b2179a6c0d8eec1c";
private const string ApiKey = "sk-8bfd57eaf2c7438388ec584ac86dfb34";
private const string AIURL = "https://api.deepseek.com/chat/completions";
public static string ChatCompletion(string content)
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<UseIISExpress>true</UseIISExpress>
+1 -1
View File
@@ -11,7 +11,7 @@
<FineUIPro DebugMode="false" Theme="Cupertino"/>
<appSettings>
<!--连接字符串-->
<add key="ConnectionString" value="Server=.\SQL2022;Database=HJGLDB_DS;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Max Pool Size = 1000;Connect Timeout=1200"/>
<add key="ConnectionString" value="Server=.\MSSQLSERVER01;Database=HJGLDB_DS;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Max Pool Size = 1000;Connect Timeout=1200"/>
<!--系统名称-->
<add key="SystemName" value="诺必达焊接管理系统"/>
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
+20 -3
View File
@@ -195,15 +195,32 @@ namespace WebAPI.Controllers
}
return respone;
}
[HttpGet]
public Model.ResponeData getUpdateWelderExchangeTime(string wedId,string projectId)
public Model.ResponeData getUpdateWelderExchangeTime(string wedId, string projectId)
{
Model.ResponeData respone = new ResponeData();
try
{
return APIWeldServices.getUpdateWelderExchangeTime(wedId,projectId);
return APIWeldServices.getUpdateWelderExchangeTime(wedId, projectId);
}
catch (Exception e)
{
respone.code = 0;
respone.message = e.Message;
}
return respone;
}
[HttpGet]
public Model.ResponeData getProjectWelderList(string projectId, int page, int pageSize)
{
Model.ResponeData respone = new ResponeData();
try
{
return APIWeldServices.getProjectWelderList(projectId, page, pageSize);
}
catch (Exception e)
{
+1 -1
View File
@@ -48,7 +48,7 @@
<Reference Include="Microsoft.CSharp" />
<Reference Include="Newtonsoft.Json, Version=13.0.1.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\五环\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\bin\Newtonsoft.Json.dll</HintPath>
<HintPath>..\..\..\..\赛鼎\SGGL_SeDin_New\SGGL\WebAPI\bin\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
+1 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>