|
|
@@ -71,7 +71,7 @@ public class ProjectTaskServiceImpl implements ProjectTaskService {
|
|
|
|
|
|
@Override
|
|
|
public List<ProjectTaskListOut> list(ProjectListInput in) {
|
|
|
- if (in.getRoleType()==null)in.setRoleType(0);
|
|
|
+ pushRoleType(in);
|
|
|
in.setUid(SecurityUtils.getUserId());
|
|
|
Long companyId = deptService.selectCompanyByDeptId();
|
|
|
if (companyId!=null)in.setCompanyId(companyId);
|
|
|
@@ -79,6 +79,21 @@ public class ProjectTaskServiceImpl implements ProjectTaskService {
|
|
|
return projectTaskMapper.selectList(in);
|
|
|
}
|
|
|
|
|
|
+ private void pushRoleType(ProjectListInput in) {
|
|
|
+ if (in.getRoleType()==null)in.getRoleType();
|
|
|
+ if (in.getRoleType()==1)in.setRoleType(getRoleType());
|
|
|
+ }
|
|
|
+
|
|
|
+ private Integer getRoleType() {
|
|
|
+ if (SecurityUtils.hashRoles(UserRolesType.MANAGE.getCode())){
|
|
|
+ return 1;
|
|
|
+ }else if (SecurityUtils.hashRoles(UserRolesType.INSPECTORS.getCode())){
|
|
|
+ return 2;
|
|
|
+ }else {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public String importProject(List<ProjectTaskListOut> list, boolean isUpdateSupport, String operName) {
|
|
|
if (StringUtils.isNull(list) || list.size() == 0)
|