bug修复

This commit is contained in:
guo 2024-01-26 18:34:11 +08:00
parent 347708e08b
commit 39c6041cc6
10 changed files with 21 additions and 10 deletions

View File

@ -39,8 +39,8 @@ public class DischargingPlatformDevController {
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
})
@PostMapping(value = "/list")
public Result<List<EntityMap>> selectDischargingPlatformDevList(@RequestBody Map<String, Object> map) {
List<EntityMap> pageList = dischargingPlatformDevService.selectDischargingPlatformDevList(map);
public Result<List<DischargingPlatformDev>> selectDischargingPlatformDevList(@RequestBody Map<String, Object> map) {
List<DischargingPlatformDev> pageList = dischargingPlatformDevService.selectDischargingPlatformDevList(map);
return Result.success(pageList);
}

View File

@ -4,12 +4,15 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 卸料平台-实时数据
@ -90,8 +93,10 @@ public class DischargingPlatformCurrentData implements Serializable {
private java.lang.Double loadRatio;
@TableField(exist = false)
@ApiModelProperty(value = "alarmTime")
private String alarmTime;
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "alarmTime yyyy-MM-dd HH:mm:ss")
private Date alarmTime;
@TableField(exist = false)
@ApiModelProperty(value = "devName")

View File

@ -1,6 +1,7 @@
package com.zhgd.xmgl.modules.discharging.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
@ -132,6 +133,7 @@ public class DischargingPlatformDev implements Serializable {
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date playingTime;
@TableField(exist = false)
@ApiModelProperty(value = "devOnline设备状态1在线0离线")
private Integer devOnline;
}

View File

@ -21,7 +21,7 @@ import org.apache.ibatis.annotations.Param;
@Mapper
public interface DischargingPlatformDevMapper extends BaseMapper<DischargingPlatformDev> {
List<EntityMap> selectDischargingPlatformDevList(Map<String, Object> map);
List<DischargingPlatformDev> selectDischargingPlatformDevList(Map<String, Object> map);
IPage<DischargingPlatformDev> selectDischargingPlatformDevListByPage(@Param("d") DischargingPlatformDev dischargingPlatformDev, Page<DischargingPlatformDev> page, QueryWrapper<DischargingPlatformDev> queryWrapper);

View File

@ -117,6 +117,7 @@
and dev_sn = #{devSn}
</if>
group by alarm_type
order by count desc
</select>
<select id="countAlarmLevel" resultType="com.zhgd.xmgl.modules.discharging.entity.vo.CountAlarmLevelVo">
select

View File

@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zhgd.xmgl.modules.discharging.mapper.DischargingPlatformDevMapper">
<select id="selectDischargingPlatformDevList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
<select id="selectDischargingPlatformDevList"
resultType="com.zhgd.xmgl.modules.discharging.entity.DischargingPlatformDev">
SELECT w1.*,
IFNULL(((case when round((UNIX_TIMESTAMP(now())-UNIX_TIMESTAMP(real_time))/60)&lt;=10 then 1 else 0 end)),0)
devOnline

View File

@ -18,7 +18,7 @@ import java.util.Map;
*/
public interface IDischargingPlatformDevService extends IService<DischargingPlatformDev> {
List<EntityMap> selectDischargingPlatformDevList(Map<String, Object> map);
List<DischargingPlatformDev> selectDischargingPlatformDevList(Map<String, Object> map);
void addDischargingPlatformDev(DischargingPlatformDev dischargingPlatformDev);

View File

@ -36,7 +36,7 @@ public class DischargingPlatformDevServiceImpl extends ServiceImpl<DischargingPl
private DischargingPlatformDevMapper dischargingPlatformDevMapper;
@Override
public List<EntityMap> selectDischargingPlatformDevList(Map<String, Object> map) {
public List<DischargingPlatformDev> selectDischargingPlatformDevList(Map<String, Object> map) {
return dischargingPlatformDevMapper.selectDischargingPlatformDevList(map);
}
@ -53,7 +53,7 @@ public class DischargingPlatformDevServiceImpl extends ServiceImpl<DischargingPl
throw new OpenAlertException(MessageUtil.get("EquipmentNumExistErr"));
}
}
dischargingPlatformDev.setRealTime(new Date());
dischargingPlatformDev.setRealTime(null);
dischargingPlatformDevMapper.insert(dischargingPlatformDev);
}

View File

@ -32,6 +32,7 @@
count(*) cumulativeReservations
from weigh_book_vehicle_info
where project_sn=#{projectSn}
and deleted = 0
</select>
<select id="countWeighBookVehicleInfoTrend" resultType="com.zhgd.xmgl.base.entity.vo.TrendOneVo">
@ -56,6 +57,7 @@
<if test="type == '3'.toString()">
and add_date_time > date_sub(add_date_time,interval 29 day)
</if>
and deleted = 0
group by x
</select>
</mapper>

View File

@ -126,7 +126,7 @@
and gross_time > date_sub(gross_time,interval 29 day)
</if>
group by goods_name
order by count
order by count desc
</select>
<select id="countWeighInfoTrend" resultType="com.zhgd.xmgl.base.entity.vo.TrendOneVo">