Răsfoiți Sursa

Merge branch 'master' of http://116.63.33.55/git/nazw

ljh 2 ani în urmă
părinte
comite
9c5b13875f

+ 4 - 2
nngkxxdp/src/main/java/com/example/nngkxxdp/controller/ApiSmsMessageController.java

@@ -7,6 +7,7 @@ import java.util.Map;
 
 import com.example.nngkxxdp.entity.Wsms;
 import com.example.nngkxxdp.service.WebsiteSmsService;
+import com.example.nngkxxdp.util.Blank;
 import com.example.nngkxxdp.util.WebsiteSmsUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -62,8 +63,8 @@ public class ApiSmsMessageController {
 	 * @return
 	 */
 	@PostMapping("/add")
-	public Map<String, Object> addSmsMessage(Integer senduerid, String telephones) {
-		if (StrUtil.isEmpty(telephones) || senduerid == null) {
+	public Map<String, Object> addSmsMessage(Integer senduerid, String telephones, String columns) {
+		if (StrUtil.isEmpty(telephones) || senduerid == null || Blank.isEmpty(columns)) {
 			return SendUtil.send(false, ConstStr.REQUEST_WRONGPARAMS);
 		}
 
@@ -91,6 +92,7 @@ public class ApiSmsMessageController {
 			smsMessage.setType(type);
 			smsMessage.setSenduerid(senduerid);
 			smsMessage.setTelephone(telephone);
+			smsMessage.setColumns(columns);
 			smsMessages.add(smsMessage);
 
 

+ 5 - 0
nngkxxdp/src/main/java/com/example/nngkxxdp/entity/SmsMessage.java

@@ -57,4 +57,9 @@ public class SmsMessage implements Serializable {
 	 * 短信发送人
 	 */
 	private Integer senduerid;
+
+	/**
+	 * 提醒栏目
+	 */
+	private String columns;
 }

+ 21 - 10
nngkxxdp/src/main/java/com/example/nngkxxdp/service/impl/ArticleServiceImpl.java

@@ -243,13 +243,18 @@ public class ArticleServiceImpl implements ArticleService {
 				if (workDynamicList.contains(chnlid)) {
 					Map<String, Object> monthItem = Convert.toMap(String.class, Object.class, monthMap.get(chnlid));
 					Map<String, Object> yearItem = Convert.toMap(String.class, Object.class, yearMap.get(chnlid));
-					if (Blank.isEmpty(monthItem) || Blank.isEmpty(yearItem)) {
-						continue;
+
+					// 月份更新不为空
+					if (Blank.isNotEmpty(monthItem)) {
+						map.put("workDynamicMonthCount", Blank.isEmpty(monthItem) ? "" : Convert.toInt(monthItem.get("count"), 0));
+						map.put("workDynamicUpdateDate", DateUtil.parse(monthItem.get("date").toString()).toString("yyyy-MM-dd"));
 					}
 
-					map.put("workDynamicMonthCount", Blank.isEmpty(monthItem) ? "" : Convert.toInt(monthItem.get("count"), 0));
-					map.put("workDynamicUpdateDate", DateUtil.parse(yearItem.get("date").toString()).toString("yyyy-MM-dd"));
-					map.put("workDynamicYearCount", Convert.toInt(yearItem.get("count"), 0));
+					// 年份更新不为空
+					if (Blank.isNotEmpty(yearItem)) {
+						map.put("workDynamicUpdateDate", DateUtil.parse(yearItem.get("date").toString()).toString("yyyy-MM-dd"));
+						map.put("workDynamicYearCount", Convert.toInt(yearItem.get("count"), 0));
+					}
 					continue;
 				}
 
@@ -257,13 +262,18 @@ public class ArticleServiceImpl implements ArticleService {
 				if (policyDocList.contains(chnlid)) {
 					Map<String, Object> monthItem = Convert.toMap(String.class, Object.class, monthMap.get(chnlid));
 					Map<String, Object> yearItem = Convert.toMap(String.class, Object.class, yearMap.get(chnlid));
-					if (Blank.isEmpty(monthItem) && Blank.isEmpty(yearItem)) {
-						continue;
+
+					// 月份更新不为空
+					if (Blank.isNotEmpty(monthItem)) {
+						map.put("policyDocMonthCount", Blank.isEmpty(monthItem) ? "" : Convert.toInt(monthItem.get("count"), 0));
+						map.put("policyDocUpdateDate", DateUtil.parse(monthItem.get("date").toString()).toString("yyyy-MM-dd"));
 					}
 
-					map.put("policyDocMonthCount", Blank.isEmpty(monthItem) ? "" : Convert.toInt(monthItem.get("count"), 0));
-					map.put("policyDocUpdateDate", DateUtil.parse(yearItem.get("date").toString()).toString("yyyy-MM-dd"));
-					map.put("policyDocYearCount", Convert.toInt(yearItem.get("count"), 0));
+					// 年份更新不为空
+					if (Blank.isNotEmpty(yearItem)) {
+						map.put("policyDocUpdateDate", DateUtil.parse(yearItem.get("date").toString()).toString("yyyy-MM-dd"));
+						map.put("policyDocYearCount", Convert.toInt(yearItem.get("count"), 0));
+					}
 					continue;
 				}
 			}
@@ -476,6 +486,7 @@ public class ArticleServiceImpl implements ArticleService {
 				if (Blank.isEmpty(column)) {
 					continue;
 				}
+				// 跳过未超过更新时间
 				String isExceed = Convert.toStr(column.get("isExceed"), "0");
 				if ("0".equals(isExceed)) {
 					continue;

+ 3 - 2
nngkxxdp/src/main/resources/mapper/SmsMessageDao.xml

@@ -14,7 +14,7 @@
 	</select>
 
     <insert id="addSmsMessage" useGeneratedKeys="true" keyProperty="id" parameterType="list">
-        INSERT INTO sms_message (deptname, type, telephone, createtime, senduerid, sendstatus)
+        INSERT INTO sms_message (deptname, type, telephone, createtime, senduerid, sendstatus, columns)
         VALUES
        	<foreach collection="smsMessages" item="smsMessage" separator=",">
 	        (#{smsMessage.deptname},
@@ -22,7 +22,8 @@
                 #{smsMessage.telephone},
                 now(),
                 #{smsMessage.senduerid},
-                0
+                0,
+	        	#{smsMessage.columns}
              )
 	    </foreach>
     </insert>

+ 0 - 70
nngkxxdp/src/main/resources/static/page/js/base/bmjdgxqk.item.js

@@ -22,41 +22,6 @@ var cols = [
 			align: 'left'
 		},
 		{
-			field: 'workDynamicUpdateDate',
-			title: '更新情况',
-			width: 150,
-			rowspan: 2,
-			align: 'left',
-			templet: function (e) {
-				if (!e.workDynamicUpdateDate) {
-					return '<div  id="workDynamicUpdateDate">暂无更新</div>';
-				}
-				var interval = GetNumberOfDays(e.workDynamicUpdateDate, nowDate)
-
-				if (interval <= 90) {
-					// var ele = document.getElementById("releaseDate");           //  先导航到要改的标签
-					cls = 'marker2-three'
-					return '<div  id="workDynamicUpdateDate" class="' + cls + '">' + e.workDynamicUpdateDate + ' ' + interval + '天前</div>';
-
-				} else if (interval <= 90 || interval <= 180) {
-					// var ele=document.getElementById("releaseDate");           //  先导航到要改的标签
-					// ele.style.background="#FD8F00";
-					cls = 'marker2-one'
-					return '<div  id="workDynamicUpdateDate" class="' + cls + '">' + e.workDynamicUpdateDate + ' ' + interval + '天前</div>';
-
-
-				} else if (interval >= 180) {
-					// var ele=document.getElementById("releaseDate");           //  先导航到要改的标签
-					// ele.style.background="#e10000";
-					cls = 'marker2-two'
-					return '<div  id="workDynamicUpdateDate" class="' + cls + '">' + e.workDynamicUpdateDate + ' ' + interval + '天前</div>';
-				} else
-					return '<div  id="workDynamicUpdateDate">暂无更新</div>';
-
-
-			}
-		},
-		{
 			field: 'workDynamicYearCount',
 			title: '工作情况<br>(近一年内更新数)',
 			width: 140,
@@ -104,41 +69,6 @@ var cols = [
 			align: 'left'
 		},
 		{
-			field: 'policyDocUpdateDate',
-			title: '更新情况',
-			width: 150,
-			rowspan: 2,
-			align: 'left',
-			templet: function (e) {
-				if (!e.policyDocUpdateDate) {
-					return '<div  id="policyDocUpdateDate">暂无更新</div>';
-				}
-				var interval = GetNumberOfDays(e.policyDocUpdateDate, nowDate)
-
-				if (interval <= 90) {
-					// var ele = document.getElementById("releaseDate");           //  先导航到要改的标签
-					cls = 'marker2-three'
-					return '<div  id="policyDocUpdateDate" class="' + cls + '">' + e.policyDocUpdateDate + ' ' + interval + '天前</div>';
-
-				} else if (interval <= 90 || interval <= 180) {
-					// var ele=document.getElementById("releaseDate");           //  先导航到要改的标签
-					// ele.style.background="#FD8F00";
-					cls = 'marker2-one'
-					return '<div  id="policyDocUpdateDate" class="' + cls + '">' + e.policyDocUpdateDate + ' ' + interval + '天前</div>';
-
-
-				} else if (interval >= 180) {
-					// var ele=document.getElementById("releaseDate");           //  先导航到要改的标签
-					// ele.style.background="#e10000";
-					cls = 'marker2-two'
-					return '<div  id="policyDocUpdateDate" class="' + cls + '">' + e.policyDocUpdateDate + ' ' + interval + '天前</div>';
-				} else
-					return '<div  id="policyDocUpdateDate">暂无更新</div>';
-
-
-			}
-		},
-		{
 			field: 'policyDocYearCount',
 			title: '政策文件<br>(近一年内更新数)',
 			width: 140,

+ 14 - 1
nngkxxdp/src/main/resources/static/page/js/base/fbtx.item.js

@@ -111,6 +111,10 @@ function gtTimeReleaseArticle(){
 				}, function(res){
 					if(res.result){
 						var data = res.data;
+						// 去掉点击标识
+						$('span[data-click="click"]').removeAttr('data-click');
+						// 添加点击标识
+						dom.attr("data-click", "click");
 						openCheckPhoneWindows(data);
 					}else{
 						if(res.msg){
@@ -204,9 +208,18 @@ function addMessage(types, index){
 			}
 		}
 	}
+
+	// 获取栏目
+	var columnEle = $($('span[data-click="click"]').parents('div')[0]).children('div').children('p').children('a');
+	var columns = [];
+	columnEle.each(function () {
+		columns.push($(this).text());
+	})
+
 	post("/api/smsmessage/add", true, {
 		"telephones" : JSON.stringify(telephones),
-		"senduerid" : sessionStorage.USERID
+		"senduerid" : sessionStorage.USERID,
+		"columns": columns.join(',')
 	}, function(res){
 		if(res.result){
 			layer.close(index);

+ 2 - 2
nngkxxdp/src/main/resources/static/wzkp/css/wzkp.css

@@ -476,7 +476,7 @@ body {
     border-radius: 15px 0 0 0 !important;
 }
 
-.table_wrap thead tr th:nth-last-child(2) {
+.table_wrap thead tr th:nth-last-child(1) {
     border-collapse: separate;
     border-spacing: 0;
     border-radius: 0 15px 0 0;
@@ -749,7 +749,7 @@ body {
     border-radius: 15px 0 0 0 !important;
 }
 
-.content_hide thead tr th:nth-last-child(2) {
+.content_hide thead tr th:nth-last-child(1) {
     border-collapse: separate !important;
     border-spacing: 0 !important;
     border-radius: 0 15px 0 0  !important;