From e8455bcc0efa8909652adc0cf6a7dd7387f42617 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Sat, 27 Jan 2024 15:37:52 +0800
Subject: [PATCH] 新增场所检查,民警扫码查询修改
---
src/main/java/org/springblade/modules/doorplateAddress/service/IDoorplateAddressService.java | 8
src/main/java/org/springblade/modules/place/service/IPlaceCheckService.java | 43 +++
src/main/java/org/springblade/modules/place/mapper/PlaceCheckMapper.java | 45 ++++
src/main/java/org/springblade/modules/place/controller/PlaceCheckController.java | 126 +++++++++++
src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml | 46 ++-
src/main/java/org/springblade/modules/place/entity/PlaceCheckEntity.java | 98 ++++++++
src/main/java/org/springblade/modules/place/service/impl/PlaceCheckServiceImpl.java | 43 +++
src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.java | 13 +
src/main/java/org/springblade/modules/place/mapper/PlaceCheckMapper.xml | 32 ++
src/main/java/org/springblade/modules/place/wrapper/PlaceCheckWrapper.java | 50 ++++
src/main/java/org/springblade/modules/place/dto/PlaceCheckDTO.java | 34 +++
src/main/java/org/springblade/modules/place/vo/PlaceCheckVO.java | 45 ++++
src/main/java/org/springblade/modules/doorplateAddress/service/impl/DoorplateAddressServiceImpl.java | 26 +
src/main/java/org/springblade/modules/doorplateAddress/controller/DoorplateAddressController.java | 12 +
14 files changed, 591 insertions(+), 30 deletions(-)
diff --git a/src/main/java/org/springblade/modules/doorplateAddress/controller/DoorplateAddressController.java b/src/main/java/org/springblade/modules/doorplateAddress/controller/DoorplateAddressController.java
index e523a1e..2b20c1f 100644
--- a/src/main/java/org/springblade/modules/doorplateAddress/controller/DoorplateAddressController.java
+++ b/src/main/java/org/springblade/modules/doorplateAddress/controller/DoorplateAddressController.java
@@ -243,4 +243,16 @@
return R.data(doorplateAddressService.communityDataHandle());
}
+
+ /**
+ * 查询场所标准地址数据
+ * @param doorplateAddressVO
+ * 查询场所标准地址数据
+ * @return
+ */
+ @GetMapping("/getPlaceList")
+ public R getPlaceList(DoorplateAddressVO doorplateAddressVO,Integer size){
+ return R.data(doorplateAddressService.getPlaceList(doorplateAddressVO,size));
+ }
+
}
diff --git a/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.java b/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.java
index b18d802..ff5ea35 100644
--- a/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.java
+++ b/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.java
@@ -195,10 +195,19 @@
List<Long> getAoiCodeList();
/**
- * 查询所有的地址表和场所表差集集合
+ * 查询所有的地址表和场所表差集集合(没有入库的)
* @return
*/
- List<DoorplateAddressEntity> getPlaceList();
+ List<DoorplateAddressEntity> getNotInPlaceList();
+
+ /**
+ * 查询场所标准地址数据
+ * @param doorplateAddressVO
+ * @param size
+ * @return
+ */
+ List<DoorplateAddressEntity> getPlaceList(@Param("doorplateAddress") DoorplateAddressVO doorplateAddressVO,
+ @Param("size") Integer size);
/**
* 查询详情
diff --git a/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml b/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml
index d3f36ee..cc565e7 100644
--- a/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml
+++ b/src/main/java/org/springblade/modules/doorplateAddress/mapper/DoorplateAddressMapper.xml
@@ -469,29 +469,33 @@
</select>
<!--查询所有的地址表和场所表差集集合(小区和非小区的)-->
- <select id="getPlaceList" resultType="org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity">
- select jda.* from jczz_doorplate_address jda join (
- select
- min(jda.id) as id
- from jczz_doorplate_address jda
- left join jczz_district jd on jda.aoi_code = jd.aoi_code
- where jda.aoi_code != "" and jda.aoi_name !="" and jd.id is null
- and (doorplate_type = '大门牌' or doorplate_type = '楼幢牌' or doorplate_type = '中门牌' or doorplate_type = '单元牌')
- GROUP BY jda.aoi_code
- union all
- (
- select
- min(jda.id) as id
- from jczz_doorplate_address jda
- left join jczz_district jd on jda.aoi_code = jd.aoi_code
- where jda.aoi_code != "" and jda.sub_aoi != ""
- and (doorplate_type = '大门牌' or doorplate_type = '楼幢牌' or doorplate_type = '中门牌')
- group by jda.aoi_code
- )
- ) a on jda.id = a.id
+ <select id="getNotInPlaceList" resultType="org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity">
+ select jda.* from jczz_doorplate_address jda
+ left join jczz_place jp on locate(jda.address_code,jp.house_code)>0 and jp.is_deleted = 0
+ where 1=1
+ and (doorplate_type = '小门牌' or (doorplate_type = '中门牌' and address_level = 1))
+ and jp.id is null
+ and jda.poi != ''
+ <if test="doorplateAddress.townStreetName!=null and doorplateAddress.townStreetName!=''">
+ and jda.town_street_name like concat('%',#{doorplateAddress.townStreetName},'%')
+ </if>
</select>
- <!--查询所有的地址表和场所表差集集合(小区和非小区的)-->
+ <!--查询场所标准地址数据-->
+ <select id="getPlaceList" resultType="org.springblade.modules.doorplateAddress.entity.DoorplateAddressEntity">
+ select jda.*
+ from jczz_doorplate_address jda
+ where 1=1
+ and (doorplate_type = '小门牌' or (doorplate_type = '中门牌' and address_level = 1))
+ <if test="doorplateAddress.addressName!=null and doorplateAddress.addressName!=''">
+ and address_name like concat('%',#{doorplateAddress.addressName},'%')
+ </if>
+ <if test="doorplateAddress.poi!=null and doorplateAddress.poi!=''">
+ and poi like concat('%',#{doorplateAddress.poi},'%')
+ </if>
+ </select>
+
+ <!--查询地址表详情-->
<select id="getDoorplateAddressVODetail" resultType="org.springblade.modules.doorplateAddress.vo.DoorplateAddressVO">
select jda.* from jczz_doorplate_address jda where address_code = #{doorplateAddress.addressCode}
</select>
diff --git a/src/main/java/org/springblade/modules/doorplateAddress/service/IDoorplateAddressService.java b/src/main/java/org/springblade/modules/doorplateAddress/service/IDoorplateAddressService.java
index b5c6c9b..046c810 100644
--- a/src/main/java/org/springblade/modules/doorplateAddress/service/IDoorplateAddressService.java
+++ b/src/main/java/org/springblade/modules/doorplateAddress/service/IDoorplateAddressService.java
@@ -121,4 +121,12 @@
* @return
*/
Object communityDataHandle();
+
+ /**
+ * 查询场所标准地址数据
+ * @param doorplateAddressVO
+ * 查询场所标准地址数据
+ * @return
+ */
+ Object getPlaceList(DoorplateAddressVO doorplateAddressVO, Integer size);
}
diff --git a/src/main/java/org/springblade/modules/doorplateAddress/service/impl/DoorplateAddressServiceImpl.java b/src/main/java/org/springblade/modules/doorplateAddress/service/impl/DoorplateAddressServiceImpl.java
index 186bd7c..9c737c8 100644
--- a/src/main/java/org/springblade/modules/doorplateAddress/service/impl/DoorplateAddressServiceImpl.java
+++ b/src/main/java/org/springblade/modules/doorplateAddress/service/impl/DoorplateAddressServiceImpl.java
@@ -796,7 +796,7 @@
@Transactional(rollbackFor = Exception.class)
public Object placeDataHandle() {
// 查询所有的地址表和场所表差集集合
- List<DoorplateAddressEntity> list = baseMapper.getPlaceList();
+ List<DoorplateAddressEntity> list = baseMapper.getNotInPlaceList();
// 创建场所集合对象
List<PlaceEntity> placeList = new ArrayList<>();
if (list.size() > 0) {
@@ -846,14 +846,15 @@
one.setIsJur(1);
}
} else if (doorplateAddress.getRoleName().equals("民警")) {
+ // 无权限
+ one.setIsJur(2);
// 查询对应的社区code
list = communityService.getCommunityCodeListByUserId(AuthUtil.getUserId());
- boolean contains = list.contains(doorplateAddress.getNeiCode().replaceAll("0+$", ""));
- if (list.size() == 0 || !contains) {
- // 无权限
- one.setIsJur(2);
- } else {
- one.setIsJur(1);
+ if (null!=list && list.size()>0){
+ boolean contains = list.contains(one.getNeiCode());
+ if (contains) {
+ one.setIsJur(1);
+ }
}
} else {
// 不限制
@@ -893,4 +894,15 @@
}
return null;
}
+
+ /**
+ * 查询场所标准地址数据
+ * @param doorplateAddressVO
+ * @param size
+ * @return
+ */
+ @Override
+ public Object getPlaceList(DoorplateAddressVO doorplateAddressVO, Integer size) {
+ return baseMapper.getPlaceList(doorplateAddressVO,size);
+ }
}
diff --git a/src/main/java/org/springblade/modules/place/controller/PlaceCheckController.java b/src/main/java/org/springblade/modules/place/controller/PlaceCheckController.java
new file mode 100644
index 0000000..ab07052
--- /dev/null
+++ b/src/main/java/org/springblade/modules/place/controller/PlaceCheckController.java
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.place.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.secure.BladeUser;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.modules.place.entity.PlaceCheckEntity;
+import org.springblade.modules.place.vo.PlaceCheckVO;
+import org.springblade.modules.place.wrapper.PlaceCheckWrapper;
+import org.springblade.modules.place.service.IPlaceCheckService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 场所检查表 控制器
+ *
+ * @author BladeX
+ * @since 2024-01-27
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("blade-placeCheck/placeCheck")
+@Api(value = "场所检查表", tags = "场所检查表接口")
+public class PlaceCheckController{
+
+ private final IPlaceCheckService placeCheckService;
+
+ /**
+ * 场所检查表 详情
+ */
+ @GetMapping("/detail")
+ @ApiOperationSupport(order = 1)
+ @ApiOperation(value = "详情", notes = "传入placeCheck")
+ public R<PlaceCheckEntity> detail(PlaceCheckEntity placeCheck) {
+ PlaceCheckEntity detail = placeCheckService.getOne(Condition.getQueryWrapper(placeCheck));
+ return R.data(detail);
+ }
+ /**
+ * 场所检查表 分页
+ */
+ @GetMapping("/list")
+ @ApiOperationSupport(order = 2)
+ @ApiOperation(value = "分页", notes = "传入placeCheck")
+ public R<IPage<PlaceCheckVO>> list(PlaceCheckEntity placeCheck, Query query) {
+ IPage<PlaceCheckEntity> pages = placeCheckService.page(Condition.getPage(query), Condition.getQueryWrapper(placeCheck));
+ return R.data(PlaceCheckWrapper.build().pageVO(pages));
+ }
+
+ /**
+ * 场所检查表 自定义分页
+ */
+ @GetMapping("/page")
+ @ApiOperationSupport(order = 3)
+ @ApiOperation(value = "分页", notes = "传入placeCheck")
+ public R<IPage<PlaceCheckVO>> page(PlaceCheckVO placeCheck, Query query) {
+ IPage<PlaceCheckVO> pages = placeCheckService.selectPlaceCheckPage(Condition.getPage(query), placeCheck);
+ return R.data(pages);
+ }
+
+ /**
+ * 场所检查表 新增
+ */
+ @PostMapping("/save")
+ @ApiOperationSupport(order = 4)
+ @ApiOperation(value = "新增", notes = "传入placeCheck")
+ public R save(@Valid @RequestBody PlaceCheckEntity placeCheck) {
+ return R.status(placeCheckService.save(placeCheck));
+ }
+
+ /**
+ * 场所检查表 修改
+ */
+ @PostMapping("/update")
+ @ApiOperationSupport(order = 5)
+ @ApiOperation(value = "修改", notes = "传入placeCheck")
+ public R update(@Valid @RequestBody PlaceCheckEntity placeCheck) {
+ return R.status(placeCheckService.updateById(placeCheck));
+ }
+
+ /**
+ * 场所检查表 新增或修改
+ */
+ @PostMapping("/submit")
+ @ApiOperationSupport(order = 6)
+ @ApiOperation(value = "新增或修改", notes = "传入placeCheck")
+ public R submit(@Valid @RequestBody PlaceCheckEntity placeCheck) {
+ return R.status(placeCheckService.saveOrUpdate(placeCheck));
+ }
+
+ /**
+ * 场所检查表 删除
+ */
+ @PostMapping("/remove")
+ @ApiOperationSupport(order = 7)
+ @ApiOperation(value = "逻辑删除", notes = "传入ids")
+ public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+ return R.status(placeCheckService.removeByIds(Func.toLongList(ids)));
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/place/dto/PlaceCheckDTO.java b/src/main/java/org/springblade/modules/place/dto/PlaceCheckDTO.java
new file mode 100644
index 0000000..5935a20
--- /dev/null
+++ b/src/main/java/org/springblade/modules/place/dto/PlaceCheckDTO.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.place.dto;
+
+import org.springblade.modules.place.entity.PlaceCheckEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 场所检查表 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2024-01-27
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class PlaceCheckDTO extends PlaceCheckEntity {
+ private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/main/java/org/springblade/modules/place/entity/PlaceCheckEntity.java b/src/main/java/org/springblade/modules/place/entity/PlaceCheckEntity.java
new file mode 100644
index 0000000..0f82bcf
--- /dev/null
+++ b/src/main/java/org/springblade/modules/place/entity/PlaceCheckEntity.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.place.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import lombok.Data;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.tenant.mp.TenantEntity;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ * 场所检查表 实体类
+ *
+ * @author BladeX
+ * @since 2024-01-27
+ */
+@Data
+@TableName("jczz_place_check")
+@ApiModel(value = "PlaceCheck对象", description = "场所检查表")
+public class PlaceCheckEntity implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ @JsonSerialize(using = ToStringSerializer.class)
+ @ApiModelProperty("主键id")
+ @TableId(value = "id", type = IdType.ASSIGN_ID)
+ private Long id;
+
+ /**
+ * 门牌地址编码
+ */
+ @ApiModelProperty(value = "门牌地址编码")
+ private String houseCode;
+ /**
+ * 备注
+ */
+ @ApiModelProperty(value = "备注")
+ private String remark;
+ /**
+ * 照片
+ */
+ @ApiModelProperty(value = "照片")
+ private String imageUrls;
+ /**
+ * 签名路径
+ */
+ @ApiModelProperty(value = "签名路径")
+ private String signaturePath;
+
+ /**
+ * 创建人
+ */
+ @JsonSerialize(using = ToStringSerializer.class)
+ @ApiModelProperty("创建人")
+ @TableField(fill = FieldFill.INSERT)
+ private Long createUser;
+
+ /**
+ * 创建时间
+ */
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @ApiModelProperty("创建时间")
+ @TableField(fill = FieldFill.INSERT)
+ private Date createTime;
+
+ /**
+ * 是否删除
+ */
+ @TableLogic
+ @ApiModelProperty("是否已删除 0:否 1:是")
+ private Integer isDeleted;
+
+}
diff --git a/src/main/java/org/springblade/modules/place/mapper/PlaceCheckMapper.java b/src/main/java/org/springblade/modules/place/mapper/PlaceCheckMapper.java
new file mode 100644
index 0000000..ea74b3d
--- /dev/null
+++ b/src/main/java/org/springblade/modules/place/mapper/PlaceCheckMapper.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.place.mapper;
+
+import org.apache.ibatis.annotations.Param;
+import org.springblade.modules.place.entity.PlaceCheckEntity;
+import org.springblade.modules.place.vo.PlaceCheckVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 场所检查表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2024-01-27
+ */
+public interface PlaceCheckMapper extends BaseMapper<PlaceCheckEntity> {
+
+ /**
+ * 自定义分页
+ *
+ * @param page
+ * @param placeCheck
+ * @return
+ */
+ List<PlaceCheckVO> selectPlaceCheckPage(IPage page,
+ @Param("placeCheck") PlaceCheckVO placeCheck);
+
+
+}
diff --git a/src/main/java/org/springblade/modules/place/mapper/PlaceCheckMapper.xml b/src/main/java/org/springblade/modules/place/mapper/PlaceCheckMapper.xml
new file mode 100644
index 0000000..3626570
--- /dev/null
+++ b/src/main/java/org/springblade/modules/place/mapper/PlaceCheckMapper.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.modules.place.mapper.PlaceCheckMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="placeCheckResultMap" type="org.springblade.modules.place.entity.PlaceCheckEntity">
+ <result column="id" property="id"/>
+ <result column="house_code" property="houseCode"/>
+ <result column="remark" property="remark"/>
+ <result column="image_urls" property="imageUrls"/>
+ <result column="signature_path" property="signaturePath"/>
+ <result column="create_user" property="createUser"/>
+ <result column="create_time" property="createTime"/>
+ <result column="is_deleted" property="isDeleted"/>
+ </resultMap>
+
+ <!--自定义分页查询-->
+ <select id="selectPlaceCheckPage" resultMap="placeCheckResultMap">
+ select * from jczz_place_check where is_deleted = 0
+ <if test="placeCheck.houseCode!=null and placeCheck.houseCode!=''">
+ and house_code = #{placeCheck.houseCode}
+ </if>
+ <if test="placeCheck.startTime!=null and placeCheck.startTime!=''">
+ and date_format(create_time,'%Y-%m-%d') >= #{placeCheck.startTime}
+ </if>
+ <if test="placeCheck.endTime!=null and placeCheck.endTime!=''">
+ and date_format(create_time,'%Y-%m-%d') <= #{placeCheck.endTime}
+ </if>
+ </select>
+
+
+</mapper>
diff --git a/src/main/java/org/springblade/modules/place/service/IPlaceCheckService.java b/src/main/java/org/springblade/modules/place/service/IPlaceCheckService.java
new file mode 100644
index 0000000..afd1da1
--- /dev/null
+++ b/src/main/java/org/springblade/modules/place/service/IPlaceCheckService.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.place.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.modules.place.entity.PlaceCheckEntity;
+import org.springblade.modules.place.vo.PlaceCheckVO;
+import org.springblade.core.mp.base.BaseService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 场所检查表 服务类
+ *
+ * @author BladeX
+ * @since 2024-01-27
+ */
+public interface IPlaceCheckService extends IService<PlaceCheckEntity> {
+
+ /**
+ * 自定义分页
+ *
+ * @param page
+ * @param placeCheck
+ * @return
+ */
+ IPage<PlaceCheckVO> selectPlaceCheckPage(IPage<PlaceCheckVO> page, PlaceCheckVO placeCheck);
+
+
+}
diff --git a/src/main/java/org/springblade/modules/place/service/impl/PlaceCheckServiceImpl.java b/src/main/java/org/springblade/modules/place/service/impl/PlaceCheckServiceImpl.java
new file mode 100644
index 0000000..c33fdf7
--- /dev/null
+++ b/src/main/java/org/springblade/modules/place/service/impl/PlaceCheckServiceImpl.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.place.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.modules.place.entity.PlaceCheckEntity;
+import org.springblade.modules.place.vo.PlaceCheckVO;
+import org.springblade.modules.place.mapper.PlaceCheckMapper;
+import org.springblade.modules.place.service.IPlaceCheckService;
+import org.springblade.core.mp.base.BaseServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 场所检查表 服务实现类
+ *
+ * @author BladeX
+ * @since 2024-01-27
+ */
+@Service
+public class PlaceCheckServiceImpl extends ServiceImpl<PlaceCheckMapper, PlaceCheckEntity> implements IPlaceCheckService {
+
+ @Override
+ public IPage<PlaceCheckVO> selectPlaceCheckPage(IPage<PlaceCheckVO> page, PlaceCheckVO placeCheck) {
+ return page.setRecords(baseMapper.selectPlaceCheckPage(page, placeCheck));
+ }
+
+
+}
diff --git a/src/main/java/org/springblade/modules/place/vo/PlaceCheckVO.java b/src/main/java/org/springblade/modules/place/vo/PlaceCheckVO.java
new file mode 100644
index 0000000..dbcf011
--- /dev/null
+++ b/src/main/java/org/springblade/modules/place/vo/PlaceCheckVO.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.place.vo;
+
+import org.springblade.modules.place.entity.PlaceCheckEntity;
+import org.springblade.core.tool.node.INode;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 场所检查表 视图实体类
+ *
+ * @author BladeX
+ * @since 2024-01-27
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class PlaceCheckVO extends PlaceCheckEntity {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 开始时间
+ */
+ private String startTime;
+
+ /**
+ * 结束时间
+ */
+ private String endTime;
+
+}
diff --git a/src/main/java/org/springblade/modules/place/wrapper/PlaceCheckWrapper.java b/src/main/java/org/springblade/modules/place/wrapper/PlaceCheckWrapper.java
new file mode 100644
index 0000000..4d3c32d
--- /dev/null
+++ b/src/main/java/org/springblade/modules/place/wrapper/PlaceCheckWrapper.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * Neither the name of the dreamlu.net developer nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ * Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.modules.place.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.modules.place.entity.PlaceCheckEntity;
+import org.springblade.modules.place.vo.PlaceCheckVO;
+import java.util.Objects;
+
+/**
+ * 场所检查表 包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2024-01-27
+ */
+public class PlaceCheckWrapper extends BaseEntityWrapper<PlaceCheckEntity, PlaceCheckVO> {
+
+ public static PlaceCheckWrapper build() {
+ return new PlaceCheckWrapper();
+ }
+
+ @Override
+ public PlaceCheckVO entityVO(PlaceCheckEntity placeCheck) {
+ PlaceCheckVO placeCheckVO = Objects.requireNonNull(BeanUtil.copy(placeCheck, PlaceCheckVO.class));
+
+ //User createUser = UserCache.getUser(placeCheck.getCreateUser());
+ //User updateUser = UserCache.getUser(placeCheck.getUpdateUser());
+ //placeCheckVO.setCreateUserName(createUser.getName());
+ //placeCheckVO.setUpdateUserName(updateUser.getName());
+
+ return placeCheckVO;
+ }
+
+
+}
--
Gitblit v1.9.3