parent
4729c661a5
commit
884237a679
|
@ -147,6 +147,43 @@ public class BuildingController {
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询近一天工地噪声和扬尘的信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("selectDayAll")
|
||||||
|
@ApiOperation("查询近一天工地噪声和扬尘的信息")
|
||||||
|
public Result selectDayAll(){
|
||||||
|
List<BuildingRecordsDto> recordsDtos = buildingRecordsMapper.selectDayAll();
|
||||||
|
Result success = Result.success(recordsDtos);
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询近一周工地噪声和扬尘的信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("selectWeekAll")
|
||||||
|
@ApiOperation("查询近一周工地噪声和扬尘的信息")
|
||||||
|
public Result selectWeekAll(){
|
||||||
|
List<BuildingRecordsDto> recordsDtos = buildingRecordsMapper.selectWeekAll();
|
||||||
|
Result success = Result.success(recordsDtos);
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询近一月工地噪声和扬尘的信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("selectMonthAll")
|
||||||
|
@ApiOperation("查询近一月工地噪声和扬尘的信息")
|
||||||
|
public Result selectMonthAll(){
|
||||||
|
List<BuildingRecordsDto> recordsDtos = buildingRecordsMapper.selectMonthAll();
|
||||||
|
Result success = Result.success(recordsDtos);
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据工地名称搜索工地
|
* 根据工地名称搜索工地
|
||||||
* @param projectName
|
* @param projectName
|
||||||
|
|
|
@ -14,4 +14,5 @@ public class BuildingRecordsDto {
|
||||||
private String ssdq;//所属区域
|
private String ssdq;//所属区域
|
||||||
private double pm10;//扬尘
|
private double pm10;//扬尘
|
||||||
private double noice;//噪声
|
private double noice;//噪声
|
||||||
|
private String yjsg;//夜间施工
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ import lombok.NoArgsConstructor;
|
||||||
@Data
|
@Data
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@TableName("t_building_site")
|
@TableName("t_building_new_site")
|
||||||
public class BuildingSite {
|
public class BuildingSite {
|
||||||
@TableId
|
@TableId
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
@ -25,4 +25,5 @@ public class BuildingSite {
|
||||||
private double jd;
|
private double jd;
|
||||||
private double wd;
|
private double wd;
|
||||||
private String ssdq;
|
private String ssdq;
|
||||||
|
private String yjsg;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,38 +23,50 @@ public interface BuildingRecordsMapper extends BaseMapper<BuildingRecords> {
|
||||||
|
|
||||||
void batchUpdate(@Param("list") List<Map> list);
|
void batchUpdate(@Param("list") List<Map> list);
|
||||||
|
|
||||||
@Select("select br.*,bs.sgwz,bs.jd,bs.wd,bs.ssdq from t_building_records br JOIN t_building_site bs on br.project_name = bs.gdmc")
|
@Select("SELECT * FROM t_building_new_site bns JOIN t_building_records br ON bns.gdmc = br.project_name")
|
||||||
List<BuildingRecordsDto> selectAllBuilding();
|
List<BuildingRecordsDto> selectAllBuilding();
|
||||||
|
|
||||||
@Select("select br.*,bs.sgwz,bs.jd,bs.wd,bs.ssdq from t_building_records br JOIN t_building_site bs on br.project_name = bs.gdmc " +
|
@Select("select * from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc " +
|
||||||
" where to_days(br.push_time) = to_days(now()) order by br.pm10 desc")
|
" where to_days(br.push_time) = to_days(now()) order by br.pm10 desc")
|
||||||
List<BuildingRecordsDto> selectDayPm10();
|
List<BuildingRecordsDto> selectDayPm10();
|
||||||
|
|
||||||
@Select("select br.*,bs.sgwz,bs.jd,bs.wd,bs.ssdq from t_building_records br JOIN t_building_site bs on br.project_name = bs.gdmc" +
|
@Select("select * from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc" +
|
||||||
" where DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= date(br.push_time) order by br.pm10 desc")
|
" where DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= date(br.push_time) order by br.pm10 desc")
|
||||||
List<BuildingRecordsDto> selectWeekPm10();
|
List<BuildingRecordsDto> selectWeekPm10();
|
||||||
|
|
||||||
@Select("select br.*,bs.sgwz,bs.jd,bs.wd,bs.ssdq from t_building_records br JOIN t_building_site bs on br.project_name = bs.gdmc" +
|
@Select("select * from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc" +
|
||||||
" where DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= date(br.push_time) order by br.pm10 desc")
|
" where DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= date(br.push_time) order by br.pm10 desc")
|
||||||
List<BuildingRecordsDto> selectMonthPm10();
|
List<BuildingRecordsDto> selectMonthPm10();
|
||||||
|
|
||||||
@Select("select br.*,bs.sgwz,bs.jd,bs.wd,bs.ssdq from t_building_records br JOIN t_building_site bs on br.project_name = bs.gdmc " +
|
@Select("select * from t_building_records br JOIN t_building_site bs on br.project_name = bs.gdmc " +
|
||||||
" where to_days(br.push_time) = to_days(now()) order by br.noice desc")
|
" where to_days(br.push_time) = to_days(now()) order by br.noice desc")
|
||||||
List<BuildingRecordsDto> selectDayNoice();
|
List<BuildingRecordsDto> selectDayNoice();
|
||||||
|
|
||||||
@Select("select br.*,bs.sgwz,bs.jd,bs.wd,bs.ssdq from t_building_records br JOIN t_building_site bs on br.project_name = bs.gdmc" +
|
@Select("select * from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc" +
|
||||||
" where DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= date(br.push_time) order by br.noice desc")
|
" where DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= date(br.push_time) order by br.noice desc")
|
||||||
List<BuildingRecordsDto> selectWeekNoice();
|
List<BuildingRecordsDto> selectWeekNoice();
|
||||||
|
|
||||||
@Select("select br.*,bs.sgwz,bs.jd,bs.wd,bs.ssdq from t_building_records br JOIN t_building_site bs on br.project_name = bs.gdmc" +
|
@Select("select * from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc" +
|
||||||
" where DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= date(br.push_time) order by br.noice desc")
|
" where DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= date(br.push_time) order by br.noice desc")
|
||||||
List<BuildingRecordsDto> selectMonthNoice();
|
List<BuildingRecordsDto> selectMonthNoice();
|
||||||
|
|
||||||
@Select("select br.*,bs.sgwz,bs.jd,bs.wd,bs.ssdq from t_building_records br JOIN t_building_site bs on br.project_name = bs.gdmc" +
|
@Select("select * from t_building_records br JOIN t_building_site bs on br.project_name = bs.gdmc " +
|
||||||
|
" where to_days(br.push_time) = to_days(now())")
|
||||||
|
List<BuildingRecordsDto> selectDayAll();
|
||||||
|
|
||||||
|
@Select("select * from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc" +
|
||||||
|
" where DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= date(br.push_time)")
|
||||||
|
List<BuildingRecordsDto> selectWeekAll();
|
||||||
|
|
||||||
|
@Select("select * from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc" +
|
||||||
|
" where DATE_SUB(CURDATE(), INTERVAL 30 DAY) <= date(br.push_time)")
|
||||||
|
List<BuildingRecordsDto> selectMonthAll();
|
||||||
|
|
||||||
|
@Select("select br.*,bs.sgwz,bs.jd,bs.wd,bs.ssdq from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc" +
|
||||||
" where br.project_name like concat('%',#{projectName},'%')")
|
" where br.project_name like concat('%',#{projectName},'%')")
|
||||||
List<BuildingRecordsDto> selectByProjectName(String projectName);
|
List<BuildingRecordsDto> selectByProjectName(String projectName);
|
||||||
|
|
||||||
@Select("select br.*,bs.sgwz,bs.jd,bs.wd,bs.ssdq from t_building_records br JOIN t_building_site bs on br.project_name = bs.gdmc" +
|
@Select("select br.*,bs.sgwz,bs.jd,bs.wd,bs.ssdq from t_building_records br JOIN t_building_new_site bs on br.project_name = bs.gdmc" +
|
||||||
" where (bs.jd between #{jd} and #{jd1}) and (bs.wd between #{wd} and #{wd1} )")
|
" where (bs.jd between #{jd} and #{jd1}) and (bs.wd between #{wd} and #{wd1} )")
|
||||||
List<BuildingRecordsDto> selectByJdWd(@Param("jd") Double jd,
|
List<BuildingRecordsDto> selectByJdWd(@Param("jd") Double jd,
|
||||||
@Param("jd1") Double jd1,
|
@Param("jd1") Double jd1,
|
||||||
|
|
|
@ -15,6 +15,6 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
public interface BuildingSiteMapper extends BaseMapper<BuildingSite> {
|
public interface BuildingSiteMapper extends BaseMapper<BuildingSite> {
|
||||||
|
|
||||||
@Select("select * from t_building_site")
|
@Select("select * from t_building_new_site")
|
||||||
List<BuildingSite> selectBuildSite();
|
List<BuildingSite> selectBuildSite();
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,6 +48,9 @@ public class PassengerFlowService {
|
||||||
@Value("7eb78b134e0310904d46039ccea20c32")
|
@Value("7eb78b134e0310904d46039ccea20c32")
|
||||||
private String appSecret;
|
private String appSecret;
|
||||||
|
|
||||||
|
@Value("${scheduled.enable:ture}")
|
||||||
|
private Boolean enable;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 最新的实时客流
|
* 最新的实时客流
|
||||||
|
@ -131,6 +134,7 @@ public class PassengerFlowService {
|
||||||
//提供的接口能查到当前时间2个小时之前的数据,每隔15分钟一次,我们只取整点从早8点到晚8点的整点数据
|
//提供的接口能查到当前时间2个小时之前的数据,每隔15分钟一次,我们只取整点从早8点到晚8点的整点数据
|
||||||
//10:31 到晚上10:31,每小时的31分执行一次
|
//10:31 到晚上10:31,每小时的31分执行一次
|
||||||
public void passengerFlowSchedule(){
|
public void passengerFlowSchedule(){
|
||||||
|
if (enable){
|
||||||
//JSONObject map = new JSONObject();
|
//JSONObject map = new JSONObject();
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String,Object> map = new HashMap<>();
|
||||||
//MultiValueMap<String,Object> map = new LinkedMultiValueMap<>();
|
//MultiValueMap<String,Object> map = new LinkedMultiValueMap<>();
|
||||||
|
@ -177,7 +181,7 @@ public class PassengerFlowService {
|
||||||
} catch (Exception e){
|
} catch (Exception e){
|
||||||
log.error("[passengerFlowSchedule] Exception:"+e.getMessage());
|
log.error("[passengerFlowSchedule] Exception:"+e.getMessage());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//保存实时客流
|
//保存实时客流
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
|
|
@ -24,3 +24,6 @@ mybatis-plus.mapper-locations=classpath*:/mapper/*.xml
|
||||||
#??????swagger,true???false??
|
#??????swagger,true???false??
|
||||||
swagger.enable=true
|
swagger.enable=true
|
||||||
|
|
||||||
|
scheduled.enable=false
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue