奇异值管理修改

master
徐杰盟 2023-09-14 10:47:57 +08:00
parent d916e045ad
commit e64f7a0de5
5 changed files with 45 additions and 22 deletions

View File

@ -1,4 +1,4 @@
# 清洗规则api # 奇异值管理api
## 目录 ## 目录
``` ```
@ -40,4 +40,7 @@ resources
|_application-dev.yml 开发环境配置文件 |_application-dev.yml 开发环境配置文件
|_application-test.yml 测试环境配置文件 |_application-test.yml 测试环境配置文件
|_application-prod.yml 生产环境配置文件 |_application-prod.yml 生产环境配置文件
``` ```
服务
10.10.2.75 yKRs4w7q9M

View File

@ -30,8 +30,8 @@ public class Knife4jConfiguration {
private ApiInfo getApiInfoBuilder() { private ApiInfo getApiInfoBuilder() {
return new ApiInfoBuilder() return new ApiInfoBuilder()
.title("山洪接收中心数据清洗api") .title("奇异值管理api")
.description("# 山洪接收中心数据清洗api RESTful APIs") .description("# 奇异值管理api RESTful APIs")
.termsOfServiceUrl("http://219.138.108.99:19000/jszx") .termsOfServiceUrl("http://219.138.108.99:19000/jszx")
.contact(new Contact("湖北纬皓端成", null, null)) .contact(new Contact("湖北纬皓端成", null, null))
.version("1.0") .version("1.0")

View File

@ -4,12 +4,15 @@ package com.whdc.controller;
import com.whdc.model.bean.ItemType; import com.whdc.model.bean.ItemType;
import com.whdc.model.dto.FindRuleDto; import com.whdc.model.dto.FindRuleDto;
import com.whdc.model.entity.ERule; import com.whdc.model.entity.ERule;
import com.whdc.model.entity.EStationRules;
import com.whdc.model.group.Insert; import com.whdc.model.group.Insert;
import com.whdc.model.group.Update; import com.whdc.model.group.Update;
import com.whdc.service.IERuleService; import com.whdc.service.IERuleService;
import com.whdc.service.IEStationRulesService;
import com.whdc.utils.ResultJson; import com.whdc.utils.ResultJson;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -22,6 +25,7 @@ import java.util.Objects;
* @author xusan * @author xusan
* @since 2023-03-19 * @since 2023-03-19
*/ */
@Slf4j
@Api(tags = "规则管理 - Controller") @Api(tags = "规则管理 - Controller")
@RestController @RestController
@RequestMapping("/v2/eRule") @RequestMapping("/v2/eRule")
@ -30,6 +34,9 @@ public class ERuleController {
@Autowired @Autowired
private IERuleService ieRuleService; private IERuleService ieRuleService;
@Autowired
private IEStationRulesService ieStationRulesService;
@ApiOperation(value = "查询所有") @ApiOperation(value = "查询所有")
@PostMapping(value = "list") @PostMapping(value = "list")
@ -104,6 +111,15 @@ public class ERuleController {
} }
if (!ieStationRulesService.lambdaUpdate()
.set(EStationRules::getDel,"0")
.eq(EStationRules::getRuleId,id)
.update()) {
log.info("规则关联删除失败");
}
return ResultJson.ok(ieRuleService.removeById(id)); return ResultJson.ok(ieRuleService.removeById(id));
} }

View File

@ -80,15 +80,15 @@ public class EStationRulesController {
return ResultJson.error("当前规则不存在"); return ResultJson.error("当前规则不存在");
} }
if (CollectionUtils.isNotEmpty( // if (CollectionUtils.isNotEmpty(
ieStationRulesService.lambdaQuery() // ieStationRulesService.lambdaQuery()
.eq(EStationRules::getStcd,eStationRules.getStcd()) // .eq(EStationRules::getStcd,eStationRules.getStcd())
.eq(EStationRules::getRuleId,eStationRules.getRuleId()) // .eq(EStationRules::getRuleId,eStationRules.getRuleId())
.ne(EStationRules::getId,eStationRules.getId()) // .ne(EStationRules::getId,eStationRules.getId())
.list() // .list()
)){ // )){
return ResultJson.error("当前规则和测站已绑定"); // return ResultJson.error("当前规则和测站已绑定");
} // }
return ResultJson.ok(ieStationRulesService.updateById(eStationRules)); return ResultJson.ok(ieStationRulesService.updateById(eStationRules));

View File

@ -6,12 +6,12 @@ spring:
datasource: datasource:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: dm.jdbc.driver.DmDriver driver-class-name: dm.jdbc.driver.DmDriver
# url: jdbc:dm://127.0.0.1:5236?schema=SYSDBA url: jdbc:dm://127.0.0.1:5236?schema=SYSDBA
# username: SYSDBA username: SYSDBA
# password: 199999999 password: 199999999
url: jdbc:dm://10.42.6.142:5236?schema=SHZH # url: jdbc:dm://10.42.6.142:5236?schema=SHZH
username: SHZH # username: SHZH
password: Shzh_890 # password: Shzh_890
druid: druid:
initialSize: 5 initialSize: 5
minIdle: 5 minIdle: 5
@ -35,16 +35,20 @@ spring:
# Redis # Redis
redis: redis:
database: 5 database: 5
host: 10.42.6.75 # host: 10.42.6.75
host: 127.0.0.1
port: 6379 port: 6379
password: Whdc_890 password:
# password: Whdc_890
# 数据清洗专用redis # 数据清洗专用redis
redisRules: redisRules:
database: 6 database: 6
host: 10.42.6.75 # host: 10.42.6.75
host: 127.0.0.1
port: 6379 port: 6379
password: Whdc_890 password: Whdc_890
# password:
timeout: 60000 timeout: 60000
lettuce: lettuce:
pool: pool: