From d10b5bdfc78d393b7b727b0355b4e086f7266143 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Thu, 29 Feb 2024 09:09:42 +0800 Subject: [PATCH 1/6] =?UTF-8?q?#=20=E6=97=A5=E5=B8=B8=E7=BB=B4=E6=8A=A4?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E7=BC=BA=E5=A4=B1=E6=9C=80=E5=90=8E=E4=B8=80?= =?UTF-8?q?=E5=A4=A9=E6=98=BE=E7=A4=BAbug=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../maintenance/service/impl/OperMaintenanceMonitorServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceMonitorServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceMonitorServiceImpl.java index 9c19abc..660269c 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceMonitorServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceMonitorServiceImpl.java @@ -48,7 +48,7 @@ public class OperMaintenanceMonitorServiceImpl implements IOperMaintenanceMonito LocalDate startDate = LocalDate.of(req.getYear(), req.getMonth(), 1); eq(OperMaintenancePlanEntity::getIsDeleted, 0L); ge(OperMaintenancePlanEntity::getDisposeTime, startDate); - lt(OperMaintenancePlanEntity::getDisposeTime, startDate.with(TemporalAdjusters.lastDayOfMonth())); + lt(OperMaintenancePlanEntity::getDisposeTime, startDate.plusMonths(1)); eq(Func.isNotEmpty(req.getDeptId()), OperMaintenancePlanEntity::getCreateDept, req.getDeptId()); }}); From 74d2be6d5f3cff9e7ac0ca743623fae401f6df2a Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Thu, 29 Feb 2024 09:49:46 +0800 Subject: [PATCH 2/6] =?UTF-8?q?#=E5=91=8A=E8=AD=A6=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=A7=BB=E6=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/operation/AbnormalAlarmMapper.java | 14 --------- .../operation/alarm/AbnormalAlarmService.java | 15 ---------- .../alarm/impl/AbnormalAlarmServiceImpl.java | 33 ---------------------- .../operation/monitor/impl/MonitorServiceImpl.java | 2 -- .../mapper/operation/AbnormalAlarmMapper.xml | 11 -------- 5 files changed, 75 deletions(-) delete mode 100644 hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/operation/AbnormalAlarmMapper.java delete mode 100644 hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/alarm/AbnormalAlarmService.java delete mode 100644 hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/alarm/impl/AbnormalAlarmServiceImpl.java delete mode 100644 hzims-service/hzims-scheduled/src/main/resources/mapper/operation/AbnormalAlarmMapper.xml diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/operation/AbnormalAlarmMapper.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/operation/AbnormalAlarmMapper.java deleted file mode 100644 index 12876bd..0000000 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/mapper/operation/AbnormalAlarmMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.hnac.hzims.scheduled.mapper.operation; - -import com.hnac.hzims.operational.alert.entity.AbnormalAlarmEntity; -import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; - -import java.util.List; - -/** - * @author ysj - */ -public interface AbnormalAlarmMapper extends UserDataScopeBaseMapper { - - List abnormalAlarms(); -} diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/alarm/AbnormalAlarmService.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/alarm/AbnormalAlarmService.java deleted file mode 100644 index 3151c43..0000000 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/alarm/AbnormalAlarmService.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.hnac.hzims.scheduled.service.operation.alarm; - -import com.hnac.hzims.operational.alert.entity.AbnormalAlarmEntity; -import org.springblade.core.mp.base.BaseService; - -import java.util.List; - -/** - * 告警处理接口 - * @author ysj - */ -public interface AbnormalAlarmService extends BaseService { - - List abnormalAlarms(); -} diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/alarm/impl/AbnormalAlarmServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/alarm/impl/AbnormalAlarmServiceImpl.java deleted file mode 100644 index 4fe12b2..0000000 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/alarm/impl/AbnormalAlarmServiceImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.hnac.hzims.scheduled.service.operation.alarm.impl; - -import com.hnac.hzims.operational.alert.entity.AbnormalAlarmEntity; -import com.hnac.hzims.scheduled.mapper.operation.AbnormalAlarmMapper; -import com.hnac.hzims.scheduled.service.operation.alarm.AbnormalAlarmService; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springblade.core.mp.base.BaseServiceImpl; -import org.springblade.core.tool.utils.CollectionUtil; -import org.springframework.stereotype.Service; - -import java.util.ArrayList; -import java.util.List; - -/** - * 告警实现类 - * @author ysj - */ -@Slf4j -@Service -@RequiredArgsConstructor -public class AbnormalAlarmServiceImpl extends BaseServiceImpl implements AbnormalAlarmService { - - - @Override - public List abnormalAlarms() { - List alarmList = this.baseMapper.abnormalAlarms(); - if(CollectionUtil.isEmpty(alarmList)){ - return new ArrayList<>(); - } - return alarmList; - } -} \ No newline at end of file diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/impl/MonitorServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/impl/MonitorServiceImpl.java index 53b2c88..921dd44 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/impl/MonitorServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/monitor/impl/MonitorServiceImpl.java @@ -20,7 +20,6 @@ import com.hnac.hzims.operational.station.entity.StationAttributeEntity; import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.scheduled.service.alarm.AlarmQueryService; import com.hnac.hzims.scheduled.service.equipment.WorkshopInfoService; -import com.hnac.hzims.scheduled.service.operation.alarm.AbnormalAlarmService; import com.hnac.hzims.scheduled.service.operation.alarm.RecordService; import com.hnac.hzims.scheduled.service.operation.monitor.MonitorService; import com.hnac.hzims.scheduled.service.operation.station.StationAttrConfigService; @@ -61,7 +60,6 @@ public class MonitorServiceImpl implements MonitorService { private final AlarmQueryService alarmQueryService; private final StationAttributeService attbtService; private final WorkshopInfoService workshopInfoService; - private final AbnormalAlarmService abnormalAlarmService; private final StationAttrConfigService attrConfigService; private final RedisTemplate redisTemplate; private final ISysClient sysClient; diff --git a/hzims-service/hzims-scheduled/src/main/resources/mapper/operation/AbnormalAlarmMapper.xml b/hzims-service/hzims-scheduled/src/main/resources/mapper/operation/AbnormalAlarmMapper.xml deleted file mode 100644 index aab621f..0000000 --- a/hzims-service/hzims-scheduled/src/main/resources/mapper/operation/AbnormalAlarmMapper.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - From 14f210c6095d0385c4cf440fc11aaa5090fc1629 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Thu, 29 Feb 2024 10:14:29 +0800 Subject: [PATCH 3/6] =?UTF-8?q?#=20=E8=AE=BE=E5=A4=87=E3=80=81=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E7=82=B9=E4=BD=8D=E7=BB=91=E5=AE=9A=E5=85=B3=E7=B3=BB?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=88=A0=E9=99=A4=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hnac/hzims/equipment/controller/EmVideoBandingController.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmVideoBandingController.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmVideoBandingController.java index 335b2d0..40002c7 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmVideoBandingController.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/controller/EmVideoBandingController.java @@ -13,6 +13,7 @@ import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.tool.api.R; +import org.springblade.core.tool.utils.Func; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -50,4 +51,11 @@ public class EmVideoBandingController extends BladeController { return R.status(emVideoBandingService.removeByEmCode(emCode)); } + @DeleteMapping("/removeById") + @ApiOperation("根据ID删除绑定关系") + @ApiOperationSupport(order = 4) + public R removeById(@RequestParam @ApiParam(value = "绑定ID,按逗号分隔",required = true) String ids) { + return R.status(emVideoBandingService.removeByIds(Func.toLongList(",",ids))); + } + } From f1479eb52ff6e32c3f1886b9e8dc754c21023173 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Thu, 29 Feb 2024 13:28:56 +0800 Subject: [PATCH 4/6] =?UTF-8?q?#=E5=91=8A=E8=AD=A6=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=A7=BB=E6=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alarm/config/constants/AlarmConstants.java | 2 + .../alarm/source/service/DroolsAlarmService.java | 2 - .../service/impl/DroolsAlarmServiceImpl.java | 18 +------- .../source/service/impl/MessageServiceImpl.java | 49 +++++++++++++--------- 4 files changed, 33 insertions(+), 38 deletions(-) diff --git a/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/constants/AlarmConstants.java b/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/constants/AlarmConstants.java index 4a59622..0a05c3f 100644 --- a/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/constants/AlarmConstants.java +++ b/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/constants/AlarmConstants.java @@ -62,4 +62,6 @@ public interface AlarmConstants { String VIDEO_SCHEDULED_TASK= "VideoScheduledTask"; List HZ3000_TYPES = Arrays.asList("0","1","2","3","4","5","6","7","8","9","10","11","12"); + + String SMS_MESSAGE_TEMPLATE_CODE = "aliyun-alert-push"; } diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/DroolsAlarmService.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/DroolsAlarmService.java index 1b07084..8fbbefa 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/DroolsAlarmService.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/DroolsAlarmService.java @@ -10,7 +10,5 @@ import java.util.List; */ public interface DroolsAlarmService { - String message(); - List receiveMessage(String message); } \ No newline at end of file diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/DroolsAlarmServiceImpl.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/DroolsAlarmServiceImpl.java index de80b7a..8667adc 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/DroolsAlarmServiceImpl.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/DroolsAlarmServiceImpl.java @@ -3,11 +3,10 @@ package com.hnac.hzims.alarm.source.service.impl; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.hnac.hzims.alarm.config.entity.AlarmEntity; +import com.hnac.hzims.alarm.config.vo.ConditionAlarmVo; +import com.hnac.hzims.alarm.show.service.AlarmService; import com.hnac.hzims.alarm.source.service.DroolsAlarmService; import com.hnac.hzims.alarm.source.service.MessageService; -import com.hnac.hzims.alarm.show.service.AlarmService; -import com.hnac.hzims.alarm.config.vo.ConditionAlarmVo; -import com.hnac.hzims.equipment.feign.IEmInfoClient; import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.feign.IStationClient; import lombok.RequiredArgsConstructor; @@ -39,21 +38,8 @@ public class DroolsAlarmServiceImpl implements DroolsAlarmService { private final RedisTemplate redisTemplate; - private final IEmInfoClient deviceClient; - private final IStationClient stationClient; - public final static String device_cache_cofig_final = "hzims:equipment:emInfo:deviceCode.emInfoList"; - - /** - * 发送websocket消息 - * @return - */ - @Override - public String message() { - return ""; - } - /** * 转换接收服务推送消息 diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/MessageServiceImpl.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/MessageServiceImpl.java index 6a03596..124ccc4 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/MessageServiceImpl.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/alarm/source/service/impl/MessageServiceImpl.java @@ -1,11 +1,13 @@ package com.hnac.hzims.alarm.source.service.impl; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; +import com.hnac.hzims.alarm.config.constants.AlarmConstants; import com.hnac.hzims.alarm.config.service.AlarmConfigService; import com.hnac.hzims.alarm.config.entity.AlarmEntity; import com.hnac.hzims.alarm.source.service.MessageService; import com.hnac.hzims.message.MessageConstants; import com.hnac.hzims.message.dto.BusinessMessageDTO; +import com.hnac.hzims.message.dto.SmsImmediatelyPushDTO; import com.hnac.hzims.message.dto.SmsPushDto; import com.hnac.hzims.message.dto.WxMessageDTO; import com.hnac.hzims.message.fegin.IMessageClient; @@ -14,8 +16,10 @@ import com.hnac.hzims.operational.station.feign.IStationClient; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.core.tool.api.R; +import org.springblade.core.tool.jackson.JsonUtil; import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.DateUtil; +import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.StringUtil; import org.springblade.system.cache.DictCache; import org.springblade.system.feign.ISysClient; @@ -61,23 +65,29 @@ public class MessageServiceImpl implements MessageService { return; } //通知站点项目经理这个角色 - List users = userClient.relationUserListByRoleAlias("200000", station.getData().getRefDept(), PROJECT_MANAGER).getData(); + List users = userClient.relationUserListByRoleAlias(station.getData().getTenantId(), station.getData().getRefDept(), PROJECT_MANAGER).getData(); if(CollectionUtil.isEmpty(users)){ return; } - List phones = users.stream().map(User::getPhone).filter(phone -> !StringUtil.isEmpty(phone)).collect(Collectors.toList()); - if(CollectionUtil.isEmpty(phones)){ - return; - } - SmsPushDto sms = new SmsPushDto(); - sms.setPhones(phones); - Map params = new HashMap<>(); - params.put("projectName",entity.getStationName()); - params.put("deviceName",entity.getDeviceCode()); - params.put("ruleDefName",entity.getAlarmContext()); - params.put("ts", DateUtil.format(entity.getAlarmTime(),DateUtil.PATTERN_DATETIME)); - sms.setParams(params); - messageClient.sendSmsMessage(sms); + SmsImmediatelyPushDTO push = SmsImmediatelyPushDTO.builder() + .deptId(entity.getCreateDept()) + .taskId(entity.getId()) + .businessKey(MessageConstants.BusinessClassifyEnum.WARNING.getKey()) + .businessClassify(MessageConstants.BusinessClassifyEnum.WARNING.getKey()) + .content(entity.getAlarmContext()) + .subject("告警短信通知") + .tenantId(entity.getTenantId()) + .resourceCode(AlarmConstants.SMS_MESSAGE_TEMPLATE_CODE) + .pusher(users.stream().map(o->o.getId().toString()).collect(Collectors.joining(","))) + .createUser(station.getData().getCreateUser()) + .params(new HashMap(){{ + put("projectName",entity.getStationName()); + put("deviceName",entity.getDeviceName()); + put("ruleDefName",entity.getAlarmContext()); + put("ts", DateUtil.format(entity.getAlarmTime(),DateUtil.PATTERN_DATETIME)); + }}) + .build(); + messageClient.sendSmsImmediatelyMsg(push); } /** @@ -102,7 +112,7 @@ public class MessageServiceImpl implements MessageService { message.setBusinessClassify("warning"); message.setBusinessKey(MessageConstants.BusinessClassifyEnum.WARNING.getKey()); message.setSubject(MessageConstants.BusinessClassifyEnum.WARNING.getDescription()); - message.setTaskId(Long.valueOf(entity.getAlarmId())); + message.setTaskId(entity.getId()); message.setTenantId("200000"); message.setContent(entity.getAlarmContext()); message.setDeptId(dept); @@ -121,12 +131,12 @@ public class MessageServiceImpl implements MessageService { */ @Override public void weChatMessage(AlarmEntity entity) { - R stationByCode = stationClient.getStationByCode(entity.getStationId()); - if (!stationByCode.isSuccess() && ObjectUtils.isEmpty(stationByCode.getData())) { + R station = stationClient.getStationByCode(entity.getStationId()); + if (!station.isSuccess() && ObjectUtils.isEmpty(station.getData())) { log.error("消息发送失败:站点code获取失败 : {}",entity); return; } - Long dept = stationByCode.getData().getCreateDept(); + Long dept = station.getData().getCreateDept(); // 获取站点用户 R> result = userClient.userListByDeptId(dept); if (!result.isSuccess() || CollectionUtil.isEmpty(result.getData())) { @@ -162,9 +172,8 @@ public class MessageServiceImpl implements MessageService { message.setUserIds(result.getData().stream().map(o->String.valueOf(o.getId())).distinct().collect(Collectors.joining(","))); // 创建用户 message.setCreateUser(result.getData().get(0).getId()); - // 租户Id - message.setTenantId("200000"); + message.setTenantId(station.getData().getTenantId()); messageClient.sendWxMessage(message); } } \ No newline at end of file From 81294bcac7e95be3152bd95c374cf7b677462e86 Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Thu, 29 Feb 2024 13:57:07 +0800 Subject: [PATCH 5/6] =?UTF-8?q?#=20FDP=E9=97=AE=E5=8D=B7=E7=AD=94=E9=A2=98?= =?UTF-8?q?=E7=A7=9F=E6=88=B7=E5=8F=96=E7=94=A8=E7=94=A8=E6=88=B7=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hnac/hzims/fdp/service/impl/FdpQuestionServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpQuestionServiceImpl.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpQuestionServiceImpl.java index c924a0c..251b715 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpQuestionServiceImpl.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpQuestionServiceImpl.java @@ -57,7 +57,7 @@ public class FdpQuestionServiceImpl implements IFdpQuestionService { .stationName(stationEntity.getName()) .type(fdpStationType) .stationDesc(Optional.ofNullable(stationDesc).orElse("")) - .tenantId("200000") + .tenantId(AuthUtil.getTenantId()) .build(); if(Func.isNotEmpty(infoReq.getType())) { HttpResponse httpResponse = HttpRequest.post(fdpUrlConfiguration.getSubmitStationInfo()) From 9548ade35202b2b452b6767130bc1000c0bba225 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Thu, 29 Feb 2024 14:56:03 +0800 Subject: [PATCH 6/6] =?UTF-8?q?#=E5=8C=BA=E5=9F=9F=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operational/config/entity/AreaMapEntity.java | 26 ++++++++++++++++++++++ .../config/controller/AreaMapController.java | 21 +++++++++++++++++ .../operational/config/mapper/AreaMapMapper.java | 13 +++++++++++ .../operational/config/mapper/AreaMapMapper.xml | 5 +++++ .../operational/config/service/AreaMapService.java | 12 ++++++++++ .../config/service/impl/AreaMapServiceImpl.java | 18 +++++++++++++++ 6 files changed, 95 insertions(+) create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/config/entity/AreaMapEntity.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/AreaMapController.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/mapper/AreaMapMapper.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/mapper/AreaMapMapper.xml create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/AreaMapService.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/AreaMapServiceImpl.java diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/config/entity/AreaMapEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/config/entity/AreaMapEntity.java new file mode 100644 index 0000000..4deb318 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/config/entity/AreaMapEntity.java @@ -0,0 +1,26 @@ +package com.hnac.hzims.operational.config.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.NoArgsConstructor; +import org.springblade.core.tenant.mp.TenantEntity; + +/** + * @author ysj + */ +@ApiModel("区域地图配置实体类") +@AllArgsConstructor +@NoArgsConstructor +@Builder +@TableName("hzims_area_map_config") +public class AreaMapEntity extends TenantEntity { + + @ApiModelProperty("区域机构ID") + private Long areaId; + + @ApiModelProperty("地图编码") + private String mapCode; +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/AreaMapController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/AreaMapController.java new file mode 100644 index 0000000..8b4cd70 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/controller/AreaMapController.java @@ -0,0 +1,21 @@ +package com.hnac.hzims.operational.config.controller; + +import com.hnac.hzims.operational.config.service.AreaMapService; +import io.swagger.annotations.Api; +import lombok.AllArgsConstructor; +import org.springblade.core.boot.ctrl.BladeController; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +/** + * @author ysj + */ +@RestController +@AllArgsConstructor +@Api(value = "区域地图配置",tags = "区域地图配置") +@RequestMapping("/areaMap") +public class AreaMapController extends BladeController { + + private AreaMapService areaMapService; +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/mapper/AreaMapMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/mapper/AreaMapMapper.java new file mode 100644 index 0000000..99072c1 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/mapper/AreaMapMapper.java @@ -0,0 +1,13 @@ +package com.hnac.hzims.operational.config.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hnac.hzims.operational.config.entity.AreaMapEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * @author ysj + */ +@Mapper +public interface AreaMapMapper extends BaseMapper { + +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/mapper/AreaMapMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/mapper/AreaMapMapper.xml new file mode 100644 index 0000000..185a1fa --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/mapper/AreaMapMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/AreaMapService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/AreaMapService.java new file mode 100644 index 0000000..287cc24 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/AreaMapService.java @@ -0,0 +1,12 @@ +package com.hnac.hzims.operational.config.service; + + +import com.hnac.hzims.operational.config.entity.AreaMapEntity; +import org.springblade.core.mp.base.BaseService; + +/** + * @author ysj + */ +public interface AreaMapService extends BaseService { + +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/AreaMapServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/AreaMapServiceImpl.java new file mode 100644 index 0000000..f829010 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/AreaMapServiceImpl.java @@ -0,0 +1,18 @@ +package com.hnac.hzims.operational.config.service.impl; + +import com.hnac.hzims.operational.config.entity.AreaMapEntity; +import com.hnac.hzims.operational.config.mapper.AreaMapMapper; +import com.hnac.hzims.operational.config.service.AreaMapService; +import lombok.RequiredArgsConstructor; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; + + +/** + * @author ysj + */ +@Service +@RequiredArgsConstructor +public class AreaMapServiceImpl extends BaseServiceImpl implements AreaMapService { + +} \ No newline at end of file