废气废水超量未落实排污许可

main
xuxin 2023-08-13 01:43:13 +08:00
parent 6d205e80ec
commit 2a25593d8c
7 changed files with 827 additions and 0 deletions

View File

@ -0,0 +1,120 @@
package cn.cecep.talroad.data.analyse.task.execute.report.excess;
import cn.cecep.talroad.data.analyse.task.execute.report.PollutionDischargeProcessService;
import cn.cecep.talroad.domain.AmProblemFi;
import cn.cecep.talroad.domain.BMainActionReports;
import cn.cecep.talroad.domain.BStatTableZxbgPflAir;
import cn.cecep.talroad.domain.PcFactory;
import cn.cecep.talroad.mapper.*;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@Service
@Slf4j
public class AirExcessMonthProcessService implements PollutionDischargeProcessService {
@Autowired
private BStatTableZxbgPflAirMapper statTableZxbgPflAirMapper;
@Autowired
private BMainActionReportsMapper mainActionReportsMapper;
@Autowired
private AmProblemFiMapper amProblemFiMapper;
@Autowired
private PcFactoryMapper factoryMapper;
/**
* 012
*/
public static final String zxbgType = "0";
/**
* 123
*/
public static final String reportsType = "3";
/**
* 12 3
*/
public static final String pollutantSource = "1";
@Override
public void process() {
// todo :缺少查询报告周期条件
List<BMainActionReports> report = getReport();
for (BMainActionReports bMainActionReports : report) {
LambdaQueryWrapper<BStatTableZxbgPflAir> bStatTableZxbgPflWaterLambdaQueryWrapper = new QueryWrapper<BStatTableZxbgPflAir>().lambda()
.eq(BStatTableZxbgPflAir::getZxbgType, zxbgType)
.eq(BStatTableZxbgPflAir::getZxbgPeriod, bMainActionReports.getReportsTime())
.eq(BStatTableZxbgPflAir::getFactoryId, bMainActionReports.getFactoryId());
List<BStatTableZxbgPflAir> bStatTableZxbgPflWaters = statTableZxbgPflAirMapper.selectList(bStatTableZxbgPflWaterLambdaQueryWrapper);
for (BStatTableZxbgPflAir bStatTableZxbgPflAir : bStatTableZxbgPflWaters) {
BigDecimal zxbgYear = new BigDecimal(bStatTableZxbgPflAir.getZxbgDischargeYear());
BigDecimal zxbgActual = new BigDecimal(bStatTableZxbgPflAir.getZxbgDischargeActual());
if (zxbgActual.doubleValue()>zxbgYear.doubleValue()){
addAmProblemFi(bStatTableZxbgPflAir);
}
}
}
}
public void addAmProblemFi(BStatTableZxbgPflAir bStatTableZxbgPflAir){
PcFactory pcFactory = factoryMapper.selectById(bStatTableZxbgPflAir.getFactoryId());
if (pcFactory==null){
log.warn("企业id不存在 , 企业ID : {}",bStatTableZxbgPflAir.getFactoryId());
}
String problemString = getProblemString(pcFactory.getFactoryName(), bStatTableZxbgPflAir.getZxbgPeriod(), bStatTableZxbgPflAir.getZxbgPollutant());
AmProblemFi amProblemFi = new AmProblemFi();
amProblemFi.setFactoryId(pcFactory.getId());
amProblemFi.setAnalyseTime(new Date());
amProblemFi.setType(1);
amProblemFi.setPollutantSourceAi(pollutantSource);
amProblemFi.setDetails(problemString);
amProblemFiMapper.insert(amProblemFi);
}
/**
* --
* 2013/2013
*/
public String getProblemString(String factoryName , String zxbgPeriod , String pollutantName){
return new StringBuilder()
.append(factoryName).append("(").append(zxbgPeriod).append(")")
.append("中").append(pollutantName).append("实际排放量大于许可排放量,出现超总量情况。")
.toString();
}
/**
*
* todo
* @return
*/
public List<BMainActionReports> getReport(){
LambdaQueryWrapper<BMainActionReports> bMainActionReportsLambdaQueryWrapper = new QueryWrapper<BMainActionReports>().lambda().eq(BMainActionReports::getReportsType, reportsType);
List<BMainActionReports> bMainActionReports = mainActionReportsMapper.selectList(bMainActionReportsLambdaQueryWrapper);
return bMainActionReports;
}
}

View File

@ -0,0 +1,123 @@
package cn.cecep.talroad.data.analyse.task.execute.report.excess;
import cn.cecep.talroad.data.analyse.task.execute.report.PollutionDischargeProcessService;
import cn.cecep.talroad.domain.AmProblemFi;
import cn.cecep.talroad.domain.BMainActionReports;
import cn.cecep.talroad.domain.BStatTableZxbgPflAir;
import cn.cecep.talroad.domain.PcFactory;
import cn.cecep.talroad.mapper.AmProblemFiMapper;
import cn.cecep.talroad.mapper.BMainActionReportsMapper;
import cn.cecep.talroad.mapper.BStatTableZxbgPflAirMapper;
import cn.cecep.talroad.mapper.PcFactoryMapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@Service
@Slf4j
public class AirExcessQuarterProcessService implements PollutionDischargeProcessService {
@Autowired
private BStatTableZxbgPflAirMapper statTableZxbgPflAirMapper;
@Autowired
private BMainActionReportsMapper mainActionReportsMapper;
@Autowired
private AmProblemFiMapper amProblemFiMapper;
@Autowired
private PcFactoryMapper factoryMapper;
/**
* 012
*/
public static final String zxbgType = "1";
/**
* 123
*/
public static final String reportsType = "2";
/**
* 12 3
*/
public static final String pollutantSource = "1";
@Override
public void process() {
// todo :缺少查询报告周期条件
List<BMainActionReports> report = getReport();
for (BMainActionReports bMainActionReports : report) {
LambdaQueryWrapper<BStatTableZxbgPflAir> bStatTableZxbgPflWaterLambdaQueryWrapper = new QueryWrapper<BStatTableZxbgPflAir>().lambda()
.eq(BStatTableZxbgPflAir::getZxbgType, zxbgType)
.eq(BStatTableZxbgPflAir::getZxbgPeriod, bMainActionReports.getReportsTime())
.eq(BStatTableZxbgPflAir::getFactoryId, bMainActionReports.getFactoryId());
List<BStatTableZxbgPflAir> bStatTableZxbgPflWaters = statTableZxbgPflAirMapper.selectList(bStatTableZxbgPflWaterLambdaQueryWrapper);
for (BStatTableZxbgPflAir bStatTableZxbgPflAir : bStatTableZxbgPflWaters) {
BigDecimal zxbgYear = new BigDecimal(bStatTableZxbgPflAir.getZxbgDischargeYear());
BigDecimal zxbgActual = new BigDecimal(bStatTableZxbgPflAir.getZxbgDischargeActual());
if (zxbgActual.doubleValue()>zxbgYear.doubleValue()){
addAmProblemFi(bStatTableZxbgPflAir);
}
}
}
}
public void addAmProblemFi(BStatTableZxbgPflAir bStatTableZxbgPflAir){
PcFactory pcFactory = factoryMapper.selectById(bStatTableZxbgPflAir.getFactoryId());
if (pcFactory==null){
log.warn("企业id不存在 , 企业ID : {}",bStatTableZxbgPflAir.getFactoryId());
}
String problemString = getProblemString(pcFactory.getFactoryName(), bStatTableZxbgPflAir.getZxbgPeriod(), bStatTableZxbgPflAir.getZxbgPollutant());
AmProblemFi amProblemFi = new AmProblemFi();
amProblemFi.setFactoryId(pcFactory.getId());
amProblemFi.setAnalyseTime(new Date());
amProblemFi.setType(1);
amProblemFi.setPollutantSourceAi(pollutantSource);
amProblemFi.setDetails(problemString);
amProblemFiMapper.insert(amProblemFi);
}
/**
* --
* 2013/2013
*/
public String getProblemString(String factoryName , String zxbgPeriod , String pollutantName){
return new StringBuilder()
.append(factoryName).append("(").append(zxbgPeriod).append(")")
.append("中").append(pollutantName).append("实际排放量大于许可排放量,出现超总量情况。")
.toString();
}
/**
*
* todo
* @return
*/
public List<BMainActionReports> getReport(){
LambdaQueryWrapper<BMainActionReports> bMainActionReportsLambdaQueryWrapper = new QueryWrapper<BMainActionReports>().lambda().eq(BMainActionReports::getReportsType, reportsType);
List<BMainActionReports> bMainActionReports = mainActionReportsMapper.selectList(bMainActionReportsLambdaQueryWrapper);
return bMainActionReports;
}
}

View File

@ -0,0 +1,123 @@
package cn.cecep.talroad.data.analyse.task.execute.report.excess;
import cn.cecep.talroad.data.analyse.task.execute.report.PollutionDischargeProcessService;
import cn.cecep.talroad.domain.AmProblemFi;
import cn.cecep.talroad.domain.BMainActionReports;
import cn.cecep.talroad.domain.BStatTableZxbgPflAir;
import cn.cecep.talroad.domain.PcFactory;
import cn.cecep.talroad.mapper.AmProblemFiMapper;
import cn.cecep.talroad.mapper.BMainActionReportsMapper;
import cn.cecep.talroad.mapper.BStatTableZxbgPflAirMapper;
import cn.cecep.talroad.mapper.PcFactoryMapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@Service
@Slf4j
public class AirExcessYearProcessService implements PollutionDischargeProcessService {
@Autowired
private BStatTableZxbgPflAirMapper statTableZxbgPflAirMapper;
@Autowired
private BMainActionReportsMapper mainActionReportsMapper;
@Autowired
private AmProblemFiMapper amProblemFiMapper;
@Autowired
private PcFactoryMapper factoryMapper;
/**
* 012
*/
public static final String zxbgType = "2";
/**
* 123
*/
public static final String reportsType = "1";
/**
* 12 3
*/
public static final String pollutantSource = "1";
@Override
public void process() {
// todo :缺少查询报告周期条件
List<BMainActionReports> report = getReport();
for (BMainActionReports bMainActionReports : report) {
LambdaQueryWrapper<BStatTableZxbgPflAir> bStatTableZxbgPflWaterLambdaQueryWrapper = new QueryWrapper<BStatTableZxbgPflAir>().lambda()
.eq(BStatTableZxbgPflAir::getZxbgType, zxbgType)
.eq(BStatTableZxbgPflAir::getZxbgPeriod, bMainActionReports.getReportsTime())
.eq(BStatTableZxbgPflAir::getFactoryId, bMainActionReports.getFactoryId());
List<BStatTableZxbgPflAir> bStatTableZxbgPflWaters = statTableZxbgPflAirMapper.selectList(bStatTableZxbgPflWaterLambdaQueryWrapper);
for (BStatTableZxbgPflAir bStatTableZxbgPflAir : bStatTableZxbgPflWaters) {
BigDecimal zxbgYear = new BigDecimal(bStatTableZxbgPflAir.getZxbgDischargeYear());
BigDecimal zxbgActual = new BigDecimal(bStatTableZxbgPflAir.getZxbgDischargeActual());
if (zxbgActual.doubleValue()>zxbgYear.doubleValue()){
addAmProblemFi(bStatTableZxbgPflAir);
}
}
}
}
public void addAmProblemFi(BStatTableZxbgPflAir bStatTableZxbgPflAir){
PcFactory pcFactory = factoryMapper.selectById(bStatTableZxbgPflAir.getFactoryId());
if (pcFactory==null){
log.warn("企业id不存在 , 企业ID : {}",bStatTableZxbgPflAir.getFactoryId());
}
String problemString = getProblemString(pcFactory.getFactoryName(), bStatTableZxbgPflAir.getZxbgPeriod(), bStatTableZxbgPflAir.getZxbgPollutant());
AmProblemFi amProblemFi = new AmProblemFi();
amProblemFi.setFactoryId(pcFactory.getId());
amProblemFi.setAnalyseTime(new Date());
amProblemFi.setType(1);
amProblemFi.setPollutantSourceAi(pollutantSource);
amProblemFi.setDetails(problemString);
amProblemFiMapper.insert(amProblemFi);
}
/**
* --
* 2013/2013
*/
public String getProblemString(String factoryName , String zxbgPeriod , String pollutantName){
return new StringBuilder()
.append(factoryName).append("(").append(zxbgPeriod).append(")")
.append("中").append(pollutantName).append("实际排放量大于许可排放量,出现超总量情况。")
.toString();
}
/**
*
* todo
* @return
*/
public List<BMainActionReports> getReport(){
LambdaQueryWrapper<BMainActionReports> bMainActionReportsLambdaQueryWrapper = new QueryWrapper<BMainActionReports>().lambda().eq(BMainActionReports::getReportsType, reportsType);
List<BMainActionReports> bMainActionReports = mainActionReportsMapper.selectList(bMainActionReportsLambdaQueryWrapper);
return bMainActionReports;
}
}

View File

@ -0,0 +1,123 @@
package cn.cecep.talroad.data.analyse.task.execute.report.excess;
import cn.cecep.talroad.data.analyse.task.execute.report.PollutionDischargeProcessService;
import cn.cecep.talroad.domain.*;
import cn.cecep.talroad.mapper.AmProblemFiMapper;
import cn.cecep.talroad.mapper.BMainActionReportsMapper;
import cn.cecep.talroad.mapper.BStatTableZxbgPflWaterMapper;
import cn.cecep.talroad.mapper.PcFactoryMapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Service
@Slf4j
public class WaterExcessMonthProcessService implements PollutionDischargeProcessService {
@Autowired
private BStatTableZxbgPflWaterMapper statTableZxbgPflWaterMapper;
@Autowired
private BMainActionReportsMapper mainActionReportsMapper;
@Autowired
private AmProblemFiMapper amProblemFiMapper;
@Autowired
private PcFactoryMapper factoryMapper;
/**
* 012
*/
public static final String zxbgType = "0";
/**
* 123
*/
public static final String reportsType = "3";
/**
* 12 3
*/
public static final String pollutantSource = "2";
@Override
public void process() {
// todo :缺少查询报告周期条件
List<BMainActionReports> report = getReport();
for (BMainActionReports bMainActionReports : report) {
LambdaQueryWrapper<BStatTableZxbgPflWater> bStatTableZxbgPflWaterLambdaQueryWrapper = new QueryWrapper<BStatTableZxbgPflWater>().lambda()
.eq(BStatTableZxbgPflWater::getZxbgType, zxbgType)
.eq(BStatTableZxbgPflWater::getZxbgPeriod, bMainActionReports.getReportsTime())
.eq(BStatTableZxbgPflWater::getFactoryId, bMainActionReports.getFactoryId());
List<BStatTableZxbgPflWater> bStatTableZxbgPflWaters = statTableZxbgPflWaterMapper.selectList(bStatTableZxbgPflWaterLambdaQueryWrapper);
for (BStatTableZxbgPflWater bStatTableZxbgPflWater : bStatTableZxbgPflWaters) {
BigDecimal zxbgYear = new BigDecimal(bStatTableZxbgPflWater.getZxbgDischargeYear());
BigDecimal zxbgActual = new BigDecimal(bStatTableZxbgPflWater.getZxbgDischargeActual());
if (zxbgActual.doubleValue()>zxbgYear.doubleValue()){
//todo 添加报警信息
}
}
}
}
public void addAmProblemFi(BStatTableZxbgPflAir bStatTableZxbgPflAir){
PcFactory pcFactory = factoryMapper.selectById(bStatTableZxbgPflAir.getFactoryId());
if (pcFactory==null){
log.warn("企业id不存在 , 企业ID : {}",bStatTableZxbgPflAir.getFactoryId());
}
String problemString = getProblemString(pcFactory.getFactoryName(), bStatTableZxbgPflAir.getZxbgPeriod(), bStatTableZxbgPflAir.getZxbgPollutant());
AmProblemFi amProblemFi = new AmProblemFi();
amProblemFi.setFactoryId(pcFactory.getId());
amProblemFi.setAnalyseTime(new Date());
amProblemFi.setType(1);
amProblemFi.setPollutantSourceAi(pollutantSource);
amProblemFi.setDetails(problemString);
amProblemFiMapper.insert(amProblemFi);
}
/**
* --
* 2013/2013
*/
public String getProblemString(String factoryName , String zxbgPeriod , String pollutantName){
return new StringBuilder()
.append(factoryName).append("(").append(zxbgPeriod).append(")")
.append("中").append(pollutantName).append("实际排放量大于许可排放量,出现超总量情况。")
.toString();
}
/**
*
* todo
* @return
*/
public List<BMainActionReports> getReport(){
LambdaQueryWrapper<BMainActionReports> bMainActionReportsLambdaQueryWrapper = new QueryWrapper<BMainActionReports>().lambda().eq(BMainActionReports::getReportsType, reportsType);
List<BMainActionReports> bMainActionReports = mainActionReportsMapper.selectList(bMainActionReportsLambdaQueryWrapper);
return bMainActionReports;
}
}

View File

@ -0,0 +1,121 @@
package cn.cecep.talroad.data.analyse.task.execute.report.excess;
import cn.cecep.talroad.data.analyse.task.execute.report.PollutionDischargeProcessService;
import cn.cecep.talroad.domain.*;
import cn.cecep.talroad.mapper.AmProblemFiMapper;
import cn.cecep.talroad.mapper.BMainActionReportsMapper;
import cn.cecep.talroad.mapper.BStatTableZxbgPflWaterMapper;
import cn.cecep.talroad.mapper.PcFactoryMapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@Service
@Slf4j
public class WaterExcessQuarterProcessService implements PollutionDischargeProcessService {
@Autowired
private BStatTableZxbgPflWaterMapper statTableZxbgPflWaterMapper;
@Autowired
private BMainActionReportsMapper mainActionReportsMapper;
@Autowired
private AmProblemFiMapper amProblemFiMapper;
@Autowired
private PcFactoryMapper factoryMapper;
/**
* 012
*/
public static final String zxbgType = "1";
/**
* 123
*/
public static final String reportsType = "2";
/**
* 12 3
*/
public static final String pollutantSource = "2";
@Override
public void process() {
// todo :缺少查询报告周期条件
List<BMainActionReports> report = getReport();
for (BMainActionReports bMainActionReports : report) {
LambdaQueryWrapper<BStatTableZxbgPflWater> bStatTableZxbgPflWaterLambdaQueryWrapper = new QueryWrapper<BStatTableZxbgPflWater>().lambda()
.eq(BStatTableZxbgPflWater::getZxbgType, zxbgType)
.eq(BStatTableZxbgPflWater::getZxbgPeriod, bMainActionReports.getReportsTime())
.eq(BStatTableZxbgPflWater::getFactoryId, bMainActionReports.getFactoryId());
List<BStatTableZxbgPflWater> bStatTableZxbgPflWaters = statTableZxbgPflWaterMapper.selectList(bStatTableZxbgPflWaterLambdaQueryWrapper);
for (BStatTableZxbgPflWater bStatTableZxbgPflWater : bStatTableZxbgPflWaters) {
BigDecimal zxbgYear = new BigDecimal(bStatTableZxbgPflWater.getZxbgDischargeYear());
BigDecimal zxbgActual = new BigDecimal(bStatTableZxbgPflWater.getZxbgDischargeActual());
if (zxbgActual.doubleValue()>zxbgYear.doubleValue()){
//todo 添加报警信息
}
}
}
}
public void addAmProblemFi(BStatTableZxbgPflAir bStatTableZxbgPflAir){
PcFactory pcFactory = factoryMapper.selectById(bStatTableZxbgPflAir.getFactoryId());
if (pcFactory==null){
log.warn("企业id不存在 , 企业ID : {}",bStatTableZxbgPflAir.getFactoryId());
}
String problemString = getProblemString(pcFactory.getFactoryName(), bStatTableZxbgPflAir.getZxbgPeriod(), bStatTableZxbgPflAir.getZxbgPollutant());
AmProblemFi amProblemFi = new AmProblemFi();
amProblemFi.setFactoryId(pcFactory.getId());
amProblemFi.setAnalyseTime(new Date());
amProblemFi.setType(1);
amProblemFi.setPollutantSourceAi(pollutantSource);
amProblemFi.setDetails(problemString);
amProblemFiMapper.insert(amProblemFi);
}
/**
* --
* 2013/2013
*/
public String getProblemString(String factoryName , String zxbgPeriod , String pollutantName){
return new StringBuilder()
.append(factoryName).append("(").append(zxbgPeriod).append(")")
.append("中").append(pollutantName).append("实际排放量大于许可排放量,出现超总量情况。")
.toString();
}
/**
*
* todo
* @return
*/
public List<BMainActionReports> getReport(){
LambdaQueryWrapper<BMainActionReports> bMainActionReportsLambdaQueryWrapper = new QueryWrapper<BMainActionReports>().lambda().eq(BMainActionReports::getReportsType, reportsType);
List<BMainActionReports> bMainActionReports = mainActionReportsMapper.selectList(bMainActionReportsLambdaQueryWrapper);
return bMainActionReports;
}
}

