Commit a235baae authored by lisong's avatar lisong

修改接警记录导出bug

parent e7f5bbf7
...@@ -101,7 +101,8 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> { ...@@ -101,7 +101,8 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
String callTimeEnd, String callTimeEnd,
String type, String type,
String alertSource, String alertSource,
String alarmType); String alarmType,
@Param("list") Set<String> userIds);
List<AlertPaperInfoDto> getAlertPaperInfoList(@Param("regionCodes") List<String> regionCodes, @Param("isHistory") Boolean isHistory); List<AlertPaperInfoDto> getAlertPaperInfoList(@Param("regionCodes") List<String> regionCodes, @Param("isHistory") Boolean isHistory);
......
...@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.elevator.api.enums.DispatchPaperEnums; ...@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.elevator.api.enums.DispatchPaperEnums;
import com.yeejoin.amos.boot.module.elevator.api.dto.*; import com.yeejoin.amos.boot.module.elevator.api.dto.*;
import java.util.List; import java.util.List;
import java.util.Set;
/** /**
* 警情接警填报记录接口类 * 警情接警填报记录接口类
...@@ -80,7 +81,7 @@ public interface IAlertCalledService { ...@@ -80,7 +81,7 @@ public interface IAlertCalledService {
* @param alarmType * @param alarmType
* @return * @return
*/ */
List<AlertCalledRecordDto> queryAlertRecordListByQueryDto(String callTimeStart, String callTimeEnd, String type, String alertSource, String alarmType); List<AlertCalledRecordDto> queryAlertRecordListByQueryDto(String callTimeStart, String callTimeEnd, String type, String alertSource, String alarmType, Set<String> userIds);
/** /**
* 获取坐席信息 * 获取坐席信息
......
...@@ -520,7 +520,12 @@ ...@@ -520,7 +520,12 @@
<if test="alarmType != null and alarmType != ''"> <if test="alarmType != null and alarmType != ''">
AND a.alarm_type = #{alarmType} AND a.alarm_type = #{alarmType}
</if> </if>
<if test="list != null ">
and a.rec_user_id in
<foreach collection="list" item="id" separator="," open="(" close=")">
#{id}
</foreach>
</if>
</select> </select>
......
...@@ -545,6 +545,15 @@ public class AlertCalledController extends BaseController { ...@@ -545,6 +545,15 @@ public class AlertCalledController extends BaseController {
@ApiOperation(value = "导出接警记录信息", notes = "导出接警记录信息") @ApiOperation(value = "导出接警记录信息", notes = "导出接警记录信息")
@GetMapping("/exportAlertRecord") @GetMapping("/exportAlertRecord")
public void exportAlertRecord(AlertCalledRecordDto alertCalledQueryDto, HttpServletResponse response) { public void exportAlertRecord(AlertCalledRecordDto alertCalledQueryDto, HttpServletResponse response) {
//根据当前登陆人的所在区域 找到该区域内的接警人id 再找到相关警情
Set<String> userIds = new HashSet<>();
String regionCode = this.getSelectedOrgInfo().getCompany().getRegionCode();
List<TzsCitInfo> citInfoList = citInfoService.list(new LambdaQueryWrapper<TzsCitInfo>().eq(TzsCitInfo::getRegionCode, regionCode));
if (!ValidationUtil.isEmpty(citInfoList)) {
for (TzsCitInfo citInfo : citInfoList) {
userIds.add(citInfo.getCtiUserId());
}
}
List<AlertCalledRecordDto> list = iAlertCalledService.queryAlertRecordListByQueryDto( List<AlertCalledRecordDto> list = iAlertCalledService.queryAlertRecordListByQueryDto(
alertCalledQueryDto.getCallTimeStart() == null ? null alertCalledQueryDto.getCallTimeStart() == null ? null
: DateUtils.date2LongStr(alertCalledQueryDto.getCallTimeStart()), : DateUtils.date2LongStr(alertCalledQueryDto.getCallTimeStart()),
...@@ -552,7 +561,8 @@ public class AlertCalledController extends BaseController { ...@@ -552,7 +561,8 @@ public class AlertCalledController extends BaseController {
: DateUtils.date2LongStr(alertCalledQueryDto.getCallTimeEnd()), : DateUtils.date2LongStr(alertCalledQueryDto.getCallTimeEnd()),
alertCalledQueryDto.getType(), alertCalledQueryDto.getType(),
alertCalledQueryDto.getAlertSource(), alertCalledQueryDto.getAlertSource(),
alertCalledQueryDto.getAlarmType()); alertCalledQueryDto.getAlarmType(),
userIds);
String fileName = "接警记录" + System.currentTimeMillis(); String fileName = "接警记录" + System.currentTimeMillis();
ExcelUtil.createTemplate(response, fileName, "接警记录", list, AlertCalledRecordDto.class, null, false); ExcelUtil.createTemplate(response, fileName, "接警记录", list, AlertCalledRecordDto.class, null, false);
} }
......
...@@ -401,8 +401,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -401,8 +401,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
} }
@Override @Override
public List<AlertCalledRecordDto> queryAlertRecordListByQueryDto(String callTimeStart, String callTimeEnd, String type, String alertSource, String alarmType) { public List<AlertCalledRecordDto> queryAlertRecordListByQueryDto(String callTimeStart, String callTimeEnd, String type, String alertSource, String alarmType, Set<String> userIds) {
List<AlertCalledRecordDto> list = alertCalledMapper.queryAlertRecordListByQueryDto(callTimeStart,callTimeEnd,type,alertSource,alarmType); List<AlertCalledRecordDto> list = alertCalledMapper.queryAlertRecordListByQueryDto(callTimeStart, callTimeEnd, type, alertSource, alarmType, userIds);
return list; return list;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment