台账增加应急人名称

This commit is contained in:
guoshengxiong 2024-06-19 14:02:15 +08:00
parent 6f084af0eb
commit ecd74ef484
3 changed files with 15 additions and 11 deletions

View File

@ -161,14 +161,4 @@ public class XzEmergencyRecordController {
return Result.success(xzEmergencyRecordService.countAlarmNumByEnterprise(param)); return Result.success(xzEmergencyRecordService.countAlarmNumByEnterprise(param));
} }
@ApiOperation(value = "统计烟感报警数据", notes = "统计烟感报警数据", httpMethod = "POST")
@ApiImplicitParams({
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
})
@PostMapping(value = "/queryById")
public Result queryById(@ApiIgnore @RequestBody Map<String, Object> param) {
return Result.success(queryById(param));
}
} }

View File

@ -137,4 +137,8 @@ public class XzEmergencyRecord implements Serializable {
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value = "星纵-应急-救援情况列表") @ApiModelProperty(value = "星纵-应急-救援情况列表")
private List<XzEmergencyRescueSituation> situations; private List<XzEmergencyRescueSituation> situations;
@TableField(exist = false)
@ApiModelProperty(value = "应急人名称")
private String emergencyManager;
} }

View File

@ -8,7 +8,8 @@
ei.id as enterprise_id, ei.id as enterprise_id,
ei.enterprise_name, ei.enterprise_name,
wi.worker_name as alarmPersonName, wi.worker_name as alarmPersonName,
if(t.emergency_type_id = -1, '一键报警', et.emergency_type) as emergencyTypeName if(t.emergency_type_id = -1, '一键报警', et.emergency_type) as emergencyTypeName,
x.emergencyManager as emergencyManager
</sql> </sql>
<sql id="selectTable"> <sql id="selectTable">
select select
@ -20,6 +21,15 @@
left join team_info ti on ti.id = wi.team_id and wi.person_type=1 left join team_info ti on ti.id = wi.team_id and wi.person_type=1
left join department_info di on di.id = wi.department_id and wi.person_type=2 left join department_info di on di.id = wi.department_id and wi.person_type=2
left join enterprise_info ei on ei.id = wi.enterprise_id left join enterprise_info ei on ei.id = wi.enterprise_id
left join (
select
xep.enterprise_id,
xep.project_sn,
GROUP_CONCAT(su.real_name) as emergencyManager
from xz_emergency_push xep
join system_user su on find_in_set(su.user_id,xep.emergency_manager_id)
group by xep.enterprise_id,xep.project_sn
) x on x.enterprise_id = ei.id and x.project_sn=t.project_sn
</sql> </sql>
<select id="queryList" resultType="com.zhgd.xmgl.modules.xz.emergency.entity.XzEmergencyRecord"> <select id="queryList" resultType="com.zhgd.xmgl.modules.xz.emergency.entity.XzEmergencyRecord">
<include refid="selectTable"> <include refid="selectTable">