ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/DashboardStatisticsController.java
@@ -62,6 +62,7 @@ public R<ScreenUserVo> getLoginInfo(Integer type, Integer id) { ScreenUserVo screenUserVo = new ScreenUserVo(); screenUserVo.setType(type); if(type!=null && id !=null){ if(type==1){ @@ -69,6 +70,7 @@ if(client==null){ return R.fail("委托方不存在"); } screenUserVo.setClientId(id); ClientParam param = clientParamService.getOne(new LambdaQueryWrapper<ClientParam>().eq(ClientParam::getClientId, client.getId())); if(param!=null){ screenUserVo.setLogo(param.getLogo()); @@ -92,6 +94,7 @@ return R.fail("项目不存在"); } Client client = clientService.getById(project.getClientId()); screenUserVo.setClientId(client.getId()); ClientParam param = clientParamService.getOne(new LambdaQueryWrapper<ClientParam>().eq(ClientParam::getClientId, client.getId())); if(param!=null){ screenUserVo.setLogo(param.getLogo()); ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/ProjectController.java
@@ -312,12 +312,25 @@ @ApiOperation(value = "获取计划下拉框信息",response = Plan.class) @GetMapping("/getPlanList") public R<List<Plan>> getPlanList() { List<Plan> list = planService.list(new LambdaQueryWrapper<Plan>().eq(Plan::getDeleted, false)); public R<List<Plan>> getPlanList(Integer projectId) { List<Plan> list = planService.list(new LambdaQueryWrapper<Plan>().eq(projectId!=null,Plan::getProjectId,projectId).eq(Plan::getDeleted, false)); return R.ok(list); } @ApiOperation(value = "获取计划下拉框信息",response = Plan.class) @GetMapping("/getPlanListFromOnDuty") public R<List<Plan>> getPlanListFromOnDuty(Integer projectId) { List<OnDuty> list = onDutyService.list(new LambdaQueryWrapper<OnDuty>().eq(OnDuty::getProjectId, projectId)); if(list.isEmpty()){ return R.ok(new ArrayList<>()); } List<Integer> ids = list.stream().map(OnDuty::getPlanId).toList(); List<Plan> resultList = planService.list(new LambdaQueryWrapper<Plan>().in(Plan::getId,ids).eq(Plan::getDeleted, false)); return R.ok(resultList); } @ApiOperation(value = "获取人员在岗列表",response = ProjectPersonOnDutyListVo.class) @PostMapping("/getProjectOnDutyList") public R<Page<ProjectPersonOnDutyListVo>> getProjectOnDutyList(@RequestBody @Valid ProjectPersonListQuery query) { ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProjectInfoServiceImpl.java
@@ -194,6 +194,7 @@ // 如果没有则沿用上次的 if(vo.getLevel()!=null){ temp=vo.getLevel(); vo.setStatus(2); }else { vo.setLevel(temp); } ruoyi-system/src/main/java/com/ruoyi/system/vo/ProjectDangerousTrendVo.java
@@ -19,4 +19,7 @@ private String time; @ApiModelProperty("状态 1有2没有") private Integer status=1; } ruoyi-system/src/main/java/com/ruoyi/system/vo/ScreenUserVo.java
@@ -43,4 +43,8 @@ @ApiModelProperty(value = "项目名称") private String projectName; @ApiModelProperty("委托方id") private Integer clientId; } ruoyi-system/src/main/resources/mapper/system/RecordMapper.xml
@@ -59,8 +59,11 @@ <if test="query.content != null"> and (t1.hierarchy_name like concat('%',#{query.content},'%') or t2.description like concat('%',#{query.content},'%')) </if> <if test="query.startTime != null and query.startTime !='' and query.endTime!=null and query.endTime !=''"> and t1.create_time between #{query.startTime} and #{query.endTime} <if test="query.startTime != null and query.startTime !=''"> and t1.create_time > #{query.startTime} </if> <if test="query.endTime!=null and query.endTime !=''"> and #{query.endTime} >t1.create_time </if> ) as o where 1=1