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{
@ApiParam("搜索关键字") @RequestParam(required = false) String query,
@ApiParam("类型:0查看,1下载,2创建") @RequestParam(required = false) String type) {
Integer empNum = userBean.getEmpNum();
Integer orgCode = userBean.getOrgCode();
DiskFilesLog diskFilesLog = new DiskFilesLog();
diskFilesLog.setTitle(query);
......@@ -63,12 +64,12 @@ public class DiskFilesLogController{
diskFilesLog.setType(Integer.valueOf(type));
}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() {
@Override
public void doSelect() {
diskFilesLogMapper.queryDiskFilesLog(diskFilesLog,pageNum,pageSize);
diskFilesLogMapper.queryDiskFilesLog(diskFilesLog,orgCode,pageNum,pageSize);
}
});
......
......@@ -51,17 +51,18 @@ public class DiskReceivedController{
@ApiParam("每页条数") @RequestParam(required = false, defaultValue = "10") Integer pageSize,
@ApiParam("搜索关键字") @RequestParam(required = false) String query) {
Integer empNum = userBean.getEmpNum();
Integer orgCode = userBean.getOrgCode();
DiskReceived diskReceived = new DiskReceived();
diskReceived.setTitle(query);
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() {
@Override
public void doSelect() {
diskReceivedMapper.queryDiskReceived(diskReceived,pageNum,pageSize);
diskReceivedMapper.queryDiskReceived(diskReceived,orgCode,pageNum,pageSize);
}
});
......
......@@ -51,17 +51,18 @@ public class DiskShareController{
@ApiParam("每页条数") @RequestParam(required = false, defaultValue = "10") Integer pageSize,
@ApiParam("搜索关键字") @RequestParam(required = false) String query) {
Integer empNum = userBean.getEmpNum();
Integer orgCode = userBean.getOrgCode();
DiskShare diskShare = new DiskShare();
diskShare.setTitle(query);
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() {
@Override
public void doSelect() {
diskShareMapper.queryDiskShare(diskShare,pageNum,pageSize);
diskShareMapper.queryDiskShare(diskShare,orgCode,pageNum,pageSize);
}
});
......
......@@ -19,6 +19,7 @@ import java.util.List;
public interface DiskFilesLogMapper extends BaseMapper<DiskFilesLog> {
List<DiskFilesLog> queryDiskFilesLog(@Param("diskFilesLog") DiskFilesLog diskFilesLog,
@Param("orgId") Integer orgId,
@Param(value = "pageNum") Integer pageNum,
@Param(value = "pageSize") Integer pageSize);
......
......@@ -19,7 +19,8 @@ import java.util.List;
public interface DiskReceivedMapper extends BaseMapper<DiskReceived> {
List<DiskReceived> queryDiskReceived(@Param("diskReceived") DiskReceived diskReceived,
@Param(value = "pageNum") Integer pageNum,
@Param(value = "pageSize") Integer pageSize);
@Param("orgId") Integer orgId,
@Param(value = "pageNum") Integer pageNum,
@Param(value = "pageSize") Integer pageSize);
}
......@@ -19,6 +19,7 @@ import java.util.List;
public interface DiskShareMapper extends BaseMapper<DiskShare> {
List<DiskShare> queryDiskShare(@Param("diskShare") DiskShare diskShare,
@Param(value = "pageNum") Integer pageNum,
@Param(value = "pageSize") Integer pageSize);
@Param("orgId") Integer orgId,
@Param(value = "pageNum") Integer pageNum,
@Param(value = "pageSize") Integer pageSize);
}
......@@ -47,23 +47,27 @@
SELECT
log.*,
df.id diskFiles_id,
df.show_size diskFiles_show_size,
df.file_type diskFiles_file_type,
dfi.url diskFileImage_url
FROM
( SELECT * FROM disk_files_log
WHERE user_id = #{diskFilesLog.userId}
and `type` != 5
(SELECT * FROM disk_files_log WHERE id IN (SELECT MAX(id) FROM disk_files_log
WHERE
user_id = #{diskFilesLog.userId}
and `type` != 5
<if test="diskFilesLog.title != null and diskFilesLog.title != '' and diskFilesLog.title != 'null'">
and title like CONCAT('%',#{diskFilesLog.title},'%')
</if>
<if test="diskFilesLog.type != null">
and `type` = #{diskFilesLog.type}
</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_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
log.files_id
ORDER BY
......
......@@ -47,6 +47,7 @@
<select id="queryDiskReceived" resultMap="BaseResultMap">
SELECT
dr.*,
df.id diskFiles_id,
df.show_size diskFiles_show_size,
df.file_type diskFiles_file_type,
dfi.url diskFileImage_url
......@@ -54,8 +55,9 @@
`disk_received` dr
LEFT JOIN `disk_files` df ON dr.`files_id` = df.`id`
LEFT JOIN disk_file_image dfi ON df.file_type = dfi.type
WHERE dr.user_id = #{diskReceived.userId} and dr.delete_flag = 0
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} AND dr.user_id = #{diskReceived.userId} and dr.delete_flag = 0
<if test="diskReceived.title != null and diskReceived.title != '' and diskReceived.title != 'null'">
and dr.title LIKE CONCAT('%',#{diskReceived.title},'%')
</if>
......
......@@ -48,6 +48,7 @@
<select id="queryDiskShare" resultMap="BaseResultMap">
SELECT
ds.*,
df.id diskFiles_id,
df.show_size diskFiles_show_size,
df.file_type diskFiles_file_type,
dfi.url diskFileImage_url
......@@ -55,8 +56,9 @@
`disk_share` ds
LEFT JOIN `disk_files` df ON ds.`files_id` = df.`id`
LEFT JOIN disk_file_image dfi ON df.file_type = dfi.type
WHERE ds.user_id = #{diskShare.userId} and ds.delete_flag = 0
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} AND ds.user_id = #{diskShare.userId} and ds.delete_flag = 0
<if test="diskShare.title != null and diskShare.title != '' and diskShare.title != 'null'">
and ds.title LIKE CONCAT('%',#{diskShare.title},'%')
</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