大客流总数区域统计功能开发

This commit is contained in:
guanpeng 2025-05-30 21:39:08 +08:00
parent cc1b9ee18b
commit 71ba41c1b8
2 changed files with 217 additions and 0 deletions

View File

@ -0,0 +1,61 @@
package com.dkl.large.service;
import java.util.List;
import com.dkl.large.domain.DklWarningInformationHandle;
/**
* 预警信息处置Service接口
*
* @author Dkl
* @date 2025-06-16
*/
public interface IDklWarningInformationHandleService
{
/**
* 查询预警信息处置
*
* @param id 预警信息处置主键
* @return 预警信息处置
*/
public DklWarningInformationHandle selectDklWarningInformationHandleById(Long id);
/**
* 查询预警信息处置列表
*
* @param dklWarningInformationHandle 预警信息处置
* @return 预警信息处置集合
*/
public List<DklWarningInformationHandle> selectDklWarningInformationHandleList(DklWarningInformationHandle dklWarningInformationHandle);
/**
* 新增预警信息处置
*
* @param dklWarningInformationHandle 预警信息处置
* @return 结果
*/
public int insertDklWarningInformationHandle(DklWarningInformationHandle dklWarningInformationHandle);
/**
* 修改预警信息处置
*
* @param dklWarningInformationHandle 预警信息处置
* @return 结果
*/
public int updateDklWarningInformationHandle(DklWarningInformationHandle dklWarningInformationHandle);
/**
* 批量删除预警信息处置
*
* @param ids 需要删除的预警信息处置主键集合
* @return 结果
*/
public int deleteDklWarningInformationHandleByIds(Long[] ids);
/**
* 删除预警信息处置信息
*
* @param id 预警信息处置主键
* @return 结果
*/
public int deleteDklWarningInformationHandleById(Long id);
}

View File

