wl
2022-11-08 bdb4a481d7ab7085a0832a7f1c0f5295596d498c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package com.ycl.controller.caseHandler;
 
 
import com.ycl.annotation.LogSave;
import com.ycl.api.CommonResult;
import com.ycl.bo.AdminUserDetails;
import com.ycl.dto.caseHandler.DispatchInfoParam;
import com.ycl.dto.dispatch.UploadDisposingResultParam;
import com.ycl.entity.caseHandler.DispatchInfo;
import com.ycl.service.caseHandler.*;
import com.ycl.service.resources.IImageResourcesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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.*;
 
/**
 * <p>
 * 调度 前端控制器
 * </p>
 *
 * @author mg
 * @since 2022-09-28
 */
@RestController
@RequestMapping("/dispatch_handle")
@Api(tags = "调度")
public class DispatchHandleController {
 
 
    @Autowired
    IDispatchHandleService iDispatchHandleService;
    @Autowired
    IInvestigationService iInvestigationService;
    @Autowired
    IArrivalSituationService iArrivalSituationService;
    @Autowired
    IPartyInfoService iPartyInfoService;
    @Autowired
    IWritService iWritService;
    @Autowired
    IBaseCaseService baseCaseService;
    @Autowired
    IDisposeRecordService iDisposeRecordService;
    @Autowired
    IImageResourcesService iImageResourcesService;
 
    @ApiOperation(value = "调度")
    @RequestMapping(value = "/dispatch", method = RequestMethod.POST)
    @ResponseBody
    @LogSave(operationType = "事项处置管理", contain = "案件调度")
    public CommonResult<DispatchInfo> dispatch(@Validated @RequestBody DispatchInfoParam dispatchInfoParam) {
        AdminUserDetails user = (AdminUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
        dispatchInfoParam.setCreateUser(user.getUserId());
        return CommonResult.success(iDispatchHandleService.dispatch(dispatchInfoParam));
    }
 
    @ApiOperation(value = "上传违规/违建处置结果")
    @PostMapping("/addition_dispose_result")
    @LogSave(operationType = "事项处置管理", contain = "案件上传处置结果")
    public CommonResult searchDisposeList(@RequestParam Long caseId,
                                          @RequestParam Integer type,
                                          @RequestBody UploadDisposingResultParam uploadDisposingResultParam) {
        iDisposeRecordService.saveUpload(caseId, type, uploadDisposingResultParam);
        return CommonResult.success("add success");
    }
}