Commit feb9ba12 by 周添尉

修改冲突

parents 0cc41607 e4a89b10
...@@ -73,9 +73,9 @@ ...@@ -73,9 +73,9 @@
<!-- 增加数据源dataSource-standard --> <!-- 增加数据源dataSource-standard -->
<bean id="dataSource-standard" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close"> <bean id="dataSource-standard" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<!-- 基本属性 url、user、password --> <!-- 基本属性 url、user、password -->
<property name="url" value="jdbc:mysql://192.168.1.116:3306/jw_standard?useUnicode=true&amp;characterEncoding=utf8&amp;autoReconnect=true&amp;useSSL=false" /> <property name="url" value="jdbc:mysql://192.168.1.116:3306/jf_standard?useUnicode=true&amp;characterEncoding=utf8&amp;autoReconnect=true&amp;useSSL=false" />
<property name="username" value="jw_standard" /> <property name="username" value="jf_standard" />
<property name="password" value="jw_standard" /> <property name="password" value="jf_standard" />
<property name="driverClassName" value="com.mysql.jdbc.Driver" /> <property name="driverClassName" value="com.mysql.jdbc.Driver" />
<!-- 配置初始化大小、最小、最大 --> <!-- 配置初始化大小、最小、最大 -->
...@@ -124,9 +124,60 @@ ...@@ -124,9 +124,60 @@
<!-- 增加数据源dataSource-business --> <!-- 增加数据源dataSource-business -->
<bean id="dataSource-business" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close"> <bean id="dataSource-business" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<!-- 基本属性 url、user、password --> <!-- 基本属性 url、user、password -->
<property name="url" value="jdbc:mysql://192.168.1.116:3306/jw_apps?useUnicode=true&amp;characterEncoding=utf8&amp;autoReconnect=true&amp;useSSL=false" /> <property name="url" value="jdbc:mysql://192.168.1.116:3306/jf_apps?useUnicode=true&amp;characterEncoding=utf8&amp;autoReconnect=true&amp;useSSL=false" />
<property name="username" value="jw_apps" /> <property name="username" value="jf_apps" />
<property name="password" value="jw_apps" /> <property name="password" value="jf_apps" />
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<!-- 配置初始化大小、最小、最大 -->
<property name="initialSize" value="1" />
<property name="minIdle" value="1" />
<property name="maxActive" value="500" />
<!-- 配置获取连接等待超时的时间 -->
<property name="maxWait" value="60000" />
<!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 -->
<property name="timeBetweenEvictionRunsMillis" value="60000" />
<!-- 超过时间限制是否回收,对于建立时间超过removeAbandonedTimeout的连接强制关闭 -->
<property name="removeAbandoned" value="true" />
<!-- 超过时间限制多长,单位秒 -->
<property name="removeAbandonedTimeout" value="60" />
<!-- 配置一个连接在池中最小生存的时间,单位是毫秒:1分钟 -->
<property name="minEvictableIdleTimeMillis" value="60000" />
<!-- 配置一个连接在池中最长生存的时间,单位是毫秒:5分钟 -->
<property name="maxEvictableIdleTimeMillis" value="300000" />
<!-- 用来检测连接是否有效的sql,要求是一个查询语句 -->
<property name="validationQuery" value="SELECT 'x'" />
<!-- 申请连接的时候检测 -->
<property name="testWhileIdle" value="true" />
<!-- 申请连接时执行validationQuery检测连接是否有效,配置为true会降低性能 -->
<property name="testOnBorrow" value="false" />
<!-- 归还连接时执行validationQuery检测连接是否有效,配置为true会降低性能 -->
<property name="testOnReturn" value="false" />
<!-- 连接池中的minIdle数量以内的连接,空闲时间超过minEvictableIdleTimeMillis,则会执行keepAlive操作 -->
<property name="keepAlive" value="true" />
<!-- 是否缓存preparedStatement,也就是PSCache。PSCache对支持游标的数据库性能提升巨大,比如说oracle。在mysql下建议关闭 -->
<property name="poolPreparedStatements" value="false" />
<!-- 要启用PSCache,必须配置大于0,当大于0时,poolPreparedStatements自动触发修改为true -->
<property name="maxPoolPreparedStatementPerConnectionSize" value="0" />
<!-- 配置监控统计拦截的filters,去掉后监控界面sql无法统计 -->
<property name="filters" value="stat" />
</bean>
<!-- 增加数据源lcyq-business -->
<bean id="lcyq-business" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<!-- 基本属性 url、user、password -->
<property name="url" value="jdbc:mysql://192.168.1.116:3306/lcyq_business?useUnicode=true&amp;characterEncoding=utf8&amp;autoReconnect=true&amp;useSSL=false" />
<property name="username" value="lcyq_business" />
<property name="password" value="lcyq_business" />
<property name="driverClassName" value="com.mysql.jdbc.Driver" /> <property name="driverClassName" value="com.mysql.jdbc.Driver" />
<!-- 配置初始化大小、最小、最大 --> <!-- 配置初始化大小、最小、最大 -->
...@@ -205,6 +256,17 @@ ...@@ -205,6 +256,17 @@
</property> </property>
</bean> </bean>
<!-- 增加事务lcyq-business -->
<bean id="transactionManager-lcyq-business" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="lcyq-business"/>
</bean>
<bean id="transactionInterceptor-lcyq-business" parent="abstractTransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager-lcyq-business"/>
</property>
</bean>
<!-- 自动创建事务代理 --> <!-- 自动创建事务代理 -->
<bean class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator"> <bean class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<property name="beanNames"> <property name="beanNames">
...@@ -217,6 +279,7 @@ ...@@ -217,6 +279,7 @@
<value>transactionInterceptor-system</value> <value>transactionInterceptor-system</value>
<value>transactionInterceptor-standard</value> <value>transactionInterceptor-standard</value>
<value>transactionInterceptor-business</value> <value>transactionInterceptor-business</value>
<value>transactionInterceptor-lcyq-business</value>
</list> </list>
</property> </property>
</bean> </bean>
...@@ -254,4 +317,5 @@ ...@@ -254,4 +317,5 @@
<import resource="business-standard.xml"/> <import resource="business-standard.xml"/>
<import resource="business-test.xml"/> <import resource="business-test.xml"/>
<import resource="business-apps.xml"/> <import resource="business-apps.xml"/>
<import resource="business-process.xml"/>
</beans> </beans>
\ No newline at end of file
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
<value>classpath:com/jw/app/business/portal/apps/appsDAO.xml</value> <value>classpath:com/jw/app/business/portal/apps/appsDAO.xml</value>
<value>classpath:com/jw/app/business/portal/content/ContentDAO.xml</value> <value>classpath:com/jw/app/business/portal/content/ContentDAO.xml</value>
<value>classpath:com/jw/app/business/table/TableDAO.xml</value> <value>classpath:com/jw/app/business/table/TableDAO.xml</value>
<value>classpath:com/jw/app/business/portlet/PortletDAO.xml</value> <value>classpath:com/jw/app/business/portlet/PortletDAO.xml</value>
<value>classpath:com/jw/app/business/apps/AppsDAO.xml</value> <value>classpath:com/jw/app/business/apps/AppsDAO.xml</value>
<value>classpath:com/jw/app/business/store/storeDAO.xml</value> <value>classpath:com/jw/app/business/store/storeDAO.xml</value>
...@@ -23,6 +22,10 @@ ...@@ -23,6 +22,10 @@
<value>classpath:com/jw/app/business/calendar/calendarDAO.xml</value> <value>classpath:com/jw/app/business/calendar/calendarDAO.xml</value>
<value>classpath:com/jw/app/business/portal/role/appsRoleDAO.xml</value> <value>classpath:com/jw/app/business/portal/role/appsRoleDAO.xml</value>
<value>classpath:com/jw/app/business/vote/voteDAO.xml</value> <value>classpath:com/jw/app/business/vote/voteDAO.xml</value>
<value>classpath:com/jw/app/business/attendance/attendanceDAO.xml</value>
<value>classpath:com/jw/app/business/bgmk/bgmkDAO.xml</value>
<value>classpath:com/jw/app/business/friendlink/friendlinkDAO.xml</value>
<value>classpath:com/jw/app/business/notice/noticeDAO.xml</value>
</list> </list>
</property> </property>
</bean> </bean>
...@@ -85,6 +88,22 @@ ...@@ -85,6 +88,22 @@
<property name="mapperInterface" value="com.jw.app.business.vote.voteDAO"/> <property name="mapperInterface" value="com.jw.app.business.vote.voteDAO"/>
<property name="sqlSessionFactory" ref="sqlSessionFactory-apps"/> <property name="sqlSessionFactory" ref="sqlSessionFactory-apps"/>
</bean> </bean>
<bean id="attendanceDAO" class="org.mybatis.spring.mapper.MapperFactoryBean">
<property name="mapperInterface" value="com.jw.app.business.attendance.attendanceDAO"/>
<property name="sqlSessionFactory" ref="sqlSessionFactory-apps"/>
</bean>
<bean id="bgmkDAO" class="org.mybatis.spring.mapper.MapperFactoryBean">
<property name="mapperInterface" value="com.jw.app.business.bgmk.bgmkDAO"/>
<property name="sqlSessionFactory" ref="sqlSessionFactory-apps"/>
</bean>
<bean id="friendlinkDAO" class="org.mybatis.spring.mapper.MapperFactoryBean">
<property name="mapperInterface" value="com.jw.app.business.friendlink.friendlinkDAO"/>
<property name="sqlSessionFactory" ref="sqlSessionFactory-apps"/>
</bean>
<bean id="noticeDAO" class="org.mybatis.spring.mapper.MapperFactoryBean">
<property name="mapperInterface" value="com.jw.app.business.notice.noticeDAO"/>
<property name="sqlSessionFactory" ref="sqlSessionFactory-apps"/>
</bean>
<!-- BusinessInterFace --> <!-- BusinessInterFace -->
<bean id="PortletBusiness" <bean id="PortletBusiness"
class="com.jw.app.business.portlet.PortletBusinessImpl"> class="com.jw.app.business.portlet.PortletBusinessImpl">
...@@ -137,6 +156,24 @@ ...@@ -137,6 +156,24 @@
<property name="voteDAO" ref="voteDAO"/> <property name="voteDAO" ref="voteDAO"/>
</bean> </bean>
<bean id="AttendanceBusiness"
class="com.jw.app.business.attendance.AttendanceBusinessImpl">
<property name="attendanceDAO" ref="attendanceDAO"/>
</bean>
<bean id="BgmkBusiness"
class="com.jw.app.business.bgmk.BgmkBusinessImpl">
<property name="bgmkDAO" ref="bgmkDAO"/>
</bean>
<bean id="FriendLinkBusiness"
class="com.jw.app.business.friendlink.FriendLinkBusinessImpl">
<property name="friendlinkDAO" ref="friendlinkDAO"/>
</bean>
<bean id="NoticeBusiness"
class="com.jw.app.business.notice.NoticeBusinessImpl">
<property name="noticeDAO" ref="noticeDAO"/>
</bean>
<!-- DAO --> <!-- DAO -->
<bean id="portletDAO" class="org.mybatis.spring.mapper.MapperFactoryBean"> <bean id="portletDAO" class="org.mybatis.spring.mapper.MapperFactoryBean">
<property name="mapperInterface" value="com.jw.app.business.portlet.PortletDAO"/> <property name="mapperInterface" value="com.jw.app.business.portlet.PortletDAO"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="sqlSessionFactory-lcyq-business" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="lcyq-business" />
<property name="configLocation" value="/WEB-INF/conf/gaowj/bl/mybatis-config.xml" />
<property name="mapperLocations">
<list>
<value>classpath:com/jw/app/business/process/ProcessDAO.xml</value>
</list>
</property>
</bean>
<bean id="ProcessDAO" class="org.mybatis.spring.mapper.MapperFactoryBean">
<property name="mapperInterface" value="com.jw.app.business.process.ProcessDAO"/>
<property name="sqlSessionFactory" ref="sqlSessionFactory-lcyq-business"/>
</bean>
<bean id="ProcessBusiness"
class="com.jw.app.business.process.ProcessBusinessImpl">
<property name="processDAO" ref="ProcessDAO"/>
</bean>
</beans>
...@@ -348,4 +348,7 @@ ...@@ -348,4 +348,7 @@
} }
.icon-ext-10_20 { .icon-ext-10_20 {
background:url('../../../../images/icons/(10,20).png') no-repeat left center; background:url('../../../../images/icons/(10,20).png') no-repeat left center;
}
.icon-ext-07_14 {
background:url('../../../../images/icons/(07,14).png') no-repeat left center;
} }
\ No newline at end of file
$(function(){ $(function(){
document.domain="jfbrother.com";
//去掉尾部的一个div //去掉尾部的一个div
$('.index_footer').next().remove(); $('.index_footer').next().remove();
...@@ -20,8 +20,48 @@ $(function(){ ...@@ -20,8 +20,48 @@ $(function(){
//模块的切换 //模块的切换
init_office_change_moddle(); init_office_change_moddle();
//初始化容器的最小高度
init_officeDetail_container_minHeight();
//初始化iframe高度
//initIframe();
}) })
function initIframe() {
document.getElementById('proc_iframe').onload = function() {
this.contentWindow.onbeforeunload = function() {
document.getElementById('proc_iframe').setAttribute('height', 'auto');
};
this.setAttribute('height', this.contentWindow.document.body.scrollHeight);
$("#proc_iframe_loading").hide();
$("#proc_iframe").show();
};
document.getElementById('progressRate').onload = function() {
this.contentWindow.onbeforeunload = function() {
document.getElementById('progressRate').setAttribute('height', 'auto');
};
this.setAttribute('height', $(this.contentWindow.document.body).outerHeight(true));
};
document.getElementById('approval').onload = function() {
this.contentWindow.onbeforeunload = function() {
document.getElementById('approval').setAttribute('height', 'auto');
};
this.setAttribute('height', $(this.contentWindow.document.body).outerHeight(true));
};
document.getElementById('progressHistory').onload = function() {
this.contentWindow.onbeforeunload = function() {
document.getElementById('progressHistory').setAttribute('height', 'auto');
};
this.setAttribute('height', $(this.contentWindow.document.body).outerHeight(true));
};
}
//初始化.office_module的距离来达到满屏显示 //初始化.office_module的距离来达到满屏显示
function init_office_module_bottom(){ function init_office_module_bottom(){
var office_module_height; var office_module_height;
...@@ -40,6 +80,20 @@ function init_office_module_bottom(){ ...@@ -40,6 +80,20 @@ function init_office_module_bottom(){
//模块的切换 //模块的切换
function init_office_change_moddle(){ function init_office_change_moddle(){
$('.office_bg_content>div>div').on('click',function(){ $('.office_bg_content>div>div').on('click',function(){
var src=$(this).attr('src');
var iframeId=$(this).attr('iframeId');
if(src){
if(!$("#"+iframeId).attr("src")){
$("#"+iframeId).attr("src",src);
document.getElementById(iframeId).onload = function() {
this.contentWindow.onbeforeunload = function() {
document.getElementById(iframeId).setAttribute('height', 'auto');
};
this.setAttribute('height', $(this.contentWindow.document.body).outerHeight(true));
};
}
}
var index = $('.office_bg_content>div>div').index($(this)); var index = $('.office_bg_content>div>div').index($(this));
$('.office_module').hide(); $('.office_module').hide();
$('.office_module').eq(index).show(); $('.office_module').eq(index).show();
...@@ -54,34 +108,23 @@ function init_office_change_moddle(){ ...@@ -54,34 +108,23 @@ function init_office_change_moddle(){
function init_office_apply_lump(){ function init_office_apply_lump(){
//自定义一个颜色数组 //自定义一个颜色数组
var color_list = ['#ff8264','#44df9e','#f585ad','#aa96f6','#fea144','#5cc4e0']; var color_list = ['#ff8264','#44df9e','#f585ad','#aa96f6','#fea144','#5cc4e0'];
var infos=processModule.data.listProcess().rowSet;
var infos = [
{apply_name:'报工申请'},
{apply_name:'请假申请'},
{apply_name:'报销申请'},
{apply_name:'补假申请'},
{apply_name:'合同申请'},
{apply_name:'办公软件开通申请'},
{apply_name:'办公用品领用申请'},
{apply_name:'公司用车申请'},
{apply_name:'公租房申请'},
{apply_name:'产品入库申请'},
{apply_name:'产品出库申请'},
{apply_name:'领料申请'},
{apply_name:'项目申请'},
{apply_name:'会议室申请'},
{apply_name:'经费申请'},
{apply_name:'出差申请'},
{apply_name:'采购申请'},
{apply_name:'外出申请'},
]
//块状的容器 //块状的容器
var $content = $('.office_apply_content'); var $content = $('.office_apply_content');
for(var i = 0 ; i < infos.length ; i ++){ for(var i = 0 ; i < infos.length ; i ++){
var $create_container = $('<div></div>'); var $create_container = $('<div></div>');
var $create_content = $('<div></div>'); var $create_content = $('<div></div>');
$create_content.bind('click',function(){ $create_content.bind('click',function(){
location.href='officeDetail'; var processInfo=$(this).data('processInfo');
window.open($("#procAppUrl").val()+'?redirectUrl=processView_detail%3fprocId='+processInfo.UUID);
// $("#proc_iframe_loading").show();
// $("#proc_iframe").hide();
// var processInfo=$(this).data('processInfo');
// $(".officeDetail_content_title .officeDetail_content_title_text").html(processInfo['PROC_NAME']);
// $("#proc_iframe").attr('src',$("#procAppUrl").val()+'/processView_detail?procId='+processInfo.UUID);
// $("#process_content1").hide();
// $("#process_content2").show();
}) })
var $create_div = $('<div></div>'); var $create_div = $('<div></div>');
//添加一个颜色背景 //添加一个颜色背景
...@@ -105,10 +148,11 @@ function init_office_apply_lump(){ ...@@ -105,10 +148,11 @@ function init_office_apply_lump(){
})*/ })*/
//赋值 //赋值
$create_div.text(infos[i].apply_name); $create_div.text(infos[i].PROC_NAME);
$create_content.append($create_div); $create_content.append($create_div);
$create_container.append($create_content); $create_container.append($create_content);
$content.append($create_container); $content.append($create_container);
$create_content.data('processInfo',infos[i]);
} }
} }
...@@ -210,6 +254,10 @@ function init_office_examine_list(){ ...@@ -210,6 +254,10 @@ function init_office_examine_list(){
}) })
} }
function openEditWindow(businessId){
window.open($("#procAppUrl").val()+'/processView_detail?businessId='+businessId);
}
//渲染进度查询列表 //渲染进度查询列表
function init_office_progress_list(){ function init_office_progress_list(){
var infos = [ var infos = [
...@@ -352,4 +400,59 @@ function init_office_history_list(){ ...@@ -352,4 +400,59 @@ function init_office_history_list(){
} }
] ]
}) })
}
function backOfficeList(){
$("#process_content2").hide();
$("#process_content1").show();
}
//初始化容器的最小高度
function init_officeDetail_container_minHeight(){
var height = $(window).height() - $('.indedx_header').outerHeight(true) - $('.indedx_header_logo').outerHeight(true) - $('.index_center').outerHeight(true) - $('.officeDetail_bg').outerHeight(true) - $('.index_footer').outerHeight(true) - 10;
if(height>0){
$('.officeDetail_content').css('min-height',height);
}
}
//切换流程图的显示
function officeDetail_changeFlow(handler){
var really_height = $('.officeDetail_content').css('min-height');
if(!$('.officeDetail_content').data('minHeight')){
$('.officeDetail_content').data('minHeight',really_height);
}
else{
really_height = $('.officeDetail_content').data('minHeight');
}
really_height = really_height.replace(/px/,'');
var title_height = $('.officeDetail_content_title').outerHeight(true);
var min_height = document.body.clientHeight - $('.indedx_header').outerHeight(true) - $('.indedx_header_logo').outerHeight(true) - $('.index_center').outerHeight(true) - $('.officeDetail_bg').outerHeight(true) - $('.index_footer').outerHeight(true) - title_height ;
if($(handler).data('change')!='1'){
$(handler).data('change','1');
//去掉申请内容
$('.officeDetail_content').css('overflow','hidden');
$('.officeDetail_content').animate({'height':title_height,'min-height':'0'});
//显示流程图的内容
$('.officeDetail_flow').css('height','auto');
//从高度为10开始执行动画
$('.officeDetail_flow_content').height(10).animate({'height':min_height});
//改变点击按钮位置
$('.officeDetail_flow_toggole').css({'margin-top':'0','background':'white','border-radius':'0 0 3px 3px '});
$('.officeDetail_flow_toggole').find('img').attr('src','custom/images/officeDetail_down.png');
$('.officeDetail_flow_toggole').find('span').text('收起');
}
else{
$(handler).data('change','0');
//显示申请的内容
$('.officeDetail_content').animate({'min-height':really_height},function(){
$(this).css('height','auto');
});
//去掉流程图的内容
$('.officeDetail_flow').animate({'height':'10'});
$('.officeDetail_flow_content').animate({'height':'0'});
//改变点击按钮位置
$('.officeDetail_flow_toggole').css({'margin-top':'-25px','background':'#f3f3f3','border-radius':'3px 3px 0 0 '});
$('.officeDetail_flow_toggole').find('img').attr('src','custom/images/officeDetail_up.png');
$('.officeDetail_flow_toggole').find('span').text('展开');
}
} }
\ No newline at end of file
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <%
String procApp=com.gaowj.business.util.PropUtil.getValue("lcyq_app_url", "quartz_service", "");
%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<html> <html>
<head> <head>
<title>办事大厅</title> <title>办事大厅</title>
<jsp:include page="header.jsp"></jsp:include> <jsp:include page="header.jsp"></jsp:include>
<script type="text/javascript" src="${pageContext.request.contextPath}/jwapp/pages/portlet/js/jwAppPortletModule.js" charset="utf-8"></script> <script type="text/javascript" src="${pageContext.request.contextPath}/jwapp/pages/portlet/js/jwAppPortletModule.js" charset="utf-8"></script>
<script src="${ctx}/jwapp/pages/process/js/processModule.js"></script>
<script src="${ctx}/jfcas04/js/office.js"></script> <script src="${ctx}/jfcas04/js/office.js"></script>
</head> </head>
<body> <body>
<!-- 头部 --> <!-- 头部 -->
<jsp:include page="/nav4.jsp"></jsp:include> <jsp:include page="/nav4.jsp"></jsp:include>
<!-- 内容部分 --> <!-- 内容部分1 -->
<div class="container-fluid"> <div class="container-fluid" id="process_content1">
<!--背景图--> <!--背景图-->
<div class="row office_bg"> <div class="row office_bg">
<div class="office_bg_content col-md-12"> <div class="office_bg_content col-md-12">
<div class="col-md-3"> <div class="col-md-3">
<div class="office_bg_content_click"> <div class="office_bg_content_click" >
<img src="${ctx}/custom/images/office_apply.png" width="100" height="100"/> <img src="${ctx}/custom/images/office_apply.png" width="100" height="100" />
<div>我要申请</div> <div>我要申请</div>
</div> </div>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<div class=""> <div class="" src="<%=procApp %>?redirectUrl=processView_approval" iframeId="approval">
<img src="${ctx}/custom/images/office_examine.png" width="100" height="100"/> <img src="${ctx}/custom/images/office_examine.png" width="100" height="100" />
<div>我要审批</div> <div>我要审批</div>
</div> </div>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<div class=""> <div class="" src="<%=procApp %>?redirectUrl=processView_progressRate" iframeId="progressRate">
<img src="${ctx}/custom/images/office_progress.png" width="100" height="100"/> <img src="${ctx}/custom/images/office_progress.png" width="100" height="100" />
<div>进度查询</div> <div>进度查询</div>
</div> </div>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<div class=""> <div class="" src="<%=procApp %>?redirectUrl=processView_progressHistory" iframeId="progressHistory">
<img src="${ctx}/custom/images/office_history.png" width="100" height="100"/> <img src="${ctx}/custom/images/office_history.png" width="100" height="100" />
<div>历史查询</div> <div>历史查询</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- 申请模块 --> <!-- 申请模块 -->
<div class="office_module row"> <div class="office_module row">
<div class="office_module_title col-md-12"> <div class="office_module_title col-md-12">
<img src="${ctx}/custom/images/office_title.png" height="16" width="16" /> <img src="${ctx}/custom/images/office_title.png" height="16" width="16" /> <span>我要申请</span>
<span>我要申请</span> </div>
</div> <div class="office_apply col-md-12">
<div class="office_apply col-md-12"> <div class="office_apply_content"></div>
<div class="office_apply_content"> </div>
<!-- <div><div><div>报工申请</div></div></div> </div>
<div><div><div>报工申请报工申请</div></div></div>
<div><div><div>报工申请</div></div></div>
<div><div><div>报工申请报工申请</div></div></div>
<div><div><div>报工申请</div></div></div>
<div><div><div>报工申请报工申请</div></div></div>
<div><div><div>报工申请</div></div></div>
<div><div><div>报工申请报工申请</div></div></div>
<div><div><div>报工申请</div></div></div>
<div><div><div>报工申请报工申请</div></div></div>
<div><div><div>报工申请</div></div></div>
<div><div><div>报工申请报工申请</div></div></div> -->
</div>
</div>
</div>
<!-- 审批模块 --> <!-- 审批模块 -->
<div class="office_module row" style="display:none"> <div class="office_module row" style="display:none">
<div class="office_module_title col-md-12"> <iframe id="approval" style="width:100%" ></iframe>
<img src="${ctx}/custom/images/office_title.png" height="16" width="16" /> </div>
<span>我要审批</span>
<a href="#">只显示待审批申请</a>
</div>
<div class="col-md-12 office_examine office_table">
<table id="office_examine"></table>
</div>
</div>
<!-- 进度查询模块 --> <!-- 进度查询模块 -->
<div class="office_module row" style="display:none"> <div class="office_module row" style="display:none">
<div class="office_module_title col-md-12"> <iframe id="progressRate" style="width:100%" ></iframe>
<img src="${ctx}/custom/images/office_title.png" height="16" width="16" /> </div>
<span>进度查询</span> <!-- 历史查询模块 -->
<div> <div class="office_module row" style="display:none">
<input type="text" /><img src="${ctx}/custom/images/office_search.png" width="24" height="24" /> <iframe id="progressHistory" style="width:100%" ></iframe>
</div> </div>
</div>
<div class="col-md-12 office_examine office_table">
<table id="office_progress"></table>
</div>
</div>
<!-- 历史查询模块 -->
<div class="office_module row" style="display:none">
<div class="office_module_title col-md-12">
<img src="${ctx}/custom/images/office_title.png" height="16" width="16" />
<span>历史查询</span>
<div>
<input type="text" /><img src="${ctx}/custom/images/office_search.png" width="24" height="24" />
</div>
</div>
<div class="col-md-12 office_examine office_table">
<table id="office_history"></table>
</div>
</div>
<!--主容器结尾--> <!--主容器结尾-->
</div> </div>
<input type="text" id="procAppUrl" value="<%=procApp%>" style="display:none;">
<!-- 内容部分2 -->
<div class="container-fluid" id="process_content2" style="display:none;">
<!-- 尾部 --> <!-- 背景图 -->
<jsp:include page="/footer.jsp"></jsp:include> <div class="row officeDetail_bg"></div>
<!-- 详情 -->
<div class="row officeDetail_content">
<div class="officeDetail_content_title col-md-12">
<span class="officeDetail_content_title_text">请假申请</span>
<div onclick="backOfficeList();">
<img src="${ctx}/custom/images/officeDetail_back.png" width="16" height="16" /><span>返回</span>
</div>
<div>
<span>*</span><span>必填</span>
</div>
</div>
<div class="officeDetail_content_div col-md-12" style="text-align: center;">
<img id="proc_iframe_loading" src="${ctx}/custom/images/loading.gif" />
<iframe id="proc_iframe" style="width:100%;"></iframe>
</div>
</div>
<!-- 流程图 -->
<div class="row officeDetail_flow">
<div class="officeDetail_flow_toggole" onClick="officeDetail_changeFlow(this)">
<img src="${ctx}/custom/images/officeDetail_up.png" width="7" height="4" /><span>展开</span>
</div>
<div class="col-md-12 officeDetail_flow_content">
<div>流程图</div>
<div>流程图</div>
<div>流程图</div>
<div>流程图</div>
<div>流程图</div>
<div>流程图</div>
<div>流程图</div>
<div>流程图</div>
<!-- <div style="height:500px;background:red;">流程图</div> -->
</div>
</div>
<!--主容器结尾-->
</div>
<!-- 尾部 -->
<jsp:include page="/footer.jsp"></jsp:include>
</body> </body>
</html> </html>
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* *
*/ */
function getbaidu(contentid){ function getbaidu(contentid){
UE.getEditor(contentid).destroy();
var ue = UE.getEditor(contentid,{ //这里可以选择自己需要的工具按钮名称,此处仅选择如下五个 var ue = UE.getEditor(contentid,{ //这里可以选择自己需要的工具按钮名称,此处仅选择如下五个
toolbars:[ [ toolbars:[ [
// 'fullscreen', // 'fullscreen',
......
<%@page contentType="text/html; charset=UTF-8"%>
<%@ include file="/gaowj/header-simple-1.0.jsp"%>
<div id="attendanceTab">
<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>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_input.css" charset="utf-8"></link>
</div>
<table id="list" style="width: 100%; height: 100%;"></table>
<div id="tb">
<a href="#" style="align : 'center';" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="javascript:dkRow()">打卡</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="javascript:refreshRow()" >刷新</a>
</div>
<script type="text/javascript" src="${ctx}/jwapp/pages/standard/js/jwStandardModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/attendance/js/attendanceModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/attendance/js/attendanceEmployeeTab.js" charset="utf-8"></script>
<%@page contentType="text/html; charset=UTF-8"%>
<%@ include file="/gaowj/header-simple-1.0.jsp"%>
<div id="attendanceTab">
<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>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_input.css" charset="utf-8"></link>
</div>
<table id="list" style="width: 100%; height: 100%;"></table>
<div id="tb">
<form id="attendanceTab_searchForm" style="float:left">
姓名: <input class="easyui-textbox" id="FIELD_USER_NAME" name="FIELD_USER_NAME" style="width:200px"/>&nbsp;&nbsp;
</form>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="javascript:searchRow()">查询</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="javascript:refreshRow()">刷新</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="javascript:dkRow()">打卡</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear',plain:true" onclick="javascript:deleteBatchRow()">删除</a>
</div>
<script type="text/javascript" src="${ctx}/jwapp/pages/standard/js/jwStandardModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/attendance/js/attendanceModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/attendance/js/attendanceTab.js" charset="utf-8"></script>
/**
* 序号:1
* 功能:定义分页(EasyUI)
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:杰夫兄弟
* 备注:无需更改
**/
var ls_width = $(window).width();
var ls_height = $(window).height();
var local_page=1;
var rows=20;
var listPageSize = [10,20,50,100,500,1000];
var queryData = eval("({'page':'"+local_page+"','rows':'"+rows+"'})");
var tab_n = 0;
//重置分页参数
function resetQueryData(){
queryData = "";
queryData = eval("({'page':'"+local_page+"','rows':'"+rows+"'})");
}
//定义附件关联模块ID(1:一般业务,2:测试信息,3:审批业务,999:其它数据 )
var ls_module_id='2';
//定义当前模块业务类型(YBYW:一般业务,SPGL:审批业务)
var ls_ywlx = 'YBYW';
/****/
/****/
/**
* 序号:2
* 功能:构建主页面列表
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:杰夫兄弟
* 备注:需更改
**/
//定义grid列表
var ls_title="打卡管理&nbsp;&nbsp;";
var is_column = [ [
{field : 'DAY_TEXT',title : '日期',width : 80,align : 'center'},
{field : 'BEGIN_TIME',title : '上班时间',width : 150,align : 'center'},
{field : 'END_TIME',title : '下班时间',width : 80,align : 'center'}
] ];
//列表加载完成回调
function reportrollback(){
}
//设置颜色和每行高度
function rowstyler(index,row){
}
//展示列表
reportgrid("list",ls_title,gaowj.WEB_APP_NAME + "/attendanceData_list2",queryData,is_column);
/****/
/**
* 序号3
* 功能:设置主页面操作列菜单
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:杰夫兄弟
* 备注:需更改
**/
//返回菜单集的菜单个数(需更改)
function getOptionMenuCount(){
var is_menu_count = 1;
return is_menu_count;
}
/****/
//加载打卡子页面
function dkRow(is_entity){
var v_result = attendanceModule.attendanceActAction.insertAttendance(is_entity);
$('#list').datagrid('reload');
$.messager.show({
title:' ',
timeout:500,
msg:'打卡成功',
showType:'show',
style:{
right:'',
top:document.body.scrollTop+document.documentElement.scrollTop,
bottom:''
}
});
return v_result;
}
/****/
/**
* 序号:3
* 功能:刷新
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:杰夫兄弟
* 备注:需更改
**/
function refreshRow(){
$('#list').datagrid('load',{});
$("#attendanceTab_searchForm")[0].reset();
}
/****/
/**
* 序号:8
* 功能:查询
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:杰夫兄弟
* 备注:需更改
**/
function searchRow(){
var v_query = $("#attendanceTab_searchForm").getFormVal();
$('#list').datagrid('load',v_query);
}
/****/
//此乃本模块与后台交互的方法接口部分
var attendanceModule = function(format) {
this.module = "";
this.action = "";
this.format = format;
};
//定义数据交互
attendanceModule.prototype = BusinessObject;
//插入考勤数据
attendanceModule.prototype.insertAttendance = function(){};
//修改考勤数据
attendanceModule.prototype.updateAttendance = function(){};
//删除考勤数据
attendanceModule.prototype.deleteAttendance = function(){};
//考勤数据_分页
attendanceModule.prototype.list = function(){};
//考勤所有数据
attendanceModule.prototype.listAll = function(){};
//创建一个数据操作对象,然后再后续使用
attendanceModule.attendanceActAction = new attendanceModule("json").delegate("attendanceAct");
//创建一个数据获取对象,然后再后续使用
attendanceModule.attendanceDataAction = new attendanceModule("json").delegate("attendanceData");
//说明: 1、所有方法里统一传递josn格式的参数,用于后台交互,如data.listTables(param) ,如没有参数则传'{}',如data.listTables({})
// 2、前后台数据获取传输协议 如:json[{'0':{pageCount':'2','pageNo':'1','pageSize':'20','rowSet':'[{0},{1}....]'}}]
// 3、前后台增删改的返回状态 如:json[{'0':{'rowSet':{'NAME':'-1','VALUE':'保存失败'}}}]
/**
* 序号:1
* 功能:定义分页(EasyUI)
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:杰夫兄弟
* 备注:无需更改
**/
var ls_width = $(window).width();
var ls_height = $(window).height();
var local_page=1;
var rows=20;
var listPageSize = [10,20,50,100,500,1000];
var queryData = eval("({'page':'"+local_page+"','rows':'"+rows+"'})");
var tab_n = 0;
//重置分页参数
function resetQueryData(){
queryData = "";
queryData = eval("({'page':'"+local_page+"','rows':'"+rows+"'})");
}
//定义附件关联模块ID(1:一般业务,2:测试信息,3:审批业务,999:其它数据 )
var ls_module_id='2';
//定义当前模块业务类型(YBYW:一般业务,SPGL:审批业务)
var ls_ywlx = 'YBYW';
/****/
/**
* 序号:2
* 功能:构建下拉框内容
* 参数:
* 说明:方便新增、修改页面里的下拉选项加载数据
* 作者:高伟杰
* 时间:2016-01-22
* 单位:杰夫兄弟
* 备注:需更改
**/
/*//加载部门名称数据
var v_dept_namequery = {};
v_dept_namequery.FIELD_tableName = "DM_ORG_SORT";
var v_dept_namequery_data = standardModel.dataAction.listAllCache(v_dept_namequery);
*/
//加载考勤地址 类型数据
var v_kqdzquery_data = [{CODE_ID:'0',CODE_NAME:'公司'},{CODE_ID:'1',CODE_NAME:'非公司'}];
/****/
/**
* 序号:3
* 功能:构建主页面列表
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:杰夫兄弟
* 备注:需更改
**/
//定义grid列表
var ls_title="打卡管理";
var is_column = [ [
{field : 'USER_NAME',title : '人员姓名',width : 100,align : 'center'},
{field : 'DEPT_NAME',title : '部门名称',width : 80,align : 'center'},
{field : 'ATTENDANCE_TIME',title : '打卡时间',width : 150,align : 'center'},
// {field : 'USER_TYPE',title : '人员类型',width : 80,align : 'center'},
/* {field : 'ATTENDANCE_ADDRESS',title : '考勤地址',width : 300,align : 'center',
formatter : function(value) {
return getCodeName(v_kqdzquery_data, value) ;
}
},
{field : 'ATTENDANCE_ADDRESS_DETAIL',title : '考勤详细地址',width : 300,align : 'center'}, */
{field : 'CREATE_ID',title : '创建人员',width : 100,align : 'center'},
{field : 'CREATE_TIME',title : '创建时间',width : 150,align : 'center'}
] ];
//列表加载完成回调
function dataOnLoadSuccess(){
}
//设置颜色和每行高度
function rowstyler(index,row){
}
//展示列表
datagrid("list",ls_title,gaowj.WEB_APP_NAME + "/attendanceData_list",queryData,is_column,60,80);
/****/
/**
* 序号:4
* 功能:设置主页面操作列菜单
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:杰夫兄弟
* 备注:需更改
**/
//操用列显示更多(一般情况下无需更改)
function formatMenu(value, data,index) {
var returnData="";
return returnData
+ "<span class=\"icon-ext-moremenu\" style=\"padding-left:20px;*width:20px;\"></span>"
+ "<span data-p1="+index+" class=\"easyui-tooltip\" style=\"color:blue;cursor:pointer;\">更多</span>";
}
//上浮横向菜单集里的具体菜单项(需更改)
function getOptionMenu(data,index){
var returnData= " <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('"
+ index + "')\">删除</a> ";
return returnData;
}
//返回菜单集的菜单个数(需更改)
function getOptionMenuCount(){
var is_menu_count = 1;
return is_menu_count;
}
/****/
//加载打卡子页面
function dkRow(is_entity){
var v_result = attendanceModule.attendanceActAction.insertAttendance(is_entity);
$('#list').datagrid('reload');
$.messager.show({
title:' ',
timeout:500,
msg:'打卡成功',
showType:'show',
style:{
right:'',
top:document.body.scrollTop+document.documentElement.scrollTop,
bottom:''
}
});
return v_result;
}
/****/
/**
* 序号:5
* 功能:单个删除
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:杰夫兄弟
* 备注:需更改
**/
function deleteRow(index){
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
var code = is_row[0].UUID;
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.FIELD_CODE = code;
var v_result = attendanceModule.attendanceActAction.deleteAttendance(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
}
});
}
/****/
/**
* 序号:6
* 功能:批量删除
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:杰夫兄弟
* 备注:需更改
**/
function deleteBatchRow(){
var code="";
var rows = $('#list').datagrid('getSelections');
for(var i=0; i<rows.length; i++){
code = code + rows[i].UUID+",";
}
if(rows == null || rows == ""){
$.messager.alert('提示',"请选择需删除的记录!",'info');
return;
}
if(code.length>0){
code = code.substring(0,code.length - 1);
}
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.FIELD_CODE = code;
var v_result = attendanceModule.attendanceActAction.deleteAttendance(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
}
});
}
/****/
/**
* 序号:7
* 功能:刷新
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:杰夫兄弟
* 备注:需更改
**/
function refreshRow(){
$('#list').datagrid('load',{});
$("#attendanceTab_searchForm")[0].reset();
}
/****/
/**
* 序号:8
* 功能:查询
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:杰夫兄弟
* 备注:需更改
**/
function searchRow(){
var v_query = $("#attendanceTab_searchForm").getFormVal();
$('#list').datagrid('load',v_query);
}
/****/
<%@page contentType="text/html; charset=UTF-8"%>
<%@ include file="/gaowj/header-simple-1.0.jsp"%>
<div id="bgmkTab">
<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>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_input.css" charset="utf-8"></link>
</div>
<table id="list" style="width: 100%; height: 100%;"></table>
<div id="tb">
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="javascript:addRow()">新增报工</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear',plain:true" onclick="javascript:deleteBatchRow()">删除</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="javascript:refreshRow()">刷新</a>
</div>
<div id="detail" style="overflow:auto;"></div>
<div id="advsearch" style="overflow:auto;"></div>
<div id="uploadcommon" style="overflow:auto;"></div>
<script type="text/javascript" src="${ctx}/jwapp/pages/standard/js/jwStandardModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/bgmk/js/bgmkModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/bgmk/js/bgmkEmployeeTab.js" charset="utf-8"></script>
<%@page contentType="text/html; charset=UTF-8"%>
<%@ include file="/gaowj/header-simple-1.0.jsp"%>
<div id="bgmkTab">
<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>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_input.css" charset="utf-8"></link>
</div>
<table id="list" style="width: 100%; height: 100%;"></table>
<div id="tb">
<form id="bgmkTab_searchForm" style="float:left">
姓名: <input class="easyui-textbox" id="FIELD_USER_NAME" name="FIELD_USER_NAME" style="width:200px"/>&nbsp;&nbsp;
</form>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="javascript:searchRow()">查询</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="javascript:refreshRow()">刷新</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="javascript:addRow()">新增报工</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear',plain:true" onclick="javascript:deleteBatchRow()">删除</a>
</div>
<div id="detail" style="overflow:auto;"></div>
<div id="advsearch" style="overflow:auto;"></div>
<div id="uploadcommon" style="overflow:auto;"></div>
<script type="text/javascript" src="${ctx}/jwapp/pages/standard/js/jwStandardModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/bgmk/js/bgmkModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/bgmk/js/bgmkTab.js" charset="utf-8"></script>
<%@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="USER_TYPE" data-options="required:true" name="FIELD_USER_TYPE" style="width:150px " value="${is_row.USER_TYPE}"/>
</td>
</tr>
<tr>
<td class="tableStyleLable">
<span>工作内容:</span>
</td>
<td style="height:150px" >
<input class="easyui-textbox" data-options="multiline:true ,required:true" id="CONTENT" name="FIELD_CONTENT" style="width:400px ; height:140px" value="${is_row.CONTENT}"/>
</td>
</tr>
<tr>
<td class="tableStyleLable">
<span>工作用时:</span>
</td>
<td>
<input class="easyui-numberspinner" data-options="min:0,max:10 ,required:true" id="GZYS" name="FIELD_GZYS" style="width:150px" value="${is_row.GZYS}"/>
</td>
</tr>
<tr>
<td class="tableStyleLable">
<span>报工时间:</span>
</td>
<td>
<input class="easyui-datebox" data-options="min:0,max:10 ,required:true" id="BG_TIME" name="FIELD_BG_TIME" style="width:150px" value="${is_row.BG_TIME}"/>
</td>
</tr>
</table>
</form>
\ No newline at end of file
<%@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="USER_TYPE" data-options="required:true" name="FIELD_USER_TYPE" style="width:150px " value="${is_row.USER_TYPE}"/>
</td>
</tr>
<tr>
<td class="tableStyleLable">
<span>工作内容:</span>
</td>
<td style="height:150px" >
<input class="easyui-textbox" data-options="multiline:true ,required:true" id="CONTENT" name="FIELD_CONTENT" style="width:400px ; height:140px" value="${is_row.CONTENT}"/>
</td>
</tr>
<tr>
<td class="tableStyleLable">
<span>工作用时:</span>
</td>
<td>
<input class="easyui-numberspinner" data-options="min:0,max:10 ,required:true" id="GZYS" name="FIELD_GZYS" style="width:150px" value="${is_row.GZYS}"/>
</td>
</tr>
<tr>
<td class="tableStyleLable">
<span>报工时间:</span>
</td>
<td>
<input class="easyui-datebox" data-options="min:0,max:10 ,required:true" id="BG_TIME" name="FIELD_BG_TIME" style="width:150px" value="${is_row.BG_TIME}"/>
</td>
</tr>
</table>
</form>
\ No newline at end of file
/**
* 序号:1
* 功能:定义分页(EasyUI)
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:无需更改
**/
var ls_width = $(window).width();
var ls_height = $(window).height();
var local_page=1;
var rows=20;
var listPageSize = [10,20,50,100,500,1000];
var queryData = eval("({'page':'"+local_page+"','rows':'"+rows+"'})");
var tab_n = 0;
//重置分页参数
function resetQueryData(){
queryData = "";
queryData = eval("({'page':'"+local_page+"','rows':'"+rows+"'})");
}
//定义附件关联模块ID(1:一般业务,2:测试信息,3:审批业务,999:其它数据 )
var ls_module_id='2';
//定义当前模块业务类型(YBYW:一般业务,SPGL:审批业务)
var ls_ywlx = 'YBYW';
/****/
/**
* 序号:2
* 功能:构建下拉框内容
* 参数:
* 说明:方便新增、修改页面里的下拉选项加载数据
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
//加载人员类型数据
var v_typequery = {};
v_typequery.FIELD_tableName = "DM_USER_TYPE";
var v_typequery_data = standardModel.dataAction.listAllCache(v_typequery);
/**
* 序号:3
* 功能:构建主页面列表
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
//定义grid列表
var ls_title="报工模块&nbsp;&nbsp;";
var is_column = [ [
{field : 'CONTENT',title : '工作内容',width : 300,align : 'center'},
{field : 'BG_TIME',title : '报工时间',width : 80,align : 'center'},
{field : 'GZYS',title : '工作用时',width : 80,align : 'center'},
] ];
//列表加载完成回调
function dataOnLoadSuccess(){
}
//设置颜色和每行高度
function rowstyler(index,row){
}
//展示列表
reportgrid("list",ls_title,gaowj.WEB_APP_NAME + "/bgmkData_listEmployee",queryData,is_column,60,80);
/****/
/****/
/**
* 序号:4
* 功能:新增修改弹出
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
//加载增加子页面
function addRow(){
var is_row={OPETYPE:'insert'};
openEditRow("bgmkView_bgmkTabDetail",is_row,"新增",true,0.65,0.95,0,0);
}
//加载增加子页面成功后的回调
function addUrlOnloadCallback(is_row){
$('#USER_TYPE').combobox({
data : v_typequery_data.rowSet,
valueField : 'CODE_ID',
textField : 'CODE_NAME',
editable:false,
panelHeight:'auto'
});
}
//保存
function insertData(is_entity){
var v_result = bgmkModule.bgmkActAction.insertBgmk(is_entity);
$('#list').datagrid('reload');
return v_result;
}
//加载修改子页面
function editRow(index) {
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
is_row[0].OPETYPE = 'update';
openEditRow("bgmkView_bgmkTabDetail",is_row[0],"编辑",true,0.65,0.95,0,0);
}
//加载修改子页面成功后的回调
function updateUrlOnloadCallback(is_row){
$('#USER_TYPE').combobox({
data : v_typequery_data.rowSet,
valueField : 'CODE_ID',
textField : 'CODE_NAME',
editable:false,
panelHeight:'auto'
});
}
//保存
function updateData(is_entity){
v_result = bgmkModule.bgmkActAction.updateBgmk(is_entity);
$('#list').datagrid('reload');
return v_result;
}
/****/
/**
* 序号:5
* 功能:刷新
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function refreshRow(){
$('#list').datagrid('load',{});
$("#bgmkTab_searchForm")[0].reset();
}
/****/
/****/
/**
* 序号:6
* 功能:单个删除
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function deleteRow(index){
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
var code = is_row[0].UUID;
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.FIELD_CODE = code;
var v_result = bgmkModule.bgmkActAction.deleteBgmk(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
}
});
}
/****/
/**
* 序号:7
* 功能:批量删除
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function deleteBatchRow(){
var code="";
var rows = $('#list').datagrid('getSelections');
for(var i=0; i<rows.length; i++){
code = code + rows[i].UUID+",";
}
if(rows == null || rows == ""){
$.messager.alert('提示',"请选择需删除的记录!",'info');
return;
}
if(code.length>0){
code = code.substring(0,code.length - 1);
}
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.FIELD_CODE = code;
var v_result = bgmkModule.bgmkActAction.deleteBgmk(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
}
});
}
/****/
//此乃本模块与后台交互的方法接口部分
var bgmkModule = function(format) {
this.module = "";
this.action = "";
this.format = format;
};
//定义数据交互
bgmkModule.prototype = BusinessObject;
//插入报工数据
bgmkModule.prototype.insertBgmk = function(){};
//修改报工数据
bgmkModule.prototype.updateBgmk = function(){};
//删除报工数据
bgmkModule.prototype.deleteBgmk = function(){};
//报工数据_分页
bgmkModule.prototype.list = function(){};
//报工所有数据
bgmkModule.prototype.listAll = function(){};
//创建一个数据操作对象,然后再后续使用
bgmkModule.bgmkActAction = new bgmkModule("json").delegate("bgmkAct");
//创建一个数据获取对象,然后再后续使用
bgmkModule.bgmkDataAction = new bgmkModule("json").delegate("bgmkData");
//说明: 1、所有方法里统一传递josn格式的参数,用于后台交互,如data.listTables(param) ,如没有参数则传'{}',如data.listTables({})
// 2、前后台数据获取传输协议 如:json[{'0':{pageCount':'2','pageNo':'1','pageSize':'20','rowSet':'[{0},{1}....]'}}]
// 3、前后台增删改的返回状态 如:json[{'0':{'rowSet':{'NAME':'-1','VALUE':'保存失败'}}}]
/**
* 序号:1
* 功能:定义分页(EasyUI)
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:无需更改
**/
var ls_width = $(window).width();
var ls_height = $(window).height();
var local_page=1;
var rows=20;
var listPageSize = [10,20,50,100,500,1000];
var queryData = eval("({'page':'"+local_page+"','rows':'"+rows+"'})");
var tab_n = 0;
//重置分页参数
function resetQueryData(){
queryData = "";
queryData = eval("({'page':'"+local_page+"','rows':'"+rows+"'})");
}
//定义附件关联模块ID(1:一般业务,2:测试信息,3:审批业务,999:其它数据 )
var ls_module_id='2';
//定义当前模块业务类型(YBYW:一般业务,SPGL:审批业务)
var ls_ywlx = 'YBYW';
/****/
/**
* 序号:2
* 功能:构建下拉框内容
* 参数:
* 说明:方便新增、修改页面里的下拉选项加载数据
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
//加载人员类型数据
var v_typequery = {};
v_typequery.FIELD_tableName = "DM_USER_TYPE";
var v_typequery_data = standardModel.dataAction.listAllCache(v_typequery);
/**
* 序号:3
* 功能:构建主页面列表
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
//定义grid列表
var ls_title="报工模块&nbsp;&nbsp;";
var is_column = [ [
{field : 'USER_NAME',title : '人员姓名',width : 100,align : 'center'},
{field : 'DEPT_NAME',title : '人员部门',width : 80,align : 'center'},
{field : 'CONTENT',title : '工作内容',width : 300,align : 'center'},
{field : 'BG_TIME',title : '报工时间',width : 80,align : 'center'},
{field : 'GZYS',title : '工作用时',width : 80,align : 'center'},
{field : 'USER_TYPE',title : '人员类型',width : 100,align : 'center',
formatter : function(value) {
return getCodeName(v_typequery_data.rowSet, value);
}
},
{field : 'CREATOR_ID',title : '创建人员',width : 100,align : 'center'},
{field : 'CREATE_TIME',title : '创建时间',width : 100,align : 'center'}
] ];
//列表加载完成回调
function dataOnLoadSuccess(){
}
//设置颜色和每行高度
function rowstyler(index,row){
}
//展示列表
datagrid("list",ls_title,gaowj.WEB_APP_NAME + "/bgmkData_list",queryData,is_column,60,80);
/****/
/**
* 序号:4
* 功能:设置主页面操作列菜单
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
//操用列显示更多(一般情况下无需更改)
function formatMenu(value, data,index) {
var returnData="";
return returnData
+ "<span class=\"icon-ext-moremenu\" style=\"padding-left:20px;*width:20px;\"></span>"
+ "<span data-p1="+index+" class=\"easyui-tooltip\" style=\"color:blue;cursor:pointer;\">更多</span>";
}
//上浮横向菜单集里的具体菜单项(需更改)
function getOptionMenu(data,index){
var returnData= "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"editRow('"
+ index + "')\">编辑</a> | <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('"
+ index + "')\">删除</a> ";
return returnData;
}
//返回菜单集的菜单个数(需更改)
function getOptionMenuCount(){
var is_menu_count = 2;
return is_menu_count;
}
/****/
/**
* 序号:5
* 功能:新增修改弹出
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
//加载增加子页面
function addRow(){
var is_row={OPETYPE:'insert'};
openEditRow("bgmkView_bgmkTabDetail",is_row,"新增",true,0.65,0.95,0,0);
}
//加载增加子页面成功后的回调
function addUrlOnloadCallback(is_row){
$('#USER_TYPE').combobox({
data : v_typequery_data.rowSet,
valueField : 'CODE_ID',
textField : 'CODE_NAME',
editable:false,
panelHeight:'auto'
});
}
//保存
function insertData(is_entity){
var v_result = bgmkModule.bgmkActAction.insertBgmk(is_entity);
$('#list').datagrid('reload');
return v_result;
}
//加载修改子页面
function editRow(index) {
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
is_row[0].OPETYPE = 'update';
openEditRow("bgmkView_bgmkTabDetail",is_row[0],"编辑",true,0.65,0.95,0,0);
}
//加载修改子页面成功后的回调
function updateUrlOnloadCallback(is_row){
$('#USER_TYPE').combobox({
data : v_typequery_data.rowSet,
valueField : 'CODE_ID',
textField : 'CODE_NAME',
editable:false,
panelHeight:'auto'
});
}
//保存
function updateData(is_entity){
v_result = bgmkModule.bgmkActAction.updateBgmk(is_entity);
$('#list').datagrid('reload');
return v_result;
}
/****/
/**
* 序号:6
* 功能:单个删除
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function deleteRow(index){
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
var code = is_row[0].UUID;
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.FIELD_CODE = code;
var v_result = bgmkModule.bgmkActAction.deleteBgmk(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
}
});
}
/****/
/**
* 序号:7
* 功能:批量删除
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function deleteBatchRow(){
var code="";
var rows = $('#list').datagrid('getSelections');
for(var i=0; i<rows.length; i++){
code = code + rows[i].UUID+",";
}
if(rows == null || rows == ""){
$.messager.alert('提示',"请选择需删除的记录!",'info');
return;
}
if(code.length>0){
code = code.substring(0,code.length - 1);
}
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.FIELD_CODE = code;
var v_result = bgmkModule.bgmkActAction.deleteBgmk(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
}
});
}
/****/
/**
* 序号:8
* 功能:刷新
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function refreshRow(){
$('#list').datagrid('load',{});
$("#bgmkTab_searchForm")[0].reset();
}
/****/
/**
* 序号:9
* 功能:查询
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function searchRow(){
var v_query = $("#bgmkTab_searchForm").getFormVal();
$('#list').datagrid('load',v_query);
}
/****/
<%@page contentType="text/html; charset=UTF-8"%>
<%@ include file="/gaowj/header-simple-1.0.jsp"%>
<div id="studentTab">
<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>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_input.css" charset="utf-8"></link>
</div>
<table id="list" style="width: 100%; height: 100%;"></table>
<div id="tb">
<form id="friendlinkTab_searchForm" style="float:left">
标题: <input class="easyui-textbox" id="FIELD_TITLE" name="FIELD_TITLE" style="width:200px"/>&nbsp;&nbsp;
</form>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="javascript:searchRow()">查询</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="javascript:refreshRow()">刷新</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="javascript:addRow()">新增</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear',plain:true" onclick="javascript:deleteBatchRow()">删除</a>
</div>
<div id="detail" style="overflow:auto;"></div>
<script type="text/javascript" src="/jfV5portal/lib/plug/jqueryColour/spectrum.js"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/standard/js/jwStandardModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/friendlink/js/friendlinkModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/friendlink/js/friendlinkTab.js" charset="utf-8"></script>
<%@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}" />
<input type="hidden" name="FIELD_USER_ID" id="USER_ID" value="${is_row.USER_ID}" />
<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" data-options="required:true" id="TITLE" name="FIELD_TITLE" style="width:300px" />
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable"><span>链接:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" data-options="required:true" id="URL" name="FIELD_URL" style="width:300px" />
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable"><span>排序:</span>
</td>
<td style="width: 85%">
<input class="easyui-numberspinner" data-options="min:0,max:8 ,required:true" id="SORT" name="FIELD_SORT" style="width:150px" />
</td>
</tr>
</table>
</form>
\ No newline at end of file
//此乃本模块与后台交互的方法接口部分
var friendlinkModule = function(format) {
this.module = "";
this.action = "";
this.format = format;
};
//定义数据交互
friendlinkModule.prototype = BusinessObject;
//获取当前登录人的友情链接信息
friendlinkModule.prototype.listFriendLinkInfo = function(){};
//保存当前登录人的友情链接信息
friendlinkModule.prototype.saveFriendLinkInfo = function(){};
//删除当前登录人的友情链接信息
friendlinkModule.prototype.removeFriendLinkInfo = function(){};
//创建一个数据操作对象,然后再后续使用
friendlinkModule.act = new friendlinkModule("json").delegate("friendlinkAct");
//创建一个数据获取对象,然后再后续使用
friendlinkModule.data = new friendlinkModule("json").delegate("friendlinkData");
//说明: 1、所有方法里统一传递josn格式的参数,用于后台交互,如data.listTables(param) ,如没有参数则传'{}',如data.listTables({})
// 2、前后台数据获取传输协议 如:json[{'0':{pageCount':'2','pageNo':'1','pageSize':'20','rowSet':'[{0},{1}....]'}}]
// 3、前后台增删改的返回状态 如:json[{'0':{'rowSet':{'NAME':'-1','VALUE':'保存失败'}}}]
/**
* 序号:1
* 功能:定义分页(EasyUI)
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:无需更改
**/
var ls_width = $(window).width();
var ls_height = $(window).height();
var local_page=1;
var rows=20;
var listPageSize = [10,20,50,100,500,1000];
var queryData = eval("({'page':'"+local_page+"','rows':'"+rows+"'})");
var tab_n = 0;
//重置分页参数
function resetQueryData(){
queryData = "";
queryData = eval("({'page':'"+local_page+"','rows':'"+rows+"'})");
}
//定义附件关联模块ID(1:一般业务,2:测试信息,3:审批业务,999:其它数据 )
var ls_module_id='2';
//定义当前模块业务类型(YBYW:一般业务,SPGL:审批业务)
var ls_ywlx = 'YBYW';
/****/
/****/
/**
* 序号:2
* 功能:构建主页面列表
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
//定义grid列表
var ls_title="友情链接";
var is_column = [ [
{field : 'TITLE',title : '标题',width : 380,align : 'left'},
{field : 'URL',title : '链接',width : 380,align : 'left'},
{field : 'SORT',title : '排序',width : 50,align : 'left'},
{field : 'CREATE_ID',title : '创建人员',width : 100,align : 'center'},
{field : 'CREATE_TIME',title : '创建时间',width : 120,align : 'center'}
] ];
//列表加载完成回调
function dataOnLoadSuccess(){
}
//设置颜色和每行高度
function rowstyler(index,row){
}
//展示列表
datagrid("list",ls_title,gaowj.WEB_APP_NAME + "/friendlinkData_listFriendLinkInfo",queryData,is_column,60,80);
/****/
/**
* 序号:3
* 功能:设置主页面操作列菜单
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
//操用列显示更多(一般情况下无需更改)
function formatMenu(value, data,index) {
var returnData="";
return returnData
+ "<span class=\"icon-ext-moremenu\" style=\"padding-left:20px;*width:20px;\"></span>"
+ "<span data-p1="+index+" class=\"easyui-tooltip\" style=\"color:blue;cursor:pointer;\">更多</span>";
}
//上浮横向菜单集里的具体菜单项(需更改)
function getOptionMenu(data,index){
var returnData= "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"editRow('"
+ index + "')\">编辑</a> | <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('"
+ index + "')\">删除</a>";
return returnData;
}
//返回菜单集的菜单个数(需更改)
function getOptionMenuCount(){
var is_menu_count = 2;
return is_menu_count;
}
/****/
/**
* 序号:4
* 功能:新增修改弹出
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
//加载增加子页面
function addRow(){
var is_row={OPETYPE:'insert'};
openEditRow("friendlinkView_friendlinkTabDetail",is_row,"新增",true,0.65,0.95,0,0);
}
//加载增加子页面成功后的回调
function addUrlOnloadCallback(is_row){
}
//保存
function insertData(is_entity){
var v_result = friendlinkModule.act.saveFriendLinkInfo(is_entity);
$('#list').datagrid('reload');
return v_result;
}
//加载修改子页面
function editRow(index) {
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
is_row[0].OPETYPE = 'update';
openEditRow("friendlinkView_friendlinkTabDetail",is_row[0],"编辑",true,0.65,0.95,0,0);
}
//加载修改子页面成功后的回调
function updateUrlOnloadCallback(is_row){
$("#inputForm").form('load',get_FIELD(is_row));
}
//保存
function updateData(is_entity){
var v_result = friendlinkModule.act.saveFriendLinkInfo(is_entity);
$('#list').datagrid('reload');
return v_result;
}
/****/
/**
* 序号:6
* 功能:单个删除
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function deleteRow(index){
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
var code = is_row[0].UUID;
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.UUID = code;
var v_result = friendlinkModule.act.removeFriendLinkInfo(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
}
});
}
/****/
/**
* 序号:7
* 功能:批量删除
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function deleteBatchRow(){
var code="";
var rows = $('#list').datagrid('getSelections');
for(var i=0; i<rows.length; i++){
code = code + rows[i].UUID+",";
}
if(rows == null || rows == ""){
$.messager.alert('提示',"请选择需删除的记录!",'info');
return;
}
if(code.length>0){
code = code.substring(0,code.length - 1);
}
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.UUID = code;
var v_result = friendlinkModule.act.removeFriendLinkInfo(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
}
});
}
/****/
/**
* 序号:8
* 功能:刷新
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function refreshRow(){
$('#list').datagrid('load',{});
$("#friendlinkTab_searchForm")[0].reset();
}
/****/
/**
* 序号:9
* 功能:查询
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function searchRow(){
var v_query = $("#friendlinkTab_searchForm").getFormVal();
$('#list').datagrid('load',v_query);
}
//此乃本模块与后台交互的方法接口部分
var noticeModule = function(format) {
this.module = "";
this.action = "";
this.format = format;
};
//定义数据交互
noticeModule.prototype = BusinessObject;
//获取当前登录人的友情链接信息
noticeModule.prototype.listNoticeInfo = function(){};
//保存当前登录人的友情链接信息
noticeModule.prototype.saveNoticeInfo = function(){};
//删除当前登录人的友情链接信息
noticeModule.prototype.removeNoticeInfo = function(){};
//创建一个数据操作对象,然后再后续使用
noticeModule.act = new noticeModule("json").delegate("noticeAct");
//创建一个数据获取对象,然后再后续使用
noticeModule.data = new noticeModule("json").delegate("noticeData");
//说明: 1、所有方法里统一传递josn格式的参数,用于后台交互,如data.listTables(param) ,如没有参数则传'{}',如data.listTables({})
// 2、前后台数据获取传输协议 如:json[{'0':{pageCount':'2','pageNo':'1','pageSize':'20','rowSet':'[{0},{1}....]'}}]
// 3、前后台增删改的返回状态 如:json[{'0':{'rowSet':{'NAME':'-1','VALUE':'保存失败'}}}]
/**
* 序号:1
* 功能:定义分页(EasyUI)
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:无需更改
**/
var ls_width = $(window).width();
var ls_height = $(window).height();
var local_page=1;
var rows=20;
var listPageSize = [10,20,50,100,500,1000];
var queryData = eval("({'page':'"+local_page+"','rows':'"+rows+"'})");
var tab_n = 0;
//重置分页参数
function resetQueryData(){
queryData = "";
queryData = eval("({'page':'"+local_page+"','rows':'"+rows+"'})");
}
//定义附件关联模块ID(1:一般业务,2:测试信息,3:审批业务,999:其它数据 )
var ls_module_id='2';
//定义当前模块业务类型(YBYW:一般业务,SPGL:审批业务)
var ls_ywlx = 'YBYW';
/****/
/****/
/**
* 序号:2
* 功能:构建主页面列表
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
//定义grid列表
var ls_title="友情链接";
var is_column = [ [
{field : 'TITLE',title : '标题',width : 380,align : 'center'},
{field : 'RELEASE_TIME',title : '发布时间',width : 120,align : 'center'},
{field : 'CREATE_ID',title : '创建人员',width : 100,align : 'center'},
{field : 'CREATE_TIME',title : '创建时间',width : 120,align : 'center'}
] ];
//列表加载完成回调
function dataOnLoadSuccess(){
}
//设置颜色和每行高度
function rowstyler(index,row){
}
//展示列表
datagrid("list",ls_title,gaowj.WEB_APP_NAME + "/noticeData_listNoticeInfo",queryData,is_column,60,80);
/****/
/**
* 序号:3
* 功能:设置主页面操作列菜单
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
//操用列显示更多(一般情况下无需更改)
function formatMenu(value, data,index) {
var returnData="";
return returnData
+ "<span class=\"icon-ext-moremenu\" style=\"padding-left:20px;*width:20px;\"></span>"
+ "<span data-p1="+index+" class=\"easyui-tooltip\" style=\"color:blue;cursor:pointer;\">更多</span>";
}
//上浮横向菜单集里的具体菜单项(需更改)
function getOptionMenu(data,index){
var returnData= "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"editRow('"
+ index + "')\">编辑</a> | <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('"
+ index + "')\">删除</a>";
return returnData;
}
//返回菜单集的菜单个数(需更改)
function getOptionMenuCount(){
var is_menu_count = 2;
return is_menu_count;
}
/****/
/**
* 序号:4
* 功能:新增修改弹出
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
//加载增加子页面
function addRow(){
var is_row={OPETYPE:'insert'};
openEditRow("noticeView_noticeTabDetail",is_row,"新增",true,0.65,0.95,0,0);
}
//加载增加子页面成功后的回调
function addUrlOnloadCallback(is_row){
//UE.getEditor("TITLE");
//UE.getEditor('TEXT').destroy();
//var ue = UE.getEditor('TEXT');
//getbaidu
//console.log(ue)
getbaidu('TEXT');
}
//保存
function insertData(is_entity){
var v_result = noticeModule.act.saveNoticeInfo(is_entity);
$('#list').datagrid('reload');
return v_result;
}
//加载修改子页面
function editRow(index) {
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
is_row[0].OPETYPE = 'update';
openEditRow("noticeView_noticeTabDetail",is_row[0],"编辑",true,0.65,0.95,0,0);
}
//加载修改子页面成功后的回调
function updateUrlOnloadCallback(is_row){
getbaidu('TEXT');
$("#inputForm").form('load',get_FIELD(is_row));
}
//保存
function updateData(is_entity){
var v_result = noticeModule.act.saveNoticeInfo(is_entity);
$('#list').datagrid('reload');
return v_result;
}
/****/
/**
* 序号:6
* 功能:单个删除
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function deleteRow(index){
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
var code = is_row[0].UUID;
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.UUID = code;
var v_result = noticeModule.act.removeNoticeInfo(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
}
});
}
/****/
/**
* 序号:7
* 功能:批量删除
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function deleteBatchRow(){
var code="";
var rows = $('#list').datagrid('getSelections');
for(var i=0; i<rows.length; i++){
code = code + rows[i].UUID+",";
}
if(rows == null || rows == ""){
$.messager.alert('提示',"请选择需删除的记录!",'info');
return;
}
if(code.length>0){
code = code.substring(0,code.length - 1);
}
$.messager.confirm('提示', '确定删除?', function(r) {
if (r) {
var v_query = {};
v_query.UUID = code;
var v_result = noticeModule.act.removeNoticeInfo(v_query);
$.messager.alert('提示',v_result.VALUE);
$('#list').datagrid('reload');
}
});
}
/****/
/**
* 序号:8
* 功能:刷新
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function refreshRow(){
$('#list').datagrid('load',{});
$("#noticeTab_searchForm")[0].reset();
}
/****/
/**
* 序号:9
* 功能:查询
* 参数:
* 说明:
* 作者:高伟杰
* 时间:2016-01-22
* 单位:宁波金网
* 备注:需更改
**/
function searchRow(){
var v_query = $("#noticeTab_searchForm").getFormVal();
$('#list').datagrid('load',v_query);
}
<%@page contentType="text/html; charset=UTF-8"%>
<%@ include file="/gaowj/header-simple-1.0.jsp"%>
<div id="studentTab">
<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>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_input.css" charset="utf-8"></link>
</div>
<table id="list" style="width: 100%; height: 100%;"></table>
<div id="tb">
<form id="noticeTab_searchForm" style="float:left">
标题: <input class="easyui-textbox" id="FIELD_TITLE" name="FIELD_TITLE" style="width:200px"/>&nbsp;&nbsp;
</form>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="javascript:searchRow()">查询</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="javascript:refreshRow()">刷新</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="javascript:addRow()">新增</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear',plain:true" onclick="javascript:deleteBatchRow()">删除</a>
</div>
<div id="detail" style="overflow:auto;"></div>
<script type="text/javascript" src="${ctx}/jwapp/common/js/baiduediter.js"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/standard/js/jwStandardModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/notice/js/noticeModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/notice/js/noticeTab.js" charset="utf-8"></script>
<%@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}" />
<input type="hidden" name="FIELD_USER_ID" id="USER_ID" value="${is_row.USER_ID}" />
<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" data-options="required:true" id="TITLE" name="FIELD_TITLE" style="width:300px" />
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable"><span>正文:</span>
</td>
<td style="width: 85%">
<script id="TEXT" name="FIELD_TEXT" type="text/plain">
</script>
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable"><span>发布时间:</span>
</td>
<td style="width: 85%">
<input class="easyui-datetimebox" data-options="required:true" id="RELEASE_TIME" name="FIELD_RELEASE_TIME" style="width:150px" />
</td>
</tr>
</table>
</form>
\ No newline at end of file
//此乃本模块与后台交互的方法接口部分
var processModule = function(format) {
this.module = "";
this.action = "";
this.format = format;
};
//定义数据交互
processModule.prototype = BusinessObject;
//获取流程定义数据
processModule.prototype.listProcess = function(){};
//创建一个数据操作对象,然后再后续使用
processModule.act = new processModule("json").delegate("processAct");
//创建一个数据获取对象,然后再后续使用
processModule.data = new processModule("json").delegate("processData");
//说明: 1、所有方法里统一传递josn格式的参数,用于后台交互,如data.listTables(param) ,如没有参数则传'{}',如data.listTables({})
// 2、前后台数据获取传输协议 如:json[{'0':{pageCount':'2','pageNo':'1','pageSize':'20','rowSet':'[{0},{1}....]'}}]
// 3、前后台增删改的返回状态 如:json[{'0':{'rowSet':{'NAME':'-1','VALUE':'保存失败'}}}]
<%@page contentType="text/html; charset=UTF-8"%>
<%@ include file="/gaowj/header-simple-1.0.jsp"%>
<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>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_input.css" charset="utf-8"></link>
</div>
<table id="list" style="width: 100%; height: 100%;"></table>
<div id="tb">
<form id="voteTab_searchForm" style="float:left">
主题内容: <input class="easyui-textbox" id="FIELD_CONTENT" name="FIELD_CONTENT" style="width:200px"/>&nbsp;&nbsp;
<input type="checkbox" name="FIELD_USERSELF" value="0" onclick="searchRow()" checked />仅显示我参与的
</form>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="javascript:searchRow()">查询</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="javascript:refreshRow()">刷新</a>
</div>
<div id="detail" style="overflow:auto;"></div>
<div id="advsearch" style="overflow:auto;"></div>
<script type="text/javascript" src="${ctx}/jwapp/pages/standard/js/jwStandardModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/vote/js/voteModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/vote/js/endedVoteTab.js" charset="utf-8"></script>
/**
* 序号:
* 功能:定义分页(EasyUI)
* 参数:
* 说明:
* 作者:朱天成
* 时间:2018-08-07
* 单位:杰夫兄弟智慧科技有限公司
* 备注:无需更改
**/
var ls_width = $(window).width();
var ls_height = $(window).height();
var local_page=1;
var rows=20;
var listPageSize = [10,20,50,100,500,1000];
var queryData = eval("({'page':'"+local_page+"','rows':'"+rows+"'})");
var tab_n = 0;
//重置分页参数
function resetQueryData(){
queryData = "";
queryData = eval("({'page':'"+local_page+"','rows':'"+rows+"'})");
}
//定义附件关联模块ID(1:一般业务,2:测试信息,3:审批业务,999:其它数据 )
var ls_module_id='2';
//定义当前模块业务类型(YBYW:一般业务,SPGL:审批业务)
var ls_ywlx = 'YBYW';
/****/
/**
* 序号:
* 功能:构建主页面列表
* 参数:
* 说明:
* 作者:朱天成
* 时间:2018-08-07
* 单位:杰夫兄弟智慧科技有限公司
* 备注:需更改
**/
//定义grid列表
var ls_title="投票管理功能&nbsp;&nbsp;<font color='#993300'></font>";
var is_column = [ [
{field : 'CONTENT',title : '主题内容',width : 150,align : 'center'},
{field :'opt',title : '操作',width : 150,align : 'center',
formatter:function(value,row,index){
var lookBtn='<a style="cursor:pointer" onclick="javascript:lookfor('+index+')">查看</a>'
return '<div class=\'optBtns\'>'+(lookBtn)+'</div>';
}
}
] ];
//列表加载完成回调
function reportrollback(){
}
//设置颜色和每行高度
function rowstyler(index,row){
}
//展示列表
queryData.FIELD_USERSELF=0;
reportgrid("list",ls_title,gaowj.WEB_APP_NAME + "/voteData_list_ended",queryData,is_column,60,80);
/****/
/**
* 序号:
* 功能:设置主页面操作列菜单
* 参数:
* 说明:
* 作者:朱天成
* 时间:2018-08-07
* 单位:杰夫兄弟智慧科技有限公司
* 备注:需更改
**/
//操用列显示更多(一般情况下无需更改)
function formatMenu(value, data,index) {
var returnData="";
return returnData
+ "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"editRow('"
+ index + "')\">投票</a>";
}
//上浮横向菜单集里的具体菜单项(需更改)
function getOptionMenu(data,index){
}
//返回菜单集的菜单个数(需更改)
function getOptionMenuCount(){
}
/**
* 序号:
* 功能:新增修改弹出
* 参数:
* 说明:
* 作者:朱天成
* 时间:2018-08-07
* 单位:杰夫兄弟智慧科技有限公司
* 备注:需更改
**/
function lookfor(index){
$('#list').datagrid('selectRow',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);
}
function openLookRow(editUrl,is_row,is_title,is_max,is_width,is_height,is_left,is_top){
$('#detail').dialog( {
title : is_title,
iconCls : $.getJwWindowPic(),
width : ls_width * is_width,
height :ls_height * is_height,
closed : false,
cache : false,
maximizable:is_max,
left:is_left,
top:is_top,
href : editUrl,
queryParams:get_FIELD(is_row),
modal : true,
buttons : [ {
text : '关闭',
iconCls : 'icon-back',
handler : function() {
closeBox('detail');
}
} ],
onLoad:function editUrlOnload(){
if(is_row.OPETYPE=='lookfor'){
lookforUrlOnloadCallback(is_row);
}else{
updateUrlOnloadCallback(is_row);
}
}
});
}
//加载投票子页面成功后的回调
function lookforUrlOnloadCallback(is_row,index){
var listItem=voteModule.voteDataAction.listItem({
FIELD_MANAGE_ID:is_row.UUID
}).listItems;
var listUserChecked=voteModule.voteDataAction.listUserChecked({
FIELD_MANAGE_ID:is_row.UUID
}).listusercheckeds;
for(var i=0;i<listItem.length;i++){
add_vote_item(listItem[i].INDEX_NAME,listItem[i].CONTENT,listItem[i].UUID);
}
for(var j=0;j<listUserChecked.length;j++){
$("input[name='vote_item_delete']").each(function(index) {
if ($("input[name='vote_item_delete']").get(index).value == listUserChecked[j].ITEM_ID) {
$("input[name='vote_item_delete']").get(index).checked = true;
}
});
}
}
/**
* 功能:刷新
* 参数:
* 说明:
* 作者:朱天成
* 时间:2018-08-07
* 单位:杰夫兄弟智慧科技有限公司
* 备注:需更改
**/
function refreshRow(){
$('#list').datagrid('load',{});
$("#voteTab_searchForm")[0].reset();
}
/****/
/**
* 功能:查询
* 参数:
* 说明:
* 作者:朱天成
* 时间:2018-08-07
* 单位:杰夫兄弟智慧科技有限公司
* 备注:需更改
**/
function searchRow(){
var v_query = $("#voteTab_searchForm").getFormVal();
$('#list').datagrid('load',v_query);
}
/****/
function add_vote_item(index,content,uuid){
if(typeof index == 'undefined'){
index='';
}
if(typeof content == 'undefined'){
content='';
}
if(typeof uuid == 'undefined'){
uuid='';
}
var vote_item_list=$(".vote_item_list");
var item=$("<div class='vote_item_one' style='overflow: auto;margin-bottom:10px'></div>");
vote_item_list.append(item);
var vote_item_checkbox=$('<div></div>');
vote_item_checkbox.addClass('vote_item_checkbox');
var vote_item_info=$('<div></div>');
vote_item_info.addClass('vote_item_info');
item.append(vote_item_checkbox);
item.append(vote_item_info);
vote_item_checkbox.append('<input type="checkbox" name="vote_item_delete" value="'+uuid+'"/>');
vote_item_info.append(index+'.'+content);
$.parser.parse('.vote_item_one');
}
/**
* 序号:
* 功能:定义分页(EasyUI)
* 参数:
* 说明:
* 作者:朱天成
* 时间:2018-08-07
* 单位:杰夫兄弟智慧科技有限公司
* 备注:无需更改
**/
var ls_width = $(window).width();
var ls_height = $(window).height();
var local_page=1;
var rows=20;
var listPageSize = [10,20,50,100,500,1000];
var queryData = eval("({'page':'"+local_page+"','rows':'"+rows+"'})");
var tab_n = 0;
//重置分页参数
function resetQueryData(){
queryData = "";
queryData = eval("({'page':'"+local_page+"','rows':'"+rows+"'})");
}
//定义附件关联模块ID(1:一般业务,2:测试信息,3:审批业务,999:其它数据 )
var ls_module_id='2';
//定义当前模块业务类型(YBYW:一般业务,SPGL:审批业务)
var ls_ywlx = 'YBYW';
/****/
/**
* 序号:
* 功能:构建主页面列表
* 参数:
* 说明:
* 作者:朱天成
* 时间:2018-08-07
* 单位:杰夫兄弟智慧科技有限公司
* 备注:需更改
**/
//定义grid列表
var ls_title="投票管理功能&nbsp;&nbsp;<font color='#993300'></font>";
var is_column = [ [
{field : 'CONTENT',title : '主题内容',width : 150,align : 'center'},
{field : 'VOTE_COUNT',title : '状态',width : 150,align : 'center',
formatter:function(value,row,index){
return value>0?"已投":"未投";
}
},
{field :'opt',title : '操作',width : 150,align : 'center',
formatter:function(value,row,index){
var voteBtn='<a style="cursor:pointer" onclick="javascript:editRow('+index+')">投票</a>'
var lookBtn='<a style="cursor:pointer" onclick="javascript:lookfor('+index+')">查看</a>'
return '<div class=\'optBtns\'>'+(row.VOTE_COUNT>0?lookBtn:voteBtn)+'</div>';
}
}
] ];
//列表加载完成回调
function reportrollback(){
}
//设置颜色和每行高度
function rowstyler(index,row){
}
//展示列表
reportgrid("list",ls_title,gaowj.WEB_APP_NAME + "/voteData_list_ongoing",queryData,is_column,60,80);
/****/
/**
* 序号:
* 功能:设置主页面操作列菜单
* 参数:
* 说明:
* 作者:朱天成
* 时间:2018-08-07
* 单位:杰夫兄弟智慧科技有限公司
* 备注:需更改
**/
//操用列显示更多(一般情况下无需更改)
function formatMenu(value, data,index) {
var returnData="";
return returnData
+ "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"editRow('"
+ index + "')\">投票</a>";
}
//上浮横向菜单集里的具体菜单项(需更改)
function getOptionMenu(data,index){
}
//返回菜单集的菜单个数(需更改)
function getOptionMenuCount(){
}
/**
* 序号:
* 功能:新增修改弹出
* 参数:
* 说明:
* 作者:朱天成
* 时间:2018-08-07
* 单位:杰夫兄弟智慧科技有限公司
* 备注:需更改
**/
//加载投票子页面
function editRow(index) {
$('#list').datagrid('selectRow',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);
}
function lookfor(index){
$('#list').datagrid('selectRow',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);
}
function openLookRow(editUrl,is_row,is_title,is_max,is_width,is_height,is_left,is_top){
$('#detail').dialog( {
title : is_title,
iconCls : $.getJwWindowPic(),
width : ls_width * is_width,
height :ls_height * is_height,
closed : false,
cache : false,
maximizable:is_max,
left:is_left,
top:is_top,
href : editUrl,
queryParams:get_FIELD(is_row),
modal : true,
buttons : [ {
text : '关闭',
iconCls : 'icon-back',
handler : function() {
closeBox('detail');
}
} ],
onLoad:function editUrlOnload(){
if(is_row.OPETYPE=='lookfor'){
lookforUrlOnloadCallback(is_row);
}else{
updateUrlOnloadCallback(is_row);
}
}
});
}
//加载投票子页面成功后的回调
function lookforUrlOnloadCallback(is_row,index){
var listItem=voteModule.voteDataAction.listItem({
FIELD_MANAGE_ID:is_row.UUID
}).listItems;
var listUserChecked=voteModule.voteDataAction.listUserChecked({
FIELD_MANAGE_ID:is_row.UUID
}).listusercheckeds;
for(var i=0;i<listItem.length;i++){
add_vote_item(listItem[i].INDEX_NAME,listItem[i].CONTENT,listItem[i].UUID);
}
for(var j=0;j<listUserChecked.length;j++){
$("input[name='vote_item_delete']").each(function(index) {
if ($("input[name='vote_item_delete']").get(index).value == listUserChecked[j].ITEM_ID) {
$("input[name='vote_item_delete']").get(index).checked = true;
}
});
}
}
//加载投票子页面成功后的回调
function updateUrlOnloadCallback(is_row){
var listItem=voteModule.voteDataAction.listItem({
FIELD_MANAGE_ID:is_row.UUID
}).listItems;
for(var i=0;i<listItem.length;i++){
add_vote_item(listItem[i].INDEX_NAME,listItem[i].CONTENT,listItem[i].UUID);
}
}
//保存
function updateData(is_entity){
var uuids='';
var i=0;
$(".vote_item_list :checkbox:checked").each(function(index){
uuids+=','+$(this).val();
i++;
});
var min=$("input[name=FIELD_MIN_COUNT]").val();
var max=$("input[name=FIELD_MAX_COUNT]").val();
var flag=$("input[name=FIELD_STATUS_FLAG]").val();
//判断用户选择的选项是否在上下限之间,如果不在,则提示用户,不进行提交操作
if(min==max&&i!=min){
$.messager.alert("必须选择"+max+"个选项");
return;
}else if(i<min||i>max){
$.messager.alert("请选择"+min+"到"+max+"个选项");
return;
}
if(uuids.length>0){
uuids=uuids.substring(1);
}
is_entity.FIELD_UUIDS=uuids;
is_entity.FIELD_FLAG =flag;
v_result = voteModule.voteActAction.insertUserVote(is_entity);
$('#list').datagrid('reload');
return v_result;
// }
}
/**
* 功能:刷新
* 参数:
* 说明:
* 作者:朱天成
* 时间:2018-08-07
* 单位:杰夫兄弟智慧科技有限公司
* 备注:需更改
**/
function refreshRow(){
$('#list').datagrid('load',{});
$("#voteTab_searchForm")[0].reset();
}
/****/
/**
* 功能:查询
* 参数:
* 说明:
* 作者:朱天成
* 时间:2018-08-07
* 单位:杰夫兄弟智慧科技有限公司
* 备注:需更改
**/
function searchRow(){
var v_query = $("#voteTab_searchForm").getFormVal();
$('#list').datagrid('load',v_query);
}
/****/
/**
* 查询自己参与
* **/
function userselfRow(){
// $("#list").each(function(index) {
// var content=$(this).val();
// if ($(this).VOTE_COUNT >0) {
// $('#list').datagrid('load',content);
// }
// });
// if(row.VOTE_COUNT>0){
//
// }
// $('#list').datagrid('load',v_query);
}
function add_vote_item(index,content,uuid){
if(typeof index == 'undefined'){
index='';
}
if(typeof content == 'undefined'){
content='';
}
if(typeof uuid == 'undefined'){
uuid='';
}
var vote_item_list=$(".vote_item_list");
var item=$("<div class='vote_item_one' style='overflow: auto;margin-bottom:10px'></div>");
vote_item_list.append(item);
var vote_item_checkbox=$('<div></div>');
vote_item_checkbox.addClass('vote_item_checkbox');
var vote_item_info=$('<div></div>');
vote_item_info.addClass('vote_item_info');
item.append(vote_item_checkbox);
item.append(vote_item_info);
vote_item_checkbox.append('<input type="checkbox" name="vote_item_delete" value="'+uuid+'"/>');
vote_item_info.append(index+'.'+content);
$.parser.parse('.vote_item_one');
}
...@@ -7,18 +7,29 @@ var voteModule = function(format) { ...@@ -7,18 +7,29 @@ var voteModule = function(format) {
//定义数据交互 //定义数据交互
voteModule.prototype = BusinessObject; voteModule.prototype = BusinessObject;
//插入附件数据 //插入主题
voteModule.prototype.insertVote = function(){}; voteModule.prototype.insertVote = function(){};
//修改附件数据 //插入用户投票
voteModule.prototype.insertUserVote = function(){};
//修改主题
voteModule.prototype.updateVote = function(){}; voteModule.prototype.updateVote = function(){};
//删除附件数据 //删除主题
voteModule.prototype.deleteVote = function(){}; voteModule.prototype.deleteVote = function(){};
//获取主题选项
voteModule.prototype.listItem = function(){};
//获取用户选项
voteModule.prototype.listUserChecked = function(){};
//删除主题选项
voteModule.prototype.deleteItem = function(){};
//提前结束
voteModule.prototype.endVote = function(){};
//附件数据_分页 //主题_分页
voteModule.prototype.list = function(){}; voteModule.prototype.list = function(){};
//附件所有数据 //主题所有数据
voteModule.prototype.listAll = function(){}; voteModule.prototype.listAll = function(){};
//创建一个数据操作对象,然后再后续使用 //创建一个数据操作对象,然后再后续使用
voteModule.voteActAction = new voteModule("json").delegate("voteAct"); voteModule.voteActAction = new voteModule("json").delegate("voteAct");
//创建一个数据获取对象,然后再后续使用 //创建一个数据获取对象,然后再后续使用
......
...@@ -39,8 +39,8 @@ var ls_ywlx = 'YBYW'; ...@@ -39,8 +39,8 @@ var ls_ywlx = 'YBYW';
* 单位:杰夫兄弟智慧科技有限公司 * 单位:杰夫兄弟智慧科技有限公司
* 备注:需更改 * 备注:需更改
**/ **/
//投票状态
var v_statusquery_data = [{CODE_ID:'0',CODE_NAME:'未开始'},{CODE_ID:'1',CODE_NAME:'已开始'},{CODE_ID:'2',CODE_NAME:'已结束'}];
/****/ /****/
/** /**
...@@ -57,6 +57,15 @@ var ls_ywlx = 'YBYW'; ...@@ -57,6 +57,15 @@ var ls_ywlx = 'YBYW';
var ls_title="投票管理功能&nbsp;&nbsp;<font color='#993300'></font>"; var ls_title="投票管理功能&nbsp;&nbsp;<font color='#993300'></font>";
var is_column = [ [ var is_column = [ [
{field : 'CONTENT',title : '主题内容',width : 150,align : 'center'}, {field : 'CONTENT',title : '主题内容',width : 150,align : 'center'},
{field : 'SUB_TITLE',title : '副标题',width : 150,align : 'center'},
{field : 'MAX_COUNT',title : '上限值',width : 80,align : 'center'},
{field : 'MIN_COUNT',title : '下限值',width : 80,align : 'center'},
{field : 'STATUS_FLAG',title : '状态',width : 80,align : 'center',
formatter : function(value) {
return getCodeName(v_statusquery_data, value);
}
},
{field : 'REALLY_END_TIME',title : '实际结束时间',width : 150,align : 'center'},
{field : 'START_TIME',title : '开始时间',width : 150,align : 'center'}, {field : 'START_TIME',title : '开始时间',width : 150,align : 'center'},
{field : 'END_TIME',title : '结束时间',width : 150,align : 'center'}, {field : 'END_TIME',title : '结束时间',width : 150,align : 'center'},
{field : 'CREATE_ID',title : '创建人',width : 80,align : 'center'}, {field : 'CREATE_ID',title : '创建人',width : 80,align : 'center'},
...@@ -67,7 +76,13 @@ var is_column = [ [ ...@@ -67,7 +76,13 @@ var is_column = [ [
] ]; ] ];
//列表加载完成回调 //列表加载完成回调
function dataOnLoadSuccess(){ function dataOnLoadSuccess(){
$('#FIELD_STATUS_FLAG').combobox({
data : v_statusquery_data,
valueField : 'CODE_ID',
textField : 'CODE_NAME',
editable:false,
panelHeight:'auto'
});
} }
//设置颜色和每行高度 //设置颜色和每行高度
function rowstyler(index,row){ function rowstyler(index,row){
...@@ -100,8 +115,8 @@ function formatMenu(value, data,index) { ...@@ -100,8 +115,8 @@ function formatMenu(value, data,index) {
function getOptionMenu(data,index){ function getOptionMenu(data,index){
var returnData= "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span> <a href=\"javascript:void(0);\" onclick=\"editRow('" var returnData= "<span class=\"icon-edit\" style=\"padding-left:20px;*width:20px;\"></span> <a href=\"javascript:void(0);\" onclick=\"editRow('"
+ index + "')\">编辑</a> | <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('" + index + "')\">编辑</a> | <span class=\"icon-clear\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"deleteRow('"
+ index + "')\">删除</a> | <span class=\"icon-ext-file\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"uploadcommonRow('" + index + "')\">删除</a> | <span class=\"icon-reload\" style=\"padding-left:20px;*width:20px;\"></span><a href=\"javascript:void(0);\" onclick=\"voteEndRow('"
+ index + "')\">附件</a>"; + index + "')\">结束</a>";
return returnData; return returnData;
} }
...@@ -131,19 +146,30 @@ function addRow(){ ...@@ -131,19 +146,30 @@ function addRow(){
} }
//加载增加子页面成功后的回调 //加载增加子页面成功后的回调
function addUrlOnloadCallback(is_row){ function addUrlOnloadCallback(is_row){
initDateBox();
} }
//保存 //保存
function insertData(is_entity){ function insertData(is_entity){
// is_entity.FIELD_CREATE_TIME = strToDateObj(is_entity.FIELD_CREATE_TIME); var returnIsValid = $('#voteItemInputForm').form('validate');
// is_entity.FIELD_RECEIVE_DATE = strToDateObj(is_entity.FIELD_RECEIVE_DATE); if (returnIsValid) {
var v_result = voteModule.voteActAction.insertVote(is_entity); var items=[];
$('#list').datagrid('reload'); $("input[name=vote_item_index]").each(function(index){
return v_result; items.push({
INDEX_NAME:$(this).val(),
CONTENT:$("input[name=vote_item_info]").eq(index).val(),
UUID:$("input[name=vote_item_check]").eq(index).val()
});
});
is_entity.FIELD_ITEMS=JSON.stringify(items);
var v_result = voteModule.voteActAction.insertVote(is_entity);
$('#list').datagrid('reload');
return v_result;
}
} }
//加载修改子页面 //加载修改子页面
function editRow(index) { function editRow(index) {
$('#list').datagrid('selectRow',index); $('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections'); var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections'); $('#list').datagrid('clearSelections');
...@@ -153,16 +179,80 @@ function editRow(index) { ...@@ -153,16 +179,80 @@ function editRow(index) {
//加载修改子页面成功后的回调 //加载修改子页面成功后的回调
function updateUrlOnloadCallback(is_row){ function updateUrlOnloadCallback(is_row){
initDateBox();
var listItem=voteModule.voteDataAction.listItem({
FIELD_MANAGE_ID:is_row.UUID
}).listItems;
for(var i=0;i<listItem.length;i++){
add_vote_item(listItem[i].INDEX_NAME,listItem[i].CONTENT,listItem[i].UUID);
}
$('#STATUS_FLAG').combobox({
data : v_statusquery_data,
valueField : 'CODE_ID',
textField : 'CODE_NAME',
editable:false,
panelHeight:'auto'
});
}
function addZero(d){
if(d<10){
return "0"+d;
}
return d;
}
function initDateBox(){
$("#END_TIME").datetimebox({
required:true,
formatter:function(date){
var y = date.getFullYear();
var m = date.getMonth()+1;
var d = date.getDate();
var h = date.getHours();
var min = date.getMinutes();
var s = date.getSeconds();
var nowDate=new Date();
if(date.getTime() < nowDate.getTime()){
h = nowDate.getHours();
min = nowDate.getMinutes();
s = nowDate.getSeconds();
}
return y+'-'+addZero(m)+'-'+addZero(d)+' '+addZero(h)+':'+addZero(min)+':'+addZero(s);
}
});
$('#END_TIME').datetimebox('calendar').calendar({
validator: function(date){
return new Date().getTime()<=date||date.getDate()==new Date().getDate();
}
});
/*$('#ss').numberspinner({
min: 10,
max: 100,
editable: false
});*/
} }
//保存 //保存
function updateData(is_entity){ function updateData(is_entity){
// is_entity.FIELD_CREATE_TIME = strToDateObj(is_entity.FIELD_CREATE_TIME); var returnIsValid = $('#voteItemInputForm').form('validate');
// is_entity.FIELD_RECEIVE_DATE = strToDateObj(is_entity.FIELD_RECEIVE_DATE); if (returnIsValid) {
v_result = voteModule.mvoteActAction.updateVote(is_entity); var items=[];
$("input[name=vote_item_index]").each(function(index){
items.push({
INDEX_NAME:$(this).val(),
CONTENT:$("input[name=vote_item_info]").eq(index).val(),
UUID:$("input[name=vote_item_delete]").eq(index).val()
});
});
is_entity.FIELD_ITEMS=JSON.stringify(items);
v_result = voteModule.voteActAction.updateVote(is_entity);
$('#list').datagrid('reload'); $('#list').datagrid('reload');
return v_result; return v_result;
}
} }
/****/ /****/
...@@ -232,6 +322,28 @@ function deleteBatchRow(){ ...@@ -232,6 +322,28 @@ function deleteBatchRow(){
/****/ /****/
/** /**
*
* 提前结束
*
**/
function voteEndRow(index){
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
var code = is_row[0].UUID;
$.messager.confirm('提示', '确定提前结束?', function(r) {
if (r) {
var v_query = {};
v_query.FIELD_UUID = code;
var v_result = voteModule.voteActAction.endVote(v_query);
$('#list').datagrid('reload');
}
});
}
/**
* 序号:8 * 序号:8
* 功能:刷新 * 功能:刷新
* 参数: * 参数:
...@@ -263,87 +375,43 @@ function searchRow(){ ...@@ -263,87 +375,43 @@ function searchRow(){
} }
/****/ /****/
/** function add_vote_item(index,content,uuid){
* 序号:10 if(typeof index == 'undefined'){
* 功能:高级查询弹出 index='';
* 参数: }
* 说明: if(typeof content == 'undefined'){
* 作者:朱天成 content='';
* 时间:2018-08-07 }
* 单位:杰夫兄弟智慧科技有限公司 if(typeof uuid == 'undefined'){
* 备注:需更改 uuid='';
**/ }
//加载高级查询子页面 var vote_item_list=$(".vote_item_list");
function advsearchRow(){ var item=$("<div class='vote_item_one' style='overflow: auto;margin-bottom:10px'></div>");
var is_row={OPETYPE:'ww'}; vote_item_list.append(item);
openAdvsearchRow("voteView_voteAdvsearch",is_row,"高级查询",true,0.65,0.95,0,0);
}
//加载高级查询子页面成功后的回调
function addAdvsearchCallback(is_row){
} var vote_item_checkbox=$('<div></div>');
//高级查询 vote_item_checkbox.addClass('vote_item_checkbox');
function advsearchData(is_entity){
// is_entity.FIELD_START_TIME = strToDateObj(is_entity.FIELD_START_TIME);
// is_entity.FIELD_END_TIME = strToDateObj(is_entity.FIELD_END_TIME);
// is_entity.FIELD_START_SCHOOLTIME = strToDateObj(is_entity.FIELD_START_SCHOOLTIME);
// is_entity.FIELD_END_SCHOOLTIME = strToDateObj(is_entity.FIELD_END_SCHOOLTIME);
$('#list').datagrid('load',is_entity);
}
/****/
/**
* 序号:11
* 功能:处理接口附件
* 参数:
* 说明:
* 作者:朱天成
* 时间:2018-08-07
* 单位:杰夫兄弟智慧科技有限公司
* 备注:需更改
**/
function uploadcommonRow(index){
$('#list').datagrid('selectRow',index);
var is_row = $('#list').datagrid('getSelections');
$('#list').datagrid('clearSelections');
var code = is_row[0].UUID; var vote_item_index=$('<div></div>');
vote_item_index.addClass('vote_item_index');
var vote_item_info=$('<div></div>');
vote_item_info.addClass('vote_item_info');
item.append(vote_item_checkbox);
item.append(vote_item_index);
item.append(vote_item_info);
vote_item_checkbox.append('<input type="checkbox" name="vote_item_delete" value="'+uuid+'"/>');
vote_item_index.append('<input class="easyui-validatebox easyui-textbox" data-options="required:true" name="vote_item_index" value="'+index+'" />');
vote_item_info.append('<input class="easyui-validatebox easyui-textbox" data-options="required:true" name="vote_item_info" style="width: 400px" value="'+content+'"/>');
var is_row={MAINDATA_ID:code,MODULE_ID:ls_module_id}; $.parser.parse('.vote_item_one');
var editUrl = "uploadFileCommonView_uploadfileCommonTab?FIELD_MODULE_ID="+ls_module_id+"&FIELD_MAINDATA_ID="+code;
openViewIframRow("uploadcommon",editUrl,is_row,"毕业证附件",true,0.65,0.95,0,0);
} }
/****/
/** function delete_vote_item(){
* 序号:12 $(".vote_item_list :checkbox:checked").each(function(){
* 功能:批量处理接口附件 $(this).parent().parent().remove();
* 参数:
* 说明: });
* 作者:朱天成
* 时间:2018-08-07
* 单位:杰夫兄弟智慧科技有限公司
* 备注:需更改
**/
function uploadcommonBatchRow(){
var code="";
var rows = $('#list').datagrid('getSelections');
for(var i=0; i<rows.length; i++){
code = code + rows[i].UUID+",";
}
if(rows == null || rows == ""){
$.messager.alert('提示',"请选择记录!",'info');
return;
}
if(code.length>0){
code = code.substring(0,code.length - 1);
}
var is_row={MAINDATA_ID:code,MODULE_ID:ls_module_id};
var editUrl = "uploadFileCommonView_uploadfileCommonTab?FIELD_MODULE_ID="+ls_module_id+"&FIELD_MAINDATA_ID="+code;
openViewIframRow("uploadcommon",editUrl,is_row,"批量毕业证附件",true,0.65,0.95,0,0);
} }
/****/
\ No newline at end of file
<%@page contentType="text/html; charset=UTF-8"%>
<%@ include file="/gaowj/header-simple-1.0.jsp"%>
<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>
<link rel="stylesheet" type="text/css" href="${ctx}/jwapp/common/css/content_input.css" charset="utf-8"></link>
</div>
<table id="list" style="width: 100%; height: 100%;"></table>
<div id="tb">
<form id="voteTab_searchForm" style="float:left">
主题内容: <input class="easyui-textbox" id="FIELD_CONTENT" name="FIELD_CONTENT" style="width:200px"/>&nbsp;&nbsp;
<input type="checkbox" name="FIELD_USERSELF" value="0" onclick="searchRow()" />仅显示我参与的
</form>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="javascript:searchRow()">查询</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="javascript:refreshRow()">刷新</a>
</div>
<div id="detail" style="overflow:auto;"></div>
<div id="advsearch" style="overflow:auto;"></div>
<script type="text/javascript" src="${ctx}/jwapp/pages/standard/js/jwStandardModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/vote/js/voteModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/vote/js/ongoingVoteTab.js" charset="utf-8"></script>
<%@page contentType="text/html; charset=UTF-8"%>
<style>
.vote_item_list div div{
float:left;
}
.vote_item_content{
margin: 10px 15px;
}
.vote_item_info{
margin-left: 26px;
}
.vote_item_index input{
width:120px;
}
.tableStyle span,.vote_item_content span{
border:none;
}
</style>
<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}" />
<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}" />
<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" readonly="readonly" id="CONTENT" name="FIELD_CONTENT" style="width: 400px" required="true" value="${is_row.CONTENT}" />
</td>
</tr>
</table>
</form>
<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/>
</div>
<div class="vote_item_list">
</div>
</div>
</form>
\ No newline at end of file
<%@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="adv_CONTENT" name="FIELD_CONTENT" style="width:365px" />
</td>
</tr>
<tr>
<td style="width: 20%;" class="tableStyleLable">
<span>
投票开始时间从:
</span>
</td>
<td style="width: 80%">
<input class="easyui-datetimebox" id="adv_START_START_TIME" name="FIELD_START_START_TIME"/>
<span>到</span>
<input id="adv_END_START_TIME" name="FIELD_END_START_TIME" type="text" class="easyui-datetimebox">
</td>
</tr>
<tr>
<td style="width: 20%;" class="tableStyleLable">
<span>
投票结束时间从:
</span>
</td>
<td style="width: 80%">
<input class="easyui-datetimebox" id="adv_START_END_TIME" name="FIELD_START_END_TIME"/>
<span>到</span>
<input id="adv_END_END_TIME" name="FIELD_END_END_TIME" type="text" class="easyui-datetimebox">
</td>
</tr>
</table>
</form>
\ No newline at end of file
...@@ -8,18 +8,19 @@ ...@@ -8,18 +8,19 @@
<table id="list" style="width: 100%; height: 100%;"></table> <table id="list" style="width: 100%; height: 100%;"></table>
<div id="tb"> <div id="tb">
<form id="voteTab_searchForm" style="float:left"> <form id="voteTab_searchForm" style="float:left">
主题名称: <input class="easyui-textbox" id="FIELD_CONTENT" name="FIELD_CONTENT" style="width:200px"/>&nbsp;&nbsp; 主题内容: <input class="easyui-textbox" id="FIELD_CONTENT" name="FIELD_CONTENT" style="width:200px"/>&nbsp;&nbsp;
开始时间: <input class="easyui-datetimebox" id="adv_START_START_TIME" name="FIELD_START_START_TIME" style="width:150px"/>
-<input class="easyui-datetimebox" id="adv_END_START_TIME" name="FIELD_END_START_TIME" style="width:150px"/>&nbsp;&nbsp;
结束时间: <input class="easyui-datetimebox" id="adv_START_END_TIME" name="FIELD_START_END_TIME" style="width:150px"/>
-<input class="easyui-datetimebox" id="adv_END_END_TIME" name="FIELD_END_END_TIME" style="width:150px"/>&nbsp;&nbsp;
</form> </form>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="javascript:searchRow()">主题查询</a> <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="javascript:searchRow()">查询</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ext-advsearch',plain:true" onclick="javascript:advsearchRow()">高级查询</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="javascript:refreshRow()">刷新</a> <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="javascript:refreshRow()">刷新</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="javascript:addRow()">新增主题</a> <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="javascript:addRow()">新增</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear',plain:true" onclick="javascript:deleteBatchRow()">删除主题</a> <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-clear',plain:true" onclick="javascript:deleteBatchRow()">删除</a>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ext-file',plain:true" onclick="javascript:uploadcommonBatchRow()">附件上传</a>
</div> </div>
<div id="detail" style="overflow:auto;"></div> <div id="detail" style="overflow:auto;"></div>
<div id="advsearch" style="overflow:auto;"></div> <div id="advsearch" style="overflow:auto;"></div>
<div id="uploadcommon" style="overflow:auto;"></div>
<script type="text/javascript" src="${ctx}/jwapp/pages/standard/js/jwStandardModule.js" charset="utf-8"></script> <script type="text/javascript" src="${ctx}/jwapp/pages/standard/js/jwStandardModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/vote/js/voteModule.js" charset="utf-8"></script> <script type="text/javascript" src="${ctx}/jwapp/pages/vote/js/voteModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/vote/js/voteTab.js" charset="utf-8"></script> <script type="text/javascript" src="${ctx}/jwapp/pages/vote/js/voteTab.js" charset="utf-8"></script>
<%@page contentType="text/html; charset=UTF-8"%> <%@page contentType="text/html; charset=UTF-8"%>
<style>
.vote_item_list div div{
float:left;
}
.vote_item_content{
margin: 10px 15px;
}
.vote_item_info{
margin-left: 26px;
}
.vote_item_index input{
width:120px;
}
</style>
<form id="inputForm" method="post" style="width: 100%;"> <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_OPETYPE" id="OPETYPE" value="${is_row.OPETYPE}" />
<input type="hidden" name="FIELD_UUID" id="UUID" value="${is_row.UUID}"/> <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;"> <table align="center" border="0" cellpadding="0" cellspacing="0" class="tableStyle" style="margin: 10px 15px; width: 95%; line-height: 30px;">
<tr> <tr>
<td style="width: 15%;" class="tableStyleLable"> <td style="width: 15%;" class="tableStyleLable">
<span>主题内容:</span> <span>主题内容:</span>
</td> </td>
<td style="width: 85%"> <td style="width: 85%">
<input class="easyui-textbox" id="CONTENT" name="FIELD_CONTENT" style="width:400px" required=true value="${is_row.CONTENT}"/> <input class="easyui-textbox" id="CONTENT" name="FIELD_CONTENT" style="width: 400px" required="true" value="${is_row.CONTENT}" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="tableStyleLable"> <td style="width: 15%;" class="tableStyleLable">
<span>投票开始时间:</span> <span>副标题:</span>
</td> </td>
<td> <td style="width: 85%">
<input class="easyui-datetimebox" id="START_TIME" name="FIELD_START_TIME" style="width:400px" value="${is_row.START_TIME}"/> <input class="easyui-textbox" id="SUB_TITLE" name="FIELD_SUB_TITLE" style="width: 400px" required="true" value="${is_row.SUB_TITLE}" />
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="tableStyleLable"> <td style="width: 15%;" class="tableStyleLable">
<span>投票结束时间:</span> <span>上限值:</span>
</td> </td>
<td> <td style="width: 85%">
<input class="easyui-datetimebox" id="END_TIME" name="FIELD_END_TIME" style="width:400px" value="${is_row.END_TIME}"/> <input class="easyui-numberspinner" id="MAX_COUNT" name="FIELD_MAX_COUNT" style="width: 400px" required="true" data-options="min:0" value="${is_row.MAX_COUNT}" />
</td> </td>
</tr> </tr>
<tr>
<td style="width: 15%;" class="tableStyleLable">
</table> <span>下限值:</span>
</td>
<td style="width: 85%">
<input class="easyui-numberspinner" id="MIN_COUNT" name="FIELD_MIN_COUNT" style="width: 400px" required="true" data-options="min:0" value="${is_row.MIN_COUNT}" />
</td>
</tr>
<tr>
<td class="tableStyleLable">
<span>投票结束时间:</span>
</td>
<td>
<input id="END_TIME" name="FIELD_END_TIME" style="width: 400px" value="${is_row.END_TIME}" />
</td>
</tr>
</table>
</form>
<form id="voteItemInputForm">
<div class="vote_item_content">
<div style="margin-bottom: 8px;">
<a onclick="add_vote_item()" class="easyui-linkbutton" data-options="iconCls:'icon-add'">添加</a>
<a onclick="delete_vote_item()" class="easyui-linkbutton" data-options="iconCls:'icon-clear'">删除</a>
</div>
<div class="vote_item_list">
</div>
</div>
</form> </form>
\ No newline at end of file
...@@ -21,3 +21,5 @@ downloadFilenameEncode2 = iso8859-1 ...@@ -21,3 +21,5 @@ downloadFilenameEncode2 = iso8859-1
#------------store---------------------- #------------store----------------------
user_store_default_1gbsize = 1073741824 user_store_default_1gbsize = 1073741824
user_defaule_filedir = folder user_defaule_filedir = folder
#------------lcyqApp Url---------------------------
lcyq_app_url = http://localhost:8080/jfV5lcyq
...@@ -6,275 +6,311 @@ ...@@ -6,275 +6,311 @@
<struts> <struts>
<package name="src_jwapp" extends="gaowj"> <package name="src_jwapp" extends="gaowj">
<!-- Portlet相关 --> <!-- Portlet相关 -->
<action name="frontPortletAct_*" class="com.jw.app.portlet.action.actAction" <action name="frontPortletAct_*" class="com.jw.app.portlet.action.actAction" method="{1}">
method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="frontPortletData_*" class="com.jw.app.portlet.action.dataAction" <action name="frontPortletData_*" class="com.jw.app.portlet.action.dataAction" method="{1}">
method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="frontPortletView_*" class="com.jw.app.portlet.action.viewAction" <action name="frontPortletView_*" class="com.jw.app.portlet.action.viewAction" method="{1}">
method="{1}">
<result name="{1}">/jwapp/pages/portlet/{1}.jsp</result> <result name="{1}">/jwapp/pages/portlet/{1}.jsp</result>
</action> </action>
<!-- 集成应用相关 --> <!-- 集成应用相关 -->
<action name="frontAppstoreAct_*" class="com.jw.app.apps.action.actAction" <action name="frontAppstoreAct_*" class="com.jw.app.apps.action.actAction" method="{1}">
method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="frontAppstoreData_*" class="com.jw.app.apps.action.dataAction" <action name="frontAppstoreData_*" class="com.jw.app.apps.action.dataAction" method="{1}">
method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<!-- 我的第二个首页的页面 --> <!-- 我的第二个首页的页面 -->
<action name="interim2" class="com.jw.app.portlet.action.viewAction" <action name="interim2" class="com.jw.app.portlet.action.viewAction" method="interim2">
method="interim2">
<result name="interim2">/jfcas05/index.jsp</result> <result name="interim2">/jfcas05/index.jsp</result>
</action> </action>
<!-- 我的第三个首页的页面 --> <!-- 我的第三个首页的页面 -->
<action name="interim3" class="com.jw.app.portlet.action.viewAction" <action name="interim3" class="com.jw.app.portlet.action.viewAction" method="interim3">
method="interim3">
<result name="interim3">/jfcas06/index.jsp</result> <result name="interim3">/jfcas06/index.jsp</result>
</action> </action>
<!-- 我的政务的页面 --> <!-- 我的政务的页面 -->
<action name="government" class="com.jw.app.portlet.action.viewAction" <action name="government" class="com.jw.app.portlet.action.viewAction" method="government">
method="government">
<result name="government">/jfcas04/government.jsp</result> <result name="government">/jfcas04/government.jsp</result>
</action> </action>
<!-- 我的新闻的页面 --> <!-- 我的新闻的页面 -->
<action name="news" class="com.jw.app.portlet.action.viewAction" <action name="news" class="com.jw.app.portlet.action.viewAction" method="news">
method="news">
<result name="news">/jfcas04/news.jsp</result> <result name="news">/jfcas04/news.jsp</result>
</action> </action>
<!-- 我的资源的页面 --> <!-- 我的资源的页面 -->
<action name="resource" class="com.jw.app.portlet.action.viewAction" <action name="resource" class="com.jw.app.portlet.action.viewAction" method="resource">
method="resource">
<result name="resource">/jfcas04/resource.jsp</result> <result name="resource">/jfcas04/resource.jsp</result>
</action> </action>
<!-- 我的应用的页面 --> <!-- 我的应用的页面 -->
<action name="apps" class="com.jw.app.portlet.action.viewAction" <action name="apps" class="com.jw.app.portlet.action.viewAction" method="apps">
method="apps">
<result name="apps">/jfcas04/apps.jsp</result> <result name="apps">/jfcas04/apps.jsp</result>
</action> </action>
<!-- 我的网盘的页面 --> <!-- 我的网盘的页面 -->
<action name="disk" class="com.jw.app.portlet.action.viewAction" <action name="disk" class="com.jw.app.portlet.action.viewAction" method="disk">
method="disk">
<result name="disk">/jfcas04/disk.jsp</result> <result name="disk">/jfcas04/disk.jsp</result>
</action> </action>
<!-- 分享 --> <!-- 分享 -->
<action name="share" class="com.jw.app.portlet.action.viewAction" <action name="share" class="com.jw.app.portlet.action.viewAction" method="share">
method="share">
<result name="share">/jfcas04/share.jsp</result> <result name="share">/jfcas04/share.jsp</result>
</action> </action>
<!-- 分享详情 --> <!-- 分享详情 -->
<action name="shareDetail" class="com.jw.app.portlet.action.viewAction" <action name="shareDetail" class="com.jw.app.portlet.action.viewAction" method="shareDetail">
method="shareDetail">
<result name="shareDetail">/jfcas04/shareDetail.jsp</result> <result name="shareDetail">/jfcas04/shareDetail.jsp</result>
</action> </action>
<!-- 办事大厅 --> <!-- 办事大厅 -->
<action name="office" class="com.jw.app.portlet.action.viewAction" <action name="office" class="com.jw.app.portlet.action.viewAction" method="office">
method="office">
<result name="office">/jfcas04/office.jsp</result> <result name="office">/jfcas04/office.jsp</result>
</action> </action>
<action name="userchoiceData_*" class="com.jw.app.userchoice.action.dataAction" method="{1}"> <action name="userchoiceData_*" class="com.jw.app.userchoice.action.dataAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="userchoiceView_*" class="com.jw.app.userchoice.action.viewAction" method="{1}">
<result name="{1}">/jwapp/pages/userchoice/{1}.jsp</result>
</action>
<!-- 日历相关 -->
<action name="calendarAct_*" class="com.jw.app.calendar.action.actAction"
method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="calendarData_*" class="com.jw.app.calendar.action.dataAction" <action name="userchoiceView_*" class="com.jw.app.userchoice.action.viewAction" method="{1}">
method="{1}"> <result name="{1}">/jwapp/pages/userchoice/{1}.jsp</result>
</action>
<!-- 考勤相关 -->
<action name="attendanceAct_*" class="com.jw.app.attendance.action.actAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="attendanceData_*" class="com.jw.app.attendance.action.dataAction" method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="calendarView_*" class="com.jw.app.calendar.action.viewAction" <action name="attendanceView_*" class="com.jw.app.attendance.action.viewAction" method="{1}">
method="{1}"> <result name="{1}">/jwapp/pages/attendance/{1}.jsp</result>
</action>
<!-- 报工相关 -->
<action name="bgmkAct_*" class="com.jw.app.bgmk.actAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="bgmkData_*" class="com.jw.app.bgmk.dataAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="bgmkView_*" class="com.jw.app.bgmk.viewAction" method="{1}">
<result name="{1}">/jwapp/pages/bgmk/{1}.jsp</result>
</action>
<!-- 日历相关 -->
<action name="calendarAct_*" class="com.jw.app.calendar.action.actAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="calendarData_*" class="com.jw.app.calendar.action.dataAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="calendarView_*" class="com.jw.app.calendar.action.viewAction" method="{1}">
<result name="{1}">/jwapp/pages/calendar/{1}.jsp</result> <result name="{1}">/jwapp/pages/calendar/{1}.jsp</result>
</action> </action>
<!-- 投票主题 --> <!-- 投票主题 -->
<action name="voteAct_*" class="com.jw.app.vote.action.actAction" <action name="voteAct_*" class="com.jw.app.vote.action.actAction" method="{1}">
method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="voteData_*" class="com.jw.app.vote.action.dataAction" <action name="voteData_*" class="com.jw.app.vote.action.dataAction" method="{1}">
method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="voteView_*" class="com.jw.app.vote.action.viewAction" <action name="voteView_*" class="com.jw.app.vote.action.viewAction" method="{1}">
method="{1}">
<result name="{1}">/jwapp/pages/vote/{1}.jsp</result> <result name="{1}">/jwapp/pages/vote/{1}.jsp</result>
</action> </action>
<!-- 通知公告 -->
<action name="noticeAct_*" class="com.jw.app.notice.action.actAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="noticeData_*" class="com.jw.app.notice.action.dataAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="noticeView_*" class="com.jw.app.notice.action.viewAction" method="{1}">
<result name="{1}">/jwapp/pages/notice/{1}.jsp</result>
</action>
<!-- 流程相关 -->
<action name="processAct_*" class="com.jw.app.process.action.actAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="processData_*" class="com.jw.app.process.action.dataAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="processView_*" class="com.jw.app.process.action.viewAction" method="{1}">
<result name="{1}">/jwapp/pages/process/{1}.jsp</result>
</action>
<!-- 友情链接相关 -->
<action name="friendlinkAct_*" class="com.jw.app.friendlink.action.actAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="friendlinkData_*" class="com.jw.app.friendlink.action.dataAction" method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="friendlinkView_*" class="com.jw.app.friendlink.action.viewAction" method="{1}">
<result name="{1}">/jwapp/pages/friendlink/{1}.jsp</result>
</action>
</package> </package>
<package name="src_jwapp_store" extends="gaowj"> <package name="src_jwapp_store" extends="gaowj">
<action name="storeAct_*" class="com.jw.app.store.action.actAction" <action name="storeAct_*" class="com.jw.app.store.action.actAction" method="{1}">
method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="storeData_*" class="com.jw.app.store.action.dataAction" <action name="storeData_*" class="com.jw.app.store.action.dataAction" method="{1}">
method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="storeView_*" class="com.jw.app.store.action.viewAction" <action name="storeView_*" class="com.jw.app.store.action.viewAction" method="{1}">
method="{1}">
<result name="{1}">/jwapp/pages/store/{1}.jsp</result> <result name="{1}">/jwapp/pages/store/{1}.jsp</result>
</action> </action>
<action name="storePersonalAct_*" class="com.jw.app.store.action.personal.actAction" <action name="storePersonalAct_*" class="com.jw.app.store.action.personal.actAction" method="{1}">
method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="storePersonalData_*" class="com.jw.app.store.action.personal.dataAction" <action name="storePersonalData_*" class="com.jw.app.store.action.personal.dataAction" method="{1}">
method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="storePersonalView_*" class="com.jw.app.store.action.personal.viewAction" <action name="storePersonalView_*" class="com.jw.app.store.action.personal.viewAction" method="{1}">
method="{1}">
<result name="{1}">/jwapp/pages/storepersonal/{1}.jsp</result> <result name="{1}">/jwapp/pages/storepersonal/{1}.jsp</result>
</action> </action>
<action name="storePartookAct_*" class="com.jw.app.store.action.partook.actAction" <action name="storePartookAct_*" class="com.jw.app.store.action.partook.actAction" method="{1}">
method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="storePartookData_*" class="com.jw.app.store.action.partook.dataAction" <action name="storePartookData_*" class="com.jw.app.store.action.partook.dataAction" method="{1}">
method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="storePartookView_*" class="com.jw.app.store.action.partook.viewAction" <action name="storePartookView_*" class="com.jw.app.store.action.partook.viewAction" method="{1}">
method="{1}">
<result name="{1}">/jwapp/pages/storepartook/{1}.jsp</result> <result name="{1}">/jwapp/pages/storepartook/{1}.jsp</result>
</action> </action>
<action name="storeShareAct_*" class="com.jw.app.store.action.share.actAction" <action name="storeShareAct_*" class="com.jw.app.store.action.share.actAction" method="{1}">
method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="storeShareData_*" class="com.jw.app.store.action.share.dataAction" <action name="storeShareData_*" class="com.jw.app.store.action.share.dataAction" method="{1}">
method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="storeShareView_*" class="com.jw.app.store.action.share.viewAction" <action name="storeShareView_*" class="com.jw.app.store.action.share.viewAction" method="{1}">
method="{1}">
<result name="{1}">/jwapp/pages/storeshare/{1}.jsp</result> <result name="{1}">/jwapp/pages/storeshare/{1}.jsp</result>
</action> </action>
<action name="storeUserAct_*" class="com.jw.app.store.action.user.actAction" <action name="storeUserAct_*" class="com.jw.app.store.action.user.actAction" method="{1}">
method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="storeUserData_*" class="com.jw.app.store.action.user.dataAction" <action name="storeUserData_*" class="com.jw.app.store.action.user.dataAction" method="{1}">
method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="storeUserView_*" class="com.jw.app.store.action.user.viewAction" <action name="storeUserView_*" class="com.jw.app.store.action.user.viewAction" method="{1}">
method="{1}">
<result name="{1}">/jwapp/pages/storeuser/{1}.jsp</result> <result name="{1}">/jwapp/pages/storeuser/{1}.jsp</result>
</action> </action>
</package> </package>
<package name="src_jwapp_portal" extends="gaowj"> <package name="src_jwapp_portal" extends="gaowj">
<action name="jwAppsColumnAct_*" class="com.jw.app.portal.column.action.actAction" method="{1}"> <action name="jwAppsColumnAct_*" class="com.jw.app.portal.column.action.actAction" method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="jwAppsColumnData_*" class="com.jw.app.portal.column.action.dataAction" method="{1}"> <action name="jwAppsColumnData_*" class="com.jw.app.portal.column.action.dataAction" method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="jwAppsColumnView_*" class="com.jw.app.portal.column.action.viewAction" method="{1}"> <action name="jwAppsColumnView_*" class="com.jw.app.portal.column.action.viewAction" method="{1}">
<result name="{1}">/jwapp/pages/portal/column/{1}.jsp</result> <result name="{1}">/jwapp/pages/portal/column/{1}.jsp</result>
</action> </action>
<action name="jwAppsPortletAct_*" class="com.jw.app.portal.portlet.action.actAction" method="{1}"> <action name="jwAppsPortletAct_*" class="com.jw.app.portal.portlet.action.actAction" method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="jwAppsPortletData_*" class="com.jw.app.portal.portlet.action.dataAction" method="{1}"> <action name="jwAppsPortletData_*" class="com.jw.app.portal.portlet.action.dataAction" method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="jwAppsPortletView_*" class="com.jw.app.portal.portlet.action.viewAction" method="{1}"> <action name="jwAppsPortletView_*" class="com.jw.app.portal.portlet.action.viewAction" method="{1}">
<result name="{1}">/jwapp/pages/portal/portlet/{1}.jsp</result> <result name="{1}">/jwapp/pages/portal/portlet/{1}.jsp</result>
</action> </action>
<action name="jwAppsAppstoreAct_*" class="com.jw.app.portal.apps.action.actAction" method="{1}"> <action name="jwAppsAppstoreAct_*" class="com.jw.app.portal.apps.action.actAction" method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="jwAppsAppstoreData_*" class="com.jw.app.portal.apps.action.dataAction" method="{1}"> <action name="jwAppsAppstoreData_*" class="com.jw.app.portal.apps.action.dataAction" method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="jwAppsAppstoreView_*" class="com.jw.app.portal.apps.action.viewAction" method="{1}"> <action name="jwAppsAppstoreView_*" class="com.jw.app.portal.apps.action.viewAction" method="{1}">
<result name="{1}">/jwapp/pages/portal/apps/{1}.jsp</result> <result name="{1}">/jwapp/pages/portal/apps/{1}.jsp</result>
</action> </action>
<action name="jwAppsContentAct_*" class="com.jw.app.portal.content.action.actAction" method="{1}"> <action name="jwAppsContentAct_*" class="com.jw.app.portal.content.action.actAction" method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="jwAppsContentData_*" class="com.jw.app.portal.content.action.dataAction" method="{1}"> <action name="jwAppsContentData_*" class="com.jw.app.portal.content.action.dataAction" method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
</action> </action>
<action name="jwAppsContentView_*" class="com.jw.app.portal.content.action.viewAction" method="{1}"> <action name="jwAppsContentView_*" class="com.jw.app.portal.content.action.viewAction" method="{1}">
<result name="{1}">/jwapp/pages/portal/content/{1}.jsp</result> <result name="{1}">/jwapp/pages/portal/content/{1}.jsp</result>
</action> </action>
<action name="jwAppsRoleView_*" class="com.jw.app.portal.role.action.viewAction" method="{1}"> <action name="jwAppsRoleView_*" class="com.jw.app.portal.role.action.viewAction" method="{1}">
<result name="{1}">/jwapp/pages/portal/role/{1}.jsp</result> <result name="{1}">/jwapp/pages/portal/role/{1}.jsp</result>
</action> </action>
<action name="jwAppsRoleData_*" class="com.jw.app.portal.role.action.dataAction" method="{1}"> <action name="jwAppsRoleData_*" class="com.jw.app.portal.role.action.dataAction" method="{1}">
<result name="json" type="json"> <result name="json" type="json">
<param name="root">jsonObject</param> <param name="root">jsonObject</param>
</result> </result>
...@@ -285,10 +321,10 @@ ...@@ -285,10 +321,10 @@
</result> </result>
</action> </action>
</package> </package>
<package name="caslogin" extends="struts-default,json-default"> <package name="caslogin" extends="struts-default,json-default">
<action name="jfcas" class="com.gaowj.system.login.CasAction"> <action name="jfcas" class="com.gaowj.system.login.CasAction">
</action> </action>
</package> </package>
</struts> </struts>
package com.jw.app.attendance.action;
import java.util.List;
import java.util.Map;
import net.sf.json.JSONObject;
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;
import com.jw.app.business.AttendanceBusiness;
public class actAction extends BasicAction {
private static final long serialVersionUID = 1407459954477199670L;
/**
*
*/
private JSONObject jsonObject = new JSONObject();
public JSONObject getJsonObject() {
return jsonObject;
}
public void setJsonObject(JSONObject jsonObject) {
this.jsonObject = jsonObject;
}
/**
* 插入
* @param entity
* @throws BusinessException
*/
public String insertAttendance() throws BusinessException {
AttendanceBusiness business = BusinessManager.getBusiness(AttendanceBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
jsonObject = new JSONObject();
try {
entity = QueryParamUtil.StringToDate(entity);
//去除不要更新的字段
entity.remove("OPETYPE");
//新增
business.insert_attendance(entity);
// 操作日志
//sysbusiness.insert_logBusiness(具体方法,操作内容,操作描述,操作记录ID,操作记录中文描述,分类)
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("insertAttendance", "" + entity,
"增加考勤记录", (String) entity.get("UUID"), (String) entity.get("NAME"), "attendancedemo1");
//
jsonObject.putAll(Status.getStatusSuccessMessage("保存成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("保存失败"));
e.printStackTrace();
}
return "json";
}
/**
* 更新
* @param entity
* @throws BusinessException
*/
public String updateAttendance() throws BusinessException {
AttendanceBusiness business = BusinessManager.getBusiness(AttendanceBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
try {
//去除不要更新的字段
entity.remove("OPETYPE");
//修改
entity = QueryParamUtil.StringToDate(entity);
business.update_attendance(entity);
// 操作日志
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("updateAttendance", "" + entity,
"修改考勤记录",(String) entity.get("UUID"), (String) entity.get("NAME"),"attendancedemo1");
//
jsonObject.putAll(Status.getStatusSuccessMessage("修改成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("修改失败"));
e.printStackTrace();
}
return "json";
}
/**
* 在软删除基础上删除记录
* @param entity
* @throws BusinessException
*/
public String deleteAttendance() throws BusinessException {
AttendanceBusiness business = BusinessManager.getBusiness(AttendanceBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
String deletekey = (String) entity.get("CODE");
List<String> ListKey = QueryParamUtil.StringToList(deletekey);
try {
business.delete_attendance(ListKey);
// 操作日志
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("deleteAttendance", "" + ListKey,
"删除考勤记录", deletekey, "多个流水号","attendancedemo1");
//
jsonObject.putAll(Status.getStatusSuccessMessage("删除成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("删除失败"));
e.printStackTrace();
}
return "json";
}
}
package com.jw.app.attendance.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.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;
import com.jw.app.business.AttendanceBusiness;
public class dataAction extends BasicAction{
private static final long serialVersionUID = -5763420688795370601L;
/**
*
*/
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 {
AttendanceBusiness business = BusinessManager.getBusiness(AttendanceBusiness.class);
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
try {
query = QueryParamUtil.StringToDate(query);
Page<Map<String, Object>> pageRows = business.list_attendance(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";
}
/**
* 员工考勤界面分页获取记录
* @param entity
* @throws BusinessException
*/
public String list2() throws BusinessException {
AttendanceBusiness business = BusinessManager.getBusiness(AttendanceBusiness.class);
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
try {
query = QueryParamUtil.StringToDate(query);
Page<Map<String, Object>> pageRows = business.list_attendanceEmployee(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.attendance.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 viewAction extends BasicAction {
/**
*
*/
private static final long serialVersionUID = 2552316251030971461L;
public String attendanceTab() throws BusinessException{
return "attendanceTab";
}
public String attendanceEmployeeTab() throws BusinessException{
return "attendanceEmployeeTab";
}
public String attendanceTabDetail() throws BusinessException{
Map<String,Object> query = RequestUtils.getUpdateFieldMapUtf8(request, RequestUtils.UPDATEDATAFIELDPREFIX);
request.setAttribute("is_row", query);
return "attendanceTabDetail";
}
}
package com.jw.app.bgmk;
import java.util.List;
import java.util.Map;
import net.sf.json.JSONObject;
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;
import com.jw.app.business.BgmkBusiness;
public class actAction extends BasicAction {
/**
*
*/
/**
*
*/
private static final long serialVersionUID = -2059356249335526616L;
/**
*
*/
private JSONObject jsonObject = new JSONObject();
public JSONObject getJsonObject() {
return jsonObject;
}
public void setJsonObject(JSONObject jsonObject) {
this.jsonObject = jsonObject;
}
/**
* 插入
* @param entity
* @throws BusinessException
*/
public String insertBgmk() throws BusinessException {
BgmkBusiness business = BusinessManager.getBusiness(BgmkBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
jsonObject = new JSONObject();
try {
entity = QueryParamUtil.StringToDate(entity);
//去除不要更新的字段
entity.remove("OPETYPE");
//新增
business.insert_bgmk(entity);
// 操作日志
//sysbusiness.insert_logBusiness(具体方法,操作内容,操作描述,操作记录ID,操作记录中文描述,分类)
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("insertBgmk", "" + entity,
"增加报工数据", (String) entity.get("UUID"), (String) entity.get("NAME"), "bgmkdemo1");
//
jsonObject.putAll(Status.getStatusSuccessMessage("保存成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("保存失败"));
e.printStackTrace();
}
return "json";
}
/**
* 更新
* @param entity
* @throws BusinessException
*/
public String updateBgmk() throws BusinessException {
BgmkBusiness business = BusinessManager.getBusiness(BgmkBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
try {
//去除不要更新的字段
entity.remove("OPETYPE");
//修改
entity = QueryParamUtil.StringToDate(entity);
business.update_bgmk(entity);
// 操作日志
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("updateBgmk", "" + entity,
"修改报工数据",(String) entity.get("UUID"), (String) entity.get("NAME"),"bgmkdemo1");
//
jsonObject.putAll(Status.getStatusSuccessMessage("修改成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("修改失败"));
e.printStackTrace();
}
return "json";
}
/**
* 在软删除基础上删除记录
* @param entity
* @throws BusinessException
*/
public String deleteBgmk() throws BusinessException {
BgmkBusiness business = BusinessManager.getBusiness(BgmkBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
String deletekey = (String) entity.get("CODE");
List<String> ListKey = QueryParamUtil.StringToList(deletekey);
try {
business.delete_bgmk(ListKey);
// 操作日志
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("deleteBgmk", "" + ListKey,
"删除报工数据", deletekey, "多个流水号","bgmkdemo1");
//
jsonObject.putAll(Status.getStatusSuccessMessage("删除成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("删除失败"));
e.printStackTrace();
}
return "json";
}
}
package com.jw.app.bgmk;
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.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;
import com.jw.app.business.BgmkBusiness;
public class dataAction extends BasicAction{
/**
*
*/
private static final long serialVersionUID = 8400799803941083524L;
/**
*
*/
private static final String console = null;
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 {
BgmkBusiness business = BusinessManager.getBusiness(BgmkBusiness.class);
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
try {
query = QueryParamUtil.StringToDate(query);
Page<Map<String, Object>> pageRows = business.list_bgmk(pageNo,pageSize, query);
setPageCount((pageRows.getCount() - 1) / pageSize + 1);
Map<String, Object> data = new HashMap<String, Object>();
data.put("rowSet", QueryParamUtil.DateToString(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";
}
/**
* 获取员工报工记录
* @param entity
* @throws BusinessException
*/
public String listEmployee() throws BusinessException {
BgmkBusiness business = BusinessManager.getBusiness(BgmkBusiness.class);
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
try {
query = QueryParamUtil.StringToDate(query);
Page<Map<String, Object>> pageRows = business.list_bgmk_employee(pageNo,pageSize, query);
setPageCount((pageRows.getCount() - 1) / pageSize + 1);
Map<String, Object> data = new HashMap<String, Object>();
data.put("rowSet", QueryParamUtil.DateToString(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.bgmk;
import java.util.Map;
import com.gaowj.business.action.BasicAction;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.RequestUtils;
public class viewAction extends BasicAction {
/**
*
*/
private static final long serialVersionUID = 847847227972540472L;
/**
*
*/
public String bgmkTab() throws BusinessException{
return "bgmkTab";
}
public String bgmkTabDetail() throws BusinessException{
Map<String,Object> query = RequestUtils.getUpdateFieldMapUtf8(request, RequestUtils.UPDATEDATAFIELDPREFIX);
request.setAttribute("is_row", query);
return "bgmkTabDetail";
}
public String bgmkEmployeeTab() throws BusinessException{
return "bgmkEmployeeTab";
}
public String bgmkEmployeeTabDetail() throws BusinessException{
Map<String,Object> query = RequestUtils.getUpdateFieldMapUtf8(request, RequestUtils.UPDATEDATAFIELDPREFIX);
request.setAttribute("is_row", query);
return "bgmkTabEmployeeDetail";
}
public String bgmkAdvsearch() throws BusinessException{
Map<String,Object> query = RequestUtils.getUpdateFieldMapUtf8(request, RequestUtils.UPDATEDATAFIELDPREFIX);
request.setAttribute("is_row", query);
return "bgmkAdvsearch";
}
}
package com.jw.app.business;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Service;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
@Service
public interface AttendanceBusiness {
/**
* 插入
* @param entity
* @throws BusinessException
*/
void insert_attendance(Map<String,Object> entity) throws BusinessException ;
/**
* 更新
* @param entity
* @throws BusinessException
*/
void update_attendance(Map<String,Object> entity) throws BusinessException ;
/**
* 删除记录
* @param entity
* @throws BusinessException
*/
void delete_attendance(List<String> list)throws BusinessException;
/**
* 分页获取记录
* @param entity
* @throws BusinessException
*/
Page<Map<String, Object>> list_attendance(int pageNo, int pageSize, Map<String, Object> query)throws BusinessException ;
/**
* 获取所有记录
* @param entity
* @throws BusinessException
*/
List<Map<String,Object>> list_attendance(Map<String, Object> query) throws BusinessException ;
/**
* 获取所有记录数
* @param entity
* @throws BusinessException
*/
int listCount_attendance(Map<String, Object> query) throws BusinessException ;
//员工考勤
Page<Map<String, Object>> list_attendanceEmployee(int pageNo, int pageSize, Map<String, Object> query)throws BusinessException ;
/**
* 获取所有记录
* @param entity
* @throws BusinessException
*/
List<Map<String,Object>> list_attendanceEmployee(Map<String, Object> query) throws BusinessException ;
/**
* 获取所有记录数
* @param entity
* @throws BusinessException
*/
int listCount_attendanceEmployee(Map<String, Object> query) throws BusinessException ;
}
package com.jw.app.business;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Service;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
@Service
public interface BgmkBusiness {
/**
* 插入
* @param entity
* @throws BusinessException
*/
void insert_bgmk(Map<String,Object> entity) throws BusinessException ;
/**
* 更新
* @param entity
* @throws BusinessException
*/
void update_bgmk(Map<String,Object> entity) throws BusinessException ;
/**
* 删除记录
* @param entity
* @throws BusinessException
*/
void delete_bgmk(List<String> list)throws BusinessException;
/**
* 分页获取记录
* @param entity
* @throws BusinessException
*/
Page<Map<String, Object>> list_bgmk(int pageNo, int pageSize, Map<String, Object> query)throws BusinessException ;
/**
* 获取所有记录
* @param entity
* @throws BusinessException
*/
List<Map<String,Object>> list_bgmk(Map<String, Object> query) throws BusinessException ;
/**
* 获取所有记录数
* @param entity
* @throws BusinessException
*/
int listCount_bgmk(Map<String, Object> query) throws BusinessException ;
//个人报工
Page<Map<String, Object>> list_bgmk_employee(int pageNo, int pageSize, Map<String, Object> query)throws BusinessException ;
/**
* 获取所有记录
* @param entity
* @throws BusinessException
*/
List<Map<String,Object>> list_bgmk_employee(Map<String, Object> query) throws BusinessException ;
/**
* 获取所有记录数
* @param entity
* @throws BusinessException
*/
int listCount_bgmk_employee(Map<String, Object> query) throws BusinessException ;
}
package com.jw.app.business;
import java.util.Map;
import org.springframework.stereotype.Service;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
@Service
public interface FriendLinkBusiness {
Page<Map<String, Object>> list_friendlink(int pageNo, int pageSize, Map<String, Object> query) throws BusinessException;
Map<String, Object> save_friendlink(Map<String, Object> info) throws BusinessException;
void delete_friendlink(String uuid) throws BusinessException;
}
package com.jw.app.business;
import java.util.Map;
import org.springframework.stereotype.Service;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
@Service
public interface NoticeBusiness {
Page<Map<String, Object>> list_notice(int pageNo, int pageSize, Map<String, Object> query) throws BusinessException;
Map<String, Object> save_notice(Map<String, Object> info) throws BusinessException;
void delete_notice(String uuid) throws BusinessException;
}
package com.jw.app.business;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Service;
import com.gaowj.business.exception.BusinessException;
@Service
public interface ProcessBusiness {
List<Map<String,Object>> listProcess(Map<String, Object> query) throws BusinessException ;
}
...@@ -10,48 +10,146 @@ import com.gaowj.business.util.Page; ...@@ -10,48 +10,146 @@ import com.gaowj.business.util.Page;
@Service @Service
public interface VoteBusiness { public interface VoteBusiness {
/**
* 插入
*
* @param entity
* @throws BusinessException
*/
void insert_vote(Map<String, Object> entity) throws BusinessException;
/** /**
* 插入 * 插入
*
* @param entity * @param entity
* @throws BusinessException * @throws BusinessException
*/ */
void insert_vote(Map<String,Object> entity) throws BusinessException ; void insert_userVote(Map<String, Object> entity) throws BusinessException;
/** /**
* 更新 * 更新
*
* @param entity * @param entity
* @throws BusinessException * @throws BusinessException
*/ */
void update_vote(Map<String,Object> entity) throws BusinessException ; void update_vote(Map<String, Object> entity) throws BusinessException;
/** /**
* 删除记录 * 删除记录
*
* @param entity * @param entity
* @throws BusinessException * @throws BusinessException
*/ */
void delete_vote(List<String> list)throws BusinessException; void delete_vote(List<String> list) throws BusinessException;
/** /**
* 分页获取记录 * 分页获取记录
*
* @param entity * @param entity
* @throws BusinessException * @throws BusinessException
*/ */
Page<Map<String, Object>> list_vote(int pageNo, int pageSize, Map<String, Object> query)throws BusinessException ; Page<Map<String, Object>> list_vote(int pageNo, int pageSize, Map<String, Object> query) throws BusinessException;
/** /**
* 获取所有记录 * 获取所有记录
*
* @param entity * @param entity
* @throws BusinessException * @throws BusinessException
*/ */
List<Map<String,Object>> list_vote(Map<String, Object> query) throws BusinessException ; List<Map<String, Object>> list_vote(Map<String, Object> query) throws BusinessException;
/** /**
* 获取所有记录数 * 获取所有记录数
*
* @param entity * @param entity
* @throws BusinessException * @throws BusinessException
*/ */
int listCount_vote(Map<String, Object> query) throws BusinessException ; int listCount_vote(Map<String, Object> query) throws BusinessException;
} /**
* 获取选项
*
* @param entity
* @throws BusinessException
*/
List<Map<String, Object>> list_item(Map<String, Object> query) throws BusinessException;
/**
* 删除记录
*
* @param entity
* @throws BusinessException
*/
void delete_item(List<String> list) throws BusinessException;
/**
* 提前结束投票
*
* @param entity
* @throws BusinessException
*/
void update_endvote(Map<String, Object> entity) throws BusinessException;
/**
* 分页获取记录
*
* @param entity
* @throws BusinessException
*/
Page<Map<String, Object>> list_ongoing(int pageNo, int pageSize, Map<String, Object> query) throws BusinessException;
/**
* 获取所有记录
*
* @param entity
* @throws BusinessException
*/
List<Map<String, Object>> list_ongoing(Map<String, Object> query) throws BusinessException;
/**
* 获取所有记录数
*
* @param entity
* @throws BusinessException
*/
int listCount_ongoing(Map<String, Object> query) throws BusinessException;
/**
* 分页获取记录
*
* @param entity
* @throws BusinessException
*/
Page<Map<String, Object>> list_ended(int pageNo, int pageSize, Map<String, Object> query) throws BusinessException;
/**
* 获取所有记录
*
* @param entity
* @throws BusinessException
*/
List<Map<String, Object>> list_ended(Map<String, Object> query) throws BusinessException;
/**
* 获取所有记录数
*
* @param entity
* @throws BusinessException
*/
int listCount_ended(Map<String, Object> query) throws BusinessException;
/**
* 获取用户选择
*
* @param entity
* @throws BusinessException
*/
List<Map<String, Object>> list_userchecked(Map<String, Object> query) throws BusinessException;
}
package com.jw.app.business.attendance;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.apache.ibatis.session.RowBounds;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
import com.gaowj.business.util.SessionUtil;
import com.gaowj.standard.utils.CacheKit;
import com.jw.app.business.AttendanceBusiness;
import oracle.net.aso.f;
public class AttendanceBusinessImpl implements AttendanceBusiness {
private attendanceDAO attendanceDAO;
public attendanceDAO getattendanceDAO() {
return attendanceDAO;
}
public void setattendanceDAO(attendanceDAO attendanceDAO) {
this.attendanceDAO = attendanceDAO;
}
@Override
public void insert_attendance(Map<String, Object> entity) throws BusinessException {
entity.put("UUID", java.util.UUID.randomUUID().toString());
if(entity.get("USER_ID")==null){
entity.put("USER_ID", SessionUtil.getEmid());
}
if(entity.get("USER_NAME")==null){
entity.put("USER_NAME", SessionUtil.getEmname());
}
if(entity.get("DEPT_ID")==null){
entity.put("DEPT_ID", SessionUtil.getEmdepart());
}
if(entity.get("DEPT_NAME")==null){
entity.put("DEPT_NAME", SessionUtil.getEmdepartname());
}
if(entity.get("ATTENDANCE_TIME")==null){
entity.put("ATTENDANCE_TIME", new Date());
}
if(entity.get("ATTENDANCE_ADDRESS")==null){
entity.put("ATTENDANCE_ADDRESS", 0);
}
if(entity.get("CREATE_TIME")==null){
entity.put("CREATE_TIME", new Date());
}
if(entity.get("CREATE_ID")==null){
entity.put("CREATE_ID", SessionUtil.getCode());
}
if(entity.get("UPDATE_ID")==null){
entity.put("UPDATE_ID", SessionUtil.getCode());
}
if(entity.get("UPDATE_TIME")==null){
entity.put("UPDATE_TIME", new Date());
}
//动态传值插入
List<String> infoListKey = new ArrayList<String>();
List<Object> infoList = new ArrayList<Object>();
if(entity.keySet()!=null){
Set<String> key = entity.keySet();
// 将map集合中的key和value 取出来分别放到list集合里
for (String str : key) {
infoList.add(entity.get(str));
infoListKey.add(str);
}
entity.put("infoListKey", infoListKey);
entity.put("infoList", infoList);
// 插入
attendanceDAO.insert_attendance(entity);
}
}
@Override
public void update_attendance(Map<String, Object> entity) throws BusinessException {
if(entity.get("UPDATE_ID")==null){
entity.put("UPDATE_ID", SessionUtil.getCode());
}
if(entity.get("UPDATE_TIME")==null){
entity.put("UPDATE_TIME", new Date());
}
//动态传值修改
List<Map<String, Object>> updateList = new ArrayList<Map<String, Object>>();
if(entity.keySet()!=null){
Set<String> key = entity.keySet();
// 将map集合中的key和value 取出来分别放到list集合里
for (String str : key) {
Map<String, Object> updateMap = new HashMap<String, Object>();
if (StringUtils.equalsIgnoreCase("UUID",str)) continue;
updateMap.put("key", str);
updateMap.put("value", entity.get(str));
updateList.add(updateMap);
}
entity.put("info", updateList);
//
attendanceDAO.update_attendance(entity);
}
}
@Override
public void delete_attendance(List<String> list) throws BusinessException {
attendanceDAO.delete_attendance(list);
}
@Override
public Page<Map<String, Object>> list_attendance(int pageNo, int pageSize,Map<String, Object> query) throws BusinessException {
//计算起始记录
int pageStart = (pageNo - 1) * pageSize;
//获取列表
List<Map<String, Object>> items = attendanceDAO.list_attendance(new RowBounds(pageStart, pageSize), query);
//获取列表个数
int count = listCount_attendance(query);
//创建分页对象
Page<Map<String, Object>> page = new Page<Map<String, Object>>();
page.setStart(pageStart);
page.setLimit(pageSize);
page.setCount(count);
page.setItems(items);
return page;
}
@Override
public List<Map<String, Object>> list_attendance(Map<String, Object> query) throws BusinessException {
List<Map<String, Object>> list_data = CacheKit.get("ehcache10", "attendance"+query);
if(list_data==null || list_data.size()==0){
list_data=attendanceDAO.list_attendance(query);
CacheKit.put("ehcache10", "attendance"+query, list_data);
}
return list_data;
}
@Override
public int listCount_attendance(Map<String, Object> query) throws BusinessException {
return attendanceDAO.listCount_attendance(query);
}
//员工考勤
@Override
public Page<Map<String, Object>> list_attendanceEmployee(int pageNo, int pageSize,Map<String, Object> query) throws BusinessException {
query.put("USER_ID", SessionUtil.getEmid());
//计算起始记录
int pageStart = (pageNo - 1) * pageSize;
//获取列表
List<Map<String, Object>> items = attendanceDAO.list_attendanceEmployee(new RowBounds(pageStart, pageSize), query);
//获取列表个数
int count = listCount_attendanceEmployee(query);
//创建分页对象
Page<Map<String, Object>> page = new Page<Map<String, Object>>();
page.setStart(pageStart);
page.setLimit(pageSize);
page.setCount(count);
page.setItems(items);
return page;
}
@Override
public List<Map<String, Object>> list_attendanceEmployee(Map<String, Object> query) throws BusinessException {
List<Map<String, Object>> list_data = CacheKit.get("ehcache10", "attendanceEmployee"+query);
if(list_data==null || list_data.size()==0){
list_data=attendanceDAO.list_attendanceEmployee(query);
CacheKit.put("ehcache10", "attendanceEmployee"+query, list_data);
}
return list_data;
}
@Override
public int listCount_attendanceEmployee(Map<String, Object> query) throws BusinessException {
return attendanceDAO.listCount_attendanceEmployee(query);
}
}
package com.jw.app.business.attendance;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import com.gaowj.business.exception.BusinessException;
public interface attendanceDAO {
void insert_attendance(Map<String,Object> entity) throws BusinessException ;
void update_attendance(Map<String,Object> entity) throws BusinessException ;
void delete_attendance(List<String> list) throws BusinessException;
List<Map<String,Object>> list_attendance(RowBounds rowbounds, Map<String, Object> query) throws BusinessException ;
List<Map<String,Object>> list_attendance(Map<String,Object> query) throws BusinessException ;
int listCount_attendance(Map<String, Object> query) throws BusinessException ;
List<Map<String,Object>> list_attendanceEmployee(RowBounds rowbounds, Map<String, Object> query) throws BusinessException ;
List<Map<String,Object>> list_attendanceEmployee(Map<String,Object> query) throws BusinessException ;
int listCount_attendanceEmployee(Map<String, Object> query) throws BusinessException ;
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jw.app.business.attendance.attendanceDAO">
<sql id="WHERE">
<where>
<trim prefixOverrides="and">
<if test="UUID != null and UUID != ''">
and f.UUID = #{UUID}
</if>
<if test="USER_ID != null and USER_ID != ''">
and f.USER_ID = #{USER_ID}
</if>
<if test="USER_NAME != null and USER_NAME != ''">
and f.USER_NAME like '%${USER_NAME}%'
</if>
<if test="DEPT_ID != null and DEPT_ID != ''">
and f.DEPT_ID = #{DEPT_ID}
</if>
<if test="DEPT_NAME != null and DEPT_NAME != ''">
and f.DEPT_NAME = #{DEPT_NAME}
</if>
<if test="START_TIME != null and START_TIME != ''">
and f.ATTENDANCE_TIME &gt;= #{ATTENDANCE_TIME}
</if>
<if test="END_TIME != null and END_TIME != ''">
and f.ATTENDANCE_TIME &lt;= #{ATTENDANCE_TIME}
</if>
<if test="ATTENDANCE_ADDRESS != null and ATTENDANCE_ADDRESS != ''">
and f.ATTENDANCE_ADDRESS = #{ATTENDANCE_ADDRESS}
</if>
<if
test="ATTENDANCE_ADDRESS_DETAIL != null and ATTENDANCE_ADDRESS_DETAIL != ''">
and f.ATTENDANCE_ADDRESS_DETAIL = #{ATTENDANCE_ADDRESS_DETAIL}
</if>
<if test="MAP_PATH != null and MAP_PATH != ''">
and f.MAP_PATH = #{MAP_PATH}
</if>
<if test="USER_TYPE != null and USER_TYPE != ''">
and f.USER_TYPE = #{USER_TYPE}
</if>
<if test="CREATOR_ID != null and CREATOR_ID != ''">
and f.CREATOR_ID = #{CREATOR_ID}
</if>
<if test="CREATE_TIME != null and CREATE_TIME != ''">
and f.CREATE_TIME = #{CREATE_TIME}
</if>
<if test="UPDATE_ID != null and UPDATE_ID != ''">
and f.UPDATE_ID = #{UPDATE_ID}
</if>
<if test="UPDATE_TIME != null and UPDATE_TIME != ''">
and f.UPDATE_TIME = #{UPDATE_TIME}
</if>
</trim>
</where>
</sql>
<!-- 管理人员考勤 -->
<insert id="insert_attendance" parameterType="map">
insert into ATTENDANCE_INFO(
<trim prefix="" suffixOverrides=",">
<foreach collection="infoListKey" item="key">
${key},
</foreach>
</trim>
<![CDATA[ ) values( ]]>
<trim prefix="" suffixOverrides=",">
<foreach collection="infoList" item="value">
#{value},
</foreach>
</trim>
<![CDATA[ ) ]]>
</insert>
<update id="update_attendance" parameterType="map">
<![CDATA[
update ATTENDANCE_INFO set
]]>
<trim prefix="" suffixOverrides=",">
<foreach collection="info" item="info">
${info.key} = #{info.value} ,
</foreach>
</trim>
<where>
<if test="UUID != null and UUID != ''">
and UUID = #{UUID}
</if>
</where>
</update>
<delete id="delete_attendance" parameterType="list">
<![CDATA[
delete from ATTENDANCE_INFO where UUID IN
]]>
<foreach collection="list" item="UUID" open="(" separator=","
close=")">
#{UUID}
</foreach>
</delete>
<select id="list_attendance" parameterType="map" resultType="upperCaseKeyMap">
select f.*
from ATTENDANCE_INFO f
<include refid="WHERE"></include>
order by f.CREATE_TIME DESC
</select>
<select id="listCount_attendance" parameterType="map"
resultType="int">
select count(*) c from ATTENDANCE_INFO f
<include refid="WHERE"></include>
</select>
<!-- 员工考勤 -->
<select id="list_attendanceEmployee" parameterType="map"
resultType="upperCaseKeyMap">
select
a.DEPT_NAME,a.USER_ID,DATE_FORMAT(a.ATTENDANCE_TIME,'%Y-%m-%d') as
day_text,DATE_FORMAT(MIN(a.ATTENDANCE_TIME),'%H:%i:%s') as
BEGIN_TIME,CASE WHEN MIN(a.ATTENDANCE_TIME)=MAX(a.ATTENDANCE_TIME)
THEN '未打卡' ELSE DATE_FORMAT(MAX(a.ATTENDANCE_TIME),'%H:%i:%s') END as
END_TIME from `attendance_info` a GROUP by a.USER_ID,DATE_FORMAT
(a.ATTENDANCE_TIME,'%Y-%m-%d')
having a.USER_ID=#{USER_ID}; </select>
<select id="listCount_attendanceEmployee" parameterType="map"
resultType="int">
select count(b.USER_ID) from (
select a.USER_ID,DATE_FORMAT
(a.ATTENDANCE_TIME,'%Y-%m-%d') from
`attendance_info` a GROUP by
a.USER_ID,DATE_FORMAT
(a.ATTENDANCE_TIME,'%Y-%m-%d')
having
a.USER_ID=#{USER_ID}) b;
</select>
</mapper>
\ No newline at end of file
package com.jw.app.business.bgmk;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.apache.ibatis.session.RowBounds;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
import com.gaowj.business.util.SessionUtil;
import com.gaowj.standard.utils.CacheKit;
import com.jw.app.business.BgmkBusiness;
public class BgmkBusinessImpl implements BgmkBusiness {
private bgmkDAO bgmkDAO;
public bgmkDAO getBgmkDAO() {
return bgmkDAO;
}
public void setBgmkDAO(bgmkDAO bgmkDAO) {
this.bgmkDAO = bgmkDAO;
}
@Override
public void insert_bgmk(Map<String, Object> entity) throws BusinessException {
if(entity.get("UUID")==null){
entity.put("UUID", java.util.UUID.randomUUID().toString());
}
if(entity.get("CREATE_TIME")==null){
entity.put("CREATE_TIME", new Date());
}
if(entity.get("USER_NAME")==null){
entity.put("USER_NAME", SessionUtil.getEmname());
}
if(entity.get("CREATOR_ID")==null){
entity.put("CREATOR_ID", SessionUtil.getCode());
}
if(entity.get("DEPT_NAME")==null){
entity.put("DEPT_NAME", SessionUtil.getEmdepartname());
}
// if(entity.get("SAVEDAYS")==null){
// String ls_savedays = PropUtil.getValue("set_savedays", "quartz_service", "14");
// entity.put("SAVEDAYS", Integer.parseInt(ls_savedays));
// }
//动态传值插入
List<String> infoListKey = new ArrayList<String>();
List<Object> infoList = new ArrayList<Object>();
if(entity.keySet()!=null){
Set<String> key = entity.keySet();
// 将map集合中的key和value 取出来分别放到list集合里
for (String str : key) {
infoList.add(entity.get(str));
infoListKey.add(str);
}
entity.put("infoListKey", infoListKey);
entity.put("infoList", infoList);
// 插入
bgmkDAO.insert_bgmk(entity);
}
}
@Override
public void update_bgmk(Map<String, Object> entity) throws BusinessException {
//动态传值修改
List<Map<String, Object>> updateList = new ArrayList<Map<String, Object>>();
if(entity.keySet()!=null){
Set<String> key = entity.keySet();
// 将map集合中的key和value 取出来分别放到list集合里
for (String str : key) {
Map<String, Object> updateMap = new HashMap<String, Object>();
if (StringUtils.equalsIgnoreCase("UUID",str)) continue;
updateMap.put("key", str);
updateMap.put("value", entity.get(str));
updateList.add(updateMap);
}
entity.put("info", updateList);
//
bgmkDAO.update_bgmk(entity);
}
}
@Override
public void delete_bgmk(List<String> list) throws BusinessException {
bgmkDAO.delete_bgmk(list);
}
//管理类报工
@Override
public Page<Map<String, Object>> list_bgmk(int pageNo, int pageSize,Map<String, Object> query) throws BusinessException {
//计算起始记录
int pageStart = (pageNo - 1) * pageSize;
//获取列表
List<Map<String, Object>> items = bgmkDAO.list_bgmk(new RowBounds(pageStart, pageSize), query);
//获取列表个数
int count = listCount_bgmk(query);
//创建分页对象
Page<Map<String, Object>> page = new Page<Map<String, Object>>();
page.setStart(pageStart);
page.setLimit(pageSize);
page.setCount(count);
page.setItems(items);
return page;
}
@Override
public List<Map<String, Object>> list_bgmk(Map<String, Object> query) throws BusinessException {
List<Map<String, Object>> list_data = CacheKit.get("ehcache10", "bgmk"+query);
if(list_data==null || list_data.size()==0){
list_data=bgmkDAO.list_bgmk(query);
CacheKit.put("ehcache10", "bgmk"+query, list_data);
}
return list_data;
}
@Override
public int listCount_bgmk(Map<String, Object> query) throws BusinessException {
return bgmkDAO.listCount_bgmk(query);
}
//个人报工
@Override
public Page<Map<String, Object>> list_bgmk_employee(int pageNo, int pageSize,Map<String, Object> query) throws BusinessException {
query.put("USER_NAME", SessionUtil.getEmid());
//计算起始记录
int pageStart = (pageNo - 1) * pageSize;
//获取列表
List<Map<String, Object>> items = bgmkDAO.list_bgmk_employee(new RowBounds(pageStart, pageSize), query);
//获取列表个数
int count = listCount_bgmk_employee(query);
//创建分页对象
Page<Map<String, Object>> page = new Page<Map<String, Object>>();
page.setStart(pageStart);
page.setLimit(pageSize);
page.setCount(count);
page.setItems(items);
return page;
}
@Override
public List<Map<String, Object>> list_bgmk_employee(Map<String, Object> query) throws BusinessException {
List<Map<String, Object>> list_data = CacheKit.get("ehcache10", "bgmk_employee"+query);
if(list_data==null || list_data.size()==0){
list_data=bgmkDAO.list_bgmk_employee(query);
CacheKit.put("ehcache10", "bgmk_employee"+query, list_data);
}
return list_data;
}
@Override
public int listCount_bgmk_employee(Map<String, Object> query) throws BusinessException {
return bgmkDAO.listCount_bgmk_employee(query);
}
}
package com.jw.app.business.bgmk;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import com.gaowj.business.exception.BusinessException;
public interface bgmkDAO {
void insert_bgmk(Map<String,Object> entity) throws BusinessException ;
void update_bgmk(Map<String,Object> entity) throws BusinessException ;
void delete_bgmk(List<String> list) throws BusinessException;
List<Map<String,Object>> list_bgmk(RowBounds rowbounds, Map<String, Object> query) throws BusinessException ;
List<Map<String,Object>> list_bgmk(Map<String,Object> query) throws BusinessException ;
int listCount_bgmk(Map<String, Object> query) throws BusinessException ;
List<Map<String,Object>> list_bgmk_employee(RowBounds rowbounds, Map<String, Object> query) throws BusinessException ;
List<Map<String,Object>> list_bgmk_employee(Map<String,Object> query) throws BusinessException ;
int listCount_bgmk_employee(Map<String, Object> query) throws BusinessException ;
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jw.app.business.bgmk.bgmkDAO">
<insert id="insert_bgmk" parameterType="map">
insert into C_T_WORK_BG(
<trim prefix="" suffixOverrides=",">
<foreach collection="infoListKey" item="key">
${key},
</foreach>
</trim>
<![CDATA[ ) values( ]]>
<trim prefix="" suffixOverrides=",">
<foreach collection="infoList" item="value">
#{value},
</foreach>
</trim>
<![CDATA[ ) ]]>
</insert>
<update id="update_bgmk" parameterType="map">
<![CDATA[
update C_T_WORK_BG set
]]>
<trim prefix="" suffixOverrides=",">
<foreach collection="info" item="info">
${info.key} = #{info.value} ,
</foreach>
</trim>
<where>
<if test="UUID != null and UUID != ''">
and UUID = #{UUID}
</if>
</where>
</update>
<delete id="delete_bgmk" parameterType="list">
<![CDATA[
delete from C_T_WORK_BG where UUID IN
]]>
<foreach collection="list" item="UUID" open="(" separator=","
close=")">
#{UUID}
</foreach>
</delete>
<select id="list_bgmk" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[
select f.*
from C_T_WORK_BG f where 1=1
]]>
<if test="UUID != null and UUID != ''">
and f.UUID = #{UUID}
</if>
<if test="USER_NAME != null and USER_NAME != ''">
and f.USER_NAME like '%${USER_NAME}%'
</if>
<if test="USER_ID != null and USER_ID != ''">
and f.USER_ID = #{USER_ID}
</if>
<if test="DEPT_NAME != null and DEPT_NAME != ''">
and f.DEPT_NAME = #{DEPT_NAME}
</if>
<if test="CONTENT != null and CONTENT != ''">
and f.CONTENT = #{CONTENT}
</if>
<if test="GZYS != null and GZYS != ''">
and f.GZYS = #{GZYS}
</if>
<if test="BG_TIME != null and BG_TIME != ''">
and f.BG_TIME = #{BG_TIME}
</if>
<if test="BG_TYPE != null and BG_TYPE != ''">
and f.BG_TYPE = #{BG_TYPE}
</if>
<if test="USER_TYPE != null and USER_TYPE != ''">
and f.USER_TYPE = #{USER_TYPE}
</if>
<if test="CREATOR_ID != null and CREATOR_ID != ''">
and f.CREATOR_ID = #{CREATOR_ID}
</if>
<if test="CREATE_TIME != null and CREATE_TIME != ''">
and f.CREATE_TIME = #{CREATE_TIME}
</if>
order by f.CREATE_TIME DESC
</select>
<select id="listCount_bgmk" parameterType="map" resultType="int">
<![CDATA[
select count(*) c from C_T_WORK_BG f where 1=1
]]>
<if test="UUID != null and UUID != ''">
and f.UUID = #{UUID}
</if>
<if test="USER_NAME != null and USER_NAME != ''">
and f.USER_NAME like '%${USER_NAME}%'
</if>
<if test="USER_ID != null and USER_ID != ''">
and f.USER_ID = #{USER_ID}
</if>
<if test="DEPT_NAME != null and DEPT_NAME != ''">
and f.DEPT_NAME = #{DEPT_NAME}
</if>
<if test="CONTENT != null and CONTENT != ''">
and f.CONTENT = #{CONTENT}
</if>
<if test="GZYS != null and GZYS != ''">
and f.GZYS = #{GZYS}
</if>
<if test="BG_TIME != null and BG_TIME != ''">
and f.BG_TIME = #{BG_TIME}
</if>
<if test="BG_TYPE != null and BG_TYPE != ''">
and f.BG_TYPE = #{BG_TYPE}
</if>
<if test="USER_TYPE != null and USER_TYPE != ''">
and f.USER_TYPE = #{USER_TYPE}
</if>
<if test="CREATOR_ID != null and CREATOR_ID != ''">
and f.CREATOR_ID = #{CREATOR_ID}
</if>
<if test="CREATE_TIME != null and CREATE_TIME != ''">
and f.CREATE_TIME = #{CREATE_TIME}
</if>
</select>
<select id="list_bgmk_employee" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[
select f.*
from C_T_WORK_BG f where 1=1
]]>
<if test="UUID != null and UUID != ''">
and f.UUID = #{UUID}
</if>
<if test="USER_NAME != null and USER_NAME != ''">
and f.USER_NAME like '%${USER_NAME}%'
</if>
<if test="USER_ID != null and USER_ID != ''">
and f.USER_ID = #{USER_ID}
</if>
<if test="DEPT_NAME != null and DEPT_NAME != ''">
and f.DEPT_NAME = #{DEPT_NAME}
</if>
<if test="CONTENT != null and CONTENT != ''">
and f.CONTENT = #{CONTENT}
</if>
<if test="GZYS != null and GZYS != ''">
and f.GZYS = #{GZYS}
</if>
<if test="BG_TIME != null and BG_TIME != ''">
and f.BG_TIME = #{BG_TIME}
</if>
<if test="BG_TYPE != null and BG_TYPE != ''">
and f.BG_TYPE = #{BG_TYPE}
</if>
<if test="USER_TYPE != null and USER_TYPE != ''">
and f.USER_TYPE = #{USER_TYPE}
</if>
<if test="CREATOR_ID != null and CREATOR_ID != ''">
and f.CREATOR_ID = #{CREATOR_ID}
</if>
<if test="CREATE_TIME != null and CREATE_TIME != ''">
and f.CREATE_TIME = #{CREATE_TIME}
</if>
order by f.CREATE_TIME DESC
</select>
<select id="listCount_bgmk_employee" parameterType="map" resultType="int">
<![CDATA[
select count(*) c from C_T_WORK_BG f where 1=1
]]>
<if test="UUID != null and UUID != ''">
and f.UUID = #{UUID}
</if>
<if test="USER_NAME != null and USER_NAME != ''">
and f.USER_NAME like '%${USER_NAME}%'
</if>
<if test="USER_ID != null and USER_ID != ''">
and f.USER_ID = #{USER_ID}
</if>
<if test="DEPT_NAME != null and DEPT_NAME != ''">
and f.DEPT_NAME = #{DEPT_NAME}
</if>
<if test="CONTENT != null and CONTENT != ''">
and f.CONTENT = #{CONTENT}
</if>
<if test="GZYS != null and GZYS != ''">
and f.GZYS = #{GZYS}
</if>
<if test="BG_TIME != null and BG_TIME != ''">
and f.BG_TIME = #{BG_TIME}
</if>
<if test="BG_TYPE != null and BG_TYPE != ''">
and f.BG_TYPE = #{BG_TYPE}
</if>
<if test="USER_TYPE != null and USER_TYPE != ''">
and f.USER_TYPE = #{USER_TYPE}
</if>
<if test="CREATOR_ID != null and CREATOR_ID != ''">
and f.CREATOR_ID = #{CREATOR_ID}
</if>
<if test="CREATE_TIME != null and CREATE_TIME != ''">
and f.CREATE_TIME = #{CREATE_TIME}
</if>
</select>
</mapper>
\ No newline at end of file
package com.jw.app.business.friendlink;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.apache.ibatis.session.RowBounds;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
import com.gaowj.business.util.SessionUtil;
import com.jw.app.business.FriendLinkBusiness;
import com.jw.app.business.utils.DateTools;
public class FriendLinkBusinessImpl implements FriendLinkBusiness {
private friendlinkDAO friendlinkDAO;
public friendlinkDAO getFriendlinkDAO() {
return friendlinkDAO;
}
public void setFriendlinkDAO(friendlinkDAO friendlinkDAO) {
this.friendlinkDAO = friendlinkDAO;
}
@Override
public Page<Map<String, Object>> list_friendlink(int pageNo, int pageSize, Map<String, Object> query) throws BusinessException {
if (query.get("USER_ID") == null || "".equals(query.get("USER_ID"))) {
// 默认查询当前登陆人
query.put("USER_ID", SessionUtil.getEmid());
}
// 计算起始记录
int pageStart = (pageNo - 1) * pageSize;
List<Map<String, Object>> items = friendlinkDAO.list_friendlink(new RowBounds(pageStart, pageSize), query);
int count = friendlinkDAO.list_count_friendlink(query);
// 创建分页对象
Page<Map<String, Object>> page = new Page<Map<String, Object>>();
page.setStart(pageStart);
page.setLimit(pageSize);
page.setCount(count);
page.setItems(items);
return page;
}
@Override
public Map<String, Object> save_friendlink(Map<String, Object> info) throws BusinessException {
if (info.get("UUID") == null || "".equals(info.get("UUID"))) {
//判断目前总条数是不是<=8条
Map<String, Object> query=new HashMap<String, Object>();
query.put("CREATE_ID", SessionUtil.getEmid());
int count = friendlinkDAO.list_count_friendlink(query);
if(count>=8){
info.put("ERROR", "-1");
}
// 表示新增
info.put("UUID", UUID.randomUUID().toString());
if (info.get("USER_ID") == null || "".equals(info.get("USER_ID"))) {
// 如果没有传USER_ID过来,则使用当前登录人id
info.put("USER_ID", SessionUtil.getEmid());
}
info.put("CREATE_ID", SessionUtil.getEmid());
info.put("CREATE_TIME", new Date());
info.put("UPDATE_ID", SessionUtil.getEmid());
info.put("UPDATE_TIME", new Date());
List<Map<String, Object>> listField = new ArrayList<Map<String, Object>>();
for (String k : info.keySet()) {
Map<String, Object> field = new HashMap<String, Object>();
field.put("key", k);
field.put("value", info.get(k));
listField.add(field);
}
info.put("list", listField);
friendlinkDAO.insert_friendlink(info);
} else {
// 表示更新
info.put("UPDATE_USER", SessionUtil.getEmid());
info.put("UPDATE_TIME", new Date());
// 防止修改记录的所属人
info.remove("USER_ID");
List<Map<String, Object>> listField = new ArrayList<Map<String, Object>>();
for (String k : info.keySet()) {
if ("UUID".equals(k)) {
continue;
}
Map<String, Object> field = new HashMap<String, Object>();
field.put("key", k);
field.put("value", info.get(k));
listField.add(field);
}
info.put("list", listField);
friendlinkDAO.update_friendlink(info);
}
return info;
}
@Override
public void delete_friendlink(String uuid) throws BusinessException {
for (String u : uuid.split(",")) {
friendlinkDAO.delete_friendlink(u);
}
}
}
package com.jw.app.business.friendlink;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import com.gaowj.business.exception.BusinessException;
public interface friendlinkDAO {
List<Map<String, Object>> list_friendlink(Map<String, Object> query) throws BusinessException;
int list_count_friendlink(Map<String, Object> query) throws BusinessException;
List<Map<String, Object>> list_friendlink(RowBounds rowbounds, Map<String, Object> query) throws BusinessException;
void insert_friendlink(Map<String, Object> info) throws BusinessException;
void update_friendlink(Map<String, Object> info) throws BusinessException;
void delete_friendlink(String uuid) throws BusinessException;
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jw.app.business.friendlink.friendlinkDAO">
<sql id="where">
<where>
<trim prefixOverrides="AND |OR">
<if test="TITLE != null and TITLE != ''">
and t.TITLE like '%${TITLE}%'
</if>
<if test="URL != null and URL != ''">
and t.URL = #{URL}
</if>
<if test="SORT != null and SORT != ''">
and t.SORT = #{SORT}
</if>
<if test="USER_ID != null and USER_ID != ''">
and t.USER_ID = #{USER_ID}
</if>
</trim>
</where>
</sql>
<select id="list_friendlink" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[
select * from b_t_ufp_friendlink t
]]>
<include refid="where" />
ORDER BY t.sort
</select>
<select id="list_count_friendlink" parameterType="map" resultType="int">
<![CDATA[
select count(*) from b_t_ufp_friendlink t
]]>
<include refid="where" />
ORDER BY t.sort
</select>
<insert id="insert_friendlink" parameterType="java.util.List">
insert into b_t_ufp_friendlink(
<trim prefix="" suffixOverrides=",">
<foreach collection="list" item="field">
${field.key},
</foreach>
</trim>
<![CDATA[ ) values( ]]>
<trim prefix="" suffixOverrides=",">
<foreach collection="list" item="field">
#{field.value},
</foreach>
</trim>
<![CDATA[ ) ]]>
</insert>
<update id="update_friendlink" parameterType="java.util.List">
update b_t_ufp_friendlink set
<trim prefix="" suffixOverrides=",">
<foreach collection="list" item="field">
${field.key}=#{field.value},
</foreach>
</trim>
where UUID=#{UUID}
</update>
<delete id="delete_friendlink" parameterType="String">
delete from b_t_ufp_friendlink where UUID=#{uuid}
</delete>
</mapper>
\ No newline at end of file
package com.jw.app.business.notice;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.apache.ibatis.session.RowBounds;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
import com.gaowj.business.util.SessionUtil;
import com.jw.app.business.NoticeBusiness;
import com.jw.app.business.utils.DateTools;
import groovy.sql.InParameter;
public class NoticeBusinessImpl implements NoticeBusiness {
private noticeDAO noticeDAO;
public noticeDAO getNoticeDAO() {
return noticeDAO;
}
public void setNoticeDAO(noticeDAO noticeDAO) {
this.noticeDAO = noticeDAO;
}
@Override
public Page<Map<String, Object>> list_notice(int pageNo, int pageSize, Map<String, Object> query) throws BusinessException {
if (query.get("USER_ID") == null || "".equals(query.get("USER_ID"))) {
// 默认查询当前登陆人
query.put("USER_ID", SessionUtil.getEmid());
}
// 计算起始记录
int pageStart = (pageNo - 1) * pageSize;
List<Map<String, Object>> items = noticeDAO.list_notice(new RowBounds(pageStart, pageSize), query);
int count = noticeDAO.list_count_notice(query);
// 创建分页对象
Page<Map<String, Object>> page = new Page<Map<String, Object>>();
page.setStart(pageStart);
page.setLimit(pageSize);
page.setCount(count);
page.setItems(items);
return page;
}
@Override
public Map<String, Object> save_notice(Map<String, Object> info) throws BusinessException {
if (info.get("UUID") == null || "".equals(info.get("UUID"))) {
// 表示新增
info.put("UUID", UUID.randomUUID().toString());
if (info.get("USER_ID") == null || "".equals(info.get("USER_ID"))) {
// 如果没有传USER_ID过来,则使用当前登录人id
info.put("USER_ID", SessionUtil.getEmid());
}
info.put("CREATE_ID", SessionUtil.getEmid());
info.put("CREATE_TIME", new Date());
info.put("UPDATE_ID", SessionUtil.getEmid());
info.put("UPDATE_TIME", new Date());
List<Map<String, Object>> listField = new ArrayList<Map<String, Object>>();
for (String k : info.keySet()) {
Map<String, Object> field = new HashMap<String, Object>();
field.put("key", k);
field.put("value", info.get(k));
listField.add(field);
}
info.put("list", listField);
noticeDAO.insert_notice(info);
} else {
// 表示更新
info.put("UPDATE_USER", SessionUtil.getEmid());
info.put("UPDATE_TIME", new Date());
// 防止修改记录的所属人
info.remove("USER_ID");
List<Map<String, Object>> listField = new ArrayList<Map<String, Object>>();
for (String k : info.keySet()) {
if ("UUID".equals(k)) {
continue;
}
Map<String, Object> field = new HashMap<String, Object>();
field.put("key", k);
field.put("value", info.get(k));
listField.add(field);
}
info.put("list", listField);
noticeDAO.update_notice(info);
}
return info;
}
@Override
public void delete_notice(String uuid) throws BusinessException {
for (String u : uuid.split(",")) {
noticeDAO.delete_notice(u);
}
}
}
package com.jw.app.business.notice;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import com.gaowj.business.exception.BusinessException;
public interface noticeDAO {
List<Map<String, Object>> list_notice(Map<String, Object> query) throws BusinessException;
int list_count_notice(Map<String, Object> query) throws BusinessException;
List<Map<String, Object>> list_notice(RowBounds rowbounds, Map<String, Object> query) throws BusinessException;
void insert_notice(Map<String, Object> info) throws BusinessException;
void update_notice(Map<String, Object> info) throws BusinessException;
void delete_notice(String uuid) throws BusinessException;
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jw.app.business.notice.noticeDAO">
<sql id="where">
<where>
<trim prefixOverrides="AND |OR">
<if test="TITLE != null and TITLE != ''">
and t.TITLE like '%${TITLE}%'
</if>
<if test="TEXT != null and TEXT != ''">
and t.TEXT = #{TEXT}
</if>
<if test="RELEASE_TIME != null and RELEASE_TIME != ''">
and t.RELEASE_TIME = #{RELEASE_TIME}
</if>
<if test="USER_ID != null and USER_ID != ''">
and t.USER_ID = #{USER_ID}
</if>
</trim>
</where>
</sql>
<select id="list_notice" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[
select * from b_t_ufp_notice t
]]>
<include refid="where" />
ORDER BY t.CREATE_TIME
</select>
<select id="list_count_notice" parameterType="map" resultType="int">
<![CDATA[
select count(*) from b_t_ufp_notice t
]]>
<include refid="where" />
ORDER BY t.CREATE_TIME
</select>
<insert id="insert_notice" parameterType="java.util.List">
insert into b_t_ufp_notice(
<trim prefix="" suffixOverrides=",">
<foreach collection="list" item="field">
${field.key},
</foreach>
</trim>
<![CDATA[ ) values( ]]>
<trim prefix="" suffixOverrides=",">
<foreach collection="list" item="field">
#{field.value},
</foreach>
</trim>
<![CDATA[ ) ]]>
</insert>
<update id="update_notice" parameterType="java.util.List">
update b_t_ufp_notice set
<trim prefix="" suffixOverrides=",">
<foreach collection="list" item="field">
${field.key}=#{field.value},
</foreach>
</trim>
where UUID=#{UUID}
</update>
<delete id="delete_notice" parameterType="String">
delete from b_t_ufp_notice where UUID=#{uuid}
</delete>
</mapper>
\ No newline at end of file
package com.jw.app.business.process;
import java.util.List;
import java.util.Map;
import com.gaowj.business.exception.BusinessException;
import com.jw.app.business.ProcessBusiness;
public class ProcessBusinessImpl implements ProcessBusiness {
private ProcessDAO processDAO;
public ProcessDAO getProcessDAO() {
return processDAO;
}
public void setProcessDAO(ProcessDAO processDAO) {
this.processDAO = processDAO;
}
@Override
public List<Map<String, Object>> listProcess(Map<String, Object> query) throws BusinessException {
return processDAO.listProcess(query);
}
}
package com.jw.app.business.process;
import java.util.List;
import java.util.Map;
import com.gaowj.business.exception.BusinessException;
public interface ProcessDAO {
List<Map<String,Object>> listProcess(Map<String,Object> query) throws BusinessException ;
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jw.app.business.process.ProcessDAO">
<select id="listProcess" parameterType="map" resultType="upperCaseKeyMap">
select * from c_t_proc_definition
</select>
</mapper>
\ No newline at end of file
package com.jw.app.business.vote; package com.jw.app.business.vote;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -12,13 +12,18 @@ import org.apache.commons.lang.StringUtils; ...@@ -12,13 +12,18 @@ import org.apache.commons.lang.StringUtils;
import org.apache.ibatis.session.RowBounds; import org.apache.ibatis.session.RowBounds;
import com.jw.app.business.VoteBusiness; import com.jw.app.business.VoteBusiness;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import com.gaowj.business.exception.BusinessException; import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page; import com.gaowj.business.util.Page;
import com.gaowj.business.util.QueryParamUtil;
import com.gaowj.business.util.SessionUtil; import com.gaowj.business.util.SessionUtil;
import com.gaowj.standard.utils.CacheKit; import com.gaowj.standard.utils.CacheKit;
public class VoteBusinessImpl implements VoteBusiness { public class VoteBusinessImpl implements VoteBusiness {
private voteDAO voteDAO; private voteDAO voteDAO;
public voteDAO getvoteDAO() { public voteDAO getvoteDAO() {
...@@ -31,96 +36,278 @@ public class VoteBusinessImpl implements VoteBusiness { ...@@ -31,96 +36,278 @@ public class VoteBusinessImpl implements VoteBusiness {
@Override @Override
public void insert_vote(Map<String, Object> entity) throws BusinessException { public void insert_vote(Map<String, Object> entity) throws BusinessException {
if(entity.get("UUID")==null){ String items = entity.get("ITEMS").toString();
entity.put("UUID", java.util.UUID.randomUUID().toString()); entity.remove("ITEMS");
}
if(entity.get("CREATE_ID")==null){ entity.put("UUID", java.util.UUID.randomUUID().toString());
entity.put("CREATE_ID", SessionUtil.getCode() ); entity.put("START_TIME", new Date());
} entity.put("CREATE_ID", SessionUtil.getCode());
if(entity.get("CREATE_TIME")==null){ entity.put("CREATE_TIME", new Date());
entity.put("CREATE_TIME", new Date()); entity.put("UPDATE_ID", SessionUtil.getEmname());
entity.put("UPDATE_TIME", new Date());
entity.put("STATUS_FLAG", 1);
// 动态传值插入
List<String> infoListKey = new ArrayList<String>();
List<Object> infoList = new ArrayList<Object>();
if (entity.keySet() != null) {
Set<String> key = entity.keySet();
// 将map集合中的key和value 取出来分别放到list集合里
for (String str : key) {
infoList.add(entity.get(str));
infoListKey.add(str);
}
entity.put("infoListKey", infoListKey);
entity.put("infoList", infoList);
// 插入
voteDAO.insert_vote(entity);
} }
if(entity.get("UPDATE_ID")==null){ // 插入明细表
entity.put("UPDATE_ID", SessionUtil.getEmname()); JSONArray itemArray = JSONArray.fromObject(items);
for (int i = 0; i < itemArray.size(); i++) {
Map<String, Object> itemmap = new HashMap<String, Object>();
JSONObject item = itemArray.getJSONObject(i);
item.put("UUID", java.util.UUID.randomUUID().toString());
item.put("CREATE_ID", SessionUtil.getCode());
item.put("CREATE_TIME", SessionUtil.getCurrenttime());
item.put("UPDATE_ID", SessionUtil.getEmname());
item.put("MANAGE_ID", entity.get("UUID"));
item.put("UPDATE_TIME", SessionUtil.getCurrenttime());
item.put("SORT_NUM", i);
List<String> itemListKey = new ArrayList<String>();
List<Object> itemList = new ArrayList<Object>();
Set<String> key = item.keySet();
// 将map集合中的key和value 取出来分别放到list集合里
for (String str : key) {
itemList.add(item.get(str));
itemListKey.add(str);
}
itemmap.put("itemListKey", itemListKey);
itemmap.put("itemList", itemList);
// 插入
voteDAO.insert_item(itemmap);
} }
if(entity.get("UPDATE_TIME")==null){
entity.put("UPDATE_TIME", new Date()); }
@Override
public void insert_userVote(Map<String, Object> entity) throws BusinessException {
String flag = (String) entity.get("STATUS_FLAG");
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("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.getEmname());
itemmap.put("UPDATE_TIME", SessionUtil.getCurrenttime());
// 动态传值插入
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);
}
} }
// if(entity.get("SAVEDAYS")==null){
// String ls_savedays = PropUtil.getValue("set_savedays", "quartz_service", "14");
// entity.put("SAVEDAYS", Integer.parseInt(ls_savedays));
// }
//动态传值插入
List<String> infoListKey = new ArrayList<String>();
List<Object> infoList = new ArrayList<Object>();
if(entity.keySet()!=null){
Set<String> key = entity.keySet();
// 将map集合中的key和value 取出来分别放到list集合里
for (String str : key) {
infoList.add(entity.get(str));
infoListKey.add(str);
}
entity.put("infoListKey", infoListKey);
entity.put("infoList", infoList);
// 插入
voteDAO.insert_vote(entity);
}
} }
@Override @Override
public void update_vote(Map<String, Object> entity) throws BusinessException { public void update_vote(Map<String, Object> entity) throws BusinessException {
//动态传值修改 // 动态传值修改
String items = entity.get("ITEMS").toString();
entity.remove("ITEMS");
List<Map<String, Object>> updateList = new ArrayList<Map<String, Object>>(); List<Map<String, Object>> updateList = new ArrayList<Map<String, Object>>();
if(entity.keySet()!=null){ if (entity.keySet() != null) {
Set<String> key = entity.keySet(); Set<String> key = entity.keySet();
// 将map集合中的key和value 取出来分别放到list集合里 // 将map集合中的key和value 取出来分别放到list集合里
for (String str : key) { for (String str : key) {
Map<String, Object> updateMap = new HashMap<String, Object>(); Map<String, Object> updateMap = new HashMap<String, Object>();
if (StringUtils.equalsIgnoreCase("UUID",str)) continue; if (StringUtils.equalsIgnoreCase("UUID", str))
updateMap.put("key", str); continue;
updateMap.put("value", entity.get(str)); updateMap.put("key", str);
updateMap.put("value", entity.get(str));
updateList.add(updateMap);
} updateList.add(updateMap);
entity.put("info", updateList); }
// entity.put("info", updateList);
voteDAO.update_vote(entity); //
voteDAO.update_vote(entity);
} }
// 修改明细表
List<Map<String, Object>> updateItemList = new ArrayList<Map<String, Object>>();
// 用户新存储的明细
JSONArray itemArray = JSONArray.fromObject(items);
// 投票表原明细
Map<String, Object> query = new HashMap<String, Object>();
query.put("MANAGE_ID", entity.get("UUID"));
List<Map<String, Object>> listOldItem = voteDAO.list_item(query);
//
// List<>
// 筛选新增的明细
for (int i = 0; i < itemArray.size(); i++) {
JSONObject item = itemArray.getJSONObject(i);
item.put("SORT_NUM", i);
if (item.get("UUID") != null && !"".equals(item.get("UUID"))) {
// 表示旧数据
// update item(UUID)
Set<String> key1 = item.keySet();
for (String str : key1) {
Map<String, Object> updateItemMap = new HashMap<String, Object>();
updateItemMap.put("key", str);
updateItemMap.put("value", item.get(str));
updateItemList.add(updateItemMap);
}
item.put("info", updateItemList);
voteDAO.update_item(item);
} else {
// 表示新数据
// insert item
Map<String, Object> itemmap = new HashMap<String, Object>();
item.put("UUID", java.util.UUID.randomUUID().toString());
item.put("MANAGE_ID", entity.get("UUID"));
item.put("CREATE_ID", SessionUtil.getCode());
item.put("CREATE_TIME", SessionUtil.getCurrenttime());
item.put("UPDATE_ID", SessionUtil.getEmname());
item.put("UPDATE_TIME", SessionUtil.getCurrenttime());
List<String> itemListKey = new ArrayList<String>();
List<Object> itemList = new ArrayList<Object>();
Set<String> key = item.keySet();
// 将map集合中的key和value 取出来分别放到list集合里
for (String str : key) {
itemList.add(item.get(str));
itemListKey.add(str);
}
itemmap.put("itemListKey", itemListKey);
itemmap.put("itemList", itemList);
// 插入
voteDAO.insert_item(itemmap);
}
}
List<String> listMoveUuid = new ArrayList<String>();
outer: for (Map<String, Object> oldItem : listOldItem) {
for (int i = 0; i < itemArray.size(); i++) {
JSONObject item = itemArray.getJSONObject(i);
if (oldItem.get("UUID").equals(item.get("UUID"))) {
// 表示该明细不需要删除
continue outer;
}
}
// 如果没有在新明细中查询到,则表示该明细需要删除
listMoveUuid.add((String) oldItem.get("UUID"));
}
if (listMoveUuid.size() > 0) {
voteDAO.delete_item(listMoveUuid);
}
} }
@Override @Override
public void delete_vote(List<String> list) throws BusinessException { public void delete_vote(List<String> list) throws BusinessException {
voteDAO.delete_vote(list); voteDAO.delete_vote(list);
voteDAO.delete_vote_item(list);
voteDAO.delete_vote_action(list);
}
@Override
public void delete_item(List<String> list) throws BusinessException {
voteDAO.delete_item(list);
}
@Override
public Page<Map<String, Object>> list_vote(int pageNo, int pageSize, Map<String, Object> query)
throws BusinessException {
query.put("CREATE_ID", SessionUtil.getCode());
// 计算起始记录
int pageStart = (pageNo - 1) * pageSize;
// 获取列表
List<Map<String, Object>> items = voteDAO.list_vote(new RowBounds(pageStart, pageSize), query);
// 获取列表个数
int count = listCount_vote(query);
// 创建分页对象
Page<Map<String, Object>> page = new Page<Map<String, Object>>();
page.setStart(pageStart);
page.setLimit(pageSize);
page.setCount(count);
page.setItems(items);
return page;
}
@Override
public Page<Map<String, Object>> list_ongoing(int pageNo, int pageSize, Map<String, Object> query)
throws BusinessException {
// 计算起始记录
query.put("STATUS_FLAG", 1);
query.put("USER_ID", SessionUtil.getEmname());
int pageStart = (pageNo - 1) * pageSize;
// 获取列表
List<Map<String, Object>> items = voteDAO.list_vote(new RowBounds(pageStart, pageSize), query);
// 获取列表个数
int count = listCount_vote(query);
// 创建分页对象
Page<Map<String, Object>> page = new Page<Map<String, Object>>();
page.setStart(pageStart);
page.setLimit(pageSize);
page.setCount(count);
page.setItems(items);
return page;
} }
@Override @Override
public Page<Map<String, Object>> list_vote(int pageNo, int pageSize,Map<String, Object> query) throws BusinessException { public Page<Map<String, Object>> list_ended(int pageNo, int pageSize, Map<String, Object> query)
//计算起始记录 throws BusinessException {
int pageStart = (pageNo - 1) * pageSize; query.put("STATUS_FLAG", 2);
// 计算起始记录
//获取列表 int pageStart = (pageNo - 1) * pageSize;
List<Map<String, Object>> items = voteDAO.list_vote(new RowBounds(pageStart, pageSize), query);
//获取列表个数 // 获取列表
int count = listCount_vote(query); List<Map<String, Object>> items = voteDAO.list_vote(new RowBounds(pageStart, pageSize), query);
// 获取列表个数
//创建分页对象 int count = listCount_vote(query);
Page<Map<String, Object>> page = new Page<Map<String, Object>>();
page.setStart(pageStart);
page.setLimit(pageSize);
page.setCount(count);
page.setItems(items);
return page; // 创建分页对象
Page<Map<String, Object>> page = new Page<Map<String, Object>>();
page.setStart(pageStart);
page.setLimit(pageSize);
page.setCount(count);
page.setItems(items);
return page;
} }
@Override @Override
public List<Map<String, Object>> list_vote(Map<String, Object> query) throws BusinessException { public List<Map<String, Object>> list_vote(Map<String, Object> query) throws BusinessException {
List<Map<String, Object>> list_data = CacheKit.get("ehcache10", "vote"+query); List<Map<String, Object>> list_data = CacheKit.get("ehcache10", "vote" + query);
if(list_data==null || list_data.size()==0){ if (list_data == null || list_data.size() == 0) {
list_data=voteDAO.list_vote(query); list_data = voteDAO.list_vote(query);
CacheKit.put("ehcache10", "vote"+query, list_data); CacheKit.put("ehcache10", "vote" + query, list_data);
} }
return list_data; return list_data;
} }
...@@ -130,5 +317,63 @@ public class VoteBusinessImpl implements VoteBusiness { ...@@ -130,5 +317,63 @@ public class VoteBusinessImpl implements VoteBusiness {
return voteDAO.listCount_vote(query); return voteDAO.listCount_vote(query);
} }
} @Override
public int listCount_ongoing(Map<String, Object> query) throws BusinessException {
return voteDAO.listCount_vote(query);
}
@Override
public int listCount_ended(Map<String, Object> query) throws BusinessException {
return voteDAO.listCount_vote(query);
}
@Override
public List<Map<String, Object>> list_ongoing(Map<String, Object> query) throws BusinessException {
return voteDAO.list_vote(query);
}
@Override
public List<Map<String, Object>> list_ended(Map<String, Object> query) throws BusinessException {
return voteDAO.list_vote(query);
}
@Override
public List<Map<String, Object>> list_item(Map<String, Object> query) throws BusinessException {
return voteDAO.list_item(query);
}
@Override
public List<Map<String, Object>> list_userchecked(Map<String, Object> query) throws BusinessException {
return voteDAO.list_userchecked(query);
}
@Override
public void update_endvote(Map<String, Object> entity) throws BusinessException {
// 动态传值修改
entity.put("REALLY_END_TIME", new Date());
entity.put("UPDATE_TIME", new Date());
entity.put("UPDATE_ID", SessionUtil.getEmname());
entity.put("STATUS_FLAG", 2);
List<Map<String, Object>> updateList = new ArrayList<Map<String, Object>>();
if (entity.keySet() != null) {
Set<String> key = entity.keySet();
// 将map集合中的key和value 取出来分别放到list集合里
for (String str : key) {
Map<String, Object> updateMap = new HashMap<String, Object>();
if (StringUtils.equalsIgnoreCase("UUID", str))
continue;
updateMap.put("key", str);
updateMap.put("value", entity.get(str));
updateList.add(updateMap);
}
entity.put("info", updateList);
//
voteDAO.update_vote(entity);
}
}
}
...@@ -10,15 +10,32 @@ import com.gaowj.business.exception.BusinessException; ...@@ -10,15 +10,32 @@ import com.gaowj.business.exception.BusinessException;
public interface voteDAO { public interface voteDAO {
void insert_vote(Map<String,Object> entity) throws BusinessException ; void insert_vote(Map<String,Object> entity) throws BusinessException ;
void insert_item(Map<String,Object> itemmap) throws BusinessException ;
void insert_userVote(Map<String,Object> itemmap) throws BusinessException ;
void update_vote(Map<String,Object> entity) throws BusinessException ; void update_vote(Map<String,Object> entity) throws BusinessException ;
void update_item(Map<String,Object> item) throws BusinessException ;
void delete_vote(List<String> list) throws BusinessException; void delete_vote(List<String> list) throws BusinessException;
void delete_vote_item(List<String> list) throws BusinessException;
void delete_vote_action(List<String> list) throws BusinessException;
void delete_item(List<String> list) throws BusinessException;
List<Map<String,Object>> list_vote(RowBounds rowbounds, Map<String, Object> query) throws BusinessException ; List<Map<String,Object>> list_vote(RowBounds rowbounds, Map<String, Object> query) throws BusinessException ;
List<Map<String,Object>> list_vote(Map<String,Object> query) throws BusinessException ; List<Map<String,Object>> list_vote(Map<String,Object> query) throws BusinessException ;
int listCount_vote(Map<String, Object> query) throws BusinessException ; int listCount_vote(Map<String, Object> query) throws BusinessException ;
List<Map<String,Object>> list_item(Map<String,Object> query) throws BusinessException ;
List<Map<String,Object>> list_userchecked(Map<String,Object> query) throws BusinessException ;
} }
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jw.app.business.vote.voteDAO"> <mapper namespace="com.jw.app.business.vote.voteDAO">
<sql id="WHERE">
<where>
<trim prefixOverrides="and">
<if test="UUID != null and UUID != ''">
and f.UUID = #{UUID}
</if>
<if test="USERSELF == 0">
and f.vote_count > 0
</if>
<if test="CONTENT != null and CONTENT != ''">
and f.CONTENT like concat('%',#{CONTENT},'%')
</if>
<if test="CREATE_ID != null and CREATE_ID != ''">
and f.CREATE_ID like concat('%',#{CREATE_ID},'%')
</if>
<if test="START_TIME != null and START_TIME != ''">
and f.CREATE_TIME &gt;= #{START_TIME}
</if>
<if test="END_TIME != null and END_TIME != ''">
and f.CREATE_TIME &lt;= #{END_TIME}
</if>
<if test="UPDATE_ID != null and UPDATE_ID != ''">
and f.UPDATE_ID = #{UPDATE_ID}
</if>
<if test="UPDATE_TIME != null and UPDATE_TIME != ''">
and f.UPDATE_TIME = #{UPDATE_TIME}
</if>
<if test="START_START_TIME != null and START_START_TIME != ''">
and f.START_TIME &gt;= #{START_START_TIME}
</if>
<if test="END_START_TIME != null and END_START_TIME != ''">
and f.START_TIME &lt;= #{END_START_TIME}
</if>
<if test="START_END_TIME != null and START_END_TIME != ''">
and f.END_TIME &gt;= #{START_END_TIME}
</if>
<if test="END_END_TIME != null and END_END_TIME != ''">
and f.END_TIME &lt;= #{END_END_TIME}
</if>
</trim>
</where>
</sql>
<insert id="insert_vote" parameterType="map"> <insert id="insert_vote" parameterType="map">
insert into VOTE_MANAGER( insert into VOTE_MANAGE(
<trim prefix="" suffixOverrides=",">
<foreach collection="infoListKey" item="key">
${key},
</foreach>
</trim>
<![CDATA[ ) values( ]]>
<trim prefix="" suffixOverrides=",">
<foreach collection="infoList" item="value">
#{value},
</foreach>
</trim>
<![CDATA[ ) ]]>
</insert>
<insert id="insert_item" parameterType="map">
insert into VOTE_MANAGE_ITEM(
<trim prefix="" suffixOverrides=",">
<foreach collection="itemListKey" item="key">
${key},
</foreach>
</trim>
<![CDATA[ ) values( ]]>
<trim prefix="" suffixOverrides=",">
<foreach collection="itemList" item="value">
#{value},
</foreach>
</trim>
<![CDATA[ ) ]]>
</insert>
<insert id="insert_userVote" parameterType="map">
insert into VOTE_MANAGE_ACTION(
<trim prefix="" suffixOverrides=","> <trim prefix="" suffixOverrides=",">
<foreach collection="infoListKey" item="key"> <foreach collection="infoListKey" item="key">
${key}, ${key},
...@@ -20,7 +93,7 @@ ...@@ -20,7 +93,7 @@
<update id="update_vote" parameterType="map"> <update id="update_vote" parameterType="map">
<![CDATA[ <![CDATA[
update VOTE_MANAGER set update VOTE_MANAGE set
]]> ]]>
<trim prefix="" suffixOverrides=","> <trim prefix="" suffixOverrides=",">
<foreach collection="info" item="info"> <foreach collection="info" item="info">
...@@ -30,87 +103,145 @@ ...@@ -30,87 +103,145 @@
<where> <where>
<if test="UUID != null and UUID != ''"> <if test="UUID != null and UUID != ''">
and UUID = #{UUID} and UUID = #{UUID}
</if> </if>
</where> </where>
</update> </update>
<update id="update_item" parameterType="map">
<![CDATA[
update VOTE_MANAGE_ITEM set
]]>
<trim prefix="" suffixOverrides=",">
<foreach collection="info" item="info">
${info.key} = #{info.value} ,
</foreach>
</trim>
<where>
<if test="UUID != null and UUID != ''">
and UUID = #{UUID}
</if>
</where>
</update>
<delete id="delete_vote" parameterType="list"> <delete id="delete_vote" parameterType="list">
<![CDATA[ <![CDATA[
delete from VOTE_MANAGER where UUID IN delete from VOTE_MANAGE where UUID IN
]]> ]]>
<foreach collection="list" item="UUID" open="(" separator="," <foreach collection="list" item="UUID" open="(" separator=","
close=")"> close=")">
#{UUID} #{UUID}
</foreach> </foreach>
</delete>
<delete id="delete_vote_item" parameterType="list">
<![CDATA[
delete from VOTE_MANAGE_ITEM where MANAGE_ID IN
]]>
<foreach collection="list" item="UUID" open="(" separator=","
close=")">
#{UUID}
</foreach>
</delete>
<delete id="delete_vote_action" parameterType="list">
<![CDATA[
delete from VOTE_MANAGE_ACTION where MANAGE_ID IN
]]>
<foreach collection="list" item="UUID" open="(" separator=","
close=")">
#{UUID}
</foreach>
</delete>
<delete id="delete_item" parameterType="list">
<![CDATA[
delete from VOTE_MANAGE_ITEM where UUID IN
]]>
<foreach collection="list" item="UUID" open="(" separator=","
close=")">
#{UUID}
</foreach>
</delete> </delete>
<select id="list_vote" parameterType="map" resultType="upperCaseKeyMap"> <select id="list_vote" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[ SELECT * FROM
select f.* (
from VOTE_MANAGER f where 1=1 SELECT
]]> manage.*,
<if test="UUID != null and UUID != ''"> SUM( CASE WHEN action.uuid IS NULL THEN 0 ELSE 1 END ) AS vote_count
and f.UUID = #{UUID} FROM
</if> ( SELECT * FROM `vote_manage`
<if test="CONTENT != null and CONTENT != ''"> <where>
and f.CONTENT like concat('%',#{CONTENT},'%') <trim prefixOverrides="and">
</if> <if test="STATUS_FLAG != null and STATUS_FLAG != ''">
<if test="START_TIME != null and START_TIME != ''"> and STATUS_FLAG = #{STATUS_FLAG}
and f.START_TIME = #{START_TIME} </if>
</if> </trim>
<if test="END_TIME != null and END_TIME != ''"> </where>
and f.END_TIME = #{END_TIME} ) manage
</if> LEFT JOIN ( SELECT * FROM `vote_manage_action`
<if test="CREATE_ID != null and CREATE_ID != ''"> <where>
and f.CREATE_ID like concat('%',#{CREATE_ID},'%') <trim prefixOverrides="and">
</if> <if test="USER_ID != null and USER_ID != ''">
<if test="START_TIME != null and START_TIME != ''"> and USER_ID = #{USER_ID}
and f.CREATE_TIME &gt;= #{START_TIME} </if>
</if> </trim>
<if test="END_TIME != null and END_TIME != ''"> </where>
and f.CREATE_TIME &lt;= #{END_TIME} ) action ON manage.uuid = action.manage_id
</if> GROUP BY
<if test="UPDATE_ID != null and UPDATE_ID != ''"> manage.uuid
and f.UPDATE_ID = #{UPDATE_ID} ) f
</if>
<if test="UPDATE_TIME != null and UPDATE_TIME != ''"> <include refid="WHERE"></include>
and f.UPDATE_TIME = #{UPDATE_TIME}
</if>
order by f.CREATE_TIME DESC order by f.CREATE_TIME DESC
</select> </select>
<select id="listCount_vote" parameterType="map" resultType="int"> <select id="listCount_vote" parameterType="map" resultType="int">
<![CDATA[ SELECT count(*) FROM
select count(*) c from VOTE_MANAGER f where 1=1 (
]]> SELECT
<if test="UUID != null and UUID != ''"> manage.*,
and f.UUID = #{UUID} SUM( CASE WHEN action.uuid IS NULL THEN 0 ELSE 1 END ) AS vote_count
</if> FROM
<if test="CONTENT != null and CONTENT != ''"> ( SELECT * FROM `vote_manage`
and f.CONTENT like concat('%',#{CONTENT},'%') <where>
</if> <trim prefixOverrides="and">
<if test="START_TIME != null and START_TIME != ''"> <if test="STATUS_FLAG != null and STATUS_FLAG != ''">
and f.START_TIME = #{START_TIME} and STATUS_FLAG = #{STATUS_FLAG}
</if> </if>
<if test="END_TIME != null and END_TIME != ''"> </trim>
and f.END_TIME = #{END_TIME} </where>
</if> ) manage
<if test="CREATE_ID != null and CREATE_ID != ''"> LEFT JOIN ( SELECT * FROM `vote_manage_action`
and f.CREATE_ID like concat('%',#{CREATE_ID},'%') <where>
</if> <trim prefixOverrides="and">
<if test="START_TIME != null and START_TIME != ''"> <if test="USER_ID != null and USER_ID != ''">
and f.CREATE_TIME &gt;= #{START_TIME} and USER_ID = #{USER_ID}
</if> </if>
<if test="END_TIME != null and END_TIME != ''"> </trim>
and f.CREATE_TIME &lt;= #{END_TIME} </where>
</if> ) action ON manage.uuid = action.manage_id
<if test="UPDATE_ID != null and UPDATE_ID != ''"> GROUP BY
and f.UPDATE_ID = #{UPDATE_ID} manage.uuid
</if> ) f
<if test="UPDATE_TIME != null and UPDATE_TIME != ''"> <include refid="WHERE"></include>
and f.UPDATE_TIME = #{UPDATE_TIME} </select>
</if>
<select id="list_item" parameterType="map" resultType="upperCaseKeyMap">
select *
from vote_manage_item
where manage_id=#{MANAGE_ID}
order by sort_num ASC
</select>
<select id="list_userchecked" parameterType="map" resultType="upperCaseKeyMap">
select *
from VOTE_MANAGE_ACTION
where manage_id=#{MANAGE_ID}
order by CREATE_TIME ASC
</select> </select>
</mapper> </mapper>
\ No newline at end of file
package com.jw.app.friendlink.action;
import java.util.HashMap;
import java.util.Map;
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.jw.app.business.CalendarBusiness;
import com.jw.app.business.FriendLinkBusiness;
import com.jw.app.business.utils.Status;
import net.sf.json.JSONObject;
public class actAction extends BasicAction {
/**
*
*/
private static final long serialVersionUID = 3380082635300076202L;
private JSONObject jsonObject = new JSONObject();
public JSONObject getJsonObject() {
return jsonObject;
}
public void setJsonObject(JSONObject jsonObject) {
this.jsonObject = jsonObject;
}
/**
* 保存友情链接信息
*
* @return
* @throws BusinessException
*/
public String saveFriendLinkInfo() throws BusinessException {
Map<String, Object> info = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
FriendLinkBusiness business = BusinessManager.getBusiness(FriendLinkBusiness.class);
try {
info = QueryParamUtil.StringToDate(info);
info.remove("OPETYPE");
info=business.save_friendlink(info);
jsonObject.putAll(Status.getStatus(Status.UPDATE_OK));
} catch (Exception e) {
if("-1".equals(info.get("ERROR"))){
Map<String, Object> map=new HashMap<String, Object>();
map.put("VALUE", "保存失败,快速链接不得超过8条!");
jsonObject.putAll(map);
}else{
jsonObject.putAll(Status.getStatus(Status.UPDATE_ERR));
}
}
return "json";
}
/**
* 删除友情链接信息
*
* @return
* @throws BusinessException
*/
public String removeFriendLinkInfo() throws BusinessException {
FriendLinkBusiness business = BusinessManager.getBusiness(FriendLinkBusiness.class);
try {
business.delete_friendlink(RequestUtils.getString(request, "UUID"));
jsonObject.putAll(Status.getStatus(Status.DELETE_OK));
} catch (Exception e) {
jsonObject.putAll(Status.getStatus(Status.DELETE_ERR));
}
return "json";
}
}
package com.jw.app.friendlink.action;
import java.sql.SQLException;
import java.text.ParseException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
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.QueryParamUtil;
import com.gaowj.business.util.RequestUtils;
import com.jw.app.business.CalendarBusiness;
import com.jw.app.business.FriendLinkBusiness;
import net.sf.json.JSONObject;
public class dataAction extends BasicAction {
/**
*
*/
private static final long serialVersionUID = -3043201121825378378L;
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() {
rows = getPageSize();
return rows;
}
public void setRows(int rows) {
setPageSize(rows);
this.rows = getPageSize();
}
public int getPage() {
page = getPageNo();
return page;
}
public void setPage(int page) {
setPageNo(page);
this.page = getPageNo();
}
/**
* 获取友情链接列表
*
* @return
* @throws BusinessException
*/
public String listFriendLinkInfo() throws BusinessException {
FriendLinkBusiness business = BusinessManager.getBusiness(FriendLinkBusiness.class);
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
try {
query = QueryParamUtil.StringToDate(query);
Page<Map<String, Object>> pageData = business.list_friendlink(pageNo,pageSize,query);
Map<String, Object> data = new HashMap<String, Object>();
data.put("rowSet", QueryParamUtil.DateTimeToString(pageData.getItems()));
data.put("pageNo", pageNo);
data.put("pageSize", pageSize);
data.put("pageCount", pageCount);
data.put("rows", data.get("rowSet"));
data.put("total", pageData.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.friendlink.action;
import com.gaowj.business.action.BasicAction;
import com.gaowj.business.exception.BusinessException;
public class viewAction extends BasicAction {
/**
*
*/
private static final long serialVersionUID = 3972629140430315958L;
public String friendlinkTab() throws BusinessException{
return "friendlinkTab";
}
public String friendlinkTabDetail() throws BusinessException{
return "friendlinkTabDetail";
}
}
package com.jw.app.notice.action;
import java.util.Map;
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.jw.app.business.NoticeBusiness;
import com.jw.app.business.utils.Status;
import net.sf.json.JSONObject;
public class actAction extends BasicAction {
/**
*
*/
private static final long serialVersionUID = -1447740171556559942L;
private JSONObject jsonObject = new JSONObject();
public JSONObject getJsonObject() {
return jsonObject;
}
public void setJsonObject(JSONObject jsonObject) {
this.jsonObject = jsonObject;
}
/**
* 保存通知公告信息
*
* @return
* @throws BusinessException
*/
public String saveNoticeInfo() throws BusinessException {
Map<String, Object> info = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
NoticeBusiness business = BusinessManager.getBusiness(NoticeBusiness.class);
try {
info = QueryParamUtil.StringToDate(info);
info.remove("OPETYPE");
business.save_notice(info);
jsonObject.putAll(Status.getStatus(Status.UPDATE_OK));
} catch (Exception e) {
jsonObject.putAll(Status.getStatus(Status.UPDATE_ERR));
}
return "json";
}
/**
* 删除通知公告信息
*
* @return
* @throws BusinessException
*/
public String removeNoticeInfo() throws BusinessException {
NoticeBusiness business = BusinessManager.getBusiness(NoticeBusiness.class);
try {
business.delete_notice(RequestUtils.getString(request, "UUID"));
jsonObject.putAll(Status.getStatus(Status.DELETE_OK));
} catch (Exception e) {
jsonObject.putAll(Status.getStatus(Status.DELETE_ERR));
}
return "json";
}
}
package com.jw.app.notice.action;
import java.sql.SQLException;
import java.text.ParseException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
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.QueryParamUtil;
import com.gaowj.business.util.RequestUtils;
import com.jw.app.business.NoticeBusiness;
import net.sf.json.JSONObject;
public class dataAction extends BasicAction {
/**
*
*/
private static final long serialVersionUID = 7316326558049664123L;
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() {
rows = getPageSize();
return rows;
}
public void setRows(int rows) {
setPageSize(rows);
this.rows = getPageSize();
}
public int getPage() {
page = getPageNo();
return page;
}
public void setPage(int page) {
setPageNo(page);
this.page = getPageNo();
}
/**
* 获取通知公告信息列表
*
* @return
* @throws BusinessException
*/
public String listNoticeInfo() throws BusinessException {
NoticeBusiness business = BusinessManager.getBusiness(NoticeBusiness.class);
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
try {
query = QueryParamUtil.StringToDate(query);
Page<Map<String, Object>> pageData = business.list_notice(pageNo,pageSize,query);
Map<String, Object> data = new HashMap<String, Object>();
data.put("rowSet", QueryParamUtil.DateTimeToString(pageData.getItems()));
data.put("pageNo", pageNo);
data.put("pageSize", pageSize);
data.put("pageCount", pageCount);
data.put("rows", data.get("rowSet"));
data.put("total", pageData.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.notice.action;
import com.gaowj.business.action.BasicAction;
import com.gaowj.business.exception.BusinessException;
public class viewAction extends BasicAction {
/**
*
*/
private static final long serialVersionUID = 3950314332893826524L;
public String noticeTab() throws BusinessException{
return "noticeTab";
}
public String noticeTabDetail() throws BusinessException{
return "noticeTabDetail";
}
}
package com.jw.app.process.action;
import java.util.List;
import java.util.Map;
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 actAction extends BasicAction {
/**
*
*/
private static final long serialVersionUID = -2591076090760872233L;
private JSONObject jsonObject = new JSONObject();
public JSONObject getJsonObject() {
return jsonObject;
}
public void setJsonObject(JSONObject jsonObject) {
this.jsonObject = jsonObject;
}
/**
* 插入
* @param entity
* @throws BusinessException
*/
public String insertVote() 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_vote(entity);
// 操作日志
//sysbusiness.insert_logBusiness(具体方法,操作内容,操作描述,操作记录ID,操作记录中文描述,分类)
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("insertVote", "" + entity,
"增加学生测试数据", (String) entity.get("UUID"), (String) entity.get("NAME"), "votedemo1");
//
//更新缓存
CacheKit.update("ehcache11", "com_jw_app_vote_dataAction_listAll", business.list_vote(null));
//
jsonObject.putAll(Status.getStatusSuccessMessage("保存成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("保存失败"));
e.printStackTrace();
}
return "json";
}
/**
* 更新
* @param entity
* @throws BusinessException
*/
public String updateVote() throws BusinessException {
VoteBusiness business = BusinessManager.getBusiness(VoteBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
try {
//去除不要更新的字段
entity.remove("OPETYPE");
//修改
entity = QueryParamUtil.StringToDate(entity);
business.update_vote(entity);
// 操作日志
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("updateVote", "" + entity,
"修改测试数据",(String) entity.get("UUID"), (String) entity.get("NAME"),"votedemo1");
//
jsonObject.putAll(Status.getStatusSuccessMessage("修改成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("修改失败"));
e.printStackTrace();
}
return "json";
}
/**
* 在软删除基础上删除记录
* @param entity
* @throws BusinessException
*/
public String deleteVote() throws BusinessException {
VoteBusiness business = BusinessManager.getBusiness(VoteBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
String deletekey = (String) entity.get("CODE");
List<String> ListKey = QueryParamUtil.StringToList(deletekey);
try {
business.delete_vote(ListKey);
// 操作日志
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("deleteVote", "" + ListKey,
"删除测试数据", deletekey, "多个流水号","votedemo1");
//
jsonObject.putAll(Status.getStatusSuccessMessage("删除成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("删除失败"));
e.printStackTrace();
}
return "json";
}
}
package com.jw.app.process.action;
import java.sql.SQLException;
import java.text.ParseException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
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.jw.app.business.ProcessBusiness;
import net.sf.json.JSONObject;
public class dataAction extends BasicAction {
/**
*
*/
private static final long serialVersionUID = 1829141492939513911L;
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 listProcess() throws BusinessException {
ProcessBusiness business = BusinessManager.getBusiness(ProcessBusiness.class);
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
try {
query = QueryParamUtil.StringToDate(query);
List<Map<String, Object>> listRows = business.listProcess(query);
setPageCount((listRows.size() - 1) / pageSize + 1);
Map<String, Object> data = new HashMap<String, Object>();
data.put("rowSet", QueryParamUtil.DateTimeToString(listRows));
data.put("pageNo", pageNo);
data.put("pageSize", pageSize);
data.put("pageCount", pageCount);
data.put("rows", data.get("rowSet"));
data.put("total", listRows.size());
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.process.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 viewAction extends BasicAction {
/**
*
*/
private static final long serialVersionUID = -6259964352154128000L;
public String voteTab() throws BusinessException{
return "voteTab";
}
public String voteTabDetail() throws BusinessException{
Map<String,Object> query = RequestUtils.getUpdateFieldMapUtf8(request, RequestUtils.UPDATEDATAFIELDPREFIX);
request.setAttribute("is_row", query);
return "voteTabDetail";
}
public String voteAdvsearch() throws BusinessException{
Map<String,Object> query = RequestUtils.getUpdateFieldMapUtf8(request, RequestUtils.UPDATEDATAFIELDPREFIX);
request.setAttribute("is_row", query);
return "voteAdvsearch";
}
}
...@@ -3,6 +3,7 @@ package com.jw.app.vote.action; ...@@ -3,6 +3,7 @@ package com.jw.app.vote.action;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject; import net.sf.json.JSONObject;
import com.jw.app.business.VoteBusiness; import com.jw.app.business.VoteBusiness;
...@@ -17,11 +18,8 @@ import com.gaowj.standard.utils.CacheKit; ...@@ -17,11 +18,8 @@ import com.gaowj.standard.utils.CacheKit;
public class actAction extends BasicAction { public class actAction extends BasicAction {
/**
*
*/
private static final long serialVersionUID = -2591076090760872233L; private static final long serialVersionUID = -2591076090760872233L;
private JSONObject jsonObject = new JSONObject(); private JSONObject jsonObject = new JSONObject();
public JSONObject getJsonObject() { public JSONObject getJsonObject() {
return jsonObject; return jsonObject;
...@@ -40,6 +38,7 @@ private JSONObject jsonObject = new JSONObject(); ...@@ -40,6 +38,7 @@ private JSONObject jsonObject = new JSONObject();
VoteBusiness business = BusinessManager.getBusiness(VoteBusiness.class); VoteBusiness business = BusinessManager.getBusiness(VoteBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX); Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
jsonObject = new JSONObject(); jsonObject = new JSONObject();
try { try {
entity = QueryParamUtil.StringToDate(entity); entity = QueryParamUtil.StringToDate(entity);
...@@ -53,11 +52,34 @@ private JSONObject jsonObject = new JSONObject(); ...@@ -53,11 +52,34 @@ private JSONObject jsonObject = new JSONObject();
//sysbusiness.insert_logBusiness(具体方法,操作内容,操作描述,操作记录ID,操作记录中文描述,分类) //sysbusiness.insert_logBusiness(具体方法,操作内容,操作描述,操作记录ID,操作记录中文描述,分类)
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class); SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("insertVote", "" + entity, sysbusiness.insert_logBusiness("insertVote", "" + entity,
"增加学生测试数据", (String) entity.get("UUID"), (String) entity.get("NAME"), "votedemo1"); "增加投票主题", (String) entity.get("UUID"), (String) entity.get("CONTENT"), "votedemo1");
// jsonObject.putAll(Status.getStatusSuccessMessage("保存成功"));
//更新缓存 } catch (Exception e) {
CacheKit.update("ehcache11", "com_jw_app_vote_dataAction_listAll", business.list_vote(null)); jsonObject.putAll(Status.getStatusErrorMessage("保存失败"));
// e.printStackTrace();
}
return "json";
}
/**
* 插入用户投票
* @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);
jsonObject.putAll(Status.getStatusSuccessMessage("保存成功")); jsonObject.putAll(Status.getStatusSuccessMessage("保存成功"));
} catch (Exception e) { } catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("保存失败")); jsonObject.putAll(Status.getStatusErrorMessage("保存失败"));
...@@ -85,8 +107,31 @@ private JSONObject jsonObject = new JSONObject(); ...@@ -85,8 +107,31 @@ private JSONObject jsonObject = new JSONObject();
// 操作日志 // 操作日志
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class); SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("updateVote", "" + entity, sysbusiness.insert_logBusiness("updateVote", "" + entity,
"修改测试数据",(String) entity.get("UUID"), (String) entity.get("NAME"),"votedemo1"); "修改投票主题",(String) entity.get("UUID"), (String) entity.get("CONTENT"),"votedemo1");
// jsonObject.putAll(Status.getStatusSuccessMessage("修改成功"));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("修改失败"));
e.printStackTrace();
}
return "json";
}
/**
* 更新
* @param entity
* @throws BusinessException
*/
public String endVote() throws BusinessException {
VoteBusiness business = BusinessManager.getBusiness(VoteBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
try {
//去除不要更新的字段
entity.remove("OPETYPE");
//修改
entity = QueryParamUtil.StringToDate(entity);
business.update_endvote(entity);
jsonObject.putAll(Status.getStatusSuccessMessage("修改成功")); jsonObject.putAll(Status.getStatusSuccessMessage("修改成功"));
} catch (Exception e) { } catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("修改失败")); jsonObject.putAll(Status.getStatusErrorMessage("修改失败"));
...@@ -112,9 +157,7 @@ private JSONObject jsonObject = new JSONObject(); ...@@ -112,9 +157,7 @@ private JSONObject jsonObject = new JSONObject();
// 操作日志 // 操作日志
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class); SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
sysbusiness.insert_logBusiness("deleteVote", "" + ListKey, sysbusiness.insert_logBusiness("deleteVote", "" + ListKey,
"删除测试数据", deletekey, "多个流水号","votedemo1"); "删除投票主题", deletekey, "多个流水号","votedemo1");
//
jsonObject.putAll(Status.getStatusSuccessMessage("删除成功")); jsonObject.putAll(Status.getStatusSuccessMessage("删除成功"));
} catch (Exception e) { } catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("删除失败")); jsonObject.putAll(Status.getStatusErrorMessage("删除失败"));
...@@ -122,5 +165,6 @@ private JSONObject jsonObject = new JSONObject(); ...@@ -122,5 +165,6 @@ private JSONObject jsonObject = new JSONObject();
} }
return "json"; return "json";
} }
} }
...@@ -22,11 +22,8 @@ import com.gaowj.business.util.TestMd5; ...@@ -22,11 +22,8 @@ import com.gaowj.business.util.TestMd5;
import com.gaowj.standard.utils.CacheKit; import com.gaowj.standard.utils.CacheKit;
public class dataAction extends BasicAction{ public class dataAction extends BasicAction{
/**
*
*/
private static final long serialVersionUID = 1829141492939513911L; private static final long serialVersionUID = 1829141492939513911L;
private JSONObject jsonObject = new JSONObject(); private JSONObject jsonObject = new JSONObject();
private int rows = 20;// 每页显示的记录数 private int rows = 20;// 每页显示的记录数
private int page = 1;// 当前第几页 private int page = 1;// 当前第几页
public JSONObject getJsonObject() { public JSONObject getJsonObject() {
...@@ -79,6 +76,58 @@ private JSONObject jsonObject = new JSONObject(); ...@@ -79,6 +76,58 @@ private JSONObject jsonObject = new JSONObject();
return "json"; return "json";
} }
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 list_ended() 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_ended(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";
}
/** /**
* 获取所有记录 * 获取所有记录
* @param entity * @param entity
...@@ -115,25 +164,10 @@ private JSONObject jsonObject = new JSONObject(); ...@@ -115,25 +164,10 @@ private JSONObject jsonObject = new JSONObject();
String tt = PropUtil.getValue("login_main_url", "quartz_service", ""); String tt = PropUtil.getValue("login_main_url", "quartz_service", "");
//缓存使用 List<Map<String, Object>> listData = business.list_vote(query);
//查看src下ehcache.xml缓存配置文件。(ehcache1-ehcache10表示有10个缓存对象,分别只能缓存1-10分钟,最后有个ehcache11可以持久缓存)
List<Map<String, Object>> listData = null;
TestMd5 md5 = new TestMd5();
String queryMD5 = "";
try {
queryMD5 = md5.MD5(query.toString());
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
listData = CacheKit.get("ehcache11", "com_jw_app_vote_dataAction_listAll_"+queryMD5);
if(listData == null){
listData = business.list_vote(query);
CacheKit.put("ehcache11", "com_jw_app_vote_dataAction_listAll_"+queryMD5,listData);
}
int listDataCount = listData.size(); int listDataCount = listData.size();
Map<String, Object> data = new HashMap<String, Object>(); Map<String, Object> data = new HashMap<String, Object>();
data.put("rowSet", QueryParamUtil.DateToString(listData)); data.put("rowSet", QueryParamUtil.DateTimeToString(listData));
data.put("pageNo", 1); data.put("pageNo", 1);
data.put("pageSize", listDataCount); data.put("pageSize", listDataCount);
data.put("pageCount", listDataCount); data.put("pageCount", listDataCount);
...@@ -150,5 +184,33 @@ private JSONObject jsonObject = new JSONObject(); ...@@ -150,5 +184,33 @@ private JSONObject jsonObject = new JSONObject();
} }
return "json"; 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";
}
} }
...@@ -8,14 +8,25 @@ import com.gaowj.business.exception.BusinessException; ...@@ -8,14 +8,25 @@ import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.RequestUtils; import com.gaowj.business.util.RequestUtils;
public class viewAction extends BasicAction { public class viewAction extends BasicAction {
/**
*
*/
private static final long serialVersionUID = -6259964352154128000L; private static final long serialVersionUID = -6259964352154128000L;
public String voteTab() throws BusinessException{ public String ongoingVoteTab() throws BusinessException{
return "ongoingVoteTab";
}
public String endedVoteTab() throws BusinessException{
return "endedVoteTab";
}
public String voteTab() throws BusinessException{
return "voteTab"; return "voteTab";
} }
public String userVoteTabDetail() throws BusinessException{
Map<String,Object> query = RequestUtils.getUpdateFieldMapUtf8(request, RequestUtils.UPDATEDATAFIELDPREFIX);
request.setAttribute("is_row", query);
return "userVoteTabDetail";
}
public String voteTabDetail() throws BusinessException{ public String voteTabDetail() throws BusinessException{
Map<String,Object> query = RequestUtils.getUpdateFieldMapUtf8(request, RequestUtils.UPDATEDATAFIELDPREFIX); Map<String,Object> query = RequestUtils.getUpdateFieldMapUtf8(request, RequestUtils.UPDATEDATAFIELDPREFIX);
......
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