Commit 2a1dafa5 by 朱天成

投票,会议更改

parent bd72156a
<%@page contentType="text/html; charset=UTF-8"%>
<form id="inputForm" method="post" style="width: 100%;">
<input type="hidden" name="FIELD_OPETYPE" id="OPETYPE" value="${is_row.OPETYPE}"/>
<input type="hidden" name="FIELD_UUID" id="UUID" value="${is_row.UUID}"/>
<table align="center" border="0" cellpadding="0" cellspacing="0" class="tableStyle" style="margin: 10px 15px; width: 95%; line-height: 30px;">
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>用户名:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" id="USE_NAME" name="FIELD_USE_NAME" style="width:600px" required=true value="${is_row.USE_NAME}"/>
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>联系电话:</span>
</td>
<td style="width: 85%">
<input class="easyui-numberbox" id="PHONE" name="FIELD_PHONE" style="width:600px" required=true value="${is_row.PHONE}"/>
</td>
</tr>
<tr>
</table>
</form>
\ No newline at end of file
<%@page contentType="text/html; charset=UTF-8"%>
<%@ include file="/gaowj/header-simple-1.0.jsp"%>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="/WEB-INF/tld/functions.tld" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ page language="java" import="java.util.Map" pageEncoding="utf-8"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%
String localPath = request.getContextPath();
String commonPath = localPath + "/gaowj";
String cmpPath = request.getRequestURI(); //获取页面路径地址
String themePath = commonPath + "/ria/ria-1.0/gaowj/themes/default/css";
String yearMonthFormatter = "yyyy-MM"; //年月格式
String yearFormatter = "yyyy"; //年月格式
%>
<script type="text/javascript">
//初始化系统参数
gaowj = {};
gaowj.WEB_APP_NAME = "<%=localPath%>";
</script>
<fmt:setBundle basename="param1" var="p1"/>
<fmt:message key="common.date.pattern.dateZH" var="dateZH" bundle="${p1}"/>
<fmt:message key="common.date.pattern.date_1" var="date_1" bundle="${p1}"/>
<fmt:message key="common.date.pattern.datetimeZH" var="datetimeZH" bundle="${p1}"/>
<fmt:message key="common.date.pattern.datetime_1" var="datetime_1" bundle="${p1}"/>
<!--example
<fmt:formatDate value="${col.issueTime}" pattern="${dateZH}" />
-->
<script type="text/javascript" src="<%=localPath %>/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="<%=localPath %>/js/jquery-ui1.11.2.min.js"></script>
<script type="text/javascript" src="<%=commonPath %>/ria/jquery/jquery-easyui-1.4.1/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=commonPath %>/ria/jquery/jquery-easyui-1.4.1/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=localPath %>/js/ajaxfileupload.js"></script>
<script type="text/javascript" src="<%=localPath %>/jwapp/common/js/lang_json.js"></script>
<script type="text/javascript" src="<%=localPath %>/jwapp/common/js/common_util.js"></script>
<script type="text/javascript" src="<%=localPath %>/jwapp/common/js/common_luosz_util.js"></script>
<script type="text/javascript" src="<%=commonPath %>/ria/jquery/zTree_v3/js/jquery.ztree.core-3.5.js"></script>
<script type="text/javascript" src="<%=commonPath %>/ria/jquery/zTree_v3/js/jquery.ztree.excheck-3.5.js"></script>
<!-- 加载百度编辑器 -->
<script type="text/javascript" charset="utf-8" src="<%=localPath%>/js/ueditor1_4_3/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="<%=localPath%>/js/ueditor1_4_3/ueditor.all.min.js"> </script>
<!--建议手动加在语言,避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型,比如你在配置项目里配置的是英文,这里加载的中文,那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="<%=localPath%>/js/ueditor1_4_3/lang/zh-cn/zh-cn.js"></script>
<link rel="stylesheet" type="text/css" href="<%=commonPath%>/ria/jquery/jquery-easyui-1.4.1/themes/default/easyui.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="<%=commonPath%>/ria/jquery/jquery-easyui-1.4.1/themes/icon.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="<%=commonPath%>/ria/jquery/zTree_v3/css/zTreeStyle/zTreeStyle.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="<%=localPath%>/jwapp/common/css/choice_user/common.css" charset="utf-8"></link>
<link rel="stylesheet" href="${ctx}/custom/plug/webupload/css/webuploader.css" type="text/css"></link>
<script src="${ctx}/custom/plug/webupload/js/webuploader.js"></script>
<script src="${ctx}/custom/plug/webupload/js/webuploaderExtend.js"></script>
<div id="check_inTab">
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_body.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_table.css" charset="utf-8"></link>
......
......@@ -53,7 +53,7 @@ var is_column = [ [
return '<div class=\'optBtns\'>'+(row.MEETING_COUNT>0?votedBtn:voteBtn)+'</div>';
}
}
},
] ];
//列表加载完成回调
function reportrollback(){
......@@ -64,9 +64,7 @@ function rowstyler(index,row){
}
//展示列表
reportgrid("list",ls_title,gaowj.WEB_APP_NAME + "/meetingData_list",queryData,is_column,60,80);
reportgrid("list",ls_title,gaowj.WEB_APP_NAME + "/meetingNoLoginData_list",queryData,is_column,60,80);
/**
* 序号:
......@@ -78,18 +76,26 @@ reportgrid("list",ls_title,gaowj.WEB_APP_NAME + "/meetingData_list",queryData,is
* 单位:杰夫兄弟智慧科技有限公司
* 备注:需更改
**/
function check_inRow(index){
$('#list').datagrid('selectRow',index);
//加载增加子页面
function check_inRow(){
var is_row={OPETYPE:'insert'};
openEditRow("meetingNoLoginView_checkTabDetail",is_row,"签到",true,0.65,0.95,0,0);
}
//加载增加子页面成功后的回调
function addUrlOnloadCallback(is_row){
}
//保存
function insertData(is_entity,index){
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
var code = is_row[0].UUID;
var v_query = {};
v_query.FIELD_MEETING_ID = code;
var v_result = meetingModule.meetingActAction.insertCheck_in(v_query);
is_entity.FIELD_MEETING_ID=is_row[0].UUID
var v_result = meetingModule.meetingNoLoginActAction.insertCheck_in(is_entity);
$('#list').datagrid('reload');
return v_result;
}
/**
* 序号:
* 功能:刷新
......@@ -102,7 +108,7 @@ function check_inRow(index){
**/
function refreshRow(){
$('#list').datagrid('load',{});
$("#meetingTab_searchForm")[0].reset();
$("#check_inTab_searchForm")[0].reset();
}
/****/
......@@ -117,7 +123,7 @@ function refreshRow(){
* 备注:需更改
**/
function searchRow(){
var v_query = $("#meetingTab_searchForm").getFormVal();
var v_query = $("#check_inTab_searchForm").getFormVal();
$('#list').datagrid('load',v_query);
}
/****/
......
......@@ -27,7 +27,10 @@ meetingModule.prototype.listAll = function(){};
meetingModule.meetingActAction = new meetingModule("json").delegate("meetingAct");
//创建一个数据获取对象,然后再后续使用
meetingModule.meetingDataAction = new meetingModule("json").delegate("meetingData");
//创建一个数据操作对象,然后再后续使用
meetingModule.meetingNoLoginActAction = new meetingModule("json").delegate("meetingNoLoginAct");
//创建一个数据获取对象,然后再后续使用
meetingModule.meetingNoLoginDataAction = new meetingModule("json").delegate("meetingNoLoginData");
//说明: 1、所有方法里统一传递josn格式的参数,用于后台交互,如data.listTables(param) ,如没有参数则传'{}',如data.listTables({})
// 2、前后台数据获取传输协议 如:json[{'0':{pageCount':'2','pageNo':'1','pageSize':'20','rowSet':'[{0},{1}....]'}}]
......
......@@ -45,7 +45,7 @@ var is_column = [ [
{field : 'MEETING_NAME',title : '会议名称',width : 100,align : 'center'},
{field : 'MEETING_CONTENT',title : '会议内容',width : 300,align : 'center'},
{field : 'VENUE',title : '会议地址',width : 300,align : 'center'},
{field : 'HOST',title : '主持人',width : 80,align : 'center'},
{field : 'HOST_USER',title : '主持人',width : 80,align : 'center'},
{field : 'START_TIME',title : '开始时间',width : 150,align : 'center'},
{field : 'END_TIME',title : '结束时间',width : 150,align : 'center'},
{field : 'CHECK_START_TIME',title : '签到开始时间',width : 150,align : 'center'},
......
......@@ -16,7 +16,7 @@
<span>主持人:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" id="HOST" name="FIELD_HOST" style="width:600px" required=true value="${is_row.HOST}"/>
<input class="easyui-textbox" id="HOST_USER" name="FIELD_HOST_USER" style="width:600px" required=true value="${is_row.HOST_USER}"/>
</td>
</tr>
<tr>
......
......@@ -66,7 +66,7 @@ function rowstyler(index,row){
}
//展示列表
reportgrid("list",ls_title,gaowj.WEB_APP_NAME + "/voteData_list_ongoing",queryData,is_column,60,80);
reportgrid("list",ls_title,gaowj.WEB_APP_NAME + "/voteNoLoginData_list_ongoing",queryData,is_column,60,80);
/****/
......@@ -117,12 +117,12 @@ function editRow(index) {
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
is_row[0].OPETYPE = 'update';
openEditRow("voteView_userVoteTabDetail",is_row[0],"投票",true,0.65,0.95,0,0);
openEditRow("voteNoLoginView_userVoteTabDetail",is_row[0],"投票",true,0.65,0.95,0,0);
}
//加载投票子页面成功后的回调
function updateUrlOnloadCallback(is_row){
var listItem=voteModule.voteDataAction.listItem({
var listItem=voteModule.voteNoLoginDataAction.listItem({
FIELD_MANAGE_ID:is_row.UUID
}).listItems;
......@@ -144,6 +144,7 @@ function updateData(is_entity){
var min=$("input[name=FIELD_MIN_COUNT]").val();
var max=$("input[name=FIELD_MAX_COUNT]").val();
var flag=$("input[name=FIELD_STATUS_FLAG]").val();
var anonymous=$("input[name=FIELD_ANONYMOUS]").val();
//判断用户选择的选项是否在上下限之间,如果不在,则提示用户,不进行提交操作
if(min==max&&i!=min){
$.messager.alert("必须选择"+max+"个选项");
......@@ -158,7 +159,8 @@ function updateData(is_entity){
}
is_entity.FIELD_UUIDS=uuids;
is_entity.FIELD_FLAG =flag;
v_result = voteModule.voteActAction.insertUserVote(is_entity);
is_entity.FIELD_ANONYMOUS =anonymous;
v_result = voteModule.voteNoLoginActAction.insertUserVote(is_entity);
$('#list').datagrid('reload');
return v_result;
}
......@@ -169,7 +171,7 @@ function lookfor(index){
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
is_row[0].OPETYPE = 'lookfor';
openLookRow("voteView_userVoteTabDetail",is_row[0],"查看",true,0.65,0.95,0,0);
openLookRow("voteNoLoginView_userVoteTabDetail",is_row[0],"查看",true,0.65,0.95,0,0);
}
function openLookRow(editUrl,is_row,is_title,is_max,is_width,is_height,is_left,is_top){
......@@ -206,11 +208,11 @@ function openLookRow(editUrl,is_row,is_title,is_max,is_width,is_height,is_left,i
//加载投票子页面成功后的回调
function lookforUrlOnloadCallback(is_row,index){
var listItem=voteModule.voteDataAction.listItem({
var listItem=voteModule.voteNoLoginDataAction.listItem({
FIELD_MANAGE_ID:is_row.UUID
}).listItems;
var listUserChecked=voteModule.voteDataAction.listUserChecked({
var listUserChecked=voteModule.voteNoLoginDataAction.listUserChecked({
FIELD_MANAGE_ID:is_row.UUID
}).listusercheckeds;
......
......@@ -34,6 +34,10 @@ voteModule.prototype.listAll = function(){};
voteModule.voteActAction = new voteModule("json").delegate("voteAct");
//创建一个数据获取对象,然后再后续使用
voteModule.voteDataAction = new voteModule("json").delegate("voteData");
//创建一个数据操作对象,然后再后续使用
voteModule.voteNoLoginActAction = new voteModule("json").delegate("voteNoLoginAct");
//创建一个数据获取对象,然后再后续使用
voteModule.voteNoLoginDataAction = new voteModule("json").delegate("voteNoLoginData");
//说明: 1、所有方法里统一传递josn格式的参数,用于后台交互,如data.listTables(param) ,如没有参数则传'{}',如data.listTables({})
......
......@@ -41,6 +41,9 @@ var ls_ywlx = 'YBYW';
**/
//投票状态
var v_statusquery_data = [{CODE_ID:'0',CODE_NAME:'未开始'},{CODE_ID:'1',CODE_NAME:'已开始'},{CODE_ID:'2',CODE_NAME:'已结束'}];
//是否匿名
var v_anonymous_data = [{CODE_ID:'0',CODE_NAME:'匿名'},{CODE_ID:'1',CODE_NAME:'非匿名'}];
/****/
/**
......@@ -66,6 +69,11 @@ var is_column = [ [
}
},
{field : 'REALLY_END_TIME',title : '实际结束时间',width : 150,align : 'center'},
{field : 'ANONYMOUS',title : '是否匿名',width : 80,align : 'center',
formatter : function(value) {
return getCodeName(v_anonymous_data, value);
}
},
{field : 'START_TIME',title : '开始时间',width : 150,align : 'center'},
{field : 'END_TIME',title : '结束时间',width : 150,align : 'center'}
] ];
......@@ -135,6 +143,13 @@ function addRow(){
//加载增加子页面成功后的回调
function addUrlOnloadCallback(is_row){
initDateBox();
$('#ANONYMOUS').combobox({
data : v_anonymous_data,
valueField : 'CODE_ID',
textField : 'CODE_NAME',
editable:false,
panelHeight:'auto'
});
}
//保存
function insertData(is_entity){
......@@ -182,7 +197,13 @@ function updateUrlOnloadCallback(is_row){
editable:false,
panelHeight:'auto'
});
$('#ANONYMOUS').combobox({
data : v_anonymous_data,
valueField : 'CODE_ID',
textField : 'CODE_NAME',
editable:false,
panelHeight:'auto'
});
}
......
<%@page contentType="text/html; charset=UTF-8"%>
<%@ include file="/gaowj/header-simple-1.0.jsp"%>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="/WEB-INF/tld/functions.tld" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ page language="java" import="java.util.Map" pageEncoding="utf-8"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%
String localPath = request.getContextPath();
String commonPath = localPath + "/gaowj";
String cmpPath = request.getRequestURI(); //获取页面路径地址
String themePath = commonPath + "/ria/ria-1.0/gaowj/themes/default/css";
String yearMonthFormatter = "yyyy-MM"; //年月格式
String yearFormatter = "yyyy"; //年月格式
//
Map<String,Object> sessionUser = (Map<String,Object>)session.getAttribute("userInfo");
//
%>
<script type="text/javascript">
//初始化系统参数
gaowj = {};
gaowj.SEESION_STATE = "<%=sessionUser%>";
</script>
<fmt:setBundle basename="param1" var="p1"/>
<fmt:message key="common.date.pattern.dateZH" var="dateZH" bundle="${p1}"/>
<fmt:message key="common.date.pattern.date_1" var="date_1" bundle="${p1}"/>
<fmt:message key="common.date.pattern.datetimeZH" var="datetimeZH" bundle="${p1}"/>
<fmt:message key="common.date.pattern.datetime_1" var="datetime_1" bundle="${p1}"/>
<!--example
<fmt:formatDate value="${col.issueTime}" pattern="${dateZH}" />
-->
<script type="text/javascript" src="<%=localPath %>/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="<%=localPath %>/js/jquery-ui1.11.2.min.js"></script>
<script type="text/javascript" src="<%=commonPath %>/ria/jquery/jquery-easyui-1.4.1/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=commonPath %>/ria/jquery/jquery-easyui-1.4.1/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=localPath %>/js/ajaxfileupload.js"></script>
<script type="text/javascript" src="<%=localPath %>/jwapp/common/js/lang_json.js"></script>
<script type="text/javascript" src="<%=localPath %>/jwapp/common/js/common_util.js"></script>
<script type="text/javascript" src="<%=localPath %>/jwapp/common/js/common_luosz_util.js"></script>
<script type="text/javascript" src="<%=commonPath %>/ria/jquery/zTree_v3/js/jquery.ztree.core-3.5.js"></script>
<script type="text/javascript" src="<%=commonPath %>/ria/jquery/zTree_v3/js/jquery.ztree.excheck-3.5.js"></script>
<!-- 加载百度编辑器 -->
<script type="text/javascript" charset="utf-8" src="<%=localPath%>/js/ueditor1_4_3/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="<%=localPath%>/js/ueditor1_4_3/ueditor.all.min.js"> </script>
<!--建议手动加在语言,避免在ie下有时因为加载语言失败导致编辑器加载失败-->
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型,比如你在配置项目里配置的是英文,这里加载的中文,那最后就是中文-->
<script type="text/javascript" charset="utf-8" src="<%=localPath%>/js/ueditor1_4_3/lang/zh-cn/zh-cn.js"></script>
<link rel="stylesheet" type="text/css" href="<%=commonPath%>/ria/jquery/jquery-easyui-1.4.1/themes/default/easyui.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="<%=commonPath%>/ria/jquery/jquery-easyui-1.4.1/themes/icon.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="<%=commonPath%>/ria/jquery/zTree_v3/css/zTreeStyle/zTreeStyle.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="<%=localPath%>/jwapp/common/css/choice_user/common.css" charset="utf-8"></link>
<link rel="stylesheet" href="${ctx}/custom/plug/webupload/css/webuploader.css" type="text/css"></link>
<script src="${ctx}/custom/plug/webupload/js/webuploader.js"></script>
<script src="${ctx}/custom/plug/webupload/js/webuploaderExtend.js"></script>
<div id="userVoteTab">
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_body.css" charset="utf-8"></link>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_table.css" charset="utf-8"></link>
......
......@@ -22,6 +22,7 @@
<input type="hidden" name="FIELD_STATUS_FLAG" id="STATUS_FLAG" value="${is_row.STATUS_FLAG}" />
<input type="hidden" name="FIELD_MIN_COUNT" id="MIN_COUNT" value="${is_row.MIN_COUNT}" />
<input type="hidden" name="FIELD_MAX_COUNT" id="MAX_COUNT" value="${is_row.MAX_COUNT}" />
<input type="hidden" name="FIELD_ANONYMOUS" id="ANONYMOUS" value="${is_row.ANONYMOUS}" />
<table align="center" border="0" cellpadding="0" cellspacing="0" class="tableStyle" style="margin: 10px 15px; width: 95%; line-height: 30px;">
<tr>
<td style="width: 15%;" class="tableStyleLable">
......@@ -36,7 +37,7 @@
<form id="voteItemInputForm">
<div class="vote_item_content">
<div style="margin-bottom: 8px;" class="vote_item_item">
<input class="easyui-textbox" readonly="readonly" id="SUB_TITLE" name="FIELD_SUB_TITLE" style="width: 400px;" value="${is_row.SUB_TITLE}" a/>
<input class="easyui-textbox" readonly="readonly" id="SUB_TITLE" name="FIELD_SUB_TITLE" style="width: 400px;" value="${is_row.SUB_TITLE}" />
</div>
<div class="vote_item_list">
</div>
......
......@@ -57,6 +57,14 @@
<input id="END_TIME" name="FIELD_END_TIME" style="width: 400px" value="${is_row.END_TIME}" />
</td>
</tr>
<tr>
<td class="tableStyleLable">
<span>是否匿名:</span>
</td>
<td>
<input class="easyui-combobox" id="ANONYMOUS" name="FIELD_ANONYMOUS" style="width:100px" value="${is_row.ANONYMOUS}"/>
</td>
</tr>
</table>
</form>
<form id="voteItemInputForm">
......
......@@ -482,5 +482,52 @@
method="mobileVotemajor">
<result name="mobileVotemajor">/jfcas04_mobile/mobileVotemajor.jsp</result>
</action>
<!--会议签到-->
<action name="check_inTab" class="com.jw.app.portlet.action.viewAction"
method="check_inTab">
<result name="check_inTab">/jwapp/pages/meeting/check_inTab.jsp</result>
</action>
<action name="check_inTabDetail" class="com.jw.app.portlet.action.viewAction"
method="check_inTabDetail">
<result name="check_inTabDetail">/jwapp/pages/meeting/check_inTabDetail.jsp</result>
</action>
<!-- 会议管理NoLogin -->
<action name="meetingNoLoginAct_*" class="com.jw.app.meeting.action.actNoLoginAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="meetingNoLoginData_*" class="com.jw.app.meeting.action.dataNoLoginAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="meetingNoLoginView_*" class="com.jw.app.meeting.action.viewNoLoginAction" method="{1}">
<result name="{1}">/jwapp/pages/meeting/{1}.jsp</result>
</action>
<!-- 投票-->
<action name="ongoingVoteTab" class="com.jw.app.portlet.action.viewAction"
method="ongoingVoteTab">
<result name="ongoingVoteTab">/jwapp/pages/vote/ongoingVoteTab.jsp</result>
</action>
<action name="userVoteTabDetail" class="com.jw.app.portlet.action.viewAction"
method="userVoteTabDetail">
<result name="userVoteTabDetail">/jwapp/pages/vote/userVoteTabDetail.jsp</result>
</action>
<!-- 投票主题NoLogin -->
<action name="voteNoLoginAct_*" class="com.jw.app.vote.action.actNoLoginAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="voteNoLoginData_*" class="com.jw.app.vote.action.dataNoLoginAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="voteNoLoginView_*" class="com.jw.app.vote.action.viewNoLoginAction" method="{1}">
<result name="{1}">/jwapp/pages/vote/{1}.jsp</result>
</action>
</package>
</struts>
package com.jw.app.business.meeting;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
......@@ -59,19 +60,18 @@ public class MeetingBusinessImpl implements MeetingBusiness {
@Override
public void insert_check_in(Map<String, Object> entity) throws BusinessException {
List<Map<String, Object>> timeList = meetingDAO.list_checkTime(entity);
Map<String, Object> manemap=new HashMap<String, Object>();
manemap.put("MEETING_ID", entity.get("MEETING_ID"));
List<Map<String, Object>> timeList = meetingDAO.list_checkTime(manemap);
Map<String, Object> timeMap = timeList.get(0);
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
try {
Date startTime=sf.parse((String)timeMap.get("CHECK_START_TIME"));
Date endTime=sf.parse((String)timeMap.get("CHECK_END_TIME"));
Timestamp startTime=(Timestamp)timeMap.get("CHECK_START_TIME");
Timestamp endTime=(Timestamp)timeMap.get("CHECK_END_TIME");
Date thistime = new Date();
if (thistime.after(startTime) && thistime.before(endTime)) {
List<Map<String, Object>> items = meetingDAO.list_check_in(entity);
List<Map<String, Object>> items = meetingDAO.list_check_in(manemap);
if (items.size() == 0) {
entity.put("UUID", java.util.UUID.randomUUID().toString());
entity.put("PARTICIPANTS_ID", SessionUtil.getCode());
entity.put("PARTICIPANTS_NAME", SessionUtil.getEmname());
entity.put("CHECK_IN_TIME", new Date());
entity.put("CREATE_ID", SessionUtil.getCode());
entity.put("CREATE_TIME", new Date());
......@@ -94,7 +94,7 @@ public class MeetingBusinessImpl implements MeetingBusiness {
}
}
}
} catch (ParseException e) {
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
......
......@@ -20,6 +20,7 @@ import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
import com.gaowj.business.util.QueryParamUtil;
import com.gaowj.business.util.SessionUtil;
import com.gaowj.business.util.Status;
import com.gaowj.standard.utils.CacheKit;
public class VoteBusinessImpl implements VoteBusiness {
......@@ -93,6 +94,12 @@ public class VoteBusinessImpl implements VoteBusiness {
@Override
public void insert_userVote(Map<String, Object> entity) throws BusinessException {
String flag = (String) entity.get("STATUS_FLAG");
String anonymous = (String) entity.get("ANONYMOUS");
if (anonymous.equals("1")) {
if (SessionUtil.getCode() == null) {
entity.put("ERROR", "-1");
} else {
if (flag.equals("1")) {
String s = (String) entity.get("UUIDS");
List<String> uuidsList = Arrays.asList(s.split(","));
......@@ -102,12 +109,12 @@ public class VoteBusinessImpl implements VoteBusiness {
itemmap.put("UUID", java.util.UUID.randomUUID().toString());
itemmap.put("MANAGE_ID", entity.get("UUID"));
itemmap.put("ITEM_ID", item);
itemmap.put("VOTE_TIME", new Date());
itemmap.put("CREATE_TIME", new Date());
itemmap.put("UPDATE_TIME", new Date());
itemmap.put("USER_ID", SessionUtil.getCode());
itemmap.put("VOTE_TIME", SessionUtil.getCurrenttime());
itemmap.put("CREATE_ID", SessionUtil.getCode());
itemmap.put("CREATE_TIME", SessionUtil.getCurrenttime());
itemmap.put("UPDATE_ID", SessionUtil.getCode());
itemmap.put("UPDATE_TIME", SessionUtil.getCurrenttime());
// 动态传值插入
List<String> infoListKey = new ArrayList<String>();
List<Object> infoList = new ArrayList<Object>();
......@@ -125,6 +132,41 @@ public class VoteBusinessImpl implements VoteBusiness {
}
}
}
} else {
if (flag.equals("1")) {
String s = (String) entity.get("UUIDS");
List<String> uuidsList = Arrays.asList(s.split(","));
for (int i = 0; i < uuidsList.size(); i++) {
String item = uuidsList.get(i);
Map<String, Object> itemmap = new HashMap<String, Object>();
itemmap.put("UUID", java.util.UUID.randomUUID().toString());
itemmap.put("MANAGE_ID", entity.get("UUID"));
itemmap.put("ITEM_ID", item);
itemmap.put("VOTE_TIME", new Date());
itemmap.put("CREATE_TIME", new Date());
itemmap.put("UPDATE_TIME", new Date());
itemmap.put("USER_ID", null);
itemmap.put("CREATE_ID", null);
itemmap.put("UPDATE_ID", null);
// 动态传值插入
List<String> infoListKey = new ArrayList<String>();
List<Object> infoList = new ArrayList<Object>();
if (itemmap.keySet() != null) {
Set<String> key = itemmap.keySet();
// 将map集合中的key和value 取出来分别放到list集合里
for (String str : key) {
infoList.add(itemmap.get(str));
infoListKey.add(str);
}
itemmap.put("infoListKey", infoListKey);
itemmap.put("infoList", infoList);
}
voteDAO.insert_userVote(itemmap);
}
}
}
}
@Override
public void update_vote(Map<String, Object> entity) throws BusinessException {
......
package com.jw.app.meeting.action;
import java.util.List;
import java.util.Map;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import com.jw.app.business.MeetingBusiness;
import com.gaowj.business.SystemOpeBusiness;
import com.gaowj.business.action.BasicAction;
import com.gaowj.business.comp.BusinessManager;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.QueryParamUtil;
import com.gaowj.business.util.RequestUtils;
import com.gaowj.business.util.Status;
import com.gaowj.standard.utils.CacheKit;
public class actNoLoginAction extends BasicAction {
private static final long serialVersionUID = 4874796587941423898L;
private JSONObject jsonObject = new JSONObject();
public JSONObject getJsonObject() {
return jsonObject;
}
public void setJsonObject(JSONObject jsonObject) {
this.jsonObject = jsonObject;
}
/**
* 插入
*
* @param entity
* @throws BusinessException
*/
public String insertCheck_in() throws BusinessException {
MeetingBusiness business = BusinessManager.getBusiness(MeetingBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
jsonObject = new JSONObject();
try {
entity = QueryParamUtil.StringToDate(entity);
// 去除不要更新的字段
entity.remove("OPETYPE");
// 新增
business.insert_check_in(entity);
jsonObject.putAll(Status.getStatusSuccessMessage("保存成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("保存失败"));
e.printStackTrace();
}
return "json";
}
}
package com.jw.app.meeting.action;
import java.sql.SQLException;
import java.text.ParseException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.sf.json.JSONObject;
import com.jw.app.business.MeetingBusiness;
import com.gaowj.business.action.BasicAction;
import com.gaowj.business.comp.BusinessManager;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
import com.gaowj.business.util.PropUtil;
import com.gaowj.business.util.QueryParamUtil;
import com.gaowj.business.util.RequestUtils;
import com.gaowj.business.util.SessionUtil;
import com.gaowj.business.util.TestMd5;
import com.gaowj.standard.utils.CacheKit;
public class dataNoLoginAction extends BasicAction {
private static final long serialVersionUID = -3124390479024620362L;
private JSONObject jsonObject = new JSONObject();
private int rows = 20;// 每页显示的记录数
private int page = 1;// 当前第几页
public JSONObject getJsonObject() {
return jsonObject;
}
public void setJsonObject(JSONObject jsonObject) {
this.jsonObject = jsonObject;
}
public int getRows() {
return rows;
}
public void setRows(int rows) {
this.rows = rows;
}
public int getPage() {
return page;
}
public void setPage(int page) {
this.page = page;
}
/**
* 分页获取记录
*
* @param entity
* @throws BusinessException
*/
public String list() throws BusinessException {
MeetingBusiness business = BusinessManager.getBusiness(MeetingBusiness.class);
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
try {
query = QueryParamUtil.StringToDate(query);
Page<Map<String, Object>> pageRows = business.list_meeting(pageNo, pageSize, query);
setPageCount((pageRows.getCount() - 1) / pageSize + 1);
Map<String, Object> data = new HashMap<String, Object>();
data.put("rowSet", QueryParamUtil.DateTimeToString(pageRows.getItems()));
data.put("pageNo", pageNo);
data.put("pageSize", pageSize);
data.put("pageCount", pageCount);
data.put("rows", data.get("rowSet"));
data.put("total", pageRows.getCount());
jsonObject = new JSONObject();
jsonObject.putAll(data);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return "json";
}
}
package com.jw.app.meeting.action;
import java.util.Map;
import com.gaowj.business.action.BasicAction;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.RequestUtils;
public class viewNoLoginAction extends BasicAction {
private static final long serialVersionUID = 6814874126827230354L;
public String check_inTab() throws BusinessException {
return "check_inTab";
}
public String checkTabDetail() throws BusinessException {
Map<String, Object> query = RequestUtils.getUpdateFieldMapUtf8(request, RequestUtils.UPDATEDATAFIELDPREFIX);
request.setAttribute("is_row", query);
return "checkTabDetail";
}
}
......@@ -110,4 +110,20 @@ public class viewAction extends BasicAction {
public String mobileVotemajor() throws BusinessException {
return "mobileVotemajor";
}
public String check_inTab() throws BusinessException {
return "check_inTab";
}
public String mobileMeetingcheckdetail() throws BusinessException {
return "check_inTabDetail";
}
public String ongoingVoteTab() throws BusinessException {
return "ongoingVoteTab";
}
public String userVoteTabDetail() throws BusinessException {
return "userVoteTabDetail";
}
}
package com.jw.app.vote.action;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -81,11 +82,17 @@ public class actAction extends BasicAction {
entity.remove("OPETYPE");
// 新增
business.insert_userVote(entity);
if ("-1".equals(entity.get("ERROR"))) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("VALUE", "请登陆后投票");
jsonObject.putAll(map);
} else {
jsonObject.putAll(Status.getStatusSuccessMessage("保存成功"));
}
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("保存失败"));
e.printStackTrace();
}
return "json";
}
......
package com.jw.app.vote.action;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import com.jw.app.business.VoteBusiness;
import com.gaowj.business.SystemOpeBusiness;
import com.gaowj.business.action.BasicAction;
import com.gaowj.business.comp.BusinessManager;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.QueryParamUtil;
import com.gaowj.business.util.RequestUtils;
import com.gaowj.business.util.Status;
import com.gaowj.standard.utils.CacheKit;
public class actNoLoginAction extends BasicAction {
private static final long serialVersionUID = 7000790957832482279L;
private JSONObject jsonObject = new JSONObject();
public JSONObject getJsonObject() {
return jsonObject;
}
public void setJsonObject(JSONObject jsonObject) {
this.jsonObject = jsonObject;
}
/**
* 插入用户投票
*
* @param entity
* @throws BusinessException
*/
public String insertUserVote() throws BusinessException {
VoteBusiness business = BusinessManager.getBusiness(VoteBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
jsonObject = new JSONObject();
try {
entity = QueryParamUtil.StringToDate(entity);
// 去除不要更新的字段
entity.remove("OPETYPE");
// 新增
business.insert_userVote(entity);
if ("-1".equals(entity.get("ERROR"))) {
Map<String, Object> map = new HashMap<String, Object>();
map.put("VALUE", "请登陆后投票");
jsonObject.putAll(map);
} else {
jsonObject.putAll(Status.getStatusSuccessMessage("保存成功"));
}
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("保存失败"));
e.printStackTrace();
}
return "json";
}
}
package com.jw.app.vote.action;
import java.sql.SQLException;
import java.text.ParseException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.sf.json.JSONObject;
import com.jw.app.business.VoteBusiness;
import com.gaowj.business.action.BasicAction;
import com.gaowj.business.comp.BusinessManager;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
import com.gaowj.business.util.PropUtil;
import com.gaowj.business.util.QueryParamUtil;
import com.gaowj.business.util.RequestUtils;
import com.gaowj.business.util.SessionUtil;
import com.gaowj.business.util.TestMd5;
import com.gaowj.standard.utils.CacheKit;
public class dataNoLoginAction extends BasicAction {
private static final long serialVersionUID = 1150328969685526954L;
private JSONObject jsonObject = new JSONObject();
private int rows = 20;// 每页显示的记录数
private int page = 1;// 当前第几页
public JSONObject getJsonObject() {
return jsonObject;
}
public void setJsonObject(JSONObject jsonObject) {
this.jsonObject = jsonObject;
}
public int getRows() {
return rows;
}
public void setRows(int rows) {
this.rows = rows;
}
public int getPage() {
return page;
}
public void setPage(int page) {
this.page = page;
}
public String list_ongoing() throws BusinessException {
VoteBusiness business = BusinessManager.getBusiness(VoteBusiness.class);
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
try {
query = QueryParamUtil.StringToDate(query);
Page<Map<String, Object>> pageRows = business.list_ongoing(pageNo, pageSize, query);
setPageCount((pageRows.getCount() - 1) / pageSize + 1);
Map<String, Object> data = new HashMap<String, Object>();
data.put("rowSet", QueryParamUtil.DateTimeToString(pageRows.getItems()));
data.put("pageNo", pageNo);
data.put("pageSize", pageSize);
data.put("pageCount", pageCount);
data.put("rows", data.get("rowSet"));
data.put("total", pageRows.getCount());
jsonObject = new JSONObject();
jsonObject.putAll(data);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return "json";
}
public String listItem() throws BusinessException {
VoteBusiness business = BusinessManager.getBusiness(VoteBusiness.class);
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
try {
List<Map<String, Object>> listItems = business.list_item(query);
jsonObject = new JSONObject();
jsonObject.put("listItems", listItems);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return "json";
}
public String listUserChecked() throws BusinessException {
VoteBusiness business = BusinessManager.getBusiness(VoteBusiness.class);
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
try {
List<Map<String, Object>> listusercheckeds = business.list_userChecked(query);
jsonObject = new JSONObject();
jsonObject.put("listusercheckeds", listusercheckeds);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return "json";
}
}
......@@ -9,10 +9,6 @@ import com.gaowj.business.util.RequestUtils;
public class viewAction extends BasicAction {
private static final long serialVersionUID = -6259964352154128000L;
public String ongoingVoteTab() throws BusinessException {
return "ongoingVoteTab";
}
public String endedVoteTab() throws BusinessException {
return "endedVoteTab";
}
......@@ -21,6 +17,10 @@ public class viewAction extends BasicAction {
return "voteTab";
}
public String ongoingVoteTab() throws BusinessException {
return "ongoingVoteTab";
}
public String userVoteTabDetail() throws BusinessException {
Map<String, Object> query = RequestUtils.getUpdateFieldMapUtf8(request, RequestUtils.UPDATEDATAFIELDPREFIX);
request.setAttribute("is_row", query);
......
package com.jw.app.vote.action;
import java.util.Map;
import com.gaowj.business.action.BasicAction;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.RequestUtils;
public class viewNoLoginAction extends BasicAction {
private static final long serialVersionUID = -3422099541345142614L;
public String ongoingVoteTab() throws BusinessException {
return "ongoingVoteTab";
}
public String userVoteTabDetail() throws BusinessException {
Map<String, Object> query = RequestUtils.getUpdateFieldMapUtf8(request, RequestUtils.UPDATEDATAFIELDPREFIX);
request.setAttribute("is_row", query);
return "userVoteTabDetail";
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment