From cbb154b3d05762d1d8aee87b3c11237c8983a60d Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期三, 01 四月 2026 17:06:12 +0800
Subject: [PATCH] 修改bug
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/ProjectController.java | 17 +++++++++++++++--
ruoyi-system/src/main/java/com/ruoyi/system/vo/ProjectDangerousTrendVo.java | 3 +++
ruoyi-system/src/main/java/com/ruoyi/system/vo/ScreenUserVo.java | 4 ++++
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/DashboardStatisticsController.java | 3 +++
ruoyi-system/src/main/resources/mapper/system/RecordMapper.xml | 7 +++++--
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProjectInfoServiceImpl.java | 1 +
6 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/DashboardStatisticsController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/DashboardStatisticsController.java
index f75cebd..3b19da2 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/DashboardStatisticsController.java
+++ b/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());
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/ProjectController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/ProjectController.java
index bf0ba0c..880acaa 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/ProjectController.java
+++ b/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) {
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProjectInfoServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProjectInfoServiceImpl.java
index 142bd8b..a9fb47b 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProjectInfoServiceImpl.java
+++ b/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);
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/vo/ProjectDangerousTrendVo.java b/ruoyi-system/src/main/java/com/ruoyi/system/vo/ProjectDangerousTrendVo.java
index a93647d..4e87982 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/vo/ProjectDangerousTrendVo.java
+++ b/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;
+
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/vo/ScreenUserVo.java b/ruoyi-system/src/main/java/com/ruoyi/system/vo/ScreenUserVo.java
index e85eb1a..9401c11 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/vo/ScreenUserVo.java
+++ b/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;
}
diff --git a/ruoyi-system/src/main/resources/mapper/system/RecordMapper.xml b/ruoyi-system/src/main/resources/mapper/system/RecordMapper.xml
index cb93e6a..5dcd5ad 100644
--- a/ruoyi-system/src/main/resources/mapper/system/RecordMapper.xml
+++ b/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
--
Gitblit v1.7.1