Commit 0e334a27 by huangjy

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

parents af47bb8a 06ca2800
......@@ -12,6 +12,7 @@ import com.makeit.dto.platform.alarm.PlatAlarmRecordQueryDTO;
import com.makeit.enums.report.PlatformTypeEnum;
import com.makeit.global.annotation.AuthIgnore;
import com.makeit.service.platform.alarm.PlatAlarmRecordService;
import com.makeit.utils.user.common.CommonUserUtil;
import com.makeit.vo.platform.alarm.PlatAlarmRecordVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -36,7 +37,8 @@ public class PlatAlarmRecordWechatController {
@AuthIgnore
public ApiResponseEntity<Map<String,Object>> page(@RequestBody PageReqDTO<PlatAlarmRecordQueryDTO> dto) {
//小程序告警记录只看到发给自己的告警
String userId = "1700085146788667394";
String userId = CommonUserUtil.getUserId();
// String userId = "1700085146788667394";
PlatAlarmRecordQueryDTO data = dto.getData();
data.setNotifyUser(userId);
......
......@@ -3,6 +3,7 @@ package com.makeit.mapper.platform.alarm;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.makeit.dto.platform.alarm.PlatHealthConfigDTO;
import com.makeit.entity.platform.alarm.PlatAlarmConfig;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -21,4 +22,6 @@ public interface PlatAlarmConfigMapper extends BaseMapper<PlatAlarmConfig> {
* @return
*/
List<PlatHealthConfigDTO> getHealthConfigList();
List<PlatAlarmConfig> listOffBed(@Param("orgDeviceId") String orgDeviceId);
}
......@@ -42,4 +42,6 @@ public interface PlatAlarmConfigService extends IService<PlatAlarmConfig> {
List<PlatHealthConfigDTO> getHealthConfigList();
void initData();
List<PlatAlarmConfig> listOfBed(String orgId);
}
......@@ -16,6 +16,7 @@ import com.makeit.enums.CodeMessageEnum;
import com.makeit.enums.CommonEnum;
import com.makeit.enums.id.IdConst;
import com.makeit.exception.BusinessException;
import com.makeit.global.aspect.tenant.TenantIdIgnore;
import com.makeit.global.aspect.tenant.TenantIdUtil;
import com.makeit.mapper.platform.alarm.PlatAlarmConfigMapper;
import com.makeit.service.platform.alarm.PlatAlarmConfigService;
......@@ -57,6 +58,8 @@ public class PlatAlarmConfigServiceImpl extends ServiceImpl<PlatAlarmConfigMappe
private AlarmConfigCacheUtil alarmConfigUtil;
@Resource
private PlatOrgService platOrgService;
@Resource
private PlatAlarmConfigMapper configMapper;
@Override
public List<PlatAlarmConfigListVO> list(PlatAlarmConfigQueryDTO dto) {
......@@ -256,4 +259,10 @@ public class PlatAlarmConfigServiceImpl extends ServiceImpl<PlatAlarmConfigMappe
saveBatch(saveList);
}
}
@Override
@TenantIdIgnore
public List<PlatAlarmConfig> listOfBed(String orgDeviceId) {
return configMapper.listOffBed(orgDeviceId);
}
}
......@@ -21,4 +21,13 @@
and pehi.respiratory_exception_time != '' and pehi.respiratory_rate != '')
)
</select>
<select id="listOffBed" resultType="com.makeit.entity.platform.alarm.PlatAlarmConfig">
select *
from plat_alarm_config
where org_id in (
select org_id from plat_device where id = #{orgDeviceId} and del_flag = 0)
and alarm_type = 5 and tenant_id != 0
</select>
</mapper>
......@@ -62,7 +62,6 @@
<select id="getDeviceIdsBySpaceIdAndElder" resultType="com.makeit.vo.platform.device.PlatDeviceListVO">
select
distinct
pd.*,
ps.parent_path as spaceParentPath,
ps.name as spaceName,
......@@ -118,6 +117,7 @@
</if>
</where>
GROUP BY pd.ori_device_id
order by pd.update_date desc,pd.id desc
</select>
......
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 sign in to comment