@ -0,0 +1,156 @@
package com.dkl.large.service.impl;
import java.util.Date;
import java.util.List;
import com.dkl.common.utils.DateUtils;
import com.dkl.common.utils.bean.BeanUtils;
import com.dkl.large.domain.DklWarningInformation;
import com.dkl.large.domain.DklWarningInformationProcess;
import com.dkl.large.mapper.DklWarningInformationMapper;
import com.dkl.large.mapper.DklWarningInformationProcessMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dkl.large.mapper.DklWarningInformationHandleMapper;
import com.dkl.large.domain.DklWarningInformationHandle;
import com.dkl.large.service.IDklWarningInformationHandleService;
import org.springframework.transaction.annotation.Transactional;
/**
* 预警信息处置Service业务层处理
*
* @author Dkl
* @date 2025-06-16
*/
@Service
public class DklWarningInformationHandleServiceImpl implements IDklWarningInformationHandleService
{
@Autowired
private DklWarningInformationHandleMapper dklWarningInformationHandleMapper;
@Autowired
private DklWarningInformationMapper dklWarningInformationMapper;
@Autowired
private DklWarningInformationProcessMapper dklWarningInformationProcessMapper;
/**
* 查询预警信息处置
*
* @param id 预警信息处置主键
* @return 预警信息处置
*/
@Override
public DklWarningInformationHandle selectDklWarningInformationHandleById(Long id)
{
return dklWarningInformationHandleMapper.selectDklWarningInformationHandleById(id);
}
/**
* 查询预警信息处置列表
*
* @param dklWarningInformationHandle 预警信息处置
* @return 预警信息处置
*/
@Override
public List<DklWarningInformationHandle> selectDklWarningInformationHandleList(DklWarningInformationHandle dklWarningInformationHandle)
{
return dklWarningInformationHandleMapper.selectDklWarningInformationHandleList(dklWarningInformationHandle);
}
/**
* 新增预警信息处置
*
* @param dklWarningInformationHandle 预警信息处置
* @return 结果
*/
@Override
@Transactional
public int insertDklWarningInformationHandle(DklWarningInformationHandle dklWarningInformationHandle)
{
//下发 即在处置表中添加数据
//修改主表的处置规则
DklWarningInformation dklWarningInformation = dklWarningInformationMapper.selectDklWarningInformationById((long) dklWarningInformationHandle.getWarningId());
dklWarningInformation.setRulesId(dklWarningInformationHandle.getRulesId());
dklWarningInformation.setEventStatus("1");
dklWarningInformationMapper.updateDklWarningInformation(dklWarningInformation);
//添加流程数据
DklWarningInformationProcess dklWarningInformationProcess = new DklWarningInformationProcess();
BeanUtils.copyProperties( dklWarningInformationHandle,dklWarningInformationProcess);
dklWarningInformationHandle.setDisposalStatus("0");
dklWarningInformationHandle.setDelFlag("0");
dklWarningInformationHandle.setCreateTime(new Date());
dklWarningInformationHandle.setCreateBy(dklWarningInformationHandle.getCreateBy());
dklWarningInformationHandle.setUpdateTime(new Date());
dklWarningInformationHandle.setUpdateBy(dklWarningInformationHandle.getCreateBy());
dklWarningInformationHandleMapper.insertDklWarningInformationHandle(dklWarningInformationHandle);
dklWarningInformationProcess.setHandleId(dklWarningInformationHandle.getId());
dklWarningInformationProcess.setDisposalStatus("0");
return dklWarningInformationProcessMapper.insertDklWarningInformationProcess(dklWarningInformationProcess);
}
/**
* 修改预警信息处置
*
* @param dklWarningInformationHandle 预警信息处置
* @return 结果
*/
@Override
@Transactional
public int updateDklWarningInformationHandle(DklWarningInformationHandle dklWarningInformationHandle)
{
DklWarningInformationProcess dklWarningInformationProcess = new DklWarningInformationProcess();
BeanUtils.copyProperties( dklWarningInformationHandle,dklWarningInformationProcess);
dklWarningInformationHandle.setDelFlag("0");
dklWarningInformationHandle.setCreateTime(new Date());
dklWarningInformationHandle.setCreateBy(dklWarningInformationHandle.getCreateBy());
dklWarningInformationHandle.setUpdateTime(new Date());
dklWarningInformationHandle.setUpdateBy(dklWarningInformationHandle.getCreateBy());
//预警信息处置流程是1 即受理
if (("1").equals(dklWarningInformationHandle.getDisposalStatus())){
dklWarningInformationProcess.setHandleId(dklWarningInformationHandle.getId());
dklWarningInformationProcess.setDisposalStatus(dklWarningInformationHandle.getDisposalStatus());
dklWarningInformationProcessMapper.insertDklWarningInformationProcess(dklWarningInformationProcess);
//修改主表的处置规则 处理中
DklWarningInformation dklWarningInformation = dklWarningInformationMapper.selectDklWarningInformationById((long) dklWarningInformationHandle.getId());
// dklWarningInformation.setRulesId(dklWarningInformationHandle.getRulesId());
dklWarningInformation.setWarningStatus("2");
dklWarningInformationMapper.updateDklWarningInformation(dklWarningInformation);
}else if(("2").equals(dklWarningInformationHandle.getDisposalStatus())){
dklWarningInformationProcess.setHandleId(dklWarningInformationHandle.getId());
dklWarningInformationProcess.setDisposalStatus(dklWarningInformationHandle.getDisposalStatus());
dklWarningInformationProcess.setDisposalMeasures(dklWarningInformationHandle.getDisposalMeasures());
// dklWarningInformationProcess.setDisposalResults(dklWarningInformationHandle.getDisposalResults());
dklWarningInformationProcessMapper.insertDklWarningInformationProcess(dklWarningInformationProcess);
//修改主表的处置规则 已完成
DklWarningInformation dklWarningInformation = dklWarningInformationMapper.selectDklWarningInformationById((long) dklWarningInformationHandle.getId());
dklWarningInformation.setRulesId(dklWarningInformationHandle.getRulesId());
dklWarningInformation.setWarningStatus("3");
dklWarningInformationMapper.updateDklWarningInformation(dklWarningInformation);
}
return 1;
}
/**
* 批量删除预警信息处置
*
* @param ids 需要删除的预警信息处置主键
* @return 结果
*/
@Override
public int deleteDklWarningInformationHandleByIds(Long[] ids)
{
return dklWarningInformationHandleMapper.deleteDklWarningInformationHandleByIds(ids);
}
/**
* 删除预警信息处置信息
*
* @param id 预警信息处置主键
* @return 结果
*/
@Override
public int deleteDklWarningInformationHandleById(Long id)
{
return dklWarningInformationHandleMapper.deleteDklWarningInformationHandleById(id);
}
}