问卷 服务器信息

master
zhangshanxue 2019-09-10 16:17:18 +08:00
parent 0bc872f1c7
commit d7c9280ec2
20 changed files with 467 additions and 49 deletions

View File

@ -1,10 +1,15 @@
package com.jmfy.controller;
import com.google.gson.Gson;
import com.jmfy.dao.CUserDao;
import com.jmfy.model.CAdmin;
import com.jmfy.model.CQuestionCoreBean;
import com.jmfy.model.vo.CAdminVo;
import com.jmfy.model.vo.CQuestSendVo;
import com.jmfy.model.vo.PowersVo;
import com.jmfy.redisProperties.RedisUserKey;
import com.jmfy.utils.JsonUtil;
import com.jmfy.utils.RedisUtil;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
@ -14,9 +19,7 @@ import com.jmfy.WebSecurityConfig;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.*;
/**
* Created by huangds on 2017/10/24.
@ -216,4 +219,5 @@ public class LoginController {
return power.toString();
}
}

View File

@ -1,12 +1,16 @@
package com.jmfy.controller;
import com.google.gson.Gson;
import com.jmfy.dao.QuestDao;
import com.jmfy.dao.ServerInfoDao;
import com.jmfy.dao.impl.GSUserDaoImpl;
import com.jmfy.model.*;
import com.jmfy.model.vo.CQuestSendVo;
import com.jmfy.model.vo.CQuestVo;
import com.jmfy.model.vo.CUserVo;
import com.jmfy.redisProperties.GlobalsDef;
import com.jmfy.redisProperties.RedisUserKey;
import com.jmfy.utils.JsonUtil;
import com.jmfy.utils.RedisUtil;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
@ -16,10 +20,9 @@ import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* Created by huangds on 2017/10/24.
@ -33,6 +36,9 @@ public class QuestionController {
@Resource
private GSUserDaoImpl gsUserDao;
private Gson gson = new Gson();
private static final DateFormat ymdhmsFormat_new = new SimpleDateFormat("yyyyMMddHHmm");
@RequestMapping(value = "/updataQuest", method = {RequestMethod.POST, RequestMethod.GET})
public @ResponseBody
int sendNotice(HttpSession session, HttpServletRequest request) throws Exception {
@ -43,14 +49,19 @@ public class QuestionController {
serverList.add(serverInfo.getServer_id());
}
Map<String, String[]> map = request.getParameterMap();
CQuestionBean cQuestion = getQuest(request);
if (null == cQuestion) {
return 1;
}
String serveIds = request.getParameter("serverId");
CQuestionCoreBean cQuestionCoreBean = new CQuestionCoreBean();
cQuestionCoreBean.setcQuestionBean(cQuestion);
cQuestionCoreBean.setServerId(serveIds);
RedisUtil.getInstence().putMapEntry(RedisUserKey.QUESTION_FROMBACK_ALL,
"", cQuestion.getId(), cQuestionCoreBean, GlobalsDef.REDIS_OVER_FOREVER);
if (serveIds.equals("0")) {//全服
for (ServerInfo serverInfo : allServerInfo) {
CQuestionBean cQuestion = getQuest(request);
if (null == cQuestion) {
continue;
}
try {
questDao.updataQuest(cQuestion, serverInfo.getServer_id());
} catch (Exception e) {
@ -64,10 +75,6 @@ public class QuestionController {
if (!serverList.contains(str)) {
continue;
}
CQuestionBean cQuestion = getQuest(request);
if (null == cQuestion) {
continue;
}
try {
questDao.updataQuest(cQuestion, str);
} catch (Exception e) {
@ -99,18 +106,20 @@ public class QuestionController {
String[] questions = paramMap.get("question");
String[] questiontype = paramMap.get("questiontype");
String[] answertype = paramMap.get("answertype");
if (questions.length != questiontype.length) {
return null;
}
for (int i = 0; i < questions.length; i++) {
if (questiontype[i] == "2") {
if (questiontype[i].equals("2")) {
continue;
} else {
int j = i + 1;
String index = "questiontype_" + j + "_select";
CQuestionOptionBean cQuestionOptionBean = new CQuestionOptionBean();
cQuestionOptionBean.setType(Integer.valueOf(questiontype[i]));
cQuestionOptionBean.setAnswerType(Integer.valueOf(answertype[i]));
cQuestionOptionBean.setContent(questions[i]);
cQuestionOptionBean.setOptions(paramMap.get(index));
cQuestion.getcQuestionOptionBeans().add(cQuestionOptionBean);
@ -135,14 +144,18 @@ public class QuestionController {
}
if (serveIds.equals("0")) {//全服
for (ServerInfo serverInfo : allServerInfo) {
for (GSUser gsUser: gsUserDao.findAllUserInfo(Integer.valueOf(serverInfo.getServer_id()),Integer.valueOf(questId))){
CQuestVo cQuestVo = getcUserVo(gsUser,questId);
if(null==cQuestVo){
continue;
try {
for (GSUser gsUser : gsUserDao.findAllUserInfo(Integer.valueOf(serverInfo.getServer_id()), Integer.valueOf(questId))) {
CQuestVo cQuestVo = getcUserVo(gsUser, questId);
if (null == cQuestVo) {
continue;
}
cQuestVo.setServerId(Integer.valueOf(serverInfo.getServer_id()));
cQuestVos.add(cQuestVo);
}
cQuestVo.setServerId(Integer.valueOf(serverInfo.getServer_id()));
cQuestVos.add(cQuestVo);
} catch (Exception e) {
}
}
} else { // 发送指定服务器公告
String[] split = serveIds.split(",");
@ -150,9 +163,9 @@ public class QuestionController {
if (!serverList.contains(str)) {
continue;
}
for (GSUser gsUser: gsUserDao.findAllUserInfo(Integer.valueOf(str),Integer.valueOf(questId))){
CQuestVo cQuestVo = getcUserVo(gsUser,questId);
if(null==cQuestVo){
for (GSUser gsUser : gsUserDao.findAllUserInfo(Integer.valueOf(str), Integer.valueOf(questId))) {
CQuestVo cQuestVo = getcUserVo(gsUser, questId);
if (null == cQuestVo) {
continue;
}
cQuestVo.setServerId(Integer.valueOf(str));
@ -166,7 +179,7 @@ public class QuestionController {
}
private CQuestVo getcUserVo(GSUser gsUser, String questId){
private CQuestVo getcUserVo(GSUser gsUser, String questId) {
CQuestVo cQuestVo = new CQuestVo();
if (gsUser == null) {
return null;
@ -174,11 +187,76 @@ public class QuestionController {
cQuestVo.setUserId(gsUser.getId());
cQuestVo.setLevel(gsUser.getPlayerManager().getLevel());
cQuestVo.setSave_amt(gsUser.getPlayerManager().getRechargeInfo().getSaveAmt());
List<String> answers = gsUser.getQuestionManagerBean().getAnswerMap().getOrDefault(questId,new ArrayList<>());
List<String> answers = gsUser.getQuestionManagerBean().getAnswerMap().getOrDefault(questId, new ArrayList<>());
String[] strings = new String[answers.size()];
cQuestVo.setAnswer(answers.toArray(strings));
}
return cQuestVo;
}
@RequestMapping(value = "/sendquestion", method = {RequestMethod.POST, RequestMethod.GET})
public String sendquestion(HttpSession session, ModelMap map, HttpServletRequest request) throws Exception {
Set<CQuestSendVo> cQuestSendVo;
HashMap<String, String> parameterMap = JsonUtil.getInstence().getParameterMap(request);
String serveIds = request.getParameter("serverId");
String backtype = parameterMap.get("backtype");
switch (backtype) {
case "0":
cQuestSendVo = new TreeSet<>((o1, o2) -> -1);
break;
case "1":
cQuestSendVo = new TreeSet<>((o1, o2) -> {
if (Long.valueOf(o1.getStart()) > Long.valueOf(o2.getStart())) {
return -1;
} else if (Long.valueOf(o1.getStart()).equals(Long.valueOf(o2.getStart()))) {
return 0;
} else {
return 1;
}
});
break;
default:
cQuestSendVo = new TreeSet<>((o1, o2) -> {
if (Long.valueOf(o1.getEnd()) > Long.valueOf(o2.getEnd())) {
return -1;
} else if (Long.valueOf(o1.getEnd()).equals(Long.valueOf(o2.getEnd()))) {
return 0;
} else {
return 1;
}
});
}
List<String> filter = new ArrayList<>();
if (!serveIds.equals("0")) {
String[] split = serveIds.split(",");
filter = Arrays.asList(split);
}
Map<String, String> valueMap = RedisUtil.getInstence().getRedisMapString(RedisUserKey.QUESTION_FROMBACK_ALL + RedisUserKey.Delimiter_colon);
if (filter.size() != 0) {
filter.forEach(valueMap::remove);
}
Map<String, String> treeMap = new TreeMap<>(valueMap);
treeMap.forEach((key, value) -> {
CQuestionCoreBean cQuestionCoreBean = gson.fromJson(value, CQuestionCoreBean.class);
CQuestSendVo cQuestSendVo1 = new CQuestSendVo();
cQuestSendVo1.setServerid(cQuestionCoreBean.getServerId());
cQuestSendVo1.setId(Integer.valueOf(key));
Date data = new Date(Long.valueOf(cQuestionCoreBean.getcQuestionBean().getStart()) * 1000L);
cQuestSendVo1.setStart(ymdhmsFormat_new.format(data));
Date data2 = new Date(Long.valueOf(cQuestionCoreBean.getcQuestionBean().getEnd()) * 1000L);
cQuestSendVo1.setEnd(ymdhmsFormat_new.format(data2));
cQuestSendVo1.setValue(value);
cQuestSendVo.add(cQuestSendVo1);
});
map.addAttribute("cQuestSendVo", cQuestSendVo);
return "questsendInfo";
}
}

View File

@ -40,6 +40,10 @@ public class ServerInfoController {
serverInfoVo.setServer_id(String.valueOf(serverInfo.getServer_id()));
serverInfoVo.setName(serverInfo.getName());
serverInfoVo.setStatus(Integer.valueOf(serverInfo.getStatus()));
if(null!= serverInfo.getIs_new()){
serverInfoVo.setIsnew(Integer.valueOf(serverInfo.getIs_new()));
}
CServerOpenTime cServerOpenTime = RedisUtil.getInstence().getObject(RedisUserKey.SERVER_OPEN_TIME_KEY, serverInfo.getServer_id(),
CServerOpenTime.class, GlobalsDef.REDIS_OVER_TIME);
if (cServerOpenTime !=null){
@ -54,6 +58,14 @@ public class ServerInfoController {
return "findServerInfo";
}
/**
*
* @param session
* @param map
* @param id
* @return
* @throws Exception
*/
@RequestMapping(value = "/toServerInfoEdit", method = {RequestMethod.POST, RequestMethod.GET})
public String toServerInfoEdit(HttpSession session, ModelMap map, int id) throws Exception {
ServerInfo serverInfo = serverInfoDao.getServerinfo(id);
@ -64,16 +76,18 @@ public class ServerInfoController {
public String toServerInfoEdit(HttpSession session, ModelMap map , HttpServletRequest request) throws Exception {
List<ServerInfoVo> serverInfoVos = new ArrayList<>();
int status = Integer.parseInt(request.getParameter("status"));
// int isWhite = Integer.parseInt(request.getParameter("isWhite"));
String name = request.getParameter("name");
int server_id = Integer.parseInt(request.getParameter("server_id"));
int isnew = Integer.parseInt(request.getParameter("isnew"));
// int isCommend = Integer.parseInt(request.getParameter("isCommend"));
serverInfoDao.updateServerInfo(server_id,status,0,0);
serverInfoDao.updateServerInfo(server_id,status,0,isnew,name);
ServerInfo serverInfo = serverInfoDao.getServerinfo(server_id);
if (serverInfo != null){
ServerInfoVo serverInfoVo = new ServerInfoVo();
serverInfoVo.setServer_id(String.valueOf(serverInfo.getServer_id()));
serverInfoVo.setName(serverInfo.getName());
serverInfoVo.setStatus(Integer.valueOf(serverInfo.getStatus()));
serverInfoVo.setIsnew(isnew);
serverInfoVos.add(serverInfoVo);
}else{
return "404";

View File

@ -15,7 +15,7 @@ public interface ServerInfoDao {
void openServerWhite(int server_id) throws Exception;
void updateServerInfo(int server_id, int status,int isWhite,int isCommend) throws Exception;
void updateServerInfo(int server_id, int status,int isWhite,int isnew,String name) throws Exception;
void updateOpenServerTime(CServerOpenTime cServerOpenTime) throws Exception;

View File

@ -75,7 +75,7 @@ public class GSUserDaoImpl implements GSUserDao {
public List<GSUser> findAllUserInfo(int serverId,int questionId) throws Exception {
String dbName = MongoName.getMongoDBName(serverId);
MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName);
Query query = new Query(Criteria.where("questionManager.questionMap."+questionId).exists(true));
Query query = new Query(Criteria.where("questionManager.answerMap."+questionId).exists(true));
return mongoTemplate.find(query,GSUser.class);
}
}

View File

@ -59,11 +59,12 @@ public class ServerInfoDaoImpl implements ServerInfoDao {
}
@Override
public void updateServerInfo(int server_id, int status,int isWhite,int isCommend) throws Exception {
public void updateServerInfo(int server_id, int status,int isWhite,int is_new,String name) throws Exception {
Update update = new Update();
update.set("name",name);
update.set("status",status);
update.set("isWhite",isWhite);
update.set("is_ommend",isCommend);
update.set("is_new",is_new);
MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName);
Query query = new Query(Criteria.where("server_id").is(String.valueOf(server_id)));
mongoTemplate.updateMulti(query, update, ServerInfo.class);

View File

@ -0,0 +1,27 @@
package com.jmfy.model;
import java.util.ArrayList;
import java.util.List;
public class CQuestionCoreBean {
private String serverId;
private CQuestionBean cQuestionBean;
public String getServerId() {
return serverId;
}
public void setServerId(String serverId) {
this.serverId = serverId;
}
public CQuestionBean getcQuestionBean() {
return cQuestionBean;
}
public void setcQuestionBean(CQuestionBean cQuestionBean) {
this.cQuestionBean = cQuestionBean;
}
}

View File

@ -1,19 +1,13 @@
package com.jmfy.model;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class CQuestionOptionBean {
String content = "";
private String content = "";
private int answerType;
private int type;
private String[] options ;
public String getContent() {
return content;
}
@ -37,5 +31,13 @@ public class CQuestionOptionBean {
public void setOptions(String[] options) {
this.options = options;
}
public int getAnswerType() {
return answerType;
}
public void setAnswerType(int answerType) {
this.answerType = answerType;
}
}

View File

@ -43,6 +43,9 @@ public class ServerInfo {
@Field(value = "open_time")
private String open_time;
@Field(value = "is_new")
private String is_new;
public int get_id() {
return _id;
}
@ -122,4 +125,12 @@ public class ServerInfo {
public void setOpen_time(String open_time) {
this.open_time = open_time;
}
public String getIs_new() {
return is_new;
}
public void setIs_new(String is_new) {
this.is_new = is_new;
}
}

View File

@ -0,0 +1,50 @@
package com.jmfy.model.vo;
public class CQuestSendVo implements java.io.Serializable {
public int id;
public String serverid;
public String start;
public String endt;
public String value;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getStart() {
return start;
}
public void setStart(String start) {
this.start = start;
}
public String getEnd() {
return endt;
}
public void setEnd(String end) {
this.endt = end;
}
public String getServerid() {
return serverid;
}
public void setServerid(String serverid) {
this.serverid = serverid;
}
}

View File

@ -9,11 +9,17 @@ public class ServerInfoVo{
public String open_time ;
public int status;
public int is_new;
public long registerNum;
public long onlineNum;
public void setIsnew(int isnew) {
this.is_new = isnew;
}
public void setServer_id(String server_id) {
this.server_id = server_id;
}

View File

@ -16,6 +16,7 @@ public class RedisUserKey {
public final static String SERVER_OPEN_TIME_KEY = "Server_Open_Time_Key";
//问卷调查
public static final String QUESTION_FROMBACK = "QUESTION_FROMBACK";
public static final String QUESTION_FROMBACK_ALL = "QUESTION_FROMBACK_ALL";//所有问卷
}

View File

@ -267,6 +267,20 @@ public class RedisUtil {
redisObjectTemplate.opsForZSet().add(key, String.valueOf(uid), startTime);
}
public Map<String,String> getRedisMapString(String key){
try {
Map<String, String> reslut = new HashMap<>();
Map<Object, Object> map = redisObjectTemplate.opsForHash().entries(key);
for (Map.Entry<Object, Object> entry : map.entrySet()) {
reslut.put((String) entry.getKey(), (String) entry.getValue());
}
return reslut;
} catch (RedisConnectionFailureException e) {
LOGGER.error("------------------Redis 连接失败----------------msg={}", e);
}
return null;
}
public static void sleep(long millis) {
try {
Thread.sleep(millis);

View File

@ -43,7 +43,7 @@
服务器id</label>
<div class="formControls col-xs-8 col-sm-9">
<input type="text" name="serverId"
placeholder="服务器id, 问卷id为0 全服问卷 指定服务器问卷:服务器id,服务器id....." value=""
placeholder="服务器id, id为0 全服问卷 指定服务器问卷:服务器id,服务器id....." value=""
class="input-text"/>
<span class="SERVERID"></span>
</div>

View File

@ -0,0 +1,88 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
<meta http-equiv="Cache-Control" content="no-siteapp"/>
<!--[if lt IE 9]>
<script type="text/javascript" src="../lib/html5shiv.js"></script>
<script type="text/javascript" src="../lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="../static/h-ui/css/H-ui.min.css"/>
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/H-ui.admin.css"/>
<link rel="stylesheet" type="text/css" href="../lib/Hui-iconfont/1.0.8/iconfont.css"/>
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/skin/default/skin.css" id="skin"/>
<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/style.css"/>
<!--[if IE 6]>
<script type="text/javascript" src="../lib/DD_belatedPNG_0.0.8a-min.js"></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>问卷查询</title>
</head>
<body>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
<span class="c-gray en">&gt;</span>
问卷管理
<span class="c-gray en">&gt;</span>
问卷查询
<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="page-container" style="text-align: center">
<h1><span style="color: red">查询已发问卷</span></h1>
<form class="form form-horizontal" id="form-article-add" action="/sendquestion" method="post"
onsubmit="return getUserInfo()">
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
服务器id</label>
<div class="formControls col-xs-8 col-sm-9">
<input type="text" name="serverId"
placeholder="服务器id, id为0 全服问卷 指定服务器问卷:服务器id,服务器id....." value=""
class="input-text"/>
<span class="SERVERID"></span>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
</label>
<div class="formControls col-xs-8 col-sm-9">
<select name="backtype" class="input-text" id="answertype"><!--下拉列表-->
<option value="0" selected="selected">id排序</option>
<option value="1">发送时间排序</option>
<option value="2">结束时间排序</option>
</select>
</div>
</div>
<div class="row cl" style="text-align: center">
<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
<button class="btn btn-primary radius" type="submit" style="font-size: 15px"><i class="Hui-iconfont">&#xe665;</i>
查询
</button>
</div>
</div>
</form>
</div>
<script type="text/javascript" src="../lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="../lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="../static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="../static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
<script type="text/javascript" src="../lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript">
function getUserInfo() {
return true
}
</script>
</body>
</html>

View File

@ -48,7 +48,7 @@
服务器id</label>
<div class="formControls col-xs-8 col-sm-9">
<input type="text" name="serverId"
placeholder="服务器id, 问卷id为0 全服问卷 指定服务器问卷:服务器id,服务器id....." value=""
placeholder="服务器id, id为0 全服问卷 指定服务器问卷:服务器id,服务器id....." value=""
class="input-text"/>
<span class="SERVERID"></span>
</div>
@ -123,6 +123,16 @@
<a href="#" id="question_add1" class="btn btn-info">+</a>
<span class="REWARD"></span>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
</label>
<div class="formControls col-xs-8 col-sm-9">
<select name="answertype" class="input-text" id="answertype"><!--下拉列表-->
<option value="0" selected="selected">必选</option>
<option value="1">可选</option>
</select>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
@ -134,8 +144,8 @@
<option value="2">填空</option>
</select>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
</label> 选项A:<input type="text" name="questiontype_1_select" id="questiontype1_select_1"
@ -147,6 +157,17 @@
</label> 选项D:<input type="text" name="questiontype_1_select" id="questiontype1_select_4"
style="width: 150px"/>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
</label> 选项E:<input type="text" name="questiontype_1_select" id="questiontype1_select_5"
style="width: 150px"/>
</label> 选项F:<input type="text" name="questiontype_1_select" id="questiontype1_select_6"
style="width: 150px"/>
</label> 选项G:<input type="text" name="questiontype_1_select" id="questiontype1_select_7"
style="width: 150px"/>
</label> 选项H:<input type="text" name="questiontype_1_select" id="questiontype1_select_8"
style="width: 150px"/>
</div>
</div>
</div>
<div class="tabCon">
@ -215,13 +236,23 @@
'<span class="c-red">*</span>问题 标题&类型:</label> <div class="formControls col-xs-8 col-sm-9"> <input type="text" id="title_' + FieldCount + '" name="question" placeholder="" class="input-text"/> ' +
'<span class="NOTICETITLE"></span> </div>' +
'<a href="#" class="removeclass">×</a></div>' +
' <div class="row cl"> <label class="form-label col-xs-4 col-sm-2"> </label> <div class="formControls col-xs-8 col-sm-9"> <select name="answertype" class="input-text" id="answertype' + FieldCount + '"><!--下拉列表--> ' +
'<option value="0" selected="selected">必选</option> <option value="1">可选</option> </select> </div> ' +
'</div> ' +
' <div class="row cl"> <label class="form-label col-xs-4 col-sm-2"> </label> <div class="formControls col-xs-8 col-sm-9"> <select name="questiontype" class="input-text" id="selectExample_' + FieldCount + '"><!--下拉列表--> ' +
'<option value="0" selected="selected">单选</option> <option value="1">多选</option> <option value="2">填空</option> </select> </div> ' +
'</div> <div class="row cl"> <label class="form-label col-xs-4 col-sm-2"> </label> ' +
'</div> ' +
'<div class="row cl"> <label class="form-label col-xs-4 col-sm-2"> </label> ' +
'选项A:<input type="text" name="questiontype_' + FieldCount + '_select" id="questiontype_' + FieldCount + '_select_1" style="width: 150px"/> </label> ' +
'选项B:<input type="text" name="questiontype_' + FieldCount + '_select" id="questiontype_' + FieldCount + '_select_2" style="width: 150px"/> </label> ' +
'选项C:<input type="text" name="questiontype_' + FieldCount + '_select" id="questiontype_' + FieldCount + '_select_3" style="width: 150px"/> </label> ' +
'选项D:<input type="text" name="questiontype_' + FieldCount + '_select" id="questiontype_' + FieldCount + '_select_4" style="width: 150px"/> </div></div>');
'选项D:<input type="text" name="questiontype_' + FieldCount + '_select" id="questiontype_' + FieldCount + '_select_4" style="width: 150px"/> </div>' +
'<div class="row cl"> <label class="form-label col-xs-4 col-sm-2"> </label> ' +
'选项E:<input type="text" name="questiontype_' + FieldCount + '_select" id="questiontype_' + FieldCount + '_select_5" style="width: 150px"/> </label> ' +
'选项F:<input type="text" name="questiontype_' + FieldCount + '_select" id="questiontype_' + FieldCount + '_select_6" style="width: 150px"/> </label> ' +
'选项G:<input type="text" name="questiontype_' + FieldCount + '_select" id="questiontype_' + FieldCount + '_select_7" style="width: 150px"/> </label> ' +
'选项H:<input type="text" name="questiontype_' + FieldCount + '_select" id="questiontype_' + FieldCount + '_select_8" style="width: 150px"/> </div>'+
'</div>');
x++;
}
return false;

View File

@ -36,6 +36,7 @@
<th width="200">服务器名字</th>
<th width="200">开启时间</th>
<th width="200">服务器状态</th>
<th width="200">新服推荐</th>
<th width="240">操作</th>
</tr>
</thead>
@ -52,6 +53,10 @@
<span th:case="3" class="Hui-iconfont" style="color: #9cb945">拥挤</span>
<span th:case="4" class="Hui-iconfont" style="color: #8b0000;">爆满 </span>
</th>
<th th:switch="${obj.is_new}" style="text-align: center;">
<span th:case="0" class="label label-defaunt radius">普通</span>
<span th:case="1" class="Hui-iconfont" style="color: #2f332a">新服推荐</span>
</th>
<td class="td-manage">
<a title="" href="javascript:;" th:href="@{/toServerInfoEdit(id =${obj.server_id},status = ${obj.status})}" class="ml-5" style="text-decoration:none">

View File

@ -125,6 +125,7 @@
<ul>
<li><a data-href="/html/question.html" data-title="新增问卷" href="javascript:;">新增编辑</a></li>
<li><a data-href="/html/getquestInfo.html" data-title="问卷查询" href="javascript:;">问卷查询</a></li>
<li><a data-href="/html/getquestSendInfo.html" data-title="已发问卷" href="javascript::">已发问卷</a></li>
</ul>
</dd>
</dl>

View File

@ -0,0 +1,65 @@
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
<meta http-equiv="Cache-Control" content="no-siteapp"/>
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css"/>
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css"/>
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css"/>
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin"/>
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css"/>
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js"></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>问卷信息</title>
</head>
<nav class="breadcrumb">
<a href="javascript:;" onclick="history.go(-1)"><i class="Hui-iconfont">&#xe67f;</i> 首页</a>
<span class="c-gray en">&gt;</span> 问卷信息管理 <span class="c-gray en">&gt;</span> 问卷信息查询
</nav>
<div class="page-container">
<div class="text-c">
<h1><span style="color:red;">已发问卷</span></h1>
</div>
<table class="table table-border table-bordered table-bg table-hover table-sort table-responsive" width="10000px">
<thead>
<tr class="text-c">
<th width="500">ID</th>
<th width="500">serverid</th>
<th width="500">sendTime</th>
<th width="500">endTime</th>
<th width="6000">question</th>
</tr>
</thead>
<tbody>
<tr th:each="obj:${cQuestSendVo}">
<td th:text="${obj.id}" style="text-align: center;"></td>
<td th:text="${obj.serverid}" style="text-align: center;"></td>
<td th:text="${obj.start}" style="text-align: center;"></td>
<td th:text="${obj.endt}" style="text-align: center;"></td>
<td th:text="${obj.value}" style="text-align: center;"></td>
</tr>
</tbody>
</table>
</div>
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="static/h-ui/js/H-ui.min.js"></script>
<script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.js"></script>
<script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript">
</script>
</body>
</html>

View File

@ -50,6 +50,14 @@
<input type="text" name="server_id" placeholder="" th:value="*{server_id}" class="input-text"/>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
服务器id</label>
<div class="formControls col-xs-8 col-sm-9">
<input type="text" name="name" placeholder="" th:value="*{name}" class="input-text"/>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
@ -64,6 +72,18 @@
</select>
</div>
</div>
<div class="row cl">
<label class="form-label col-xs-4 col-sm-2">
<span class="c-red">*</span>
服务器推荐:</label>
<div class="formControls col-xs-8 col-sm-9">
<input type="hidden" id ="isnew" th:value="*{is_new}"/>
<select th:name="isnew" class="input-text" id="isnew1"><!--下拉列表-->
<option th:value="0">普通</option>
<option th:value="1">新服</option>
</select>
</div>
</div>
</div>
</div>