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