From 53b685a0ab67a4e6eaf960ef621dba08dbac5077 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com> Date: Thu, 22 Feb 2024 18:00:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=88=86=E9=A1=B5=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E6=96=B9=E5=90=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/zc/business/domain/DcEvent.java | 3 ++- .../zc/business/service/impl/DcEventServiceImpl.java | 9 ++++++--- .../main/resources/mapper/business/DcEventMapper.xml | 10 ++++++++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/domain/DcEvent.java b/zc-business/src/main/java/com/zc/business/domain/DcEvent.java index 13361a65..08faa2b1 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcEvent.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcEvent.java @@ -61,10 +61,11 @@ public class DcEvent extends BaseEntity { * 2-中 * 3-下 */ - @Excel(name = "方向", readConverterExp = "1=上行,3=下行") + @Excel(name = "方向", readConverterExp = "1=菏泽方向,3=济南方向") //@Excel(name = "方向") @ApiModelProperty("方向") private String direction; + /** * 处理人员 */ diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java index b922c48d..818869e1 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java @@ -5,6 +5,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import com.github.pagehelper.PageHelper; +import com.ruoyi.common.core.page.PageDomain; +import com.ruoyi.common.core.page.TableSupport; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.uuid.IdUtils; @@ -96,9 +99,9 @@ private DcEventAbnormalWeatherMapper dcEventAbnormalWeatherMapper; String replace1 = dcEvent.getEndStakeMark().replace(" ", "+"); dcEvent.setEndStakeMark(replace1); } - List dcEventList = dcEventMapper.selectDcEventList(dcEvent); - for (DcEvent dcEvents : dcEventList) { + List dcEventList = dcEventMapper.selectDcEventList(dcEvent); + for (DcEvent dcEvents : dcEventList) { // 根据 deptId 获取部门名称 Long deptId = dcEvents.getDeptId(); String deptName = deptService.selectDeptById(deptId).getDeptName(); @@ -107,7 +110,7 @@ private DcEventAbnormalWeatherMapper dcEventAbnormalWeatherMapper; dcEvents.setDeptName(deptName); } - return dcEventMapper.selectDcEventList(dcEvent); + return dcEventList; } /** diff --git a/zc-business/src/main/resources/mapper/business/DcEventMapper.xml b/zc-business/src/main/resources/mapper/business/DcEventMapper.xml index 0cfd9128..52b19c96 100644 --- a/zc-business/src/main/resources/mapper/business/DcEventMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcEventMapper.xml @@ -143,7 +143,10 @@ id, dc_event.dept_id as dept_id, stake_mark, - direction, + CASE direction + WHEN '1' THEN '菏泽方向' + WHEN '3' THEN '济南方向' + END AS direction, dc_event.user_id as user_id, sys_user.nick_name as nickName, start_time, @@ -353,7 +356,10 @@ /*详情可以调用事件处理流程*/ SELECT dc_event.id AS id, dc_event.stake_mark, - dc_event.direction, + CASE dc_event.direction + WHEN '1' THEN '菏泽方向' + WHEN '3' THEN '济南方向' + END AS direction, dc_event.user_id, dc_event.user_id as user_id, sys_user.nick_name as nickName,