This commit is contained in:
2026-08-07 10:44:44 +08:00
parent 883ed26a5b
commit 3ecda170dc
9 changed files with 545 additions and 1 deletions
@@ -201,6 +201,57 @@ namespace WebAPI.Controllers
return respone;
}
[HttpGet]
public Model.ResponeData weldMethodList()
{
Model.ResponeData respone = new ResponeData();
try
{
return APIBaseServices.weldMethodList();
}
catch (Exception e)
{
respone.code = 0;
respone.message = e.Message;
}
return respone;
}
[HttpGet]
public Model.ResponeData weldSilkList()
{
Model.ResponeData respone = new ResponeData();
try
{
return APIBaseServices.weldSilkList();
}
catch (Exception e)
{
respone.code = 0;
respone.message = e.Message;
}
return respone;
}
[HttpGet]
public Model.ResponeData weldMatList()
{
Model.ResponeData respone = new ResponeData();
try
{
return APIBaseServices.weldMatList();
}
catch (Exception e)
{
respone.code = 0;
respone.message = e.Message;
}
return respone;
}
[HttpGet]
public Model.ResponeData getVersion()
{
@@ -431,5 +431,31 @@ namespace WebAPI.Controllers
return isok;
}
#endregion
#region 根据焊口ID获取焊口信息
/// <summary>
/// 根据焊口ID获取焊口信息
/// </summary>
/// <param name="jotId"></param>
/// <returns></returns>
[HttpGet]
public Model.ResponeData getJointInfoById(string jotId)
{
var responeData = new Model.ResponeData();
try
{
responeData.data = HJGL_PW_JointInfoService.GetJointItemByJotID(jotId);
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.Message;
}
return responeData;
}
#endregion
}
}
@@ -60,6 +60,22 @@ namespace WebAPI.Controllers
return respone;
}
[HttpGet]
public Model.ResponeData getUsingPlanTempByUserId(string userId)
{
Model.ResponeData respone = new ResponeData();
try
{
return APIWeldServices.getUsingPlanTempByUserId(userId);
}
catch (Exception e)
{
respone.code = 0;
respone.message = e.Message;
}
return respone;
}
[HttpGet]
public Model.ResponeData welderQueIsPass(string welderId, string steelType, bool isSteelStru)
{
Model.ResponeData respone = new ResponeData();
@@ -168,6 +184,32 @@ namespace WebAPI.Controllers
}
}
}
#region 添加到临时表,以供下次登录时加载当前登录人保存的记录数据
BLL.UsingPlanTempService.DeleteUsingPlanTempByUserId(usingPlan.InPutMan);
Model.Weld_UsingPlan_Temp newTemp = new Model.Weld_UsingPlan_Temp();
newTemp.UsingPlanTempId = BLL.SQLHelper.GetNewID(typeof(Model.Weld_UsingPlan_Temp));
newTemp.UnitStoreId = usingPlan.UnitStoreId;
newTemp.WeldId = usingPlan.WeldId;
newTemp.ProjectId = usingPlan.ProjectId;
newTemp.UsePosition = usingPlan.UsePosition;
newTemp.UsingUnit = usingPlan.UsingUnit;
newTemp.STE_ID = usingPlan.STE_ID;
newTemp.STE_Name = usingPlan.STE_Name;
newTemp.Amount = usingPlan.Amount;
newTemp.UsingManOne = usingPlan.UsingManOne;
newTemp.InPutDate = DateTime.Now;
newTemp.OrderDate = DateTime.Now;
newTemp.OrderTime = usingPlan.OrderTime;
newTemp.TeamGroupId = usingPlan.TeamGroupId;
newTemp.CancelDate = BLL.Funs.GetNewDateTime(usingPlan.CancelDate);
newTemp.IsCancel = usingPlan.IsCancel;
newTemp.CancelResult = usingPlan.CancelResult;
newTemp.IsSubmit = usingPlan.IsSubmit;
newTemp.InPutMan = usingPlan.InPutMan;
newTemp.Type = "1";
newTemp.IsSteelStru = usingPlan.IsSteelStru;
BLL.UsingPlanTempService.AddUsingPlan(newTemp);
#endregion
return APIWeldServices.addUsingPlan(usingPlan);
}
catch (Exception e)
@@ -229,5 +271,54 @@ namespace WebAPI.Controllers
}
return respone;
}
[HttpGet]
public Model.ResponeData getProjectWelderSelectList(string projectId, string str, int page, int pageSize)
{
Model.ResponeData respone = new ResponeData();
try
{
return APIWeldServices.getProjectWelderSelectList(projectId, str, page, pageSize);
}
catch (Exception e)
{
respone.code = 0;
respone.message = e.Message;
}
return respone;
}
[HttpGet]
public Model.ResponeData saveProjectWelderSelectList(string projectId, string wed_ids)
{
Model.ResponeData respone = new ResponeData();
try
{
using (Model.SGGLDB db = new Model.SGGLDB(BLL.Funs.ConnString))
{
string[] ids = wed_ids.Split(',');
List<Model.Project_Welder> list = new List<Project_Welder>();
foreach (string id in ids)
{
Model.Project_Welder newProjectWelder = new Model.Project_Welder();
newProjectWelder.WED_ID = id;
newProjectWelder.ProjectId = projectId;
newProjectWelder.IsSelected = true;
newProjectWelder.IsApprove = true;
newProjectWelder.ProjectWelderId = BLL.SQLHelper.GetNewID(typeof(Model.Project_Welder));
list.Add(newProjectWelder);
}
db.Project_Welder.InsertAllOnSubmit(list);
db.SubmitChanges();
}
}
catch (Exception e)
{
respone.code = 0;
respone.message = e.Message;
}
return respone;
}
}
}