1每天夜间获取OA系统项目设计图纸数据接口调整

This commit is contained in:
夏菊 2025-11-25 10:27:40 +08:00
parent 65d027e559
commit da6fb67fe0
5 changed files with 134 additions and 14 deletions

View File

@ -823,7 +823,7 @@ namespace BLL
private static readonly string GetApiUrl = "https://getapi.cwcec.com/api/WebApi";
/// <summary>
/// 接收保存数据
/// 接收保存数据【数字档案馆推送】
/// </summary>
/// <param name="items"></param>
public static string SaveDesignDrawingData(List<OADesignDrawingDataItem> items)
@ -880,6 +880,88 @@ namespace BLL
}
}
/// <summary>
/// 质量管理设计图纸——获取OA图纸数据
/// </summary>
/// <param name="startDate"></param>
/// <param name="endDate"></param>
public static string GetIDPOADesignDrawingData(string startDate = "", string endDate = "")
{
try
{
string message = string.Empty;
////五环主数据项目Code
//string projectCode = string.Empty;
//if (!string.IsNullOrWhiteSpace(projectId))
//{//根据施工平台项目Id获取主数据项目Code
// var getPro = ProjectService.GetProjectByProjectId(projectId);
// projectCode = getPro.ProjectCode;
//}
if (string.IsNullOrWhiteSpace(startDate))
{
startDate = DateTime.Now.AddDays(-2).ToString("yyyy-MM-dd");
}
if (string.IsNullOrWhiteSpace(endDate))
{
endDate = DateTime.Now.AddDays(+1).ToString("yyyy-MM-dd");
}
string url = $"{GetApiUrl}/GetSendInfo?BeginTime={startDate}&EndTime={endDate}";
//if (!string.IsNullOrWhiteSpace(projectCode)) { url = $"{url}&item_id={projectCode}"; }
//ErrLogInfo.WriteLog($"接口地址{url}");
//var returndata = "[{\"item_id\":\"22150\",\"modifiedTime\":\"2022/3/9 15:21:32\",\"folderNo\":\"22150-21000-WT2501-001\",\"isUpgrade\":\"D00\",\"fileType\":\"非设备蓝图\",\"senderName\":\"吴荟\",\"receiverAddress\":\"新疆哈密市伊吾县淖毛湖镇广汇生活区12号楼\",\"receiverName\":\"李娟\",\"receiverType\":\"业主\",\"receiverUnit\":\"哈密广汇环保科技有限公司\"},{\"item_id\":\"22150\",\"modifiedTime\":\"2022/3/9 15:21:33\",\"folderNo\":\"22150-21000-WT4401-001\",\"isUpgrade\":\"D00\",\"fileType\":\"非设备蓝图\",\"senderName\":\"吴荟\",\"receiverAddress\":\"新疆哈密市伊吾县淖毛湖镇广汇生活区12号楼\",\"receiverName\":\"李娟\",\"receiverType\":\"业主\",\"receiverUnit\":\"哈密广汇环保科技有限公司\"},{\"item_id\":\"22150\",\"modifiedTime\":\"2022/3/19 15:23:33\",\"folderNo\":\"22150-21000-WT4401-001\",\"isUpgrade\":\"D00\",\"fileType\":\"非设备蓝图\",\"senderName\":\"吴荟\",\"receiverAddress\":\"新疆哈密市伊吾县淖毛湖镇广汇生活区12号楼\",\"receiverName\":\"李娟\",\"receiverType\":\"业主\",\"receiverUnit\":\"哈密广汇环保科技有限公司\"}]";
var returndata = BLL.APIGetHttpService.OutsideHttp(url, "GET", null, null, null);
if (!string.IsNullOrEmpty(returndata))
{
ErrLogInfo.WriteLog($"【{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}获取OA图纸数据{startDate}至{endDate}):】{returndata}");
int succ = 0;
int err = 0;
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
List<OADesignDrawingDataItem> responseData = OADesignDrawingDataItems.FromJson(returndata);
responseData = responseData.Where(x => !string.IsNullOrWhiteSpace(x.uuid) == true).ToList();
foreach (var item in responseData)
{
IDP_DesignDrawing newItem = db.IDP_DesignDrawing.FirstOrDefault(x => x.IdpfileId == item.uuid);
//IDP_DesignDrawing newItem = db.IDP_DesignDrawing.FirstOrDefault(x => x.StockId == item.RdpId && x.ThirdId == item.fileid);
//IDP_DesignDrawing newItem = db.IDP_DesignDrawing.FirstOrDefault(x => x.StockId == item.RdpId && x.FormatFileCode == item.doc_no && x.FormatFileName == item.maintitle);
if (newItem != null)
{
newItem.RdpId = item.RdpId;
newItem.Fileid = item.fileid;
//newItem.StockId = item.RdpId;
//newItem.ThirdId = item.fileid;
newItem.Upfileid = item.upfileid;
newItem.Maintitle = item.maintitle;
newItem.Doc_no = item.doc_no;
newItem.Bc = item.bc;
newItem.Archnumber = item.archnumber;
newItem.Sendtime = item.sendtime;
newItem.Printtime = item.printtime;
newItem.Ifmail = item.ifmail;
db.SubmitChanges();
succ++;
}
else
{
err++;
}
}
message = $"总数{(succ + err)}条;失败{err}条,成功{succ}条!";
}
}
else
{
message = "无数据";
}
return message;
}
catch (WebException ex)
{
return ex.Message;
}
}
/// <summary>
/// 质量管理设计图纸——更新蓝图寄出信息
/// </summary>

