bug修复
This commit is contained in:
parent
b5ba585585
commit
e3dddb82c8
@ -37,7 +37,7 @@ public class SwaggerConfig {
|
||||
|
||||
@Bean
|
||||
public Docket createZwRestApi() {
|
||||
return new Docket(DocumentationType.SWAGGER_2).groupName("2政务接口").apiInfo(apiInfo("政务管理API", "政务前后端联调api文档", "1.0")).select()
|
||||
return new Docket(DocumentationType.SWAGGER_2).groupName("2.政务接口").apiInfo(apiInfo("政务管理API", "政务前后端联调api文档", "1.0")).select()
|
||||
//.apis(RequestHandlerSelectors.basePackage("com.zhgd.xmgl"))
|
||||
.apis(basePackage("com.zhwl.zw")).paths(PathSelectors.any())
|
||||
//.paths(PathSelectors.regex("/zw.*"))
|
||||
@ -46,7 +46,7 @@ public class SwaggerConfig {
|
||||
|
||||
@Bean
|
||||
public Docket createRestApi() {
|
||||
return new Docket(DocumentationType.SWAGGER_2).groupName("1项目接口").apiInfo(apiInfo("项目管理API", "项目前后端联调api文档", "1.0")).select()
|
||||
return new Docket(DocumentationType.SWAGGER_2).groupName("1.项目接口").apiInfo(apiInfo("项目管理API", "项目前后端联调api文档", "1.0")).select()
|
||||
//.apis(RequestHandlerSelectors.basePackage("com.zhgd.xmgl"))
|
||||
.apis(basePackage("com.zhgd.xmgl"))
|
||||
//.apis(basePackage("com.zhgd.xmgl"+splitor+"com.zhgd.xmgl.device"))
|
||||
|
||||
@ -3,11 +3,10 @@
|
||||
<mapper namespace="com.zhgd.xmgl.modules.bigdevice.mapper.BigDeviceVideoMapper">
|
||||
|
||||
<select id="selectTowerVideoList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap" parameterType="map">
|
||||
SELECT t1.*,t2.*,t3.id big_device_video_id,t3.dev_sn
|
||||
SELECT t1.item_id as id,t1.*,t2.*,t3.id big_device_video_id,t3.dev_sn
|
||||
FROM video_item t1 INNER JOIN project_video_config t2 ON t2.id=t1.video_id
|
||||
INNER JOIN big_device_video t3 ON t1.item_id=t3.video_item_id
|
||||
INNER JOIN big_device_video t3 ON t1.item_id=t3.video_item_id
|
||||
WHERE t3.type=1 AND t2.is_enable=1 AND t3.dev_sn=#{devSn}
|
||||
|
||||
</select>
|
||||
<select id="selectLifterVideoList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||
SELECT t1.*,t2.*,t3.id big_device_video_id,t3.dev_sn
|
||||
|
||||
@ -25,7 +25,7 @@ import java.util.List;
|
||||
* @since 2022-11-21 15:42:41
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("checkingPointAlarm")
|
||||
@RequestMapping("/xmgl/checkingPointAlarm")
|
||||
@Api(tags = "巡检点报警信息控制器")
|
||||
public class CheckingPointAlarmController {
|
||||
/**
|
||||
|
||||
@ -2,9 +2,12 @@ package com.zhgd.xmgl.modules.checking.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.xmgl.modules.checking.controller.dto.CheckingPointInfoPageDto;
|
||||
import com.zhgd.xmgl.modules.checking.entity.CheckingPointInfo;
|
||||
import com.zhgd.xmgl.modules.checking.service.CheckingPointInfoService;
|
||||
import com.zhgd.xmgl.modules.checking.service.CheckingPointService;
|
||||
import com.zhgd.xmgl.security.entity.UserInfo;
|
||||
import com.zhgd.xmgl.security.util.SecurityUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
@ -13,7 +16,9 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
/**
|
||||
@ -43,10 +48,9 @@ public class CheckingPointInfoController {
|
||||
@ApiImplicitParam(name = "pageNo", value = "当前页", paramType = "query", dataType = "int"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "页大小", paramType = "query", required = true, dataType = "int")
|
||||
})
|
||||
public Result<IPage<CheckingPointInfo>> selectCheckingPointInfoPage(String projectSn, String queryStr, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
public Result<IPage<CheckingPointInfo>> selectCheckingPointInfoPage(CheckingPointInfoPageDto dto) {
|
||||
Result<IPage<CheckingPointInfo>> result = new Result<>();
|
||||
result.setResult(checkingPointInfoService.selectCheckingPointInfoPage(projectSn, queryStr, pageNo, pageSize));
|
||||
result.setResult(checkingPointInfoService.selectCheckingPointInfoPage(dto));
|
||||
result.setSuccess(true);
|
||||
return result;
|
||||
}
|
||||
@ -68,4 +72,18 @@ public class CheckingPointInfoController {
|
||||
result.setSuccess(true);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改巡检记录", notes = "修改巡检记录")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<CheckingPointInfo> edit(@RequestBody CheckingPointInfo checkingPointInfo) {
|
||||
Result<CheckingPointInfo> result = new Result<>();
|
||||
if (Objects.equals(checkingPointInfo.getHandleDone(), 1)) {
|
||||
UserInfo userInfo = SecurityUtils.getUser();
|
||||
checkingPointInfo.setOperateId(userInfo.getUserId());
|
||||
checkingPointInfo.setOperateTime(new Date());
|
||||
}
|
||||
checkingPointInfoService.updateById(checkingPointInfo);
|
||||
result.setSuccess(true);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package com.zhgd.xmgl.modules.checking.controller.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CheckingPointInfoPageDto {
|
||||
String projectSn;
|
||||
@ApiModelProperty("查询条件、多条件(巡检点、巡检位置、巡检人、巡检时间)")
|
||||
String queryStr;
|
||||
Integer pageNo = 1;
|
||||
Integer pageSize = 10;
|
||||
}
|
||||
@ -170,4 +170,11 @@ public class CheckingPoint implements Serializable {
|
||||
@ApiModelProperty("创建人名称")
|
||||
@TableField(exist = false)
|
||||
private String createUserName;
|
||||
@ApiModelProperty("检查人名称")
|
||||
@TableField(exist = false)
|
||||
private String inspectUserNames;
|
||||
@ApiModelProperty("通知人名称")
|
||||
@TableField(exist = false)
|
||||
private String noticeUserNames;
|
||||
|
||||
}
|
||||
@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
@ -24,6 +25,7 @@ import java.util.Date;
|
||||
|
||||
/**
|
||||
* 巡检点记录表
|
||||
*
|
||||
* @author 18780
|
||||
*/
|
||||
@Data
|
||||
@ -32,6 +34,7 @@ import java.util.Date;
|
||||
@TableName(value = "checking_point_info")
|
||||
@ApiModel("巡检点记录")
|
||||
public class CheckingPointInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 巡检点记录id
|
||||
*/
|
||||
@ -84,6 +87,45 @@ public class CheckingPointInfo implements Serializable {
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateDate;
|
||||
/**
|
||||
* 处置结果1已处置2误报忽略
|
||||
*/
|
||||
@Excel(name = "处置结果1已处置2误报忽略", width = 15)
|
||||
@ApiModelProperty(value = "处置结果1已处置2误报忽略")
|
||||
private java.lang.Integer handleResult;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@Excel(name = "描述", width = 15)
|
||||
@ApiModelProperty(value = "描述")
|
||||
private java.lang.String description;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
@Excel(name = "图片", width = 15)
|
||||
@ApiModelProperty(value = "图片")
|
||||
private java.lang.String image;
|
||||
/**
|
||||
* 是否处置过1处置过0未处置
|
||||
*/
|
||||
@Excel(name = "是否处置过1处置过0未处置", width = 15)
|
||||
@ApiModelProperty(value = "是否处置过1处置过0未处置")
|
||||
private java.lang.Integer handleDone;
|
||||
/**
|
||||
* 操作人id
|
||||
*/
|
||||
@Excel(name = "操作人id", width = 15)
|
||||
@ApiModelProperty(value = "操作人id")
|
||||
private java.lang.Long operateId;
|
||||
|
||||
/**
|
||||
* 操作时间
|
||||
*/
|
||||
@Excel(name = "操作时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "操作时间")
|
||||
private java.util.Date operateTime;
|
||||
|
||||
/**
|
||||
* 巡检点名称
|
||||
@ -120,6 +162,7 @@ public class CheckingPointInfo implements Serializable {
|
||||
@ApiModelProperty(value = "异常图片URL")
|
||||
private String alarmImage;
|
||||
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ApiModelProperty("通知人名称")
|
||||
@TableField(exist = false)
|
||||
private String noticeUserNames;
|
||||
}
|
||||
@ -3,6 +3,7 @@ package com.zhgd.xmgl.modules.checking.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.xmgl.modules.checking.controller.dto.CheckingPointInfoPageDto;
|
||||
import com.zhgd.xmgl.modules.checking.entity.CheckingPointInfo;
|
||||
import com.zhgd.xmgl.modules.checking.entity.dto.PointIdCountDTO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@ -19,7 +20,7 @@ import java.util.Set;
|
||||
*/
|
||||
@Mapper
|
||||
public interface CheckingPointInfoMapper extends BaseMapper<CheckingPointInfo> {
|
||||
IPage<CheckingPointInfo> selectCheckingPointInfoPage(@Param("projectSn") String projectSn, @Param("queryStr") String queryStr, Page<?> objectPage);
|
||||
IPage<CheckingPointInfo> selectCheckingPointInfoPage(@Param("dto") CheckingPointInfoPageDto dto, Page<?> objectPage);
|
||||
|
||||
List<CheckingPointInfo> selectAllList();
|
||||
|
||||
|
||||
@ -2,24 +2,23 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.checking.mapper.CheckingPointInfoMapper">
|
||||
<select id="selectCheckingPointInfoPage" resultType="com.zhgd.xmgl.modules.checking.entity.CheckingPointInfo">
|
||||
select cpi.id,
|
||||
cpi.checking_point_id,
|
||||
cpi.checking_point_user_id,
|
||||
cpi.create_date,
|
||||
cpi.update_date,
|
||||
cp.checking_point_name checkingPointName,
|
||||
cp.position,
|
||||
su.real_name checkingPointUserName
|
||||
select cpi.*,
|
||||
cp.checking_point_name checkingPointName,
|
||||
cp.position,
|
||||
su.real_name checkingPointUserName,
|
||||
group_concat(nu.real_name) noticeUserNames
|
||||
from checking_point_info cpi
|
||||
inner join checking_point cp on cpi.checking_point_id = cp.id
|
||||
inner join system_user su on cpi.checking_point_user_id = su.user_id
|
||||
where cp.project_sn = #{projectSn}
|
||||
<if test="queryStr != null and queryStr != ''">
|
||||
and (cp.checking_point_name like concat('%', #{queryStr}, '%')
|
||||
or cp.position like concat('%', #{queryStr}, '%')
|
||||
or su.real_name like concat('%', #{queryStr}, '%')
|
||||
or cpi.create_date like concat('%', #{queryStr}, '%'))
|
||||
inner join checking_point cp on cpi.checking_point_id = cp.id
|
||||
inner join system_user su on cpi.checking_point_user_id = su.user_id
|
||||
left join system_user nu on find_in_set(nu.user_id, cp.notice_user_ids)
|
||||
where cp.project_sn = #{dto.projectSn}
|
||||
<if test="dto.queryStr != null and dto.queryStr != ''">
|
||||
and (cp.checking_point_name like concat('%', #{dto.queryStr}, '%')
|
||||
or cp.position like concat('%', #{dto.queryStr}, '%')
|
||||
or su.real_name like concat('%', #{dto.queryStr}, '%')
|
||||
or cpi.create_date like concat('%', #{dto.queryStr}, '%'))
|
||||
</if>
|
||||
group by cpi.id
|
||||
order by cpi.create_date desc
|
||||
</select>
|
||||
<select id="selectAllList" resultType="com.zhgd.xmgl.modules.checking.entity.CheckingPointInfo">
|
||||
|
||||
@ -2,49 +2,47 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.checking.mapper.CheckingPointMapper">
|
||||
<select id="selectCheckingPointPage" resultType="com.zhgd.xmgl.modules.checking.entity.CheckingPoint">
|
||||
select cp.create_date,
|
||||
cp.create_user_id,
|
||||
cp.project_sn,
|
||||
cp.id,
|
||||
cp.update_date,
|
||||
cp.position,
|
||||
cp.qr_code,
|
||||
cp.checking_point_name,
|
||||
su.real_name createUserName
|
||||
select cp.*,
|
||||
su.real_name createUserName,
|
||||
group_concat(iu.real_name) inspectUserNames,
|
||||
group_concat(nu.real_name) noticeUserNames
|
||||
from checking_point cp
|
||||
inner join system_user su on cp.create_user_id = su.user_id
|
||||
inner join system_user su on cp.create_user_id = su.user_id
|
||||
left join system_user iu on find_in_set(iu.user_id, cp.inspect_user_ids)
|
||||
left join system_user nu on find_in_set(nu.user_id, cp.notice_user_ids)
|
||||
<where>
|
||||
<if test="projectSn != null and projectSn != ''">
|
||||
and cp.project_sn = #{projectSn}
|
||||
</if>
|
||||
</where>
|
||||
group by cp.id
|
||||
order by cp.create_date desc
|
||||
</select>
|
||||
|
||||
<select id="getStartingListByFrequencyType" resultType="com.zhgd.xmgl.modules.checking.entity.CheckingPoint">
|
||||
select id,
|
||||
checking_point_name,
|
||||
project_sn,
|
||||
position,
|
||||
longitude,
|
||||
latitude,
|
||||
qr_code,
|
||||
create_user_id,
|
||||
inspect_user_ids,
|
||||
notice_user_ids,
|
||||
frequency_num,
|
||||
frequency_type,
|
||||
project_sn,
|
||||
position,
|
||||
longitude,
|
||||
latitude,
|
||||
qr_code,
|
||||
create_user_id,
|
||||
inspect_user_ids,
|
||||
notice_user_ids,
|
||||
frequency_num,
|
||||
frequency_type,
|
||||
stand_area,
|
||||
remark,
|
||||
start_time,
|
||||
end_time,
|
||||
create_date,
|
||||
update_date
|
||||
start_time,
|
||||
end_time,
|
||||
create_date,
|
||||
update_date
|
||||
from checking_point
|
||||
where frequency_type = #{type}
|
||||
and current_date() > start_time
|
||||
and end_time >= current_date()
|
||||
and frequency_num is not null
|
||||
and current_date() > start_time
|
||||
and end_time >= current_date()
|
||||
and frequency_num is not null
|
||||
</select>
|
||||
|
||||
<select id="getFinishList" resultType="com.zhgd.xmgl.modules.checking.entity.CheckingPoint">
|
||||
|
||||
@ -2,6 +2,7 @@ package com.zhgd.xmgl.modules.checking.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zhgd.xmgl.modules.checking.controller.dto.CheckingPointInfoPageDto;
|
||||
import com.zhgd.xmgl.modules.checking.entity.CheckingPointInfo;
|
||||
|
||||
import java.util.List;
|
||||
@ -20,7 +21,7 @@ public interface CheckingPointInfoService extends IService<CheckingPointInfo> {
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
IPage<CheckingPointInfo> selectCheckingPointInfoPage(String projectSn, String queryStr, Integer pageNo, Integer pageSize);
|
||||
IPage<CheckingPointInfo> selectCheckingPointInfoPage(CheckingPointInfoPageDto dto);
|
||||
|
||||
List<CheckingPointInfo> selectAllList();
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ package com.zhgd.xmgl.modules.checking.service.impl;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.xmgl.modules.checking.controller.dto.CheckingPointInfoPageDto;
|
||||
import com.zhgd.xmgl.modules.checking.entity.CheckingPointAlarm;
|
||||
import com.zhgd.xmgl.modules.checking.entity.CheckingPointInfo;
|
||||
import com.zhgd.xmgl.modules.checking.enums.PointStatusEnum;
|
||||
@ -38,8 +39,8 @@ public class CheckingPointInfoServiceImpl extends ServiceImpl<CheckingPointInfoM
|
||||
CheckingPointService checkingPointService;
|
||||
|
||||
@Override
|
||||
public IPage<CheckingPointInfo> selectCheckingPointInfoPage(String projectSn, String queryStr, Integer pageNo, Integer pageSize) {
|
||||
return checkingPointInfoMapper.selectCheckingPointInfoPage(projectSn, queryStr, new Page<>(pageNo, pageSize));
|
||||
public IPage<CheckingPointInfo> selectCheckingPointInfoPage(CheckingPointInfoPageDto dto) {
|
||||
return checkingPointInfoMapper.selectCheckingPointInfoPage(dto, new Page<>(dto.getPageNo(), dto.getPageSize()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user