1.现场监督计划调整
This commit is contained in:
@@ -10,6 +10,7 @@ import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
|||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
import com.njcn.common.pojo.response.HttpResult;
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
import com.njcn.common.utils.HttpResultUtil;
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.process.pojo.param.SupvPlanParam;
|
||||||
import com.njcn.process.pojo.param.SupvProblemParam;
|
import com.njcn.process.pojo.param.SupvProblemParam;
|
||||||
import com.njcn.process.pojo.po.SupvProblem;
|
import com.njcn.process.pojo.po.SupvProblem;
|
||||||
import com.njcn.process.pojo.vo.SupvProblemVO;
|
import com.njcn.process.pojo.vo.SupvProblemVO;
|
||||||
@@ -92,8 +93,8 @@ public class SupvProblemController extends BaseController {
|
|||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@ApiOperation("所有监督问题")
|
@ApiOperation("所有监督问题")
|
||||||
@ApiImplicitParam(name = "supvProblemParam",value = "请求体",required = true)
|
@ApiImplicitParam(name = "supvProblemParam",value = "请求体",required = true)
|
||||||
public void problemList(@RequestBody SupvProblemParam supvProblemParam){
|
public void problemList(@RequestBody SupvPlanParam supvPlanParam){
|
||||||
iSupvProblemService.problemList(supvProblemParam);
|
iSupvProblemService.problemList(supvPlanParam);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
import com.njcn.process.pojo.param.SupvProblemParam;
|
import com.njcn.process.pojo.param.SupvProblemParam;
|
||||||
import com.njcn.process.pojo.po.SupvProblem;
|
import com.njcn.process.pojo.po.SupvProblem;
|
||||||
import com.njcn.process.pojo.vo.SupvProblemVO;
|
import com.njcn.process.pojo.vo.SupvProblemVO;
|
||||||
|
import liquibase.pro.packaged.S;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -22,5 +23,5 @@ public interface SupvProblemMapper extends BaseMapper<SupvProblem> {
|
|||||||
Boolean updateId(@Param("isUploadHead")Integer isUploadHead,
|
Boolean updateId(@Param("isUploadHead")Integer isUploadHead,
|
||||||
@Param("id") String id);
|
@Param("id") String id);
|
||||||
|
|
||||||
List<SupvProblemVO> listDerive(@Param("param") SupvProblemParam supvProblemParam);
|
List<SupvProblemVO> listDerive(@Param("planIds")List<String> list);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,12 @@
|
|||||||
from
|
from
|
||||||
supv_problem spm
|
supv_problem spm
|
||||||
INNER JOIN supv_plan sp on sp.plan_Id=spm.plan_id
|
INNER JOIN supv_plan sp on sp.plan_Id=spm.plan_id
|
||||||
|
<where>
|
||||||
|
sp.plan_id in
|
||||||
|
<foreach collection="planIds" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</where>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.njcn.process.service;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.njcn.process.pojo.param.SupvPlanParam;
|
||||||
import com.njcn.process.pojo.param.SupvProblemParam;
|
import com.njcn.process.pojo.param.SupvProblemParam;
|
||||||
import com.njcn.process.pojo.po.SupvProblem;
|
import com.njcn.process.pojo.po.SupvProblem;
|
||||||
import com.njcn.process.pojo.vo.SupvProblemVO;
|
import com.njcn.process.pojo.vo.SupvProblemVO;
|
||||||
@@ -55,5 +56,5 @@ public interface ISupvProblemService extends IService<SupvProblem> {
|
|||||||
* @Author: wr
|
* @Author: wr
|
||||||
* @Date: 2023/9/1 9:44
|
* @Date: 2023/9/1 9:44
|
||||||
*/
|
*/
|
||||||
void problemList(SupvProblemParam supvProblemParam);
|
void problemList(SupvPlanParam supvPlanParam);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.njcn.process.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateTime;
|
import cn.hutool.core.date.DateTime;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
@@ -15,7 +16,9 @@ import com.njcn.common.utils.PubUtils;
|
|||||||
import com.njcn.oss.utils.FileStorageUtil;
|
import com.njcn.oss.utils.FileStorageUtil;
|
||||||
import com.njcn.poi.excel.ExcelUtil;
|
import com.njcn.poi.excel.ExcelUtil;
|
||||||
import com.njcn.process.mapper.SupvFileMapper;
|
import com.njcn.process.mapper.SupvFileMapper;
|
||||||
|
import com.njcn.process.mapper.SupvPlanMapper;
|
||||||
import com.njcn.process.mapper.SupvProblemMapper;
|
import com.njcn.process.mapper.SupvProblemMapper;
|
||||||
|
import com.njcn.process.pojo.param.SupvPlanParam;
|
||||||
import com.njcn.process.pojo.param.SupvProblemParam;
|
import com.njcn.process.pojo.param.SupvProblemParam;
|
||||||
import com.njcn.process.pojo.po.SupvFile;
|
import com.njcn.process.pojo.po.SupvFile;
|
||||||
import com.njcn.process.pojo.po.SupvPlan;
|
import com.njcn.process.pojo.po.SupvPlan;
|
||||||
@@ -35,6 +38,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
@@ -61,6 +65,7 @@ public class SupvProblemServiceImpl extends ServiceImpl<SupvProblemMapper, SupvP
|
|||||||
private final FileStorageUtil fileStorageUtil;
|
private final FileStorageUtil fileStorageUtil;
|
||||||
|
|
||||||
private final ISupvPlanService iSupvPlanService;
|
private final ISupvPlanService iSupvPlanService;
|
||||||
|
private final SupvPlanMapper supvPlanMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@@ -148,8 +153,19 @@ public class SupvProblemServiceImpl extends ServiceImpl<SupvProblemMapper, SupvP
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void problemList(SupvProblemParam supvProblemParam) {
|
public void problemList(SupvPlanParam supvPlanParam) {
|
||||||
List<SupvProblemVO> supvProblemVOS = this.baseMapper.listDerive(supvProblemParam);
|
List<SupvProblemVO> supvProblemVOS = new ArrayList<>();
|
||||||
|
LambdaQueryWrapper<SupvPlan> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
List<String> deptIds = deptFeignClient.getDepSonSelfCodetByCode(supvPlanParam.getPlanOrgId()).getData();
|
||||||
|
lambdaQueryWrapper.select(SupvPlan::getPlanId).in(SupvPlan::getPlanOrgId, deptIds)
|
||||||
|
.between(SupvPlan::getPlanSupvDate, DateUtil.parse(supvPlanParam.getSearchBeginTime(), DatePattern.NORM_DATE_PATTERN), DateUtil.parse(supvPlanParam.getSearchEndTime(), DatePattern.NORM_DATE_PATTERN))
|
||||||
|
.eq(StrUtil.isNotBlank(supvPlanParam.getSupvType()), SupvPlan::getSupvType, supvPlanParam.getSupvType());
|
||||||
|
|
||||||
|
List<String> planIds = supvPlanMapper.selectList(lambdaQueryWrapper).stream().map(SupvPlan::getPlanId).collect(Collectors.toList());
|
||||||
|
if (CollUtil.isNotEmpty(planIds)) {
|
||||||
|
supvProblemVOS = this.baseMapper.listDerive(planIds);
|
||||||
|
if(CollUtil.isNotEmpty(supvProblemVOS)) {
|
||||||
|
|
||||||
//监测点状态
|
//监测点状态
|
||||||
List<DictData> monitorTypeList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.MONITOR_TYPE.getCode()).getData();
|
List<DictData> monitorTypeList = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.MONITOR_TYPE.getCode()).getData();
|
||||||
Map<String, DictData> mapMonitorType = monitorTypeList.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
Map<String, DictData> mapMonitorType = monitorTypeList.stream().collect(Collectors.toMap(DictData::getId, Function.identity()));
|
||||||
@@ -175,10 +191,13 @@ public class SupvProblemServiceImpl extends ServiceImpl<SupvProblemMapper, SupvP
|
|||||||
supvProblem.setProblemLevel(mapProblemLeve.get(supvProblem.getProblemLevel()).getName());
|
supvProblem.setProblemLevel(mapProblemLeve.get(supvProblem.getProblemLevel()).getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ExcelUtil.exportExcel("实施问题信息.xlsx", SupvProblemVO.class, supvProblemVOS);
|
ExcelUtil.exportExcel("实施问题信息.xlsx", SupvProblemVO.class, supvProblemVOS);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//判断是否存在时间范围内
|
//判断是否存在时间范围内
|
||||||
public void checkParam(String id, String time) {
|
public void checkParam(String id, String time) {
|
||||||
if (StrUtil.isNotBlank(time)) {
|
if (StrUtil.isNotBlank(time)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user