添加排污许可证、环评报告
This commit is contained in:
parent
1df043fcdb
commit
e6c7339c71
@ -13,6 +13,7 @@ import com.cm.common.result.SuccessResult;
|
|||||||
import com.cm.common.result.SuccessResultData;
|
import com.cm.common.result.SuccessResultData;
|
||||||
import com.cm.common.result.SuccessResultList;
|
import com.cm.common.result.SuccessResultList;
|
||||||
import com.cm.inspection.pojo.dtos.dischargepermit.DischargePermitDTO;
|
import com.cm.inspection.pojo.dtos.dischargepermit.DischargePermitDTO;
|
||||||
|
import com.cm.inspection.pojo.dtos.enterprise.EnterpriseDTO;
|
||||||
import com.cm.inspection.pojo.vos.dischargepermit.DischargePermitVO;
|
import com.cm.inspection.pojo.vos.dischargepermit.DischargePermitVO;
|
||||||
import com.cm.inspection.service.dischargepermit.IDischargePermitService;
|
import com.cm.inspection.service.dischargepermit.IDischargePermitService;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
@ -117,4 +118,19 @@ public class DischargePermitController extends AbstractController {
|
|||||||
return securityComponent.getCurrentUserIdInfo();
|
return securityComponent.getCurrentUserIdInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "排污许可证(超时)企业分页列表", notes = "排污许可证(超时)企业分页列表接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "timeout", value = "是否超时", paramType = "path", dataType = "boolean"),
|
||||||
|
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("list-enterprise/{timeout}")
|
||||||
|
public List<EnterpriseDTO> listEnterprise(@PathVariable("timeout") Boolean timeout) {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
return dischargePermitService.listEnterprise(timeout, params);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -13,6 +13,7 @@ import com.cm.common.result.SuccessResult;
|
|||||||
import com.cm.common.result.SuccessResultData;
|
import com.cm.common.result.SuccessResultData;
|
||||||
import com.cm.common.result.SuccessResultList;
|
import com.cm.common.result.SuccessResultList;
|
||||||
import com.cm.inspection.pojo.dtos.eiareport.EiaReportDTO;
|
import com.cm.inspection.pojo.dtos.eiareport.EiaReportDTO;
|
||||||
|
import com.cm.inspection.pojo.dtos.enterprise.EnterpriseDTO;
|
||||||
import com.cm.inspection.pojo.vos.eiareport.EiaReportVO;
|
import com.cm.inspection.pojo.vos.eiareport.EiaReportVO;
|
||||||
import com.cm.inspection.service.eiareport.IEiaReportService;
|
import com.cm.inspection.service.eiareport.IEiaReportService;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
@ -117,4 +118,18 @@ public class EiaReportController extends AbstractController {
|
|||||||
return securityComponent.getCurrentUserIdInfo();
|
return securityComponent.getCurrentUserIdInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "环评报告(超时)企业列表", notes = "环评报告(超时)企业列表接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "timeout", value = "是否超时", paramType = "path", dataType = "boolean"),
|
||||||
|
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("list-enterprise/{timeout}")
|
||||||
|
public List<EnterpriseDTO> listPageEnterprise(@PathVariable("timeout") Boolean timeout) {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
return eiaReportService.listEnterprise(timeout, params);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -11,6 +11,7 @@ import com.cm.common.result.SuccessResult;
|
|||||||
import com.cm.common.result.SuccessResultData;
|
import com.cm.common.result.SuccessResultData;
|
||||||
import com.cm.common.result.SuccessResultList;
|
import com.cm.common.result.SuccessResultList;
|
||||||
import com.cm.inspection.pojo.dtos.dischargepermit.DischargePermitDTO;
|
import com.cm.inspection.pojo.dtos.dischargepermit.DischargePermitDTO;
|
||||||
|
import com.cm.inspection.pojo.dtos.enterprise.EnterpriseDTO;
|
||||||
import com.cm.inspection.pojo.vos.dischargepermit.DischargePermitVO;
|
import com.cm.inspection.pojo.vos.dischargepermit.DischargePermitVO;
|
||||||
import com.cm.inspection.service.dischargepermit.IDischargePermitService;
|
import com.cm.inspection.service.dischargepermit.IDischargePermitService;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
@ -133,4 +134,18 @@ public class DischargePermitAppController extends AbstractController {
|
|||||||
return dischargePermitService.countDischargePermit(params);
|
return dischargePermitService.countDischargePermit(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "排污许可证(超时)企业分页列表", notes = "排污许可证(超时)企业分页列表接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "timeout", value = "是否超时", paramType = "path", dataType = "boolean"),
|
||||||
|
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("list-enterprise/{timeout}")
|
||||||
|
public List<EnterpriseDTO> listEnterprise(@PathVariable("timeout") Boolean timeout) {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
return dischargePermitService.listEnterprise(timeout, params);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -11,6 +11,7 @@ import com.cm.common.result.SuccessResult;
|
|||||||
import com.cm.common.result.SuccessResultData;
|
import com.cm.common.result.SuccessResultData;
|
||||||
import com.cm.common.result.SuccessResultList;
|
import com.cm.common.result.SuccessResultList;
|
||||||
import com.cm.inspection.pojo.dtos.eiareport.EiaReportDTO;
|
import com.cm.inspection.pojo.dtos.eiareport.EiaReportDTO;
|
||||||
|
import com.cm.inspection.pojo.dtos.enterprise.EnterpriseDTO;
|
||||||
import com.cm.inspection.pojo.vos.eiareport.EiaReportVO;
|
import com.cm.inspection.pojo.vos.eiareport.EiaReportVO;
|
||||||
import com.cm.inspection.service.eiareport.IEiaReportService;
|
import com.cm.inspection.service.eiareport.IEiaReportService;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
@ -133,4 +134,18 @@ public class EiaReportAppController extends AbstractController {
|
|||||||
return eiaReportService.countEiaReport(params);
|
return eiaReportService.countEiaReport(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "环评报告(超时)企业列表", notes = "环评报告(超时)企业列表接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "timeout", value = "是否超时", paramType = "path", dataType = "boolean"),
|
||||||
|
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("list-enterprise/{timeout}")
|
||||||
|
public List<EnterpriseDTO> listPageEnterprise(@PathVariable("timeout") Boolean timeout) {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
return eiaReportService.listEnterprise(timeout, params);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -5,6 +5,7 @@ import com.cm.common.exception.SaveException;
|
|||||||
import com.cm.common.exception.SearchException;
|
import com.cm.common.exception.SearchException;
|
||||||
import com.cm.common.exception.UpdateException;
|
import com.cm.common.exception.UpdateException;
|
||||||
import com.cm.inspection.pojo.dtos.dischargepermit.DischargePermitDTO;
|
import com.cm.inspection.pojo.dtos.dischargepermit.DischargePermitDTO;
|
||||||
|
import com.cm.inspection.pojo.pos.dischargepermit.DischargePermitPO;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -87,4 +88,13 @@ public interface IDischargePermitDao {
|
|||||||
* @throws SearchException
|
* @throws SearchException
|
||||||
*/
|
*/
|
||||||
List<DischargePermitDTO> listLast(Map<String, Object> params) throws SearchException;
|
List<DischargePermitDTO> listLast(Map<String, Object> params) throws SearchException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
* @throws SearchException
|
||||||
|
*/
|
||||||
|
List<DischargePermitPO> listPO(Map<String, Object> params) throws SearchException;
|
||||||
}
|
}
|
@ -5,6 +5,7 @@ import com.cm.common.exception.SaveException;
|
|||||||
import com.cm.common.exception.SearchException;
|
import com.cm.common.exception.SearchException;
|
||||||
import com.cm.common.exception.UpdateException;
|
import com.cm.common.exception.UpdateException;
|
||||||
import com.cm.inspection.pojo.dtos.eiareport.EiaReportDTO;
|
import com.cm.inspection.pojo.dtos.eiareport.EiaReportDTO;
|
||||||
|
import com.cm.inspection.pojo.pos.eiareport.EiaReportPO;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -87,4 +88,13 @@ public interface IEiaReportDao {
|
|||||||
* @throws SearchException
|
* @throws SearchException
|
||||||
*/
|
*/
|
||||||
List<EiaReportDTO> listLast(Map<String, Object> params) throws SearchException;
|
List<EiaReportDTO> listLast(Map<String, Object> params) throws SearchException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 列表
|
||||||
|
*
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
* @throws SearchException
|
||||||
|
*/
|
||||||
|
List<EiaReportPO> listPO(Map<String, Object> params) throws SearchException;
|
||||||
}
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
package com.cm.inspection.pojo.pos.dischargepermit;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName: DischargePermitDTO
|
||||||
|
* @Description: 排污许可证
|
||||||
|
* @Author: WenG
|
||||||
|
* @Date: 2021-03-29 21:49
|
||||||
|
* @Version: 1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class DischargePermitPO {
|
||||||
|
|
||||||
|
private String dischargePermitId;
|
||||||
|
private String enterpriseId;
|
||||||
|
private String title;
|
||||||
|
private String content;
|
||||||
|
private String remindTime;
|
||||||
|
private String files;
|
||||||
|
private String gmtCreate;
|
||||||
|
private String creator;
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
package com.cm.inspection.pojo.pos.eiareport;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When you feel like quitting. Think about why you started
|
||||||
|
* 当你想要放弃的时候,想想当初你为何开始
|
||||||
|
*
|
||||||
|
* @ClassName: EiaReportPO
|
||||||
|
* @Description: 环评报告
|
||||||
|
* @Author: wanggeng
|
||||||
|
* @Date: 2021/4/1 11:19 上午
|
||||||
|
* @Version: 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class EiaReportPO {
|
||||||
|
|
||||||
|
private String eiaReportId;
|
||||||
|
private String enterpriseId;
|
||||||
|
private String title;
|
||||||
|
private String content;
|
||||||
|
private String remindTime;
|
||||||
|
private String files;
|
||||||
|
private String gmtCreate;
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
}
|
@ -7,6 +7,7 @@ import com.cm.common.result.SuccessResult;
|
|||||||
import com.cm.common.result.SuccessResultData;
|
import com.cm.common.result.SuccessResultData;
|
||||||
import com.cm.common.result.SuccessResultList;
|
import com.cm.common.result.SuccessResultList;
|
||||||
import com.cm.inspection.pojo.dtos.dischargepermit.DischargePermitDTO;
|
import com.cm.inspection.pojo.dtos.dischargepermit.DischargePermitDTO;
|
||||||
|
import com.cm.inspection.pojo.dtos.enterprise.EnterpriseDTO;
|
||||||
import com.cm.inspection.pojo.vos.dischargepermit.DischargePermitVO;
|
import com.cm.inspection.pojo.vos.dischargepermit.DischargePermitVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -167,4 +168,13 @@ public interface IDischargePermitService {
|
|||||||
* 通知超时排污许可证
|
* 通知超时排污许可证
|
||||||
*/
|
*/
|
||||||
void noticeTimeout();
|
void noticeTimeout();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排污许可证(超时)企业列表
|
||||||
|
*
|
||||||
|
* @param timeout
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<EnterpriseDTO> listEnterprise(Boolean timeout, Map<String, Object> params);
|
||||||
}
|
}
|
@ -9,11 +9,13 @@ import com.cm.common.result.SuccessResult;
|
|||||||
import com.cm.common.result.SuccessResultData;
|
import com.cm.common.result.SuccessResultData;
|
||||||
import com.cm.common.result.SuccessResultList;
|
import com.cm.common.result.SuccessResultList;
|
||||||
import com.cm.common.token.app.AppTokenManager;
|
import com.cm.common.token.app.AppTokenManager;
|
||||||
|
import com.cm.common.utils.DateUtil;
|
||||||
import com.cm.common.utils.HashMapUtil;
|
import com.cm.common.utils.HashMapUtil;
|
||||||
import com.cm.common.utils.UUIDUtil;
|
import com.cm.common.utils.UUIDUtil;
|
||||||
import com.cm.inspection.dao.dischargepermit.IDischargePermitDao;
|
import com.cm.inspection.dao.dischargepermit.IDischargePermitDao;
|
||||||
import com.cm.inspection.pojo.dtos.dischargepermit.DischargePermitDTO;
|
import com.cm.inspection.pojo.dtos.dischargepermit.DischargePermitDTO;
|
||||||
import com.cm.inspection.pojo.dtos.enterprise.EnterpriseDTO;
|
import com.cm.inspection.pojo.dtos.enterprise.EnterpriseDTO;
|
||||||
|
import com.cm.inspection.pojo.pos.dischargepermit.DischargePermitPO;
|
||||||
import com.cm.inspection.pojo.vos.dischargepermit.DischargePermitVO;
|
import com.cm.inspection.pojo.vos.dischargepermit.DischargePermitVO;
|
||||||
import com.cm.inspection.runnable.dischargepermit.DischargePermitRunnable;
|
import com.cm.inspection.runnable.dischargepermit.DischargePermitRunnable;
|
||||||
import com.cm.inspection.service.dischargepermit.IDischargePermitService;
|
import com.cm.inspection.service.dischargepermit.IDischargePermitService;
|
||||||
@ -216,6 +218,17 @@ public class DischargePermitServiceImpl extends AbstractService implements IDisc
|
|||||||
return new SuccessResultList<>(dischargePermitDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
return new SuccessResultList<>(dischargePermitDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<DischargePermitPO> listPO(Map<String, Object> params) throws SearchException {
|
||||||
|
return dischargePermitDao.listPO(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
private SuccessResultList<List<DischargePermitPO>> listPagePO(ListPage page) throws SearchException {
|
||||||
|
PageHelper.startPage(page.getPage(), page.getRows());
|
||||||
|
List<DischargePermitPO> dischargePermitPOs = listPO(page.getParams());
|
||||||
|
PageInfo<DischargePermitPO> pageInfo = new PageInfo<>(dischargePermitPOs);
|
||||||
|
return new SuccessResultList<>(dischargePermitPOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer countNumberDischargePermit(Map<String, Object> params) throws SearchException {
|
public Integer countNumberDischargePermit(Map<String, Object> params) throws SearchException {
|
||||||
Integer count = dischargePermitDao.countDischargePermit(params);
|
Integer count = dischargePermitDao.countDischargePermit(params);
|
||||||
@ -259,4 +272,22 @@ public class DischargePermitServiceImpl extends AbstractService implements IDisc
|
|||||||
scheduledExecutorService.schedule(new DischargePermitRunnable(noticeUrl, dischargePermits), 3, TimeUnit.SECONDS);
|
scheduledExecutorService.schedule(new DischargePermitRunnable(noticeUrl, dischargePermits), 3, TimeUnit.SECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<EnterpriseDTO> listEnterprise(Boolean timeout, Map<String, Object> params) {
|
||||||
|
String today = DateUtil.getDay();
|
||||||
|
if (timeout) {
|
||||||
|
params.put("timeoutDay", today);
|
||||||
|
} else {
|
||||||
|
params.put("noTimeoutDay", today);
|
||||||
|
}
|
||||||
|
List<DischargePermitPO> dischargePermitPOs = listPO(params);
|
||||||
|
List<String> enterpriseIds = new ArrayList<>();
|
||||||
|
dischargePermitPOs.forEach(eiaReportDTO -> {
|
||||||
|
enterpriseIds.add(eiaReportDTO.getEnterpriseId());
|
||||||
|
});
|
||||||
|
params.clear();
|
||||||
|
params.put("enterpriseIds", enterpriseIds);
|
||||||
|
return enterpriseService.listEnterprise(params);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -7,6 +7,7 @@ import com.cm.common.result.SuccessResult;
|
|||||||
import com.cm.common.result.SuccessResultData;
|
import com.cm.common.result.SuccessResultData;
|
||||||
import com.cm.common.result.SuccessResultList;
|
import com.cm.common.result.SuccessResultList;
|
||||||
import com.cm.inspection.pojo.dtos.eiareport.EiaReportDTO;
|
import com.cm.inspection.pojo.dtos.eiareport.EiaReportDTO;
|
||||||
|
import com.cm.inspection.pojo.dtos.enterprise.EnterpriseDTO;
|
||||||
import com.cm.inspection.pojo.vos.eiareport.EiaReportVO;
|
import com.cm.inspection.pojo.vos.eiareport.EiaReportVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -167,4 +168,13 @@ public interface IEiaReportService {
|
|||||||
* 通知超时环评报告
|
* 通知超时环评报告
|
||||||
*/
|
*/
|
||||||
void noticeTimeout();
|
void noticeTimeout();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 环评报告(超时)企业分页列表
|
||||||
|
*
|
||||||
|
* @param timeout
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<EnterpriseDTO> listEnterprise(Boolean timeout, Map<String, Object> params);
|
||||||
}
|
}
|
@ -9,11 +9,13 @@ import com.cm.common.result.SuccessResult;
|
|||||||
import com.cm.common.result.SuccessResultData;
|
import com.cm.common.result.SuccessResultData;
|
||||||
import com.cm.common.result.SuccessResultList;
|
import com.cm.common.result.SuccessResultList;
|
||||||
import com.cm.common.token.app.AppTokenManager;
|
import com.cm.common.token.app.AppTokenManager;
|
||||||
|
import com.cm.common.utils.DateUtil;
|
||||||
import com.cm.common.utils.HashMapUtil;
|
import com.cm.common.utils.HashMapUtil;
|
||||||
import com.cm.common.utils.UUIDUtil;
|
import com.cm.common.utils.UUIDUtil;
|
||||||
import com.cm.inspection.dao.eiareport.IEiaReportDao;
|
import com.cm.inspection.dao.eiareport.IEiaReportDao;
|
||||||
import com.cm.inspection.pojo.dtos.eiareport.EiaReportDTO;
|
import com.cm.inspection.pojo.dtos.eiareport.EiaReportDTO;
|
||||||
import com.cm.inspection.pojo.dtos.enterprise.EnterpriseDTO;
|
import com.cm.inspection.pojo.dtos.enterprise.EnterpriseDTO;
|
||||||
|
import com.cm.inspection.pojo.pos.eiareport.EiaReportPO;
|
||||||
import com.cm.inspection.pojo.vos.eiareport.EiaReportVO;
|
import com.cm.inspection.pojo.vos.eiareport.EiaReportVO;
|
||||||
import com.cm.inspection.runnable.eiareport.EiaReportNoticeRunnable;
|
import com.cm.inspection.runnable.eiareport.EiaReportNoticeRunnable;
|
||||||
import com.cm.inspection.service.eiareport.IEiaReportService;
|
import com.cm.inspection.service.eiareport.IEiaReportService;
|
||||||
@ -216,6 +218,17 @@ public class EiaReportServiceImpl extends AbstractService implements IEiaReportS
|
|||||||
return new SuccessResultList<>(eiaReportDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
return new SuccessResultList<>(eiaReportDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<EiaReportPO> listPO(Map<String, Object> params) throws SearchException {
|
||||||
|
return eiaReportDao.listPO(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
private SuccessResultList<List<EiaReportPO>> listPagePO(ListPage page) throws SearchException {
|
||||||
|
PageHelper.startPage(page.getPage(), page.getRows());
|
||||||
|
List<EiaReportPO> eiaReportPOs = listPO(page.getParams());
|
||||||
|
PageInfo<EiaReportPO> pageInfo = new PageInfo<>(eiaReportPOs);
|
||||||
|
return new SuccessResultList<>(eiaReportPOs, pageInfo.getPageNum(), pageInfo.getTotal());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer countNumberEiaReport(Map<String, Object> params) throws SearchException {
|
public Integer countNumberEiaReport(Map<String, Object> params) throws SearchException {
|
||||||
Integer count = eiaReportDao.countEiaReport(params);
|
Integer count = eiaReportDao.countEiaReport(params);
|
||||||
@ -259,4 +272,22 @@ public class EiaReportServiceImpl extends AbstractService implements IEiaReportS
|
|||||||
scheduledExecutorService.schedule(new EiaReportNoticeRunnable(noticeUrl, eiaReportDTOs), 3, TimeUnit.SECONDS);
|
scheduledExecutorService.schedule(new EiaReportNoticeRunnable(noticeUrl, eiaReportDTOs), 3, TimeUnit.SECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<EnterpriseDTO> listEnterprise(Boolean timeout, Map<String, Object> params) {
|
||||||
|
String today = DateUtil.getDay();
|
||||||
|
if (timeout) {
|
||||||
|
params.put("timeoutDay", today);
|
||||||
|
} else {
|
||||||
|
params.put("noTimeoutDay", today);
|
||||||
|
}
|
||||||
|
List<EiaReportPO> eiaReports = listPO(params);
|
||||||
|
List<String> enterpriseIds = new ArrayList<>();
|
||||||
|
eiaReports.forEach(eiaReportDTO -> {
|
||||||
|
enterpriseIds.add(eiaReportDTO.getEnterpriseId());
|
||||||
|
});
|
||||||
|
params.clear();
|
||||||
|
params.put("enterpriseIds", enterpriseIds);
|
||||||
|
return enterpriseService.listEnterprise(params);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -13,6 +13,17 @@
|
|||||||
<result column="creator" property="creator"/>
|
<result column="creator" property="creator"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="dischargePermitPO" type="com.cm.inspection.pojo.pos.dischargepermit.DischargePermitPO">
|
||||||
|
<id column="discharge_permit_id" property="dischargePermitId"/>
|
||||||
|
<id column="enterprise_id" property="enterpriseId"/>
|
||||||
|
<result column="title" property="title"/>
|
||||||
|
<result column="content" property="content"/>
|
||||||
|
<result column="remind_time" property="remindTime"/>
|
||||||
|
<result column="files" property="files"/>
|
||||||
|
<result column="gmt_create" property="gmtCreate"/>
|
||||||
|
<result column="creator" property="creator"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
<!-- 新增排污许可证 -->
|
<!-- 新增排污许可证 -->
|
||||||
<insert id="saveDischargePermit" parameterType="map">
|
<insert id="saveDischargePermit" parameterType="map">
|
||||||
INSERT INTO gen_discharge_permit(
|
INSERT INTO gen_discharge_permit(
|
||||||
@ -152,6 +163,56 @@
|
|||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 排污许可证列表 -->
|
||||||
|
<select id="listPO" parameterType="map" resultMap="dischargePermitPO">
|
||||||
|
SELECT
|
||||||
|
t1.enterprise_id,
|
||||||
|
t1.title,
|
||||||
|
t1.remind_time,
|
||||||
|
t1.files,
|
||||||
|
t1.discharge_permit_id
|
||||||
|
FROM
|
||||||
|
gen_discharge_permit t1
|
||||||
|
WHERE
|
||||||
|
t1.is_delete = 0
|
||||||
|
<if test="keywords != null and keywords != ''">
|
||||||
|
AND (
|
||||||
|
t1.title LIKE CONCAT('%', #{keywords}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<if test="enterpriseId != null and enterpriseId != ''">
|
||||||
|
AND
|
||||||
|
t1.enterprise_id = #{enterpriseId}
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null and startTime != ''">
|
||||||
|
AND
|
||||||
|
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''">
|
||||||
|
AND
|
||||||
|
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
|
||||||
|
</if>
|
||||||
|
<if test="timeoutDay != null and timeoutDay != ''">
|
||||||
|
AND
|
||||||
|
LEFT(t1.remind_time, 10) <![CDATA[ < ]]> #{timeoutDay}
|
||||||
|
</if>
|
||||||
|
<if test="noTimeoutDay != null and noTimeoutDay != ''">
|
||||||
|
AND
|
||||||
|
LEFT(t1.remind_time, 10) <![CDATA[ >= ]]> #{noTimeoutDay}
|
||||||
|
</if>
|
||||||
|
<if test="dischargePermitIds != null and dischargePermitIds.size > 0">
|
||||||
|
AND
|
||||||
|
t1.discharge_permit_id IN
|
||||||
|
<foreach collection="dischargePermitIds" index="index" open="(" separator="," close=")">
|
||||||
|
#{dischargePermitIds[${index}]}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="creator != null and creator != ''">
|
||||||
|
AND
|
||||||
|
t1.creator = #{creator}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
<!-- 排污许可证统计 -->
|
<!-- 排污许可证统计 -->
|
||||||
<select id="countDischargePermit" parameterType="map" resultType="Integer">
|
<select id="countDischargePermit" parameterType="map" resultType="Integer">
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -13,6 +13,17 @@
|
|||||||
<result column="creator" property="creator"/>
|
<result column="creator" property="creator"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<resultMap id="eiaReportPO" type="com.cm.inspection.pojo.pos.eiareport.EiaReportPO">
|
||||||
|
<id column="eia_report_id" property="eiaReportId"/>
|
||||||
|
<result column="enterprise_id" property="enterpriseId"/>
|
||||||
|
<result column="title" property="title"/>
|
||||||
|
<result column="content" property="content"/>
|
||||||
|
<result column="remind_time" property="remindTime"/>
|
||||||
|
<result column="files" property="files"/>
|
||||||
|
<result column="gmt_create" property="gmtCreate"/>
|
||||||
|
<result column="creator" property="creator"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
<!-- 新增环评报告 -->
|
<!-- 新增环评报告 -->
|
||||||
<insert id="saveEiaReport" parameterType="map">
|
<insert id="saveEiaReport" parameterType="map">
|
||||||
INSERT INTO gen_eia_report(
|
INSERT INTO gen_eia_report(
|
||||||
@ -152,6 +163,56 @@
|
|||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 环评报告列表 -->
|
||||||
|
<select id="listPO" parameterType="map" resultMap="eiaReportPO">
|
||||||
|
SELECT
|
||||||
|
t1.enterprise_id,
|
||||||
|
t1.title,
|
||||||
|
t1.remind_time,
|
||||||
|
t1.files,
|
||||||
|
t1.eia_report_id
|
||||||
|
FROM
|
||||||
|
gen_eia_report t1
|
||||||
|
WHERE
|
||||||
|
t1.is_delete = 0
|
||||||
|
<if test="keywords != null and keywords != ''">
|
||||||
|
AND (
|
||||||
|
t1.title LIKE CONCAT('%', #{keywords}, '%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<if test="enterpriseId != null and enterpriseId != ''">
|
||||||
|
AND
|
||||||
|
t1.enterprise_id = #{enterpriseId}
|
||||||
|
</if>
|
||||||
|
<if test="startTime != null and startTime != ''">
|
||||||
|
AND
|
||||||
|
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null and endTime != ''">
|
||||||
|
AND
|
||||||
|
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
|
||||||
|
</if>
|
||||||
|
<if test="eiaReportIds != null and eiaReportIds.size > 0">
|
||||||
|
AND
|
||||||
|
t1.eia_report_id IN
|
||||||
|
<foreach collection="eiaReportIds" index="index" open="(" separator="," close=")">
|
||||||
|
#{eiaReportIds[${index}]}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="timeoutDay != null and timeoutDay != ''">
|
||||||
|
AND
|
||||||
|
LEFT(t1.remind_time, 10) <![CDATA[ < ]]> #{timeoutDay}
|
||||||
|
</if>
|
||||||
|
<if test="noTimeoutDay != null and noTimeoutDay != ''">
|
||||||
|
AND
|
||||||
|
LEFT(t1.remind_time, 10) <![CDATA[ >= ]]> #{noTimeoutDay}
|
||||||
|
</if>
|
||||||
|
<if test="creator != null and creator != ''">
|
||||||
|
AND
|
||||||
|
t1.creator = #{creator}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
<!-- 环评报告统计 -->
|
<!-- 环评报告统计 -->
|
||||||
<select id="countEiaReport" parameterType="map" resultType="Integer">
|
<select id="countEiaReport" parameterType="map" resultType="Integer">
|
||||||
SELECT
|
SELECT
|
||||||
|
Loading…
Reference in New Issue
Block a user