1.添加判断逻辑

dev
862857010@qq.com 2 years ago
parent 23ea36366b
commit 40c7003289
  1. 7
      cjy-mini-project/src/main/java/com/cjy/app/controller/WorkTableController.java
  2. 18
      cjy-project/src/main/java/com/cjy/emergencycommand/domain/dto/EventListDTO.java
  3. 4
      cjy-project/src/main/resources/mapper/emergencycommand/AlarmInfoMapper.xml

@ -65,9 +65,12 @@ public class WorkTableController extends BaseController {
*/
@GetMapping("/eventList")
public TableDataInfo eventList(EventListDTO eventListDTO) {
String userType = getLoginUser().getUser().getUserType();
eventListDTO.setUserId(String.valueOf(getUserId()));
eventListDTO.setOrganCode(getUserOrganCode());
if("scheduling".equals(eventListDTO.getType())){
eventListDTO.setPrincipalUserId(String.valueOf(getUserId()));
}else {
eventListDTO.setUserId(String.valueOf(getUserId()));
}
startPage();
List<EventListVO> list = alarmInfoService.selectAlarmInfoListByUserId(eventListDTO);
return getDataTable(list);

@ -16,6 +16,10 @@ public class EventListDTO {
private String gradeId;
private String eventGradeId;
private String orderType;
private String principalUserId;
// 标识是指挥调度还是我的上报
private String type;
@Override
public String toString() {
@ -31,6 +35,14 @@ public class EventListDTO {
'}';
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getClassificationEventCode() {
return classificationEventCode;
}
@ -95,7 +107,13 @@ public class EventListDTO {
this.userId = userId;
}
public String getPrincipalUserId() {
return principalUserId;
}
public void setPrincipalUserId(String principalUserId) {
this.principalUserId = principalUserId;
}
public String getStatus() {
return status;

@ -423,14 +423,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN sys_dict_data t5 ON t1.status = t5.dict_value AND t5.dict_type = 'alarm_status'
<where>
t1.del_flag !=2 and t1.type in (3)
<!-- <if test="userId != null and userId != ''"> and t1.create_by = #{userId}</if>-->
<if test="userId != null and userId != ''"> and t1.create_by = #{userId}</if>
<if test="status != null and status != ''"> and t1.status = #{status}</if>
<if test="organCode != null "> and t1.organ_code = #{organCode}</if>
<if test="classificationDataCode != null "> and t1.classification_data_code = #{classificationDataCode} </if>
<if test="classificationEventCode != null "> and t1.classification_event_code = #{classificationEventCode} </if>
<if test="gradeId != null "> and t1.grade_id = #{gradeId}</if>
<if test="eventGradeId != null "> and t1.event_grade_id = #{eventGradeId}</if>
<if test="userId != null "> and t1.principal_user_id = #{userId}</if>
<if test="principalUserId != null "> and t1.principal_user_id = #{principalUserId}</if>
</where>
<if test="orderType ==1"> order by t1.create_time desc </if>
<if test="orderType ==2"> order by t1.grade_id desc </if>

Loading…
Cancel
Save