Commit e4cc3b01 authored by zhangyingbin's avatar zhangyingbin

修改tzs工作台接口,修改ugp流程待办已办

parent fd57254b
......@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.module.tzs.api.entity.TzsCitInfo;
import com.yeejoin.amos.boot.module.tzs.biz.service.impl.TzsCitInfoServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -89,6 +90,8 @@ public class TzsAuthController extends BaseController {
return ResponseHelper.buildResponse(result);
}
@Value("${tzs.auth.user.photo}")
String userPhoto;
/**
* 获取用户监管机构
......@@ -120,6 +123,7 @@ public class TzsAuthController extends BaseController {
map.put("companyId", company.getParentId()!=0L?company.getParentId():company.getSequenceNbr());
}
map.put("userName", result.getResult().getRealName());
map.put("userPhoto",userPhoto);
}
return ResponseHelper.buildResponse(map);
}
......
......@@ -158,4 +158,7 @@ regulator.unit.code=50
spring.main.allow-bean-definition-overriding=true
# 若tzs和ugp一起,则true
is.ugp=false
\ No newline at end of file
is.ugp=false
#工作台用户统一显示头像
tzs.auth.user.photo=/public/common/userPic.png
\ No newline at end of file
......@@ -563,6 +563,12 @@ public class ProjectController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "根据projectId查询信息", notes = "根据projectId查询信息")
@GetMapping(value = "/getProjectDetails")
public ResponseModel<JSONObject> getProjectDetails(@RequestParam("projectId") Long projectId){
if(ValidationUtil.isEmpty(projectServiceImpl.getById(projectId))){
InstallNotice installNotice = iInstallNoticeService.getById(projectId);
if(!ValidationUtil.isEmpty(installNotice)){
projectId = installNotice.getProjectId();
}
}
JSONObject jsonObject = new JSONObject();
//项目基本信息
jsonObject.put(TabLogoEnum.项目基本信息.getLogo(),projectServiceImpl.selectById(projectId));
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectInitiationEnum;
import com.yeejoin.amos.boot.module.ugp.api.Enum.TaskTypeEnum;
......@@ -28,6 +29,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest;
import java.time.LocalDate;
import java.util.*;
import java.util.stream.Collectors;
......@@ -205,14 +207,18 @@ public class TaskController {
List todyCompletedTask = new ArrayList();
Long unitId = orgService.getReginParams().getBusinessInfo().getCompanySequenceNbr();
LambdaQueryWrapper<Task> wrapper = new LambdaQueryWrapper<>();
LambdaQueryWrapper<Task> Taskwrapper = new LambdaQueryWrapper<>();
wrapper.eq(Task::getUnitId,unitId);
if(true){
wrapper.eq(Task::getTaskType,false);
myTask = iTzUgpTaskService.list(wrapper);
}else {
wrapper.eq(Task::getTaskType,true);
todyCompletedTask = iTzUgpTaskService.list(wrapper);
}
Taskwrapper.eq(Task::getUnitId,unitId);
wrapper.eq(Task::getStatus,0);
myTask = iTzUgpTaskService.list(wrapper);
Taskwrapper.eq(Task::getStatus,1);
LocalDate today = LocalDate.now();
Taskwrapper.like(Task::getRecDate, today);
todyCompletedTask = iTzUgpTaskService.list(Taskwrapper);
Map<String,String> map = new HashMap();
map.put("myTask", String.valueOf(myTask.size()));
......
......@@ -284,7 +284,6 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
//更新任务表的状态 已办
taskType = getUnitId(unitIds, project, superviseRule);
unitIds = new ArrayList<>();
if(ProjectInitiationEnum.设计开工资料提交.getName().equals(project.getStatus()) || ProjectInitiationEnum.安装开工资料提交.getName().equals(project.getStatus())){
project.setStatus(ProjectInitiationEnum.提交资料.getName());
}
......@@ -332,9 +331,9 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
taskType = TaskTypeEnum.流程.getKey();
}
if (ProjectInitiationEnum.提交资料.getName().equals(project.getStatus()) || ProjectInitiationEnum.安装开工资料提交.getName().equals(project.getStatus()) || ProjectInitiationEnum.设计开工资料提交.getName().equals(project.getStatus())) {
if(OrgEnum.安装单位.getType().equals(orgService.getReginParams().getBusinessInfo().getCompanyType())){
if(OrgEnum.安装单位.getKey().equals(orgService.getReginParams().getBusinessInfo().getCompanyType())){
unitIds.add(project.getInstallationUnitId());
} else if(OrgEnum.设计单位.getType().equals(orgService.getReginParams().getBusinessInfo().getCompanyType())){
} else if(OrgEnum.设计单位.getKey().equals(orgService.getReginParams().getBusinessInfo().getCompanyType())){
unitIds.add(project.getDesignUnitId());
} else {
unitIds.add(project.getDesignUnitId());
......
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