123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- package com.bizmatics.controller.web;
- import com.bizmatics.common.core.bean.ApiResult;
- import com.bizmatics.common.core.bean.CommonPage;
- import com.bizmatics.model.PatrolCheckEntry;
- import com.bizmatics.service.PatrolCheckEntryService;
- import com.bizmatics.service.aop.BusinessType;
- import com.bizmatics.service.aop.Log;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.*;
- import java.util.List;
- /**
- * 巡检管理-检查条目
- *
- * @author ya
- * @since 2021-10-15
- */
- @RestController
- @RequestMapping("/patrolCheckEntry")
- public class PatrolCheckEntryController {
- @Autowired
- private PatrolCheckEntryService patrolCheckEntryService;
- /**
- * 巡检管理-检查条目-检查项-新增
- *
- * @param patrolCheckEntry
- * @return
- */
- @Log(title = "巡检管理-检查条目-检查项", businessType = BusinessType.INSERT)
- @PostMapping("patrolCheckEntryAdd")
- public ApiResult<Void> patrolCheckEntryAdd(@RequestBody PatrolCheckEntry patrolCheckEntry
- ) {
- patrolCheckEntryService.patrolCheckEntryAdd(patrolCheckEntry);
- return ApiResult.success();
- }
- /**
- * 巡检管理-检查条目-检查项-修改
- *
- * @param patrolCheckEntry
- * @return
- */
- @Log(title = "巡检管理-检查条目-检查项", businessType = BusinessType.UPDATE)
- @PostMapping("patrolCheckEntryUpdate")
- public ApiResult<Void> patrolCheckEntryUpdate(@RequestBody PatrolCheckEntry patrolCheckEntry
- ) {
- patrolCheckEntryService.patrolCheckEntryUpdate(patrolCheckEntry);
- return ApiResult.success();
- }
- /**
- * 巡检管理-检查条目-检查项-注销
- *
- * @param id 检查条目检查项id
- * @return
- */
- @Log(title = "巡检管理-检查条目-检查项", businessType = BusinessType.DELETE)
- @GetMapping("patrolCheckEntryDel")
- public ApiResult<Void> patrolCheckEntryDel(@RequestParam Integer id
- ) {
- patrolCheckEntryService.patrolCheckEntryDel(id);
- return ApiResult.success();
- }
- /**
- * 巡检管理-检查条目-检查项-检查项列表查询
- *
- * @param checkEntryName 检查项名称
- * @param deviceTypeId 设备类型id
- * @param size 页数
- * @param current 条数
- * @return
- */
- @GetMapping("patrolCheckEntryList")
- public ApiResult<CommonPage<PatrolCheckEntry>> patrolCheckEntryList(@RequestParam(required = false) String checkEntryName,
- @RequestParam Integer deviceTypeId,
- @RequestParam(value = "size", required = false, defaultValue = "1") Integer size,
- @RequestParam(value = "current", required = false, defaultValue = "10") Integer current,
- @RequestParam(value = "id", required = false, defaultValue = "0") Integer id
- ) {
- return ApiResult.success(patrolCheckEntryService.patrolCheckEntryList(checkEntryName, deviceTypeId, size, current, id));
- }
- /**
- * 巡检管理-检查条目-检查项-下拉框
- *
- * @param deviceTypeId
- * @return
- */
- @GetMapping("patrolCheckEntrydDroplist")
- public ApiResult<List<PatrolCheckEntry>> patrolCheckEntrydDroplist(@RequestParam Integer deviceTypeId
- ) {
- return ApiResult.success(patrolCheckEntryService.patrolCheckEntrydDroplist(deviceTypeId));
- }
- }
|