应急-处置台账bug修复
This commit is contained in:
parent
e7b1634cab
commit
7a9419d0a9
@ -50,6 +50,7 @@ public class XzEmergencyRecordController {
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "inDispositionStatus", value = "在处置状态中(1待救援2救援中3已救援)(多个逗号分割)", paramType = "query", required = false, dataType = "String"),
|
||||
})
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<XzEmergencyRecord>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> paramMap) {
|
||||
|
||||
@ -32,7 +32,13 @@
|
||||
ifnull(round(sum(disposition_status = 2), 2), 0) as inRescue,
|
||||
ifnull(round(sum(disposition_status = 3), 2), 0) as rescued
|
||||
from xz_emergency_record as t
|
||||
left join worker_info wi on wi.id = t.alarm_person_id
|
||||
left join enterprise_info ei on ei.id = wi.enterprise_id
|
||||
where t.project_sn = #{param.projectSn}
|
||||
<if test="param.accountType == '6'.toString()">
|
||||
and ei.id = (select enterprise_id from xz_emergency_push where
|
||||
find_in_set(#{param.userId},emergency_manager_id))
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="queryById" resultType="com.zhgd.xmgl.modules.xz.emergency.entity.XzEmergencyRecord">
|
||||
|
||||
@ -83,6 +83,7 @@ public class XzEmergencyRecordServiceImpl extends ServiceImpl<XzEmergencyRecordM
|
||||
QueryWrapper<XzEmergencyRecord> queryWrapper = QueryGenerator.initPageQueryWrapper(XzEmergencyRecord.class, paramMap, alias);
|
||||
String enterpriseId = MapUtils.getString(paramMap, "enterpriseId");
|
||||
String alarmPersonName = MapUtils.getString(paramMap, "alarmPersonName");
|
||||
String inDispositionStatus = MapUtils.getString(paramMap, "inDispositionStatus");
|
||||
String projectSn = MapUtils.getString(paramMap, "projectSn");
|
||||
//项目子账号只能看到自己的负责的企业
|
||||
querySelfEnterpriseIfSub(queryWrapper);
|
||||
@ -92,6 +93,9 @@ public class XzEmergencyRecordServiceImpl extends ServiceImpl<XzEmergencyRecordM
|
||||
if (StrUtil.isNotBlank(alarmPersonName)) {
|
||||
queryWrapper.like("wi.worker_name", alarmPersonName);
|
||||
}
|
||||
if (StrUtil.isNotBlank(inDispositionStatus)) {
|
||||
queryWrapper.in(alias + "disposition_status", StrUtil.split(inDispositionStatus, ","));
|
||||
}
|
||||
queryWrapper.orderByDesc(alias + RefUtil.fieldNameUlc(XzEmergencyRecord::getAlarmTime));
|
||||
return queryWrapper;
|
||||
}
|
||||
@ -160,6 +164,9 @@ public class XzEmergencyRecordServiceImpl extends ServiceImpl<XzEmergencyRecordM
|
||||
|
||||
@Override
|
||||
public StatsDispositionStatusVo statsDispositionStatus(Map<String, Object> param) {
|
||||
UserInfo user = SecurityUtils.getUser();
|
||||
param.put("accountType", user.getAccountType());
|
||||
param.put("userId", user.getUserId());
|
||||
return baseMapper.statsDispositionStatus(param);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user