Compare commits
7 Commits
5b7daf5824
...
4b8dc5d699
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4b8dc5d699 | ||
![]() |
e32bc023df | ||
35943549f9 | |||
![]() |
22e79558da | ||
1fd49b0d8a | |||
![]() |
998f6a683e | ||
72aafd8fae |
@ -232,6 +232,10 @@ public class ProjectDAO {
|
|||||||
|
|
||||||
ProjectDO projectDO = projectMapper.getProjectById(projectId);
|
ProjectDO projectDO = projectMapper.getProjectById(projectId);
|
||||||
|
|
||||||
|
if (projectDO == null) {
|
||||||
|
return "项目负责人不存在";
|
||||||
|
}
|
||||||
|
|
||||||
UserDO userDO = userMapper.getUserById(projectDO.getPrincipalId());
|
UserDO userDO = userMapper.getUserById(projectDO.getPrincipalId());
|
||||||
|
|
||||||
if (userDO == null) {
|
if (userDO == null) {
|
||||||
|
@ -16,6 +16,7 @@ public class ProjectModuleSimpleVO {
|
|||||||
private Integer workLoad;
|
private Integer workLoad;
|
||||||
private Timestamp deadLine;
|
private Timestamp deadLine;
|
||||||
private String status;
|
private String status;
|
||||||
|
private Integer cycle;
|
||||||
private String principalUser;
|
private String principalUser;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import com.jsl.oa.dao.ProjectDAO;
|
|||||||
import com.jsl.oa.dao.ProjectDailyDAO;
|
import com.jsl.oa.dao.ProjectDailyDAO;
|
||||||
import com.jsl.oa.dao.UserDAO;
|
import com.jsl.oa.dao.UserDAO;
|
||||||
import com.jsl.oa.mapper.ProjectDailyMapper;
|
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.ProjectDailyDO;
|
||||||
import com.jsl.oa.model.dodata.UserDO;
|
import com.jsl.oa.model.dodata.UserDO;
|
||||||
import com.jsl.oa.model.vodata.ProjectDailyAddVO;
|
import com.jsl.oa.model.vodata.ProjectDailyAddVO;
|
||||||
@ -210,8 +211,12 @@ public class ProjectDailyServiceImpl implements ProjectDailyService {
|
|||||||
// 复制相同的属性值
|
// 复制相同的属性值
|
||||||
Processing.copyProperties(projectDailyDO, projectDailyVO);
|
Processing.copyProperties(projectDailyDO, projectDailyVO);
|
||||||
// 赋值其他需查询的属性
|
// 赋值其他需查询的属性
|
||||||
projectDailyVO.setProjectName(
|
ProjectDO projectDO = projectDAO.getProjectById(projectDailyVO.getProjectId());
|
||||||
projectDAO.getProjectById(projectDailyVO.getProjectId()).getName());
|
if (projectDO == null) {
|
||||||
|
projectDailyVO.setProjectName(projectDO.getName());
|
||||||
|
} else {
|
||||||
|
projectDailyVO.setPrincipalName("项目不存在");
|
||||||
|
}
|
||||||
//设置发送者名称,如果为昵称为空则赋值用户账号
|
//设置发送者名称,如果为昵称为空则赋值用户账号
|
||||||
UserDO senderUser = userDAO.getUserById(projectDailyDO.getUserId());
|
UserDO senderUser = userDAO.getUserById(projectDailyDO.getUserId());
|
||||||
|
|
||||||
|
@ -346,13 +346,14 @@ public class ProjectServiceImpl implements ProjectService {
|
|||||||
if (projectModuleDO == null) {
|
if (projectModuleDO == null) {
|
||||||
return ResultUtil.error(ErrorCode.MODULE_NOT_EXIST);
|
return ResultUtil.error(ErrorCode.MODULE_NOT_EXIST);
|
||||||
}
|
}
|
||||||
HashMap<String, Object> descriptionMap = new HashMap<>();
|
if (projectModuleEditVO.getDescription() != null) {
|
||||||
descriptionMap.put("description", projectModuleEditVO.getDescription());
|
HashMap<String, Object> descriptionMap = new HashMap<>();
|
||||||
projectModuleEditVO.setDescription(gson.toJson(descriptionMap));
|
descriptionMap.put("description", projectModuleEditVO.getDescription());
|
||||||
|
projectModuleEditVO.setDescription(gson.toJson(descriptionMap));
|
||||||
|
}
|
||||||
projectModuleEditVO.setId(id);
|
projectModuleEditVO.setId(id);
|
||||||
projectMapper.projectModuleEdit(projectModuleEditVO);
|
projectMapper.projectModuleEdit(projectModuleEditVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ResultUtil.success("修改成功");
|
return ResultUtil.success("修改成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -369,11 +370,13 @@ public class ProjectServiceImpl implements ProjectService {
|
|||||||
JsonObject jsonObject = gson
|
JsonObject jsonObject = gson
|
||||||
.fromJson(projectChildDO.getDescription(), JsonObject.class);
|
.fromJson(projectChildDO.getDescription(), JsonObject.class);
|
||||||
//改动简介发送消息
|
//改动简介发送消息
|
||||||
if (!Objects.equals(projectChildAddVO.getDescription(), "")
|
if (projectChildAddVO.getDescription() != null) {
|
||||||
&& !projectChildAddVO.getDescription()
|
if (!Objects.equals(projectChildAddVO.getDescription(), "")
|
||||||
.equals(jsonObject.get("description").getAsString())) {
|
&& !projectChildAddVO.getDescription()
|
||||||
messageService.messageAdd(projectMapper.getProjectIdBySysId(id)
|
.equals(jsonObject.get("description").getAsString())) {
|
||||||
.intValue(), id.intValue(), null, 2, request);
|
messageService.messageAdd(projectMapper.getProjectIdBySysId(id)
|
||||||
|
.intValue(), id.intValue(), null, 2, request);
|
||||||
|
}
|
||||||
} // 改动周期或工作量发送消息
|
} // 改动周期或工作量发送消息
|
||||||
if ((projectChildAddVO.getCycle() != null
|
if ((projectChildAddVO.getCycle() != null
|
||||||
&& projectChildDO.getCycle().equals(projectChildAddVO.getCycle()))
|
&& projectChildDO.getCycle().equals(projectChildAddVO.getCycle()))
|
||||||
@ -389,9 +392,11 @@ public class ProjectServiceImpl implements ProjectService {
|
|||||||
messageService.messageAdd(projectMapper.getProjectIdBySysId(id)
|
messageService.messageAdd(projectMapper.getProjectIdBySysId(id)
|
||||||
.intValue(), 3, id.intValue(), request);
|
.intValue(), 3, id.intValue(), request);
|
||||||
}
|
}
|
||||||
HashMap<String, Object> descriptionMap = new HashMap<>();
|
if (projectChildAddVO.getDescription() != null) {
|
||||||
descriptionMap.put("description", projectChildAddVO.getDescription());
|
HashMap<String, Object> descriptionMap = new HashMap<>();
|
||||||
projectChildAddVO.setDescription(gson.toJson(descriptionMap));
|
descriptionMap.put("description", projectChildAddVO.getDescription());
|
||||||
|
projectChildAddVO.setDescription(gson.toJson(descriptionMap));
|
||||||
|
}
|
||||||
|
|
||||||
projectChildAddVO.setId(id);
|
projectChildAddVO.setId(id);
|
||||||
projectMapper.projectChildEditAll(projectChildAddVO);
|
projectMapper.projectChildEditAll(projectChildAddVO);
|
||||||
@ -463,17 +468,22 @@ public class ProjectServiceImpl implements ProjectService {
|
|||||||
if (projectEdit.getStatus() != null && !projectDO.getStatus().equals(projectEdit.getStatus())) {
|
if (projectEdit.getStatus() != null && !projectDO.getStatus().equals(projectEdit.getStatus())) {
|
||||||
messageService.messageAdd(projectId.intValue(), 2, null, request);
|
messageService.messageAdd(projectId.intValue(), 2, null, request);
|
||||||
}
|
}
|
||||||
HashMap<String, Object> descriptionMap = new HashMap<>();
|
if (projectEdit.getDescription() != null) {
|
||||||
descriptionMap.put("description", projectEdit.getDescription());
|
HashMap<String, Object> descriptionMap = new HashMap<>();
|
||||||
projectEdit.setDescription(gson.toJson(descriptionMap));
|
descriptionMap.put("description", projectEdit.getDescription());
|
||||||
|
projectEdit.setDescription(gson.toJson(descriptionMap));
|
||||||
|
}
|
||||||
|
|
||||||
HashMap<String, Object> tagMap = new HashMap<>();
|
if (projectEdit.getDescription() != null) {
|
||||||
tagMap.put("tags", projectEdit.getTags().split(","));
|
HashMap<String, Object> tagMap = new HashMap<>();
|
||||||
projectEdit.setTags(gson.toJson(tagMap));
|
tagMap.put("tags", projectEdit.getTags().split(","));
|
||||||
|
projectEdit.setTags(gson.toJson(tagMap));
|
||||||
HashMap<String, Object> filesMap = new HashMap<>();
|
}
|
||||||
filesMap.put("URI", projectEdit.getFiles());
|
if (projectEdit.getDescription() != null) {
|
||||||
projectEdit.setFiles(gson.toJson(filesMap));
|
HashMap<String, Object> filesMap = new HashMap<>();
|
||||||
|
filesMap.put("URI", projectEdit.getFiles());
|
||||||
|
projectEdit.setFiles(gson.toJson(filesMap));
|
||||||
|
}
|
||||||
|
|
||||||
projectEdit.setId(projectId);
|
projectEdit.setId(projectId);
|
||||||
ProjectDO projectEdit1 = new ProjectDO();
|
ProjectDO projectEdit1 = new ProjectDO();
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
<if test="isDelete != null">
|
<if test="isDelete != null">
|
||||||
is_delete = #{isDelete},
|
is_delete = #{isDelete},
|
||||||
</if>
|
</if>
|
||||||
|
updated_at = CURRENT_TIMESTAMP
|
||||||
</set>
|
</set>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
@ -105,6 +106,7 @@
|
|||||||
</set>
|
</set>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="projectChildEditAll">
|
<update id="projectChildEditAll">
|
||||||
update organize_oa.oa_project_child
|
update organize_oa.oa_project_child
|
||||||
<set>
|
<set>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user