| | |
| | | public Boolean saveViolationCase(ViolationParam violationParam, Long id) { |
| | | Violations violations = new Violations(); |
| | | BeanUtils.copyProperties(violationParam, violations); |
| | | violations.setId(id); |
| | | Integer value = 1; |
| | | violations.setId(id); |
| | | setDisposeRecord(id); |
| | | return violationsMapper.insert(violations) == value ? true : false; |
| | | } |
| | | |
| | | private void setDisposeRecord(Long id) { |
| | | String stepName = "调度"; |
| | | Integer state = 0; |
| | | DisposeRecord disposeRecord = new DisposeRecord(); |
| | | disposeRecord.setBaseCaseId(id); |
| | | disposeRecord.setState(state); |
| | | disposeRecord.setCreateTime(LocalDateTime.now()); |
| | | AdminUserDetails userDetails = (AdminUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); |
| | | disposeRecord.setCreateUser(userDetails.getUserId()); |
| | | disposeRecord.setStartTime(LocalDateTime.now()); |
| | | disposeRecord.setStepName(stepName); |
| | | disposeRecordMapper.insert(disposeRecord); |
| | | } |
| | | |
| | | @Override |
| | | public Boolean saveIllegalBuildingCase(IllegalBuildingParam illegalBuildingParam, Long id) { |
| | | IllegalBuilding illegalBuilding = new IllegalBuilding(); |
| | | BeanUtils.copyProperties(illegalBuildingParam, illegalBuilding); |
| | | illegalBuilding.setBaseCaseId(id); |
| | | setDisposeRecord(id); |
| | | Integer value = 1; |
| | | illegalBuilding.setBaseCaseId(id); |
| | | return illegalBuildingMapper.insert(illegalBuilding) == value ? true : false; |
| | | } |
| | | |