diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcPointNucleicMonitoringDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcPointNucleicMonitoringDTO.java new file mode 100644 index 0000000000..3a29fb0afc --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcPointNucleicMonitoringDTO.java @@ -0,0 +1,109 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 核酸监测点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-20 + */ +@Data +public class IcPointNucleicMonitoringDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 所属组织ID + */ + private String orgId; + + /** + * 所属组织名称 + */ + private String orgName; + + /** + * 组织ID上级 + */ + private String pid; + + /** + * 组织ID所有上级 + */ + private String pids; + + /** + * 核酸监测点名称 + */ + private String name; + + /** + * 服务时间 + */ + private String serveTime; + + /** + * 咨询电话 + */ + private String mobile; + + /** + * 监测点地址 + */ + private String address; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + + /** + * + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcPointVaccinesInoculationDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcPointVaccinesInoculationDTO.java new file mode 100644 index 0000000000..d1f397a84b --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcPointVaccinesInoculationDTO.java @@ -0,0 +1,134 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 疫苗接种点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-20 + */ +@Data +public class IcPointVaccinesInoculationDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 所属组织ID + */ + private String orgId; + + /** + * 所属组织名称 + */ + private String orgName; + + /** + * 组织ID上级 + */ + private String pid; + + /** + * 组织ID所有上级 + */ + private String pids; + + /** + * 疫苗接种点名称 + */ + private String name; + + /** + * 接种日期 + */ + private String inoculationDate; + + /** + * 接种上午开始时间 + */ + private String moStartTime; + + /** + * 接种上午结束时间 + */ + private String moEndTime; + + /** + * 接种下午开始时间 + */ + private String afStartTime; + + /** + * 接种下午结束时间 + */ + private String afEndTime; + + /** + * 暂无疫苗(1:是;2:否) + */ + private Integer noAvailableVaccines; + + /** + * 咨询电话 + */ + private String mobile; + + /** + * 接种点地址 + */ + private String address; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + + /** + * + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcPointNucleicMonitoringController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcPointNucleicMonitoringController.java new file mode 100644 index 0000000000..4b97c98389 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcPointNucleicMonitoringController.java @@ -0,0 +1,82 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.IcPointNucleicMonitoringDTO; +import com.epmet.excel.IcPointNucleicMonitoringExcel; +import com.epmet.service.IcPointNucleicMonitoringService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 核酸监测点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-20 + */ +@RestController +@RequestMapping("icPointNucleicMonitoring") +public class IcPointNucleicMonitoringController { + + @Autowired + private IcPointNucleicMonitoringService icPointNucleicMonitoringService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icPointNucleicMonitoringService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + IcPointNucleicMonitoringDTO data = icPointNucleicMonitoringService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody IcPointNucleicMonitoringDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icPointNucleicMonitoringService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PutMapping("update") + public Result update(@RequestBody IcPointNucleicMonitoringDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icPointNucleicMonitoringService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icPointNucleicMonitoringService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = icPointNucleicMonitoringService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcPointNucleicMonitoringExcel.class); + } + + + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcPointVaccinesInoculationController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcPointVaccinesInoculationController.java new file mode 100644 index 0000000000..79e71f1dd8 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcPointVaccinesInoculationController.java @@ -0,0 +1,82 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.aop.NoRepeatSubmit; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.IcPointVaccinesInoculationDTO; +import com.epmet.excel.IcPointVaccinesInoculationExcel; +import com.epmet.service.IcPointVaccinesInoculationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 疫苗接种点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-20 + */ +@RestController +@RequestMapping("icPointVaccinesInoculation") +public class IcPointVaccinesInoculationController { + + @Autowired + private IcPointVaccinesInoculationService icPointVaccinesInoculationService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icPointVaccinesInoculationService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + IcPointVaccinesInoculationDTO data = icPointVaccinesInoculationService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody IcPointVaccinesInoculationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icPointVaccinesInoculationService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PutMapping("update") + public Result update(@RequestBody IcPointVaccinesInoculationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icPointVaccinesInoculationService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icPointVaccinesInoculationService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = icPointVaccinesInoculationService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcPointVaccinesInoculationExcel.class); + } + + + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcPointNucleicMonitoringDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcPointNucleicMonitoringDao.java new file mode 100644 index 0000000000..5621b19449 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcPointNucleicMonitoringDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcPointNucleicMonitoringEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 核酸监测点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-20 + */ +@Mapper +public interface IcPointNucleicMonitoringDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcPointVaccinesInoculationDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcPointVaccinesInoculationDao.java new file mode 100644 index 0000000000..4541f80cde --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcPointVaccinesInoculationDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcPointVaccinesInoculationEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 疫苗接种点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-20 + */ +@Mapper +public interface IcPointVaccinesInoculationDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcPointNucleicMonitoringEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcPointNucleicMonitoringEntity.java new file mode 100644 index 0000000000..4a05b5d850 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcPointNucleicMonitoringEntity.java @@ -0,0 +1,79 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 核酸监测点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_point_nucleic_monitoring") +public class IcPointNucleicMonitoringEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 所属组织ID + */ + private String orgId; + + /** + * 所属组织名称 + */ + private String orgName; + + /** + * 组织ID上级 + */ + private String pid; + + /** + * 组织ID所有上级 + */ + private String pids; + + /** + * 核酸监测点名称 + */ + private String name; + + /** + * 服务时间 + */ + private String serveTime; + + /** + * 咨询电话 + */ + private String mobile; + + /** + * 监测点地址 + */ + private String address; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcPointVaccinesInoculationEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcPointVaccinesInoculationEntity.java new file mode 100644 index 0000000000..c08d24575f --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcPointVaccinesInoculationEntity.java @@ -0,0 +1,104 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 疫苗接种点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-20 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_point_vaccines_inoculation") +public class IcPointVaccinesInoculationEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 所属组织ID + */ + private String orgId; + + /** + * 所属组织名称 + */ + private String orgName; + + /** + * 组织ID上级 + */ + private String pid; + + /** + * 组织ID所有上级 + */ + private String pids; + + /** + * 疫苗接种点名称 + */ + private String name; + + /** + * 接种日期 + */ + private String inoculationDate; + + /** + * 接种上午开始时间 + */ + private String moStartTime; + + /** + * 接种上午结束时间 + */ + private String moEndTime; + + /** + * 接种下午开始时间 + */ + private String afStartTime; + + /** + * 接种下午结束时间 + */ + private String afEndTime; + + /** + * 暂无疫苗(1:是;2:否) + */ + private Integer noAvailableVaccines; + + /** + * 咨询电话 + */ + private String mobile; + + /** + * 接种点地址 + */ + private String address; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcPointNucleicMonitoringExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcPointNucleicMonitoringExcel.java new file mode 100644 index 0000000000..15dba9f57a --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcPointNucleicMonitoringExcel.java @@ -0,0 +1,72 @@ +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 核酸监测点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-20 + */ +@Data +public class IcPointNucleicMonitoringExcel { + + @Excel(name = "ID") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "所属组织ID") + private String orgId; + + @Excel(name = "所属组织名称") + private String orgName; + + @Excel(name = "组织ID上级") + private String pid; + + @Excel(name = "组织ID所有上级") + private String pids; + + @Excel(name = "核酸监测点名称") + private String name; + + @Excel(name = "服务时间") + private String serveTime; + + @Excel(name = "咨询电话") + private String mobile; + + @Excel(name = "监测点地址") + private String address; + + @Excel(name = "经度") + private String longitude; + + @Excel(name = "纬度") + private String latitude; + + @Excel(name = "") + private Integer delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcPointVaccinesInoculationExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcPointVaccinesInoculationExcel.java new file mode 100644 index 0000000000..08bbb31df3 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcPointVaccinesInoculationExcel.java @@ -0,0 +1,87 @@ +package com.epmet.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 疫苗接种点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-20 + */ +@Data +public class IcPointVaccinesInoculationExcel { + + @Excel(name = "ID") + private String id; + + @Excel(name = "客户ID") + private String customerId; + + @Excel(name = "所属组织ID") + private String orgId; + + @Excel(name = "所属组织名称") + private String orgName; + + @Excel(name = "组织ID上级") + private String pid; + + @Excel(name = "组织ID所有上级") + private String pids; + + @Excel(name = "疫苗接种点名称") + private String name; + + @Excel(name = "接种日期") + private String inoculationDate; + + @Excel(name = "接种上午开始时间") + private String moStartTime; + + @Excel(name = "接种上午结束时间") + private String moEndTime; + + @Excel(name = "接种下午开始时间") + private String afStartTime; + + @Excel(name = "接种下午结束时间") + private String afEndTime; + + @Excel(name = "暂无疫苗(1:是;2:否)") + private Integer noAvailableVaccines; + + @Excel(name = "咨询电话") + private String mobile; + + @Excel(name = "接种点地址") + private String address; + + @Excel(name = "经度") + private String longitude; + + @Excel(name = "纬度") + private String latitude; + + @Excel(name = "") + private Integer delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/IcPointNucleicMonitoringRedis.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/IcPointNucleicMonitoringRedis.java new file mode 100644 index 0000000000..2ad1347ab1 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/IcPointNucleicMonitoringRedis.java @@ -0,0 +1,30 @@ +package com.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 核酸监测点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-20 + */ +@Component +public class IcPointNucleicMonitoringRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/IcPointVaccinesInoculationRedis.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/IcPointVaccinesInoculationRedis.java new file mode 100644 index 0000000000..ed32ef375f --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/IcPointVaccinesInoculationRedis.java @@ -0,0 +1,30 @@ +package com.epmet.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 疫苗接种点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-20 + */ +@Component +public class IcPointVaccinesInoculationRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcPointNucleicMonitoringService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcPointNucleicMonitoringService.java new file mode 100644 index 0000000000..5cde04efe2 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcPointNucleicMonitoringService.java @@ -0,0 +1,78 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcPointNucleicMonitoringDTO; +import com.epmet.entity.IcPointNucleicMonitoringEntity; + +import java.util.List; +import java.util.Map; + +/** + * 核酸监测点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-20 + */ +public interface IcPointNucleicMonitoringService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-06-20 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-06-20 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcPointNucleicMonitoringDTO + * @author generator + * @date 2022-06-20 + */ + IcPointNucleicMonitoringDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-20 + */ + void save(IcPointNucleicMonitoringDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-20 + */ + void update(IcPointNucleicMonitoringDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-20 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcPointVaccinesInoculationService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcPointVaccinesInoculationService.java new file mode 100644 index 0000000000..f9bd63cc05 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcPointVaccinesInoculationService.java @@ -0,0 +1,78 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcPointVaccinesInoculationDTO; +import com.epmet.entity.IcPointVaccinesInoculationEntity; + +import java.util.List; +import java.util.Map; + +/** + * 疫苗接种点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-20 + */ +public interface IcPointVaccinesInoculationService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-06-20 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-06-20 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcPointVaccinesInoculationDTO + * @author generator + * @date 2022-06-20 + */ + IcPointVaccinesInoculationDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-20 + */ + void save(IcPointVaccinesInoculationDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-06-20 + */ + void update(IcPointVaccinesInoculationDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-06-20 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcPointNucleicMonitoringServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcPointNucleicMonitoringServiceImpl.java new file mode 100644 index 0000000000..90707250fd --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcPointNucleicMonitoringServiceImpl.java @@ -0,0 +1,87 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.IcPointNucleicMonitoringDao; +import com.epmet.dto.IcPointNucleicMonitoringDTO; +import com.epmet.entity.IcPointNucleicMonitoringEntity; +import com.epmet.redis.IcPointNucleicMonitoringRedis; +import com.epmet.service.IcPointNucleicMonitoringService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 核酸监测点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-20 + */ +@Service +public class IcPointNucleicMonitoringServiceImpl extends BaseServiceImpl implements IcPointNucleicMonitoringService { + + @Autowired + private IcPointNucleicMonitoringRedis icPointNucleicMonitoringRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcPointNucleicMonitoringDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcPointNucleicMonitoringDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public IcPointNucleicMonitoringDTO get(String id) { + IcPointNucleicMonitoringEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcPointNucleicMonitoringDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcPointNucleicMonitoringDTO dto) { + IcPointNucleicMonitoringEntity entity = ConvertUtils.sourceToTarget(dto, IcPointNucleicMonitoringEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcPointNucleicMonitoringDTO dto) { + IcPointNucleicMonitoringEntity entity = ConvertUtils.sourceToTarget(dto, IcPointNucleicMonitoringEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcPointVaccinesInoculationServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcPointVaccinesInoculationServiceImpl.java new file mode 100644 index 0000000000..1d5dca7b45 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcPointVaccinesInoculationServiceImpl.java @@ -0,0 +1,87 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.IcPointVaccinesInoculationDao; +import com.epmet.dto.IcPointVaccinesInoculationDTO; +import com.epmet.entity.IcPointVaccinesInoculationEntity; +import com.epmet.redis.IcPointVaccinesInoculationRedis; +import com.epmet.service.IcPointVaccinesInoculationService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 疫苗接种点 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-06-20 + */ +@Service +public class IcPointVaccinesInoculationServiceImpl extends BaseServiceImpl implements IcPointVaccinesInoculationService { + + @Autowired + private IcPointVaccinesInoculationRedis icPointVaccinesInoculationRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcPointVaccinesInoculationDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcPointVaccinesInoculationDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public IcPointVaccinesInoculationDTO get(String id) { + IcPointVaccinesInoculationEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcPointVaccinesInoculationDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcPointVaccinesInoculationDTO dto) { + IcPointVaccinesInoculationEntity entity = ConvertUtils.sourceToTarget(dto, IcPointVaccinesInoculationEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcPointVaccinesInoculationDTO dto) { + IcPointVaccinesInoculationEntity entity = ConvertUtils.sourceToTarget(dto, IcPointVaccinesInoculationEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcPointNucleicMonitoringDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcPointNucleicMonitoringDao.xml new file mode 100644 index 0000000000..e3c97b3342 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcPointNucleicMonitoringDao.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcPointVaccinesInoculationDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcPointVaccinesInoculationDao.xml new file mode 100644 index 0000000000..4d9d2fa764 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcPointVaccinesInoculationDao.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file