View File

@ -176,6 +176,11 @@ namespace Model
[JsonProperty("fileid")]
public string fileid { get; set; }
/// <summary>
/// 文件名称
/// </summary>
[JsonProperty("filename")]
public string filename { get; set; }
/// <summary>
/// 盖章后文件id
/// </summary>
[JsonProperty("upfileid")]
@ -196,6 +201,11 @@ namespace Model
[JsonProperty("bc")]
public string bc { get; set; }
/// <summary>
/// 保密类型
/// </summary>
[JsonProperty("classificationLevel")]
public string classificationLevel { get; set; }
/// <summary>
/// 入库档案号
/// </summary>
[JsonProperty("archnumber")]
@ -216,5 +226,13 @@ namespace Model
[JsonProperty("ifmail")]
public string ifmail { get; set; }
}
public partial class OADesignDrawingDataItems
{
public static List<OADesignDrawingDataItem> FromJson(string json)
{
return JsonConvert.DeserializeObject<List<OADesignDrawingDataItem>>(json, Model.Converter.Settings);
}
}
}

View File

@ -86,7 +86,27 @@ namespace WebAPI.Controllers
/// <summary>
/// 每天夜间接收OA系统项目设计图纸数据
/// 每天夜间获取OA系统项目设计图纸数据
/// </summary>
/// <returns></returns>
[HttpPost]
public Model.ResponeData SynIDPOADesignDrawingData()
{
var responeData = new Model.ResponeData();
try
{
responeData.message = IDPDataService.GetIDPOADesignDrawingData();
}
catch (Exception ex)
{
responeData.code = 0;
responeData.message = ex.ToString();
}
return responeData;
}
/// <summary>
/// 每天夜间接收OA系统项目设计图纸数据【2025.11.24弃用】
/// </summary>
/// <returns></returns>
[HttpPost]

View File

