diff --git a/HJGL_DS/BLL/API/APIBaseServices.cs b/HJGL_DS/BLL/API/APIBaseServices.cs index 10cbb17..dfbd69a 100644 --- a/HJGL_DS/BLL/API/APIBaseServices.cs +++ b/HJGL_DS/BLL/API/APIBaseServices.cs @@ -384,12 +384,13 @@ namespace BLL.API } 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(); using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { var q = (from x in db.Base_TeamGroup + where x.TeamGroupName.Contains(str) orderby x.TeamGroupCode select x).ToList(); @@ -416,13 +417,14 @@ namespace BLL.API return respone; } - public static Model.ResponeData unitStoreList() + public static Model.ResponeData unitStoreList(string str) { Model.ResponeData respone = new ResponeData(); using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { var q = from x in Funs.DB.Weld_UnitStore join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId + where x.UnitStoreName.Contains(str) orderby y.UnitName, x.UnitStoreCode select new { x.UnitStoreId, UnitStoreName = x.UnitStoreName, y.UnitName, x.UnitId }; List res = new List(); @@ -438,7 +440,7 @@ namespace BLL.API } return respone; } - public static Model.ResponeData bsWelderList(string projectId) + public static Model.ResponeData bsWelderList(string projectId, string str) { Model.ResponeData respone = new ResponeData(); 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 join 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 select x).ToList(); diff --git a/HJGL_DS/BLL/API/APILoginServices.cs b/HJGL_DS/BLL/API/APILoginServices.cs index 9af50a8..cb8d017 100644 --- a/HJGL_DS/BLL/API/APILoginServices.cs +++ b/HJGL_DS/BLL/API/APILoginServices.cs @@ -58,7 +58,7 @@ namespace BLL.API else { respone.code = 0; - respone.message = "身份证后6未错误"; + respone.message = "身份证后6位错误"; } } else diff --git a/HJGL_DS/BLL/API/APIUnitInfoService.cs b/HJGL_DS/BLL/API/APIUnitInfoService.cs index 591b70a..ebf5e59 100644 --- a/HJGL_DS/BLL/API/APIUnitInfoService.cs +++ b/HJGL_DS/BLL/API/APIUnitInfoService.cs @@ -43,14 +43,14 @@ namespace BLL /// /// 施工Id /// - public static List getUnitByProjectId(string projectId) + public static List getUnitByProjectId(string projectId,string str) { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { var getData = from x in db.Base_Unit join y in db.Project_Unit on x.UnitId equals y.UnitId - where y.ProjectId == projectId + where y.ProjectId == projectId && x.UnitName.Contains(str) orderby x.UnitCode select new Model.UnitInfoItem { UnitId = x.UnitId, UnitCode = x.UnitCode, UnitName = x.UnitName }; diff --git a/HJGL_DS/BLL/API/APIWeldServices.cs b/HJGL_DS/BLL/API/APIWeldServices.cs index 35f1ed6..517035e 100644 --- a/HJGL_DS/BLL/API/APIWeldServices.cs +++ b/HJGL_DS/BLL/API/APIWeldServices.cs @@ -250,12 +250,17 @@ namespace BLL.API planItem.IsNeedConfirm = usingPlan.IsNeedConfirm; planItem.InPutMan = usingPlan.InPutMan; 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.IsFinish = usingPlan.IsFinish; 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)) { 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(); } - if (!string.IsNullOrEmpty(planItem.TeamGroupId)) - { - planItem.TeamGroupName = db.Base_TeamGroup.Where(x => x.TeamGroupId == planItem.TeamGroupId).Select(x => x.TeamGroupName).FirstOrDefault(); - } respone.data = planItem; @@ -318,92 +319,96 @@ namespace BLL.API 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(); - UsingPlanItem planItem = new UsingPlanItem(); - planItem.UsingPlanId = usingPlan.UsingPlanTempId; - 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) + if (usingPlan != null) { - planItem.InPutDate = string.Format("{0:yyyy-MM-dd}", usingPlan.InPutDate); - } - if (usingPlan.CancelDate != null) - { - planItem.CancelDate = string.Format("{0:yyyy-MM-dd}", usingPlan.CancelDate); - } - planItem.IsCancel = usingPlan.IsCancel; - planItem.FinishMan = usingPlan.FinishMan; - 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.UsingPlanId = usingPlan.UsingPlanTempId; + 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.ProjectName = project.ProjectName; - planItem.ProjectCode = project.ProjectCode; + planItem.InPutDate = string.Format("{0:yyyy-MM-dd}", usingPlan.InPutDate); } - } - if (!string.IsNullOrEmpty(planItem.WeldId)) - { - var weldInfo = db.Weld_WeldInfo.Where(x => x.WeldId == planItem.WeldId).FirstOrDefault(); - if (weldInfo != null) + if (usingPlan.CancelDate != null) { - planItem.WeldName = weldInfo.WeldName; - planItem.WeldSpec = weldInfo.WeldSpec; - planItem.WeldCode = weldInfo.WeldCode; + planItem.CancelDate = string.Format("{0:yyyy-MM-dd}", usingPlan.CancelDate); } - 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)) - { - 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 (weldType != null) + { + } + } + } + + 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; } diff --git a/HJGL_DS/Model/APIItem/UsingPlanItem.cs b/HJGL_DS/Model/APIItem/UsingPlanItem.cs index c2eddcc..310d757 100644 --- a/HJGL_DS/Model/APIItem/UsingPlanItem.cs +++ b/HJGL_DS/Model/APIItem/UsingPlanItem.cs @@ -146,5 +146,6 @@ namespace Model.APIItem public string WeldSpec { get; set; } public string WeldCode { get; set; } public string UnitStoreId { get; set; } + public string UnitStoreName { get; set; } } } diff --git a/HJGL_DS/WebAPI/Controllers/BaseController.cs b/HJGL_DS/WebAPI/Controllers/BaseController.cs index 558f254..e9e64ef 100644 --- a/HJGL_DS/WebAPI/Controllers/BaseController.cs +++ b/HJGL_DS/WebAPI/Controllers/BaseController.cs @@ -114,13 +114,13 @@ namespace WebAPI.Controllers } [HttpGet] - public Model.ResponeData baseTeamGroupList(string projectId, string unitId) + public Model.ResponeData baseTeamGroupList(string projectId, string unitId, string str) { Model.ResponeData respone = new ResponeData(); try { - - return APIBaseServices.baseTeamGroupList(projectId, unitId); + string s = !string.IsNullOrEmpty(str) ? str : string.Empty; + return APIBaseServices.baseTeamGroupList(projectId, unitId, s); } catch (Exception e) { @@ -132,13 +132,13 @@ namespace WebAPI.Controllers } [HttpGet] - public Model.ResponeData bsWelderList(string projectId) + public Model.ResponeData bsWelderList(string projectId,string str) { Model.ResponeData respone = new ResponeData(); try { - - return APIBaseServices.bsWelderList(projectId); + string s = !string.IsNullOrEmpty(str) ? str : string.Empty; + return APIBaseServices.bsWelderList(projectId,s); } catch (Exception e) { @@ -150,13 +150,13 @@ namespace WebAPI.Controllers } [HttpGet] - public Model.ResponeData unitStoreList() + public Model.ResponeData unitStoreList(string str) { Model.ResponeData respone = new ResponeData(); try { - - return APIBaseServices.unitStoreList(); + string s = !string.IsNullOrEmpty(str) ? str : string.Empty; + return APIBaseServices.unitStoreList(s); } catch (Exception e) { diff --git a/HJGL_DS/WebAPI/Controllers/UnitInfoController.cs b/HJGL_DS/WebAPI/Controllers/UnitInfoController.cs index d5f6398..fd52e60 100644 --- a/HJGL_DS/WebAPI/Controllers/UnitInfoController.cs +++ b/HJGL_DS/WebAPI/Controllers/UnitInfoController.cs @@ -41,12 +41,13 @@ namespace WebAPI.Controllers /// 施工Id /// [HttpGet] - public Model.ResponeData getUnitByProjectId(string projectId) + public Model.ResponeData getUnitByProjectId(string projectId,string str) { var responeData = new Model.ResponeData(); try { - responeData.data = APIUnitInfoService.getUnitByProjectId(projectId); + string s = !string.IsNullOrEmpty(str) ? str : string.Empty; + responeData.data = APIUnitInfoService.getUnitByProjectId(projectId,s); } catch (Exception ex) { diff --git a/HJGL_DS/WebAPI/Controllers/WeldController.cs b/HJGL_DS/WebAPI/Controllers/WeldController.cs index 6378b64..80d2046 100644 --- a/HJGL_DS/WebAPI/Controllers/WeldController.cs +++ b/HJGL_DS/WebAPI/Controllers/WeldController.cs @@ -200,7 +200,7 @@ namespace WebAPI.Controllers newTemp.InPutDate = DateTime.Now; newTemp.OrderDate = DateTime.Now; newTemp.OrderTime = usingPlan.OrderTime; - newTemp.TeamGroupId = usingPlan.TeamGroupId; + newTemp.TeamGroupId = usingPlan.TeamGroupName; newTemp.CancelDate = BLL.Funs.GetNewDateTime(usingPlan.CancelDate); newTemp.IsCancel = usingPlan.IsCancel; newTemp.CancelResult = usingPlan.CancelResult; diff --git a/HJGL_DS/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user b/HJGL_DS/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user index 5411168..b1bcbc9 100644 --- a/HJGL_DS/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/HJGL_DS/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -85,13 +85,13 @@ 04/12/2024 09:54:20 - 08/07/2026 10:46:18 + 08/07/2026 17:27:28 12/31/2025 16:32:37 - 08/07/2026 10:46:18 + 08/07/2026 17:27:28 12/17/2020 21:32:28 @@ -121,10 +121,10 @@ 07/25/2012 11:48:56 - 08/07/2026 10:46:10 + 08/07/2026 17:27:27 - 08/07/2026 10:46:10 + 08/07/2026 17:27:27 11/28/2018 02:07:34 @@ -295,13 +295,13 @@ 05/24/2018 13:38:24 - 08/07/2026 10:46:25 + 08/07/2026 17:27:34 07/28/2025 11:00:31 - 08/07/2026 10:46:25 + 08/07/2026 17:27:34 02/01/2018 12:17:18 @@ -333,11 +333,14 @@ 02/01/2018 12:20:56 + + 06/29/2015 16:49:52 + - 08/07/2026 10:46:32 + 08/07/2026 17:27:36 - 08/07/2026 10:46:32 + 08/07/2026 17:27:36 01/23/2014 13:57:34 @@ -463,7 +466,7 @@ 07/03/2024 11:01:07 - 08/07/2026 10:46:51 + 08/07/2026 17:27:41 \ No newline at end of file