增加点位打卡功能,以及关联功能

This commit is contained in:
2025-09-08 20:00:30 +08:00
parent 98eb02a007
commit d32e8436a5
50 changed files with 5281 additions and 185 deletions

View File

@ -1,6 +1,8 @@
package com.mosty.yjzl.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.mosty.base.model.dto.yjzl.TbZdxlFgdwUpdateDTO;
import com.mosty.base.model.query.yjzl.TbZdxlFgdwQuery;
import com.mosty.base.model.vo.yjzl.TbZdxlFgdwVO;
import com.mosty.base.utils.MessageUtils;
import com.mosty.base.utils.spring.SpringValidUtils;
@ -38,7 +40,6 @@ public class TbZdxlFgdwController {
*/
private final TbZdxlFgdwService tbZdxlFgdwService;
/**
* 查询单条根据主键ID
* @param id 主键ID
@ -48,7 +49,7 @@ public class TbZdxlFgdwController {
@GetMapping("{id}")
@JwtSysUser
@Log(title = "指导巡逻-方格点位接口-查询单条根据主键ID", businessType = BusinessType.OTHER)
public ResponseResult<TbZdxlFgdwVO> selectById(@PathVariable("id") Integer id) {
public ResponseResult<TbZdxlFgdwVO> selectById(@PathVariable("id") Long id) {
return ResponseResult.success(tbZdxlFgdwService.selectById(id));
}
@ -64,6 +65,32 @@ public class TbZdxlFgdwController {
return ResponseResult.success(tbZdxlFgdwService.selectAllList());
}
/**
* 查询分页
* @param query 实体查询对象
* @return ResponseResult 实体信息分页列表
*/
@ApiOperation(value = "查询分页")
@GetMapping("/selectPage")
@JwtSysUser
@Log(title = "指导巡逻-方格点位接口-查询分页", businessType = BusinessType.OTHER)
public ResponseResult<IPage<TbZdxlFgdwVO>> selectPage(TbZdxlFgdwQuery query) {
return ResponseResult.success(tbZdxlFgdwService.selectPage(query));
}
/**
* 查询列表
* @param query 实体查询对象
* @return ResponseResult 实体信息列表
*/
@ApiOperation(value = "查询列表")
@GetMapping("/selectList")
@JwtSysUser
@Log(title = "指导巡逻-方格点位接口-查询列表", businessType = BusinessType.OTHER)
public ResponseResult<List<TbZdxlFgdwVO>> selectList(TbZdxlFgdwQuery query) {
return ResponseResult.success(tbZdxlFgdwService.selectList(query));
}
/**
* 修改单条
* @param dto 修改DTO对象
@ -74,7 +101,7 @@ public class TbZdxlFgdwController {
@PostMapping("update")
@JwtSysUser
@Log(title = "指导巡逻-方格点位接口-修改单条", businessType = BusinessType.UPDATE)
public ResponseResult<Integer> update(@RequestBody @Valid TbZdxlFgdwUpdateDTO dto, BindingResult bindResult){
public ResponseResult<Long> update(@RequestBody @Valid TbZdxlFgdwUpdateDTO dto, BindingResult bindResult){
try {
//基础信息校验
String message = SpringValidUtils.getErrorsMsg(bindResult);
@ -83,7 +110,7 @@ public class TbZdxlFgdwController {
}
//修改
Integer resultId = tbZdxlFgdwService.updateEntity(dto);
Long resultId = tbZdxlFgdwService.updateEntity(dto);
if(ObjectUtils.isNotEmpty(resultId)){
return ResponseResult.success(resultId);
}