档案管理树结构修改
This commit is contained in:
parent
e39d8049e5
commit
a7b60a977a
|
|
@ -17,7 +17,7 @@ public class DaKyProFilesContentsDto {
|
|||
/**
|
||||
* id
|
||||
*/
|
||||
private Integer id;
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public class DaKyProFilesContentsVo {
|
|||
/**
|
||||
* id
|
||||
*/
|
||||
private Integer id;
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
|
|
|
|||
|
|
@ -22,8 +22,10 @@ public interface FileManageMapper {
|
|||
Integer saveFileSource(DaKyProFilesContentsVo dto);
|
||||
|
||||
Integer updateFileManage(DaKyProFilesContentsDto dto);
|
||||
Integer updateFileManage(DaKyProFilesContentsVo dto);
|
||||
|
||||
Integer updateFileSource(DaKyProFilesContentsDto dto);
|
||||
Integer updateFileSource(DaKyProFilesContentsVo dto);
|
||||
|
||||
Integer delFileSource(DaKyProFilesContentsDto dto);
|
||||
|
||||
|
|
@ -36,7 +38,7 @@ public interface FileManageMapper {
|
|||
|
||||
Integer updateIntegrityStatus(DaKyProFilesContentsDto dto);
|
||||
|
||||
Integer getLevelById(Integer id);
|
||||
Integer getLevelById(String id);
|
||||
|
||||
Integer getMaxSort(DaKyProFilesContentsDto dto);
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import org.springframework.stereotype.Service;
|
|||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.bonus.common.utils.SecurityUtils.getLoginUser;
|
||||
|
|
@ -54,6 +55,8 @@ public class FileManageServiceImpl implements FileManageService {
|
|||
if (i > 0) {
|
||||
return R.fail("档案名称重复");
|
||||
}
|
||||
String uuid32 = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
||||
dto.setId(uuid32);
|
||||
return R.ok(fileManageMapper.saveFileManage(dto));
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +81,8 @@ public class FileManageServiceImpl implements FileManageService {
|
|||
}
|
||||
fileManageMapper.saveFileSource(dto);
|
||||
}
|
||||
|
||||
String uuid32 = UUID.randomUUID().toString().replace("-", "").toLowerCase();
|
||||
dto.setId(uuid32);
|
||||
return R.ok(fileManageMapper.saveFileManage(dto));
|
||||
}
|
||||
|
||||
|
|
@ -90,16 +94,22 @@ public class FileManageServiceImpl implements FileManageService {
|
|||
if (i > 0) {
|
||||
return R.fail("档案名称重复");
|
||||
}
|
||||
fileManageMapper.updateFileSource(dto);
|
||||
if (StringUtils.isBlank(dto.getFilePath())) {
|
||||
dto.setId(null);
|
||||
}
|
||||
return R.ok(fileManageMapper.updateFileManage(dto));
|
||||
}
|
||||
|
||||
@Override
|
||||
public R updateFileManage(DaKyProFilesContentsVo dto) {
|
||||
return null;
|
||||
dto.setUpdateUserId(getLoginUser().getUserId());
|
||||
dto.setUpdateUserName(getLoginUser().getUsername());
|
||||
Integer i = fileManageMapper.selectFileManage(dto);
|
||||
if (i > 0) {
|
||||
return R.fail("档案名称重复");
|
||||
}
|
||||
fileManageMapper.updateFileSource(dto);
|
||||
if (StringUtils.isBlank(dto.getFilePath())) {
|
||||
dto.setId(null);
|
||||
}
|
||||
return R.ok(fileManageMapper.updateFileManage(dto));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<update id="updateFileManage">
|
||||
UPDATE da_ky_pro_files_contents
|
||||
<set>
|
||||
id = #{id},
|
||||
<if test="contentName != null and contentName != ''">content_name = #{contentName},</if>
|
||||
<if test="parentId != null and parentId != ''">parent_id = #{parentId},</if>
|
||||
<if test="level != null and level != ''">`level` = #{level},</if>
|
||||
|
|
@ -91,7 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="updateUserName != null and updateUserName != ''">update_user_name = #{updateUserName},</if>
|
||||
update_time = now()
|
||||
</set>
|
||||
WHERE content_name = #{contentName}
|
||||
WHERE id = #{id} and pro_id = #{proId}
|
||||
</update>
|
||||
<update id="updateFileSource">
|
||||
UPDATE da_ky_sys_file_source
|
||||
|
|
@ -104,7 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
update_user_id = #{updateUserId},
|
||||
update_user_name = #{updateUserName},
|
||||
update_time = now()
|
||||
WHERE id = #{id}
|
||||
WHERE business_id = #{id}
|
||||
</update>
|
||||
<update id="updateIntegrityStatus">
|
||||
UPDATE da_ky_pro_files_contents
|
||||
|
|
@ -114,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</update>
|
||||
<delete id="delFileSource">
|
||||
DELETE FROM da_ky_sys_file_source
|
||||
WHERE id = #{id}
|
||||
WHERE business_id = #{id}
|
||||
</delete>
|
||||
<delete id="delFileManage">
|
||||
DELETE FROM da_ky_pro_files_contents
|
||||
|
|
@ -145,7 +144,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
dkpfc.mark_code AS markCode,
|
||||
dkpfc.term AS term,
|
||||
dkpfc.unit_name AS unitName,
|
||||
dkpfc.data_source AS dataSource,
|
||||
case when dkpfc.data_source = '1' then '本系统上传'
|
||||
when dkpfc.data_source = '2' then '智慧现场'
|
||||
else '' end AS dataSource,
|
||||
dkpfc.is_unique AS isUnique,
|
||||
dkpfc.integrity_status AS integrityStatus,
|
||||
dkfs.id AS fileId,
|
||||
|
|
@ -182,14 +183,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
dkfcns.del_flag = '1' and standard_type = '1'
|
||||
</select>
|
||||
<select id="getLevelById" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
dkp.level
|
||||
FROM
|
||||
da_ky_pro_files_contents dkp
|
||||
WHERE
|
||||
dkp.id = #{id}
|
||||
</select>
|
||||
<select id="getMaxSort" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
max(dkpfc.sort)
|
||||
|
|
@ -206,4 +199,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
dkpfc.id = #{id}
|
||||
</select>
|
||||
<select id="getLevelById" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
dkp.level
|
||||
FROM
|
||||
da_ky_pro_files_contents dkp
|
||||
WHERE
|
||||
dkp.id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue