| | |
| | | |
| | | import com.thhy.general.common.BasicResult; |
| | | import com.thhy.materials.modules.biz.helmet.service.HelmetService; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | public BasicResult helmetReportUser(@RequestBody Map<String,Object> values){ |
| | | return helmetService.helmetReportUser(values); |
| | | } |
| | | //烟尘数据 |
| | | @PostMapping("/dataSmockList") |
| | | public BasicResult dataSmockList(@RequestBody Map<String,Object> values){ |
| | | return helmetService.dataSmockList(values); |
| | | } |
| | | |
| | | //环境监测 |
| | | @PostMapping("/dataValuesList") |
| | | public BasicResult dataValuesList(@RequestBody Map<String,Object> values){ |
| | | return helmetService.dataValuesList(values); |
| | | } |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.thhy.materials.modules.biz.helmet.entity; |
| | | |
| | | import lombok.Data; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | import lombok.ToString; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @Getter |
| | | @Setter |
| | | @ToString |
| | | public class TDataValue implements Serializable { |
| | | /** |
| | | * |
| | | */ |
| | | private Integer dataId; |
| | | |
| | | /** |
| | | * 设备编号 |
| | | */ |
| | | private Integer deviceId; |
| | | |
| | | /** |
| | | * 设备名称 |
| | | */ |
| | | private String deviceName; |
| | | |
| | | /** |
| | | * 账号 |
| | | */ |
| | | private String accountNumber; |
| | | |
| | | /** |
| | | * 上传时间 |
| | | */ |
| | | private String uploadTime; |
| | | |
| | | /** |
| | | * pm2.5 |
| | | */ |
| | | private String pm25; |
| | | |
| | | /** |
| | | * pm10 |
| | | */ |
| | | private String pm10; |
| | | |
| | | /** |
| | | * tsp |
| | | */ |
| | | private String tsp; |
| | | |
| | | /** |
| | | * 温度 |
| | | */ |
| | | private String temperature; |
| | | |
| | | /** |
| | | * 湿度 |
| | | */ |
| | | private String humidity; |
| | | |
| | | /** |
| | | * 数据6 |
| | | */ |
| | | private String data6; |
| | | |
| | | /** |
| | | * 风速 |
| | | */ |
| | | private String windSpeed; |
| | | |
| | | /** |
| | | * 风向 |
| | | */ |
| | | private String windDirection; |
| | | |
| | | /** |
| | | * tvoc |
| | | */ |
| | | private String tvoc; |
| | | |
| | | /** |
| | | * no2 |
| | | */ |
| | | private String no2; |
| | | |
| | | /** |
| | | * co |
| | | */ |
| | | private String co; |
| | | |
| | | /** |
| | | * so2 |
| | | */ |
| | | private String so2; |
| | | |
| | | /** |
| | | * o3 |
| | | */ |
| | | private String o3; |
| | | |
| | | |
| | | /** |
| | | * 噪音 |
| | | */ |
| | | private String noise; |
| | | |
| | | /** |
| | | * This field was generated by MyBatis Generator. |
| | | * This field corresponds to the database table t_data_value |
| | | * |
| | | * @mbg.generated Fri Oct 13 15:29:00 CST 2023 |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | } |
| | |
| | | |
| | | void smockInsert(TDataSmock tDataSmock); |
| | | |
| | | List<TDataSmock> dataSmockList(Map<String, Object> values); |
| | | |
| | | List<TDataValue> dataValuesList(Map<String, Object> values); |
| | | } |
| | |
| | | BasicResult helmetReportUser(Map<String, Object> values); |
| | | |
| | | void smockInsert(TDataSmock tDataSmock); |
| | | |
| | | BasicResult dataSmockList(Map<String, Object> values); |
| | | |
| | | BasicResult dataValuesList(Map<String, Object> values); |
| | | } |
| | |
| | | import com.thhy.materials.modules.biz.helmet.mapper.HelmetMapper; |
| | | import com.thhy.materials.modules.biz.helmet.service.HelmetService; |
| | | import org.springframework.stereotype.Service; |
| | | import sun.misc.Cache; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | |
| | | System.out.println("参数为---"+tDataSmock.toString()); |
| | | helmetMapper.smockInsert(tDataSmock); |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult dataSmockList(Map<String, Object> values) { |
| | | Integer pageSize = Integer.valueOf(values.get("pageSize").toString()); |
| | | Integer pageNum = Integer.valueOf(values.get("pageNum").toString()); |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | List<TDataSmock> dataSmocks = helmetMapper.dataSmockList(values); |
| | | PageInfo<TDataSmock> tDataSmockPageInfo = new PageInfo<>(dataSmocks); |
| | | return BasicResult.success(tDataSmockPageInfo); |
| | | } |
| | | |
| | | @Override |
| | | public BasicResult dataValuesList(Map<String, Object> values) { |
| | | Integer pageSize = Integer.valueOf(values.get("pageSize").toString()); |
| | | Integer pageNum = Integer.valueOf(values.get("pageNum").toString()); |
| | | PageHelper.startPage(pageNum,pageSize); |
| | | List<TDataValue> dataSmocks = helmetMapper.dataValuesList(values); |
| | | PageInfo<TDataValue> tDataValuePageInfo = new PageInfo<>(dataSmocks); |
| | | return BasicResult.success(tDataValuePageInfo); |
| | | } |
| | | } |
| | |
| | | </trim> |
| | | </insert> |
| | | |
| | | <select id="dataSmockList" resultType="com.thhy.materials.modules.biz.helmet.entity.TDataSmock"> |
| | | select |
| | | smoke_id as smokeId, |
| | | gateway_cyc as gatewayCyc, |
| | | FanS as fans, |
| | | V1Run as v1run, |
| | | UV1Run as uv1run, |
| | | FanRun as fanrun, |
| | | UV2Run as uv2run, |
| | | SSVRun as ssvrun, |
| | | DP as dp, |
| | | T as t, |
| | | OC as oc, |
| | | gatew as gatew, |
| | | NXRun as nxrun, |
| | | Alarm as alarm, |
| | | times as times, |
| | | RTC_VOLT as rtcVolt, |
| | | V2Run as v2run, |
| | | DXQVRun as dxqvrun, |
| | | Press as press, |
| | | Dc as dc |
| | | from t_data_smock |
| | | where 1=1 |
| | | <if test="strTime!=null and endTime!=null and strTime!='' and endTime!='' "> |
| | | and times between #{strTime} and #{endTime} |
| | | </if> |
| | | order by times desc |
| | | </select> |
| | | <select id="dataValuesList" resultType="com.thhy.materials.modules.biz.helmet.entity.TDataValue"> |
| | | select |
| | | data_id as dataId, |
| | | device_id as deviceId, |
| | | device_name as deviceName, |
| | | account_number as accountNumber, |
| | | upload_time as uploadTime, |
| | | pm25 as pm25, |
| | | pm10 as pm10, |
| | | tsp as tsp, |
| | | temperature as temperature, |
| | | humidity as humidity, |
| | | data6 as data6, |
| | | wind_speed as windSpeed, |
| | | wind_direction as windDirection, |
| | | tvoc as tvoc, |
| | | no2 as no2, |
| | | co as co, |
| | | so2 as so2, |
| | | o3 as o3, |
| | | noise as noise |
| | | from t_data_value |
| | | where 1=1 |
| | | <if test="strTime!=null and strTime!='' and endTime!=null and endTime!='' "> |
| | | and upload_time between #{strTime} and #{endTime} |
| | | </if> |
| | | order by upload_time desc |
| | | </select> |
| | | |
| | | </mapper> |