Commit feb9ba12 by 周添尉

修改冲突

parents 0cc41607 e4a89b10
......@@ -73,9 +73,9 @@
<!-- 增加数据源dataSource-standard -->
<bean id="dataSource-standard" 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/jw_standard?useUnicode=true&amp;characterEncoding=utf8&amp;autoReconnect=true&amp;useSSL=false" />
<property name="username" value="jw_standard" />
<property name="password" value="jw_standard" />
<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="jf_standard" />
<property name="password" value="jf_standard" />
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<!-- 配置初始化大小、最小、最大 -->
......@@ -124,9 +124,60 @@
<!-- 增加数据源dataSource-business -->
<bean id="dataSource-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/jw_apps?useUnicode=true&amp;characterEncoding=utf8&amp;autoReconnect=true&amp;useSSL=false" />
<property name="username" value="jw_apps" />
<property name="password" value="jw_apps" />
<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="jf_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" />
<!-- 配置初始化大小、最小、最大 -->
......@@ -205,6 +256,17 @@
</property>
</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">
<property name="beanNames">
......@@ -217,6 +279,7 @@
<value>transactionInterceptor-system</value>
<value>transactionInterceptor-standard</value>
<value>transactionInterceptor-business</value>
<value>transactionInterceptor-lcyq-business</value>
</list>
</property>
</bean>
......@@ -254,4 +317,5 @@
<import resource="business-standard.xml"/>
<import resource="business-test.xml"/>
<import resource="business-apps.xml"/>
<import resource="business-process.xml"/>
</beans>
\ No newline at end of file
......@@ -11,7 +11,6 @@
<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/table/TableDAO.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/store/storeDAO.xml</value>
......@@ -23,6 +22,10 @@
<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/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>
</property>
</bean>
......@@ -85,6 +88,22 @@
<property name="mapperInterface" value="com.jw.app.business.vote.voteDAO"/>
<property name="sqlSessionFactory" ref="sqlSessionFactory-apps"/>
</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 -->
<bean id="PortletBusiness"
class="com.jw.app.business.portlet.PortletBusinessImpl">
......@@ -137,6 +156,24 @@
<property name="voteDAO" ref="voteDAO"/>
</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 -->
<bean id="portletDAO" class="org.mybatis.spring.mapper.MapperFactoryBean">
<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 @@
}
.icon-ext-10_20 {
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(){
document.domain="jfbrother.com";
//去掉尾部的一个div
$('.index_footer').next().remove();
......@@ -20,8 +20,48 @@ $(function(){
//模块的切换
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的距离来达到满屏显示
function init_office_module_bottom(){
var office_module_height;
......@@ -40,6 +80,20 @@ function init_office_module_bottom(){
//模块的切换
function init_office_change_moddle(){
$('.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));
$('.office_module').hide();
$('.office_module').eq(index).show();
......@@ -54,34 +108,23 @@ function init_office_change_moddle(){
function init_office_apply_lump(){
//自定义一个颜色数组
var color_list = ['#ff8264','#44df9e','#f585ad','#aa96f6','#fea144','#5cc4e0'];
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 infos=processModule.data.listProcess().rowSet;
//块状的容器
var $content = $('.office_apply_content');
for(var i = 0 ; i < infos.length ; i ++){
var $create_container = $('<div></div>');
var $create_content = $('<div></div>');
$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>');
//添加一个颜色背景
......@@ -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_container.append($create_content);
$content.append($create_container);
$create_content.data('processInfo',infos[i]);
}
}
......@@ -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(){
var infos = [
......@@ -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"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String procApp=com.gaowj.business.util.PropUtil.getValue("lcyq_app_url", "quartz_service", "");
%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<html>
<head>
<title>办事大厅</title>
<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 src="${ctx}/jwapp/pages/process/js/processModule.js"></script>
<script src="${ctx}/jfcas04/js/office.js"></script>
</head>
<body>
<!-- 头部 -->
<jsp:include page="/nav4.jsp"></jsp:include>
<!-- 头部 -->
<jsp:include page="/nav4.jsp"></jsp:include>
<!-- 内容部分 -->
<div class="container-fluid">
<!-- 内容部分1 -->
<div class="container-fluid" id="process_content1">
<!--背景图-->
<div class="row office_bg">
<div class="office_bg_content col-md-12">
<div class="col-md-3">
<div class="office_bg_content_click">
<img src="${ctx}/custom/images/office_apply.png" width="100" height="100"/>
<div>我要申请</div>
</div>
</div>
<div class="col-md-3">
<div class="">
<img src="${ctx}/custom/images/office_examine.png" width="100" height="100"/>
<div>我要审批</div>
</div>
</div>
<div class="col-md-3">
<div class="">
<img src="${ctx}/custom/images/office_progress.png" width="100" height="100"/>
<div>进度查询</div>
</div>
</div>
<div class="col-md-3">
<div class="">
<img src="${ctx}/custom/images/office_history.png" width="100" height="100"/>
<div>历史查询</div>
</div>
</div>
</div>
</div>
<!--背景图-->
<div class="row office_bg">
<div class="office_bg_content col-md-12">
<div class="col-md-3">
<div class="office_bg_content_click" >
<img src="${ctx}/custom/images/office_apply.png" width="100" height="100" />
<div>我要申请</div>
</div>
</div>
<div class="col-md-3">
<div class="" src="<%=procApp %>?redirectUrl=processView_approval" iframeId="approval">
<img src="${ctx}/custom/images/office_examine.png" width="100" height="100" />
<div>我要审批</div>
</div>
</div>
<div class="col-md-3">
<div class="" src="<%=procApp %>?redirectUrl=processView_progressRate" iframeId="progressRate">
<img src="${ctx}/custom/images/office_progress.png" width="100" height="100" />
<div>进度查询</div>
</div>
</div>
<div class="col-md-3">
<div class="" src="<%=procApp %>?redirectUrl=processView_progressHistory" iframeId="progressHistory">
<img src="${ctx}/custom/images/office_history.png" width="100" height="100" />
<div>历史查询</div>
</div>
</div>
</div>
</div>
<!-- 申请模块 -->
<div class="office_module row">
<div class="office_module_title col-md-12">
<img src="${ctx}/custom/images/office_title.png" height="16" width="16" />
<span>我要申请</span>
</div>
<div class="office_apply col-md-12">
<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 class="office_module row">
<div class="office_module_title col-md-12">
<img src="${ctx}/custom/images/office_title.png" height="16" width="16" /> <span>我要申请</span>
</div>
<div class="office_apply col-md-12">
<div class="office_apply_content"></div>
</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>
<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">
<iframe id="approval" style="width:100%" ></iframe>
</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_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 class="office_module row" style="display:none">
<iframe id="progressRate" style="width:100%" ></iframe>
</div>
<!-- 历史查询模块 -->
<div class="office_module row" style="display:none">
<iframe id="progressHistory" style="width:100%" ></iframe>
</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>
</html>
......@@ -2,6 +2,7 @@
*
*/
function getbaidu(contentid){
UE.getEditor(contentid).destroy();
var ue = UE.getEditor(contentid,{ //这里可以选择自己需要的工具按钮名称,此处仅选择如下五个
toolbars:[ [
// '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) {
//定义数据交互
voteModule.prototype = BusinessObject;
//插入附件数据
//插入主题
voteModule.prototype.insertVote = function(){};
//修改附件数据
//插入用户投票
voteModule.prototype.insertUserVote = function(){};
//修改主题
voteModule.prototype.updateVote = 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.listAll = function(){};
//创建一个数据操作对象,然后再后续使用
voteModule.voteActAction = new voteModule("json").delegate("voteAct");
//创建一个数据获取对象,然后再后续使用
......
<%@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 @@
<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 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>
<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-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>
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ext-file',plain:true" onclick="javascript:uploadcommonBatchRow()">附件上传</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/vote/js/voteModule.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%;">
<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="CONTENT" name="FIELD_CONTENT" style="width:400px" required=true value="${is_row.CONTENT}"/>
</td>
</tr>
<tr>
<td class="tableStyleLable">
<span>投票开始时间:</span>
</td>
<td>
<input class="easyui-datetimebox" id="START_TIME" name="FIELD_START_TIME" style="width:400px" value="${is_row.START_TIME}"/>
</td>
</tr>
<tr>
<td class="tableStyleLable">
<span>投票结束时间:</span>
</td>
<td>
<input class="easyui-datetimebox" id="END_TIME" name="FIELD_END_TIME" style="width:400px" value="${is_row.END_TIME}"/>
</td>
</tr>
</table>
<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="CONTENT" name="FIELD_CONTENT" style="width: 400px" required="true" value="${is_row.CONTENT}" />
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>副标题:</span>
</td>
<td style="width: 85%">
<input class="easyui-textbox" id="SUB_TITLE" name="FIELD_SUB_TITLE" style="width: 400px" required="true" value="${is_row.SUB_TITLE}" />
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable">
<span>上限值:</span>
</td>
<td style="width: 85%">
<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>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable">
<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>
\ No newline at end of file
......@@ -21,3 +21,5 @@ downloadFilenameEncode2 = iso8859-1
#------------store----------------------
user_store_default_1gbsize = 1073741824
user_defaule_filedir = folder
#------------lcyqApp Url---------------------------
lcyq_app_url = http://localhost:8080/jfV5lcyq
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;
@Service
public interface VoteBusiness {
/**
* 插入
*
* @param entity
* @throws BusinessException
*/
void insert_vote(Map<String, Object> entity) throws BusinessException;
/**
* 插入
*
* @param entity
* @throws BusinessException
*/
void insert_vote(Map<String,Object> entity) throws BusinessException ;
void insert_userVote(Map<String, Object> entity) throws BusinessException;
/**
* 更新
*
* @param entity
* @throws BusinessException
*/
void update_vote(Map<String,Object> entity) throws BusinessException ;
/**
void update_vote(Map<String, Object> entity) throws BusinessException;
/**
* 删除记录
*
* @param entity
* @throws BusinessException
*/
void delete_vote(List<String> list)throws BusinessException;
/**
void delete_vote(List<String> list) throws BusinessException;
/**
* 分页获取记录
*
* @param entity
* @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
* @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
* @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
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