时间排序,文件下发删除,

master
20918 10 months ago
parent 42d5a37be8
commit 1a36258039

@ -1,5 +1,6 @@
package com.ruoyi.web.controller.system.filemanager; package com.ruoyi.web.controller.system.filemanager;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.ruoyi.common.core.domain.entity.SysDept; import com.ruoyi.common.core.domain.entity.SysDept;
@ -153,8 +154,20 @@ public class TdFileProvideController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult remove(String ids) public AjaxResult remove(String ids)
{ {
List<TdFileReceive> tdFileReceives = tdFileReceiveService.selectTdFileReceiveByFileId(ids);
List<String> statesList = new ArrayList<>();
for (TdFileReceive tdFileReceive : tdFileReceives) {
statesList.add(tdFileReceive.getReceiveState());
}
if (statesList.contains("1")){
return AjaxResult.error("下发的已被接收文件不能删除");
}else {
for (TdFileReceive tdFileReceive : tdFileReceives){
tdFileReceiveService.deleteTdFileReceiveByReceiveId(tdFileReceive.getReceiveId());
}
return toAjax(tdFileProvideService.deleteTdFileProvideByFileIds(ids)); return toAjax(tdFileProvideService.deleteTdFileProvideByFileIds(ids));
} }
}
/** /**
* *

@ -42,9 +42,6 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:fileprovide:add"> <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:fileprovide:add">
<i class="fa fa-plus"></i> 添加 <i class="fa fa-plus"></i> 添加
</a> </a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:fileprovide:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:fileprovide:export"> <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:fileprovide:export">
<i class="fa fa-download"></i> 导出 <i class="fa fa-download"></i> 导出
</a> </a>

@ -64,6 +64,7 @@
<script th:inline="javascript"> <script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:leave:edit')}]]; var editFlag = [[${@permission.hasPermi('system:leave:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:leave:remove')}]]; var removeFlag = [[${@permission.hasPermi('system:leave:remove')}]];
var PrintFlag = [[${@permission.hasPermi('system:leave:print')}]];
var downloadFlag = [[${@permission.hasPermi('system:leave:examine')}]]; var downloadFlag = [[${@permission.hasPermi('system:leave:examine')}]];
var examinestateDatas = [[${@dict.getType('sys_examine_state')}]]; var examinestateDatas = [[${@dict.getType('sys_examine_state')}]];
var leavestateData = [[${@dict.getType('sys_user_leave')}]]; var leavestateData = [[${@dict.getType('sys_user_leave')}]];
@ -146,8 +147,8 @@
formatter: function(value, row, index) { formatter: function(value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="leaveAuditing(\'' + row.id + '\')"><i class="fa fa-edit"></i>审核</a> '); actions.push('<a class="btn btn-success btn-xs ' + downloadFlag + '" href="javascript:void(0)" onclick="leaveAuditing(\'' + row.id + '\')"><i class="fa fa-edit"></i>审核</a> ');
actions.push('<a class="btn btn-success btn-xs ' + downloadFlag + '" href="javascript:void(0)" onclick="auditingPrint(\'' + row.id + '/' + row.userId + '\')"><i class="fa fa-download"></i>打印</a> '); actions.push('<a class="btn btn-success btn-xs ' + PrintFlag + '" href="javascript:void(0)" onclick="auditingPrint(\'' + row.id + '/' + row.userId + '\')"><i class="fa fa-download"></i>打印</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join(''); return actions.join('');
} }

@ -41,8 +41,8 @@ public class TdTrain extends BaseEntity
private String trainAddress; private String trainAddress;
/** 培训日期 */ /** 培训日期 */
@JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "培训日期", width = 30, dateFormat = "yyyy-MM-dd HH:MM:SS") @Excel(name = "培训日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date trainDate; private Date trainDate;
/** 创建人 */ /** 创建人 */
@ -54,8 +54,8 @@ public class TdTrain extends BaseEntity
private String createDepartid; private String createDepartid;
/** 创建日期 */ /** 创建日期 */
@JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建日期", width = 30, dateFormat = "yyyy-MM-dd HH:MM:SS") @Excel(name = "创建日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date createDate; private Date createDate;
/** 更新单位 */ /** 更新单位 */
@ -67,8 +67,8 @@ public class TdTrain extends BaseEntity
private String updateStaffid; private String updateStaffid;
/** 更新时间 */ /** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:MM:SS") @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updateDate; private Date updateDate;
/** 所属地市 */ /** 所属地市 */
@ -88,8 +88,8 @@ public class TdTrain extends BaseEntity
private Long trainState; private Long trainState;
/** 培训结束时间 */ /** 培训结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:MM:SS") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "培训结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:MM:SS") @Excel(name = "培训结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date trainTimeend; private Date trainTimeend;
/** 部门 */ /** 部门 */

@ -98,8 +98,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deptId != null and deptId != 0"> <if test="deptId != null and deptId != 0">
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE FIND_IN_SET (#{deptId},ancestors) )) AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE FIND_IN_SET (#{deptId},ancestors) ))
</if> </if>
ORDER BY examinedate desc
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${params.dataScope} ${params.dataScope}
</select> </select>
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult"> <select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">

@ -21,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectTdLeaveVo"> <sql id="selectTdLeaveVo">
select id, user_id, user_name, country, areaname, leavereason, depart, leavedate, workstate, leavestate, examinename, examinedate, examinestate from td_leave select id, user_id, user_name, country, areaname, leavereason, depart, leavedate, workstate, leavestate, examinename, examinedate, examinestate from td_leave ORDER BY examinedate ASC
</sql> </sql>
<select id="selectTdLeaveList" parameterType="TdLeave" resultMap="TdLeaveResult"> <select id="selectTdLeaveList" parameterType="TdLeave" resultMap="TdLeaveResult">

Loading…
Cancel
Save