增加大屏运维分页接口
This commit is contained in:
parent
caf88b6cd6
commit
8a46bc4454
|
|
@ -1,7 +1,9 @@
|
||||||
package org.jeecg.modules.appmana.controller;
|
package org.jeecg.modules.appmana.controller;
|
||||||
|
|
||||||
import cn.hutool.core.lang.Assert;
|
import cn.hutool.core.lang.Assert;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|
@ -10,16 +12,16 @@ import org.apache.commons.lang3.StringUtils;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.constant.enums.PollutionEnum;
|
import org.jeecg.common.constant.enums.PollutionEnum;
|
||||||
import org.jeecg.common.entity.SurvDeviceDeploy;
|
import org.jeecg.common.entity.SurvDeviceDeploy;
|
||||||
|
import org.jeecg.common.entity.SurvMaintainRecord;
|
||||||
|
import org.jeecg.common.vo.params.StationMaintainPage;
|
||||||
import org.jeecg.modules.appmana.service.ISurvDeviceDeployService;
|
import org.jeecg.modules.appmana.service.ISurvDeviceDeployService;
|
||||||
|
import org.jeecg.modules.appmana.service.ISurvMaintainRecordService;
|
||||||
import org.jeecg.modules.appmana.service.impl.CommonServiceImpl;
|
import org.jeecg.modules.appmana.service.impl.CommonServiceImpl;
|
||||||
import org.jeecg.common.vo.VOBigScreenSurvQ;
|
import org.jeecg.common.vo.VOBigScreenSurvQ;
|
||||||
import org.jeecg.common.vo.VOHisFormResult;
|
import org.jeecg.common.vo.VOHisFormResult;
|
||||||
import org.jeecg.common.vo.VOHisResult;
|
import org.jeecg.common.vo.VOHisResult;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
@ -38,6 +40,8 @@ public class BigScreenControllerP2 {
|
||||||
private ISurvDeviceDeployService survDeviceDeployService;
|
private ISurvDeviceDeployService survDeviceDeployService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private CommonServiceImpl commonService;
|
private CommonServiceImpl commonService;
|
||||||
|
@Autowired
|
||||||
|
private ISurvMaintainRecordService maintainRecordService;
|
||||||
|
|
||||||
@ApiOperationSupport(order = 1)
|
@ApiOperationSupport(order = 1)
|
||||||
@ApiOperation(value = "01. 查询设备下各检测项的历史数据", notes = "")
|
@ApiOperation(value = "01. 查询设备下各检测项的历史数据", notes = "")
|
||||||
|
|
@ -78,4 +82,17 @@ public class BigScreenControllerP2 {
|
||||||
|
|
||||||
return Result.OK(voHisResult);
|
return Result.OK(voHisResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperationSupport(order = 2)
|
||||||
|
@ApiOperation(value = "02. 站点运维分页", notes = "")
|
||||||
|
@GetMapping(value = "/stationMaintainPage")
|
||||||
|
public Result<IPage<SurvMaintainRecord>> stationMaintainPage(StationMaintainPage stationMaintainPage) {
|
||||||
|
Page<SurvMaintainRecord> page = new Page<SurvMaintainRecord>();
|
||||||
|
SurvMaintainRecord survMaintainRecord = new SurvMaintainRecord();
|
||||||
|
survMaintainRecord.setBeginDate(stationMaintainPage.getStartTime());
|
||||||
|
survMaintainRecord.setEndDate(stationMaintainPage.getEndTime());
|
||||||
|
IPage<SurvMaintainRecord> records = maintainRecordService.pages(page,survMaintainRecord);
|
||||||
|
return Result.OK(records);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,5 +43,11 @@
|
||||||
<if test="query.maintainTime!=null">
|
<if test="query.maintainTime!=null">
|
||||||
and DATE_FORMAT(MAINTAIN_TIME, '%Y-%m-%d') = DATE_FORMAT(#{param2.maintainTime},'%Y-%m-%d')
|
and DATE_FORMAT(MAINTAIN_TIME, '%Y-%m-%d') = DATE_FORMAT(#{param2.maintainTime},'%Y-%m-%d')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="query.beginDate!=null and query.beginDate!=''">
|
||||||
|
and MAINTAIN_TIME >= CONCAT(#{query.beginDate}, ' 00:00:00')
|
||||||
|
</if>
|
||||||
|
<if test="query.endDate!=null and query.endDate!=''">
|
||||||
|
and MAINTAIN_TIME <= CONCAT(#{query.endDate}, ' 23:59:59')
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -71,11 +71,11 @@
|
||||||
|
|
||||||
<select id="getCameraGroupByStation" resultType="org.jeecg.common.entity.SurvDeviceDeploy">
|
<select id="getCameraGroupByStation" resultType="org.jeecg.common.entity.SurvDeviceDeploy">
|
||||||
select s.STATION_CODE,group_concat(s.DEPLOY_CODE) as depCodes,group_concat(s.DEPLOY_DES) as depDess,group_concat(s.DEPLOY_PIC) as depPics,group_concat(s.DEVICE_URL) as depUrls
|
select s.STATION_CODE,group_concat(s.DEPLOY_CODE) as depCodes,group_concat(s.DEPLOY_DES) as depDess,group_concat(s.DEPLOY_PIC) as depPics,group_concat(s.DEVICE_URL) as depUrls
|
||||||
from surv_device_deploy s where s.DEPLOY_TYPE='camera' group by s.STATION_CODE
|
from surv_device_deploy s where s.IS_DEL = 0 AND s.DEPLOY_TYPE='camera' group by s.STATION_CODE
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getDeviceByStation" resultMap="adResultMap">
|
<select id="getDeviceByStation" resultMap="adResultMap">
|
||||||
select <include refid="baseSql"/> from surv_device_deploy where 1=1
|
select <include refid="baseSql"/> from surv_device_deploy where IS_DEL = 0
|
||||||
<if test="param1 != null and param1 != ''">
|
<if test="param1 != null and param1 != ''">
|
||||||
AND STATION_CODE = #{param1}
|
AND STATION_CODE = #{param1}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -85,11 +85,11 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getDeviceByCode" resultMap="baseResultMap">
|
<select id="getDeviceByCode" resultMap="baseResultMap">
|
||||||
select <include refid="baseSql"/> from surv_device_deploy where DEPLOY_CODE = #{deployCode}
|
select <include refid="baseSql"/> from surv_device_deploy where IS_DEL = 0 AND DEPLOY_CODE = #{deployCode}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getDeviceByStationNoCam" resultMap="adResultMap">
|
<select id="getDeviceByStationNoCam" resultMap="adResultMap">
|
||||||
select <include refid="baseSql"/> from surv_device_deploy where DEPLOY_TYPE <> 'camera'
|
select <include refid="baseSql"/> from surv_device_deploy where IS_DEL = 0 AND DEPLOY_TYPE <> 'camera'
|
||||||
<if test="param1 != null and param1 != ''">
|
<if test="param1 != null and param1 != ''">
|
||||||
AND STATION_CODE = #{param1}
|
AND STATION_CODE = #{param1}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -101,6 +101,7 @@
|
||||||
<select id="getDeviceListByStations" resultMap="baseResultMap">
|
<select id="getDeviceListByStations" resultMap="baseResultMap">
|
||||||
select <include refid="baseSql"/> from surv_device_deploy
|
select <include refid="baseSql"/> from surv_device_deploy
|
||||||
<where>
|
<where>
|
||||||
|
AND IS_DEL = 0
|
||||||
<if test="deployTypeList != null and deployTypeList.size()>0">
|
<if test="deployTypeList != null and deployTypeList.size()>0">
|
||||||
and DEPLOY_TYPE IN
|
and DEPLOY_TYPE IN
|
||||||
<foreach collection="deployTypeList" index="index" item="id" open="(" separator="," close=")">
|
<foreach collection="deployTypeList" index="index" item="id" open="(" separator="," close=")">
|
||||||
|
|
|
||||||
|
|
@ -104,4 +104,10 @@ public class SurvMaintainRecord implements Serializable {
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String omName;
|
private String omName;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String beginDate;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String endDate;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
package org.jeecg.common.vo.params;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class StationMaintainPage {
|
||||||
|
private String startTime;
|
||||||
|
private String endTime;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue