From 8551b74dc809a926233244e363ccacb06d4dc664 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期三, 11 九月 2024 14:11:14 +0800
Subject: [PATCH] 新增凯贝浪潮客户条码生成模块

---
 WebAPI/Controllers/数据同步/钉钉同步/DD_DataSynchronizationController.cs |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

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 e9993f7..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)
@@ -1530,9 +1542,9 @@
                                 oItem.HDept = response.Result[i].FieldDataList[index].FieldValueList[0].Value;
                             }
 
-                            if (fieldNameList.IndexOf("宸ラ緞锛堢郴缁熻绠楋級") >= 0)
+                            if (fieldNameList.IndexOf("鍙搁緞锛堢郴缁熻绠楋級") >= 0)
                             {
-                                int index = fieldNameList.IndexOf("宸ラ緞锛堢郴缁熻绠楋級");
+                                int index = fieldNameList.IndexOf("鍙搁緞锛堢郴缁熻绠楋級");
                                 oItem.HWorkAge = response.Result[i].FieldDataList[index].FieldValueList[0].Value;
                             }
                             

--
Gitblit v1.9.1