diff --git a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/plan/AppMaintainPlanCommitController.java b/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/plan/AppMaintainPlanCommitController.java deleted file mode 100644 index 49ba69f..0000000 --- a/urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/controller/app/plan/AppMaintainPlanCommitController.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.zteits.urbanops.module.garden.controller.app.plan; - -import com.zteits.urbanops.framework.common.pojo.CommonResult; -import com.zteits.urbanops.framework.common.pojo.PageResult; -import com.zteits.urbanops.framework.common.pojo.PageParam; -import com.zteits.urbanops.module.garden.controller.app.vo.PlanCommitDetailPageReqVO; -import com.zteits.urbanops.module.garden.controller.app.vo.PlanTaskCommitDetailPageRespVO; -import com.zteits.urbanops.module.garden.service.plancommit.MaintainPlanCommitDetailService; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import jakarta.annotation.Resource; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import static com.zteits.urbanops.framework.common.pojo.CommonResult.success; - -@Tag(name = "APP - 养护、巡检计划提交记录") -@RestController -@RequestMapping("/app/plan/commit") -public class AppMaintainPlanCommitController { - - @Resource - private MaintainPlanCommitDetailService service; - - @PostMapping("/xc/listForPage") - @Operation(summary = "巡检计划提交记录-分页查询") - public CommonResult> listForPage(@RequestBody PlanCommitDetailPageReqVO reqVO) { - PageParam page = new PageParam(); - page.setPageNo(reqVO.getPageNo()); - page.setPageSize(reqVO.getPageSize()); - return success(service.pageListXC(page, reqVO)); - } - - @PostMapping("/add") - @Operation(summary = "巡检计划-add") - public CommonResult add(@RequestBody com.zteits.urbanops.module.garden.controller.app.vo.PlanCommitDetailAddReqVO reqVO) { - Long userId = com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId(); - String nickname = com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils.getLoginUserNickname(); - java.time.LocalDate today = java.time.LocalDate.now(); - Integer count = service.selectByPlanNoAndCommitDate(reqVO.planNo, today); - if (count != null && count > 0) { - return com.zteits.urbanops.framework.common.pojo.CommonResult.error(409, "记录已存在,请勿重复提交"); - } - return success(service.insertXC(userId, nickname, reqVO)); - } - - @PostMapping("/yh/listForPage") - @Operation(summary = "养护计划提交记录-分页查询") - public CommonResult> yhListForPage(@RequestBody com.zteits.urbanops.module.garden.controller.app.vo.PlanYhCommitDetailPageReqVO reqVO) { - PageParam page = new PageParam(); - page.setPageNo(reqVO.getPageNo()); - page.setPageSize(reqVO.getPageSize()); - return success(service.pageListYH(page, reqVO)); - } - - @PostMapping("/yh/add") - @Operation(summary = "养护计划-add") - public CommonResult yhAdd(@RequestBody com.zteits.urbanops.module.garden.controller.app.vo.PlanCommitDetailYhAddReqVO reqVO) { - Long userId = com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId(); - String nickname = com.zteits.urbanops.framework.security.core.util.SecurityFrameworkUtils.getLoginUserNickname(); - return success(service.insertYH(userId, nickname, reqVO)); - } - - @RequestMapping(value = "/yh/getById", method = org.springframework.web.bind.annotation.RequestMethod.GET) - @Operation(summary = "养护计划提交记录-提交明细") - public CommonResult yhGetById(@org.springframework.web.bind.annotation.RequestParam("id") Long id, - @org.springframework.web.bind.annotation.RequestParam(value = "is_add_url", required = false) Boolean isAddUrl) { - return success(service.getById(id)); - } - - @RequestMapping(value = "/yh/getMaintainNo", method = org.springframework.web.bind.annotation.RequestMethod.GET) - @Operation(summary = "养护任务提交记录-提交明细") - public CommonResult yhGetByProblemNo(@org.springframework.web.bind.annotation.RequestParam("problem_no") String problemNo, - @org.springframework.web.bind.annotation.RequestParam(value = "is_add_url", required = false) Boolean isAddUrl) { - return success(service.getByProblemNo(problemNo, isAddUrl)); - } -} \ No newline at end of file