Commit c86d08b4 authored by chenzhao's avatar chenzhao

修改bug

parent 3aa718f4
......@@ -48,13 +48,15 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
String startTime,
String endTime,
String data,
String lift);
String lift,
String isFatherAlert);
int selectAllCount(Integer alertStatus,
String alertTypeCode ,
String alertSourceCode,
String startTime,
String endTime);
String endTime,
String isFatherAlert);
Integer AlertCalledcount(@Param("alertStatus")int alertStatus);
......
......@@ -135,6 +135,9 @@
a.system_source_code
FROM
jc_alert_called a
<if test="isFatherAlert!= null and isFatherAlert == 'true' ">
, jc_power_transfer j
</if>
<where>
a.is_delete = 0
<if test="alertStatus!= null ">
......@@ -149,6 +152,10 @@
<if test="alertSourceCode!= null ">
and a.alert_source_code = #{alertSourceCode}
</if>
<if test="isFatherAlert != null and isFatherAlert == 'true' ">
and j.alert_called_id = a.sequence_nbr
GROUP BY a.sequence_nbr
</if>
<if test="data == 'address' and data != null and lift != null ">
order by CONVERT(address USING 'gbk') ${lift} limit #{current},#{size}
</if>
......@@ -163,24 +170,33 @@
<select id="selectAllCount" resultType="int">
SELECT
COUNT(*)
sum(b.num)
FROM
jc_alert_called
<where>
is_delete = 0
(SELECT
count(distinct a.sequence_nbr) as num
FROM
jc_alert_called a
<if test="isFatherAlert!= null and isFatherAlert == 'true' ">
,jc_power_transfer j
</if>
<where>a.is_delete = 0
<if test="alertStatus!= null ">
and alert_status = #{alertStatus}
and a.alert_status = #{alertStatus}
</if>
<if test="startTime!= null and endTime != null">
and call_time between #{startTime} and #{endTime}
and a.call_time between #{startTime} and #{endTime}
</if>
<if test="alertTypeCode!= null ">
and alarm_type_code = #{alertTypeCode}
and a.alarm_type_code = #{alertTypeCode}
</if>
<if test="alertSourceCode!= null ">
and alert_source_code = #{alertSourceCode}
and a.alert_source_code = #{alertSourceCode}
</if>
</where>
<if test="isFatherAlert!= null and isFatherAlert == 'true' ">
and j.alert_called_id = a.sequence_nbr
GROUP BY a.sequence_nbr
</if>
</where>) b
</select>
......
......@@ -370,7 +370,7 @@ public class OrgUsrController extends BaseController {
* @return
*/
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/getListdata", method = RequestMethod.GET)
@RequestMapping(value = "/getdataList", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据名称模糊匹配单位", notes = "根据名称模糊匹配单位")
public ResponseModel<List<ESOrgUsrDto>> selectByIddata(HttpServletRequest request, String name) throws Exception {
return ResponseHelper.buildResponse(eSOrgUsrService.queryByKeys(name));
......
......@@ -188,7 +188,8 @@ public class AlertCalledController extends BaseController {
String alertTypeCode,
String alertSourceCode,
String callTimeStart,
String callTimeEnd) {
String callTimeEnd,
String isFatherAlert) {
/* Page<AlertCalled> pageBean;
IPage<AlertCalled> page;
QueryWrapper<AlertCalled> alertCalledQueryWrapper = new QueryWrapper<>();
......@@ -211,7 +212,9 @@ public class AlertCalledController extends BaseController {
/* bug2408 筛选参数解析异常 修改筛选条件方法 修改入参分离筛选条件
alertStatus 警情状态 alertTypeCode 报警类型code alertSourceCode 警情来源code
陈召 2021-08-21 开始*/
IPage<AlertCalled> alertCalledIPage = iAlertCalledService.queryForCalledList(page, alertStatus, alertTypeCode, alertSourceCode, callTimeStart, callTimeEnd, sort);
IPage<AlertCalled> alertCalledIPage = null;
alertCalledIPage = iAlertCalledService.queryForCalledList(page, alertStatus, alertTypeCode, alertSourceCode, callTimeStart, callTimeEnd, sort,isFatherAlert);
/* bug 2406 接警记录,列表缺少警情状态字段 by litw start*/
alertCalledIPage.getRecords().stream().forEach(e -> {
if (e.getAlertStatus()) {
......
......@@ -179,7 +179,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
// List<AlertCalled> list = alertCalledMapper.selectAllPage(pageBean.getCurrent(), pageBean.getSize(), alertStatus, alertTypeCode, alertSourceCode, startTime, endTime, data, lift);
// }
public IPage<AlertCalled> queryForCalledList(Page pageBean, Integer alertStatus, String alertTypeCode,
String alertSourceCode, String startTime, String endTime, String sort) {
String alertSourceCode, String startTime, String endTime, String sort,String isFatherAlert) {
String[] split = sort != null ? sort.split(",") : null;
/* 2407 【web】日常值班>警情记录>接警记录,表头排序功能失效 chenzhao 09-28 start */
......@@ -207,11 +207,13 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
String lift = split != null ? split[1] : null;
List<AlertCalled> list = alertCalledMapper.selectAllPage(pageBean.getCurrent(), pageBean.getSize(), alertStatus,
alertTypeCode, alertSourceCode, startTime, endTime, data, lift);
alertTypeCode, alertSourceCode, startTime, endTime, data, lift,isFatherAlert);
IPage<AlertCalled> iPage = new Page<>();
iPage.setRecords(list);
iPage.setTotal(
alertCalledMapper.selectAllCount(alertStatus, alertTypeCode, alertSourceCode, startTime, endTime));
alertCalledMapper.selectAllCount(alertStatus, alertTypeCode, alertSourceCode, startTime, endTime,isFatherAlert));
iPage.setSize(pageBean.getSize());
return iPage;
/* bug2407 表头筛选失效 补充条件方法 XML中添加了排序条件判断 data代表排序条件 lift 升降序 陈召 2021-09-03 结束 */
}
......
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