CHEN-ZW\acer c76c8ada14 Merge branch 'main' of http://27.154.35.18:7053/yuxingheng/009_DI-Elec
# Conflicts:
#	newFront/c#前端/SWS.CAD/Commands.cs
#	newFront/c#前端/SWS.Electrical/obj/Debug/Views/DialogTest2.g.i.cs
#	newFront/c#前端/SWS.Electrical/obj/Debug/Views/SWSDialogWindow.g.cs
#	newFront/c#前端/SWS.Electrical/obj/Debug/Views/SWSDialogWindow.g.i.cs
#	newFront/c#前端/SWS.WPF/obj/Debug/Views/CustomDialogWindow.g.cs
#	newFront/c#前端/SWS.WPF/obj/Debug/Views/CustomDialogWindow.g.i.cs
2025-10-09 18:08:19 +08:00

57 lines
1.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Collections.Generic;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using SWS.Commons;
using SWS.Model;
using SWS.Share;
namespace SWS.Service
{
public class RelService : HttpService
{
public RelService() : base()
{
}
/// <summary>
/// 根据关联关系的名字拿关联关系的Id
/// </summary>
/// <param name="RelName"></param>
/// <param name="projId"></param>
/// <returns></returns>
public async Task<ec_reltype> GetRelDefByName(string RelName)
{
var res = await this.GetAsync<ec_reltype>($"RelApi/GetRelDefByName?projId={GlobalObject.curProject.ProjectId}&RelName={RelName}");
if (res.code == 200)
{
return res.data;
}
else
{
return null;
}
}
///// <summary>
///// 批量保存增、改开关。传入集合。同时建立和rel。
///// 只会在开关箱界面里调用(新建)
///// </summary>
///// <param name="projId"></param>
///// <param name="PDBId">分电箱的工程ID</param>
///// <returns></returns>
//public async Task<List<ec_CircuitBreaker>> SaveBreakers(string PDBId)
//{
// var res = await this.PostBodyAsync<List<ec_CircuitBreaker>, string>($"PDBApi/SaveBreakers?projId={GlobalObject.curProject?.ProjectId}", PDBId);
// if (res.code == 200)
// {
// //return res.info;
// return res.data;
// }
// return null;
//}
}
}