|
|
|
@ -13,6 +13,7 @@ import com.zdxt.enforcementcode.domain.dto.enterprise.AppEnterpriseComplatintQue |
|
|
|
import com.zdxt.enforcementcode.domain.entity.enterprise.AppEnforcementRegistration; |
|
|
|
import com.zdxt.enforcementcode.domain.entity.enterprise.AppEnterpriseComplaint; |
|
|
|
import com.zdxt.enforcementcode.domain.entity.enterprise.AppNonEnforcementRegistration; |
|
|
|
import com.zdxt.enforcementcode.domain.vo.ZdxtFileVo; |
|
|
|
import com.zdxt.enforcementcode.domain.vo.enterprise.AppEnterpriseComplaintVo; |
|
|
|
import com.zdxt.enforcementcode.mapper.ZdxtFileMapper; |
|
|
|
import com.zdxt.enforcementcode.mapper.enterprise.AppEnforcementRegistrationMapper; |
|
|
|
@ -30,7 +31,9 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.util.Collection; |
|
|
|
import java.util.*; |
|
|
|
import java.util.function.Function; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
/** |
|
|
|
* 企业执法-在线投诉Service业务层处理 |
|
|
|
@ -52,14 +55,22 @@ public class AppEnterpriseComplaintServiceImpl implements IAppEnterpriseComplain |
|
|
|
private ZdxtFileMapper zdxtFileMapper; |
|
|
|
|
|
|
|
/** |
|
|
|
* 查询企业执法-在线投诉 |
|
|
|
* 企业端-投诉建议详情 |
|
|
|
* |
|
|
|
* @param id 主键 |
|
|
|
* @return 企业执法-在线投诉 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public AppEnterpriseComplaintVo queryById(String id){ |
|
|
|
return baseMapper.selectVoById(id); |
|
|
|
AppEnterpriseComplaintVo detail = baseMapper.selectVoById(id); |
|
|
|
|
|
|
|
//查询附件文件
|
|
|
|
LambdaQueryWrapper<ZdxtFile> lqw = Wrappers.lambdaQuery(); |
|
|
|
lqw.eq(ZdxtFile::getBusinessId, id); |
|
|
|
List<ZdxtFileVo> fileList = zdxtFileMapper.selectVoList(lqw); |
|
|
|
detail.setFileList(fileList); |
|
|
|
|
|
|
|
return detail; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -72,7 +83,6 @@ public class AppEnterpriseComplaintServiceImpl implements IAppEnterpriseComplain |
|
|
|
@Override |
|
|
|
public TableDataInfo<AppEnterpriseComplaintVo> queryPageList(AppEnterpriseComplatintQueryDTO dto, PageQuery pageQuery) { |
|
|
|
LambdaQueryWrapper<AppEnterpriseComplaint> lqw = Wrappers.lambdaQuery(); |
|
|
|
lqw.orderByAsc(AppEnterpriseComplaint::getId); |
|
|
|
lqw.eq(StringUtils.isNotBlank(dto.getRelId()), AppEnterpriseComplaint::getRelId, dto.getRelId()); |
|
|
|
Page<AppEnterpriseComplaintVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); |
|
|
|
return TableDataInfo.build(result); |
|
|
|
@ -164,4 +174,69 @@ public class AppEnterpriseComplaintServiceImpl implements IAppEnterpriseComplain |
|
|
|
} |
|
|
|
return baseMapper.deleteByIds(ids) > 0; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 企业端-投诉建议查询行政和非行政未被投诉列表 |
|
|
|
* @param dto 查询条件 |
|
|
|
* @param pageQuery 分页参数 |
|
|
|
* @return 投诉建议列表 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public TableDataInfo<AppEnterpriseComplaintVo> getAllCheckList(AppEnterpriseComplatintQueryDTO dto, PageQuery pageQuery) { |
|
|
|
// 构建查询条件
|
|
|
|
LambdaQueryWrapper<AppEnterpriseComplaint> lqw = Wrappers.lambdaQuery(); |
|
|
|
|
|
|
|
// 根据 relId 过滤
|
|
|
|
lqw.eq(StringUtils.isNotBlank(dto.getRelId()), AppEnterpriseComplaint::getRelId, dto.getRelId()); |
|
|
|
|
|
|
|
// 根据搜索值模糊查询(问题描述、联系人、企业名称等)
|
|
|
|
if (StringUtils.isNotBlank(dto.getSearchValue())) { |
|
|
|
lqw.and(wrapper -> wrapper |
|
|
|
.like(AppEnterpriseComplaint::getProblemDescription, dto.getSearchValue()) |
|
|
|
.or() |
|
|
|
.like(AppEnterpriseComplaint::getLinkman, dto.getSearchValue()) |
|
|
|
.or() |
|
|
|
.like(AppEnterpriseComplaint::getEnterpriseName, dto.getSearchValue()) |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
// 根据执法类型过滤
|
|
|
|
lqw.eq(dto.getEnforceType() != null, AppEnterpriseComplaint::getEnforceType, dto.getEnforceType()); |
|
|
|
|
|
|
|
// 根据投诉类型过滤
|
|
|
|
lqw.eq(dto.getComplaintType() != null, AppEnterpriseComplaint::getComplaintType, dto.getComplaintType()); |
|
|
|
|
|
|
|
// 根据数据类型过滤(0行政 1非行政)
|
|
|
|
lqw.eq(dto.getRecordType() != null, AppEnterpriseComplaint::getRecordType, dto.getRecordType()); |
|
|
|
|
|
|
|
// 根据状态过滤
|
|
|
|
lqw.eq(dto.getStatus() != null, AppEnterpriseComplaint::getStatus, dto.getStatus()); |
|
|
|
|
|
|
|
// 按创建时间降序排列
|
|
|
|
lqw.orderByDesc(AppEnterpriseComplaint::getCreateTime); |
|
|
|
|
|
|
|
// 执行分页查询
|
|
|
|
Page<AppEnterpriseComplaintVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); |
|
|
|
|
|
|
|
// 处理字典转换和执法人员信息(如果需要)
|
|
|
|
List<AppEnterpriseComplaintVo> records = result.getRecords(); |
|
|
|
if (records != null && !records.isEmpty()) { |
|
|
|
records.forEach(vo -> { |
|
|
|
// 这里可以添加字典转换逻辑
|
|
|
|
// 例如:执法类型、投诉类型等的字典值转换
|
|
|
|
|
|
|
|
// 如果有附件,查询附件列表
|
|
|
|
if (vo.getId() != null) { |
|
|
|
LambdaQueryWrapper<ZdxtFile> fileLqw = Wrappers.lambdaQuery(); |
|
|
|
fileLqw.eq(ZdxtFile::getBusinessId, vo.getId()); |
|
|
|
List<ZdxtFileVo> fileList = zdxtFileMapper.selectVoList(fileLqw); |
|
|
|
vo.setFileList(fileList); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
return TableDataInfo.build(result); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|