Commit 92bad861 authored by tianyiming's avatar tianyiming

处置记录、接警记录、通话记录列表添加技能组过滤

parent 32edacd2
...@@ -69,7 +69,7 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> { ...@@ -69,7 +69,7 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
@Param("alertStatus") String alertStatus, @Param("alertStatus") String alertStatus,
@Param("sortParam") String sortParam, @Param("sortParam") String sortParam,
@Param("sortRule") String sortRule, @Param("sortRule") String sortRule,
@Param("userIds") Set<String> userIds, @Param("groupCode") String groupCode,
@Param("ids") List<String> ids); @Param("ids") List<String> ids);
Map<String, Integer> getTodayEmergencyCount(String regionCode); Map<String, Integer> getTodayEmergencyCount(String regionCode);
...@@ -100,7 +100,7 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> { ...@@ -100,7 +100,7 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
String type, String type,
String alertSource, String alertSource,
String alarmType, String alarmType,
@Param("list") Set<String> userIds, @Param("groupCode") String groupCode,
@Param("ids") List<String> ids); @Param("ids") List<String> ids);
List<AlertPaperInfoDto> getAlertPaperInfoList(@Param("regionCodes") List<String> regionCodes, @Param("isHistory") Boolean isHistory); List<AlertPaperInfoDto> getAlertPaperInfoList(@Param("regionCodes") List<String> regionCodes, @Param("isHistory") Boolean isHistory);
......
...@@ -25,9 +25,9 @@ public interface VoiceRecordFileMapper extends BaseMapper<VoiceRecordFile> { ...@@ -25,9 +25,9 @@ public interface VoiceRecordFileMapper extends BaseMapper<VoiceRecordFile> {
@Param("workNum") String workNum, @Param("workNum") String workNum,
@Param("sortParam") String sortParam, @Param("sortParam") String sortParam,
@Param("sortRule") String sortRule, @Param("sortRule") String sortRule,
@Param("userIds") Set<String> UserIds); @Param("groupCode") String groupCode);
VoiceRecordFileDto getRecordById(@Param("sequenceNbr") Long sequenceNbr); VoiceRecordFileDto getRecordById(@Param("sequenceNbr") Long sequenceNbr);
List<VoiceRecordFileDto> selectExportData(@Param("ids") List<String> ids); List<VoiceRecordFileDto> selectExportData(@Param("ids") List<String> ids, @Param("groupCode") String groupCode);
} }
...@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams; ...@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.module.elevator.api.dto.*; import com.yeejoin.amos.boot.module.elevator.api.dto.*;
import com.yeejoin.amos.boot.module.elevator.api.enums.DispatchPaperEnums; 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 com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -55,7 +56,8 @@ public interface IAlertCalledService { ...@@ -55,7 +56,8 @@ public interface IAlertCalledService {
String alertStatus, String alertStatus,
String sortParam, String sortParam,
String sortRule, String sortRule,
List<String> ids); List<String> ids,
AgencyUserModel userModel);
/** /**
* 更新警情阶段信息 * 更新警情阶段信息
...@@ -84,7 +86,7 @@ public interface IAlertCalledService { ...@@ -84,7 +86,7 @@ public interface IAlertCalledService {
* @param alarmType * @param alarmType
* @return * @return
*/ */
List<AlertCalledRecordDto> queryAlertRecordListByQueryDto(String callTimeStart, String callTimeEnd, String type, String alertSource, String alarmType, Set<String> userIds, List<String> ids); List<AlertCalledRecordDto> queryAlertRecordListByQueryDto(String callTimeStart, String callTimeEnd, String type, String alertSource, String alarmType, String groupCode, List<String> ids);
/** /**
* 获取坐席信息 * 获取坐席信息
......
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.elevator.api.service; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.elevator.api.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.elevator.api.dto.VoiceRecordFileDto; import com.yeejoin.amos.boot.module.elevator.api.dto.VoiceRecordFileDto;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import java.util.List; import java.util.List;
...@@ -16,9 +17,9 @@ public interface IVoiceRecordFileService { ...@@ -16,9 +17,9 @@ public interface IVoiceRecordFileService {
void publishRecord(VoiceRecordFileDto model); void publishRecord(VoiceRecordFileDto model);
Page<VoiceRecordFileDto> queryRecordListByQueryDto(Page<VoiceRecordFileDto> page, String telEndTimeStr, String telEndTimeStr1, String fileType, String tel, String workNum, String sortParam, String sortRule); Page<VoiceRecordFileDto> queryRecordListByQueryDto(Page<VoiceRecordFileDto> page, String telEndTimeStr, String telEndTimeStr1, String fileType, String tel, String workNum, String sortParam, String sortRule, AgencyUserModel userModel);
VoiceRecordFileDto getRecordById(Long sequenceNbr); VoiceRecordFileDto getRecordById(Long sequenceNbr);
List<VoiceRecordFileDto> selectExportData(String exportId); List<VoiceRecordFileDto> selectExportData(String exportId,AgencyUserModel userModel);
} }
...@@ -149,6 +149,7 @@ ...@@ -149,6 +149,7 @@
LEFT JOIN idx_biz_jg_other_info ibjoi ON ibjoi.CODE96333 = a.device_id LEFT JOIN idx_biz_jg_other_info ibjoi ON ibjoi.CODE96333 = a.device_id
LEFT JOIN idx_biz_jg_use_info ibjui ON ibjoi.RECORD = ibjui.RECORD LEFT JOIN idx_biz_jg_use_info ibjui ON ibjoi.RECORD = ibjui.RECORD
WHERE a.is_delete = 0 WHERE a.is_delete = 0
and a.skill_group = #{groupCode}
<if test="workOrderNumber != null and workOrderNumber != ''"> <if test="workOrderNumber != null and workOrderNumber != ''">
AND a.work_order_number like AND a.work_order_number like
CONCAT(CONCAT('%',#{workOrderNumber}),'%') CONCAT(CONCAT('%',#{workOrderNumber}),'%')
...@@ -196,12 +197,6 @@ ...@@ -196,12 +197,6 @@
<if test="alertStatus != null and alertStatus != ''"> <if test="alertStatus != null and alertStatus != ''">
AND a.alert_status = #{alertStatus} AND a.alert_status = #{alertStatus}
</if> </if>
<if test="userIds != null and userIds.size>0">
AND a.rec_user_id in
<foreach collection="userIds" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="ids != null and ids.size>0"> <if test="ids != null and ids.size>0">
AND a.sequence_nbr in AND a.sequence_nbr in
<foreach collection="ids" item="item" index="index" open="(" separator="," close=")"> <foreach collection="ids" item="item" index="index" open="(" separator="," close=")">
...@@ -451,7 +446,8 @@ ...@@ -451,7 +446,8 @@
a.address a.address
FROM FROM
tz_alert_called a tz_alert_called a
WHERE 1=1 WHERE
skill_group = #{groupCode}
<if test="callTimeStart != null "> <if test="callTimeStart != null ">
and #{callTimeStart} <![CDATA[ <= ]]> and #{callTimeStart} <![CDATA[ <= ]]>
a.call_time a.call_time
...@@ -469,12 +465,6 @@ ...@@ -469,12 +465,6 @@
<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 list.size() > 0 ">
and a.rec_user_id in
<foreach collection="list" item="id" separator="," open="(" close=")">
#{id}
</foreach>
</if>
<if test="ids != null and ids.size() > 0 "> <if test="ids != null and ids.size() > 0 ">
and a.sequence_nbr in and a.sequence_nbr in
<foreach collection="ids" item="id" separator="," open="(" close=")"> <foreach collection="ids" item="id" separator="," open="(" close=")">
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
LEFT JOIN tz_alert_called a ON a.sequence_nbr = LEFT JOIN tz_alert_called a ON a.sequence_nbr =
r.alert_id r.alert_id
WHERE r.is_delete = 0 WHERE r.is_delete = 0
and r.skill_group = #{groupCode}
<if test="workNum != null and workNum != ''"> <if test="workNum != null and workNum != ''">
AND a.work_order_number like AND a.work_order_number like
CONCAT(CONCAT('%',#{workNum}),'%') CONCAT(CONCAT('%',#{workNum}),'%')
...@@ -39,12 +40,6 @@ ...@@ -39,12 +40,6 @@
<if test="fileType != null and fileType != ''"> <if test="fileType != null and fileType != ''">
AND r.file_type = #{fileType} AND r.file_type = #{fileType}
</if> </if>
<if test="userIds != null and userIds.size>0">
and a.rec_user_id in
<foreach collection="userIds" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<choose> <choose>
<when test="sortParam != null and sortParam != '' and sortRule != null and sortRule != '' "> <when test="sortParam != null and sortParam != '' and sortRule != null and sortRule != '' ">
ORDER BY ${sortParam} ${sortRule} ORDER BY ${sortParam} ${sortRule}
...@@ -97,6 +92,7 @@ ...@@ -97,6 +92,7 @@
tz_voice_record_file r tz_voice_record_file r
LEFT JOIN tz_alert_called a ON a.sequence_nbr = r.alert_id LEFT JOIN tz_alert_called a ON a.sequence_nbr = r.alert_id
where r.is_delete = 0 where r.is_delete = 0
and r.skill_group = #{groupCode}
<if test="ids != null and ids.size() > 0"> <if test="ids != null and ids.size() > 0">
and r.sequence_nbr in and r.sequence_nbr in
<foreach item="item" collection="ids" separator="," open="(" close=")" index=""> #{item} <foreach item="item" collection="ids" separator="," open="(" close=")" index=""> #{item}
......
...@@ -111,6 +111,9 @@ public class AlertCalledController extends BaseController { ...@@ -111,6 +111,9 @@ public class AlertCalledController extends BaseController {
@Autowired @Autowired
private ElevatorServiceImpl iElevatorService; private ElevatorServiceImpl iElevatorService;
@Autowired
CtiServiceImpl ctiService;
/** /**
* 新增警情接警填报记录 * 新增警情接警填报记录
* *
...@@ -343,6 +346,10 @@ public class AlertCalledController extends BaseController { ...@@ -343,6 +346,10 @@ public class AlertCalledController extends BaseController {
Page<AlertCalled> pageBean; Page<AlertCalled> pageBean;
IPage<AlertCalled> page; IPage<AlertCalled> page;
QueryWrapper<AlertCalled> alertCalledQueryWrapper = new QueryWrapper<>(); QueryWrapper<AlertCalled> alertCalledQueryWrapper = new QueryWrapper<>();
AgencyUserModel userModel = this.getSelectedOrgInfo().getUserModel();
String groupCode = ctiService.getSkillGroup(userModel.getUserId());
alertCalledQueryWrapper.eq("skill_group",groupCode);
setQueryWrapper(alertCalledQueryWrapper, alertCalled, sort); setQueryWrapper(alertCalledQueryWrapper, alertCalled, sort);
...@@ -430,24 +437,25 @@ public class AlertCalledController extends BaseController { ...@@ -430,24 +437,25 @@ public class AlertCalledController extends BaseController {
page.setSize(pageSize); page.setSize(pageSize);
String sortParam = ""; String sortParam = "";
String sortRule = ""; String sortRule = "";
if(sort!=null) { // 排序失效 if (sort != null) { // 排序失效
String[] date= sort.split(","); String[] date = sort.split(",");
if(date[1].equals("ascend")) { if (date[1].equals("ascend")) {
sortParam = RedisKey.humpToLine(date[0]); sortParam = RedisKey.humpToLine(date[0]);
sortRule = "asc"; sortRule = "asc";
}else { } else {
sortParam =RedisKey.humpToLine(date[0]); sortParam = RedisKey.humpToLine(date[0]);
sortRule = "desc"; sortRule = "desc";
} }
}else { } else {
sortParam = "call_time"; sortParam = "call_time";
sortRule = "desc"; sortRule = "desc";
} }
AgencyUserModel userModel = this.getSelectedOrgInfo().getUserModel();
Page<AlertCalledQueryDto> pageBean = iAlertCalledService.queryAlertListByQueryDto(page, Page<AlertCalledQueryDto> pageBean = iAlertCalledService.queryAlertListByQueryDto(page,
alertCalledQueryDto.getWorkOrderNumber(),alertCalledQueryDto.getCreator(),alertCalledQueryDto.getEmergency(),alertCalledQueryDto.getEmergencyTimeStart(), alertCalledQueryDto.getWorkOrderNumber(), alertCalledQueryDto.getCreator(), alertCalledQueryDto.getEmergency(), alertCalledQueryDto.getEmergencyTimeStart(),
alertCalledQueryDto.getEmergencyTimeEnd(),alertCalledQueryDto.getEmergencyCall(),alertCalledQueryDto.getDeviceId(),alertCalledQueryDto.getElevatorAddress(), alertCalledQueryDto.getEmergencyTimeEnd(), alertCalledQueryDto.getEmergencyCall(), alertCalledQueryDto.getDeviceId(), alertCalledQueryDto.getElevatorAddress(),
alertCalledQueryDto.getDistrict(),alertCalledQueryDto.getAlertType(),alertCalledQueryDto.getAlertSource(),alertCalledQueryDto.getAlertStage(),alertCalledQueryDto.getAlertStatus(), alertCalledQueryDto.getDistrict(), alertCalledQueryDto.getAlertType(), alertCalledQueryDto.getAlertSource(), alertCalledQueryDto.getAlertStage(), alertCalledQueryDto.getAlertStatus(),
sortParam,sortRule, null); sortParam, sortRule, null,userModel);
Page<AlertCalledQueryDto> result = new Page<AlertCalledQueryDto>(alertCalledQueryDto.getPageNum(), Page<AlertCalledQueryDto> result = new Page<AlertCalledQueryDto>(alertCalledQueryDto.getPageNum(),
alertCalledQueryDto.getPageSize()); alertCalledQueryDto.getPageSize());
long totle = pageBean.getTotal(); long totle = pageBean.getTotal();
...@@ -478,11 +486,12 @@ public class AlertCalledController extends BaseController { ...@@ -478,11 +486,12 @@ public class AlertCalledController extends BaseController {
} }
page.setCurrent(0); page.setCurrent(0);
page.setSize(Long.MAX_VALUE); page.setSize(Long.MAX_VALUE);
AgencyUserModel userModel = this.getSelectedOrgInfo().getUserModel();
Page<AlertCalledQueryDto> pageBean = iAlertCalledService.queryAlertListByQueryDto(page, Page<AlertCalledQueryDto> pageBean = iAlertCalledService.queryAlertListByQueryDto(page,
alertCalledQueryDto.getWorkOrderNumber(),alertCalledQueryDto.getCreator(),alertCalledQueryDto.getEmergency(),alertCalledQueryDto.getEmergencyTimeStart(), alertCalledQueryDto.getWorkOrderNumber(),alertCalledQueryDto.getCreator(),alertCalledQueryDto.getEmergency(),alertCalledQueryDto.getEmergencyTimeStart(),
alertCalledQueryDto.getEmergencyTimeEnd(),alertCalledQueryDto.getEmergencyCall(),alertCalledQueryDto.getDeviceId(),alertCalledQueryDto.getElevatorAddress(), alertCalledQueryDto.getEmergencyTimeEnd(),alertCalledQueryDto.getEmergencyCall(),alertCalledQueryDto.getDeviceId(),alertCalledQueryDto.getElevatorAddress(),
alertCalledQueryDto.getDistrict(),alertCalledQueryDto.getAlertType(),alertCalledQueryDto.getAlertSource(),alertCalledQueryDto.getAlertStage(),alertCalledQueryDto.getAlertStatus(), alertCalledQueryDto.getDistrict(),alertCalledQueryDto.getAlertType(),alertCalledQueryDto.getAlertSource(),alertCalledQueryDto.getAlertStage(),alertCalledQueryDto.getAlertStatus(),
sortParam,sortRule, alertCalledQueryDto.getIds()); sortParam,sortRule, alertCalledQueryDto.getIds(),userModel);
List<AlertCalledQueryDto> list = pageBean.getRecords(); List<AlertCalledQueryDto> list = pageBean.getRecords();
String fileName = "处置记录" + System.currentTimeMillis(); String fileName = "处置记录" + System.currentTimeMillis();
...@@ -502,6 +511,8 @@ public class AlertCalledController extends BaseController { ...@@ -502,6 +511,8 @@ public class AlertCalledController extends BaseController {
userIds.add(citInfo.getCtiUserId()); userIds.add(citInfo.getCtiUserId());
} }
} }
AgencyUserModel userModel = this.getSelectedOrgInfo().getUserModel();
String groupCode = ctiService.getSkillGroup(userModel.getUserId());
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()),
...@@ -510,7 +521,7 @@ public class AlertCalledController extends BaseController { ...@@ -510,7 +521,7 @@ public class AlertCalledController extends BaseController {
alertCalledQueryDto.getType(), alertCalledQueryDto.getType(),
alertCalledQueryDto.getAlertSource(), alertCalledQueryDto.getAlertSource(),
alertCalledQueryDto.getAlarmType(), alertCalledQueryDto.getAlarmType(),
userIds, groupCode,
alertCalledQueryDto.getIds()); alertCalledQueryDto.getIds());
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);
......
...@@ -18,6 +18,8 @@ import com.yeejoin.amos.boot.module.elevator.api.service.IUseUnitService; ...@@ -18,6 +18,8 @@ import com.yeejoin.amos.boot.module.elevator.api.service.IUseUnitService;
import com.yeejoin.amos.boot.module.elevator.biz.service.impl.ElevatorServiceImpl; import com.yeejoin.amos.boot.module.elevator.biz.service.impl.ElevatorServiceImpl;
import com.yeejoin.amos.boot.module.elevator.biz.service.impl.VoiceRecordFileServiceImpl; import com.yeejoin.amos.boot.module.elevator.biz.service.impl.VoiceRecordFileServiceImpl;
import com.yeejoin.amos.boot.module.elevator.biz.utils.RedisUtil; import com.yeejoin.amos.boot.module.elevator.biz.utils.RedisUtil;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.util.StopWatch; import org.springframework.util.StopWatch;
...@@ -186,7 +188,7 @@ public class TemplateExportController extends BaseController { ...@@ -186,7 +188,7 @@ public class TemplateExportController extends BaseController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "根据字段类型导出", notes = "根据字段类型导出") @ApiOperation(httpMethod = "POST", value = "根据字段类型导出", notes = "根据字段类型导出")
@PostMapping("/exportByTypeParams") @PostMapping("/exportByTypeParams")
public void exportByTypeParams(@RequestBody ExportDto exportDto, HttpServletResponse response) throws Exception { public void exportByTypeParams(@RequestBody ExportDto exportDto, HttpServletResponse response) throws Exception {
...@@ -245,7 +247,10 @@ public class TemplateExportController extends BaseController { ...@@ -245,7 +247,10 @@ public class TemplateExportController extends BaseController {
list = iRescueStationService.selectExportData(exportDto.getExportId()); list = iRescueStationService.selectExportData(exportDto.getExportId());
} else if("VOICE_RECORD".equals(exportDto.getExportType())) { // 查询救援站数据 } else if("VOICE_RECORD".equals(exportDto.getExportType())) { // 查询救援站数据
sheetName = "通话录音"; sheetName = "通话录音";
list = voiceRecordFileServiceImpl.selectExportData(exportDto.getExportId()); AgencyUserModel userModel = this.getSelectedOrgInfo().getUserModel();
if (!ObjectUtils.isEmpty(userModel)) {
list = voiceRecordFileServiceImpl.selectExportData(exportDto.getExportId(), userModel);
}
} }
ExcelUtil.createTemplateWithHeaders(response, fileName, sheetName, list,heads,headstr,exportDto.getFileType()); ExcelUtil.createTemplateWithHeaders(response, fileName, sheetName, list,heads,headstr,exportDto.getFileType());
} }
......
...@@ -12,6 +12,7 @@ import com.yeejoin.amos.boot.module.elevator.api.entity.AlertCalled; ...@@ -12,6 +12,7 @@ import com.yeejoin.amos.boot.module.elevator.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.elevator.api.entity.VoiceRecordFile; import com.yeejoin.amos.boot.module.elevator.api.entity.VoiceRecordFile;
import com.yeejoin.amos.boot.module.elevator.biz.service.impl.AlertCalledServiceImpl; import com.yeejoin.amos.boot.module.elevator.biz.service.impl.AlertCalledServiceImpl;
import com.yeejoin.amos.boot.module.elevator.biz.service.impl.VoiceRecordFileServiceImpl; import com.yeejoin.amos.boot.module.elevator.biz.service.impl.VoiceRecordFileServiceImpl;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -131,9 +132,10 @@ public class VoiceRecordFileController extends BaseController { ...@@ -131,9 +132,10 @@ public class VoiceRecordFileController extends BaseController {
sortParam = "tel_start_time"; sortParam = "tel_start_time";
sortRule = "desc"; sortRule = "desc";
} }
AgencyUserModel userModel = this.getSelectedOrgInfo().getUserModel();
Page<VoiceRecordFileDto> pageBean = voiceRecordFileServiceImpl.queryRecordListByQueryDto(page, Page<VoiceRecordFileDto> pageBean = voiceRecordFileServiceImpl.queryRecordListByQueryDto(page,
model.getTelStartTimeStr(),model.getTelEndTimeStr(),model.getFileType(),model.getTel(), model.getTelStartTimeStr(),model.getTelEndTimeStr(),model.getFileType(),model.getTel(),
model.getWorkNum(),sortParam,sortRule); model.getWorkNum(),sortParam,sortRule,userModel);
Page<VoiceRecordFileDto> result = new Page<VoiceRecordFileDto>(pageNum,pageSize); Page<VoiceRecordFileDto> result = new Page<VoiceRecordFileDto>(pageNum,pageSize);
long totle = pageBean.getTotal(); long totle = pageBean.getTotal();
result.setRecords(pageBean.getRecords()); result.setRecords(pageBean.getRecords());
......
...@@ -271,25 +271,18 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -271,25 +271,18 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
String alertStatus, String alertStatus,
String sortParam, String sortParam,
String sortRule, String sortRule,
List<String> ids List<String> ids,
AgencyUserModel userModel
) { ) {
//获取当前登陆人所在单位的下的所有接警人员的userId //获取当前登陆人所在的技能组
Set<String> userIds = new HashSet<>(); String groupCode = ctiService.getSkillGroup(userModel.getUserId());
String regionCode = citInfoService.getReginParams().getCompany().getRegionCode(); if (null == groupCode) {
List<TzsCitInfo> citInfoList = citInfoService.list(new LambdaQueryWrapper<TzsCitInfo>().eq(TzsCitInfo::getRegionCode,regionCode));
if(!ValidationUtil.isEmpty(citInfoList)){
for(TzsCitInfo citInfo : citInfoList){
userIds.add(citInfo.getCtiUserId());
}
}
if (ValidationUtil.isEmpty(userIds)) {
return new Page<>(); return new Page<>();
} }
Page<List<AlertCalledQueryDto>> list = alertCalledMapper.queryAlertListByQueryDto(page,
Page<List<AlertCalledQueryDto>>list = alertCalledMapper.queryAlertListByQueryDto(page, workOrderNumber, creator, emergency, emergencyTimeStart,
workOrderNumber,creator,emergency,emergencyTimeStart, emergencyTimeEnd, emergencyCall, deviceId, elevatorAddress, district, alertType,
emergencyTimeEnd,emergencyCall,deviceId,elevatorAddress,district,alertType, alertSource, alertStage, alertStatus, sortParam, sortRule, groupCode, ids);
alertSource,alertStage,alertStatus,sortParam,sortRule,userIds,ids);
Page<AlertCalledQueryDto> page1 = new Page<>(); Page<AlertCalledQueryDto> page1 = new Page<>();
List<AlertCalledQueryDto> resultDtoList = JSONArray.parseArray(JSONArray.toJSONString(list.getRecords()),AlertCalledQueryDto.class); List<AlertCalledQueryDto> resultDtoList = JSONArray.parseArray(JSONArray.toJSONString(list.getRecords()),AlertCalledQueryDto.class);
page1.setCurrent(page.getCurrent()); page1.setCurrent(page.getCurrent());
...@@ -432,8 +425,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall ...@@ -432,8 +425,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
} }
@Override @Override
public List<AlertCalledRecordDto> queryAlertRecordListByQueryDto(String callTimeStart, String callTimeEnd, String type, String alertSource, String alarmType, Set<String> userIds, List<String> ids) { public List<AlertCalledRecordDto> queryAlertRecordListByQueryDto(String callTimeStart, String callTimeEnd, String type, String alertSource, String alarmType, String groupCode, List<String> ids) {
List<AlertCalledRecordDto> list = alertCalledMapper.queryAlertRecordListByQueryDto(callTimeStart, callTimeEnd, type, alertSource, alarmType, userIds, ids); List<AlertCalledRecordDto> list = alertCalledMapper.queryAlertRecordListByQueryDto(callTimeStart, callTimeEnd, type, alertSource, alarmType, groupCode, ids);
return list; return list;
} }
......
...@@ -12,6 +12,7 @@ import com.yeejoin.amos.boot.module.elevator.api.entity.VoiceRecordLog; ...@@ -12,6 +12,7 @@ import com.yeejoin.amos.boot.module.elevator.api.entity.VoiceRecordLog;
import com.yeejoin.amos.boot.module.elevator.api.mapper.VoiceRecordFileMapper; import com.yeejoin.amos.boot.module.elevator.api.mapper.VoiceRecordFileMapper;
import com.yeejoin.amos.boot.module.elevator.api.service.ICtiService; import com.yeejoin.amos.boot.module.elevator.api.service.ICtiService;
import com.yeejoin.amos.boot.module.elevator.api.service.IVoiceRecordFileService; import com.yeejoin.amos.boot.module.elevator.api.service.IVoiceRecordFileService;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
...@@ -82,23 +83,15 @@ public class VoiceRecordFileServiceImpl extends BaseService<VoiceRecordFileDto,V ...@@ -82,23 +83,15 @@ public class VoiceRecordFileServiceImpl extends BaseService<VoiceRecordFileDto,V
} }
@Override @Override
public Page<VoiceRecordFileDto> queryRecordListByQueryDto(Page<VoiceRecordFileDto> page, String telStartTimeStr, String telEndTimeStr, String fileType, String tel, String workNum, String sortParam, String sortRule) { public Page<VoiceRecordFileDto> queryRecordListByQueryDto(Page<VoiceRecordFileDto> page, String telStartTimeStr, String telEndTimeStr, String fileType, String tel, String workNum, String sortParam, String sortRule, AgencyUserModel userModel) {
//获取当前登陆人所在单位的下的所有接警人员的userId //获取当前登陆人所在的技能组
Set<String> userIds = new HashSet<>(); String groupCode = ctiService.getSkillGroup(userModel.getUserId());
String regionCode = citInfoService.getReginParams().getCompany().getRegionCode(); if (null == groupCode) {
List<TzsCitInfo> citInfoList = citInfoService.list(new LambdaQueryWrapper<TzsCitInfo>().eq(TzsCitInfo::getRegionCode,regionCode)); return new Page<>();
if(!ValidationUtil.isEmpty(citInfoList)){
for(TzsCitInfo citInfo : citInfoList){
userIds.add(citInfo.getCtiUserId());
}
} }
if (ValidationUtil.isEmpty(userIds)) {
return page;
}
Page<List<VoiceRecordFileDto>>list = baseMapper.queryRecordListByQueryDto(page, Page<List<VoiceRecordFileDto>>list = baseMapper.queryRecordListByQueryDto(page,
telStartTimeStr,telEndTimeStr,fileType,tel, telStartTimeStr,telEndTimeStr,fileType,tel,
workNum,sortParam,sortRule,userIds); workNum,sortParam,sortRule,groupCode);
Page<VoiceRecordFileDto> page1 = new Page<>(); Page<VoiceRecordFileDto> page1 = new Page<>();
List<VoiceRecordFileDto> resultDtoList = JSONArray.parseArray(JSONArray.toJSONString(list.getRecords()),VoiceRecordFileDto.class); List<VoiceRecordFileDto> resultDtoList = JSONArray.parseArray(JSONArray.toJSONString(list.getRecords()),VoiceRecordFileDto.class);
page1.setCurrent(page.getCurrent()); page1.setCurrent(page.getCurrent());
...@@ -115,12 +108,16 @@ public class VoiceRecordFileServiceImpl extends BaseService<VoiceRecordFileDto,V ...@@ -115,12 +108,16 @@ public class VoiceRecordFileServiceImpl extends BaseService<VoiceRecordFileDto,V
} }
@Override @Override
public List<VoiceRecordFileDto> selectExportData(String exportId) { public List<VoiceRecordFileDto> selectExportData(String exportId,AgencyUserModel userModel) {
List<String> ids = null; List<String> ids = null;
if(StringUtils.isNotEmpty(exportId)) { if(StringUtils.isNotEmpty(exportId)) {
String[] idStr = exportId.split(","); String[] idStr = exportId.split(",");
ids = Arrays.asList(idStr); ids = Arrays.asList(idStr);
} }
return baseMapper.selectExportData(ids); String groupCode = ctiService.getSkillGroup(userModel.getUserId());
if (null == groupCode) {
return new ArrayList<>();
}
return baseMapper.selectExportData(ids,groupCode);
} }
} }
\ No newline at end of file
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