View File

@ -0,0 +1,121 @@
package cn.cecep.talroad.data.analyse.task.execute.report.excess;
import cn.cecep.talroad.data.analyse.task.execute.report.PollutionDischargeProcessService;
import cn.cecep.talroad.domain.*;
import cn.cecep.talroad.mapper.AmProblemFiMapper;
import cn.cecep.talroad.mapper.BMainActionReportsMapper;
import cn.cecep.talroad.mapper.BStatTableZxbgPflWaterMapper;
import cn.cecep.talroad.mapper.PcFactoryMapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@Service
@Slf4j
public class WaterExcessYearProcessService implements PollutionDischargeProcessService {
@Autowired
private BStatTableZxbgPflWaterMapper statTableZxbgPflWaterMapper;
@Autowired
private BMainActionReportsMapper mainActionReportsMapper;
@Autowired
private AmProblemFiMapper amProblemFiMapper;
@Autowired
private PcFactoryMapper factoryMapper;
/**
* 012
*/
public static final String zxbgType = "2";
/**
* 123
*/
public static final String reportsType = "1";
/**
* 12 3
*/
public static final String pollutantSource = "2";
@Override
public void process() {
// todo :缺少查询报告周期条件
List<BMainActionReports> report = getReport();
for (BMainActionReports bMainActionReports : report) {
LambdaQueryWrapper<BStatTableZxbgPflWater> bStatTableZxbgPflWaterLambdaQueryWrapper = new QueryWrapper<BStatTableZxbgPflWater>().lambda()
.eq(BStatTableZxbgPflWater::getZxbgType, zxbgType)
.eq(BStatTableZxbgPflWater::getZxbgPeriod, bMainActionReports.getReportsTime())
.eq(BStatTableZxbgPflWater::getFactoryId, bMainActionReports.getFactoryId());
List<BStatTableZxbgPflWater> bStatTableZxbgPflWaters = statTableZxbgPflWaterMapper.selectList(bStatTableZxbgPflWaterLambdaQueryWrapper);
for (BStatTableZxbgPflWater bStatTableZxbgPflWater : bStatTableZxbgPflWaters) {
BigDecimal zxbgYear = new BigDecimal(bStatTableZxbgPflWater.getZxbgDischargeYear());
BigDecimal zxbgActual = new BigDecimal(bStatTableZxbgPflWater.getZxbgDischargeActual());
if (zxbgActual.doubleValue()>zxbgYear.doubleValue()){
//todo 添加报警信息
}
}
}
}
public void addAmProblemFi(BStatTableZxbgPflAir bStatTableZxbgPflAir){
PcFactory pcFactory = factoryMapper.selectById(bStatTableZxbgPflAir.getFactoryId());
if (pcFactory==null){
log.warn("企业id不存在 , 企业ID : {}",bStatTableZxbgPflAir.getFactoryId());
}
String problemString = getProblemString(pcFactory.getFactoryName(), bStatTableZxbgPflAir.getZxbgPeriod(), bStatTableZxbgPflAir.getZxbgPollutant());
AmProblemFi amProblemFi = new AmProblemFi();
amProblemFi.setFactoryId(pcFactory.getId());
amProblemFi.setAnalyseTime(new Date());
amProblemFi.setType(1);
amProblemFi.setPollutantSourceAi(pollutantSource);
amProblemFi.setDetails(problemString);
amProblemFiMapper.insert(amProblemFi);
}
/**
* --
* 2013/2013
*/
public String getProblemString(String factoryName , String zxbgPeriod , String pollutantName){
return new StringBuilder()
.append(factoryName).append("(").append(zxbgPeriod).append(")")
.append("中").append(pollutantName).append("实际排放量大于许可排放量,出现超总量情况。")
.toString();
}
/**
*
* todo
* @return
*/
public List<BMainActionReports> getReport(){
LambdaQueryWrapper<BMainActionReports> bMainActionReportsLambdaQueryWrapper = new QueryWrapper<BMainActionReports>().lambda().eq(BMainActionReports::getReportsType, reportsType);
List<BMainActionReports> bMainActionReports = mainActionReportsMapper.selectList(bMainActionReportsLambdaQueryWrapper);
return bMainActionReports;
}
}

