From da6fb67fe077087076db07398dc0066f8e20c5bf Mon Sep 17 00:00:00 2001
From: xiaju <1784803958@qq.com>
Date: Tue, 25 Nov 2025 10:27:40 +0800
Subject: [PATCH] =?UTF-8?q?1=E6=AF=8F=E5=A4=A9=E5=A4=9C=E9=97=B4=E8=8E=B7?=
=?UTF-8?q?=E5=8F=96OA=E7=B3=BB=E7=BB=9F=E9=A1=B9=E7=9B=AE=E8=AE=BE?=
=?UTF-8?q?=E8=AE=A1=E5=9B=BE=E7=BA=B8=E6=95=B0=E6=8D=AE=E6=8E=A5=E5=8F=A3?=
=?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
SGGL/BLL/IDP/IDPDataService.cs | 84 ++++++++++++++++++-
SGGL/Model/IDP/OADesignDrawingData.cs | 18 ++++
SGGL/WebAPI/Controllers/IDP/IDPController.cs | 22 ++++-
.../PublishProfiles/FolderProfile.pubxml.user | 22 ++---
SGGL/WebAPI/WebAPI.csproj.user | 2 +-
5 files changed, 134 insertions(+), 14 deletions(-)
diff --git a/SGGL/BLL/IDP/IDPDataService.cs b/SGGL/BLL/IDP/IDPDataService.cs
index 3b0e300c..7ccd09bb 100644
--- a/SGGL/BLL/IDP/IDPDataService.cs
+++ b/SGGL/BLL/IDP/IDPDataService.cs
@@ -823,7 +823,7 @@ namespace BLL
private static readonly string GetApiUrl = "https://getapi.cwcec.com/api/WebApi";
///
- /// 接收保存数据
+ /// 接收保存数据【数字档案馆推送】
///
///
public static string SaveDesignDrawingData(List items)
@@ -880,6 +880,88 @@ namespace BLL
}
}
+ ///
+ /// 质量管理设计图纸——获取OA图纸数据
+ ///
+ ///
+ ///
+ 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 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;
+ }
+ }
+
///
/// 质量管理设计图纸——更新蓝图寄出信息
///
diff --git a/SGGL/Model/IDP/OADesignDrawingData.cs b/SGGL/Model/IDP/OADesignDrawingData.cs
index 857d199b..e552b498 100644
--- a/SGGL/Model/IDP/OADesignDrawingData.cs
+++ b/SGGL/Model/IDP/OADesignDrawingData.cs
@@ -176,6 +176,11 @@ namespace Model
[JsonProperty("fileid")]
public string fileid { get; set; }
///
+ /// 文件名称
+ ///
+ [JsonProperty("filename")]
+ public string filename { get; set; }
+ ///
/// 盖章后文件id
///
[JsonProperty("upfileid")]
@@ -196,6 +201,11 @@ namespace Model
[JsonProperty("bc")]
public string bc { get; set; }
///
+ /// 保密类型
+ ///
+ [JsonProperty("classificationLevel")]
+ public string classificationLevel { get; set; }
+ ///
/// 入库档案号
///
[JsonProperty("archnumber")]
@@ -216,5 +226,13 @@ namespace Model
[JsonProperty("ifmail")]
public string ifmail { get; set; }
}
+
+ public partial class OADesignDrawingDataItems
+ {
+ public static List FromJson(string json)
+ {
+ return JsonConvert.DeserializeObject>(json, Model.Converter.Settings);
+ }
+ }
}
diff --git a/SGGL/WebAPI/Controllers/IDP/IDPController.cs b/SGGL/WebAPI/Controllers/IDP/IDPController.cs
index 6ebb9b3c..c9f921b5 100644
--- a/SGGL/WebAPI/Controllers/IDP/IDPController.cs
+++ b/SGGL/WebAPI/Controllers/IDP/IDPController.cs
@@ -86,7 +86,27 @@ namespace WebAPI.Controllers
///
- /// 每天夜间接收OA系统项目设计图纸数据
+ /// 每天夜间获取OA系统项目设计图纸数据
+ ///
+ ///
+ [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;
+ }
+
+ ///
+ /// 每天夜间接收OA系统项目设计图纸数据【2025.11.24弃用】
///
///
[HttpPost]
diff --git a/SGGL/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user b/SGGL/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
index ee82cfc2..4908354c 100644
--- a/SGGL/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
+++ b/SGGL/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -6,7 +6,7 @@
<_PublishTargetUrl>G:\发布\五环WebApi
- 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||;
+ 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||;
@@ -86,22 +86,22 @@
10/28/2024 14:02:50
- 11/19/2025 19:50:52
+ 11/25/2025 10:18:00
- 11/19/2025 19:50:52
+ 11/25/2025 10:18:00
12/06/2024 20:13:58
- 11/19/2025 19:50:42
+ 11/25/2025 10:17:51
12/26/2024 09:46:52
- 11/19/2025 19:50:42
+ 11/25/2025 10:17:51
12/18/2020 05:32:28
@@ -128,10 +128,10 @@
07/25/2012 19:48:56
- 11/17/2025 11:17:18
+ 11/24/2025 16:07:08
- 11/17/2025 11:17:18
+ 11/24/2025 16:07:08
07/04/2024 14:13:01
@@ -389,13 +389,13 @@
02/09/2013 00:42:28
- 11/19/2025 19:50:43
+ 11/25/2025 10:17:52
- 11/19/2025 19:50:43
+ 11/25/2025 10:17:52
- 11/19/2025 19:50:43
+ 11/25/2025 10:17:52
01/23/2014 21:57:34
@@ -479,7 +479,7 @@
10/28/2024 14:02:50
- 11/19/2025 19:50:44
+ 11/25/2025 10:17:52
10/28/2024 14:02:50
diff --git a/SGGL/WebAPI/WebAPI.csproj.user b/SGGL/WebAPI/WebAPI.csproj.user
index 17978b44..1a1a9a6c 100644
--- a/SGGL/WebAPI/WebAPI.csproj.user
+++ b/SGGL/WebAPI/WebAPI.csproj.user
@@ -1,7 +1,7 @@
- Debug|Any CPU
+ Release|Any CPU
true