This commit is contained in:
2026-08-07 17:29:30 +08:00
parent 890db3efc8
commit 9a4a1ebfb8
9 changed files with 120 additions and 108 deletions
+6 -4
View File
@@ -384,12 +384,13 @@ namespace BLL.API
} }
return respone; return respone;
} }
public static Model.ResponeData baseTeamGroupList(string projectId, string unitId) public static Model.ResponeData baseTeamGroupList(string projectId, string unitId, string str)
{ {
Model.ResponeData respone = new ResponeData(); Model.ResponeData respone = new ResponeData();
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{ {
var q = (from x in db.Base_TeamGroup var q = (from x in db.Base_TeamGroup
where x.TeamGroupName.Contains(str)
orderby x.TeamGroupCode orderby x.TeamGroupCode
select x).ToList(); select x).ToList();
@@ -416,13 +417,14 @@ namespace BLL.API
return respone; return respone;
} }
public static Model.ResponeData unitStoreList() public static Model.ResponeData unitStoreList(string str)
{ {
Model.ResponeData respone = new ResponeData(); Model.ResponeData respone = new ResponeData();
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{ {
var q = from x in Funs.DB.Weld_UnitStore var q = from x in Funs.DB.Weld_UnitStore
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
where x.UnitStoreName.Contains(str)
orderby y.UnitName, x.UnitStoreCode orderby y.UnitName, x.UnitStoreCode
select new { x.UnitStoreId, UnitStoreName = x.UnitStoreName, y.UnitName, x.UnitId }; select new { x.UnitStoreId, UnitStoreName = x.UnitStoreName, y.UnitName, x.UnitId };
List<BaseTeamgroupItem> res = new List<BaseTeamgroupItem>(); List<BaseTeamgroupItem> res = new List<BaseTeamgroupItem>();
@@ -438,7 +440,7 @@ namespace BLL.API
} }
return respone; return respone;
} }
public static Model.ResponeData bsWelderList(string projectId) public static Model.ResponeData bsWelderList(string projectId, string str)
{ {
Model.ResponeData respone = new ResponeData(); Model.ResponeData respone = new ResponeData();
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
@@ -446,7 +448,7 @@ namespace BLL.API
var q = (from x in db.HJGL_BS_Welder var q = (from x in db.HJGL_BS_Welder
join join
y in db.Project_Welder on x.WED_ID equals y.WED_ID y in db.Project_Welder on x.WED_ID equals y.WED_ID
where y.ProjectId == projectId where y.ProjectId == projectId && (x.WED_Name.Contains(str) || x.WED_Code.Contains(str))
orderby x.WED_Code orderby x.WED_Code
select x).ToList(); select x).ToList();
+1 -1
View File
@@ -58,7 +58,7 @@ namespace BLL.API
else else
{ {
respone.code = 0; respone.code = 0;
respone.message = "身份证后6错误"; respone.message = "身份证后6错误";
} }
} }
else else
+2 -2
View File
@@ -43,14 +43,14 @@ namespace BLL
/// </summary> /// </summary>
/// <param name="projectId">施工Id</param> /// <param name="projectId">施工Id</param>
/// <returns></returns> /// <returns></returns>
public static List<Model.UnitInfoItem> getUnitByProjectId(string projectId) public static List<Model.UnitInfoItem> getUnitByProjectId(string projectId,string str)
{ {
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{ {
var getData = from x in db.Base_Unit var getData = from x in db.Base_Unit
join y in db.Project_Unit join y in db.Project_Unit
on x.UnitId equals y.UnitId on x.UnitId equals y.UnitId
where y.ProjectId == projectId where y.ProjectId == projectId && x.UnitName.Contains(str)
orderby x.UnitCode orderby x.UnitCode
select new Model.UnitInfoItem select new Model.UnitInfoItem
{ UnitId = x.UnitId, UnitCode = x.UnitCode, UnitName = x.UnitName }; { UnitId = x.UnitId, UnitCode = x.UnitCode, UnitName = x.UnitName };
+85 -80
View File
@@ -250,12 +250,17 @@ namespace BLL.API
planItem.IsNeedConfirm = usingPlan.IsNeedConfirm; planItem.IsNeedConfirm = usingPlan.IsNeedConfirm;
planItem.InPutMan = usingPlan.InPutMan; planItem.InPutMan = usingPlan.InPutMan;
planItem.IsSteelStru = usingPlan.IsSteelStru; planItem.IsSteelStru = usingPlan.IsSteelStru;
planItem.TeamGroupId = usingPlan.TeamGroupId; planItem.TeamGroupName = usingPlan.TeamGroupId;
var teamGroup = db.Base_TeamGroup.FirstOrDefault(x => x.TeamGroupName == usingPlan.TeamGroupId);
if (teamGroup != null)
{
planItem.TeamGroupId = teamGroup.TeamGroupId;
}
planItem.STE_ID = usingPlan.STE_ID; planItem.STE_ID = usingPlan.STE_ID;
planItem.IsFinish = usingPlan.IsFinish; planItem.IsFinish = usingPlan.IsFinish;
planItem.STE_Name = usingPlan.STE_Name; planItem.STE_Name = usingPlan.STE_Name;
planItem.UnitStoreId = BLL.UnitStoreService.GetUnitStoreNameById(usingPlan.UnitStoreId); planItem.UnitStoreId = usingPlan.UnitStoreId;
planItem.UnitStoreName = BLL.UnitStoreService.GetUnitStoreNameById(usingPlan.UnitStoreId);
if (!string.IsNullOrEmpty(planItem.ProjectId)) if (!string.IsNullOrEmpty(planItem.ProjectId))
{ {
var project = db.Base_Project.Where(x => x.ProjectId == planItem.ProjectId).FirstOrDefault(); var project = db.Base_Project.Where(x => x.ProjectId == planItem.ProjectId).FirstOrDefault();
@@ -301,10 +306,6 @@ namespace BLL.API
{ {
planItem.InPutManName = db.Sys_User.Where(x => x.UserId == planItem.InPutMan).Select(x => x.UserName).FirstOrDefault(); planItem.InPutManName = db.Sys_User.Where(x => x.UserId == planItem.InPutMan).Select(x => x.UserName).FirstOrDefault();
} }
if (!string.IsNullOrEmpty(planItem.TeamGroupId))
{
planItem.TeamGroupName = db.Base_TeamGroup.Where(x => x.TeamGroupId == planItem.TeamGroupId).Select(x => x.TeamGroupName).FirstOrDefault();
}
respone.data = planItem; respone.data = planItem;
@@ -318,92 +319,96 @@ namespace BLL.API
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{ {
Weld_UsingPlan_Temp usingPlan = (from x in db.Weld_UsingPlan_Temp where x.InPutMan == userId select x).FirstOrDefault(); Weld_UsingPlan_Temp usingPlan = (from x in db.Weld_UsingPlan_Temp where x.InPutMan == userId select x).FirstOrDefault();
UsingPlanItem planItem = new UsingPlanItem(); UsingPlanItem planItem = new UsingPlanItem();
planItem.UsingPlanId = usingPlan.UsingPlanTempId; if (usingPlan != null)
planItem.WeldId = usingPlan.WeldId;
planItem.ProjectId = usingPlan.ProjectId;
planItem.UsePosition = usingPlan.UsePosition;
planItem.Amount = usingPlan.Amount;
planItem.UsingManOne = usingPlan.UsingManOne;
planItem.UsingManTwo = usingPlan.UsingManTwo;
if (usingPlan.InPutDate != null)
{ {
planItem.InPutDate = string.Format("{0:yyyy-MM-dd}", usingPlan.InPutDate); planItem.UsingPlanId = usingPlan.UsingPlanTempId;
} planItem.WeldId = usingPlan.WeldId;
if (usingPlan.CancelDate != null) planItem.ProjectId = usingPlan.ProjectId;
{ planItem.UsePosition = usingPlan.UsePosition;
planItem.CancelDate = string.Format("{0:yyyy-MM-dd}", usingPlan.CancelDate); planItem.Amount = usingPlan.Amount;
} planItem.UsingManOne = usingPlan.UsingManOne;
planItem.IsCancel = usingPlan.IsCancel; planItem.UsingManTwo = usingPlan.UsingManTwo;
planItem.FinishMan = usingPlan.FinishMan; if (usingPlan.InPutDate != null)
planItem.OrderTime = usingPlan.OrderTime;
if (usingPlan.OrderDate != null)
{
planItem.OrderDate = string.Format("{0:yyyy-MM-dd}", usingPlan.OrderDate);
}
planItem.CancelResult = usingPlan.CancelResult;
planItem.IsSubmit = usingPlan.IsSubmit;
planItem.UsingUnit = usingPlan.UsingUnit;
planItem.IsNeedConfirm = usingPlan.IsNeedConfirm;
planItem.InPutMan = usingPlan.InPutMan;
planItem.IsSteelStru = usingPlan.IsSteelStru;
planItem.TeamGroupId = usingPlan.TeamGroupId;
planItem.STE_ID = usingPlan.STE_ID;
planItem.IsFinish = usingPlan.IsFinish;
planItem.STE_Name = usingPlan.STE_Name;
planItem.UnitStoreId = BLL.UnitStoreService.GetUnitStoreNameById(usingPlan.UnitStoreId);
if (!string.IsNullOrEmpty(planItem.ProjectId))
{
var project = db.Base_Project.Where(x => x.ProjectId == planItem.ProjectId).FirstOrDefault();
if (project != null)
{ {
planItem.ProjectName = project.ProjectName; planItem.InPutDate = string.Format("{0:yyyy-MM-dd}", usingPlan.InPutDate);
planItem.ProjectCode = project.ProjectCode;
} }
} if (usingPlan.CancelDate != null)
if (!string.IsNullOrEmpty(planItem.WeldId))
{
var weldInfo = db.Weld_WeldInfo.Where(x => x.WeldId == planItem.WeldId).FirstOrDefault();
if (weldInfo != null)
{ {
planItem.WeldName = weldInfo.WeldName; planItem.CancelDate = string.Format("{0:yyyy-MM-dd}", usingPlan.CancelDate);
planItem.WeldSpec = weldInfo.WeldSpec;
planItem.WeldCode = weldInfo.WeldCode;
} }
if (weldInfo != null && !string.IsNullOrEmpty(weldInfo.WeldTypeId)) planItem.IsCancel = usingPlan.IsCancel;
planItem.FinishMan = usingPlan.FinishMan;
planItem.OrderTime = usingPlan.OrderTime;
if (usingPlan.OrderDate != null)
{ {
var weldType = db.Weld_WeldType.Where(x => x.WeldTypeId == weldInfo.WeldTypeId).FirstOrDefault(); planItem.OrderDate = string.Format("{0:yyyy-MM-dd}", usingPlan.OrderDate);
}
planItem.CancelResult = usingPlan.CancelResult;
planItem.IsSubmit = usingPlan.IsSubmit;
planItem.UsingUnit = usingPlan.UsingUnit;
planItem.IsNeedConfirm = usingPlan.IsNeedConfirm;
planItem.InPutMan = usingPlan.InPutMan;
planItem.IsSteelStru = usingPlan.IsSteelStru;
planItem.TeamGroupName = usingPlan.TeamGroupId;
var teamGroup = db.Base_TeamGroup.FirstOrDefault(x => x.TeamGroupName == usingPlan.TeamGroupId);
if (teamGroup != null)
{
planItem.TeamGroupId = teamGroup.TeamGroupId;
}
planItem.STE_ID = usingPlan.STE_ID;
planItem.IsFinish = usingPlan.IsFinish;
planItem.STE_Name = usingPlan.STE_Name;
planItem.UnitStoreId = usingPlan.UnitStoreId;
planItem.UnitStoreName = BLL.UnitStoreService.GetUnitStoreNameById(usingPlan.UnitStoreId);
if (weldType != null) if (!string.IsNullOrEmpty(planItem.ProjectId))
{
var project = db.Base_Project.Where(x => x.ProjectId == planItem.ProjectId).FirstOrDefault();
if (project != null)
{ {
planItem.ProjectName = project.ProjectName;
planItem.ProjectCode = project.ProjectCode;
} }
} }
} if (!string.IsNullOrEmpty(planItem.WeldId))
{
var weldInfo = db.Weld_WeldInfo.Where(x => x.WeldId == planItem.WeldId).FirstOrDefault();
if (weldInfo != null)
{
planItem.WeldName = weldInfo.WeldName;
planItem.WeldSpec = weldInfo.WeldSpec;
planItem.WeldCode = weldInfo.WeldCode;
}
if (weldInfo != null && !string.IsNullOrEmpty(weldInfo.WeldTypeId))
{
var weldType = db.Weld_WeldType.Where(x => x.WeldTypeId == weldInfo.WeldTypeId).FirstOrDefault();
if (!string.IsNullOrEmpty(planItem.UsingManOne)) if (weldType != null)
{ {
planItem.UsingManOneName = db.HJGL_BS_Welder.Where(x => x.WED_ID == planItem.UsingManOne).Select(x => x.WED_Name).FirstOrDefault();
}
if (!string.IsNullOrEmpty(planItem.UsingManTwo))
{
planItem.UsingManTwoName = db.HJGL_BS_Welder.Where(x => x.WED_ID == planItem.UsingManTwo).Select(x => x.WED_Name).FirstOrDefault();
}
if (!string.IsNullOrEmpty(planItem.UsingUnit))
{
planItem.UsingUnitName = db.Base_Unit.Where(x => x.UnitId == planItem.UsingUnit).Select(x => x.UnitName).FirstOrDefault();
}
if (!string.IsNullOrEmpty(planItem.InPutMan))
{
planItem.InPutManName = db.Sys_User.Where(x => x.UserId == planItem.InPutMan).Select(x => x.UserName).FirstOrDefault();
}
if (!string.IsNullOrEmpty(planItem.TeamGroupId))
{
planItem.TeamGroupName = db.Base_TeamGroup.Where(x => x.TeamGroupId == planItem.TeamGroupId).Select(x => x.TeamGroupName).FirstOrDefault();
}
}
}
}
if (!string.IsNullOrEmpty(planItem.UsingManOne))
{
planItem.UsingManOneName = db.HJGL_BS_Welder.Where(x => x.WED_ID == planItem.UsingManOne).Select(x => x.WED_Name).FirstOrDefault();
}
if (!string.IsNullOrEmpty(planItem.UsingManTwo))
{
planItem.UsingManTwoName = db.HJGL_BS_Welder.Where(x => x.WED_ID == planItem.UsingManTwo).Select(x => x.WED_Name).FirstOrDefault();
}
if (!string.IsNullOrEmpty(planItem.UsingUnit))
{
planItem.UsingUnitName = db.Base_Unit.Where(x => x.UnitId == planItem.UsingUnit).Select(x => x.UnitName).FirstOrDefault();
}
if (!string.IsNullOrEmpty(planItem.InPutMan))
{
planItem.InPutManName = db.Sys_User.Where(x => x.UserId == planItem.InPutMan).Select(x => x.UserName).FirstOrDefault();
}
}
respone.data = planItem; respone.data = planItem;
} }
+1
View File
@@ -146,5 +146,6 @@ namespace Model.APIItem
public string WeldSpec { get; set; } public string WeldSpec { get; set; }
public string WeldCode { get; set; } public string WeldCode { get; set; }
public string UnitStoreId { get; set; } public string UnitStoreId { get; set; }
public string UnitStoreName { get; set; }
} }
} }
+9 -9
View File
@@ -114,13 +114,13 @@ namespace WebAPI.Controllers
} }
[HttpGet] [HttpGet]
public Model.ResponeData baseTeamGroupList(string projectId, string unitId) public Model.ResponeData baseTeamGroupList(string projectId, string unitId, string str)
{ {
Model.ResponeData respone = new ResponeData(); Model.ResponeData respone = new ResponeData();
try try
{ {
string s = !string.IsNullOrEmpty(str) ? str : string.Empty;
return APIBaseServices.baseTeamGroupList(projectId, unitId); return APIBaseServices.baseTeamGroupList(projectId, unitId, s);
} }
catch (Exception e) catch (Exception e)
{ {
@@ -132,13 +132,13 @@ namespace WebAPI.Controllers
} }
[HttpGet] [HttpGet]
public Model.ResponeData bsWelderList(string projectId) public Model.ResponeData bsWelderList(string projectId,string str)
{ {
Model.ResponeData respone = new ResponeData(); Model.ResponeData respone = new ResponeData();
try try
{ {
string s = !string.IsNullOrEmpty(str) ? str : string.Empty;
return APIBaseServices.bsWelderList(projectId); return APIBaseServices.bsWelderList(projectId,s);
} }
catch (Exception e) catch (Exception e)
{ {
@@ -150,13 +150,13 @@ namespace WebAPI.Controllers
} }
[HttpGet] [HttpGet]
public Model.ResponeData unitStoreList() public Model.ResponeData unitStoreList(string str)
{ {
Model.ResponeData respone = new ResponeData(); Model.ResponeData respone = new ResponeData();
try try
{ {
string s = !string.IsNullOrEmpty(str) ? str : string.Empty;
return APIBaseServices.unitStoreList(); return APIBaseServices.unitStoreList(s);
} }
catch (Exception e) catch (Exception e)
{ {
@@ -41,12 +41,13 @@ namespace WebAPI.Controllers
/// <param name="projectId">施工Id</param> /// <param name="projectId">施工Id</param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
public Model.ResponeData getUnitByProjectId(string projectId) public Model.ResponeData getUnitByProjectId(string projectId,string str)
{ {
var responeData = new Model.ResponeData(); var responeData = new Model.ResponeData();
try try
{ {
responeData.data = APIUnitInfoService.getUnitByProjectId(projectId); string s = !string.IsNullOrEmpty(str) ? str : string.Empty;
responeData.data = APIUnitInfoService.getUnitByProjectId(projectId,s);
} }
catch (Exception ex) catch (Exception ex)
{ {
+1 -1
View File
@@ -200,7 +200,7 @@ namespace WebAPI.Controllers
newTemp.InPutDate = DateTime.Now; newTemp.InPutDate = DateTime.Now;
newTemp.OrderDate = DateTime.Now; newTemp.OrderDate = DateTime.Now;
newTemp.OrderTime = usingPlan.OrderTime; newTemp.OrderTime = usingPlan.OrderTime;
newTemp.TeamGroupId = usingPlan.TeamGroupId; newTemp.TeamGroupId = usingPlan.TeamGroupName;
newTemp.CancelDate = BLL.Funs.GetNewDateTime(usingPlan.CancelDate); newTemp.CancelDate = BLL.Funs.GetNewDateTime(usingPlan.CancelDate);
newTemp.IsCancel = usingPlan.IsCancel; newTemp.IsCancel = usingPlan.IsCancel;
newTemp.CancelResult = usingPlan.CancelResult; newTemp.CancelResult = usingPlan.CancelResult;
@@ -85,13 +85,13 @@
<publishTime>04/12/2024 09:54:20</publishTime> <publishTime>04/12/2024 09:54:20</publishTime>
</File> </File>
<File Include="bin/BLL.dll"> <File Include="bin/BLL.dll">
<publishTime>08/07/2026 10:46:18</publishTime> <publishTime>08/07/2026 17:27:28</publishTime>
</File> </File>
<File Include="bin/BLL.dll.config"> <File Include="bin/BLL.dll.config">
<publishTime>12/31/2025 16:32:37</publishTime> <publishTime>12/31/2025 16:32:37</publishTime>
</File> </File>
<File Include="bin/BLL.pdb"> <File Include="bin/BLL.pdb">
<publishTime>08/07/2026 10:46:18</publishTime> <publishTime>08/07/2026 17:27:28</publishTime>
</File> </File>
<File Include="bin/BouncyCastle.Crypto.dll"> <File Include="bin/BouncyCastle.Crypto.dll">
<publishTime>12/17/2020 21:32:28</publishTime> <publishTime>12/17/2020 21:32:28</publishTime>
@@ -121,10 +121,10 @@
<publishTime>07/25/2012 11:48:56</publishTime> <publishTime>07/25/2012 11:48:56</publishTime>
</File> </File>
<File Include="bin/Model.dll"> <File Include="bin/Model.dll">
<publishTime>08/07/2026 10:46:10</publishTime> <publishTime>08/07/2026 17:27:27</publishTime>
</File> </File>
<File Include="bin/Model.pdb"> <File Include="bin/Model.pdb">
<publishTime>08/07/2026 10:46:10</publishTime> <publishTime>08/07/2026 17:27:27</publishTime>
</File> </File>
<File Include="bin/Newtonsoft.Json.dll"> <File Include="bin/Newtonsoft.Json.dll">
<publishTime>11/28/2018 02:07:34</publishTime> <publishTime>11/28/2018 02:07:34</publishTime>
@@ -295,13 +295,13 @@
<publishTime>05/24/2018 13:38:24</publishTime> <publishTime>05/24/2018 13:38:24</publishTime>
</File> </File>
<File Include="bin/SgManager.AI.dll"> <File Include="bin/SgManager.AI.dll">
<publishTime>08/07/2026 10:46:25</publishTime> <publishTime>08/07/2026 17:27:34</publishTime>
</File> </File>
<File Include="bin/SgManager.AI.dll.config"> <File Include="bin/SgManager.AI.dll.config">
<publishTime>07/28/2025 11:00:31</publishTime> <publishTime>07/28/2025 11:00:31</publishTime>
</File> </File>
<File Include="bin/SgManager.AI.pdb"> <File Include="bin/SgManager.AI.pdb">
<publishTime>08/07/2026 10:46:25</publishTime> <publishTime>08/07/2026 17:27:34</publishTime>
</File> </File>
<File Include="bin/System.Net.Http.Formatting.dll"> <File Include="bin/System.Net.Http.Formatting.dll">
<publishTime>02/01/2018 12:17:18</publishTime> <publishTime>02/01/2018 12:17:18</publishTime>
@@ -333,11 +333,14 @@
<File Include="bin/System.Web.WebPages.Razor.dll"> <File Include="bin/System.Web.WebPages.Razor.dll">
<publishTime>02/01/2018 12:20:56</publishTime> <publishTime>02/01/2018 12:20:56</publishTime>
</File> </File>
<File Include="bin/ThoughtWorks.QRCode.dll">
<publishTime>06/29/2015 16:49:52</publishTime>
</File>
<File Include="bin/WebAPI.dll"> <File Include="bin/WebAPI.dll">
<publishTime>08/07/2026 10:46:32</publishTime> <publishTime>08/07/2026 17:27:36</publishTime>
</File> </File>
<File Include="bin/WebAPI.pdb"> <File Include="bin/WebAPI.pdb">
<publishTime>08/07/2026 10:46:32</publishTime> <publishTime>08/07/2026 17:27:36</publishTime>
</File> </File>
<File Include="bin/WebGrease.dll"> <File Include="bin/WebGrease.dll">
<publishTime>01/23/2014 13:57:34</publishTime> <publishTime>01/23/2014 13:57:34</publishTime>
@@ -463,7 +466,7 @@
<publishTime>07/03/2024 11:01:07</publishTime> <publishTime>07/03/2024 11:01:07</publishTime>
</File> </File>
<File Include="Web.config"> <File Include="Web.config">
<publishTime>08/07/2026 10:46:51</publishTime> <publishTime>08/07/2026 17:27:41</publishTime>
</File> </File>
</ItemGroup> </ItemGroup>
</Project> </Project>