Commit 3d191322 by 罗绍泽

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

parents 9d8a08a6 2df712a3
......@@ -6,7 +6,7 @@
<classpathentry kind="src" path="src_utils"/>
<classpathentry kind="src" path="src_jwapp"/>
<classpathentry kind="src" path="src_standard"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.6.0_33"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre6"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/tomcat60"/>
<classpathentry kind="output" path="build/classes"/>
......
eclipse.preferences.version=1
validator.Checked=WebContent,src/struts-ext.xml,src/struts-system.xml
validator.Unchecked=
validator.Checked=/
validator.Unchecked=src_test/com/gaowj/business/StudentBusiness.java
......@@ -204,7 +204,18 @@ $.extend({
str += arr[pos];
}
return str;
},
/**
* 计算两个时间值的差值如2018-8-16 2018-8-17 相差一天
*/
countTime:function(start,end){
var start_list = start.split('-');
var end_list = end.split('-');
var date1=new Date(start_list[0],start_list[1],start_list[2]);
var date2=new Date(end_list[0],end_list[1],end_list[2]);
var date=(date2.getTime()-date1.getTime())/(1000*60*60*24);/*不用考虑闰年否*/
return date;
}
//
//
}
});
\ No newline at end of file
.webuploader-container {
position: relative;
}
.webuploader-element-invisible {
position: absolute !important;
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
clip: rect(1px,1px,1px,1px);
}
.webuploader-pick {
position: relative;
display: inline-block;
cursor: pointer;
background: #00b7ee;
padding: 10px 15px;
color: #fff;
text-align: center;
border-radius: 3px;
overflow: hidden;
}
.webuploader-pick-hover {
background: #00a2d4;
}
.webuploader-pick-disable {
opacity: 0.6;
pointer-events:none;
}
.webupload_startBtn{
background:red;
border:1px solid green;
cursor:pointer;
}
.webupload_stopBtn{
border:1px solid red;
background:skyblue;
cursor:pointer;
}
.webupload_fileList{
}
.webupload_fileDiv{
float:left;
margin:10px;
position:relative;
}
.webupload_closeImg{
position:absolute;
right:0px;
top:0px;
src:images/demo_x.png;
width:20px
}
.webupload_progress{
position:relative;
width:100%;
height:20px;
}
.webupload_progress>div{
position:absolute;
width:100%;
height:20px;
}
.webupload_progress>p{
position:absolute;
height:20px;
}
.webupload_progress>span{
position:absolute;
line-height:20px;
width:100%;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1128,7 +1128,10 @@ a{
margin-top:5px;
}
.disk_table_height .fixed-table-container{
height:672px;
min-height:672px;
}
.disk_table_height .fixed-table-body{
height:auto;
}
/****************************网盘列表的样式****************/
.disk_table .fixed-table-container input[type="radio"],.disk_table .fixed-table-container input[type="checkbox"] {
......@@ -1148,7 +1151,7 @@ a{
}
.disk_move_title>span:first-child{
display: inline-block;
/* width: 345px; */
width: 70%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
......@@ -1372,7 +1375,8 @@ a{
}
.disk_upload_right_content>div>div:first-child+div>span:first-child{
display: inline-block;
width:45px;
/* width:45px; */
width:109px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
......@@ -1405,8 +1409,8 @@ a{
background:#3AA2E0;
}
.disk_upload_right_content>div>div:first-child+div>.glyphicon-ok{
margin-left:50px;
display: none;
/* margin-left:50px; */
visibility:hidden;
background:#3AA2E0;
cursor: default;
}
......@@ -1518,6 +1522,7 @@ a{
margin-left:-200px;
background:white;
border-radius: 5px;
z-index: 2;
}
.share_cotainer_header{
height:75px;
......@@ -1568,7 +1573,8 @@ a{
position:absolute;
bottom:0;
height:300px;
width:100%;
left: 0;
right: 0;
}
.shareDetail_container{
background: white;
......
......@@ -44,7 +44,7 @@
<div class="col-md-12 disk_content_header">
<div class="col-md-11">
<a href="javascript:disk_uploadFolder()"><img src="${ctx}/custom/images/disk_upload.png" width="16" height="16" /><span>上传文件</span></a>
<a class="disk_document_default" href="javascript:disk_downFolder()"><img src="${ctx}/custom/images/disk_xiazai.png" width="16" height="16" /><span>下载文件</span></a>
<a class="disk_document_default" href="javascript:disk_enjoyFolder()"><img src="${ctx}/custom/images/disk_gongxiang.png" width="16" height="16" /><span>共享文件</span></a>
<a href="javascript:disk_addFolder()"><img src="${ctx}/custom/images/disk_add.png" width="16" height="16" /><span>新建文件夹</span></a>
<a class="disk_document_default" href="javascript:disk_deleteFolder()"><img src="${ctx}/custom/images/disk_delete.png" width="16" height="16" /><span>删除</span></a>
<a class="disk_document_default" href="javascript:disk_shareFolder()"><img src="${ctx}/custom/images/disk_share.png" width="16" height="16" /><span>分享</span></a>
......
......@@ -22,6 +22,7 @@
<link href='${ctx}/lib/plug/fullcalendar/fullcalendar.min.css' rel='stylesheet' />
<link href='${ctx}/lib/plug/fullcalendar/fullcalendar.print.min.css' rel='stylesheet' media='print' />
<link rel="stylesheet" href="${ctx}/lib/plug/jquery-easyui-1.5.3/themes/icon.css" type="text/css"></link>
<link rel="stylesheet" href="${ctx}/custom/plug/webupload/css/webuploader.css" type="text/css"></link>
<script type="text/javascript" src="${ctx}/lib/js/jquery-1.11.1.min.js"></script>
......@@ -64,6 +65,8 @@
<!-- bootstrap-table的js -->
<script src="${ctx}/lib/plug/bootstrap-table-master/src/bootstrap-table.js"></script>
<script src="${ctx}/lib/plug/bootstrap-table-master/src/locale/bootstrap-table-zh-CN.js"></script>
<script src="${ctx}/custom/plug/webupload/js/webuploader.js"></script>
<script src="${ctx}/custom/plug/webupload/js/webuploaderExtend.js"></script>
<script type="text/javascript">
var ctx='${pageContext.request.contextPath}';
......
<%@ 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}"/>
<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 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/storepartook/js/storePartookModule.js" charset="utf-8"></script>
<script src="${ctx}/jfcas04/js/share.js"></script>
</head>
<body style="width:100%;background:#E8F6FF">
<!-- 头部 -->
<div class="share_cotainer">
<div class="share_cotainer_header">
<img src="${ctx}/custom/images/share_user.png" width="44" height="44"/><span>薛博文</span><span>向你分享了文件</span>
<body style="width:100%;background:#E8F6FF;padding:30px;"><!-- background:#EDF1F5; -->
<input type="hidden" value= "${IS_CHECK}" id="session_code"/>
<input type="hidden" value="<s:property value="#session.userInfo['EMID']"/>" id="session_user" />
<!-- 输入分享密码 -->
<div class="share_cotainer_div">
<!-- 头部 -->
<div class="share_cotainer">
<div class="share_cotainer_header">
<img width="44" height="44"/><span></span><span>向你分享了文件</span>
</div>
<div class="share_cotainer_code">
<div>请输入分享密码 : </div>
<div><input type="text" class="form-control" id="partook_pass" /></div>
<div onclick="share_sendCode(this)">提交分享密码</div>
</div>
<div style="text-align: center;margin-bottom: 0px;display: none;" class="alert alert-danger" role="alert">
<a href="#" class="alert-link">分享码已过期</a>
</div>
</div>
<div class="share_cotainer_code">
<div>请输入分享码 : </div>
<div><input type="text" class="form-control"/></div>
<div onclick="share_sendCode(this)">提交分享码</div>
</div>
<div style="text-align: center;margin-bottom: 0px;display: none;" class="alert alert-danger" role="alert">
<a href="#" class="alert-link">分享码已过期</a>
<div class="share_clound" style="background:url(${ctx}/custom/images/share_bg.png);"></div>
</div>
<!-- 详情 -->
<div style="display:none" class="shareDetail_container_div">
<div class="shareDetail_container">
<div class="shareDetail_container_header">
<img src="${ctx}/custom/images/disk_rar.png" width="26" height="26" />
<label>新建文件夹等</label>
<!-- <span onclick="shareDetail_downLoad()"><i class="glyphicon glyphicon-download-alt"></i>下载</span> -->
<span style="display:none;" onclick="shareDetail_cancelShare()" class="shareDetail_cancelShare"><i class="glyphicon glyphicon-ban-circle"></i>取消分享</span>
</div>
<div class="shareDetail_container_time">
<span class="glyphicon glyphicon-time"></span><span><!-- 2018-07-06 10:14 --></span><span><!-- 失效时间 : 永久有效 --></span>
</div>
<div class="shareDetail_container_mulu">
<label>全部文件</label>
<!-- <span>返回上一级</span>
<span class="shareDetail_container_mulu_shuxian">|</span>
<span>全部文件</span>
<span class="shareDetail_container_mulu_shuxian">></span>
<span>新建文件夹</span> -->
</div>
<div class="disk_table shareDetail_table">
<table id="shareDetail_list"></table>
</div>
</div>
</div>
<div class="share_clound" style="background:url(${ctx}/custom/images/share_bg.png);"></div>
<!-- 下载 -->
<div id="disk_upload" style="display:none;"></div>
</body>
</html>
......@@ -1470,7 +1470,7 @@ function ajaxFileUpload(up_type,up_act,uuid)
fileElementId:'userFile',//文件上传空间的id属性 <input type="file" id="file" name="file" />
dataType: 'json',//返回值类型 一般设置为json
success: function (data, status){//服务器成功响应处理函数
if(data.message.file!='undefined'){
if(data.message.file!='undefined'){
if(data.message.file == '-1'){
$.messager.alert('提示',"文件上传失败,大小超出"+up_maxsize+"!",'error');
return false;
......
......@@ -23,6 +23,10 @@ storePartookModule.prototype.deleteTrueStorePartook = function(){};
storePartookModule.prototype.list = function(){};
//附件所有数据
storePartookModule.prototype.listAll = function(){};
//验证分享码是否对
storePartookModule.prototype.check = function(){};
//获取分享的数据
storePartookModule.prototype.listAllShare = function(){};
//创建一个数据操作对象,然后再后续使用
storePartookModule.storePartookActAction = new storePartookModule("json").delegate("storePartookAct");
......
......@@ -79,6 +79,12 @@
<if test="PARTOOK_PASS != null and PARTOOK_PASS != ''">
and f.PARTOOK_PASS like concat('%',#{PARTOOK_PASS},'%')
</if>
<if test="PARTOOK_CODE_EQUAL != null and PARTOOK_CODE_EQUAL != ''">
and f.PARTOOK_CODE = #{PARTOOK_CODE_EQUAL}
</if>
<if test="PARTOOK_PASS_EQUAL != null and PARTOOK_PASS_EQUAL != ''">
and f.PARTOOK_PASS = #{PARTOOK_PASS_EQUAL}
</if>
<if test="FX_START_TIME != null and FX_START_TIME != ''">
and f.PARTOOK_TIME &gt;= #{FX_START_TIME}
</if>
......
......@@ -2,6 +2,7 @@ package com.jw.app.portlet.action;
import com.gaowj.business.action.BasicAction;
import com.gaowj.business.exception.BusinessException;
import com.gaowj.business.util.RequestUtils;
public class viewAction extends BasicAction {
......@@ -46,6 +47,7 @@ public class viewAction extends BasicAction {
}
public String share() throws BusinessException {
request.setAttribute("IS_CHECK",request.getSession().getAttribute(RequestUtils.getString(request, "code")));
return "share";
}
......
......@@ -6,8 +6,6 @@ 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;
......@@ -16,6 +14,8 @@ import com.gaowj.business.util.QueryParamUtil;
import com.gaowj.business.util.RequestUtils;
import com.jw.app.business.StorePartookBusiness;
import net.sf.json.JSONObject;
public class dataAction extends BasicAction {
/**
......@@ -124,4 +124,83 @@ public class dataAction extends BasicAction {
}
return "json";
}
//验证分享码是否对
public String check() throws BusinessException {
StorePartookBusiness business = BusinessManager.getBusiness(StorePartookBusiness.class);
try {
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
List<Map<String, Object>> listData = business.list_partook(query);
jsonObject = new JSONObject();
//添加一个session,来区别已经验证好的
if(listData.size()>0){
request.getSession().setAttribute(query.get("PARTOOK_CODE_EQUAL").toString(),true);
}
//把密码去掉
//去掉密码
for(Map<String, Object> map : listData){
map.remove("PARTOOK_PASS");
}
//把获取的数据返回到前台
int listDataCount = listData.size();
Map<String, Object> data = new HashMap<String, Object>();
data.put("rowSet", QueryParamUtil.DateToString(listData));
data.put("pageNo", 1);
data.put("pageSize", listDataCount);
data.put("pageCount", listDataCount);
data.put("rows", data.get("rowSet"));
data.put("total", listDataCount);
jsonObject.put("data",data);
jsonObject.put("result", listData.size()>0);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return "json";
}
//获取发分享文件的信息列表
public String listAllShare() throws BusinessException {
StorePartookBusiness business = BusinessManager.getBusiness(StorePartookBusiness.class);
try {
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request,RequestUtils.UPDATEDATAFIELDPREFIX);
query = QueryParamUtil.StringToDate(query);
//批处理UUID,MAINDATA_ID和MODULE_ID
if(query.get("UUID")!=null && query.get("UUID").toString().indexOf(",")>-1){
query.put("UUIDLIST", QueryParamUtil.StringToList(query.get("UUID").toString()));
query.remove("UUID");
}
//
List<Map<String, Object>> listData = business.list_partook(query);
//去掉密码
for(Map<String, Object> map : listData){
if("666666".equals(map.get("PARTOOK_PASS"))){
map.put("IS_PWD", "false");
}
else{
map.put("IS_PWD", "true");
}
map.remove("PARTOOK_PASS");
}
int listDataCount = listData.size();
Map<String, Object> data = new HashMap<String, Object>();
data.put("rowSet", QueryParamUtil.DateToString(listData));
data.put("pageNo", 1);
data.put("pageSize", listDataCount);
data.put("pageCount", listDataCount);
data.put("rows", data.get("rowSet"));
data.put("total", listDataCount);
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";
}
}
......@@ -12,6 +12,8 @@ import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -40,6 +42,7 @@ import com.jw.app.business.StorePartookBusiness;
import com.jw.app.business.StorePersonalBusiness;
import com.jw.app.business.StoreShareBusiness;
import com.jw.app.business.StoreUserBusiness;
import com.sun.tools.ws.processor.model.Request;
public class actAction extends BasicAction {
/**
......@@ -725,15 +728,51 @@ public class actAction extends BasicAction {
entity.remove("OPETYPE");
String file_uuid = (String) entity.get("CODE");
String fx_pass = (String) entity.get("PARTOOK_PASS");
String fx_code = java.util.UUID.randomUUID().toString();
String fx_code = (String) entity.get("PARTOOK_CODE");
//处理时间的有效性
int fx_time = Integer.parseInt(request.getParameter("LIMIT_TIME"));
if(StringUtils.isNotEmpty(file_uuid) && StringUtils.isNotEmpty(fx_pass)){
//先判断下文件是否已经分享过了,如果分享过了,则这次分享操作不执行
Boolean shareFlag = false ;
for(String fileid:file_uuid.split(",")){
Map<String,Object> iData = new HashMap<String,Object>();
iData.put("FILE_UUID", fileid);
int listOldCount = business.listCount_partook(iData);
if(listOldCount==0){
if(listOldCount!=0){
shareFlag = true;
break;
}
}
if(shareFlag==false){
for(String fileid:file_uuid.split(",")){
Map<String,Object> iData = new HashMap<String,Object>();
iData.put("FILE_UUID", fileid);
iData.put("PARTOOK_CODE", fx_code);
iData.put("PARTOOK_PASS", fx_pass);
//处理失效时间
Date date = new Date();
Date limit_date = new Date();
Calendar calendar = new GregorianCalendar();
calendar.setTime(date);
switch (fx_time) {
//0或者默认表示永久,1表示7天,2表示一天
case 1:
calendar.add(calendar.DATE,7);//把日期往后增加一天.整数往后推,负数往前移动
limit_date=calendar.getTime();
break;
case 2:
calendar.add(calendar.DATE,1);//把日期往后增加一天.整数往后推,负数往前移动
limit_date=calendar.getTime();
break;
default:
break;
}
iData.put("CREATE_TIME", date);
iData.put("PARTOOK_TIME", limit_date);
//新增
business.insert_partook(iData);
// 操作日志
......@@ -741,10 +780,13 @@ public class actAction extends BasicAction {
sysbusiness.insert_logBusiness("partookStorePersonal", "" + entity,
"增加个人文件分享", (String) entity.get("UUID"), (String) entity
.get("FILE_NAME"), "storePersonal");
//
//
}
jsonObject.putAll(Status.getStatusSuccessMessage("分享成功"));
}
else{
jsonObject.putAll(Status.getStatusSuccessMessage("存在已经分享过的文件/文件夹"));
}
jsonObject.putAll(Status.getStatusSuccessMessage("分享成功"));
}else{
jsonObject.putAll(Status.getStatusSuccessMessage("分享失败,参数不全"));
}
......
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