Browse Source

事件分页问题,方向

develop
王兴琳 9 months ago
parent
commit
53b685a0ab
  1. 3
      zc-business/src/main/java/com/zc/business/domain/DcEvent.java
  2. 7
      zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
  3. 10
      zc-business/src/main/resources/mapper/business/DcEventMapper.xml

3
zc-business/src/main/java/com/zc/business/domain/DcEvent.java

@ -61,10 +61,11 @@ public class DcEvent extends BaseEntity {
* 2- * 2-
* 3- * 3-
*/ */
@Excel(name = "方向", readConverterExp = "1=上行,3=下行") @Excel(name = "方向", readConverterExp = "1=菏泽方向,3=济南方向")
//@Excel(name = "方向") //@Excel(name = "方向")
@ApiModelProperty("方向") @ApiModelProperty("方向")
private String direction; private String direction;
/** /**
* 处理人员 * 处理人员
*/ */

7
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.List;
import java.util.Map; 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.DateUtils;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.uuid.IdUtils; import com.ruoyi.common.utils.uuid.IdUtils;
@ -96,8 +99,8 @@ private DcEventAbnormalWeatherMapper dcEventAbnormalWeatherMapper;
String replace1 = dcEvent.getEndStakeMark().replace(" ", "+"); String replace1 = dcEvent.getEndStakeMark().replace(" ", "+");
dcEvent.setEndStakeMark(replace1); dcEvent.setEndStakeMark(replace1);
} }
List<DcEvent> dcEventList = dcEventMapper.selectDcEventList(dcEvent);
List<DcEvent> dcEventList = dcEventMapper.selectDcEventList(dcEvent);
for (DcEvent dcEvents : dcEventList) { for (DcEvent dcEvents : dcEventList) {
// 根据 deptId 获取部门名称 // 根据 deptId 获取部门名称
Long deptId = dcEvents.getDeptId(); Long deptId = dcEvents.getDeptId();
@ -107,7 +110,7 @@ private DcEventAbnormalWeatherMapper dcEventAbnormalWeatherMapper;
dcEvents.setDeptName(deptName); dcEvents.setDeptName(deptName);
} }
return dcEventMapper.selectDcEventList(dcEvent); return dcEventList;
} }
/** /**

10
zc-business/src/main/resources/mapper/business/DcEventMapper.xml

@ -143,7 +143,10 @@
id, id,
dc_event.dept_id as dept_id, dc_event.dept_id as dept_id,
stake_mark, stake_mark,
direction, CASE direction
WHEN '1' THEN '菏泽方向'
WHEN '3' THEN '济南方向'
END AS direction,
dc_event.user_id as user_id, dc_event.user_id as user_id,
sys_user.nick_name as nickName, sys_user.nick_name as nickName,
start_time, start_time,
@ -353,7 +356,10 @@
/*详情可以调用事件处理流程*/ /*详情可以调用事件处理流程*/
SELECT dc_event.id AS id, SELECT dc_event.id AS id,
dc_event.stake_mark, 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,
dc_event.user_id as user_id, dc_event.user_id as user_id,
sys_user.nick_name as nickName, sys_user.nick_name as nickName,

Loading…
Cancel
Save