Pārlūkot izejas kodu

Merge branch 'develop' of gitadmin/tuoheng_freeway into release

tags/v1.2.0^2
wanjing pirms 1 gada
vecāks
revīzija
f0326492dc
14 mainītis faili ar 335 papildinājumiem un 5 dzēšanām
  1. +16
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AccidentController.java
  2. +14
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AccidentReadController.java
  3. +132
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/Accident.java
  4. +56
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/AccidentRead.java
  5. +11
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/AccidentMapper.java
  6. +11
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/AccidentReadMapper.java
  7. +17
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/AccidentServiceImpl.java
  8. +15
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/IAccidentService.java
  9. +19
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accidentread/AccidentReadServiceImpl.java
  10. +11
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accidentread/IAccidentReadService.java
  11. +5
    -5
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/utils/AirWeatherUtil.java
  12. +16
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/AirWeatherVO.java
  13. +6
    -0
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/AccidentMapper.xml
  14. +6
    -0
      tuoheng-service/tuoheng-admin/src/main/resources/mapper/AccidentReadMapper.xml

+ 16
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AccidentController.java Parādīt failu

@@ -0,0 +1,16 @@
package com.tuoheng.admin.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* 事故表 前端控制器
* @Author ChengWang
* @Date 2023/3/2
*/
@RestController
@RequestMapping("/accident")
public class AccidentController {


}

+ 14
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/AccidentReadController.java Parādīt failu

@@ -0,0 +1,14 @@
package com.tuoheng.admin.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
* 应急时间已读表 前端控制器
* @Author ChengWang
* @Date 2023/3/2
*/
@RestController
@RequestMapping("/accidentread")
public class AccidentReadController {
}

+ 132
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/Accident.java Parādīt failu

@@ -0,0 +1,132 @@
package com.tuoheng.admin.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tuoheng.common.core.common.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
* @Author ChengWang
* @Date 2023/3/2
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("th_accident")
public class Accident extends BaseEntity {

private static final long serialVersionUID = 1L;

/**
* 租户id
*/
private String tenantId;

/**
* 部门id
*/
private String deptId;

/**
* 巡检任务id
*/
private String inspectionId;

/**
* 巡检任务问题ID
*/
private String inspectionFileId;

/**
* 应急任务ID
*/
private String accidentInspectionId;

/**
* 公路id
*/
private String roadId;

/**
* 路段ID
*/
private String sectionId;

/**
* 问题ID
*/
private String questionId;

/**
* 问题编码
*/
private String questionCode;

/**
* 问题名称
*/
private String questionName;

/**
* 是否有伤亡:0:无;1:有
*/
private Integer isCasualties;

/**
* 是否影响驾驶安全:0:无;1:有
*/
private Integer isDrivingSafety;

/**
* 是否有明火:0:无;1:有
*/
private Integer isFire;

/**
* 事故现场描述
*/
private String record;

/**
* 经度
*/
private String longitude;

/**
* 纬度
*/
private String latitude;

/**
* 无人机回仓:0未回仓;1:已回仓
*/
private Integer uavReturn;

/**
* 事故状态:1未处理 2处理中 3已忽略 4已处理
*/
private Integer status;

/**
*处理人
*/
private String checkUser;

/**
* 处理时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date checkTime;

/**
* 处理结果
*/
private String checkResult;

}

+ 56
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/entity/AccidentRead.java Parādīt failu

@@ -0,0 +1,56 @@
package com.tuoheng.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
* @Author ChengWang
* @Date 2023/3/2
*/
@Data
@Accessors(chain = true)
@TableName("th_accident_read")
public class AccidentRead {

private static final long serialVersionUID = 1L;

/**
* 主键ID
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;

/**
* 应急时间ID
*/
private String accidentId;

/**
* 用户ID
*/
private String userId;

/**
* 状态 1主动忽略 2被动忽略 3已读
*/
private Integer status;

/**
*创建人
*/
private String createUser;

/**
* 创建时间
*/
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
}

+ 11
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/AccidentMapper.java Parādīt failu

@@ -0,0 +1,11 @@
package com.tuoheng.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tuoheng.admin.entity.Accident;

/**
* @Author ChengWang
* @Date 2023/3/2
*/
public interface AccidentMapper extends BaseMapper<Accident> {
}

+ 11
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mapper/AccidentReadMapper.java Parādīt failu

@@ -0,0 +1,11 @@
package com.tuoheng.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tuoheng.admin.entity.AccidentRead;

/**
* @Author ChengWang
* @Date 2023/3/2
*/
public interface AccidentReadMapper extends BaseMapper<AccidentRead> {
}

+ 17
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/AccidentServiceImpl.java Parādīt failu

