Bläddra i källkod

增加是否置顶,是否飘窗

tangjiang 6 månader sedan
förälder
incheckning
b010b123d1
1 ändrade filer med 13 tillägg och 4 borttagningar
  1. 13 4
      Joint/Notice.cs

+ 13 - 4
Joint/Notice.cs

@@ -19,7 +19,7 @@ namespace DataTransmission.Joint
                     WNED_ReadCount AS ReadedNum,WNLT_CreateDate AS BulletinTime ,2 AS BulletinState,WNED_WebPubFlag AS WebPub,WNED_WeChat AS WeChat,
                     '001' AS SourceOrgId,'市民热线服务系统' AS SourceOrgName,WNLT_CreateDate AS CommitTime,WNLT_AuditUserID AS AuditUserID,WNLT_AuditDate AS AuditDate
 ,WNLT_UserID as UserID,
-WNLT_UserName as UserName                      
+WNLT_UserName as UserName  ,WNED_WinFlag as WinFlag  ,   WNED_UpFlag as UpFlag  
 from Web04_NoticeList nl
                     left join Web05_NoticeExpand ne on nl.WNLT_NoticeID=ne.WNED_NoticeID
                     left join Web06_NoticeContent nc on nc.WNCT_NoticeID=nl.WNLT_NoticeID
@@ -34,7 +34,7 @@ from Web04_NoticeList nl
             var noticeSql = $@"INSERT INTO ""public"".""bulletin"" (""Id"", ""Title"", ""Content"", ""BulletinTypeId"", ""BulletinTypeName"", ""ReadedNum"", ""BulletinTime"", 
 ""LoseEfficacyTime"", ""BulletinState"", ""PushRanges"", ""SourceOrgId"", ""SourceOrgName"", ""CreationTime"", ""CreatorId"", ""CreatorName"",
 ""CreatorOrgId"", ""CreatorOrgName"", ""CreatorOrgLevel"", ""AreaId"", ""CommitTime"", ""ExaminOpinion"", ""ExaminManId"", ""ExaminTime"", 
-""IsArrive"")  VALUES";
+""IsArrive"",""DisplayLocation"")  VALUES";
 
             var PushRanges = "[";
             if (item["WebPub"].ToString() == "1")
@@ -60,11 +60,20 @@ from Web04_NoticeList nl
             {
                 caduuserid = aduuser.Rows[0]["Id"].ToString();
             }
-
+            var displayLocation = "[";
+            if (item["WinFlag"].ToString() == "1")//飘窗 [{"Key":"1","Value":"是否置顶"},{"Key":"2","Value":"是否飘窗 "}]
+            {
+                displayLocation += $@"{{""Key"":""2"",""Value"":""是否飘窗""}}";
+            }
+            if (item["UpFlag"].ToString() == "1")//置顶
+            {
+                displayLocation += $@",{{""Key"":""1"",""Value"":""是否置顶""}}";
+            }
+            displayLocation += "]";
             noticeSql += $@"('{noticeId}', '{item["Title"]}', '{item["Content"]}', '{item["BulletinTypeId"]}', '{item["BulletinTypeName"]}', 
                 {item["ReadedNum"]}, '{item["BulletinTime"]}', '2050-06-07 00:00:00', 2, '{PushRanges}', '001', '市民热线服务中心',
                 '{item["BulletinTime"]}', '{cretuserid}', '{item["UserName"]}', '001', '市民热线服务中心', 1, '001', '{item["CommitTime"]}', 
-                '同意', '{caduuserid}', '{item["AuditDate"]}', 't')";
+                '同意', '{caduuserid}', '{item["AuditDate"]}', 't','{displayLocation}')";
 
             return noticeSql;