From d489bd90dd0245d0bcc496c6c745f784841af268 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期一, 19 八月 2024 13:11:36 +0800 Subject: [PATCH] 斯莫尔:钉钉数据同步,每个月1号同步全部数据 --- LMES/DingDing_autoGetData.resx | 3 +++ WebAPI/Controllers/数据同步/钉钉同步/DD_DataSynchronizationController.cs | 14 +++++++++++++- 2 files changed, 16 insertions(+), 1 deletions(-) diff --git a/LMES/DingDing_autoGetData.resx b/LMES/DingDing_autoGetData.resx index 1a19b28..7b79fe0 100644 --- a/LMES/DingDing_autoGetData.resx +++ b/LMES/DingDing_autoGetData.resx @@ -452,4 +452,7 @@ <metadata name="timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>333, 17</value> </metadata> + <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>192</value> + </metadata> </root> \ No newline at end of file diff --git "a/WebAPI/Controllers/\346\225\260\346\215\256\345\220\214\346\255\245/\351\222\211\351\222\211\345\220\214\346\255\245/DD_DataSynchronizationController.cs" "b/WebAPI/Controllers/\346\225\260\346\215\256\345\220\214\346\255\245/\351\222\211\351\222\211\345\220\214\346\255\245/DD_DataSynchronizationController.cs" index cc3e713..a1561f5 100644 --- "a/WebAPI/Controllers/\346\225\260\346\215\256\345\220\214\346\255\245/\351\222\211\351\222\211\345\220\214\346\255\245/DD_DataSynchronizationController.cs" +++ "b/WebAPI/Controllers/\346\225\260\346\215\256\345\220\214\346\255\245/\351\222\211\351\222\211\345\220\214\346\255\245/DD_DataSynchronizationController.cs" @@ -397,7 +397,7 @@ //OriginatorId = "12", //鏍规嵁娴佺▼鍙戣捣浜哄伐鍙锋煡璇€�� //TaskId = "12", //浠诲姟ID銆� - CreateFromTimeGMT = DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"), //鍒涘缓鏃堕棿璧峰鍊笺�� + CreateFromTimeGMT = DateTime.Now.ToString("dd") == "01"?"2022-01-01":DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"), //鍒涘缓鏃堕棿璧峰鍊笺�� CreateToTimeGMT = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"), //鍒涘缓鏃堕棿缁堟鍊笺�� PageSize = pageSize, //鍒嗛〉澶у皬銆� @@ -1492,6 +1492,9 @@ return false; } + string[] studyLevelList = new string[] {"","楂樹腑","涓笓","澶т笓","鏈","","","鍏朵粬","鍒濅腑","灏忓" }; + + for (int i = 0; i < response.Result.Count; i++) { List<string> fieldNameList = new List<string>(); @@ -1522,6 +1525,15 @@ { int index = fieldNameList.IndexOf("瀛﹀巻"); oItem.HStudyLevel = response.Result[i].FieldDataList[index].FieldValueList[0].Value; + if (oItem.HStudyLevel != null && oItem.HStudyLevel != "") + { + long studyLevelIndex = DBUtility.ClsPub.isLong(oItem.HStudyLevel); + if (studyLevelIndex >= studyLevelList.Length) + { + studyLevelIndex = 0; + } + oItem.HStudyLevel = studyLevelList[studyLevelIndex]; + } } if (fieldNameList.IndexOf("閮ㄩ棬") >= 0) -- Gitblit v1.9.1