代码提交
This commit is contained in:
parent
eac2652615
commit
473d74ec8c
|
|
@ -44,10 +44,10 @@ public class CronExpressionGenerator {
|
|||
|
||||
switch (cycle) {
|
||||
// 每天
|
||||
case "1":
|
||||
case "daily":
|
||||
return String.format("%d %d %d * * ?", second, minute, hour);
|
||||
// 每周
|
||||
case "2":
|
||||
case "weekly":
|
||||
if (weekOfDay == null || weekOfDay.trim().isEmpty()) return null;
|
||||
List<String> days = Arrays.stream(weekOfDay.split(","))
|
||||
.map(String::trim)
|
||||
|
|
@ -58,7 +58,7 @@ public class CronExpressionGenerator {
|
|||
return joinedDays.isEmpty() ? null :
|
||||
String.format("%d %d %d ? * %s", second, minute, hour, joinedDays);
|
||||
// 每月
|
||||
case "3":
|
||||
case "monthly":
|
||||
if (monthDay == null || monthDay.trim().isEmpty()) return null;
|
||||
List<String> validDays = Arrays.stream(monthDay.split(","))
|
||||
.map(String::trim)
|
||||
|
|
|
|||
|
|
@ -161,6 +161,7 @@ public class DaKyProFilesContentsDto {
|
|||
*/
|
||||
private String delFlag;
|
||||
private String keyWord;
|
||||
private String uploadTime;
|
||||
|
||||
private List<DaKyProFilesContentsDto> children = new ArrayList<>();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public class ProjectDto {
|
|||
/**
|
||||
* 当前档案上传数
|
||||
*/
|
||||
private Long fileUplaudNum;
|
||||
private Integer fileUplaudNum;
|
||||
|
||||
/**
|
||||
* 档案状态 0.未归档移交 1.已归档移交
|
||||
|
|
|
|||
|
|
@ -47,4 +47,6 @@ public interface FileManageMapper {
|
|||
DaKyProFilesContentsDto getFileManageById(DaKyProFilesContentsDto dto);
|
||||
|
||||
DaKyProFilesContentsVo getFileById(Long id);
|
||||
|
||||
Integer getFilesNum(String proId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.bonus.web.domain.ArchivalCatalogueDto;
|
|||
import com.bonus.web.domain.DaKyProFilesContentsDto;
|
||||
import com.bonus.web.domain.ProjectDto;
|
||||
import com.bonus.web.domain.SelectDto;
|
||||
import com.bonus.web.mapper.FileManageMapper;
|
||||
import com.bonus.web.mapper.ProjectMapper;
|
||||
import com.bonus.web.service.ProjectService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -27,9 +28,17 @@ public class ProjectServiceImpl implements ProjectService {
|
|||
@Autowired
|
||||
private ProjectMapper projectMapper;
|
||||
|
||||
@Autowired
|
||||
private FileManageMapper fileManageMapper;
|
||||
|
||||
@Override
|
||||
public List<ProjectDto> list(ProjectDto dto) {
|
||||
return projectMapper.list(dto);
|
||||
List<ProjectDto> list = projectMapper.list(dto);
|
||||
for (ProjectDto projectDto : list) {
|
||||
Integer num = fileManageMapper.getFilesNum(projectDto.getId());
|
||||
projectDto.setFileUplaudNum(num);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -81,6 +81,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</update>
|
||||
|
||||
<select id="getArchivedSetting" resultType="com.bonus.web.domain.ArchivedSettingDto">
|
||||
select * from da_ky_archived_setting
|
||||
SELECT
|
||||
id,
|
||||
archived_type AS archivedType,
|
||||
cycle,
|
||||
`time`,
|
||||
weekOfDay,
|
||||
create_time AS createTime,
|
||||
update_time AS updateTime,
|
||||
use_status AS useStatus,
|
||||
cron_str AS cronStr,
|
||||
month_day AS monthDay
|
||||
FROM da_ky_archived_setting
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -176,6 +176,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="contentName != null and contentName != ''">
|
||||
and dkpfc.content_name like concat('%', #{contentName}, '%')
|
||||
</if>
|
||||
<if test="uploadTime != null and uploadTime != ''">
|
||||
and DATE(dkfs.create_time) = #{uploadTime}
|
||||
</if>
|
||||
order by dkpfc.create_time desc
|
||||
</select>
|
||||
<select id="selectFileManage" resultType="java.lang.Integer">
|
||||
|
|
@ -251,4 +254,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<select id="getFileById" resultType="com.bonus.web.domain.vo.DaKyProFilesContentsVo">
|
||||
SELECT * from da_ky_sys_file_source where id = #{id}
|
||||
</select>
|
||||
<select id="getFilesNum" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(dkfs.id)
|
||||
FROM
|
||||
da_ky_sys_file_source dkfs
|
||||
left join da_ky_pro_files_contents dkpfc on dkfs.business_id = dkpfc.id
|
||||
WHERE dkfs.del_flag = '1' and dkpfc.level = 5 and dkpfc.pro_id = #{proId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue