Commit 8a73eb42 authored by litengwei's avatar litengwei

Merge remote-tracking branch 'origin/develop_dl_plan6' into develop_dl_plan6

# Conflicts: # amos-boot-system-equip/src/main/resources/mapper/FireFightingSystemMapper.xml
parents 764ef792 09b26ec2
......@@ -10,6 +10,7 @@ public enum WaterResourceTypeEnum {
消防水鹤("crane", "消防水鹤"),
消防水池("pool", "消防水池"),
天然水源("natural", "天然水源"),
消防水箱("waterTank", "消防水箱"),
工业水池("industryPool", "工业水池");
private String code;
......
package com.yeejoin.equipmanage.common.entity.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author DELL
*/
@Data
@ApiModel(value = "FormGroupColumnDto对象", description = "分组Dto对象")
public class FormGroupColumnDto {
@ApiModelProperty(value = "字段名")
private String fieldName;
@ApiModelProperty(value = "中文名")
private String fieldLabel;
@ApiModelProperty(value = "值")
private String fieldValue;
@ApiModelProperty(value = "数据类型:文本,数字,枚举,日期")
private String dataType;
@ApiModelProperty(value = "查询策略;全等,模糊,区间")
private String queryStrategy;
@ApiModelProperty(value = "分组编号")
private String groupCode;
}
......@@ -137,6 +137,7 @@ public class WaterResourceController extends BaseController {
waterResourceNaturalService.createWithModel(waterResourceNaturalDto);
break;
case "pool":
case "waterTank":
case "industryPool":
// 新增基础信息
model.setIsIot(true);
......@@ -278,6 +279,7 @@ public class WaterResourceController extends BaseController {
waterResourceNaturalService.updateWithModel(waterResourceNaturalDto);
break;
case "industryPool":
case "waterTank":
case "pool":
WaterResourcePoolDto waterResourcePoolDto = new WaterResourcePoolDto();
WaterResourcePool waterResourcePool =
......@@ -285,6 +287,7 @@ public class WaterResourceController extends BaseController {
sequenceNbr));
BeanUtils.copyProperties(model, waterResourcePoolDto);
waterResourcePoolDto.setSequenceNbr(waterResourcePool.getSequenceNbr());
waterResourcePoolDto.setResourceId(waterResourcePool.getResourceId());
waterResourcePoolService.updateWithModel(waterResourcePoolDto);
break;
default:
......@@ -403,6 +406,7 @@ public class WaterResourceController extends BaseController {
BeanUtils.copyProperties(waterResourceNatural, waterResourceDto);
break;
case "industryPool":
case "waterTank":
case "pool":
WaterResourcePool waterResourcePool =
waterResourcePoolService.getOne(new QueryWrapper<WaterResourcePool>().eq("resource_id",
......
......@@ -636,7 +636,7 @@ public class ConfigureController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/iotMonthReport")
@ApiOperation(httpMethod = "GET", value = "物联报表-月", notes = "物联报表-月")
public ResponseModel equipList(@RequestParam(value = "bizOrgCode", required = false) String bizOrgCode,
public ResponseModel iotMonthReport(@RequestParam(value = "bizOrgCode", required = false) String bizOrgCode,
@RequestParam(value = "startDate") String startDate,
@RequestParam(value = "endDate") String endDate) {
......
package com.yeejoin.equipmanage.controller;
import com.yeejoin.equipmanage.common.entity.FormGroupColumn;
import com.yeejoin.equipmanage.service.IFormGroupColumnService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import java.util.List;
/**
* 动态表单控制器
*
* @author gaojianqiang
* @date 2022-10-09
*/
@RestController
@Api(tags = "动态表单分组列Api")
@RequestMapping(value = "/form-group-column", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public class FormGroupColumnController extends AbstractBaseController {
@Autowired
IFormGroupColumnService formGroupColumnService;
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "通过分组code查询列信息", notes = "通过分组code查询列信息")
@RequestMapping(value = "/queryByGroup", method = RequestMethod.GET)
public List<FormGroupColumn> queryByGroup(@RequestParam String groupCode) {
return formGroupColumnService.queryByGroup(groupCode);
}
}
package com.yeejoin.equipmanage.controller;
import com.yeejoin.equipmanage.common.entity.FormGroupColumn;
import com.yeejoin.equipmanage.common.entity.dto.FormGroupColumnDto;
import com.yeejoin.equipmanage.service.IFormGroupColumnService;
import com.yeejoin.equipmanage.service.IFormInstanceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import java.util.List;
/**
* 动态表单控制器
*
* @author gaojianqiang
* @date 2022-10-09
*/
@RestController
@Api(tags = "动态表单实例Api")
@RequestMapping(value = "/form-instance", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public class FormInstanceController extends AbstractBaseController {
@Autowired
private IFormInstanceService formInstanceService;
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "通过分组code查询列及值信息", notes = "通过分组code查询列及值信息")
@RequestMapping(value = "/queryColumnAndValueByGroup", method = RequestMethod.GET)
public List<FormGroupColumnDto> queryColumnAndValueByGroup(@RequestParam String groupCode, @RequestParam(required = false) Long instanceId) {
return formInstanceService.queryColumnAndValueByGroup(groupCode, instanceId);
}
}
......@@ -219,4 +219,8 @@ public interface EquipmentSpecificAlarmMapper extends BaseMapper<EquipmentSpecif
Map<String, Object> inspectionMessage(@Param("orgCode") String orgCode
, @Param("startTime") String startTime
, @Param("endTime") String endTime);
Page<Map<String, Object>> fireAlarmLogPage(Page page, @Param("param") CommonPageInfoParam param);
List<Map<String, Object>> alarmTrend(String bizOrgCode);
}
......@@ -314,6 +314,40 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
* @return
*/
Page<Map<String, Object>> getWaterInfo(Page page, @Param("bizOrgCode") String bizOrgCode, @Param("systemCode") String systemCode);
/**
* 获取水源信息(监盘概览)
*
* @param bizOrgCode
* @return
*/
Page<Map<String, Object>> getWaterInfoBySuper(Page page, @Param("bizOrgCode") String bizOrgCode);
/**
* 监盘概览泡沫罐和水箱信息(监盘概览)
* @param page
* @param bizOrgCode
* @return
*/
Page<Map<String, Object>> getFoamTankBySuper(Page page, @Param("bizOrgCode") String bizOrgCode);
/**
* 监盘概览管网压力信息(监盘概览)
* @param page
* @param bizOrgCode
* @return
*/
Page<Map<String, Object>> getPipeNetworkBySuper(Page page, @Param("bizOrgCode") String bizOrgCode);
/**
* 监盘概览水池装置进水流量信息(监盘概览)
* @param page
* @param bizOrgCode
* @return
*/
Page<Map<String, Object>> getInfluentFlowBySuper(Page page, @Param("bizOrgCode") String bizOrgCode);
/**
* 获取系统今日告警信息
*
......@@ -330,6 +364,13 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
List<Map<String, Object>> getFireSystemInfo(HashMap<String, Object> hashMap);
/**
* 获取系统状态 大于0异常 小于0正常
* @param hashMap
* @return
*/
Integer getSystemStatus(HashMap<String, Object> hashMap);
/**
* 获取系统近一月告警设备top5
*
* @param hashMap
......@@ -346,6 +387,14 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
String equipmentId(HashMap<String, Object> hashMap);
/**
* 获取设备id
*
* @param hashMap
* @return
*/
String equipmentIdBySuper(HashMap<String, Object> hashMap);
/**
* 获取系统设备状态
*
* @param page
......@@ -355,6 +404,15 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
Page<Map<String, Object>> equipmentState(Page page, String id);
/**
* 获取系统设备状态
*
* @param page
* @param id
* @return
*/
Page<Map<String, Object>> equipmentStateBySuper(Page page, String id);
/**
* 稳压泵信息
*
* @param page
......@@ -534,4 +592,9 @@ public interface FireFightingSystemMapper extends BaseMapper<FireFightingSystemE
List<Map<String, Object>> selectDayEchart(@Param("systemId") String systemId,
@Param("date") String date,
@Param("indicator") List<String> indicator);
List<Map<String, Object>> queryStartAndStopBySpecificId(@Param("ids")List<Long> ids);
List<Map<String, Object>> queryStateBySpecificId(@Param("id")long id);
}
......@@ -91,4 +91,8 @@ public interface IEquipmentSpecificAlarmService extends IService<EquipmentSpecif
List<Map<String, Object>> fireFacilitiesList(String bizOrgCode, String startTime, String endTime);
Map<String, Object> dailyMaintenance(String bizOrgCode,String orgCode, String startTime, String endTime);
Map<String, Object> inspectionMessage(String orgCode, String startTime, String endTime);
Page<Map<String, Object>> fireAlarmLogPage(CommonPageInfoParam param);
List<Map<String, Object>> alarmTrend(String bizOrgCode);
}
......@@ -242,12 +242,16 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
Map<String, Object> getSystemStatus(HashMap<String, Object> hashMap);
Integer getSystemStatusBySuper(HashMap<String, Object> hashMap);
Map<String, Object> equipAlarmTOP(HashMap<String, Object> hashMap);
Page<Map<String, Object>> getSmallWaterInfo(Page page, HashMap<String, Object> hashMap);
Page<Map<String, Object>> equipmentState(Page result, HashMap<String, Object> hashMap);
Page<Map<String, Object>> equipmentStateBySuper(Page result, HashMap<String, Object> hashMap);
Map<String, Object> statisticsByStation(String bizOrgCode);
Map<String, Object> todayAlarmEquipment(String bizOrgCode);
......
......@@ -4,8 +4,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.equipmanage.common.entity.FormInstance;
import com.yeejoin.equipmanage.common.entity.dto.BuildSearchDTO;
import com.yeejoin.equipmanage.common.entity.dto.FormGroupColumnDto;
import com.yeejoin.equipmanage.common.entity.vo.BuildingVideoListVO;
import com.yeejoin.equipmanage.common.vo.AreaTreeVo;
import com.yeejoin.equipmanage.common.vo.UnitAreaTreeVo;
import java.util.LinkedHashMap;
......@@ -172,4 +172,6 @@ public interface IFormInstanceService extends IService<FormInstance> {
* @return List<Map < String, Object>>
*/
List<Map<String, Object>> getSpecialChildrenListByName(String parentId, String bizOrgCode, String name);
List<FormGroupColumnDto> queryColumnAndValueByGroup(String groupCode, Long instanceId);
}
......@@ -728,4 +728,15 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
public Map<String, Object> inspectionMessage(String orgCode, String startTime, String endTime) {
return equipmentSpecificAlarmMapper.inspectionMessage(orgCode, startTime, endTime);
}
@Override
public Page<Map<String, Object>> fireAlarmLogPage(CommonPageInfoParam param) {
Page result = new Page<>(param.getPageNumber(), param.getPageSize());
return this.baseMapper.fireAlarmLogPage(result, param);
}
@Override
public List<Map<String, Object>> alarmTrend(String bizOrgCode) {
return this.baseMapper.alarmTrend(bizOrgCode);
}
}
......@@ -7,10 +7,9 @@ import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONArray;
import com.yeejoin.equipmanage.common.entity.vo.*;
import com.yeejoin.equipmanage.common.utils.CommonResponseUtil;
import com.yeejoin.equipmanage.common.vo.*;
import com.yeejoin.equipmanage.fegin.IotFeign;
import com.yeejoin.equipmanage.mapper.*;
import com.yeejoin.equipmanage.service.*;
import org.apache.catalina.util.IOTools;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
......@@ -73,28 +72,6 @@ import com.yeejoin.equipmanage.common.exception.BaseException;
import com.yeejoin.equipmanage.common.utils.DateUtils;
import com.yeejoin.equipmanage.common.utils.QRCodeUtil;
import com.yeejoin.equipmanage.common.utils.StringUtil;
import com.yeejoin.equipmanage.service.ICarService;
import com.yeejoin.equipmanage.service.IEquPropertyService;
import com.yeejoin.equipmanage.service.IEquipmentCategoryService;
import com.yeejoin.equipmanage.service.IEquipmentDetailService;
import com.yeejoin.equipmanage.service.IEquipmentIndexService;
import com.yeejoin.equipmanage.service.IEquipmentService;
import com.yeejoin.equipmanage.service.IEquipmentSpecificAlarmService;
import com.yeejoin.equipmanage.service.IEquipmentSpecificIndexSerivce;
import com.yeejoin.equipmanage.service.IEquipmentSpecificSerivce;
import com.yeejoin.equipmanage.service.IEquipmentSystemSourceStatisticsService;
import com.yeejoin.equipmanage.service.IFireFightingSystemService;
import com.yeejoin.equipmanage.service.IStockBillDetailService;
import com.yeejoin.equipmanage.service.IStockBillService;
import com.yeejoin.equipmanage.service.IStockDetailService;
import com.yeejoin.equipmanage.service.IStockService;
import com.yeejoin.equipmanage.service.ISyncDataService;
import com.yeejoin.equipmanage.service.ISystemDicService;
import com.yeejoin.equipmanage.service.IUploadFileService;
import com.yeejoin.equipmanage.service.IVideoEquipmentSpecificService;
import com.yeejoin.equipmanage.service.IVideoService;
import com.yeejoin.equipmanage.service.IWarehouseService;
import com.yeejoin.equipmanage.service.IWarehouseStructureService;
import com.yeejoin.equipmanage.utils.RelationRedisUtil;
import org.typroject.tyboot.core.foundation.utils.DateTimeUtil;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
......@@ -173,6 +150,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
@Autowired
private IVideoEquipmentSpecificService videoEquipmentSpecificService;
@Autowired
private IFormInstanceService formInstanceService;
@Value("${systemctl.dict.iot-core-param}")
private String iotCoreParam;
......@@ -1023,7 +1003,8 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
equipmentDetailService.removeById(equipmentSpecific.getEquipmentDetailId());
}
if (res > 0) {
return true;
// 删除设备动态表单扩展属性
return formInstanceService.deleteInstanceById(id);
} else {
return false;
}
......
......@@ -1290,6 +1290,12 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
@Override
public Integer getSystemStatusBySuper(HashMap<String, Object> hashMap) {
Integer systemStatus = fireFightingSystemMapper.getSystemStatus(hashMap);
return systemStatus;
}
@Override
public Map<String, Object> getSystemName(HashMap<String, Object> hashMap) {
Map<String, Object> resultMap = new HashMap<>();
List<Map<String, Object>> map = fireFightingSystemMapper.getFireSystemInfo(hashMap);
......@@ -1332,6 +1338,17 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
}
@Override
public Page<Map<String, Object>> equipmentStateBySuper(Page res, HashMap<String, Object> hashMap) {
Page result = new Page<>(res.getCurrent(), res.getSize());
String id = fireFightingSystemMapper.equipmentIdBySuper(hashMap);
if (!StringUtil.isNotEmpty(id)) {
return null;
}
Page<Map<String, Object>> mapPage = fireFightingSystemMapper.equipmentStateBySuper(result, id);
return mapPage;
}
@Override
public Page<Map<String, Object>> getSmallWaterInfo(Page page, HashMap<String, Object> hashMap) {
String bizOrgCode = null;
String systemCode = null;
......
......@@ -13,6 +13,7 @@ import com.yeejoin.equipmanage.common.entity.FormGroupColumn;
import com.yeejoin.equipmanage.common.entity.FormInstance;
import com.yeejoin.equipmanage.common.entity.SourceFile;
import com.yeejoin.equipmanage.common.entity.dto.BuildSearchDTO;
import com.yeejoin.equipmanage.common.entity.dto.FormGroupColumnDto;
import com.yeejoin.equipmanage.common.entity.vo.BuildingVideoListVO;
import com.yeejoin.equipmanage.common.enums.GroupCodeEnum;
import com.yeejoin.equipmanage.common.enums.GroupColumnDataType;
......@@ -23,6 +24,7 @@ import com.yeejoin.equipmanage.mapper.FormInstanceMapper;
import com.yeejoin.equipmanage.remote.RemoteSecurityService;
import com.yeejoin.equipmanage.service.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
......@@ -564,4 +566,22 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For
public List<Map<String, Object>> getSpecialChildrenListByName(String parentId, String bizOrgCode, String name) {
return this.baseMapper.querySpecialChildrenListByName(parentId, bizOrgCode, name);
}
@Override
public List<FormGroupColumnDto> queryColumnAndValueByGroup(String groupCode, Long instanceId) {
List<FormGroupColumnDto> list = new ArrayList<>();
List<FormGroupColumn> columnList = iFormGroupColumnService.queryByGroup(groupCode);
if (!CollectionUtils.isEmpty(columnList)) {
Map<String, Object> map = queryForMap(instanceId);
columnList.forEach(x -> {
FormGroupColumnDto dto = new FormGroupColumnDto();
BeanUtils.copyProperties(x, dto);
if (!map.isEmpty()) {
dto.setFieldValue(map.get(dto.getFieldName()).toString());
}
list.add(dto);
});
}
return list;
}
}
......@@ -1326,4 +1326,161 @@
LEFT JOIN p_point_classify ppc on pci.point_classify_id = ppc.id
)AS missedCheck
</select>
<select id="fireAlarmLogPage" resultType="java.util.HashMap">
SELECT
equipment_specific_index_name,
equipment_specific_name,
DATE_FORMAT(`wlesal`.`create_date`,'%m-%d %H:%i:%s') alarm_time,
location,
emergency_level_color,
IF
( `wlesal`.`clean_time` IS NOT NULL, '已消除', '未消除' ) AS `cleanStatus`
FROM
`wl_equipment_specific_alarm_log` `wlesal`
LEFT JOIN `wl_equipment_specific` `wles` ON `wlesal`.`equipment_specific_id` = `wles`.`id`
<where>
<if test="param.system != null and param.system != ''">
find_in_set( #{param.system}, `wlesal`.`system_codes` )
</if>
<if test="param.fireEquipmentSpecificIndexKey != null and param.fireEquipmentSpecificIndexKey != ''">
AND wles.equipment_specific_index_key like concat (#{param.fireEquipmentSpecificIndexKey},'%')
</if>
<if test="param.bizOrgCode != null and param.bizOrgCode != ''">
AND wles.biz_org_code like concat (#{param.bizOrgCode},'%')
</if>
</where>
ORDER BY
`wlesal`.`create_date` DESC
</select>
<select id="alarmTrend" resultType="java.util.Map">
SELECT
`result`.`click_date` AS `click_date`,
`a`.`fireAlarmNum` AS `fireAlarmNum`,
`b`.`breakdownNum` AS `breakdownNum`,
`c`.`shieldNum` AS `shieldNum`,
`d`.`otherNum` AS `otherNum`
FROM
((((
`v_monitor_event_utils_week` `result`
LEFT JOIN (
SELECT
`weekUtil`.`click_date` AS `click_date`,
ifnull( count( `fireAlarm`.`id` ), 0 ) AS `fireAlarmNum`
FROM
(
`v_monitor_event_utils_week` `weekUtil`
LEFT JOIN (
SELECT
log.*
FROM
`wl_equipment_specific_alarm_log` `log`
LEFT JOIN wl_equipment_specific wes ON `log`.equipment_specific_id = wes.id
<where>
<if test="bizOrgCode != null and bizOrgCode != ''">
wes.biz_org_code like concat (#{bizOrgCode},'%')
</if>
</where>
) fireAlarm ON (((
date_format( `fireAlarm`.`create_date`, '%Y-%m-%d' ) = `weekUtil`.`click_date`
)
AND ( `fireAlarm`.`equipment_specific_index_name` = '火警' )
)))
GROUP BY
`weekUtil`.`click_date`
ORDER BY
`weekUtil`.`click_date`
) `a` ON ((
`a`.`click_date` = `result`.`click_date`
)))
LEFT JOIN (
SELECT
`weekUtil`.`click_date` AS `click_date`,
ifnull( count( `breakdown`.`id` ), 0 ) AS `breakdownNum`
FROM
(
`v_monitor_event_utils_week` `weekUtil`
LEFT JOIN (
SELECT
log.*
FROM
`wl_equipment_specific_alarm_log` `log`
LEFT JOIN wl_equipment_specific wes ON `log`.equipment_specific_id = wes.id
<where>
<if test="bizOrgCode != null and bizOrgCode != ''">
wes.biz_org_code like concat (#{bizOrgCode},'%')
</if>
</where>
) `breakdown` ON (((
`weekUtil`.`click_date` = date_format( `breakdown`.`create_date`, '%Y-%m-%d' ))
AND ( `breakdown`.`equipment_specific_index_name` = '故障' ))))
GROUP BY
`weekUtil`.`click_date`
ORDER BY
`weekUtil`.`click_date`
) `b` ON ((
`b`.`click_date` = `result`.`click_date`
)))
LEFT JOIN (
SELECT
`weekUtil`.`click_date` AS `click_date`,
ifnull( count( `shield`.`id` ), 0 ) AS `shieldNum`
FROM
(
`v_monitor_event_utils_week` `weekUtil`
LEFT JOIN (
SELECT
log.*
FROM
`wl_equipment_specific_alarm_log` `log`
LEFT JOIN wl_equipment_specific wes ON `log`.equipment_specific_id = wes.id
<where>
<if test="bizOrgCode != null and bizOrgCode != ''">
wes.biz_org_code like concat (#{bizOrgCode},'%')
</if>
</where>
) `shield` ON (((
date_format( `shield`.`create_date`, '%Y-%m-%d' ) = `weekUtil`.`click_date`
)
AND ( `shield`.`equipment_specific_index_name` = '屏蔽' ))))
GROUP BY
`weekUtil`.`click_date`
ORDER BY
`weekUtil`.`click_date`
) `c` ON ((
`c`.`click_date` = `result`.`click_date`
)))
LEFT JOIN (
SELECT
`weekUtil`.`click_date` AS `click_date`,
ifnull( count( `other`.`id` ), 0 ) AS `otherNum`
FROM
(
`v_monitor_event_utils_week` `weekUtil`
LEFT JOIN (
SELECT
log.*
FROM
`wl_equipment_specific_alarm_log` `log`
LEFT JOIN wl_equipment_specific wes ON `log`.equipment_specific_id = wes.id
<where>
<if test="bizOrgCode != null and bizOrgCode != ''">
wes.biz_org_code like concat (#{bizOrgCode},'%')
</if>
</where>
) `other` ON (((
date_format( `other`.`create_date`, '%Y-%m-%d' ) = `weekUtil`.`click_date`
)
AND (
`other`.`equipment_specific_index_name` NOT IN ( '火警', '故障', '屏蔽' )))))
GROUP BY
`weekUtil`.`click_date`
ORDER BY
`weekUtil`.`click_date`
) `d` ON ((
`d`.`click_date` = `result`.`click_date`
)))
ORDER BY
`result`.`click_date` DESC
</select>
</mapper>
\ 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