Commit a06613c2 by 龙于生 Committed by 284718418@qq.com

修复 禅道1304 bug

parent 59005c05
package cn.timer.api.bean.kqgl;
import java.io.Serializable;
/**
* @author lys
* @date 2021年12月06日 15:27
*/
public class AttImport implements Serializable {
//姓名
private String username;
//工号
private Integer empNum;
//上班打卡时间
private String sbdk;
//下班打卡时间
private String xbdk;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public Integer getEmpNum() {
return empNum;
}
public void setEmpNum(Integer empNum) {
this.empNum = empNum;
}
public String getSbdk() {
return sbdk;
}
public void setSbdk(String sbdk) {
this.sbdk = sbdk;
}
public String getXbdk() {
return xbdk;
}
public void setXbdk(String xbdk) {
this.xbdk = xbdk;
}
}
...@@ -55,6 +55,7 @@ public class DiskFilesLogController{ ...@@ -55,6 +55,7 @@ public class DiskFilesLogController{
@ApiParam("搜索关键字") @RequestParam(required = false) String query, @ApiParam("搜索关键字") @RequestParam(required = false) String query,
@ApiParam("类型:0查看,1下载,2创建") @RequestParam(required = false) String type) { @ApiParam("类型:0查看,1下载,2创建") @RequestParam(required = false) String type) {
Integer empNum = userBean.getEmpNum(); Integer empNum = userBean.getEmpNum();
Integer orgCode = userBean.getOrgCode();
DiskFilesLog diskFilesLog = new DiskFilesLog(); DiskFilesLog diskFilesLog = new DiskFilesLog();
diskFilesLog.setTitle(query); diskFilesLog.setTitle(query);
...@@ -63,12 +64,12 @@ public class DiskFilesLogController{ ...@@ -63,12 +64,12 @@ public class DiskFilesLogController{
diskFilesLog.setType(Integer.valueOf(type)); diskFilesLog.setType(Integer.valueOf(type));
}catch(Exception e){} }catch(Exception e){}
List<DiskFilesLog> diskFilesLogs = diskFilesLogMapper.queryDiskFilesLog(diskFilesLog,pageNum,pageSize); List<DiskFilesLog> diskFilesLogs = diskFilesLogMapper.queryDiskFilesLog(diskFilesLog,orgCode,pageNum,pageSize);
long total = PageHelper.count(new ISelect() { long total = PageHelper.count(new ISelect() {
@Override @Override
public void doSelect() { public void doSelect() {
diskFilesLogMapper.queryDiskFilesLog(diskFilesLog,pageNum,pageSize); diskFilesLogMapper.queryDiskFilesLog(diskFilesLog,orgCode,pageNum,pageSize);
} }
}); });
......
...@@ -51,17 +51,18 @@ public class DiskReceivedController{ ...@@ -51,17 +51,18 @@ public class DiskReceivedController{
@ApiParam("每页条数") @RequestParam(required = false, defaultValue = "10") Integer pageSize, @ApiParam("每页条数") @RequestParam(required = false, defaultValue = "10") Integer pageSize,
@ApiParam("搜索关键字") @RequestParam(required = false) String query) { @ApiParam("搜索关键字") @RequestParam(required = false) String query) {
Integer empNum = userBean.getEmpNum(); Integer empNum = userBean.getEmpNum();
Integer orgCode = userBean.getOrgCode();
DiskReceived diskReceived = new DiskReceived(); DiskReceived diskReceived = new DiskReceived();
diskReceived.setTitle(query); diskReceived.setTitle(query);
diskReceived.setUserId(empNum); diskReceived.setUserId(empNum);
List<DiskReceived> diskReceiveds = diskReceivedMapper.queryDiskReceived(diskReceived,pageNum,pageSize); List<DiskReceived> diskReceiveds = diskReceivedMapper.queryDiskReceived(diskReceived,orgCode,pageNum,pageSize);
long total = PageHelper.count(new ISelect() { long total = PageHelper.count(new ISelect() {
@Override @Override
public void doSelect() { public void doSelect() {
diskReceivedMapper.queryDiskReceived(diskReceived,pageNum,pageSize); diskReceivedMapper.queryDiskReceived(diskReceived,orgCode,pageNum,pageSize);
} }
}); });
......
...@@ -51,17 +51,18 @@ public class DiskShareController{ ...@@ -51,17 +51,18 @@ public class DiskShareController{
@ApiParam("每页条数") @RequestParam(required = false, defaultValue = "10") Integer pageSize, @ApiParam("每页条数") @RequestParam(required = false, defaultValue = "10") Integer pageSize,
@ApiParam("搜索关键字") @RequestParam(required = false) String query) { @ApiParam("搜索关键字") @RequestParam(required = false) String query) {
Integer empNum = userBean.getEmpNum(); Integer empNum = userBean.getEmpNum();
Integer orgCode = userBean.getOrgCode();
DiskShare diskShare = new DiskShare(); DiskShare diskShare = new DiskShare();
diskShare.setTitle(query); diskShare.setTitle(query);
diskShare.setUserId(empNum); diskShare.setUserId(empNum);
List<DiskShare> diskShares = diskShareMapper.queryDiskShare(diskShare,pageNum,pageSize); List<DiskShare> diskShares = diskShareMapper.queryDiskShare(diskShare,orgCode,pageNum,pageSize);
long total = PageHelper.count(new ISelect() { long total = PageHelper.count(new ISelect() {
@Override @Override
public void doSelect() { public void doSelect() {
diskShareMapper.queryDiskShare(diskShare,pageNum,pageSize); diskShareMapper.queryDiskShare(diskShare,orgCode,pageNum,pageSize);
} }
}); });
......
...@@ -19,6 +19,7 @@ import java.util.List; ...@@ -19,6 +19,7 @@ import java.util.List;
public interface DiskFilesLogMapper extends BaseMapper<DiskFilesLog> { public interface DiskFilesLogMapper extends BaseMapper<DiskFilesLog> {
List<DiskFilesLog> queryDiskFilesLog(@Param("diskFilesLog") DiskFilesLog diskFilesLog, List<DiskFilesLog> queryDiskFilesLog(@Param("diskFilesLog") DiskFilesLog diskFilesLog,
@Param("orgId") Integer orgId,
@Param(value = "pageNum") Integer pageNum, @Param(value = "pageNum") Integer pageNum,
@Param(value = "pageSize") Integer pageSize); @Param(value = "pageSize") Integer pageSize);
......
...@@ -19,6 +19,7 @@ import java.util.List; ...@@ -19,6 +19,7 @@ import java.util.List;
public interface DiskReceivedMapper extends BaseMapper<DiskReceived> { public interface DiskReceivedMapper extends BaseMapper<DiskReceived> {
List<DiskReceived> queryDiskReceived(@Param("diskReceived") DiskReceived diskReceived, List<DiskReceived> queryDiskReceived(@Param("diskReceived") DiskReceived diskReceived,
@Param("orgId") Integer orgId,
@Param(value = "pageNum") Integer pageNum, @Param(value = "pageNum") Integer pageNum,
@Param(value = "pageSize") Integer pageSize); @Param(value = "pageSize") Integer pageSize);
......
...@@ -19,6 +19,7 @@ import java.util.List; ...@@ -19,6 +19,7 @@ import java.util.List;
public interface DiskShareMapper extends BaseMapper<DiskShare> { public interface DiskShareMapper extends BaseMapper<DiskShare> {
List<DiskShare> queryDiskShare(@Param("diskShare") DiskShare diskShare, List<DiskShare> queryDiskShare(@Param("diskShare") DiskShare diskShare,
@Param("orgId") Integer orgId,
@Param(value = "pageNum") Integer pageNum, @Param(value = "pageNum") Integer pageNum,
@Param(value = "pageSize") Integer pageSize); @Param(value = "pageSize") Integer pageSize);
} }
...@@ -47,12 +47,14 @@ ...@@ -47,12 +47,14 @@
SELECT SELECT
log.*, log.*,
df.id diskFiles_id,
df.show_size diskFiles_show_size, df.show_size diskFiles_show_size,
df.file_type diskFiles_file_type, df.file_type diskFiles_file_type,
dfi.url diskFileImage_url dfi.url diskFileImage_url
FROM FROM
( SELECT * FROM disk_files_log (SELECT * FROM disk_files_log WHERE id IN (SELECT MAX(id) FROM disk_files_log
WHERE user_id = #{diskFilesLog.userId} WHERE
user_id = #{diskFilesLog.userId}
and `type` != 5 and `type` != 5
<if test="diskFilesLog.title != null and diskFilesLog.title != '' and diskFilesLog.title != 'null'"> <if test="diskFilesLog.title != null and diskFilesLog.title != '' and diskFilesLog.title != 'null'">
and title like CONCAT('%',#{diskFilesLog.title},'%') and title like CONCAT('%',#{diskFilesLog.title},'%')
...@@ -60,10 +62,12 @@ ...@@ -60,10 +62,12 @@
<if test="diskFilesLog.type != null"> <if test="diskFilesLog.type != null">
and `type` = #{diskFilesLog.type} and `type` = #{diskFilesLog.type}
</if> </if>
ORDER BY id DESC ) AS log GROUP BY files_id )) AS log
LEFT JOIN disk_files df ON log.files_id = df.id LEFT JOIN disk_files df ON log.files_id = df.id
LEFT JOIN disk_file_image dfi ON df.file_type = dfi.type LEFT JOIN disk_file_image dfi ON df.file_type = dfi.type
LEFT JOIN disk_catalogue_files dcf ON df.id = dcf.files_id
LEFT JOIN disk_catalogue dc ON dc.id = dcf.catalogue_id
WHERE dc.org_id=#{orgId}
GROUP BY GROUP BY
log.files_id log.files_id
ORDER BY ORDER BY
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
<select id="queryDiskReceived" resultMap="BaseResultMap"> <select id="queryDiskReceived" resultMap="BaseResultMap">
SELECT SELECT
dr.*, dr.*,
df.id diskFiles_id,
df.show_size diskFiles_show_size, df.show_size diskFiles_show_size,
df.file_type diskFiles_file_type, df.file_type diskFiles_file_type,
dfi.url diskFileImage_url dfi.url diskFileImage_url
...@@ -54,8 +55,9 @@ ...@@ -54,8 +55,9 @@
`disk_received` dr `disk_received` dr
LEFT JOIN `disk_files` df ON dr.`files_id` = df.`id` LEFT JOIN `disk_files` df ON dr.`files_id` = df.`id`
LEFT JOIN disk_file_image dfi ON df.file_type = dfi.type LEFT JOIN disk_file_image dfi ON df.file_type = dfi.type
LEFT JOIN disk_catalogue_files dcf ON df.id = dcf.files_id
WHERE dr.user_id = #{diskReceived.userId} and dr.delete_flag = 0 LEFT JOIN disk_catalogue dc ON dc.id = dcf.catalogue_id
WHERE dc.org_id=#{orgId} AND dr.user_id = #{diskReceived.userId} and dr.delete_flag = 0
<if test="diskReceived.title != null and diskReceived.title != '' and diskReceived.title != 'null'"> <if test="diskReceived.title != null and diskReceived.title != '' and diskReceived.title != 'null'">
and dr.title LIKE CONCAT('%',#{diskReceived.title},'%') and dr.title LIKE CONCAT('%',#{diskReceived.title},'%')
</if> </if>
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
<select id="queryDiskShare" resultMap="BaseResultMap"> <select id="queryDiskShare" resultMap="BaseResultMap">
SELECT SELECT
ds.*, ds.*,
df.id diskFiles_id,
df.show_size diskFiles_show_size, df.show_size diskFiles_show_size,
df.file_type diskFiles_file_type, df.file_type diskFiles_file_type,
dfi.url diskFileImage_url dfi.url diskFileImage_url
...@@ -55,8 +56,9 @@ ...@@ -55,8 +56,9 @@
`disk_share` ds `disk_share` ds
LEFT JOIN `disk_files` df ON ds.`files_id` = df.`id` LEFT JOIN `disk_files` df ON ds.`files_id` = df.`id`
LEFT JOIN disk_file_image dfi ON df.file_type = dfi.type LEFT JOIN disk_file_image dfi ON df.file_type = dfi.type
LEFT JOIN disk_catalogue_files dcf ON df.id = dcf.files_id
WHERE ds.user_id = #{diskShare.userId} and ds.delete_flag = 0 LEFT JOIN disk_catalogue dc ON dc.id = dcf.catalogue_id
WHERE dc.org_id=#{orgId} AND ds.user_id = #{diskShare.userId} and ds.delete_flag = 0
<if test="diskShare.title != null and diskShare.title != '' and diskShare.title != 'null'"> <if test="diskShare.title != null and diskShare.title != '' and diskShare.title != 'null'">
and ds.title LIKE CONCAT('%',#{diskShare.title},'%') and ds.title LIKE CONCAT('%',#{diskShare.title},'%')
</if> </if>
......
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