Commit 28af09ec authored by zhangyingbin's avatar zhangyingbin

修改获取当前登录人所在单位下的项目列表

parent c3af2df5
...@@ -340,13 +340,13 @@ public class ProjectController extends BaseController { ...@@ -340,13 +340,13 @@ public class ProjectController extends BaseController {
String option = json.getString(XJConstant.PROCESS_PROJECT_STATE); String option = json.getString(XJConstant.PROCESS_PROJECT_STATE);
Project project = projectServiceImpl.getById(sequenceNbr); Project project = projectServiceImpl.getById(sequenceNbr);
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(project)); JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(project));
jsonObject.put(XJConstant.PROCESS_PROJECT_STATE,"符合"); jsonObject.put(XJConstant.PROCESS_PROJECT_STATE,"立项成功");
if("0".equals(option)){ if("0".equals(option)){
jsonObject.put(XJConstant.PROCESS_PROJECT_STATE,"不符合且不需要整改"); jsonObject.put(XJConstant.PROCESS_PROJECT_STATE,"项目退回");
projectInitiationService.execute(project.getInstanceId(),jsonObject,option); projectInitiationService.execute(project.getInstanceId(),jsonObject,option);
projectInitiationService.execute(project.getInstanceId(),jsonObject,option); projectInitiationService.execute(project.getInstanceId(),jsonObject,option);
}else if("2".equals(option)){ }else if("2".equals(option)){
jsonObject.put(XJConstant.PROCESS_PROJECT_STATE,"不符合且需要重新提交资料"); jsonObject.put(XJConstant.PROCESS_PROJECT_STATE,"项目需重新提交资料");
} }
projectInitiationService.execute(project.getInstanceId(),jsonObject,option); projectInitiationService.execute(project.getInstanceId(),jsonObject,option);
return ResponseHelper.buildResponse("ok"); return ResponseHelper.buildResponse("ok");
......
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil; import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil;
import com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectInitiationEnum;
import com.yeejoin.amos.boot.module.ugp.api.dto.ProjectMaterialDto; import com.yeejoin.amos.boot.module.ugp.api.dto.ProjectMaterialDto;
import com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto; import com.yeejoin.amos.boot.module.ugp.api.dto.WelderEquipmentDto;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import com.yeejoin.amos.boot.module.ugp.biz.service.impl.ProjectResourceServiceImpl; import com.yeejoin.amos.boot.module.ugp.biz.service.impl.ProjectResourceServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
...@@ -286,14 +288,12 @@ public class ProjectResourceController extends BaseController { ...@@ -286,14 +288,12 @@ public class ProjectResourceController extends BaseController {
return ResponseHelper.buildResponse(projectResourceServiceImpl.getResourceInfo(type,page,projectResourceinfo)); return ResponseHelper.buildResponse(projectResourceServiceImpl.getResourceInfo(type,page,projectResourceinfo));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/selectByUserId") @GetMapping(value = "/selectByUserId")
@ApiOperation(httpMethod = "get",value = "根据当前登录人获取登录人参与的项目列表", notes = "根据当前登录人获取登录人参与的项目列表") @ApiOperation(httpMethod = "get",value = "根据当前登录人获取登录人参与的项目列表", notes = "根据当前登录人获取登录人参与的项目列表")
public ResponseModel<List<Project>> selectByUserId(){ public ResponseModel<List<Project>> selectByUserId(){
List<Project> projectList = projectResourceServiceImpl.getProjectList();
return ResponseHelper.buildResponse(projectResourceServiceImpl.getProjectList()); projectList = projectList.stream().filter(r -> r.getStatus().equals(ProjectInitiationEnum.流程结束.getName())).collect(Collectors.toList());
return ResponseHelper.buildResponse(projectList);
} }
} }
...@@ -242,6 +242,12 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P ...@@ -242,6 +242,12 @@ public class ProjectResourceServiceImpl extends BaseService<ProjectResourceDto,P
ReginParams.BusinessInfo businessInfo = reginParams.getBusinessInfo(); ReginParams.BusinessInfo businessInfo = reginParams.getBusinessInfo();
String companyId = String.valueOf(businessInfo.getCompanySequenceNbr()); String companyId = String.valueOf(businessInfo.getCompanySequenceNbr());
String roleName = reginParams.getRole().getRoleName(); String roleName = reginParams.getRole().getRoleName();
//判断普通人员在哪个单位
if(OrgEnum.普通人员.getName().equals(roleName)){
if(OrgEnum.安装单位.getKey().equals(orgService.getOrgUsrById(companyId).getOrgExpandAttr1())){
roleName = OrgEnum.安装单位.getName();
}
}
LambdaQueryWrapper<SuperviseRule> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SuperviseRule> wrapper = new LambdaQueryWrapper<>();
List<Project> projectList = new ArrayList<>(); List<Project> projectList = new ArrayList<>();
Set<String> codes = new HashSet<>(); Set<String> codes = new HashSet<>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment