diff --git a/epmet-cloud-generator/src/main/resources/template/index.vue.vm b/epmet-cloud-generator/src/main/resources/template/index.vue.vm index aa5bcb3494..9b3ba8bee8 100644 --- a/epmet-cloud-generator/src/main/resources/template/index.vue.vm +++ b/epmet-cloud-generator/src/main/resources/template/index.vue.vm @@ -1,52 +1,52 @@ + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataOrgChangeEventListener.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataOrgChangeEventListener.java index d1b1bf0912..654246351c 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataOrgChangeEventListener.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataOrgChangeEventListener.java @@ -6,7 +6,6 @@ import com.epmet.commons.rocketmq.messages.OrgOrStaffMQMsg; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.distributedlock.DistributedLock; import com.epmet.commons.tools.exception.ExceptionUtils; -import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.utils.SpringContextUtils; @@ -106,12 +105,9 @@ public class OpenDataOrgChangeEventListener implements MessageListenerConcurrent SpringContextUtils.getBean(GridInfoPingyinService.class).exractGrid(extractFormDto); } - } catch (RenException e) { - // 如果是我们手动抛出的异常,说明在业务可控范围内。目前不需要MQ重试 - logger.error("【开放数据事件监听器】-组织信息变更-同步信息到中间库失败:".concat(ExceptionUtils.getErrorStackTrace(e))); } catch (Exception e) { // 不是我们自己抛出的异常,可以让MQ重试 - logger.error("【开放数据事件监听器】-组织信息变更-同步信息到中间库失败:".concat(ExceptionUtils.getErrorStackTrace(e))); + logger.warn("【开放数据事件监听器】-组织信息变更-同步信息到中间库失败:".concat(ExceptionUtils.getErrorStackTrace(e))); throw e; } finally { distributedLock.unLock(lock); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java index 5c3bbb4404..44ac2386a5 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataPatrolChangeEventListener.java @@ -9,7 +9,6 @@ import com.epmet.commons.tools.distributedlock.DistributedLock; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.ExceptionUtils; -import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.utils.SpringContextUtils; @@ -109,12 +108,9 @@ public class OpenDataPatrolChangeEventListener implements MessageListenerConcurr throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"消费失败!"); } - } catch (RenException e) { - // 如果是我们手动抛出的异常,说明在业务可控范围内。目前不需要MQ重试 - logger.error("【开放数据事件监听器】-巡查记录信息变更-失败:".concat(ExceptionUtils.getErrorStackTrace(e))); } catch (Exception e) { // 不是我们自己抛出的异常,可以让MQ重试 - logger.error("【开放数据事件监听器】-巡查记录信息变更-失败:".concat(ExceptionUtils.getErrorStackTrace(e))); + logger.warn("【开放数据事件监听器】-巡查记录信息变更-失败:".concat(ExceptionUtils.getErrorStackTrace(e))); throw e; } finally { distributedLock.unLock(lock); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataProjectChangeEventListener.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataProjectChangeEventListener.java index 1912fc95a3..77697c2a2f 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataProjectChangeEventListener.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataProjectChangeEventListener.java @@ -5,7 +5,6 @@ import com.epmet.commons.rocketmq.constants.MQUserPropertys; import com.epmet.commons.rocketmq.messages.DisputeProcessMQMsg; import com.epmet.commons.tools.distributedlock.DistributedLock; import com.epmet.commons.tools.exception.ExceptionUtils; -import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.utils.ConvertUtils; @@ -77,12 +76,9 @@ public class OpenDataProjectChangeEventListener implements MessageListenerConcur 30L, 30L, TimeUnit.SECONDS); //SpringContextUtils.getBean(BaseDisputeProcessService.class).getEventinfo(formDTO); SpringContextUtils.getBean(EventreportPingyinService.class).getEventInfo(formDTO); - } catch (RenException e) { - // 如果是我们手动抛出的异常,说明在业务可控范围内。目前不需要MQ重试 - logger.error("【开放数据事件监听器】-项目信息变更-上报项目信息失败:".concat(ExceptionUtils.getErrorStackTrace(e))); } catch (Exception e) { // 不是我们自己抛出的异常,可以让MQ重试 - logger.error("【开放数据事件监听器】-项目信息变更-上报项目信息失败:".concat(ExceptionUtils.getErrorStackTrace(e))); + logger.warn("【开放数据事件监听器】-项目信息变更-上报项目信息失败:".concat(ExceptionUtils.getErrorStackTrace(e))); throw e; } finally { distributedLock.unLock(lock); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataStaffChangeEventListener.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataStaffChangeEventListener.java index b2d9bd4976..1cf3a8f688 100644 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataStaffChangeEventListener.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/mq/listener/OpenDataStaffChangeEventListener.java @@ -6,12 +6,10 @@ import com.epmet.commons.rocketmq.messages.OrgOrStaffMQMsg; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.distributedlock.DistributedLock; import com.epmet.commons.tools.exception.ExceptionUtils; -import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.redis.RedisKeys; import com.epmet.commons.tools.redis.RedisUtils; import com.epmet.commons.tools.utils.SpringContextUtils; import com.epmet.opendata.dto.form.StaffBaseInfoFormDTO; -import com.epmet.opendata.service.ExUserService; import com.epmet.opendata.service.GridstaffInfoPingyinService; import org.apache.commons.lang3.StringUtils; import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext; @@ -22,7 +20,6 @@ import org.redisson.api.RLock; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; @@ -90,12 +87,9 @@ public class OpenDataStaffChangeEventListener implements MessageListenerConcurre SpringContextUtils.getBean(ExUserService.class).getStaffBaseInfo(dto);*/ dto.setStaffIdList(obj.getStaffIdList()); SpringContextUtils.getBean(GridstaffInfoPingyinService.class).getStaffBaseInfo(dto); - } catch (RenException e) { - // 如果是我们手动抛出的异常,说明在业务可控范围内。目前不需要MQ重试 - logger.error("【开放数据事件监听器】-工作人员信息变更-初始化客户组织失败:".concat(ExceptionUtils.getErrorStackTrace(e))); } catch (Exception e) { // 不是我们自己抛出的异常,可以让MQ重试 - logger.error("【开放数据事件监听器】-工作人员信息变更-初始化客户组织失败:".concat(ExceptionUtils.getErrorStackTrace(e))); + logger.warn("【开放数据事件监听器】-工作人员信息变更-初始化客户组织失败:".concat(ExceptionUtils.getErrorStackTrace(e))); throw e; } finally { distributedLock.unLock(lock); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java index 0fe4ff1620..624b89cfbb 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/EventreportPingyinServiceImpl.java @@ -21,7 +21,6 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; -import java.util.Date; import java.util.List; import java.util.stream.Collectors; @@ -135,7 +134,7 @@ public class EventreportPingyinServiceImpl extends BaseServiceImpl 10) { entity.setLat(new BigDecimal(ag.getLatitude().substring(0, 10))); } else { @@ -256,7 +255,7 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl updateWrapper = new LambdaUpdateWrapper<>(); updateWrapper.eq(GridInfoPingyinEntity::getGridCode,formDTO.getOldCode()); int update = baseDao.update(gridInfoEntity, updateWrapper); @@ -265,7 +264,7 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl staffInfoWrapper = new LambdaUpdateWrapper<>(); staffInfoWrapper.eq(GridstaffInfoPingyinEntity::getGridCode,formDTO.getOldCode()); @@ -274,7 +273,7 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl workInfoWrapper = new LambdaUpdateWrapper<>(); workInfoWrapper.eq(GridstaffWorkInfoPingyinEntity::getGridCode,formDTO.getOldCode()); @@ -283,7 +282,7 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl eventWrapper = new LambdaUpdateWrapper<>(); eventWrapper.eq(EventreportPingyinEntity::getGridCode,formDTO.getOldCode()); diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java index cb81df537d..34ea9c0da5 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridstaffInfoPingyinServiceImpl.java @@ -26,7 +26,6 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; -import java.util.Date; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -138,7 +137,7 @@ public class GridstaffInfoPingyinServiceImpl extends BaseServiceImpl { + if (StringUtils.isBlank(d.getGridId())){ + log.warn("data is null string:{}",JSON.toJSONString(d)); + return; + } GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(d.getGridId()); if (null == gridInfo) { log.warn("未查询到网格信息:" + d.getGridId()); @@ -131,7 +135,7 @@ public class GridstaffWorkInfoPingyinServiceImpl extends BaseServiceImpl - DELETE FROM eventreport_pingyin + update eventreport_pingyin SET is_del = 'Y' - \ No newline at end of file + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml index c2eeb0baa9..9bbb6ca663 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml @@ -4,12 +4,12 @@ - delete from grid_info_pingyin where grid_level !='07' + update grid_info_pingyin set is_del = 'Y' where grid_level !='07' - delete from grid_info_pingyin where grid_level ='07' + update grid_info_pingyin set is_del = 'Y' where grid_level ='07' @@ -35,4 +35,4 @@ LIMIT 1 - \ No newline at end of file + diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffWorkInfoPingyinDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffWorkInfoPingyinDao.xml index ea3bc11030..0cba8e6cf6 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffWorkInfoPingyinDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridstaffWorkInfoPingyinDao.xml @@ -19,8 +19,8 @@ - delete from gridstaff_work_info_pingyin LIMIT 1000 + update gridstaff_work_info_pingyin SET is_del = 'Y' LIMIT 1000 - \ No newline at end of file + diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcVaccinePrarmeterDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcVaccinePrarmeterDTO.java new file mode 100644 index 0000000000..08c5da3ce1 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcVaccinePrarmeterDTO.java @@ -0,0 +1,184 @@ +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-08-22 + */ +@Data +public class IcVaccinePrarmeterDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户Id customer.id + */ + private String customerId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 组织Id + */ + private String agencyId; + + /** + * 组织的pids + */ + private String pids; + + /** + * 所属小区ID; + */ + private String villageId; + + /** + * 所属小区名称 + */ + private String villageName; + + /** + * 所属楼宇Id + */ + private String buildId; + + /** + * 所属楼宇名称 + */ + private String buildName; + + /** + * 单元id + */ + private String unitId; + + /** + * 单元名 + */ + private String unitName; + + /** + * 所属家庭Id + */ + private String homeId; + + /** + * 房间名 + */ + private String homeName; + + /** + * 户口性质:0户籍 1外来 + */ + private String householdType; + + /** + * 姓名 + */ + private String name; + + /** + * 联系电话 + */ + private String mobile; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 是否接种:0否1是 + */ + private String isVaccination; + + /** + * 第一次接种时间 + */ + private String firstVacTime; + + /** + * 第一次接种地点 + */ + private String firstVacSite; + + /** + * 第二次接种时间 + */ + private String secondVacTime; + + /** + * 第二次接种地点 + */ + private String secondVacSite; + + /** + * 第三次接种时间 + */ + private String thirdVacTime; + + /** + * 第三次接种地点 + */ + private String thirdVacSite; + + /** + * 原因:禁忌症/拒绝接种/其他原因 + */ + private String reason; + + /** + * 备注 + */ + private String note; + + /** + * 删除标识 0.未删除 1.已删除 + */ + 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/form/VisitListFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VisitListFormDTO.java index 09ca9bf294..4ec572ad88 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VisitListFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VisitListFormDTO.java @@ -23,4 +23,18 @@ public class VisitListFormDTO extends PageFormDTO { private String orgId; + private String idCard; + + private String name; + + private String villageId; + + private String buildId; + + private String unitId; + + private String homeId; + + private String mobile; + } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VisitVisitorChartFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VisitVisitorChartFormDTO.java new file mode 100644 index 0000000000..aee3bdb042 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VisitVisitorChartFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 租客表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-26 + */ +@Data +public class VisitVisitorChartFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 时间 + */ + private String date; + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VisitorInfoFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VisitorInfoFormDTO.java new file mode 100644 index 0000000000..4c1467a774 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/VisitorInfoFormDTO.java @@ -0,0 +1,14 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class VisitorInfoFormDTO implements Serializable { + + private String userId; + + private String customerId; + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VisitVisitorChartResultDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VisitVisitorChartResultDTO.java new file mode 100644 index 0000000000..7836d3a866 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/VisitVisitorChartResultDTO.java @@ -0,0 +1,30 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 租客表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-07-26 + */ +@Data +public class VisitVisitorChartResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 时间 + */ + private String hour; + + /** + * 数量 + */ + private String num; + + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiCollectVisitorController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiCollectVisitorController.java index 60995a0211..2019de84d1 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiCollectVisitorController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiCollectVisitorController.java @@ -1,7 +1,6 @@ package com.epmet.controller; import com.epmet.commons.tools.annotation.LoginUser; -import com.epmet.commons.tools.annotation.MaskResponse; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; @@ -14,10 +13,8 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.IcResiCollectVisitorDTO; import com.epmet.dto.SaveCollectVisitorFormDTO; -import com.epmet.dto.form.CollectDetailFormDTO; -import com.epmet.dto.form.CollectListFormDTO; -import com.epmet.dto.form.VisitListFormDTO; -import com.epmet.dto.result.CollectListResultDTO; +import com.epmet.dto.form.*; +import com.epmet.dto.result.VisitVisitorChartResultDTO; import com.epmet.excel.IcResiCollectVisitorExcel; import com.epmet.service.IcResiCollectVisitorService; import org.springframework.beans.factory.annotation.Autowired; @@ -42,7 +39,7 @@ public class IcResiCollectVisitorController { private IcResiCollectVisitorService icResiCollectVisitorService; @RequestMapping("page") - public Result> page(@RequestParam Map params){ + public Result> page(@RequestParam Map params) { // PageData page = icResiCollectVisitorService.page(params); PageData page = icResiCollectVisitorService.getPhrasePage(params); return new Result>().ok(page); @@ -52,6 +49,7 @@ public class IcResiCollectVisitorController { /** * Desc: 访客记录列表 + * * @param formDTO * @param tokenDto * @author wgf @@ -60,22 +58,22 @@ public class IcResiCollectVisitorController { @PostMapping("list") // @MaskResponse(fieldNames = { "memberIdNum", "memberMobile" }, // fieldsMaskType = { MaskResponse.MASK_TYPE_ID_CARD, MaskResponse.MASK_TYPE_MOBILE }) - public Result> getVisitorList(@RequestBody VisitListFormDTO formDTO, @LoginUser TokenDto tokenDto){ - ValidatorUtils.validateEntity(formDTO,CollectListFormDTO.CollectListForm.class); + public Result> getVisitorList(@RequestBody VisitListFormDTO formDTO, @LoginUser TokenDto tokenDto) { + ValidatorUtils.validateEntity(formDTO, CollectListFormDTO.CollectListForm.class); formDTO.setUserId(tokenDto.getUserId()); formDTO.setCustomerId(tokenDto.getCustomerId()); return new Result>().ok(icResiCollectVisitorService.getVisitorList(formDTO)); } - @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) - public Result get(@PathVariable("id") String id){ + @RequestMapping(value = "{id}", method = {RequestMethod.POST, RequestMethod.GET}) + public Result get(@PathVariable("id") String id) { IcResiCollectVisitorDTO data = icResiCollectVisitorService.get(id); return new Result().ok(data); } @NoRepeatSubmit @PostMapping("save") - public Result save(@RequestBody IcResiCollectVisitorDTO dto){ + public Result save(@RequestBody IcResiCollectVisitorDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); icResiCollectVisitorService.save(dto); @@ -84,7 +82,7 @@ public class IcResiCollectVisitorController { @NoRepeatSubmit @PostMapping("update") - public Result update(@RequestBody IcResiCollectVisitorDTO dto){ + public Result update(@RequestBody IcResiCollectVisitorDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); icResiCollectVisitorService.update(dto); @@ -92,7 +90,7 @@ public class IcResiCollectVisitorController { } @PostMapping("delete") - public Result delete(@RequestBody String[] ids){ + public Result delete(@RequestBody String[] ids) { //效验数据 AssertUtils.isArrayEmpty(ids, "id"); icResiCollectVisitorService.delete(ids); @@ -106,32 +104,62 @@ public class IcResiCollectVisitorController { } /** - * @describe: 保存访客信息 - * @author wangtong - * @date 2022/8/3 10:33 - * @params [dto] - * @return com.epmet.commons.tools.utils.Result - */ + * @return com.epmet.commons.tools.utils.Result + * @describe: 保存访客信息 + * @author wangtong + * @date 2022/8/3 10:33 + * @params [dto] + */ @NoRepeatSubmit @PostMapping("saveInfo") - public Result saveInfo(@RequestBody SaveCollectVisitorFormDTO dto){ + public Result saveInfo(@RequestBody SaveCollectVisitorFormDTO dto) { //效验数据 ValidatorUtils.validateEntity(dto); return icResiCollectVisitorService.saveInfo(dto); } /** - * @describe: 访客信息详情 - * @author wangtong - * @date 2022/8/3 15:41 - * @params [dto] - * @return com.epmet.commons.tools.utils.Result - */ + * @return com.epmet.commons.tools.utils.Result + * @describe: 访客信息详情 + * @author wangtong + * @date 2022/8/3 15:41 + * @params [dto] + */ @PostMapping("getVisitorDetail") public Result getVisitorDetail(@RequestBody CollectDetailFormDTO dto) { ValidatorUtils.validateEntity(dto); return icResiCollectVisitorService.getVisitorDetail(dto); } + /** + * 登陆访客用户信息 + * + * @param tokenDto + * @param dto + * @return com.epmet.commons.tools.utils.Result + * @author zhy + * @date 2022/8/19 15:24 + */ + @PostMapping("visitorinfo") + public Result getVisitorInfo(@LoginUser TokenDto tokenDto, @RequestBody VisitorInfoFormDTO dto) { + ValidatorUtils.validateEntity(dto); + return icResiCollectVisitorService.getVisitorInfo(tokenDto, dto); + } + + /** + * 访客折线图 + * + * @param dto + * @return com.epmet.commons.tools.utils.Result> + * @author zhy + * @date 2022/8/22 9:56 + */ + @NoRepeatSubmit + @PostMapping("chart/traffic") + public Result> getTraffic(@RequestBody VisitVisitorChartFormDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + return new Result>().ok(icResiCollectVisitorService.getTraffic(dto)); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccinePrarmeterController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccinePrarmeterController.java new file mode 100644 index 0000000000..102e5e0ea7 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcVaccinePrarmeterController.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.IcVaccinePrarmeterDTO; +import com.epmet.excel.IcVaccinePrarmeterExcel; +import com.epmet.service.IcVaccinePrarmeterService; +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-08-22 + */ +@RestController +@RequestMapping("icVaccinePrarmeter") +public class IcVaccinePrarmeterController { + + @Autowired + private IcVaccinePrarmeterService icVaccinePrarmeterService; + + @RequestMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = icVaccinePrarmeterService.page(params); + return new Result>().ok(page); + } + + @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) + public Result get(@PathVariable("id") String id){ + IcVaccinePrarmeterDTO data = icVaccinePrarmeterService.get(id); + return new Result().ok(data); + } + + @NoRepeatSubmit + @PostMapping("save") + public Result save(@RequestBody IcVaccinePrarmeterDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icVaccinePrarmeterService.save(dto); + return new Result(); + } + + @NoRepeatSubmit + @PutMapping("update") + public Result update(@RequestBody IcVaccinePrarmeterDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icVaccinePrarmeterService.update(dto); + return new Result(); + } + + @PostMapping("delete") + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + icVaccinePrarmeterService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = icVaccinePrarmeterService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, IcVaccinePrarmeterExcel.class); + } + + + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiCollectVisitorDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiCollectVisitorDao.java index acf3fe568c..f4ef4e0178 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiCollectVisitorDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiCollectVisitorDao.java @@ -2,9 +2,10 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.IcResiCollectVisitorDTO; -import com.epmet.dto.form.CollectListFormDTO; import com.epmet.dto.form.VisitListFormDTO; -import com.epmet.dto.result.CollectListResultDTO; +import com.epmet.dto.form.VisitVisitorChartFormDTO; +import com.epmet.dto.form.VisitorInfoFormDTO; +import com.epmet.dto.result.VisitVisitorChartResultDTO; import com.epmet.entity.IcResiCollectVisitorEntity; import org.apache.ibatis.annotations.Mapper; @@ -22,6 +23,7 @@ public interface IcResiCollectVisitorDao extends BaseDao getCollectList(VisitListFormDTO formDTO); + /** + * 最新一条访客信息 + * + * @param formDTO + * @return com.epmet.entity.IcResiCollectVisitorEntity + * @author zhy + * @date 2022/8/19 15:33 + */ + IcResiCollectVisitorEntity getLastInfo(VisitorInfoFormDTO formDTO); + + /** + * 人流量 + * + * @param dto + * @return void + * @author generator + * @date 2022-07-26 + */ + List getTraffic(VisitVisitorChartFormDTO dto); + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVaccinePrarmeterDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVaccinePrarmeterDao.java new file mode 100644 index 0000000000..a2e7c17a67 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcVaccinePrarmeterDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcVaccinePrarmeterEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 新冠病毒疫苗接种人员信息台账 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-08-22 + */ +@Mapper +public interface IcVaccinePrarmeterDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcVaccinePrarmeterEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcVaccinePrarmeterEntity.java new file mode 100644 index 0000000000..c5dde0c103 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcVaccinePrarmeterEntity.java @@ -0,0 +1,154 @@ +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-08-22 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_vaccine_prarmeter") +public class IcVaccinePrarmeterEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id customer.id + */ + private String customerId; + + /** + * 网格ID + */ + private String gridId; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 组织Id + */ + private String agencyId; + + /** + * 组织的pids + */ + private String pids; + + /** + * 所属小区ID; + */ + private String villageId; + + /** + * 所属小区名称 + */ + private String villageName; + + /** + * 所属楼宇Id + */ + private String buildId; + + /** + * 所属楼宇名称 + */ + private String buildName; + + /** + * 单元id + */ + private String unitId; + + /** + * 单元名 + */ + private String unitName; + + /** + * 所属家庭Id + */ + private String homeId; + + /** + * 房间名 + */ + private String homeName; + + /** + * 户口性质:0户籍 1外来 + */ + private String householdType; + + /** + * 姓名 + */ + private String name; + + /** + * 联系电话 + */ + private String mobile; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 是否接种:0否1是 + */ + private String isVaccination; + + /** + * 第一次接种时间 + */ + private String firstVacTime; + + /** + * 第一次接种地点 + */ + private String firstVacSite; + + /** + * 第二次接种时间 + */ + private String secondVacTime; + + /** + * 第二次接种地点 + */ + private String secondVacSite; + + /** + * 第三次接种时间 + */ + private String thirdVacTime; + + /** + * 第三次接种地点 + */ + private String thirdVacSite; + + /** + * 原因:禁忌症/拒绝接种/其他原因 + */ + private String reason; + + /** + * 备注 + */ + private String note; + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcVaccinePrarmeterExcel.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcVaccinePrarmeterExcel.java new file mode 100644 index 0000000000..dc58b059b3 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/excel/IcVaccinePrarmeterExcel.java @@ -0,0 +1,117 @@ +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-08-22 + */ +@Data +public class IcVaccinePrarmeterExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户Id customer.id") + private String customerId; + + @Excel(name = "网格ID") + private String gridId; + + @Excel(name = "网格名称") + private String gridName; + + @Excel(name = "组织Id") + private String agencyId; + + @Excel(name = "组织的pids") + private String pids; + + @Excel(name = "所属小区ID;") + private String villageId; + + @Excel(name = "所属小区名称") + private String villageName; + + @Excel(name = "所属楼宇Id") + private String buildId; + + @Excel(name = "所属楼宇名称") + private String buildName; + + @Excel(name = "单元id") + private String unitId; + + @Excel(name = "单元名") + private String unitName; + + @Excel(name = "所属家庭Id") + private String homeId; + + @Excel(name = "房间名") + private String homeName; + + @Excel(name = "户口性质:0户籍 1外来") + private String householdType; + + @Excel(name = "姓名") + private String name; + + @Excel(name = "联系电话") + private String mobile; + + @Excel(name = "身份证号") + private String idCard; + + @Excel(name = "是否接种:0否1是") + private String isVaccination; + + @Excel(name = "第一次接种时间") + private String firstVacTime; + + @Excel(name = "第一次接种地点") + private String firstVacSite; + + @Excel(name = "第二次接种时间") + private String secondVacTime; + + @Excel(name = "第二次接种地点") + private String secondVacSite; + + @Excel(name = "第三次接种时间") + private String thirdVacTime; + + @Excel(name = "第三次接种地点") + private String thirdVacSite; + + @Excel(name = "原因:禁忌症/拒绝接种/其他原因") + private String reason; + + @Excel(name = "备注") + private String note; + + @Excel(name = "删除标识 0.未删除 1.已删除") + 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/IcVaccinePrarmeterRedis.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/IcVaccinePrarmeterRedis.java new file mode 100644 index 0000000000..176cb28247 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/redis/IcVaccinePrarmeterRedis.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-08-22 + */ +@Component +public class IcVaccinePrarmeterRedis { + @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/IcResiCollectVisitorService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiCollectVisitorService.java index 5f7f3e4d25..6b92a7b16b 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiCollectVisitorService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcResiCollectVisitorService.java @@ -2,13 +2,15 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.IcResiCollectVisitorDTO; import com.epmet.dto.SaveCollectVisitorFormDTO; import com.epmet.dto.form.CollectDetailFormDTO; -import com.epmet.dto.form.CollectListFormDTO; import com.epmet.dto.form.VisitListFormDTO; -import com.epmet.dto.result.CollectListResultDTO; +import com.epmet.dto.form.VisitVisitorChartFormDTO; +import com.epmet.dto.form.VisitorInfoFormDTO; +import com.epmet.dto.result.VisitVisitorChartResultDTO; import com.epmet.entity.IcResiCollectVisitorEntity; import java.util.List; @@ -34,6 +36,7 @@ public interface IcResiCollectVisitorService extends BaseService getTraffic(VisitVisitorChartFormDTO dto); + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVaccinePrarmeterService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVaccinePrarmeterService.java new file mode 100644 index 0000000000..c9f1e9de1e --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcVaccinePrarmeterService.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.IcVaccinePrarmeterDTO; +import com.epmet.entity.IcVaccinePrarmeterEntity; + +import java.util.List; +import java.util.Map; + +/** + * 新冠病毒疫苗接种人员信息台账 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-08-22 + */ +public interface IcVaccinePrarmeterService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2022-08-22 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2022-08-22 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return IcVaccinePrarmeterDTO + * @author generator + * @date 2022-08-22 + */ + IcVaccinePrarmeterDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-08-22 + */ + void save(IcVaccinePrarmeterDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-08-22 + */ + void update(IcVaccinePrarmeterDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2022-08-22 + */ + 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/IcResiCollectServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java index 0461ce2cba..ce8441c1a1 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectServiceImpl.java @@ -178,7 +178,7 @@ public class IcResiCollectServiceImpl extends BaseServiceImpl newMemberList = ConvertUtils.sourceToTarget(formDTO.getMemberList(), IcResiMemberEntity.class); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectVisitorServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectVisitorServiceImpl.java index 2dccca05b0..a73d022548 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectVisitorServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiCollectVisitorServiceImpl.java @@ -8,17 +8,16 @@ import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.IcResiCollectVisitorDao; import com.epmet.dto.IcNeighborHoodDTO; import com.epmet.dto.IcResiCollectVisitorDTO; import com.epmet.dto.SaveCollectVisitorFormDTO; -import com.epmet.dto.form.CollectDetailFormDTO; -import com.epmet.dto.form.CollectListFormDTO; -import com.epmet.dto.form.VisitListFormDTO; -import com.epmet.dto.form.VisitVisitorFormDTO; -import com.epmet.dto.result.CollectListResultDTO; +import com.epmet.dto.form.*; +import com.epmet.dto.result.VisitVisitorChartResultDTO; import com.epmet.entity.IcResiCollectVisitorEntity; import com.epmet.redis.IcResiCollectVisitorRedis; import com.epmet.service.IcResiCollectVisitorService; @@ -30,6 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.time.LocalDate; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -50,6 +50,9 @@ public class IcResiCollectVisitorServiceImpl extends BaseServiceImpl getPhrasePage(Map params) { + params.put("customerId", loginUserUtil.getLoginUserCustomerId()); IPage page = getPage(params); List list = baseDao.getPhrasePage(params); return new PageData<>(list, page.getTotal()); @@ -159,6 +163,7 @@ public class IcResiCollectVisitorServiceImpl extends BaseServiceImpl getTraffic(VisitVisitorChartFormDTO dto) { + if (StringUtils.isBlank(dto.getDate())) { + dto.setDate(LocalDate.now().toString()); + } + return baseDao.getTraffic(dto); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccinePrarmeterServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccinePrarmeterServiceImpl.java new file mode 100644 index 0000000000..a30c43a58a --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcVaccinePrarmeterServiceImpl.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.IcVaccinePrarmeterDao; +import com.epmet.dto.IcVaccinePrarmeterDTO; +import com.epmet.entity.IcVaccinePrarmeterEntity; +import com.epmet.redis.IcVaccinePrarmeterRedis; +import com.epmet.service.IcVaccinePrarmeterService; +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-08-22 + */ +@Service +public class IcVaccinePrarmeterServiceImpl extends BaseServiceImpl implements IcVaccinePrarmeterService { + + @Autowired + private IcVaccinePrarmeterRedis icVaccinePrarmeterRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, IcVaccinePrarmeterDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, IcVaccinePrarmeterDTO.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 IcVaccinePrarmeterDTO get(String id) { + IcVaccinePrarmeterEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, IcVaccinePrarmeterDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcVaccinePrarmeterDTO dto) { + IcVaccinePrarmeterEntity entity = ConvertUtils.sourceToTarget(dto, IcVaccinePrarmeterEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcVaccinePrarmeterDTO dto) { + IcVaccinePrarmeterEntity entity = ConvertUtils.sourceToTarget(dto, IcVaccinePrarmeterEntity.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/util/dh/DhDeviceUtil.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/util/dh/DhDeviceUtil.java index 9d8d52149f..dd6f82f6f1 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/util/dh/DhDeviceUtil.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/util/dh/DhDeviceUtil.java @@ -706,8 +706,8 @@ public class DhDeviceUtil { cardFormDTO.setCardType("0"); cardFormDTO.setCategory("0"); cardFormDTO.setCardStatus("ACTIVE"); - cardFormDTO.setStartDate(LocalDate.now().toString()); - cardFormDTO.setEndDate(LocalDate.now().plusDays(180L).toString()); + cardFormDTO.setStartDate(LocalDate.now().minusDays(1L).toString()); + cardFormDTO.setEndDate(LocalDate.now().plusDays(1L).toString()); String pwd; try { pwd = RSAUtils.getPwdByRsa(getPublicKey(), "123456"); @@ -816,7 +816,7 @@ public class DhDeviceUtil { DataInputStream dataInputStream = new DataInputStream(url.openStream()); byte[] originBytes = toByteArray(dataInputStream); - fileBytes = compressPicCycle(originBytes, 100L, 0.1); + fileBytes = compressPicCycle(originBytes, 100L, 0.3); } catch (IOException e) { logger.error("图片上传异常", e); throw new RenException("图片上传异常"); diff --git a/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.66__chart_hour.sql b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.66__chart_hour.sql new file mode 100644 index 0000000000..85d2713385 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/db/migration/V0.0.66__chart_hour.sql @@ -0,0 +1,56 @@ +/* + Navicat Premium Data Transfer + + Source Server : epmet_cloud_dev_user + Source Server Type : MySQL + Source Server Version : 50726 + Source Host : 192.168.1.140:3306 + Source Schema : epmet_user + + Target Server Type : MySQL + Target Server Version : 50726 + File Encoding : 65001 + + Date: 22/08/2022 13:31:44 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for pli_chart_hour +-- ---------------------------- +DROP TABLE IF EXISTS `pli_chart_hour`; +CREATE TABLE `pli_chart_hour` ( + `hour` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '图表日期链表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of pli_chart_hour +-- ---------------------------- +INSERT INTO `pli_chart_hour` VALUES ('01'); +INSERT INTO `pli_chart_hour` VALUES ('02'); +INSERT INTO `pli_chart_hour` VALUES ('03'); +INSERT INTO `pli_chart_hour` VALUES ('04'); +INSERT INTO `pli_chart_hour` VALUES ('05'); +INSERT INTO `pli_chart_hour` VALUES ('06'); +INSERT INTO `pli_chart_hour` VALUES ('07'); +INSERT INTO `pli_chart_hour` VALUES ('08'); +INSERT INTO `pli_chart_hour` VALUES ('09'); +INSERT INTO `pli_chart_hour` VALUES ('10'); +INSERT INTO `pli_chart_hour` VALUES ('11'); +INSERT INTO `pli_chart_hour` VALUES ('12'); +INSERT INTO `pli_chart_hour` VALUES ('13'); +INSERT INTO `pli_chart_hour` VALUES ('14'); +INSERT INTO `pli_chart_hour` VALUES ('15'); +INSERT INTO `pli_chart_hour` VALUES ('16'); +INSERT INTO `pli_chart_hour` VALUES ('17'); +INSERT INTO `pli_chart_hour` VALUES ('18'); +INSERT INTO `pli_chart_hour` VALUES ('19'); +INSERT INTO `pli_chart_hour` VALUES ('20'); +INSERT INTO `pli_chart_hour` VALUES ('21'); +INSERT INTO `pli_chart_hour` VALUES ('22'); +INSERT INTO `pli_chart_hour` VALUES ('23'); +INSERT INTO `pli_chart_hour` VALUES ('00'); + +SET FOREIGN_KEY_CHECKS = 1; diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectVisitorDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectVisitorDao.xml index 52cdb9ace8..d2072275f2 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectVisitorDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiCollectVisitorDao.xml @@ -60,8 +60,33 @@ UPDATED_TIME from ic_resi_collect_visitor where DEL_FLAG = '0' - - AND DATE_FORMAT( CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} + AND CUSTOMER_ID = #{customerId} + + AND ID_CARD = #{idCard} + + + AND NAME = #{name} + + + AND MOBILE = #{mobile} + + + AND VILLAGE_ID = #{villageId} + + + AND BUILD_ID = #{buildId} + + + AND UNIT_ID = #{unitId} + + + AND HOME_ID = #{homeId} + + + AND CREATED_TIME >= #{startTime} + + + AND CREATED_TIME <= #{endTime} order by CREATED_TIME desc @@ -95,14 +120,65 @@ UPDATED_TIME from ic_resi_collect_visitor where DEL_FLAG = '0' - - AND DATE_FORMAT( CREATED_TIME, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime} + AND CUSTOMER_ID = #{customerId} + + AND ID_CARD = #{idCard} + + + AND NAME = #{name} + + + AND MOBILE = #{mobile} + + + AND VILLAGE_ID = #{villageId} - - AND CONCAT(PIDS,':',AGENCY_ID) LIKE CONCAT('%',#{orgId},'%') + + AND BUILD_ID = #{buildId} + + AND UNIT_ID = #{unitId} + + + AND HOME_ID = #{homeId} + + + AND CREATED_TIME >= #{startTime} + + + AND CREATED_TIME <= #{endTime} + + order by CREATED_TIME desc + + + diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccinePrarmeterDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccinePrarmeterDao.xml new file mode 100644 index 0000000000..363554832c --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcVaccinePrarmeterDao.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserDao.xml index 605350bde2..9bca7b1bf5 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserDao.xml @@ -35,7 +35,7 @@ IFNULL(resi.ID,"") AS resiId, IFNULL(CONCAT(resi.SURNAME,resi.NAME),"") AS userRealName, IFNULL(relation.GRID_ID,"") AS gridId, - IFNULL(resi.id_num,'')AS idNum + IFNULL(wechat.id_num,'')AS idNum FROM USER user LEFT JOIN