Compare commits
6 Commits
04a5eae117
...
b096ce21a2
Author | SHA1 | Date | |
---|---|---|---|
|
b096ce21a2 | ||
3527c250d4 | |||
b9aa1b25cc | |||
acb3fab074 | |||
3383fef3f0 | |||
725f5f7fee |
|
@ -31,4 +31,6 @@ public class ProjectChildDO {
|
||||||
private Timestamp createdAt;
|
private Timestamp createdAt;
|
||||||
private Timestamp completeTime;
|
private Timestamp completeTime;
|
||||||
private Timestamp updatedAt;
|
private Timestamp updatedAt;
|
||||||
|
private String status;
|
||||||
|
private Timestamp deadLine;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,8 @@ public class ProjectModuleDO {
|
||||||
private String description;
|
private String description;
|
||||||
private String name;
|
private String name;
|
||||||
private Integer isDelete;
|
private Integer isDelete;
|
||||||
|
private String status;
|
||||||
|
private Timestamp deadLine;
|
||||||
private Timestamp createdAt;
|
private Timestamp createdAt;
|
||||||
private Timestamp updatedAt;
|
private Timestamp updatedAt;
|
||||||
private Timestamp completeTime;
|
private Timestamp completeTime;
|
||||||
|
|
|
@ -2,13 +2,17 @@ package com.jsl.oa.model.vodata;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class PermissionContentVO {
|
public class PermissionContentVO {
|
||||||
// 主键
|
|
||||||
private Long id;
|
private Long id;
|
||||||
// 权限名称
|
|
||||||
private String name;
|
private String name;
|
||||||
// 权限描述
|
private String code;
|
||||||
private String description;
|
private Short type;
|
||||||
|
private List<PermissionContentVO> children;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
24
src/main/java/com/jsl/oa/model/vodata/ProjectChildGetVO.java
Normal file
24
src/main/java/com/jsl/oa/model/vodata/ProjectChildGetVO.java
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
package com.jsl.oa.model.vodata;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
|
public class ProjectChildGetVO {
|
||||||
|
private Long id;
|
||||||
|
private String principalName;
|
||||||
|
private Long projectId;
|
||||||
|
private Integer workLoad;
|
||||||
|
private Integer cycle;
|
||||||
|
private String name;
|
||||||
|
private String description;
|
||||||
|
private Integer isDelete;
|
||||||
|
private String status;
|
||||||
|
private Timestamp deadLine;
|
||||||
|
}
|
|
@ -15,19 +15,17 @@ import java.sql.Timestamp;
|
||||||
public class ProjectWorkAndNameVO {
|
public class ProjectWorkAndNameVO {
|
||||||
|
|
||||||
private Long id;
|
private Long id;
|
||||||
private Long pid;
|
|
||||||
private String childSystemName;
|
private String childSystemName;
|
||||||
private Long projectId;
|
private Long projectChildId;
|
||||||
private Long principalId;
|
private Long principalId;
|
||||||
private String principalUser;
|
private String principalUser;
|
||||||
private Integer cycle;
|
private Integer cycle;
|
||||||
private Integer workLoad;
|
private Integer workLoad;
|
||||||
private Integer type;
|
|
||||||
private String name;
|
private String name;
|
||||||
private String description;
|
private String description;
|
||||||
private Integer isDelete;
|
private Integer isDelete;
|
||||||
private Integer isFinish;
|
private String status;
|
||||||
private boolean status;
|
private Timestamp deadLine;
|
||||||
private Timestamp beginTime;
|
private Timestamp beginTime;
|
||||||
private Timestamp completeTime;
|
private Timestamp completeTime;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import com.jsl.oa.dao.UserDAO;
|
||||||
import com.jsl.oa.mapper.ModuleMapper;
|
import com.jsl.oa.mapper.ModuleMapper;
|
||||||
import com.jsl.oa.model.dodata.ProjectChildDO;
|
import com.jsl.oa.model.dodata.ProjectChildDO;
|
||||||
import com.jsl.oa.model.dodata.ProjectModuleDO;
|
import com.jsl.oa.model.dodata.ProjectModuleDO;
|
||||||
|
import com.jsl.oa.model.vodata.ProjectChildGetVO;
|
||||||
import com.jsl.oa.model.vodata.ProjectWorkAndNameVO;
|
import com.jsl.oa.model.vodata.ProjectWorkAndNameVO;
|
||||||
import com.jsl.oa.services.ModuleService;
|
import com.jsl.oa.services.ModuleService;
|
||||||
import com.jsl.oa.utils.BaseResponse;
|
import com.jsl.oa.utils.BaseResponse;
|
||||||
|
@ -42,9 +43,15 @@ public class ModuleServiceImpl implements ModuleService {
|
||||||
log.info("不是负责人");
|
log.info("不是负责人");
|
||||||
is = 0;
|
is = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<ProjectChildDO> projectWorkDOList = moduleMapper.getByProjectId(projectId, userId, is);
|
List<ProjectChildDO> projectWorkDOList = moduleMapper.getByProjectId(projectId, userId, is);
|
||||||
return ResultUtil.success(projectWorkDOList);
|
List<ProjectChildGetVO> projectWorkAndNameVOS = new ArrayList<>();
|
||||||
|
for (ProjectChildDO projectWorkDO : projectWorkDOList) {
|
||||||
|
ProjectChildGetVO projectWorkAndNameVO = new ProjectChildGetVO();
|
||||||
|
Processing.copyProperties(projectWorkDO, projectWorkAndNameVO);
|
||||||
|
projectWorkAndNameVO.setPrincipalName(userDAO.getUserById(projectWorkDO.getPrincipalId()).getUsername());
|
||||||
|
projectWorkAndNameVOS.add(projectWorkAndNameVO);
|
||||||
|
}
|
||||||
|
return ResultUtil.success(projectWorkAndNameVOS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -2,7 +2,7 @@ create table oa_project_child
|
||||||
(
|
(
|
||||||
id bigint unsigned auto_increment comment '项目id'
|
id bigint unsigned auto_increment comment '项目id'
|
||||||
primary key,
|
primary key,
|
||||||
project_id bigint unsigned not null comment '主要项目id',
|
project_id bigint unsigned null comment '主要项目id',
|
||||||
name varchar(100) not null comment '项目名称',
|
name varchar(100) not null comment '项目名称',
|
||||||
principal_id bigint unsigned not null comment '项目负责人',
|
principal_id bigint unsigned not null comment '项目负责人',
|
||||||
description json null comment '项目描述(技术选择,描述)',
|
description json null comment '项目描述(技术选择,描述)',
|
||||||
|
@ -13,11 +13,8 @@ create table oa_project_child
|
||||||
created_at timestamp default CURRENT_TIMESTAMP not null comment '创建时间',
|
created_at timestamp default CURRENT_TIMESTAMP not null comment '创建时间',
|
||||||
updated_at timestamp null comment '更新时间',
|
updated_at timestamp null comment '更新时间',
|
||||||
is_delete tinyint(1) default 0 not null comment '项目是否删除',
|
is_delete tinyint(1) default 0 not null comment '项目是否删除',
|
||||||
dead_line timestamp not null comment '子系统的截止时间',
|
|
||||||
status varchar(8) default 'progress' not null comment '系统状态(draft: 草稿,progress: 进行,pause: 暂停,abnormal: 异常,complete: 完成)',
|
|
||||||
constraint oa_project_child_oa_user_id_fk
|
constraint oa_project_child_oa_user_id_fk
|
||||||
foreign key (principal_id) references oa_user (id)
|
foreign key (principal_id) references oa_user (id)
|
||||||
on update cascade
|
on update cascade
|
||||||
)
|
)
|
||||||
comment '项目表';
|
comment '项目表';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user