Commit eb36f9437bb32fdfb11e449830ab255971ba7a16

Authored by 王富生
1 parent 1c83a3f9

app养护计划明细提交

urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/plan/AppMaintainPlanCommitController.java deleted
1 -package com.zteits.urbanops.module.garden.controller.app.plan;  
2 -  
3 -import com.zteits.urbanops.framework.common.pojo.CommonResult;  
4 -import com.zteits.urbanops.framework.common.pojo.PageResult;  
5 -import com.zteits.urbanops.framework.common.pojo.PageParam;  
6 -import com.zteits.urbanops.module.garden.controller.app.vo.PlanCommitDetailPageReqVO;  
7 -import com.zteits.urbanops.module.garden.controller.app.vo.PlanTaskCommitDetailPageRespVO;  
8 -import com.zteits.urbanops.module.garden.service.plancommit.MaintainPlanCommitDetailService;  
9 -import io.swagger.v3.oas.annotations.Operation;  
10 -import io.swagger.v3.oas.annotations.tags.Tag;  
11 -import jakarta.annotation.Resource;  
12 -import org.springframework.web.bind.annotation.PostMapping;  
13 -import org.springframework.web.bind.annotation.RequestBody;  
14 -import org.springframework.web.bind.annotation.RequestMapping;  
15 -import org.springframework.web.bind.annotation.RestController;  
16 -  
17 -import static com.zteits.urbanops.framework.common.pojo.CommonResult.success;  
18 -  
19 -@Tag(name = "APP - 养护、巡检计划提交记录")  
20 -@RestController  
21 -@RequestMapping("/app/plan/commit")  
22 -public class AppMaintainPlanCommitController {  
23 -  
24 - @Resource  
25 - private MaintainPlanCommitDetailService service;  
26 -  
27 - @PostMapping("/xc/listForPage")  
28 - @Operation(summary = "巡检计划提交记录-分页查询")  
29 - public CommonResult<PageResult<PlanTaskCommitDetailPageRespVO>> listForPage(@RequestBody PlanCommitDetailPageReqVO reqVO) {  
30 - PageParam page = new PageParam();  
31 - page.setPageNo(reqVO.getPageNo());  
32 - page.setPageSize(reqVO.getPageSize());  
33 - return success(service.pageListXC(page, reqVO));  
34 - }  
35 -  
36 - @PostMapping("/add")  
37 - @Operation(summary = "巡检计划-add")  
38 - public CommonResult<Boolean> add(@RequestBody com.zteits.urbanops.module.garden.controller.app.vo.PlanCommitDetailAddReqVO reqVO) {  
39 - Long userId = com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId();  
40 - String nickname = com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils.getLoginUserNickname();  
41 - java.time.LocalDate today = java.time.LocalDate.now();  
42 - Integer count = service.selectByPlanNoAndCommitDate(reqVO.planNo, today);  
43 - if (count != null && count > 0) {  
44 - return com.zteits.urbanops.framework.common.pojo.CommonResult.error(409, "记录已存在,请勿重复提交");  
45 - }  
46 - return success(service.insertXC(userId, nickname, reqVO));  
47 - }  
48 -  
49 - @PostMapping("/yh/listForPage")  
50 - @Operation(summary = "养护计划提交记录-分页查询")  
51 - public CommonResult<PageResult<PlanTaskCommitDetailPageRespVO>> yhListForPage(@RequestBody com.zteits.urbanops.module.garden.controller.app.vo.PlanYhCommitDetailPageReqVO reqVO) {  
52 - PageParam page = new PageParam();  
53 - page.setPageNo(reqVO.getPageNo());  
54 - page.setPageSize(reqVO.getPageSize());  
55 - return success(service.pageListYH(page, reqVO));  
56 - }  
57 -  
58 - @PostMapping("/yh/add")  
59 - @Operation(summary = "养护计划-add")  
60 - public CommonResult<Boolean> yhAdd(@RequestBody com.zteits.urbanops.module.garden.controller.app.vo.PlanCommitDetailYhAddReqVO reqVO) {  
61 - Long userId = com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId();  
62 - String nickname = com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils.getLoginUserNickname();  
63 - return success(service.insertYH(userId, nickname, reqVO));  
64 - }  
65 -  
66 - @RequestMapping(value = "/yh/getById", method = org.springframework.web.bind.annotation.RequestMethod.GET)  
67 - @Operation(summary = "养护计划提交记录-提交明细")  
68 - public CommonResult<PlanTaskCommitDetailPageRespVO> yhGetById(@org.springframework.web.bind.annotation.RequestParam("id") Long id,  
69 - @org.springframework.web.bind.annotation.RequestParam(value = "is_add_url", required = false) Boolean isAddUrl) {  
70 - return success(service.getById(id));  
71 - }  
72 -  
73 - @RequestMapping(value = "/yh/getMaintainNo", method = org.springframework.web.bind.annotation.RequestMethod.GET)  
74 - @Operation(summary = "养护任务提交记录-提交明细")  
75 - public CommonResult<PlanTaskCommitDetailPageRespVO> yhGetByProblemNo(@org.springframework.web.bind.annotation.RequestParam("problem_no") String problemNo,  
76 - @org.springframework.web.bind.annotation.RequestParam(value = "is_add_url", required = false) Boolean isAddUrl) {  
77 - return success(service.getByProblemNo(problemNo, isAddUrl));  
78 - }  
79 -}  
80 \ No newline at end of file 0 \ No newline at end of file