Compare commits

...

7 Commits

Author SHA1 Message Date
xiangZr-hhh
4b8dc5d699 fix:日报模块查询接口
增加项目被删除时的判空
2024-04-22 20:33:01 +08:00
xiangZr-hhh
e32bc023df Merge branch 'develop' of https://git-fy.cn/WxxyDeveloper/JSL_OrganizeInternalOA into feature-zrx 2024-04-22 20:29:46 +08:00
35943549f9 Merge pull request 'bug:指定负责人判空' (#44) from feature-jie into develop
Reviewed-on: #44
Reviewed-by: 筱锋xiao_lfeng <gm@x-lf.cn>
2024-04-22 19:31:14 +08:00
176yunxuan
22e79558da bug:指定负责人判空
All checks were successful
代码检查 / 代码检查 (pull_request) Successful in 19s
2024-04-22 19:29:18 +08:00
1fd49b0d8a Merge pull request 'bug:子模块返回增加周期' (#43) from feature-jie into develop
Reviewed-on: #43
2024-04-21 21:37:29 +08:00
176yunxuan
998f6a683e bug:子模块返回增加周期
All checks were successful
代码检查 / 代码检查 (pull_request) Successful in 6m24s
2024-04-21 21:31:46 +08:00
72aafd8fae Merge pull request 'fix:审核模块 审核添加接口' (#42) from feature-zrx into develop
Reviewed-on: #42
Reviewed-by: 筱锋xiao_lfeng <gm@x-lf.cn>
2024-04-21 18:56:12 +08:00
5 changed files with 46 additions and 24 deletions

View File

@ -232,6 +232,10 @@ public class ProjectDAO {
ProjectDO projectDO = projectMapper.getProjectById(projectId);
if (projectDO == null) {
return "项目负责人不存在";
}
UserDO userDO = userMapper.getUserById(projectDO.getPrincipalId());
if (userDO == null) {

View File

@ -16,6 +16,7 @@ public class ProjectModuleSimpleVO {
private Integer workLoad;
private Timestamp deadLine;
private String status;
private Integer cycle;
private String principalUser;
}

View File

@ -7,6 +7,7 @@ import com.jsl.oa.dao.ProjectDAO;
import com.jsl.oa.dao.ProjectDailyDAO;
import com.jsl.oa.dao.UserDAO;
import com.jsl.oa.mapper.ProjectDailyMapper;
import com.jsl.oa.model.dodata.ProjectDO;
import com.jsl.oa.model.dodata.ProjectDailyDO;
import com.jsl.oa.model.dodata.UserDO;
import com.jsl.oa.model.vodata.ProjectDailyAddVO;
@ -210,8 +211,12 @@ public class ProjectDailyServiceImpl implements ProjectDailyService {
// 复制相同的属性值
Processing.copyProperties(projectDailyDO, projectDailyVO);
// 赋值其他需查询的属性
projectDailyVO.setProjectName(
projectDAO.getProjectById(projectDailyVO.getProjectId()).getName());
ProjectDO projectDO = projectDAO.getProjectById(projectDailyVO.getProjectId());
if (projectDO == null) {
projectDailyVO.setProjectName(projectDO.getName());
} else {
projectDailyVO.setPrincipalName("项目不存在");
}
//设置发送者名称如果为昵称为空则赋值用户账号
UserDO senderUser = userDAO.getUserById(projectDailyDO.getUserId());

View File

@ -346,13 +346,14 @@ public class ProjectServiceImpl implements ProjectService {
if (projectModuleDO == null) {
return ResultUtil.error(ErrorCode.MODULE_NOT_EXIST);
}
HashMap<String, Object> descriptionMap = new HashMap<>();
descriptionMap.put("description", projectModuleEditVO.getDescription());
projectModuleEditVO.setDescription(gson.toJson(descriptionMap));
if (projectModuleEditVO.getDescription() != null) {
HashMap<String, Object> descriptionMap = new HashMap<>();
descriptionMap.put("description", projectModuleEditVO.getDescription());
projectModuleEditVO.setDescription(gson.toJson(descriptionMap));
}
projectModuleEditVO.setId(id);
projectMapper.projectModuleEdit(projectModuleEditVO);
}
return ResultUtil.success("修改成功");
}
@ -369,11 +370,13 @@ public class ProjectServiceImpl implements ProjectService {
JsonObject jsonObject = gson
.fromJson(projectChildDO.getDescription(), JsonObject.class);
//改动简介发送消息
if (!Objects.equals(projectChildAddVO.getDescription(), "")
&& !projectChildAddVO.getDescription()
.equals(jsonObject.get("description").getAsString())) {
messageService.messageAdd(projectMapper.getProjectIdBySysId(id)
.intValue(), id.intValue(), null, 2, request);
if (projectChildAddVO.getDescription() != null) {
if (!Objects.equals(projectChildAddVO.getDescription(), "")
&& !projectChildAddVO.getDescription()
.equals(jsonObject.get("description").getAsString())) {
messageService.messageAdd(projectMapper.getProjectIdBySysId(id)
.intValue(), id.intValue(), null, 2, request);
}
} // 改动周期或工作量发送消息
if ((projectChildAddVO.getCycle() != null
&& projectChildDO.getCycle().equals(projectChildAddVO.getCycle()))
@ -389,9 +392,11 @@ public class ProjectServiceImpl implements ProjectService {
messageService.messageAdd(projectMapper.getProjectIdBySysId(id)
.intValue(), 3, id.intValue(), request);
}
HashMap<String, Object> descriptionMap = new HashMap<>();
descriptionMap.put("description", projectChildAddVO.getDescription());
projectChildAddVO.setDescription(gson.toJson(descriptionMap));
if (projectChildAddVO.getDescription() != null) {
HashMap<String, Object> descriptionMap = new HashMap<>();
descriptionMap.put("description", projectChildAddVO.getDescription());
projectChildAddVO.setDescription(gson.toJson(descriptionMap));
}
projectChildAddVO.setId(id);
projectMapper.projectChildEditAll(projectChildAddVO);
@ -463,17 +468,22 @@ public class ProjectServiceImpl implements ProjectService {
if (projectEdit.getStatus() != null && !projectDO.getStatus().equals(projectEdit.getStatus())) {
messageService.messageAdd(projectId.intValue(), 2, null, request);
}
HashMap<String, Object> descriptionMap = new HashMap<>();
descriptionMap.put("description", projectEdit.getDescription());
projectEdit.setDescription(gson.toJson(descriptionMap));
if (projectEdit.getDescription() != null) {
HashMap<String, Object> descriptionMap = new HashMap<>();
descriptionMap.put("description", projectEdit.getDescription());
projectEdit.setDescription(gson.toJson(descriptionMap));
}
HashMap<String, Object> tagMap = new HashMap<>();
tagMap.put("tags", projectEdit.getTags().split(","));
projectEdit.setTags(gson.toJson(tagMap));
HashMap<String, Object> filesMap = new HashMap<>();
filesMap.put("URI", projectEdit.getFiles());
projectEdit.setFiles(gson.toJson(filesMap));
if (projectEdit.getDescription() != null) {
HashMap<String, Object> tagMap = new HashMap<>();
tagMap.put("tags", projectEdit.getTags().split(","));
projectEdit.setTags(gson.toJson(tagMap));
}
if (projectEdit.getDescription() != null) {
HashMap<String, Object> filesMap = new HashMap<>();
filesMap.put("URI", projectEdit.getFiles());
projectEdit.setFiles(gson.toJson(filesMap));
}
projectEdit.setId(projectId);
ProjectDO projectEdit1 = new ProjectDO();

View File

@ -40,6 +40,7 @@
<if test="isDelete != null">
is_delete = #{isDelete},
</if>
updated_at = CURRENT_TIMESTAMP
</set>
where id = #{id}
</update>
@ -105,6 +106,7 @@
</set>
where id = #{id}
</update>
<update id="projectChildEditAll">
update organize_oa.oa_project_child
<set>