@ -6,7 +6,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_PublishTargetUrl>G:\发布\五环WebApi</_PublishTargetUrl>
<History>True|2025-11-19T11:50:54.0090859Z||;True|2025-11-19T19:29:28.5861506+08:00||;True|2025-11-19T19:14:02.6887533+08:00||;True|2025-11-19T19:08:28.7856694+08:00||;True|2025-11-17T14:41:29.0529618+08:00||;True|2025-11-17T12:28:22.9224307+08:00||;True|2025-11-17T11:17:50.1481769+08:00||;True|2025-11-07T14:46:56.1446809+08:00||;True|2025-11-05T09:32:06.4998794+08:00||;True|2025-11-04T16:39:28.2175670+08:00||;True|2025-11-04T16:39:02.3610432+08:00||;True|2025-11-04T15:44:06.1295264+08:00||;True|2025-10-31T16:41:11.6570385+08:00||;True|2025-10-30T15:58:05.2014433+08:00||;True|2025-10-29T16:22:27.7866967+08:00||;True|2025-10-29T11:19:32.1187038+08:00||;True|2025-10-24T15:59:19.4176668+08:00||;True|2025-10-23T10:17:32.2384443+08:00||;True|2025-10-23T10:09:35.0601937+08:00||;True|2025-10-23T09:59:27.2018799+08:00||;True|2025-09-29T15:39:36.8617347+08:00||;True|2025-09-29T11:28:10.9193152+08:00||;True|2025-09-29T10:59:58.2893583+08:00||;True|2025-09-23T16:56:39.6344263+08:00||;True|2025-09-23T16:44:57.4175593+08:00||;True|2025-09-23T16:44:35.0478492+08:00||;True|2025-09-23T16:06:50.5843534+08:00||;True|2025-09-22T20:54:35.9805610+08:00||;True|2025-09-22T20:45:58.7044128+08:00||;True|2025-09-22T20:40:46.7449595+08:00||;True|2025-09-22T15:14:22.9602725+08:00||;True|2025-09-22T15:08:27.5989706+08:00||;True|2025-09-22T14:54:19.5237685+08:00||;True|2025-09-18T09:53:17.9300539+08:00||;True|2025-09-16T19:11:12.4383069+08:00||;True|2025-09-02T11:14:00.9580707+08:00||;True|2025-09-02T10:52:20.0445598+08:00||;True|2025-08-29T17:56:01.6245615+08:00||;True|2025-08-29T17:55:41.2802685+08:00||;True|2025-08-09T21:27:40.2103961+08:00||;True|2025-08-06T15:31:52.1166645+08:00||;True|2025-08-04T18:56:13.9675910+08:00||;True|2025-07-23T11:12:18.0134770+08:00||;True|2025-07-23T10:36:09.9990536+08:00||;True|2025-07-23T10:35:51.8814789+08:00||;True|2025-07-21T17:46:45.4620710+08:00||;True|2025-07-21T17:40:43.9871097+08:00||;True|2025-07-21T17:29:11.9275869+08:00||;True|2025-07-21T17:05:21.7763763+08:00||;True|2025-07-18T17:55:59.4892329+08:00||;True|2025-07-18T11:08:56.2628896+08:00||;True|2025-07-18T10:53:44.2534260+08:00||;True|2025-07-18T10:27:52.6751668+08:00||;True|2025-07-18T10:03:09.1785776+08:00||;True|2025-07-18T10:02:38.1252107+08:00||;True|2025-07-17T18:19:07.5837609+08:00||;True|2025-07-17T15:40:11.9126705+08:00||;True|2025-07-11T17:54:03.0298703+08:00||;True|2025-07-11T16:19:50.3283029+08:00||;True|2025-07-11T15:49:22.5920473+08:00||;True|2025-07-02T14:39:27.0436873+08:00||;True|2025-07-02T11:18:29.1208369+08:00||;True|2025-07-01T15:52:16.6767496+08:00||;True|2025-07-01T10:14:59.0471052+08:00||;True|2025-06-28T11:40:36.0544739+08:00||;True|2025-06-27T15:10:24.4628086+08:00||;True|2025-06-27T10:31:14.8332810+08:00||;True|2025-06-27T10:13:13.3022394+08:00||;True|2025-06-26T23:51:04.1304509+08:00||;True|2025-06-26T23:34:06.4223762+08:00||;True|2025-06-26T22:42:08.9018138+08:00||;True|2025-06-26T22:16:01.8954571+08:00||;True|2025-06-26T21:19:42.2638204+08:00||;True|2025-06-25T23:22:39.7267591+08:00||;True|2025-06-25T23:19:33.2378458+08:00||;True|2025-06-25T22:18:16.2863303+08:00||;True|2025-06-25T22:10:29.2540175+08:00||;True|2025-06-25T22:00:58.5212166+08:00||;True|2025-06-25T22:00:31.2531214+08:00||;True|2025-06-25T18:33:01.5770030+08:00||;True|2025-06-25T17:47:33.7779622+08:00||;True|2025-06-25T17:40:26.9905954+08:00||;True|2025-06-20T11:24:58.4099232+08:00||;True|2025-06-19T16:42:45.2358810+08:00||;True|2025-06-16T19:28:10.6447738+08:00||;True|2025-06-12T11:00:02.3559090+08:00||;True|2025-06-12T10:40:29.0324520+08:00||;True|2025-06-04T23:24:01.0324973+08:00||;True|2025-06-04T18:39:41.7304136+08:00||;True|2025-06-04T11:23:17.3803405+08:00||;True|2025-06-04T11:04:32.4212196+08:00||;True|2025-05-26T19:19:09.7246357+08:00||;True|2025-05-26T19:16:39.1283077+08:00||;True|2025-05-26T19:09:24.1561616+08:00||;True|2025-04-07T16:11:44.5172315+08:00||;True|2025-04-02T18:10:22.8695984+08:00||;True|2025-04-02T17:59:51.2978116+08:00||;True|2025-04-02T17:50:55.8630437+08:00||;True|2025-04-02T17:49:22.5114405+08:00||;True|2025-04-02T17:47:11.0650205+08:00||;</History>
<History>True|2025-11-25T02:18:00.9729814Z||;True|2025-11-25T10:14:14.6947178+08:00||;True|2025-11-25T10:06:29.1167142+08:00||;True|2025-11-25T09:25:18.3566779+08:00||;True|2025-11-24T16:07:37.5433070+08:00||;True|2025-11-19T19:50:54.0090859+08:00||;True|2025-11-19T19:29:28.5861506+08:00||;True|2025-11-19T19:14:02.6887533+08:00||;True|2025-11-19T19:08:28.7856694+08:00||;True|2025-11-17T14:41:29.0529618+08:00||;True|2025-11-17T12:28:22.9224307+08:00||;True|2025-11-17T11:17:50.1481769+08:00||;True|2025-11-07T14:46:56.1446809+08:00||;True|2025-11-05T09:32:06.4998794+08:00||;True|2025-11-04T16:39:28.2175670+08:00||;True|2025-11-04T16:39:02.3610432+08:00||;True|2025-11-04T15:44:06.1295264+08:00||;True|2025-10-31T16:41:11.6570385+08:00||;True|2025-10-30T15:58:05.2014433+08:00||;True|2025-10-29T16:22:27.7866967+08:00||;True|2025-10-29T11:19:32.1187038+08:00||;True|2025-10-24T15:59:19.4176668+08:00||;True|2025-10-23T10:17:32.2384443+08:00||;True|2025-10-23T10:09:35.0601937+08:00||;True|2025-10-23T09:59:27.2018799+08:00||;True|2025-09-29T15:39:36.8617347+08:00||;True|2025-09-29T11:28:10.9193152+08:00||;True|2025-09-29T10:59:58.2893583+08:00||;True|2025-09-23T16:56:39.6344263+08:00||;True|2025-09-23T16:44:57.4175593+08:00||;True|2025-09-23T16:44:35.0478492+08:00||;True|2025-09-23T16:06:50.5843534+08:00||;True|2025-09-22T20:54:35.9805610+08:00||;True|2025-09-22T20:45:58.7044128+08:00||;True|2025-09-22T20:40:46.7449595+08:00||;True|2025-09-22T15:14:22.9602725+08:00||;True|2025-09-22T15:08:27.5989706+08:00||;True|2025-09-22T14:54:19.5237685+08:00||;True|2025-09-18T09:53:17.9300539+08:00||;True|2025-09-16T19:11:12.4383069+08:00||;True|2025-09-02T11:14:00.9580707+08:00||;True|2025-09-02T10:52:20.0445598+08:00||;True|2025-08-29T17:56:01.6245615+08:00||;True|2025-08-29T17:55:41.2802685+08:00||;True|2025-08-09T21:27:40.2103961+08:00||;True|2025-08-06T15:31:52.1166645+08:00||;True|2025-08-04T18:56:13.9675910+08:00||;True|2025-07-23T11:12:18.0134770+08:00||;True|2025-07-23T10:36:09.9990536+08:00||;True|2025-07-23T10:35:51.8814789+08:00||;True|2025-07-21T17:46:45.4620710+08:00||;True|2025-07-21T17:40:43.9871097+08:00||;True|2025-07-21T17:29:11.9275869+08:00||;True|2025-07-21T17:05:21.7763763+08:00||;True|2025-07-18T17:55:59.4892329+08:00||;True|2025-07-18T11:08:56.2628896+08:00||;True|2025-07-18T10:53:44.2534260+08:00||;True|2025-07-18T10:27:52.6751668+08:00||;True|2025-07-18T10:03:09.1785776+08:00||;True|2025-07-18T10:02:38.1252107+08:00||;True|2025-07-17T18:19:07.5837609+08:00||;True|2025-07-17T15:40:11.9126705+08:00||;True|2025-07-11T17:54:03.0298703+08:00||;True|2025-07-11T16:19:50.3283029+08:00||;True|2025-07-11T15:49:22.5920473+08:00||;True|2025-07-02T14:39:27.0436873+08:00||;True|2025-07-02T11:18:29.1208369+08:00||;True|2025-07-01T15:52:16.6767496+08:00||;True|2025-07-01T10:14:59.0471052+08:00||;True|2025-06-28T11:40:36.0544739+08:00||;True|2025-06-27T15:10:24.4628086+08:00||;True|2025-06-27T10:31:14.8332810+08:00||;True|2025-06-27T10:13:13.3022394+08:00||;True|2025-06-26T23:51:04.1304509+08:00||;True|2025-06-26T23:34:06.4223762+08:00||;True|2025-06-26T22:42:08.9018138+08:00||;True|2025-06-26T22:16:01.8954571+08:00||;True|2025-06-26T21:19:42.2638204+08:00||;True|2025-06-25T23:22:39.7267591+08:00||;True|2025-06-25T23:19:33.2378458+08:00||;True|2025-06-25T22:18:16.2863303+08:00||;True|2025-06-25T22:10:29.2540175+08:00||;True|2025-06-25T22:00:58.5212166+08:00||;True|2025-06-25T22:00:31.2531214+08:00||;True|2025-06-25T18:33:01.5770030+08:00||;True|2025-06-25T17:47:33.7779622+08:00||;True|2025-06-25T17:40:26.9905954+08:00||;True|2025-06-20T11:24:58.4099232+08:00||;True|2025-06-19T16:42:45.2358810+08:00||;True|2025-06-16T19:28:10.6447738+08:00||;True|2025-06-12T11:00:02.3559090+08:00||;True|2025-06-12T10:40:29.0324520+08:00||;True|2025-06-04T23:24:01.0324973+08:00||;True|2025-06-04T18:39:41.7304136+08:00||;True|2025-06-04T11:23:17.3803405+08:00||;True|2025-06-04T11:04:32.4212196+08:00||;True|2025-05-26T19:19:09.7246357+08:00||;True|2025-05-26T19:16:39.1283077+08:00||;True|2025-05-26T19:09:24.1561616+08:00||;True|2025-04-07T16:11:44.5172315+08:00||;</History>
<LastFailureDetails />
</PropertyGroup>
<ItemGroup>
@ -86,22 +86,22 @@
<publishTime>10/28/2024 14:02:50</publishTime>
</File>
<File Include="bin/App_global.asax.compiled">
<publishTime>11/19/2025 19:50:52</publishTime>
<publishTime>11/25/2025 10:18:00</publishTime>
</File>
<File Include="bin/App_global.asax.dll">
<publishTime>11/19/2025 19:50:52</publishTime>
<publishTime>11/25/2025 10:18:00</publishTime>
</File>
<File Include="bin/Aspose.Words.dll">
<publishTime>12/06/2024 20:13:58</publishTime>
</File>
<File Include="bin/BLL.dll">
<publishTime>11/19/2025 19:50:42</publishTime>
<publishTime>11/25/2025 10:17:51</publishTime>
</File>
<File Include="bin/BLL.dll.config">
<publishTime>12/26/2024 09:46:52</publishTime>
</File>
<File Include="bin/BLL.pdb">
<publishTime>11/19/2025 19:50:42</publishTime>
<publishTime>11/25/2025 10:17:51</publishTime>
</File>
<File Include="bin/BouncyCastle.Crypto.dll">
<publishTime>12/18/2020 05:32:28</publishTime>
@ -128,10 +128,10 @@
<publishTime>07/25/2012 19:48:56</publishTime>
</File>
<File Include="bin/Model.dll">
<publishTime>11/17/2025 11:17:18</publishTime>
<publishTime>11/24/2025 16:07:08</publishTime>
</File>
<File Include="bin/Model.pdb">
<publishTime>11/17/2025 11:17:18</publishTime>
<publishTime>11/24/2025 16:07:08</publishTime>
</File>
<File Include="bin/netstandard.dll">
<publishTime>07/04/2024 14:13:01</publishTime>
@ -389,13 +389,13 @@
<publishTime>02/09/2013 00:42:28</publishTime>
</File>
<File Include="bin/WebAPI.dll">
<publishTime>11/19/2025 19:50:43</publishTime>
<publishTime>11/25/2025 10:17:52</publishTime>
</File>
<File Include="bin/WebAPI.pdb">
<publishTime>11/19/2025 19:50:43</publishTime>
<publishTime>11/25/2025 10:17:52</publishTime>
</File>
<File Include="bin/WebAPI.xml">
<publishTime>11/19/2025 19:50:43</publishTime>
<publishTime>11/25/2025 10:17:52</publishTime>
</File>
<File Include="bin/WebGrease.dll">
<publishTime>01/23/2014 21:57:34</publishTime>
@ -479,7 +479,7 @@
<publishTime>10/28/2024 14:02:50</publishTime>
</File>
<File Include="PrecompiledApp.config">
<publishTime>11/19/2025 19:50:44</publishTime>
<publishTime>11/25/2025 10:17:52</publishTime>
</File>
<File Include="Scripts/bootstrap.js">
<publishTime>10/28/2024 14:02:50</publishTime>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
<IISExpressSSLPort />