Browse Source

事件分页问题,方向

develop
王兴琳 9 months ago
parent
commit
53b685a0ab
  1. 3
      zc-business/src/main/java/com/zc/business/domain/DcEvent.java
  2. 9
      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-
* 3-
*/
@Excel(name = "方向", readConverterExp = "1=上行,3=下行")
@Excel(name = "方向", readConverterExp = "1=菏泽方向,3=济南方向")
//@Excel(name = "方向")
@ApiModelProperty("方向")
private String direction;
/**
* 处理人员
*/

9
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<DcEvent> dcEventList = dcEventMapper.selectDcEventList(dcEvent);
for (DcEvent dcEvents : dcEventList) {
List<DcEvent> 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;
}
/**

10
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,

Loading…
Cancel
Save