2025-07-11 08:58:49 +08:00
|
|
|
|
using BLL;
|
2025-07-17 18:17:56 +08:00
|
|
|
|
using Model;
|
2025-07-11 08:58:49 +08:00
|
|
|
|
using System;
|
2025-07-17 18:17:56 +08:00
|
|
|
|
using System.Collections.Generic;
|
2025-07-18 11:07:06 +08:00
|
|
|
|
using System.Linq;
|
2025-08-06 15:27:50 +08:00
|
|
|
|
using System.Threading.Tasks;
|
2025-07-11 08:58:49 +08:00
|
|
|
|
using System.Web.Http;
|
|
|
|
|
|
|
|
|
|
namespace WebAPI.Controllers
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 五环IDP平台
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class IDPController : ApiController
|
|
|
|
|
{
|
2025-07-17 14:22:38 +08:00
|
|
|
|
#region IDP系统项目设计图纸数据
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 每天夜间同步获取IDP系统项目设计图纸数据
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
public Model.ResponeData SynIDPDesignDrawingData()
|
|
|
|
|
{
|
|
|
|
|
var responeData = new Model.ResponeData();
|
|
|
|
|
try
|
|
|
|
|
{
|
2025-07-18 11:07:06 +08:00
|
|
|
|
var lst = DesignDrawingService.GetIDPDesignDrawingFile();
|
|
|
|
|
if (lst.Any())
|
|
|
|
|
{
|
|
|
|
|
string date = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
|
|
|
|
|
IDPDataService.GetIDPProjectDesignDrawingData("", date);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
IDPDataService.GetIDPProjectDesignDrawingData();
|
|
|
|
|
}
|
2025-07-17 14:22:38 +08:00
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
responeData.code = 0;
|
|
|
|
|
responeData.message = ex.ToString();
|
|
|
|
|
}
|
|
|
|
|
return responeData;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 每天夜间接收OA系统项目设计图纸数据
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
2025-07-17 18:17:56 +08:00
|
|
|
|
public Model.ResponeData SynOADesignDrawingData([FromBody] List<OADesignDrawingDataItem> items)
|
2025-07-17 14:22:38 +08:00
|
|
|
|
{
|
|
|
|
|
var responeData = new Model.ResponeData();
|
|
|
|
|
try
|
|
|
|
|
{
|
2025-07-17 18:17:56 +08:00
|
|
|
|
responeData.message = IDPDataService.SaveDesignDrawingData(items);
|
2025-07-17 14:22:38 +08:00
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
responeData.code = 0;
|
|
|
|
|
responeData.message = ex.ToString();
|
|
|
|
|
}
|
|
|
|
|
return responeData;
|
|
|
|
|
}
|
|
|
|
|
|
2025-07-23 10:33:41 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 每天夜间同步获取OA系统项目设计图纸数据蓝图寄出信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
public Model.ResponeData SynOADesignDrawingDataBlueprintInfo()
|
|
|
|
|
{
|
|
|
|
|
var responeData = new Model.ResponeData();
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
responeData.message = IDPDataService.GetDesignDrawingDataBlueprintInfo();
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
responeData.code = 0;
|
|
|
|
|
responeData.message = ex.ToString();
|
|
|
|
|
}
|
|
|
|
|
return responeData;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 每天夜间同步获取OA系统项目设计图纸数据蓝图打印信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
public Model.ResponeData SynOADesignDrawingDataPrintInfo()
|
|
|
|
|
{
|
|
|
|
|
var responeData = new Model.ResponeData();
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
responeData.message = IDPDataService.GetDesignDrawingDataPrintInfo();
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
responeData.code = 0;
|
|
|
|
|
responeData.message = ex.ToString();
|
|
|
|
|
}
|
|
|
|
|
return responeData;
|
|
|
|
|
}
|
|
|
|
|
|
2025-07-17 14:22:38 +08:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region IDP系统项目开车数据
|
|
|
|
|
|
2025-07-11 08:58:49 +08:00
|
|
|
|
/// <summary>
|
2025-08-06 15:27:50 +08:00
|
|
|
|
/// 获取IDP系统项目开车数据【测试用,接口不上线】
|
2025-07-11 08:58:49 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
2025-08-06 15:27:50 +08:00
|
|
|
|
public Model.ReturnData SynIDPPreRunData()
|
2025-07-11 08:58:49 +08:00
|
|
|
|
{
|
2025-08-06 15:27:50 +08:00
|
|
|
|
var responeData = new Model.ReturnData();
|
|
|
|
|
responeData.time = DateTime.Now.ToString();
|
2025-07-11 08:58:49 +08:00
|
|
|
|
try
|
|
|
|
|
{
|
2025-08-06 15:27:50 +08:00
|
|
|
|
var session = IDPDataService.GetAuthenticationSession();
|
|
|
|
|
//ErrLogInfo.WriteLog($"Session——name:{session.name};value:{session.value}");
|
|
|
|
|
|
|
|
|
|
string pipingMsg = IDPDataService.GetIDPProjectPreRunDataPiping(session, "32d0bca0-7693-4bd6-813d-6ee174ba29d3");
|
|
|
|
|
string equipmentMsg = IDPDataService.GetIDPProjectPreRunDataEquipment(session, "32d0bca0-7693-4bd6-813d-6ee174ba29d3");
|
|
|
|
|
string instrumentationMsg = IDPDataService.GetIDPProjectPreRunDataInstrumentation(session, "32d0bca0-7693-4bd6-813d-6ee174ba29d3");
|
|
|
|
|
responeData.message = $"管道一览表:{pipingMsg};设备一览表:{equipmentMsg};索引表:{instrumentationMsg}";
|
|
|
|
|
//responeData.message = $"管道一览表:{pipingMsg};设备一览表:{equipmentMsg};";
|
|
|
|
|
//responeData.message = $"索引表:{instrumentationMsg}";
|
2025-07-11 08:58:49 +08:00
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
responeData.code = 0;
|
|
|
|
|
responeData.message = ex.ToString();
|
|
|
|
|
}
|
|
|
|
|
return responeData;
|
|
|
|
|
}
|
|
|
|
|
|
2025-07-17 14:22:38 +08:00
|
|
|
|
#endregion
|
2025-07-11 08:58:49 +08:00
|
|
|
|
}
|
|
|
|
|
}
|