Commit 6be3d484 by 罗绍泽

Merge remote-tracking branch 'origin/develop' into develop

parents 5fd9581a 524708dd
......@@ -30,25 +30,41 @@
<!-- 配置初始化大小、最小、最大 -->
<property name="initialSize" value="1" />
<property name="minIdle" value="1" />
<property name="maxActive" value="20" />
<property name="maxActive" value="500" />
<!-- 配置获取连接等待超时的时间 -->
<property name="maxWait" value="60000" />
<!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 -->
<property name="timeBetweenEvictionRunsMillis" value="60000" />
<property name="timeBetweenEvictionRunsMillis" value="60000" />
<!-- 配置一个连接在池中最小生存的时间,单位是毫秒 -->
<property name="minEvictableIdleTimeMillis" value="300000" />
<!-- 超过时间限制是否回收,对于建立时间超过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" />
<property name="testOnBorrow" value="false" />
<property name="testOnReturn" value="false" />
<!-- 申请连接的时候检测 -->
<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" />
<!-- 打开PSCache,并且指定每个连接上PSCache的大小 -->
<property name="poolPreparedStatements" value="true" />
<property name="maxPoolPreparedStatementPerConnectionSize" value="20" />
<!-- 是否缓存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" />
......@@ -65,25 +81,41 @@
<!-- 配置初始化大小、最小、最大 -->
<property name="initialSize" value="1" />
<property name="minIdle" value="1" />
<property name="maxActive" value="20" />
<property name="maxActive" value="500" />
<!-- 配置获取连接等待超时的时间 -->
<property name="maxWait" value="60000" />
<!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 -->
<property name="timeBetweenEvictionRunsMillis" value="60000" />
<property name="timeBetweenEvictionRunsMillis" value="60000" />
<!-- 超过时间限制是否回收,对于建立时间超过removeAbandonedTimeout的连接强制关闭 -->
<property name="removeAbandoned" value="true" />
<!-- 超过时间限制多长,单位秒 -->
<property name="removeAbandonedTimeout" value="60" />
<!-- 配置一个连接在池中最小生存的时间,单位是毫秒 -->
<property name="minEvictableIdleTimeMillis" value="300000" />
<!-- 配置一个连接在池中最小生存的时间,单位是毫秒:1分钟 -->
<property name="minEvictableIdleTimeMillis" value="60000" />
<!-- 配置一个连接在池中最长生存的时间,单位是毫秒:5分钟 -->
<property name="maxEvictableIdleTimeMillis" value="300000" />
<!-- 用来检测连接是否有效的sql,要求是一个查询语句 -->
<property name="validationQuery" value="SELECT 'x'" />
<property name="testWhileIdle" value="true" />
<property name="testOnBorrow" value="false" />
<property name="testOnReturn" value="false" />
<!-- 申请连接的时候检测 -->
<property name="testWhileIdle" value="true" />
<!-- 申请连接时执行validationQuery检测连接是否有效,配置为true会降低性能 -->
<property name="testOnBorrow" value="false" />
<!-- 归还连接时执行validationQuery检测连接是否有效,配置为true会降低性能 -->
<property name="testOnReturn" value="false" />
<!-- 打开PSCache,并且指定每个连接上PSCache的大小 -->
<property name="poolPreparedStatements" value="true" />
<property name="maxPoolPreparedStatementPerConnectionSize" value="20" />
<!-- 连接池中的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" />
......@@ -100,25 +132,41 @@
<!-- 配置初始化大小、最小、最大 -->
<property name="initialSize" value="1" />
<property name="minIdle" value="1" />
<property name="maxActive" value="20" />
<property name="maxActive" value="500" />
<!-- 配置获取连接等待超时的时间 -->
<property name="maxWait" value="60000" />
<!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 -->
<property name="timeBetweenEvictionRunsMillis" value="60000" />
<property name="timeBetweenEvictionRunsMillis" value="60000" />
<!-- 超过时间限制是否回收,对于建立时间超过removeAbandonedTimeout的连接强制关闭 -->
<property name="removeAbandoned" value="true" />
<!-- 配置一个连接在池中最小生存的时间,单位是毫秒 -->
<property name="minEvictableIdleTimeMillis" value="300000" />
<!-- 超过时间限制多长,单位秒 -->
<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" />
<property name="testOnBorrow" value="false" />
<property name="testOnReturn" value="false" />
<!-- 申请连接的时候检测 -->
<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" />
<!-- 打开PSCache,并且指定每个连接上PSCache的大小 -->
<property name="poolPreparedStatements" value="true" />
<property name="maxPoolPreparedStatementPerConnectionSize" value="20" />
<!-- 是否缓存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" />
......
......@@ -20,6 +20,7 @@
<value>classpath:com/jw/app/business/store/share/storeShareDAO.xml</value>
<value>classpath:com/jw/app/business/store/user/storeUserDAO.xml</value>
<value>classpath:com/jw/app/business/userchoice/userchoiceDAO.xml</value>
<value>classpath:com/jw/app/business/calendar/calendarDAO.xml</value>
</list>
</property>
</bean>
......@@ -65,6 +66,10 @@
<property name="mapperInterface" value="com.jw.app.business.portal.content.ContentDAO"/>
<property name="sqlSessionFactory" ref="sqlSessionFactory-apps"/>
</bean>
<bean id="calendarDAO" class="org.mybatis.spring.mapper.MapperFactoryBean">
<property name="mapperInterface" value="com.jw.app.business.calendar.calendarDAO"/>
<property name="sqlSessionFactory" ref="sqlSessionFactory-apps"/>
</bean>
<!-- BusinessInterFace -->
<bean id="PortletBusiness"
class="com.jw.app.business.portlet.PortletBusinessImpl">
......@@ -106,6 +111,11 @@
<property name="userchoiceDAO" ref="userchoiceDAO"/>
</bean>
<bean id="CalendarBusiness"
class="com.jw.app.business.calendar.CalendarBusinessImpl">
<property name="calendarDAO" ref="calendarDAO"/>
</bean>
<!-- DAO -->
<bean id="portletDAO" class="org.mybatis.spring.mapper.MapperFactoryBean">
<property name="mapperInterface" value="com.jw.app.business.portlet.PortletDAO"/>
......
......@@ -3,7 +3,7 @@
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="/WEB-INF/tld/functions.tld" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ page language="java" import="java.util.Map,java.util.Date,java.text.SimpleDateFormat" pageEncoding="utf-8"%>
<%@ page language="java" import="java.util.Map" pageEncoding="utf-8"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%
String localPath = request.getContextPath();
......@@ -20,9 +20,9 @@
String emdepart = (String)sessionUser.get("EMDEPART");//用户单位ID
String emdepartname = (String)sessionUser.get("EMDEPARTNAME");//用户单位名称
String emname = (String)sessionUser.get("EMNAME");//用户姓名
Date beforetime = (Date)sessionUser.get("BEFORETIME");//上次登录时间
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String beforetime_s = formatter.format(beforetime);
String beforetime = (String)sessionUser.get("BEFORETIME");//上次登录时间
String beforetime_s = beforetime;
String loginip = (String)sessionUser.get("LOGINIP");//登录IP
//
%>
......
......@@ -339,4 +339,10 @@
}
.icon-ext-05_40 {
background:url('../../../../images/icons/(05,40).png') no-repeat left center;
}
.icon-ext-06_10 {
background:url('../../../../images/icons/(06,10).png') no-repeat left center;
}
.icon-ext-13_48 {
background:url('../../../../images/icons/(13,48).png') no-repeat left center;
}
\ No newline at end of file
......@@ -466,6 +466,17 @@ $(document).ready(function () {
// 点击记住密码
$("#remember").live('click', function() {
updateCookie();
if ($("#remember").attr('checked') != 'checked') {
$('#username').val('');
$('#password').val('');
$('.login_yzm>input').val('');
$('#username').next('label').remove();
$('#password').next('label').remove();
$('.login_yzm>input').next('label').remove();
init_login_tip($('#username'),'请输入账号');
init_login_tip($('#password'),'请输入密码');
init_login_tip($('.login_yzm>input'),'请输入验证码');
}
});
// 点击重置
$("#b_cancel").live('click', function() {
......
......@@ -465,6 +465,17 @@ $(document).ready(function () {
// 点击记住密码
$("#remember").live('click', function() {
updateCookie();
if ($("#remember").attr('checked') != 'checked') {
$('#username').val('');
$('#password').val('');
$('.login_yzm>input').val('');
$('#username').next('label').remove();
$('#password').next('label').remove();
$('.login_yzm>input').next('label').remove();
init_login_tip($('#username'),'请输入账号');
init_login_tip($('#password'),'请输入密码');
init_login_tip($('.login_yzm>input'),'请输入验证码');
}
});
// 点击重置
$("#b_cancel").live('click', function() {
......
......@@ -318,6 +318,17 @@ $(document).ready(function () {
// 点击记住密码
$("#remember").live('click', function() {
updateCookie();
if ($("#remember").attr('checked') != 'checked') {
$('#username').val('');
$('#password').val('');
$('.login_yzm>input').val('');
$('#username').next('label').remove();
$('#password').next('label').remove();
$('.login_yzm>input').next('label').remove();
init_login_tip($('#username'),'请输入账号');
init_login_tip($('#password'),'请输入密码');
init_login_tip($('.login_yzm>input'),'请输入验证码');
}
});
// 点击重置
$("#b_cancel").live('click', function() {
......
......@@ -996,6 +996,7 @@ a{
text-align: center;
padding-top:22px;
cursor: pointer;
padding-bottom: 25px;
}
.disk_content_header>div:first-child span{
margin:0 15px 0 5px;
......@@ -1017,6 +1018,7 @@ a{
border:1px solid transparent;
padding: 15px 15px 10px;
margin-bottom: 10px;
text-align: center;
}
.disk_content_lump>div>div:hover{
background:#F5FBFF;
......@@ -1036,8 +1038,7 @@ a{
cursor: pointer;
color:#2CA4F0;
}
.disk_content_lump img{
width:100%;
.disk_content_lump>div>div>img{
margin-bottom:10px;
}
.disk_content_lump img+div{
......@@ -1046,10 +1047,30 @@ a{
cursor: default;
height: 30px;
line-height: 30px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.disk_content_lump img+div+input{
height:30px;
}
.disk_content_lump_noFile{
margin-top:30px;
text-align: center;
}
.disk_content_lump_noFile>img+p{
margin:20px 0 30px;
}
.disk_content_lump_noFile span{
color:white;
background: #8ED3FF;
padding:5px 12px;
border-radius: 3px;
cursor: pointer;
}
.disk_content_lump_noFile span:hover{
background: #4eaeec;
}
/***************右键菜单样式*******************/
.disk_menu{
width: 128px;
......@@ -1091,6 +1112,7 @@ a{
}
.disk_content_list_fileName>div:first-child{
padding:0px;
text-align: center;
}
.disk_content_list_fileName>div:first-child+div>div:first-child{
height:34px;
......@@ -1141,6 +1163,35 @@ a{
font-size:16px;
margin-right:-1px;
}
.disk_move_search{
margin: 10px 5px 3px;
}
.disk_move_search>input{
outline:none;
border:1px solid #f2f2f2;
border-radius: 4px;
height: 30px;
line-height: 28px;
padding-left:6px;
color:#bbb;
width:70%;
}
.disk_move_search>span{
border:1px solid #f2f2f2;
height: 30px;
line-height: 28px;
color:#333;
display: inline-block;
width:25%;
margin-left:5%;
vertical-align: bottom;
text-align:center;
cursor: pointer;
border-radius: 4px;
}
.disk_move_search>span:hover{
background: #f3f3f3;
}
.disk_move_btn{
height:40px;
line-height:40px;
......@@ -1365,7 +1416,7 @@ a{
color:#333;
border-top: 1px solid #f3f0f0;
}
.disk_rubbishBtn,.disk_shareCodeBtn{
.disk_rubbishBtn,.disk_shareCodeBtn,.disk_enjoyBtn{
display: none;
}
.disk_createShare{
......
......@@ -6,6 +6,10 @@
<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 type="text/javascript" src="${pageContext.request.contextPath}/jwapp/pages/storepersonal/js/storePersonalModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/jwapp/pages/store/js/storeModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/jwapp/pages/storeshare/js/storeShareModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/jwapp/pages/user/js/jwAppUserModule.js" charset="utf-8"></script>
<script src="${ctx}/jfcas04/js/disk.js"></script>
</head>
<body>
......@@ -15,13 +19,13 @@
<!-- 内容部分 -->
<div class="disk_container container-fluid">
<div class="row disk_search">
<div class="col-md-3">
<div class="col-md-3" onclick="location.href='disk'"><img src="${ctx}/custom/images/disk_home.png" wdith="14" height="14" /><span>|</span></div>
<div class="col-md-3"><img src="${ctx}/custom/images/disk_last.png" wdith="14" height="14" /><span>|</span></div>
<div class="col-md-3"><img src="${ctx}/custom/images/disk_next.png" wdith="14" height="14" /><span>|</span></div>
<div id="disk_rubbish" class="col-md-3" onclick="disk_rubbish()"><img src="${ctx}/custom/images/disk_circle.png" wdith="14" height="14" /></div>
<div class="col-md-2">
<div class="col-md-6" onclick="location.href='disk'"><img src="${ctx}/custom/images/disk_home.png" wdith="14" height="14" /><span>|</span></div>
<%-- <div class="col-md-3" id="disk_backFolder_prev" onclick="disk_backFolder_prev(this)"><img src="${ctx}/custom/images/disk_last.png" wdith="14" height="14" /><span>|</span></div>
<div class="col-md-3" id="disk_backFolder_next" onclick="disk_backFolder_next(this)"><img src="${ctx}/custom/images/disk_next.png" wdith="14" height="14" /><span>|</span></div> --%>
<div id="disk_rubbish" class="col-md-6" onclick="disk_rubbish()"><img src="${ctx}/custom/images/disk_circle.png" wdith="14" height="14" /></div>
</div>
<div class="col-md-6">
<div class="col-md-7">
<div class="disk_search_center">
<a href="disk"><span class="glyphicon glyphicon-folder-close"></span><span>我的网盘</span><span class="glyphicon glyphicon-triangle-right"></span></a>
<!-- <a onclick="disk_backFolder(this)"><span class="glyphicon glyphicon-folder-close"></span><span>我的网盘</span><span class="glyphicon glyphicon-triangle-right"></span></a> -->
......@@ -49,6 +53,7 @@
<a class="disk_rubbishBtn disk_document_default" href="javascript:disk_reductionFolder()"><img src="/jfV5portal/custom/images/disk_return.png" width="16" height="16"><span>还原文件</span></a>
<a class="disk_rubbishBtn disk_document_default" href="javascript:disk_thoroughDeleteFolder()"><img src="/jfV5portal/custom/images/disk_thoroughDelete.png" width="16" height="16"><span>彻底删除</span></a>
<a class="disk_shareCodeBtn disk_document_default" href="javascript:disk_cancelShareCode()"><img src="/jfV5portal/custom/images/disk_cancelShare.png" width="14" height="14"><span>取消分享</span></a>
<a class="disk_enjoyBtn disk_document_default" href="javascript:disk_cancelEnjoy()"><img src="/jfV5portal/custom/images/disk_cancelShare.png" width="14" height="14"><span>取消共享</span></a>
</div>
<div class="col-md-1"><span onclick="disk_content_toggle(this)" class="disk_content_toggleBtn glyphicon glyphicon-th-large" title="切换到列表模式"></span></div>
</div>
......@@ -162,6 +167,7 @@
<li onclick="disk_downFolder(this)" class="disk_menu_clickBtn">下载</li>
<li onclick="disk_moveFolder(this)" class="disk_menu_clickBtn">移动到</li>
<li onclick="disk_enjoyFolder(this)" class="disk_menu_clickBtn">共享</li>
<li onclick="disk_cancelEnjoy(this)" class="disk_menu_clickBtn" style="display:none;">取消共享</li>
</ul>
</div>
......
......@@ -5,9 +5,10 @@
<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 type="text/javascript" src="${pageContext.request.contextPath}/jwapp/pages/apps/js/jwAppAppsModule.js" charset="utf-8"></script>
<script src="${ctx}/jfcas04/js/index.js"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/portlet/js/jwAppPortletModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/apps/js/jwAppAppsModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/calendar/js/calendarModule.js"></script>
<script type="text/javascript" src="${ctx}/jfcas04/js/index.js"></script>
</head>
<body>
<!-- 头部 -->
......
......@@ -1258,9 +1258,10 @@ function init_index_fullCalendar() {
/*eventLimit : true, // allow "more" link when too many events*/
//events : ctx+'/date.json'
events : function(start,end,timezone, callback) {
var result=jwAppPortletModel.jwAppsPortletDataAction.listCalendarInfo({
var result=calendarModule.data.listCalendarInfo({
FIELD_START_TIME:start._i,
FIELD_END_TIME:end._i
FIELD_END_TIME:end._i,
pageSize:999
});
var listData=result.rowSet;
var json=[];
......@@ -1438,7 +1439,7 @@ function index_removeDay() {
//删除日历的事件
$('#index_calendar').fullCalendar('removeEvents', $('#index_calendarId').val())
//删除数据库的数据
var result=jwAppPortletModel.jwAppsPortletActAction.removeCalendarInfo({
var result=calendarModule.act.removeCalendarInfo({
UUID:$('#index_calendarId').val()
});
if(result.NAME==3){
......@@ -1467,7 +1468,7 @@ function index_submitClick() {
jsonDate.FIELD_END_TIME = $('#index_calendarEnd').val();
jsonDate.FIELD_ALLDAY = $('#index_isAllDay').prop('checked')?1:0;
jsonDate.FIELD_COLOR = $('#index_calendarColor').val();
jwAppPortletModel.jwAppsPortletActAction.saveCalendarInfo(jsonDate);
calendarModule.act.saveCalendarInfo(jsonDate);
$('#index_calendar').fullCalendar('refetchEvents'); //重新获取所有事件数据
//保存到数据库
......
......@@ -320,6 +320,17 @@ $(document).ready(function () {
// 点击记住密码
$("#remember").live('click', function() {
updateCookie();
if ($("#remember").attr('checked') != 'checked') {
$('#username').val('');
$('#password').val('');
$('.login_yzm>input').val('');
$('#username').next('label').remove();
$('#password').next('label').remove();
$('.login_yzm>input').next('label').remove();
init_login_tip($('#username'),'请输入账号');
init_login_tip($('#password'),'请输入密码');
init_login_tip($('.login_yzm>input'),'请输入验证码');
}
});
// 点击重置
$("#b_cancel").live('click', function() {
......
......@@ -16,9 +16,9 @@ jwAppAppsModel.prototype.insert_installApp_byResourceId=function(){};
jwAppAppsModel.prototype.insert_unInstallApp_byResourceId=function(){};
//创建一个数据操作对象,然后再后续使用
jwAppAppsModel.jwAppsAppsActAction = new jwAppAppsModel("json").delegate("jwAppsAppstoreAct");
jwAppAppsModel.jwAppsAppsActAction = new jwAppAppsModel("json").delegate("frontAppstoreAct");
//创建一个数据获取对象,然后再后续使用
jwAppAppsModel.jwAppsAppsDataAction = new jwAppAppsModel("json").delegate("jwAppsAppstoreData");
jwAppAppsModel.jwAppsAppsDataAction = new jwAppAppsModel("json").delegate("frontAppstoreData");
//说明: 1、所有方法里统一传递josn格式的参数,用于后台交互,如data.listTables(param) ,如没有参数则传'{}',如data.listTables({})
// 2、前后台数据获取传输协议 如:json[{'0':{pageCount':'2','pageNo':'1','pageSize':'20','rowSet':'[{0},{1}....]'}}]
......
<%@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>
<!-- spectrum(颜色)的css -->
<link rel="stylesheet" type="text/css" href="${ctx}/lib/plug/jqueryColour/spectrum.css">
</div>
<table id="list" style="width: 100%; height: 100%;"></table>
<div id="tb">
<form id="calendarTab_searchForm" style="float:left">
<input id="FIELD_USER_ID" name="FIELD_USER_ID" type="hidden"/>
内容: <input id="FIELD_TITLE" name="FIELD_TITLE" type="text" style="width: 300px" >&nbsp;&nbsp;
从<input class="easyui-datetimebox" id="FIELD_START_TIME" name="FIELD_START_TIME" style="width:150px"/>&nbsp;
到 &nbsp;<input class="easyui-datetimebox" id="FIELD_END_TIME" name="FIELD_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-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>
<span id="calendarTab_changeperson"></span>
</div>
<div id="detail" style="overflow:auto;"></div>
<div id="userChoice" style="overflow:auto;"></div>
<!-- spectrum(颜色)的js -->
<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/calendar/js/calendarModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/calendar/js/calendarCompanyTab.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" 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 id="START_TIME" name="FIELD_START_TIME" style="width:300px" />
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable"><span>结束时间:</span></td>
<td style="width: 85%">
<input id="END_TIME" name="FIELD_END_TIME" style="width:300px" />
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable"><span>背景颜色:</span></td>
<td style="width: 85%">
<input id="COLOR" name="FIELD_COLOR" style="width:100px" />
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable"><span>是否全天:</span></td>
<td style="width: 85%">
<input class="easyui-textbox" id="ALLDAY" name="FIELD_ALLDAY" style="width:100px" />
</td>
</tr>
<tr>
</table>
</form>
\ No newline at end of file
<%@page contentType="text/html; charset=UTF-8"%>
<%@ include file="/gaowj/header-simple-1.0.jsp"%>
<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>
<!-- spectrum(颜色)的css -->
<link rel="stylesheet" type="text/css" href="${ctx}/lib/plug/jqueryColour/spectrum.css">
</div>
<table id="list" style="width: 100%; height: 100%;"></table>
<div id="tb">
<form id="calendarTab_searchForm" style="float:left">
<input id="FIELD_USER_ID" name="FIELD_USER_ID" type="hidden"/>
内容: <input id="FIELD_TITLE" name="FIELD_TITLE" type="text" style="width: 300px" >&nbsp;&nbsp;
从<input class="easyui-datetimebox" id="FIELD_START_TIME" name="FIELD_START_TIME" style="width:150px"/>&nbsp;
到 &nbsp;<input class="easyui-datetimebox" id="FIELD_END_TIME" name="FIELD_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-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>
<span id="calendarTab_changeperson"></span>
</div>
<div id="detail" style="overflow:auto;"></div>
<div id="userChoice" style="overflow:auto;"></div>
<!-- spectrum(颜色)的js -->
<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/calendar/js/calendarModule.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/jwapp/pages/calendar/js/calendarTab.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 id="START_TIME" name="FIELD_START_TIME" style="width:300px" />
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable"><span>结束时间:</span></td>
<td style="width: 85%">
<input id="END_TIME" name="FIELD_END_TIME" style="width:300px" />
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable"><span>背景颜色:</span></td>
<td style="width: 85%">
<input id="COLOR" name="FIELD_COLOR" style="width:100px" />
</td>
</tr>
<tr>
<td style="width: 15%;" class="tableStyleLable"><span>是否全天:</span></td>
<td style="width: 85%">
<input class="easyui-textbox" id="ALLDAY" name="FIELD_ALLDAY" style="width:100px" />
</td>
</tr>
<tr>
</table>
</form>
\ No newline at end of file
//此乃本模块与后台交互的方法接口部分
var calendarModule = function(format) {
this.module = "";
this.action = "";
this.format = format;
};
//定义数据交互
calendarModule.prototype = BusinessObject;
//获取当前登录人的日历信息
calendarModule.prototype.listCalendarInfo = function(){};
//保存当前登录人的日历信息
calendarModule.prototype.saveCalendarInfo = function(){};
//删除当前登录人的日历信息
calendarModule.prototype.removeCalendarInfo = function(){};
//获取公司日历信息
calendarModule.prototype.listCalendarCompanyInfo = function(){};
//保存公司日历信息
calendarModule.prototype.saveCalendarCompanyInfo = function(){};
//删除公司日历信息
calendarModule.prototype.removeCalendarCompanyInfo = function(){};
//创建一个数据操作对象,然后再后续使用
calendarModule.act = new calendarModule("json").delegate("calendarAct");
//创建一个数据获取对象,然后再后续使用
calendarModule.data = new calendarModule("json").delegate("calendarData");
//说明: 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':'保存失败'}}}]
......@@ -16,17 +16,11 @@ jwAppPortletModel.prototype.listAllPortletColumns = function(){};
jwAppPortletModel.prototype.listAllPTemplate = function(){};
//保存用户的资源列表
jwAppPortletModel.prototype.saveLayout = function(){};
//获取当前登录人的日历信息
jwAppPortletModel.prototype.listCalendarInfo = function(){};
//保存当前登录人的日历信息
jwAppPortletModel.prototype.saveCalendarInfo = function(){};
//删除当前登录人的日历信息
jwAppPortletModel.prototype.removeCalendarInfo = function(){};
//创建一个数据操作对象,然后再后续使用
jwAppPortletModel.jwAppsPortletActAction = new jwAppPortletModel("json").delegate("jwAppsPortletAct");
jwAppPortletModel.jwAppsPortletActAction = new jwAppPortletModel("json").delegate("frontPortletAct");
//创建一个数据获取对象,然后再后续使用
jwAppPortletModel.jwAppsPortletDataAction = new jwAppPortletModel("json").delegate("jwAppsPortletData");
jwAppPortletModel.jwAppsPortletDataAction = new jwAppPortletModel("json").delegate("frontPortletData");
//说明: 1、所有方法里统一传递josn格式的参数,用于后台交互,如data.listTables(param) ,如没有参数则传'{}',如data.listTables({})
// 2、前后台数据获取传输协议 如:json[{'0':{pageCount':'2','pageNo':'1','pageSize':'20','rowSet':'[{0},{1}....]'}}]
......
......@@ -3,6 +3,7 @@
<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="FATHER_PATH" id="FATHER_PATH" value="${is_row.UUID}"/>
<input type="hidden" name="OLD_FILE_NAME" id="OLD_FILE_NAME" value="${is_row.FILE_NAME}"/>
<table align="center" border="0" cellpadding="0" cellspacing="0" class="tableStyle" style="margin: 10px 15px; width: 95%; line-height: 30px;">
<tr>
<td class="tableStyleLable">
......
......@@ -26,7 +26,7 @@
/* .xcConfirm .popBox .txtBox{margin: 40px 100px; height: 100px; overflow: hidden;} */
.xcConfirm .popBox .txtBox{
margin: 30px 100px;
height: 57px;
height: 61px;
overflow: hidden;
margin-top: 40px;
}
......
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<div class="indedx_header">
<div onclick="location.href='interim'">
......@@ -9,10 +10,10 @@
<a href="javascript:void(0)" class="index_header_showMessage">
<img src="${ctx}/custom/images/index4_loginmessage.png" width="12" height="12" />登录信息
<ul>
<li><span>登录账号</span><span>test001</span></li>
<li><span>姓名</span><span>小周</span></li>
<li><span>登录时间</span><span>2018.02.22 12:24:38</span></li>
<li><span>上次时间</span><span>2017.02.22 12:24:38</span></li>
<li><span>登录账号</span><span><s:property value="#session.userInfo['EMID']"/></span></li>
<li><span>姓名</span><span><s:property value="#session.userInfo['EMNAME']"/></span></li>
<li><span>登录IP</span><span><s:property value="#session.userInfo['LOGINIP']"/></span></li>
<li><span>上次时间</span><span><s:property value="#session.userInfo['BEFORETIME']"/></span></li>
</ul>
</a><span>|</span>
<a href="#">
......
......@@ -6,30 +6,30 @@
<struts>
<package name="src_jwapp" extends="gaowj">
<!-- Portlet相关 -->
<action name="jwAppsPortletAct_*" class="com.jw.app.portlet.action.actAction"
<action name="frontPortletAct_*" class="com.jw.app.portlet.action.actAction"
method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="jwAppsPortletData_*" class="com.jw.app.portlet.action.dataAction"
<action name="frontPortletData_*" class="com.jw.app.portlet.action.dataAction"
method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="jwAppsPortletView_*" class="com.jw.app.portlet.action.viewAction"
<action name="frontPortletView_*" class="com.jw.app.portlet.action.viewAction"
method="{1}">
<result name="{1}">/jwapp/pages/portlet/{1}.jsp</result>
</action>
<!-- 集成应用相关 -->
<action name="jwAppsAppstoreAct_*" class="com.jw.app.apps.action.actAction"
<action name="frontAppstoreAct_*" class="com.jw.app.apps.action.actAction"
method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="jwAppsAppstoreData_*" class="com.jw.app.apps.action.dataAction"
<action name="frontAppstoreData_*" class="com.jw.app.apps.action.dataAction"
method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
......@@ -89,6 +89,23 @@
<action name="userchoiceView_*" class="com.jw.app.userchoice.action.viewAction" method="{1}">
<result name="{1}">/jwapp/pages/userchoice/{1}.jsp</result>
</action>
<!-- 日历相关 -->
<action name="calendarAct_*" class="com.jw.app.calendar.action.actAction"
method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="calendarData_*" class="com.jw.app.calendar.action.dataAction"
method="{1}">
<result name="json" type="json">
<param name="root">jsonObject</param>
</result>
</action>
<action name="calendarView_*" class="com.jw.app.calendar.action.viewAction"
method="{1}">
<result name="{1}">/jwapp/pages/calendar/{1}.jsp</result>
</action>
</package>
<package name="src_jwapp_store" extends="gaowj">
<action name="storeAct_*" class="com.jw.app.store.action.actAction"
......
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 CalendarBusiness {
Page<Map<String, Object>> list_calendar_by_user(int pageNo, int pageSize, Map<String, Object> query) throws BusinessException;
Map<String, Object> save_calendar(Map<String, Object> info) throws BusinessException;
void delete_calendar(String uuid) throws BusinessException;
Page<Map<String, Object>> list_calendar_by_company(int pageNo, int pageSize, Map<String, Object> query) throws BusinessException;
Map<String, Object> save_calendar_by_company(Map<String, Object> info) throws BusinessException;
void delete_calendar_company(String uuid) throws BusinessException;
}
......@@ -18,9 +18,4 @@ public interface PortletBusiness {
void saveLayout(String columnsId,List<Map<String, Object>> list) throws BusinessException ;
List<Map<String,Object>> list_calendar_by_user(Map<String, Object> query) throws BusinessException ;
Map<String,Object> save_calendar(Map<String, Object> info) throws BusinessException ;
void delete_calendar(String uuid) throws BusinessException ;
}
package com.jw.app.business.calendar;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.apache.ibatis.session.RowBounds;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
import com.gaowj.business.util.SessionUtil;
import com.jw.app.business.CalendarBusiness;
import com.jw.app.business.utils.DateTools;
public class CalendarBusinessImpl implements CalendarBusiness {
private calendarDAO calendarDAO;
public calendarDAO getCalendarDAO() {
return calendarDAO;
}
public void setCalendarDAO(calendarDAO calendarDAO) {
this.calendarDAO = calendarDAO;
}
@Override
public Page<Map<String, Object>> list_calendar_by_user(int pageNo, int pageSize, Map<String, Object> query) throws BusinessException {
if (query.get("START_TIME") != null) {
try {
query.put("START_TIME", new Date(Long.valueOf(query.get("START_TIME").toString())));
} catch (NumberFormatException e) {
try {
query.put("START_TIME", DateTools.strToDate(query.get("START_TIME").toString()));
} catch (ParseException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
}
if (query.get("END_TIME") != null) {
try {
query.put("END_TIME", new Date(Long.valueOf(query.get("END_TIME").toString())));
} catch (NumberFormatException e) {
try {
query.put("END_TIME", DateTools.strToDate(query.get("END_TIME").toString()));
} catch (ParseException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
}
if (query.get("TITLE") != null && !"".equals(query.get("TITLE"))) {
query.put("TITLE_LIKE", "%" + query.get("TITLE") + "%");
}
if (query.get("USER_ID") == null || "".equals(query.get("USER_ID"))) {
// 默认查询当前登陆人
query.put("USER_ID", SessionUtil.getEmid());
}
// 计算起始记录
int pageStart = (pageNo - 1) * pageSize;
List<Map<String, Object>> items = calendarDAO.list_calendar_by_user(new RowBounds(pageStart, pageSize), query);
int count = calendarDAO.list_count_calendar_by_user(query);
// 创建分页对象
Page<Map<String, Object>> page = new Page<Map<String, Object>>();
page.setStart(pageStart);
page.setLimit(pageSize);
page.setCount(count);
page.setItems(items);
return page;
}
@Override
public Map<String, Object> save_calendar(Map<String, Object> info) throws BusinessException {
if (info.get("UUID") == null || "".equals(info.get("UUID"))) {
// 表示新增
info.put("UUID", UUID.randomUUID().toString());
if (info.get("USER_ID") == null || "".equals(info.get("USER_ID"))) {
// 如果没有传USER_ID过来,则使用当前登录人id
info.put("USER_ID", SessionUtil.getEmid());
}
info.put("CREATE_USER", SessionUtil.getEmid());
info.put("CREATE_TIME", new Date());
info.put("UPDATE_USER", SessionUtil.getEmid());
info.put("UPDATE_TIME", new Date());
List<Map<String, Object>> listField = new ArrayList<Map<String, Object>>();
for (String k : info.keySet()) {
Map<String, Object> field = new HashMap<String, Object>();
field.put("key", k);
field.put("value", info.get(k));
listField.add(field);
}
info.put("list", listField);
calendarDAO.insert_calendar(info);
} else {
// 表示更新
info.put("UPDATE_USER", SessionUtil.getEmid());
info.put("UPDATE_TIME", new Date());
// 防止修改记录的所属人
info.remove("USER_ID");
List<Map<String, Object>> listField = new ArrayList<Map<String, Object>>();
for (String k : info.keySet()) {
if ("UUID".equals(k)) {
continue;
}
Map<String, Object> field = new HashMap<String, Object>();
field.put("key", k);
field.put("value", info.get(k));
listField.add(field);
}
info.put("list", listField);
calendarDAO.update_calendar(info);
}
return info;
}
@Override
public void delete_calendar(String uuid) throws BusinessException {
for (String u : uuid.split(",")) {
calendarDAO.delete_calendar(u);
}
}
@Override
public Page<Map<String, Object>> list_calendar_by_company(int pageNo, int pageSize, Map<String, Object> query) throws BusinessException {
if (query.get("START_TIME") != null) {
try {
query.put("START_TIME", new Date(Long.valueOf(query.get("START_TIME").toString())));
} catch (NumberFormatException e) {
try {
query.put("START_TIME", DateTools.strToDate(query.get("START_TIME").toString()));
} catch (ParseException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
}
if (query.get("END_TIME") != null) {
try {
query.put("END_TIME", new Date(Long.valueOf(query.get("END_TIME").toString())));
} catch (NumberFormatException e) {
try {
query.put("END_TIME", DateTools.strToDate(query.get("END_TIME").toString()));
} catch (ParseException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
}
if (query.get("TITLE") != null && !"".equals(query.get("TITLE"))) {
query.put("TITLE_LIKE", "%" + query.get("TITLE") + "%");
}
// 计算起始记录
int pageStart = (pageNo - 1) * pageSize;
List<Map<String, Object>> items = calendarDAO.list_calendar_by_company(new RowBounds(pageStart, pageSize), query);
int count = calendarDAO.list_count_calendar_by_company(query);
// 创建分页对象
Page<Map<String, Object>> page = new Page<Map<String, Object>>();
page.setStart(pageStart);
page.setLimit(pageSize);
page.setCount(count);
page.setItems(items);
return page;
}
@Override
public Map<String, Object> save_calendar_by_company(Map<String, Object> info) throws BusinessException {
if (info.get("UUID") == null || "".equals(info.get("UUID"))) {
// 表示新增
info.put("UUID", UUID.randomUUID().toString());
info.put("CREATE_USER", SessionUtil.getEmid());
info.put("CREATE_TIME", new Date());
info.put("UPDATE_USER", SessionUtil.getEmid());
info.put("UPDATE_TIME", new Date());
List<Map<String, Object>> listField = new ArrayList<Map<String, Object>>();
for (String k : info.keySet()) {
Map<String, Object> field = new HashMap<String, Object>();
field.put("key", k);
field.put("value", info.get(k));
listField.add(field);
}
info.put("list", listField);
calendarDAO.insert_calendar_by_company(info);
} else {
// 表示更新
info.put("UPDATE_USER", SessionUtil.getEmid());
info.put("UPDATE_TIME", new Date());
List<Map<String, Object>> listField = new ArrayList<Map<String, Object>>();
for (String k : info.keySet()) {
if ("UUID".equals(k)) {
continue;
}
Map<String, Object> field = new HashMap<String, Object>();
field.put("key", k);
field.put("value", info.get(k));
listField.add(field);
}
info.put("list", listField);
calendarDAO.update_calendar_by_company(info);
}
return info;
}
@Override
public void delete_calendar_company(String uuid) throws BusinessException {
for (String u : uuid.split(",")) {
calendarDAO.delete_calendar_by_company(u);
}
}
}
package com.jw.app.business.calendar;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import com.gaowj.business.exception.BusinessException;
public interface calendarDAO {
List<Map<String, Object>> list_calendar_by_user(Map<String, Object> query) throws BusinessException;
int list_count_calendar_by_user(Map<String, Object> query) throws BusinessException;
List<Map<String, Object>> list_calendar_by_user(RowBounds rowbounds, Map<String, Object> query) throws BusinessException;
void insert_calendar(Map<String, Object> info) throws BusinessException;
void update_calendar(Map<String, Object> info) throws BusinessException;
void delete_calendar(String uuid) throws BusinessException;
List<Map<String, Object>> list_calendar_by_company(Map<String, Object> query) throws BusinessException;
int list_count_calendar_by_company(Map<String, Object> query) throws BusinessException;
List<Map<String, Object>> list_calendar_by_company(RowBounds rowbounds, Map<String, Object> query) throws BusinessException;
void insert_calendar_by_company(Map<String, Object> info) throws BusinessException;
void update_calendar_by_company(Map<String, Object> info) throws BusinessException;
void delete_calendar_by_company(String uuid) throws BusinessException;
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jw.app.business.calendar.calendarDAO">
<sql id="where_user">
<where>
<trim prefixOverrides="AND |OR">
<if test="USER_ID != null and USER_ID != ''">
and t.USER_ID = #{USER_ID}
</if>
<if test="TITLE_LIKE != null and TITLE_LIKE != ''">
and t.TITLE LIKE #{TITLE_LIKE}
</if>
<!-- 开始时间或者结束时间,有一个在用户传进来的时间范围内就给予显示 -->
<if test="START_TIME != null and START_TIME != '' and END_TIME != null and END_TIME != ''">
<![CDATA[
and ((t.START_TIME >= #{START_TIME} and t.START_TIME <= #{END_TIME}) or (t.END_TIME >= #{START_TIME} and t.END_TIME <= #{END_TIME}))
]]>
</if>
<if test="START_TIME != null and START_TIME != '' and (END_TIME == null or END_TIME == '')">
<![CDATA[
and ((t.START_TIME >= #{START_TIME}) or (t.END_TIME >= #{START_TIME} ))
]]>
</if>
<if test="(END_TIME != null and END_TIME != '' and START_TIME == null or START_TIME == '')">
<![CDATA[
and ((t.START_TIME <= #{END_TIME}) or (t.END_TIME <= #{END_TIME}))
]]>
</if>
</trim>
</where>
</sql>
<sql id="where_company">
<where>
<trim prefixOverrides="AND |OR">
<if test="TITLE_LIKE != null and TITLE_LIKE != ''">
and t.TITLE LIKE #{TITLE_LIKE}
</if>
<!-- 开始时间或者结束时间,有一个在用户传进来的时间范围内就给予显示 -->
<if test="START_TIME != null and START_TIME != '' and END_TIME != null and END_TIME != ''">
<![CDATA[
and ((t.START_TIME >= #{START_TIME} and t.START_TIME <= #{END_TIME}) or (t.END_TIME >= #{START_TIME} and t.END_TIME <= #{END_TIME}))
]]>
</if>
<if test="START_TIME != null and START_TIME != '' and (END_TIME == null or END_TIME == '')">
<![CDATA[
and ((t.START_TIME >= #{START_TIME}) or (t.END_TIME >= #{START_TIME} ))
]]>
</if>
<if test="(END_TIME != null and END_TIME != '' and START_TIME == null or START_TIME == '')">
<![CDATA[
and ((t.START_TIME <= #{END_TIME}) or (t.END_TIME <= #{END_TIME}))
]]>
</if>
</trim>
</where>
</sql>
<select id="list_calendar_by_user" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[
select * from b_t_ufp_calendar t
]]>
<include refid="where_user" />
ORDER BY t.create_time DESC
</select>
<select id="list_count_calendar_by_user" parameterType="map" resultType="int">
<![CDATA[
select count(*) from b_t_ufp_calendar t
]]>
<include refid="where_user" />
ORDER BY t.create_time DESC
</select>
<insert id="insert_calendar" parameterType="java.util.List">
insert into b_t_ufp_calendar(
<trim prefix="" suffixOverrides=",">
<foreach collection="list" item="field">
${field.key},
</foreach>
</trim>
<![CDATA[ ) values( ]]>
<trim prefix="" suffixOverrides=",">
<foreach collection="list" item="field">
#{field.value},
</foreach>
</trim>
<![CDATA[ ) ]]>
</insert>
<update id="update_calendar" parameterType="java.util.List">
update b_t_ufp_calendar set
<trim prefix="" suffixOverrides=",">
<foreach collection="list" item="field">
${field.key}=#{field.value},
</foreach>
</trim>
where UUID=#{UUID}
</update>
<delete id="delete_calendar" parameterType="String">
delete from b_t_ufp_calendar where UUID=#{uuid}
</delete>
<select id="list_calendar_by_company" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[
select * from b_t_ufp_calendar_company t
]]>
<include refid="where_company" />
ORDER BY t.create_time DESC
</select>
<select id="list_count_calendar_by_company" parameterType="map" resultType="int">
<![CDATA[
select count(*) from b_t_ufp_calendar_company t
]]>
<include refid="where_company" />
ORDER BY t.create_time DESC
</select>
<insert id="insert_calendar_by_company" parameterType="java.util.List">
insert into b_t_ufp_calendar_company(
<trim prefix="" suffixOverrides=",">
<foreach collection="list" item="field">
${field.key},
</foreach>
</trim>
<![CDATA[ ) values( ]]>
<trim prefix="" suffixOverrides=",">
<foreach collection="list" item="field">
#{field.value},
</foreach>
</trim>
<![CDATA[ ) ]]>
</insert>
<update id="update_calendar_by_company" parameterType="java.util.List">
update b_t_ufp_calendar_company set
<trim prefix="" suffixOverrides=",">
<foreach collection="list" item="field">
${field.key}=#{field.value},
</foreach>
</trim>
where UUID=#{UUID}
</update>
<delete id="delete_calendar_by_company" parameterType="String">
delete from b_t_ufp_calendar_company where UUID=#{uuid}
</delete>
</mapper>
\ No newline at end of file
......@@ -191,58 +191,6 @@ public class PortletBusinessImpl implements PortletBusiness {
}
}
@Override
public List<Map<String,Object>> list_calendar_by_user(Map<String, Object> query) throws BusinessException{
query.put("START_TIME", new Date(Long.valueOf(query.get("START_TIME").toString())));
query.put("END_TIME", new Date(Long.valueOf(query.get("END_TIME").toString())));
return portletDAO.list_calendar_by_user(query);
}
@Override
public Map<String,Object> save_calendar(Map<String, Object> info) throws BusinessException {
if(info.get("UUID")==null||"".equals(info.get("UUID"))){
//表示新增
info.put("UUID", UUID.randomUUID().toString());
info.put("USER_ID", SessionUtil.getEmid());
info.put("CREATE_USER", SessionUtil.getEmid());
info.put("CREATE_TIME", new Date());
info.put("UPDATE_USER", SessionUtil.getEmid());
info.put("UPDATE_TIME", new Date());
List<Map<String,Object>> listField=new ArrayList<Map<String,Object>>();
for(String k:info.keySet()){
Map<String,Object> field=new HashMap<String, Object>();
field.put("key", k);
field.put("value", info.get(k));
listField.add(field);
}
info.put("list", listField);
portletDAO.insert_calendar(info);
}else{
//表示更新
info.put("UPDATE_USER", SessionUtil.getEmid());
info.put("UPDATE_TIME", new Date());
List<Map<String,Object>> listField=new ArrayList<Map<String,Object>>();
for(String k:info.keySet()){
if("UUID".equals(k)){
continue;
}
Map<String,Object> field=new HashMap<String, Object>();
field.put("key", k);
field.put("value", info.get(k));
listField.add(field);
}
info.put("list", listField);
portletDAO.update_calendar(info);
}
return info;
}
@Override
public void delete_calendar(String uuid) throws BusinessException {
portletDAO.delete_calendar(uuid);
}
private List<Map<String, Object>> mapToList(Map<String, Object> map) {
List<Map<String, Object>> entity = new ArrayList<Map<String, Object>>();
for (Map.Entry<String, Object> entry : map.entrySet()) {
......
......@@ -8,7 +8,6 @@ import org.apache.ibatis.session.RowBounds;
import com.gaowj.business.exception.BusinessException;
public interface PortletDAO {
List<Map<String,Object>> list_calendar_by_user(Map<String,Object> query) throws BusinessException ;
List<Map<String,Object>> list_portlet_template_user(Map<String,Object> query) throws BusinessException ;
......@@ -23,10 +22,4 @@ public interface PortletDAO {
void delete_portlet_template_user(Map<String,Object> query) throws BusinessException ;
void insert_portlet_template_user(List<Map<String,Object>> entity) throws BusinessException ;
void insert_calendar(Map<String,Object> info) throws BusinessException ;
void update_calendar(Map<String,Object> info) throws BusinessException ;
void delete_calendar(String uuid) throws BusinessException ;
}
......@@ -152,51 +152,4 @@
</trim>
<![CDATA[ ) ]]>
</insert>
<select id="list_calendar_by_user" parameterType="map"
resultType="upperCaseKeyMap">
<![CDATA[
select * from b_t_ufp_calendar t
]]>
<trim prefix="WHERE" prefixOverrides="AND |OR">
<if test="USER_ID != null and USER_ID != ''">
and t.USER_ID = #{USER_ID}
</if>
<!-- 开始时间或者结束时间,有一个在用户传进来的时间范围内就给予显示 -->
<![CDATA[
and ((t.START_TIME >= #{START_TIME} and t.START_TIME <= #{END_TIME}) or (t.END_TIME >= #{START_TIME} and t.END_TIME <= #{END_TIME}))
]]>
</trim>
ORDER BY t.create_time DESC
</select>
<insert id="insert_calendar" parameterType="java.util.List">
insert into b_t_ufp_calendar(
<trim prefix="" suffixOverrides=",">
<foreach collection="list" item="field">
${field.key},
</foreach>
</trim>
<![CDATA[ ) values( ]]>
<trim prefix="" suffixOverrides=",">
<foreach collection="list" item="field">
#{field.value},
</foreach>
</trim>
<![CDATA[ ) ]]>
</insert>
<update id="update_calendar" parameterType="java.util.List">
update b_t_ufp_calendar set
<trim prefix="" suffixOverrides=",">
<foreach collection="list" item="field">
${field.key}=#{field.value},
</foreach>
</trim>
where UUID=#{UUID}
</update>
<delete id="delete_calendar" parameterType="String">
delete from b_t_ufp_calendar where UUID=#{uuid}
</delete>
</mapper>
\ No newline at end of file
......@@ -27,9 +27,7 @@
</foreach>
</trim>
<where>
<if test="UUID != null and UUID != ''">
and UUID = #{UUID}
</if>
UUID = #{UUID}
</where>
</update>
......
package com.jw.app.calendar.action;
import java.util.Map;
import com.gaowj.business.action.BasicAction;
import com.gaowj.business.comp.BusinessManager;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.QueryParamUtil;
import com.gaowj.business.util.RequestUtils;
import com.jw.app.business.CalendarBusiness;
import com.jw.app.business.utils.Status;
import net.sf.json.JSONObject;
public class actAction extends BasicAction {
/**
*
*/
private static final long serialVersionUID = 124457626402410251L;
private JSONObject jsonObject = new JSONObject();
public JSONObject getJsonObject() {
return jsonObject;
}
public void setJsonObject(JSONObject jsonObject) {
this.jsonObject = jsonObject;
}
/**
* 保存日历信息
*
* @return
* @throws BusinessException
*/
public String saveCalendarInfo() throws BusinessException {
Map<String, Object> info = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
CalendarBusiness business = BusinessManager.getBusiness(CalendarBusiness.class);
try {
info = QueryParamUtil.StringToDate(info);
info.remove("OPETYPE");
business.save_calendar(info);
jsonObject.putAll(Status.getStatus(Status.UPDATE_OK));
} catch (Exception e) {
jsonObject.putAll(Status.getStatus(Status.UPDATE_ERR));
}
return "json";
}
/**
* 删除日历信息
*
* @return
* @throws BusinessException
*/
public String removeCalendarInfo() throws BusinessException {
CalendarBusiness business = BusinessManager.getBusiness(CalendarBusiness.class);
try {
business.delete_calendar(RequestUtils.getString(request, "UUID"));
jsonObject.putAll(Status.getStatus(Status.DELETE_OK));
} catch (Exception e) {
jsonObject.putAll(Status.getStatus(Status.DELETE_ERR));
}
return "json";
}
/**
* 保存公司日历信息
*
* @return
* @throws BusinessException
*/
public String saveCalendarCompanyInfo() throws BusinessException {
Map<String, Object> info = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
CalendarBusiness business = BusinessManager.getBusiness(CalendarBusiness.class);
try {
info = QueryParamUtil.StringToDate(info);
info.remove("OPETYPE");
business.save_calendar_by_company(info);
jsonObject.putAll(Status.getStatus(Status.UPDATE_OK));
} catch (Exception e) {
jsonObject.putAll(Status.getStatus(Status.UPDATE_ERR));
}
return "json";
}
/**
* 删除公司日历信息
*
* @return
* @throws BusinessException
*/
public String removeCalendarCompanyInfo() throws BusinessException {
CalendarBusiness business = BusinessManager.getBusiness(CalendarBusiness.class);
try {
business.delete_calendar_company(RequestUtils.getString(request, "UUID"));
jsonObject.putAll(Status.getStatus(Status.DELETE_OK));
} catch (Exception e) {
jsonObject.putAll(Status.getStatus(Status.DELETE_ERR));
}
return "json";
}
}
package com.jw.app.calendar.action;
import java.sql.SQLException;
import java.text.ParseException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.gaowj.business.action.BasicAction;
import com.gaowj.business.comp.BusinessManager;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.Page;
import com.gaowj.business.util.QueryParamUtil;
import com.gaowj.business.util.RequestUtils;
import com.jw.app.business.CalendarBusiness;
import net.sf.json.JSONObject;
public class dataAction extends BasicAction {
/**
*
*/
private static final long serialVersionUID = 1838735286131979745L;
private JSONObject jsonObject = new JSONObject();
private int rows = 20;// 每页显示的记录数
private int page = 1;// 当前第几页
public JSONObject getJsonObject() {
return jsonObject;
}
public void setJsonObject(JSONObject jsonObject) {
this.jsonObject = jsonObject;
}
public int getRows() {
rows = getPageSize();
return rows;
}
public void setRows(int rows) {
setPageSize(rows);
this.rows = getPageSize();
}
public int getPage() {
page = getPageNo();
return page;
}
public void setPage(int page) {
setPageNo(page);
this.page = getPageNo();
}
/**
* 获取日历信息列表
*
* @return
* @throws BusinessException
*/
public String listCalendarInfo() throws BusinessException {
CalendarBusiness business = BusinessManager.getBusiness(CalendarBusiness.class);
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
try {
query = QueryParamUtil.StringToDate(query);
Page<Map<String, Object>> pageData = business.list_calendar_by_user(pageNo,pageSize,query);
Map<String, Object> data = new HashMap<String, Object>();
data.put("rowSet", QueryParamUtil.DateTimeToString(pageData.getItems()));
data.put("pageNo", pageNo);
data.put("pageSize", pageSize);
data.put("pageCount", pageCount);
data.put("rows", data.get("rowSet"));
data.put("total", pageData.getCount());
jsonObject = new JSONObject();
jsonObject.putAll(data);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return "json";
}
/**
* 获取公司日历列表
*
* @return
* @throws BusinessException
*/
public String listCalendarCompanyInfo() throws BusinessException {
CalendarBusiness business = BusinessManager.getBusiness(CalendarBusiness.class);
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request, RequestUtils.UPDATEDATAFIELDPREFIX);
try {
query = QueryParamUtil.StringToDate(query);
Page<Map<String, Object>> pageData = business.list_calendar_by_company(pageNo,pageSize,query);
Map<String, Object> data = new HashMap<String, Object>();
data.put("rowSet", QueryParamUtil.DateTimeToString(pageData.getItems()));
data.put("pageNo", pageNo);
data.put("pageSize", pageSize);
data.put("pageCount", pageCount);
data.put("rows", data.get("rowSet"));
data.put("total", pageData.getCount());
jsonObject = new JSONObject();
jsonObject.putAll(data);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return "json";
}
}
package com.jw.app.calendar.action;
import com.gaowj.business.action.BasicAction;
import com.gaowj.business.exception.BusinessException;
public class viewAction extends BasicAction {
/**
*
*/
private static final long serialVersionUID = -6713122465589081789L;
public String calendarTab() throws BusinessException{
return "calendarTab";
}
public String calendarTabDetail() throws BusinessException{
return "calendarTabDetail";
}
public String calendarCompanyTab() throws BusinessException{
return "calendarCompanyTab";
}
public String calendarCompanyTabDetail() throws BusinessException{
return "calendarCompanyTabDetail";
}
}
......@@ -10,12 +10,10 @@ import com.gaowj.business.comp.BusinessManager;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.RequestUtils;
import com.jw.app.business.PortletBusiness;
import com.jw.app.business.utils.QueryParamUtil;
import com.jw.app.business.utils.Status;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import net.sf.json.util.JSONUtils;
public class actAction extends BasicAction {
......@@ -53,31 +51,4 @@ public class actAction extends BasicAction {
jsonObject.putAll(Status.getStatus(Status.UPDATE_OK));
return "json";
}
public String saveCalendarInfo() throws BusinessException{
Map<String, Object> info = RequestUtils.getUpdateFieldMap(request,
RequestUtils.UPDATEDATAFIELDPREFIX);
PortletBusiness business = BusinessManager.getBusiness(PortletBusiness.class);
try {
info = QueryParamUtil.StringToDate(info);
business.save_calendar(info);
jsonObject.putAll(Status.getStatus(Status.UPDATE_OK));
} catch (Exception e) {
jsonObject.putAll(Status.getStatus(Status.UPDATE_ERR));
}
return "json";
}
public String removeCalendarInfo() throws BusinessException{
PortletBusiness business = BusinessManager.getBusiness(PortletBusiness.class);
try {
business.delete_calendar(RequestUtils.getString(request, "UUID"));
jsonObject.putAll(Status.getStatus(Status.DELETE_OK));
} catch (Exception e) {
jsonObject.putAll(Status.getStatus(Status.DELETE_ERR));
}
return "json";
}
}
......@@ -172,46 +172,4 @@ public class dataAction extends BasicAction {
}
return "json";
}
/**
* 获取当前登录人的日历信息
* @return
* @throws BusinessException
*/
public String listCalendarInfo() throws BusinessException{
PortletBusiness business = BusinessManager
.getBusiness(PortletBusiness.class);
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request,
RequestUtils.UPDATEDATAFIELDPREFIX);
try {
query = QueryParamUtil.StringToDate(query);
//设置当前登陆人
query.put("USER_ID", SessionUtil.getEmid());
List<Map<String, Object>> listData = business
.list_calendar_by_user(query);
for (Map<String, Object> rm : listData) {
if(rm.get("P_TYPE")==null||!rm.get("P_TYPE").equals("3"))
{
rm.remove("RSS_CONTENT");
rm.remove("TAKE_CONTENT");
}
}
Map<String, Object> data = new HashMap<String, Object>();
data.put("rowSet", QueryParamUtil.DateTimeToString(listData));
data.put("pageNo", 1);
data.put("pageSize", listData.size());
data.put("pageCount", listData.size());
data.put("rows", data.get("rowSet"));
data.put("total", listData.size());
jsonObject = new JSONObject();
jsonObject.putAll(data);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return "json";
}
}
......@@ -71,6 +71,28 @@ public class actAction extends BasicAction {
//去除不要更新的字段
entity.remove("OPETYPE");
//处理目录/文件重名的问题,处理是直接在文件和目录后加数字
// Map<String,Object> v_congfu_query = new HashMap<String,Object>();
// v_congfu_query.put("FATHER_ID", entity.get("FATHER_ID"));
// v_congfu_query.put("CREATOR_ID", entity.get("CREATOR_ID"));
// String isfile_1 = (String) entity.get("ISFILE");
// if(StringUtils.equals(isfile_1, "1")){
// String fname = (String) entity.get("FILE_NAME");
// fname = fname.substring(0,fname.lastIndexOf("."));
// v_congfu_query.put("FILE_NAME",fname);
// }else{
// v_congfu_query.put("FILE_NAME", entity.get("FILE_NAME"));
// }
// int ret_count = business.listCount_storePersonal(v_congfu_query);
// if(ret_count>0){
// String fname = (String) entity.get("FILE_NAME");
// if(StringUtils.equals(isfile_1, "1")){
// fname = fname.substring(0,fname.lastIndexOf("."))+"("+ret_count+")."+fname.substring(fname.lastIndexOf(".")+1);
// }else{
// fname = fname + "("+ret_count+")";
// }
// entity.put("FILE_NAME",fname);
// }
//处理超限问题
StoreUserBusiness business_storeuser = BusinessManager.getBusiness(StoreUserBusiness.class);
Map<String,Object> storeuserQuery = new HashMap<String,Object>();
......@@ -205,7 +227,7 @@ public class actAction extends BasicAction {
}
}
//
jsonObject.putAll(Status.getStatusSuccessMessage("保存成功"));
jsonObject.putAll(Status.getStatusSuccessMessage("保存成功,"+entity.get("FILE_NAME")));
}
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("保存失败"));
......@@ -224,8 +246,33 @@ public class actAction extends BasicAction {
StorePersonalBusiness business = BusinessManager.getBusiness(StorePersonalBusiness.class);
Map<String, Object> entity = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
String father_path = request.getParameter("FATHER_PATH");
// String old_file_name = request.getParameter("OLD_FILE_NAME");
try {
// String is_fname = (String) entity.get("FILE_NAME");
// if(!StringUtils.equals(is_fname, old_file_name)){
// //处理目录/文件重名的问题,处理是直接在文件和目录后加数字
// Map<String,Object> v_congfu_query = new HashMap<String,Object>();
// v_congfu_query.put("FATHER_ID", entity.get("FATHER_ID"));
// v_congfu_query.put("CREATOR_ID", entity.get("CREATOR_ID"));
// String isfile_1 = (String) entity.get("ISFILE");
// if(StringUtils.equals(isfile_1, "1")){
// String fname = (String) entity.get("FILE_NAME");
// fname = fname.substring(0,fname.lastIndexOf("."));
// v_congfu_query.put("FILE_NAME",fname);
// }else{
// v_congfu_query.put("FILE_NAME", entity.get("FILE_NAME"));
// }
// int ret_count = business.listCount_storePersonal(v_congfu_query);
// if(ret_count>0){
// String fname = (String) entity.get("FILE_NAME");
// if(StringUtils.equals(isfile_1, "1")){
// fname = fname.substring(0,fname.lastIndexOf("."))+"("+ret_count+")."+fname.substring(fname.lastIndexOf(".")+1);
// }else{
// fname = fname + "("+ret_count+")";
// }
// entity.put("FILE_NAME",fname);
// }
// }
//去除不要更新的字段
entity.remove("OPETYPE");
boolean is_save2db = Boolean.parseBoolean(PropUtil.getValue("uploadfile_savetodb", "quartz_service", "true"));
......@@ -325,7 +372,7 @@ public class actAction extends BasicAction {
}
}
//
jsonObject.putAll(Status.getStatusSuccessMessage("修改成功"));
jsonObject.putAll(Status.getStatusSuccessMessage("修改成功,"+entity.get("FILE_NAME")));
} catch (Exception e) {
jsonObject.putAll(Status.getStatusErrorMessage("修改失败"));
e.printStackTrace();
......
package com.gaowj.system.login;
import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.jasig.cas.client.authentication.AttributePrincipal;
......@@ -36,29 +38,36 @@ public class CasAction extends BasicAction {
Map<String,Object> query = new HashMap<String,Object>();
query.put("EMID", username);
Map<String,Object> userInfoI = systemOpeBusiness.listLoginUserInfo(query).get(0);
Map<String,Object> sessionUser = new HashMap<String,Object>();
String u_all_m = systemOpeBusiness.getUserAllModule(userInfoI.get("CODE").toString());
sessionUser.put("CODE",userInfoI.get("CODE"));
sessionUser.put("EMID",userInfoI.get("EMID"));
sessionUser.put("EMSEX",userInfoI.get("EMSEX"));
sessionUser.put("EMDEPARTNAME",userInfoI.get("EMDEPARTNAME"));
sessionUser.put("EMDEPART",userInfoI.get("EMDEPART"));
sessionUser.put("EMNAME",userInfoI.get("EMNAME"));
sessionUser.put("BEFORETIME",userInfoI.get("BEFORETIME"));
sessionUser.put("SESSIONID", request.getSession().getId());
sessionUser.put("CURRENTTIME", jt.now_datetime());
sessionUser.put("LOGINIP", request.getRemoteAddr());
sessionUser.put("SERVERIP", request.getLocalAddr());
sessionUser.put("QUANXIAN",u_all_m);
request.getSession().setAttribute("userInfo", sessionUser);
//增加登陆日志
Map<String,Object> log = new HashMap<String,Object>();
log.put("CODE", sessionUser.get("CODE"));log.put("EMNAME", sessionUser.get("EMNAME"));log.put("EMIP", sessionUser.get("LOGINIP"));
log.put("OPENAME", "登陆");log.put("OPETIME", jt.String3date((String)sessionUser.get("CURRENTTIME")));log.put("TYPE", userInfoI.get("TYPE"));
log.put("OPETYPE", "B/S登陆");
systemOpeBusiness.insert_log(log);
Map<String,Object> userInfoI = null;
List<Map<String,Object>> listUser = systemOpeBusiness.listLoginUserInfo(query);
if(listUser.size()>0){
userInfoI = systemOpeBusiness.listLoginUserInfo(query).get(0);
Map<String,Object> sessionUser = new HashMap<String,Object>();
String u_all_m = systemOpeBusiness.getUserAllModule(userInfoI.get("CODE").toString());
sessionUser.put("CODE",userInfoI.get("CODE"));
sessionUser.put("EMID",userInfoI.get("EMID"));
sessionUser.put("EMSEX",userInfoI.get("EMSEX"));
sessionUser.put("EMDEPARTNAME",userInfoI.get("EMDEPARTNAME"));
sessionUser.put("EMDEPART",userInfoI.get("EMDEPART"));
sessionUser.put("EMNAME",userInfoI.get("EMNAME"));
sessionUser.put("BEFORETIME",userInfoI.get("BEFORETIME"));
sessionUser.put("BEFORETIME", jt.date3string((Date)userInfoI.get("BEFORETIME")));
sessionUser.put("SESSIONID", request.getSession().getId());
sessionUser.put("CURRENTTIME", jt.now_datetime());
sessionUser.put("LOGINIP", request.getRemoteAddr());
sessionUser.put("SERVERIP", request.getLocalAddr());
sessionUser.put("QUANXIAN",u_all_m);
sessionUser.put("SESSIONUSER", request.getSession());
request.getSession().setAttribute("userInfo", sessionUser);
//增加登陆日志
Map<String,Object> log = new HashMap<String,Object>();
log.put("CODE", sessionUser.get("CODE"));log.put("EMNAME", sessionUser.get("EMNAME"));log.put("EMIP", sessionUser.get("LOGINIP"));
log.put("OPENAME", "登陆");log.put("OPETIME", jt.String3date((String)sessionUser.get("CURRENTTIME")));log.put("TYPE", userInfoI.get("TYPE"));
log.put("OPETYPE", "B/S登陆");
systemOpeBusiness.insert_log(log);
}
}
String strRedirecturl = request.getParameter("redirectUrl");
String toUrl = "";
......
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