@@ -0,0 +1,17 @@
package com.tuoheng.admin.service.accident;

import com.tuoheng.admin.entity.Accident;
import com.tuoheng.admin.mapper.AccidentMapper;
import com.tuoheng.common.core.common.BaseServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
* @Author ChengWang
* @Date 2023/3/2
*/
@Service
@Slf4j
public class AccidentServiceImpl extends BaseServiceImpl<AccidentMapper, Accident> implements IAccidentService{

}

+ 15
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/IAccidentService.java Parādīt failu

@@ -0,0 +1,15 @@
package com.tuoheng.admin.service.accident;

import com.tuoheng.admin.entity.Accident;
import com.tuoheng.admin.entity.Section;
import com.tuoheng.admin.query.SectionQuery;
import com.tuoheng.common.core.common.IBaseService;
import com.tuoheng.common.core.utils.JsonResult;

/**
* @Author ChengWang
* @Date 2022/11/17
*/
public interface IAccidentService extends IBaseService<Accident> {

}

+ 19
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accidentread/AccidentReadServiceImpl.java Parādīt failu

@@ -0,0 +1,19 @@
package com.tuoheng.admin.service.accidentread;

import com.tuoheng.admin.entity.AccidentRead;
import com.tuoheng.admin.mapper.AccidentReadMapper;
import com.tuoheng.admin.service.accident.IAccidentService;
import com.tuoheng.common.core.common.BaseServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
* @Author ChengWang
* @Date 2023/3/2
*/
@Service
@Slf4j
public class AccidentReadServiceImpl implements IAccidentReadService {


}

+ 11
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accidentread/IAccidentReadService.java Parādīt failu

@@ -0,0 +1,11 @@
package com.tuoheng.admin.service.accidentread;

import com.tuoheng.admin.entity.AccidentRead;
import com.tuoheng.common.core.common.IBaseService;

/**
* @Author ChengWang
* @Date 2023/3/2
*/
public interface IAccidentReadService{
}

+ 5
- 5
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/utils/AirWeatherUtil.java Parādīt failu

@@ -8,12 +8,12 @@ import java.math.BigDecimal;
public class AirWeatherUtil {

public static String getWeather(AirWeatherVO airWeather) {
if(ObjectUtil.isEmpty(airWeather) ||ObjectUtil.isEmpty(airWeather.getWth())){
if (ObjectUtil.isEmpty(airWeather) || ObjectUtil.isEmpty(airWeather.getWth())) {
return "";
}
return "气温:" + new BigDecimal(airWeather.getWth().getParm().getTmp()).divide(new BigDecimal(10))+"℃"
+ ";湿度:" + new BigDecimal(airWeather.getWth().getParm().getHum()).divide(new BigDecimal(10))+"RH"
+ ";风速:" + new BigDecimal(airWeather.getWth().getParm().getWspd()).divide(new BigDecimal(10))+"M/S"
+ ";风向:" + airWeather.getWth().getParm().getWdir() + "°";
return "气温:" + airWeather.getWth().getParmNew().getTmp() + "℃"
+ ";湿度:" + airWeather.getWth().getParmNew().getHum() + "RH"
+ ";风速:" + airWeather.getWth().getParmNew().getWspd() + "M/S"
+ ";风向:" + airWeather.getWth().getParmNew().getWdirname();
}
}

+ 16
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/vo/AirWeatherVO.java Parādīt failu

@@ -40,6 +40,7 @@ public class AirWeatherVO implements Serializable {
@Data
public static class WTHDTO {
private ParmDTO parm;
private ParmNewDTO parmNew;
private Integer mid;
private String deviceid;
private Integer timestamp;
@@ -61,6 +62,21 @@ public class AirWeatherVO implements Serializable {
private Integer pm10;
private Integer wdir;
}

@NoArgsConstructor
@Data
public static class ParmNewDTO {
private Double hum;
private Double noise;
private Double rainfull;
private Double tmp;
private String wdirname;
private Double dew;
private Double wspd;
private Double hpa;
private Double wdir;
private Double lux;
}
}

@NoArgsConstructor

+ 6
- 0
tuoheng-service/tuoheng-admin/src/main/resources/mapper/AccidentMapper.xml Parādīt failu

@@ -0,0 +1,6 @@
<?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.tuoheng.admin.mapper.AccidentMapper">


</mapper>

+ 6
- 0
tuoheng-service/tuoheng-admin/src/main/resources/mapper/AccidentReadMapper.xml Parādīt failu

@@ -0,0 +1,6 @@
<?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.tuoheng.admin.mapper.AccidentReadMapper">


</mapper>

Notiek ielāde…
Atcelt
Saglabāt