| | |
| | | package com.ycl.controller.caseHandler; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ycl.annotation.LogSave; |
| | | import com.ycl.api.CommonResult; |
| | | import com.ycl.bo.AdminUserDetails; |
| | | import com.ycl.controller.BaseController; |
| | | import com.ycl.common.constant.BaseCaseStatus; |
| | | import com.ycl.common.util.UtilNumber; |
| | |
| | | import com.ycl.entity.caseHandler.BaseCase; |
| | | import com.ycl.entity.caseHandler.BaseCaseDetail; |
| | | import com.ycl.entity.caseHandler.DisposeRecord; |
| | | import com.ycl.entity.resources.ImageResources; |
| | | import com.ycl.service.caseHandler.IBaseCaseService; |
| | | import com.ycl.service.caseHandler.IDisposeRecordService; |
| | | import com.ycl.service.caseHandler.IIllegalBuildingService; |
| | | import com.ycl.service.caseHandler.IViolationsService; |
| | | import com.ycl.service.resources.IImageResourcesService; |
| | | import com.ycl.utils.EasyExcelUtils; |
| | | import com.ycl.vo.casePool.QueryForViolationVO; |
| | | import io.swagger.annotations.Api; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.core.context.SecurityContextHolder; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | UtilNumber utilNumber; |
| | | |
| | | @Autowired |
| | | IImageResourcesService iImageResourcesService; |
| | | |
| | | |
| | | @Autowired |
| | |
| | | **/ |
| | | @ApiOperation(value = "添加违规案件") |
| | | @PostMapping("/addition_violation") |
| | | @LogSave(operationType = "事项处置管理", contain = "新增违建案件") |
| | | @LogSave(operationType = "事项处置管理", contain = "新增违规案件") |
| | | public CommonResult addViolationCase(@RequestBody @Validated ViolationParam violationParam) { |
| | | Integer violation = 1; |
| | | Integer resource = 2; |
| | |
| | | baseCase.setAlarmTime(LocalDateTime.parse(violationParam.getAlarmTime(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); |
| | | baseCase.setCreateTime(LocalDateTime.now()); |
| | | baseCaseService.save(baseCase); |
| | | JSONArray arr = JSON.parseArray(baseCase.getPic()); |
| | | AdminUserDetails user = (AdminUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); |
| | | |
| | | for (int i = 0; i < arr.size(); i++) { |
| | | ImageResources imageResources = new ImageResources(); |
| | | imageResources.setType("01"); |
| | | imageResources.setBelongToId(baseCase.getId()); |
| | | imageResources.setUrl(arr.getString(i)); |
| | | imageResources.setCreateTime(LocalDateTime.now()); |
| | | imageResources.setCreateUser(user.getUserId()); |
| | | iImageResourcesService.save(imageResources); |
| | | } |
| | | |
| | | return CommonResult.success(baseCaseService.saveViolationCase(violationParam, baseCase.getId())); |
| | | } |
| | | |
| | |
| | | **/ |
| | | @ApiOperation(value = "添加违建案件") |
| | | @PostMapping("/addition_illegal_building") |
| | | @LogSave(operationType = "事项处置管理", contain = "新增违规案件") |
| | | @LogSave(operationType = "事项处置管理", contain = "新增违建案件") |
| | | public CommonResult addIllegalBuildingCase(@RequestBody @Validated IllegalBuildingParam illegalBuildingParam) { |
| | | Integer illegalBuilding = 2; |
| | | Integer resource = 2; |