人员管理证书bug修复

This commit is contained in:
jjLv 2024-08-20 15:10:48 +08:00
parent bef4e12e12
commit aa15423ad2
5 changed files with 21 additions and 6 deletions

View File

@ -82,7 +82,7 @@ public class BaseProjectController extends BaseController
try{
BaseProject project = JSON.parseObject(params, BaseProject.class);
if (!projectService.checkProjectDeptNameUniqueAdd(project)) {
return error("修改项目'" + project.getProjectDepartName() + "'失败,项目名称已存在");
return error("新增项目部'" + project.getProjectDepartName() + "'失败,项目名称已存在");
}
project.setCreateBy(SecurityUtils.getUsername());
// project.setDelFlag(0);
@ -103,7 +103,7 @@ public class BaseProjectController extends BaseController
public AjaxResult edit(@RequestParam(value = "file", required = false) MultipartFile[] file, String params) {
BaseProject project = JSON.parseObject(params, BaseProject.class);
if (!projectService.checkProjectDeptNameUnique(project)) {
return error("修改项目'" + project.getProjectDepartName() + "'失败,项目名称已存在");
return error("修改项目'" + project.getProjectDepartName() + "'失败,项目名称已存在");
}
project.setUpdateBy(SecurityUtils.getUsername());
return projectService.updateProject(file,params);

View File

@ -76,4 +76,6 @@ public interface BaseProjectMapper
* @return
*/
public List<BaseProject> getProjectSomeLists(int[] ids);
}

View File

@ -631,14 +631,24 @@ public class PersonMgeServiceImpl implements IPersonMgeService {
*/
public ResourceFileVo setCertificateResourceFileData(JSONObject item, CertificateVo vo) {
ResourceFileVo fileVo = new ResourceFileVo();
String fileType = String.valueOf(vo.getCertificateType() + 1);
String fileType = null;
if(item.get("suffix").equals(".pdf") || item.get("suffix").equals(".doc") || item.get("suffix").equals(".docx")){
fileType = "0";
}else{
fileType = String.valueOf(vo.getCertificateType() + 1);
}
String resourceId = IdUtils.simpleUUID();
fileVo.setFileType(vo.getCertificateType() + 1);
if(fileType.equals("0")){
fileVo.setFileType(0);
fileVo.setSourceType(String.valueOf(vo.getCertificateType() + 1));
}else{
fileVo.setFileType(1);
fileVo.setSourceType(fileType);
}
fileVo.setFilePath(item.getString("fileId"));
fileVo.setFileSuffix(item.getString("suffix"));
fileVo.setFileName(item.getString("fileName"));
fileVo.setSourceId(vo.getId() + "");
fileVo.setSourceType(fileType);
return fileVo;
}

View File

@ -132,4 +132,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
group by a.id
</select>
</mapper>

View File

@ -133,7 +133,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectCertificateFile" parameterType="int" resultType="com.bonus.common.entity.file.ResourceFileVo">
SELECT sfs.file_path AS filePath,
sfs.id AS fileId,
sfs.source_type as sourceImagType
sfs.source_type as sourceImagType,
sfs.file_name as fileName,
sfs.file_type as fileType
FROM tb_people_certificate tpc
LEFT JOIN sys_file_source sfs ON tpc.id = sfs.source_id AND sfs.source_type in(2,3,4) AND sfs.del_flag = 0
WHERE tpc.people_id = #{memberId}