Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
haungxing 8 months ago
parent
commit
4d700df09a
  1. 5
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/entity/AnalyseExample.java
  2. 14
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java
  3. 2
      hzims-service/operational/src/main/resources/db/4.0.0 .sql.1

5
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")

14
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<ImsAnalyseExam
*/
@Override
public R updateAnalyseExample(AnalyseExample analyseExample) {
QueryWrapper<AnalyseExample> 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("保存成功");

2
hzims-service/operational/src/main/resources/db/4.0.0 .sql.1

@ -38,3 +38,5 @@ 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';
ALTER TABLE `hz_ims_duty_analyse_example` ADD COLUMN `name` varchar(255) NULL COMMENT '配置名称' AFTER `CREATE_DEPT`;
Loading…
Cancel
Save