Commit 42dc05fa authored by kongfm's avatar kongfm

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

parents 89f4297f c532a775
......@@ -45,7 +45,13 @@ public class FireEquipmentAlarmLogDto extends BaseDto {
private String fireBuildingMrid;
@ApiModelProperty(value = "报警类型:alarm_type_fire(火灾报警)/alarm_type_trouble(故障告警)")
private String type;
private String alarmType;
@ApiModelProperty(value = "报警类型名称")
private String alarmTypeName;
@ApiModelProperty(value = "确认状态:0-未确认 1-已确认")
private String confirmState;
@ApiModelProperty(value = "确认类型")
private String confirmType;
......@@ -82,4 +88,10 @@ public class FireEquipmentAlarmLogDto extends BaseDto {
@ApiModelProperty(value = "纬度")
private String lat;
@ApiModelProperty(value = "换流站经度")
private String stationLng;
@ApiModelProperty(value = "换流站纬度")
private String stationLat;
}
......@@ -33,7 +33,7 @@ public class FireLatentDangerDto extends BaseDto {
private String dangerName;
@ApiModelProperty(value = "隐患状态:隐患状态(1:待评审;2:待治理;3:安措计划中;4:待验证;5:治理完毕;6:已撤销;7:延期治理中;8:延期治理待车间部门审核;9:延期治理待公司审核'")
private String dangerStateCode;
private String dangerState;
@ApiModelProperty(value = "隐患状态名称")
private String dangerStateName;
......@@ -47,6 +47,9 @@ public class FireLatentDangerDto extends BaseDto {
@ApiModelProperty(value = "隐患等级(1:一般隐患;2:重大隐患) ")
private String dangerLevel;
@ApiModelProperty(value = "隐患等级名称")
private String dangerLevelName;
@ApiModelProperty(value = "隐患提交时间")
private Date discoveryDate;
......@@ -61,4 +64,11 @@ public class FireLatentDangerDto extends BaseDto {
@ApiModelProperty(value = "纬度")
private String lat;
@ApiModelProperty(value = "换流站经度")
private String stationLng;
@ApiModelProperty(value = "换流站纬度")
private String stationLat;
}
......@@ -36,7 +36,10 @@ public class FireStationInfoDto extends BaseDto {
private BigDecimal safetyIndex;
@ApiModelProperty(value = "安全状态:1-重大风险、2-较大风险、3-一般风险、4-低风险")
private Integer safetyStatus;
private Long safetyStatus;
@ApiModelProperty(value = "安全状态颜色")
private String safetyStatusName;
@ApiModelProperty(value = "状态对应颜色")
private String safetyStatusColor;
......@@ -70,4 +73,11 @@ public class FireStationInfoDto extends BaseDto {
@ApiModelProperty(value = "驻站消防队队长电话")
private String fireCaptainPhone;
@ApiModelProperty(value = "今日告警数量")
private Long todayAlarmTimes;
@ApiModelProperty(value = "现存隐患")
private Long existDangerNumber;
}
......@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.ccs.api.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
......@@ -73,8 +74,19 @@ public class FireEquipmentAlarmLog extends BaseEntity {
/**
* 报警类型:alarm_type_fire(火灾报警)/alarm_type_trouble(故障告警)
*/
@TableField("type")
private String type;
@TableField("alarm_type")
private String alarmType;
/**
* 报警类型名称
*/
private String alarmTypeName;
/**
* 确认状态:0-未确认 1-已确认
*/
private String confirmState;
/**
* 确认类型
......
......@@ -49,8 +49,8 @@ public class FireLatentDanger extends BaseEntity {
/**
* 隐患状态:隐患状态(1:待评审;2:待治理;3:安措计划中;4:待验证;5:治理完毕;6:已撤销;7:延期治理中;8:延期治理待车间部门审核;9:延期治理待公司审核'
*/
@TableField("danger_state_code")
private String dangerStateCode;
@TableField("danger_state")
private String dangerState;
/**
* 隐患状态名称
......@@ -77,6 +77,11 @@ public class FireLatentDanger extends BaseEntity {
private String dangerLevel;
/**
* 隐患等级名称
*/
private String dangerLevelName;
/**
* 隐患提交时间
*/
@TableField("discovery_date")
......
......@@ -56,7 +56,12 @@ public class FireStationInfo extends BaseEntity {
* 安全状态:1-重大风险、2-较大风险、3-一般风险、4-低风险
*/
@TableField("safety_status")
private Integer safetyStatus;
private Long safetyStatus;
/**
* 安全状态描述
*/
private String safetyStatusName;
/**
* 状态对应颜色
......
package com.yeejoin.amos.boot.module.ccs.api.mapper;
import com.yeejoin.amos.boot.module.ccs.api.entity.FireEquipmentAlarmLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.ccs.api.dto.FireEquipmentAlarmLogDto;
import com.yeejoin.amos.boot.module.ccs.api.entity.FireEquipmentAlarmLog;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 设备报警信息日志表 Mapper 接口
......@@ -11,4 +16,11 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface FireEquipmentAlarmLogMapper extends BaseMapper<FireEquipmentAlarmLog> {
/**
* 告警日志
*
* @param params 查询参数
* @return List<FireEquipmentAlarmLogDto>
*/
List<FireEquipmentAlarmLogDto> queryAlarmLogList(Map<String, Object> params);
}
package com.yeejoin.amos.boot.module.ccs.api.mapper;
import com.yeejoin.amos.boot.module.ccs.api.dto.FireLatentDangerDto;
import com.yeejoin.amos.boot.module.ccs.api.entity.FireLatentDanger;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 隐患信息 Mapper 接口
......@@ -10,5 +14,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @date 2021-11-09
*/
public interface FireLatentDangerMapper extends BaseMapper<FireLatentDanger> {
/**
* 隐患列表倒序列表
* @param top 限制w
* @param stationCode 站code
* @return List<FireLatentDangerDto>
*/
List<FireLatentDangerDto> queryDangerList(@Param("top") Long top, @Param("stationCode") String stationCode);
}
package com.yeejoin.amos.boot.module.ccs.api.mapper;
import com.yeejoin.amos.boot.module.ccs.api.dto.FireStationInfoDto;
import com.yeejoin.amos.boot.module.ccs.api.entity.FireStationInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
/**
* 站端信息表 Mapper 接口
*
......@@ -11,4 +14,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface FireStationInfoMapper extends BaseMapper<FireStationInfo> {
/**
* 换流站列表
* @return List<FireStationInfoDto>
*/
List<FireStationInfoDto> queryStationListWithStatistics();
}
......@@ -2,4 +2,43 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.ccs.api.mapper.FireEquipmentAlarmLogMapper">
<select id="queryAlarmLogList"
resultType="com.yeejoin.amos.boot.module.ccs.api.dto.FireEquipmentAlarmLogDto">
select
a.id,
a.fire_equipment_name,
a.fire_equipment_index_name,
a.alarm_type,
a.alarm_type_name,
a.create_date,
s.name as station_name,
a.station_code,
a.location,
a.lat,
a.lng,
s.lat as stationLat,
s.lng as stationLng
from
asf_fire_equipment_alarm_log a,
asf_fire_station_info s
where
a.station_code = s.code
and s.status = false
<if test="stationCode != null and stationCode != ''">
and a.station_code = #{stationCode}
</if>
<if test="confirmState != null and confirmState != ''">
and a.confirm_state = #{confirmState}
</if>
<if test="beginDate != null and beginDate != ''">
and DATEDIFF(a.create_date,#{beginDate}) >= 0
</if>
<if test="endDate != null and endDate != ''">
and DATEDIFF(a.create_date,#{endDate}) <![CDATA[<=]]> 0
</if>
order by a.create_date desc
<if test="top != null">
limit ${top}
</if>
</select>
</mapper>
......@@ -2,4 +2,32 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.ccs.api.mapper.FireLatentDangerMapper">
<select id="queryDangerList" resultType="com.yeejoin.amos.boot.module.ccs.api.dto.FireLatentDangerDto">
select
d.id,
d.danger_name,
d.danger_state,
d.danger_state_name,
d.danger_level,
d.danger_level_name,
s.name as station_name,
d.station_code,
d.discovery_date,
d.lat,
d.lng,
s.lat as stationLat,
s.lng as stationLng
from
asf_fire_latent_danger d,
asf_fire_station_info s
where d.station_code = s.code
and s.status = false
<if test="stationCode != null and stationCode != ''">
and d.station_code = #{stationCode}
</if>
order by d.discovery_date desc
<if test="top != null">
limit ${top}
</if>
</select>
</mapper>
......@@ -2,4 +2,14 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.ccs.api.mapper.FireStationInfoMapper">
<select id="queryStationListWithStatistics"
resultType="com.yeejoin.amos.boot.module.ccs.api.dto.FireStationInfoDto">
SELECT
i.*,
IFNULL((SELECT sum(s.alarm_times) from asf_fire_alarm_day_statistics s where s.collect_date = CURRENT_DATE and s.station_code = i.`code`),0) as todayAlarmTimes,
IFNULL((SELECT count(1) from asf_fire_latent_danger d where d.deal_state = 1 and d.station_code = i.`code`),0) as existDangerNumber
FROM
`asf_fire_station_info` i
where i.status = false
</select>
</mapper>
package com.yeejoin.amos.boot.module.common.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto;
import com.yeejoin.amos.boot.module.common.api.entity.DutyPersonShift;
import org.apache.ibatis.annotations.Param;
......@@ -132,4 +133,6 @@ public interface DutyPersonShiftMapper extends BaseMapper<DutyPersonShift> {
Map<String, Object> getFireTeamBySequenceNbr (long sequenceNbr);
List<Map<String, Object>> getFirstAidForTypeCodeAndCompanyId(long company);
List<Map<String, Object>> queryByCompanyId(Long companyId);
}
......@@ -36,4 +36,6 @@ public interface FirefightersMapper extends BaseMapper<Firefighters> {
List<FirefightersExcelDto> exportToExcel(Boolean isDelete, String name, String postQualification, String fireTeamId,
String state, String areasExpertise, String jobTitle);
List<FirefightersDto> queryById(Long teamId,String[] gw);
}
......@@ -91,4 +91,6 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
List< Map<String,String>> getPersonSimpleDetail();
List<Map<String, Long>> countDeptByCompanyId(@Param("companyIdList") List<String> companyIdList);
List<Map<String,Object>> queryCompanyId(Long id);
}
......@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.common.api.service;
import com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto;
import java.util.List;
import java.util.Map;
/**
* @author DELL
......@@ -32,4 +33,6 @@ public interface IDutyPersonService extends IDutyCommonService {
* @return
*/
List<DutyPersonDto> findByDutyAreaId(Long dutyAreaId);
List<Map<String, Object>> queryByCompanyId(Long companyId);
}
......@@ -20,7 +20,7 @@
and s.duty_date >= #{beginDate}
and s.duty_date <![CDATA[<=]]>
#{endDate}
AND s.shift_id is not null <!--// BUG 2807 更新人员车辆排版值班的保存逻辑 如果没有填写数据则保存空数据 。
AND s.shift_id is not null <!--// BUG 2807 更新人员车辆排版值班的保存逻辑 如果没有填写数据则保存空数据 。
同步修改 查询 导出相关逻辑 by kongfm 2021-09-14 -->
and s.app_Key = #{appKey}
GROUP BY s.duty_date,s.shift_id <!--增添分组条件 根据班次分组技术 -->
......@@ -127,7 +127,7 @@
<if test="params != null and params!='' ">
and cd.field_value !='消防车驾驶员'
</if>
AND cd.instance_id IN
AND cd.instance_id IN
<foreach collection ='instanceIds' item='instanceId' index='index' open="(" close= ")" separator=",">
#{instanceId}
</foreach>
......@@ -150,7 +150,7 @@
cd.FIELD_VALUE
END
) AS #{equipmentName},
MAX(
CASE
WHEN cd.FIELD_CODE = #{teamName} THEN
......@@ -174,7 +174,7 @@
cd.is_delete=0
group by cd.instance_id
) result group by ${groupByName}
</select>
<select id='getInstanceIdForSpecifyDateAndEquipment'
resultType='map'>
......@@ -201,7 +201,7 @@
</select>
<select id='getEquipmentOperator' resultType='map'>
SELECT
result.userName
result.userName
FROM
(
SELECT
......@@ -235,7 +235,7 @@ FROM
cd.group_code = #{groupCode}
AND cds.instance_id IS NOT NULL
AND cd.is_delete = 0
AND cd.instance_id IN
AND cd.instance_id IN
<foreach collection ='instanceIds' item='instanceId' index='index' open="(" close= ")" separator=",">
#{instanceId}
</foreach>
......@@ -243,8 +243,8 @@ FROM
WHERE
result.postTypeName = #{operator} and result.name =#{duty}
</select>
<select id ='getPositionStaffDutyForSpecifyDate' resultType="map">
SELECT
GROUP_CONCAT(ss.userName) AS userName,
......@@ -294,7 +294,7 @@ WHERE
GROUP BY
ss.postTypeName
</select>
<select id='getDutyForSpecifyDate' resultType="map">
SELECT
ds.`name`
......@@ -307,7 +307,7 @@ AND dp.is_delete = 0
AND NAME IS NOT NULL
GROUP BY
NAME
</select>
</select>
<select id='getFireTeamBySequenceNbr' resultType="map">
......@@ -341,4 +341,26 @@ AND cft.type_code = (
AND cft.company = #{company}
</select>
<select id='queryByCompanyId' resultType="map">
SELECT
e.field_code,
e.field_name,
e.field_value
FROM
cb_dynamic_form_instance e,
(SELECT
i.*
FROM
cb_dynamic_form_instance i
,
(SELECT * FROM `cb_duty_person_shift` where to_days(duty_date) = to_days(now())) b
WHERE
i.instance_id = b.instance_id
AND
i.field_code = 'deptId'
AND
i.field_value = #{companyId}) c
WHERE
e. instance_id = c.instance_id
</select>
</mapper>
......@@ -685,4 +685,37 @@ LEFT JOIN (
#{companyId}
</foreach>
</select>
<select id="queryCompanyId" resultType="map">
SELECT
d.field_code ,
d.field_name ,
d.field_value ,
s.sequence_nbr,
s.biz_org_name,
s.parent_id
FROM
cb_dynamic_form_instance d ,
( SELECT
u.*
FROM
cb_org_usr u,
cb_dynamic_form_instance i
where
u.parent_id = #{id}
AND
u.is_delete = 0
AND
u.biz_org_type = 'PERSON'
AND
i.instance_id = u.sequence_nbr
AND
i.field_code = 'administrativePositionCode'
AND
i.field_value is not NULL ) s
WHERE
d.instance_id = s.sequence_nbr
AND
d.field_code = 'telephone'
</select>
</mapper>
package com.yeejoin.amos.boot.module.ccs.biz.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List;
import com.yeejoin.amos.boot.module.ccs.api.dto.FireEquipmentAlarmLogDto;
import com.yeejoin.amos.boot.module.ccs.biz.service.impl.FireEquipmentAlarmLogServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ccs.api.dto.FireEquipmentAlarmLogDto;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
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 org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.text.ParseException;
import java.util.List;
/**
* 设备报警信息日志表
......@@ -32,71 +34,27 @@ public class FireEquipmentAlarmLogController extends BaseController {
FireEquipmentAlarmLogServiceImpl fireEquipmentAlarmLogServiceImpl;
/**
* 新增设备报警信息日志表
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增设备报警信息日志表", notes = "新增设备报警信息日志表")
public ResponseModel<FireEquipmentAlarmLogDto> save(@RequestBody FireEquipmentAlarmLogDto model) {
model = fireEquipmentAlarmLogServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
* 根据sequenceNbr删除
* 列表全部数据查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除设备报警信息日志表", notes = "根据sequenceNbr删除设备报警信息日志表")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
return ResponseHelper.buildResponse(fireEquipmentAlarmLogServiceImpl.removeById(sequenceNbr));
@ApiOperation(httpMethod = "GET", value = "设备报警信息日志表列表", notes = "设备报警信息日志列表")
@GetMapping(value = "/list")
public ResponseModel<List<FireEquipmentAlarmLogDto>> selectForList() {
return ResponseHelper.buildResponse(fireEquipmentAlarmLogServiceImpl.fireEquipmentAlarmLogList());
}
/**
* 根据sequenceNbr查询
* 今日未确认设备报警信息列表
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个设备报警信息日志表", notes = "根据sequenceNbr查询单个设备报警信息日志表")
public ResponseModel<FireEquipmentAlarmLogDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(fireEquipmentAlarmLogServiceImpl.queryBySeq(sequenceNbr));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "设备报警信息日志表分页查询", notes = "设备报警信息日志表分页查询")
public ResponseModel<Page<FireEquipmentAlarmLogDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<FireEquipmentAlarmLogDto> page = new Page<FireEquipmentAlarmLogDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(fireEquipmentAlarmLogServiceImpl.queryForFireEquipmentAlarmLogPage(page));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "设备报警信息日志表列表全部数据查询", notes = "设备报警信息日志表列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<FireEquipmentAlarmLogDto>> selectForList() {
return ResponseHelper.buildResponse(fireEquipmentAlarmLogServiceImpl.queryForFireEquipmentAlarmLogList());
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "今日未确认设备报警信息列表", notes = "今日未确认设备报警信息列表,跑马灯使用")
@GetMapping(value = "/today/list")
public ResponseModel<List<FireEquipmentAlarmLogDto>> todayAlarmList(
@ApiParam(value = "换流站编号") @RequestParam(required = false) String stationCode) throws ParseException {
return ResponseHelper.buildResponse(fireEquipmentAlarmLogServiceImpl.todayAlarmLogList(stationCode));
}
}
......@@ -95,7 +95,7 @@ public class FireFmeaStatisticsController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "发生率/严重度矩阵统计表分页查询", notes = "发生率/严重度矩阵统计表分页查询")
public ResponseModel<Page<FireFmeaStatisticsDto>> queryForPage(@RequestParam(value = "current") int current, @RequestParam
(value = "size") int size) {
Page<FireFmeaStatisticsDto> page = new Page<FireFmeaStatisticsDto>();
Page<FireFmeaStatisticsDto> page = new Page<>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(fireFmeaStatisticsServiceImpl.queryForFireFmeaStatisticsPage(page));
......
package com.yeejoin.amos.boot.module.ccs.biz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.ccs.api.dto.FireLatentDangerDto;
import com.yeejoin.amos.boot.module.ccs.biz.service.impl.FireLatentDangerServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
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 org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
......@@ -31,71 +33,16 @@ public class FireLatentDangerController extends BaseController {
FireLatentDangerServiceImpl fireLatentDangerServiceImpl;
/**
* 新增隐患信息
* 列表数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增隐患信息", notes = "新增隐患信息")
public ResponseModel<FireLatentDangerDto> save(@RequestBody FireLatentDangerDto model) {
model = fireLatentDangerServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除隐患信息", notes = "根据sequenceNbr删除隐患信息")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr) {
return ResponseHelper.buildResponse(fireLatentDangerServiceImpl.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET", value = "根据sequenceNbr查询单个隐患信息", notes = "根据sequenceNbr查询单个隐患信息")
public ResponseModel<FireLatentDangerDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(fireLatentDangerServiceImpl.queryBySeq(sequenceNbr));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET", value = "隐患信息分页查询", notes = "隐患信息分页查询")
public ResponseModel<Page<FireLatentDangerDto>> queryForPage(@RequestParam(value = "current") int current, @RequestParam
(value = "size") int size) {
Page<FireLatentDangerDto> page = new Page<FireLatentDangerDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(fireLatentDangerServiceImpl.queryForFireLatentDangerPage(page));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "隐患信息列表全部数据查询", notes = "隐患信息列表全部数据查询")
@ApiOperation(httpMethod = "GET", value = "隐患列表", notes = "隐患列表")
@GetMapping(value = "/list")
public ResponseModel<List<FireLatentDangerDto>> selectForList() {
return ResponseHelper.buildResponse(fireLatentDangerServiceImpl.queryForFireLatentDangerList());
public ResponseModel<List<FireLatentDangerDto>> selectForList(
@ApiParam(value = "前多少条") @RequestParam(required = false) Long top,
@ApiParam(value = "换流站编号") @RequestParam(required = false) String stationCode) {
return ResponseHelper.buildResponse(fireLatentDangerServiceImpl.queryForFireLatentDangerList(top, stationCode));
}
}
package com.yeejoin.amos.boot.module.ccs.biz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.ccs.api.dto.FireStationInfoDto;
import com.yeejoin.amos.boot.module.ccs.biz.service.impl.FireStationInfoServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
......@@ -31,70 +31,12 @@ public class FireStationInfoController extends BaseController {
FireStationInfoServiceImpl fireStationInfoServiceImpl;
/**
* 新增站端信息表
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增站端信息表", notes = "新增站端信息表")
public ResponseModel<FireStationInfoDto> save(@RequestBody FireStationInfoDto model) {
model = fireStationInfoServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model);
}
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除站端信息表", notes = "根据sequenceNbr删除站端信息表")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr) {
return ResponseHelper.buildResponse(fireStationInfoServiceImpl.removeById(sequenceNbr));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET", value = "根据sequenceNbr查询单个站端信息表", notes = "根据sequenceNbr查询单个站端信息表")
public ResponseModel<FireStationInfoDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(fireStationInfoServiceImpl.queryBySeq(sequenceNbr));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET", value = "站端信息表分页查询", notes = "站端信息表分页查询")
public ResponseModel<Page<FireStationInfoDto>> queryForPage(@RequestParam(value = "current") int current, @RequestParam
(value = "size") int size) {
Page<FireStationInfoDto> page = new Page<FireStationInfoDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(fireStationInfoServiceImpl.queryForFireStationInfoPage(page));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "站端信息表列表全部数据查询", notes = "站端信息表列表全部数据查询")
@ApiOperation(httpMethod = "GET", value = "站端信息表列表", notes = "站端信息表列表")
@GetMapping(value = "/list")
public ResponseModel<List<FireStationInfoDto>> selectForList() {
return ResponseHelper.buildResponse(fireStationInfoServiceImpl.queryForFireStationInfoList());
......
package com.yeejoin.amos.boot.module.ccs.biz.service.impl;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.module.ccs.api.dto.FireEquipmentAlarmLogDto;
import com.yeejoin.amos.boot.module.ccs.api.entity.FireEquipmentAlarmLog;
import com.yeejoin.amos.boot.module.ccs.api.mapper.FireEquipmentAlarmLogMapper;
import com.yeejoin.amos.boot.module.ccs.api.service.IFireEquipmentAlarmLogService;
import com.yeejoin.amos.boot.module.ccs.api.dto.FireEquipmentAlarmLogDto;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import com.yeejoin.amos.boot.module.ccs.biz.util.RequestUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import javax.servlet.http.HttpServletRequest;
import java.text.ParseException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 设备报警信息日志表服务实现类
......@@ -16,18 +24,27 @@ import java.util.List;
* @date 2021-11-09
*/
@Service
public class FireEquipmentAlarmLogServiceImpl extends BaseService<FireEquipmentAlarmLogDto,FireEquipmentAlarmLog,FireEquipmentAlarmLogMapper> implements IFireEquipmentAlarmLogService {
public class FireEquipmentAlarmLogServiceImpl extends BaseService<FireEquipmentAlarmLogDto, FireEquipmentAlarmLog, FireEquipmentAlarmLogMapper> implements IFireEquipmentAlarmLogService {
@Autowired
HttpServletRequest request;
/**
* 分页查询
* 告警列表查询-最新告警及跑马灯使用
*/
public Page<FireEquipmentAlarmLogDto> queryForFireEquipmentAlarmLogPage(Page<FireEquipmentAlarmLogDto> page) {
return this.queryForPage(page, null, false);
public List<FireEquipmentAlarmLogDto> fireEquipmentAlarmLogList() {
Map<String, Object> params = RequestUtil.getRequestParamMap(request);
return this.getBaseMapper().queryAlarmLogList(params);
}
/**
* 列表查询 示例
*/
public List<FireEquipmentAlarmLogDto> queryForFireEquipmentAlarmLogList() {
return this.queryForList("" , false);
public List<FireEquipmentAlarmLogDto> todayAlarmLogList(String stationCode) throws ParseException {
Map<String, Object> params = new HashMap<>();
//未确认
params.put("confirmState","0");
params.put("beginDate", DateUtils.dateFormat(new Date(),DateUtils.DATE_PATTERN));
params.put("endDate", DateUtils.dateFormat(new Date(),DateUtils.DATE_PATTERN));
params.put("stationCode",stationCode);
return this.getBaseMapper().queryAlarmLogList(params);
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.ccs.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.ccs.api.dto.BaseDto;
import com.yeejoin.amos.boot.module.ccs.api.entity.BaseEntity;
import com.yeejoin.amos.boot.module.ccs.api.entity.FireLatentDanger;
import com.yeejoin.amos.boot.module.ccs.api.mapper.FireLatentDangerMapper;
import com.yeejoin.amos.boot.module.ccs.api.service.IFireLatentDangerService;
import com.yeejoin.amos.boot.module.ccs.api.dto.FireLatentDangerDto;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
import java.util.stream.Collectors;
/**
* 隐患信息服务实现类
......@@ -26,8 +32,10 @@ public class FireLatentDangerServiceImpl extends BaseService<FireLatentDangerDto
/**
* 列表查询 示例
* @param top 取值
* @param stationCode 站code
*/
public List<FireLatentDangerDto> queryForFireLatentDangerList() {
return this.queryForList("" , false);
public List<FireLatentDangerDto> queryForFireLatentDangerList(Long top, String stationCode ) {
return this.getBaseMapper().queryDangerList(top,stationCode);
}
}
\ No newline at end of file
......@@ -28,6 +28,6 @@ public class FireStationInfoServiceImpl extends BaseService<FireStationInfoDto,F
* 列表查询 示例
*/
public List<FireStationInfoDto> queryForFireStationInfoList() {
return this.queryForList("" , false);
return this.baseMapper.queryStationListWithStatistics();
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.ccs.biz.util;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;
/**
* @author DELL
*/
public class RequestUtil {
public static Map<String, Object> getRequestParamMap(HttpServletRequest request){
Map<String, String[]> parameterMap = request.getParameterMap();
Map<String, String[]> localMap = new HashMap<>(parameterMap);
Map<String, Object> params = new HashMap<>();
if (!ValidationUtil.isEmpty(localMap)) {
for (String key : localMap.keySet()) {
if (!ValidationUtil.isEmpty(localMap.get(key))) {
params.put(key, localMap.get(key)[0]);
}
}
}
return params;
}
}
......@@ -191,4 +191,18 @@ public class DutyPersonController extends BaseController {
return ResponseHelper.buildResponse(iDutyPersonService.findByDutyAreaId(dutyAreaId));
}
/**
*
*
* @return ResponseModel
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/companyId/{companyId}")
@ApiOperation(httpMethod = "GET", value = "查询当日值班人员", notes = "查询当日值班人员")
public ResponseModel<List<Map<String, Object>>> queryByCompanyId(
@PathVariable Long companyId) throws Exception {
return ResponseHelper.buildResponse(iDutyPersonService.queryByCompanyId(companyId));
}
}
......@@ -267,4 +267,18 @@ public class OrgPersonController {
throw new RuntimeException("系统异常!");
}
}
/**
* 机场单位下 各单位下人员岗位不为空的人员
*
* @param id
* @return
*/
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/companyId/{id}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "获取人员岗位不为空的人员详情", notes = "获取人员岗位不为空的人员详情")
public ResponseModel<Object> queryCompanyId(HttpServletRequest request,
@PathVariable Long id) throws Exception {
return ResponseHelper.buildResponse(iOrgUsrService.queryCompanyId(id));
}
}
......@@ -10,6 +10,7 @@ import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import com.yeejoin.amos.boot.module.common.api.mapper.DutyPersonShiftMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -37,6 +38,8 @@ public class DutyPersonServiceImpl extends DutyCommonServiceImpl implements IDut
@Autowired
EquipFeignClient equipFeign;
@Autowired
DutyPersonShiftMapper dutyPersonShiftMapper;
@Override
......@@ -289,26 +292,29 @@ public Object BuildScheduleDetails(String dutyDay, Long shiftId, String postType
System.out.println("ssssssssss");
});
}
public List<Map<String, Object>> queryByCompanyId(Long companyId){
return dutyPersonShiftMapper.queryByCompanyId(companyId);
}
......
......@@ -129,7 +129,11 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
public List<Map<String,String>> getFirefightersName() {
return firefightersMapper.getFirefightersName();
}
public List<FirefightersDto> queryById(Long teamId,String[] gw){
return firefightersMapper.queryById(teamId,gw);
}
}
......@@ -1859,4 +1859,10 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
return resultMap;
}
public List<Map<String,Object>> queryCompanyId(Long id) {
return orgUsrMapper.queryCompanyId(id);
}
}
......@@ -165,7 +165,7 @@ public class ExcelController extends BaseController {
*/
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "导出值班模板", notes = "导出值班模板")
@GetMapping(value = "/duty_template")
@PostMapping(value = "/duty_template")
public void dutyCarTemplate(HttpServletResponse response, @RequestParam("beginDate") String beginDate,
@RequestParam("endDate") String endDate, ExcelDto excelDto, @RequestParam("ids") String ids) {
try {
......
......@@ -94,6 +94,7 @@ public class FirefightersController extends BaseController {
@Value("${redis.cache.failure.time}")
private long time;
/**
* 新增消防队员
*
......@@ -332,4 +333,22 @@ public class FirefightersController extends BaseController {
return ResponseHelper.buildResponse(menus);
}
/**
*查询
*
* @param
* @return
* @throws Exception
*/
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/gw/{id}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询")
public ResponseModel<Object> queryById( @PathVariable Long teamId) throws Exception {
//规则提供岗位名称
String[] gw =new String[]{"1202","1203","1204","1205","1206","1207","1209","1208","1210","1211"};
return ResponseHelper.buildResponse(iFirefightersService.queryById(teamId,gw));
}
}
......@@ -37,4 +37,6 @@ public class LatentDangerListParam extends CommonPageable {
private String dangerName;
private String userId;
private String dangerId;
}
spring.application.name=AMOS-CCS-API
spring.application.name=AMOS-BIZ-API-CCS
server.servlet.context-path=/ccs
server.port=8807
spring.profiles.active=dev
......
......@@ -888,6 +888,9 @@
<if test="latentDangerListParam.dangerName != null and latentDangerListParam.dangerName !=''">
AND pld.danger_name LIKE concat('%',#{latentDangerListParam.dangerName},'%')
</if>
<if test="latentDangerListParam.dangerId != null and latentDangerListParam.dangerId !=''">
and pld.id=#{latentDangerListParam.dangerId}
</if>
ORDER BY create_date DESC
<if test="latentDangerListParam.pageSize != null and latentDangerListParam.offset != null">
limit #{latentDangerListParam.offset}, #{latentDangerListParam.pageSize}
......@@ -916,6 +919,9 @@
<if test="latentDangerListParam.dangerName != null and latentDangerListParam.dangerName !=''">
AND pld.danger_name LIKE concat('%',#{latentDangerListParam.dangerName},'%')
</if>
<if test="latentDangerListParam.dangerId != null and latentDangerListParam.dangerId !=''">
and pld.id=#{latentDangerListParam.dangerId}
</if>
</select>
<select id="countByStatus" resultType="java.lang.Integer">
......
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