mg
2022-10-12 a8c48babd4bd3e181b0f0bb1130c4c900edcacc2
ycl-platform/src/main/java/com/ycl/service/caseHandler/impl/BaseCaseServiceImpl.java
@@ -8,6 +8,7 @@
import com.ycl.bo.AdminUserDetails;
import com.ycl.bo.casePool.CasePoolIllegalBuildingDO;
import com.ycl.bo.casePool.CasePoolViolationDO;
import com.ycl.common.constant.BaseCaseStatus;
import com.ycl.common.util.DateUtil;
import com.ycl.dto.casePool.IllegalBuildingParam;
import com.ycl.dto.casePool.ViolationParam;
@@ -165,6 +166,7 @@
                    }
                    casePoolViolationVO.setCategory(dataDictionaryMapper.selectById(item.getCategoryId()).getName());
                    casePoolViolationVO.setType(dataDictionaryMapper.selectById(item.getTypeId()).getName());
                    casePoolViolationVO.setStreet(dataDictionaryMapper.selectById(item.getStreetId()).getName());
                    return casePoolViolationVO;
                }).collect(Collectors.toList());
        Page<CasePoolViolationVO> casePoolViolationVOPage = new Page<>();
@@ -185,6 +187,7 @@
                            CasePoolIllegalBuildingVO casePoolIllegalBuildingVO = new CasePoolIllegalBuildingVO();
                            BeanUtils.copyProperties(item, casePoolIllegalBuildingVO);
                            casePoolIllegalBuildingVO.setCategory(dataDictionaryMapper.selectById(item.getCategoryId()).getName());
                            casePoolIllegalBuildingVO.setCommunity(dataDictionaryMapper.selectById(item.getCommunityId()).getName());
                            return casePoolIllegalBuildingVO;
                        }
                ).collect(Collectors.toList());
@@ -195,7 +198,7 @@
    }
    @Override
    public Boolean saveViolationCase(ViolationParam violationParam, Integer id) {
    public Boolean saveViolationCase(ViolationParam violationParam, Long id) {
        Violations violations = new Violations();
        BeanUtils.copyProperties(violationParam, violations);
        violations.setId(id);
@@ -204,9 +207,9 @@
    }
    @Override
    public Boolean saveIllegalBuildingCase(IllegalBuildingParam illegalBuildingParam, Integer id) {
    public Boolean saveIllegalBuildingCase(IllegalBuildingParam illegalBuildingParam, Long id) {
        IllegalBuilding illegalBuilding = new IllegalBuilding();
        BeanUtils.copyProperties(illegalBuilding, illegalBuildingParam);
        BeanUtils.copyProperties(illegalBuildingParam, illegalBuilding);
        illegalBuilding.setBaseCaseId(id);
        Integer value = 1;
        return illegalBuildingMapper.insert(illegalBuilding) == value ? true : false;
@@ -222,7 +225,16 @@
        if (baseCase == null) {
            return null;
        }
        //查询案件违规信息
        if (baseCase.getCategory() == 1) {
            Violations violations = violationsMapper.selectById(baseCase.getId());
            baseCase.setViolations(violations);
        } else {
            IllegalBuilding  illegalBuilding = illegalBuildingMapper.selectById(baseCase.getId());
            baseCase.setIllegalBuilding(illegalBuilding);
        }
        bcd.setBaseCase(baseCase);
        //案件相关信息
        //2.查询办理经过信息
        //2.1查询处置流程配置
        HandlePassVo handlePassVo = new HandlePassVo();
@@ -241,7 +253,7 @@
        //2.2查询处置流程环节配置
        Map mapWcs = new HashMap();
        mapWcs.put("workflowConfigId", ddlcId);
        mapWcs.put("baseCaseId", ddlcId);
        mapWcs.put("baseCaseId", baseCase.getId());
        List<WorkflowConfigStep> listWcs = workflowConfigStepMapper.selectRecordByWorkflowConfigStepId(mapWcs);
        //处理用环节时间
        for (WorkflowConfigStep step : listWcs) {
@@ -250,10 +262,12 @@
                continue;
            }
            for (DisposeRecord record : records) {
                record.setLinkTime(
                        DateUtil.getDistanceDateTime(
                                DateUtil.fromLocalDateTime(baseCase.getAlarmTime()),
                                DateUtil.fromLocalDateTime(record.getCreateTime())));
                if (record != null&&record.getCreateTime()!=null) {
                    record.setLinkTime(
                            DateUtil.getDistanceDateTime(
                                    DateUtil.fromLocalDateTime(baseCase.getAlarmTime()),
                                    DateUtil.fromLocalDateTime(record.getCreateTime())));
                }
            }
            step.setDisposeRecords(records);
        }
@@ -317,13 +331,12 @@
    }
    @Override
    public void endCase(Integer caseId, String result) {
    public void endCase(Long caseId, String result) {
        AdminUserDetails user = (AdminUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
        Integer endCaseState = 6;
        Integer state = 2;
        Integer state = 1;
        String endCaseName = "结案";
        BaseCase baseCase = new BaseCase();
        baseCase.setState(endCaseState);
        baseCase.setState(BaseCaseStatus.CLOSING_REGISTER);
        baseCase.setId(caseId);
        baseCaseMapper.updateById(baseCase);
        DisposeRecord disposeRecord = new DisposeRecord();
@@ -331,7 +344,7 @@
        disposeRecord.setWorkflowConfigStepId(workflowConfigStepMapper
                .selectOne(new LambdaQueryWrapper<WorkflowConfigStep>().eq(WorkflowConfigStep::getName, endCaseName))
                .getWorkflowConfigId());
        disposeRecord.setCreateUser(user.getUserId().intValue());
        disposeRecord.setCreateUser(user.getUserId().longValue());
        disposeRecord.setResult(result);
        disposeRecord.setState(state);
        disposeRecord.setCreateTime(LocalDateTime.now());