From 0810c95945b1ef82a5f3c8f68903161ffe7ef5e0 Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Mon, 18 Mar 2024 14:09:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=80=BC=E7=8F=AD=E6=97=A5=E5=BF=97=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=8E=BB=E9=99=A4=E6=AF=8F=E4=B8=AA=E7=AB=99=E7=82=B9?= =?UTF-8?q?=E4=B8=8B=E5=80=BC=E7=8F=AD=E6=97=A5=E5=BF=97=E5=94=AF=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hnac/hzims/operational/duty/entity/AnalyseExample.java | 5 +++++ .../duty/service/impl/ImsAnalyseExampleServiceImpl.java | 14 +++++--------- .../operational/src/main/resources/db/4.0.0 .sql.1 | 4 +++- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/entity/AnalyseExample.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/entity/AnalyseExample.java index b840180..7c63f4f 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/entity/AnalyseExample.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/entity/AnalyseExample.java @@ -28,6 +28,11 @@ public class AnalyseExample extends TenantEntity { @ApiModelProperty(value = "配置ID") private Long id; /** + * 值班日志名称 + */ + @ApiModelProperty(value = "值班日志名称") + private String name; + /** * 站点ID */ @ApiModelProperty(value = "站点ID") diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java index 82cdea2..0a90259 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java @@ -34,6 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.servlet.http.HttpServletResponse; +import javax.xml.ws.WebServiceException; import java.io.IOException; import java.net.URLEncoder; import java.util.*; @@ -118,16 +119,11 @@ public class ImsAnalyseExampleServiceImpl extends BaseServiceImpl queryWrapper = new QueryWrapper(); - if (StringUtils.isNotEmpty(analyseExample.getEquipmentId())){ - queryWrapper.lambda().eq(AnalyseExample::getEquipmentId, analyseExample.getEquipmentId()); - } - if (ObjectUtils.isNotEmpty(analyseExample.getSiteId())){ - queryWrapper.lambda().eq(AnalyseExample::getSiteId, analyseExample.getSiteId()); + if (ObjectUtils.isEmpty(analyseExample)) { + throw new WebServiceException("保存失败,参数丢失,请稍后重试!"); } - AnalyseExample res = baseMapper.selectOne(queryWrapper.lambda().last("limit 1;")); - if (ObjectUtils.isNotEmpty(res)){ - analyseExample.setId(res.getId()); + if (ObjectUtils.isEmpty(analyseExample.getName())) { + throw new WebServiceException("请输入配置名称!"); } this.saveOrUpdate(analyseExample); return R.success("保存成功"); diff --git a/hzims-service/operational/src/main/resources/db/4.0.0 .sql.1 b/hzims-service/operational/src/main/resources/db/4.0.0 .sql.1 index 7bcf426..263a52d 100644 --- a/hzims-service/operational/src/main/resources/db/4.0.0 .sql.1 +++ b/hzims-service/operational/src/main/resources/db/4.0.0 .sql.1 @@ -37,4 +37,6 @@ alter table `hzims_station` add COLUMN `deleted_id` BIGINT(20) DEFAULT null COMM update `hzims_station` set `deleted_id` = id where `IS_DELETED` = 1; ALTER TABLE `hzims_station` ADD CONSTRAINT index_code_deleted UNIQUE (`code`, `deleted_id`); alter table `hzims_station` add column `is_push_project` tinyint(2) default 0 comment '是否推送数据平台'; -alter table `hzims_station` add column `is_push_fdp` tinyint(2) default 0 comment '是否推送FDP'; \ No newline at end of file +alter table `hzims_station` add column `is_push_fdp` tinyint(2) default 0 comment '是否推送FDP'; + +ALTER TABLE `hz_ims_duty_analyse_example` ADD COLUMN `name` varchar(255) NULL COMMENT '配置名称' AFTER `CREATE_DEPT`; \ No newline at end of file