新增根据身份证号查看日志信息接口
This commit is contained in:
parent
2343ded0cb
commit
a0ac54a2dc
@ -40,23 +40,34 @@ public class InspectApplylogController {
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建创建检验单日志记录")
|
||||
@PreAuthorize("@ss.hasPermission('inspect:applylog:create')")
|
||||
public CommonResult<Integer> createApplylog(@Valid @RequestBody InspectApplylogSaveReqVO createReqVO) {
|
||||
return success(applylogService.createApplylog(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新创建检验单日志记录")
|
||||
@PreAuthorize("@ss.hasPermission('inspect:applylog:update')")
|
||||
public CommonResult<Boolean> updateApplylog(@Valid @RequestBody InspectApplylogSaveReqVO updateReqVO) {
|
||||
applylogService.updateApplylog(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/ApplylogsByIdcard")
|
||||
@Operation(summary = "获得检验单日志记录")
|
||||
public CommonResult<List<InspectApplylogDO>> getLatestApplylogsByIdcard(@RequestParam("idcard") String idcard)
|
||||
{
|
||||
if(idcard!=null)
|
||||
{
|
||||
List<InspectApplylogDO> inspectApplylogDOS= applylogService .getLatestApplylogsByIdcard(idcard);
|
||||
return success(inspectApplylogDOS);
|
||||
}
|
||||
else
|
||||
{
|
||||
return success(null, "身份证号为空");
|
||||
}
|
||||
}
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除创建检验单日志记录")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('inspect:applylog:delete')")
|
||||
public CommonResult<Boolean> deleteApplylog(@RequestParam("id") Integer id) {
|
||||
applylogService.deleteApplylog(id);
|
||||
return success(true);
|
||||
@ -65,7 +76,6 @@ public class InspectApplylogController {
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得创建检验单日志记录")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('inspect:applylog:query')")
|
||||
public CommonResult<InspectApplylogRespVO> getApplylog(@RequestParam("id") Integer id) {
|
||||
InspectApplylogDO applylog = applylogService.getApplylog(id);
|
||||
return success(BeanUtils.toBean(applylog, InspectApplylogRespVO.class));
|
||||
@ -73,7 +83,6 @@ public class InspectApplylogController {
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得创建检验单日志记录分页")
|
||||
@PreAuthorize("@ss.hasPermission('inspect:applylog:query')")
|
||||
public CommonResult<PageResult<InspectApplylogRespVO>> getApplylogPage(@Valid InspectApplylogPageReqVO pageReqVO) {
|
||||
PageResult<InspectApplylogDO> pageResult = applylogService.getApplylogPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, InspectApplylogRespVO.class));
|
||||
@ -81,7 +90,6 @@ public class InspectApplylogController {
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出创建检验单日志记录 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('inspect:applylog:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportApplylogExcel(@Valid InspectApplylogPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
|
@ -28,6 +28,10 @@ public interface InspectApplylogService {
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateApplylog(@Valid InspectApplylogSaveReqVO updateReqVO);
|
||||
/*
|
||||
* 通过身份证获取日志消息消息记录 返回最新的2条
|
||||
* */
|
||||
List<InspectApplylogDO> getLatestApplylogsByIdcard(String idcard);
|
||||
|
||||
/**
|
||||
* 删除创建检验单日志记录
|
||||
|
@ -1,15 +1,14 @@
|
||||
package cn.iocoder.yudao.module.inspect.service.inspectapplylog;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.inspect.controller.admin.inspectapplylog.vo.*;
|
||||
import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectapplylog.InspectApplylogDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.inspect.dal.mysql.inspectapplylog.InspectApplylogMapper;
|
||||
@ -46,7 +45,14 @@ public class InspectApplylogServiceImpl implements InspectApplylogService {
|
||||
InspectApplylogDO updateObj = BeanUtils.toBean(updateReqVO, InspectApplylogDO.class);
|
||||
applylogMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InspectApplylogDO> getLatestApplylogsByIdcard(String idcard) {
|
||||
QueryWrapper<InspectApplylogDO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("idcard", idcard)
|
||||
.orderByDesc("time") // 按 Time 字段降序排序
|
||||
.last("LIMIT 2"); // 限制结果数量为 2,如果需要多条,可以调整 LIMIT 的值
|
||||
return applylogMapper.selectList(queryWrapper);
|
||||
}
|
||||
@Override
|
||||
public void deleteApplylog(Integer id) {
|
||||
// 校验存在
|
||||
|
@ -235,6 +235,7 @@ yudao:
|
||||
- /admin-api/inspect/patient/updatePatientSupplement #公卫患者信息补充扩展
|
||||
- /admin-api/inspect/patient/PushJYPatientInfo #推送给公卫
|
||||
- /admin-api/inspect/patient/getworkload #获取卫生院工作量
|
||||
- /admin-api/inspect/applylog/ApplylogsByIdcard #获取检验日志信息
|
||||
websocket:
|
||||
enable: true # websocket的开关
|
||||
path: /infra/ws # 路径
|
||||
@ -285,6 +286,7 @@ yudao:
|
||||
- /admin-api/inspect/patient/updatePatientSupplement #公卫患者信息补充扩展
|
||||
- /admin-api/inspect/patient/PushJYPatientInfo #推送给公卫
|
||||
- /admin-api/inspect/patient/getworkload #获取卫生院工作量
|
||||
- /admin-api/inspect/applylog/ApplylogsByIdcard #获取检验日志信息
|
||||
- /adminInspect/admin-api/inspect/department/getList
|
||||
- /adminInspect/admin-api/inspect/patient/getUSPatientInfo
|
||||
- /adminInspect/admin-api/system/captcha/get
|
||||
@ -302,6 +304,7 @@ yudao:
|
||||
- /adminInspect/admin-api/inspect/patient/updatePatientSupplement #公卫患者信息补充扩展
|
||||
- /adminInspect/admin-api/inspect/patient/PushJYPatientInfo #推送给公卫
|
||||
- /adminInspect/admin-api/inspect/patient/getworkload #获取卫生院工作量
|
||||
- /adminInspect/admin-api/inspect/applylog/ApplylogsByIdcard #获取检验日志信息
|
||||
ignore-tables:
|
||||
- system_tenant
|
||||
- system_tenant_package
|
||||
|
Loading…
Reference in New Issue
Block a user