View File

@ -0,0 +1,96 @@
package cn.cecep.talroad.task;
import cn.cecep.talroad.data.analyse.task.execute.report.excess.*;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api(tags = "执行报告中出现废水废气超总量排污行为,未有效落实排污许可制度")
@RestController
@RequestMapping("/report/excess")
@Slf4j
public class ReportExcessController {
@Autowired
private AirExcessMonthProcessService airExcessMonthProcessService;
@Autowired
private AirExcessQuarterProcessService airExcessQuarterProcessService;
@Autowired
private AirExcessYearProcessService airExcessYearProcessService;
@Autowired
private WaterExcessMonthProcessService waterExcessMonthProcessService;
@Autowired
private WaterExcessQuarterProcessService waterExcessQuarterProcessService;
@Autowired
private WaterExcessYearProcessService waterExcessYearProcessService;
@GetMapping("/airExcessMonth")
public void airExcessMonth() {
try {
airExcessMonthProcessService.process();
} catch (Exception e) {
e.printStackTrace();
log.info("废气超量未落实排污许可 , 按月 . 原因:" + e.getMessage());
}
}
@GetMapping("/airExcessQuarter")
public void airExcessQuarter() {
try {
airExcessQuarterProcessService.process();
} catch (Exception e) {
e.printStackTrace();
log.info("废气超量未落实排污许可 , 按季度 . 原因:" + e.getMessage());
}
}
@GetMapping("/airExcessYear")
public void airExcessYear() {
try {
airExcessYearProcessService.process();
} catch (Exception e) {
e.printStackTrace();
log.info("废气超量未落实排污许可 , 按年 . 原因:" + e.getMessage());
}
}
@GetMapping("/waterExcessMonth")
public void waterExcessMonth() {
try {
waterExcessMonthProcessService.process();
} catch (Exception e) {
e.printStackTrace();
log.info("废水超量未落实排污许可 , 按月 . 原因:" + e.getMessage());
}
}
@GetMapping("/waterExcessQuarter")
public void waterExcessQuarter() {
try {
waterExcessQuarterProcessService.process();
} catch (Exception e) {
e.printStackTrace();
log.info("废水超量未落实排污许可 , 按季度 . 原因:" + e.getMessage());
}
}
@GetMapping("/waterExcessYear")
public void waterExcessYear() {
try {
waterExcessYearProcessService.process();
} catch (Exception e) {
e.printStackTrace();
log.info("废水超量未落实排污许可 , 按年 . 原因:" + e.getMessage());
}
}
}