Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
yang_shj 1 year ago
parent
commit
dbb75908db
  1. 8
      hzims-biz-common/pom.xml
  2. 2
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/OperationalConstants.java
  3. 2
      hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/entity/ContentDefinitionEntity.java
  4. 5
      hzims-service/inspect/pom.xml
  5. 1
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/feign/ContentDefinitionClient.java
  6. 14
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/IContentDefinitionService.java
  7. 16
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ContentDefinitionController.java
  8. 3
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperDefectServiceImpl.java
  9. 29
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationPushConfigService.java
  10. 10
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/util/TimeUtils.java
  11. 9
      hzims-service/pom.xml
  12. 49
      hzims-service/ticket/pom.xml
  13. 9
      pom.xml

8
hzims-biz-common/pom.xml

@ -44,14 +44,6 @@
<groupId>org.springblade</groupId>
<artifactId>blade-starter-datascope</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/cn.afterturn/easypoi-spring-boot-starter -->
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-spring-boot-starter</artifactId>
<version>4.4.0</version>
</dependency>
</dependencies>
<build>

2
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/OperationalConstants.java

@ -4,7 +4,7 @@ import lombok.Getter;
public class OperationalConstants {
public final static String APP_NAME = "hzims-operational";
public final static String APP_NAME = "hzims-operational-hx";

2
hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/obj/entity/ContentDefinitionEntity.java

@ -26,10 +26,12 @@ import java.io.Serializable;
public class ContentDefinitionEntity extends TenantEntity implements Serializable {
@ApiModelProperty(value = "内容编码")
@QueryField(condition = SqlCondition.EQUAL)
private String code;
@ApiModelProperty(value = "内容名称,长度必须为1到128")
@Size(min=1,max = 128,message ="内容名称长度必须为1到128")
@QueryField(condition = SqlCondition.LIKE)
private String name;
@ApiModelProperty(value = "内容描述,长度必须为0到512")

5
hzims-service/inspect/pom.xml

@ -137,6 +137,11 @@
<version>6.0.7</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-oss-minio</artifactId>
<version>2.7.3.RELEASE</version>
</dependency>
<dependency>
<groupId>com.hnac.hzims</groupId>
<artifactId>message-api</artifactId>
<version>${hzims.project.version}</version>

1
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/feign/ContentDefinitionClient.java

@ -63,3 +63,4 @@ public class ContentDefinitionClient implements IContentDefinitionClient {
}
}

14
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/IContentDefinitionService.java

@ -1,9 +1,14 @@
package com.hnac.hzinfo.inspect.obj.services;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hnac.hzinfo.inspect.obj.dto.ContentDefinitionDTO;
import com.hnac.hzinfo.inspect.obj.entity.ContentDefinitionEntity;
import com.hnac.hzinfo.inspect.obj.vo.ContentDefinitionVO;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
import java.util.List;
@ -16,4 +21,13 @@ public interface IContentDefinitionService extends BaseService<ContentDefinition
*/
List<ContentDefinitionVO> list(ContentDefinitionDTO request);
default LambdaQueryWrapper<ContentDefinitionEntity> getQueryWrapper(ContentDefinitionEntity entity) {
QueryWrapper<ContentDefinitionEntity> queryWrapper = Condition.getQueryWrapper(entity);
LambdaQueryWrapper<ContentDefinitionEntity> lambda = queryWrapper.lambda()
.eq(Func.isNotEmpty(entity.getCreateDept()), ContentDefinitionEntity::getCreateDept, entity.getCreateDept())
.eq(Func.isNotEmpty(entity.getCreateUser()), ContentDefinitionEntity::getCreateUser, entity.getCreateUser())
.eq(Func.isNotEmpty(entity.getStatus()), ContentDefinitionEntity::getStatus, entity.getStatus());
return lambda;
}
}

16
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ContentDefinitionController.java

@ -1,5 +1,6 @@
package com.hnac.hzinfo.inspect.obj.web;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
@ -21,6 +22,8 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @ClassName ContentDefinitionController
* @description: 巡检内容定义controller
@ -40,12 +43,17 @@ public class ContentDefinitionController extends BladeController {
@ApiOperation("分页查询")
@ApiOperationSupport(order = 1)
public R<IPage<ContentDefinitionVO>> page(ContentDefinitionDTO content, Query query) {
QueryWrapper<ContentDefinitionEntity> queryWrapper = Condition.getQueryWrapper(BeanUtil.copy(content, ContentDefinitionEntity.class));
queryWrapper.lambda().eq(Func.isEmpty(content.getCreateDept()),ContentDefinitionEntity::getCreateDept,content.getCreateDept())
.eq(Func.isEmpty(content.getCreateUser()),ContentDefinitionEntity::getCreateUser,content.getCreateUser());
IPage page = contentDefinitionService.page(Condition.getPage(query), queryWrapper);
IPage page = contentDefinitionService.page(Condition.getPage(query), contentDefinitionService.getQueryWrapper(BeanUtil.copy(content,ContentDefinitionEntity.class)));
page.setRecords(ContentDefinitionWrapper.build().listVO(page.getRecords()));
return R.data(page);
}
@GetMapping("/list")
@ApiOperation("查询,最多查询五十条")
@ApiOperationSupport(order = 2)
public R<List<ContentDefinitionVO>> list(ContentDefinitionDTO content) {
LambdaQueryWrapper<ContentDefinitionEntity> lambda = contentDefinitionService.getQueryWrapper(BeanUtil.copy(content, ContentDefinitionEntity.class));
lambda.last("limit 1,50;");
return R.data(ContentDefinitionWrapper.build().listVO(contentDefinitionService.list(lambda)));
}
}

3
hzims-service/operational/src/main/java/com/hnac/hzims/operational/defect/service/impl/OperDefectServiceImpl.java

@ -173,6 +173,9 @@ public class OperDefectServiceImpl extends BaseServiceImpl<OperDefectMapper, Ope
if (Func.isNotEmpty(defectVO.getIsDiagnosis())) {
queryWrapper.eq(OperDefectEntity::getIsDiagnosis, defectVO.getIsDiagnosis());
}
if (Func.isNotEmpty(defectVO.getFaultName())) {
queryWrapper.like(OperDefectEntity::getFaultName, defectVO.getFaultName());
}
}
queryWrapper.orderByDesc(OperDefectEntity::getCreateTime);
return queryWrapper;

29
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationPushConfigService.java

@ -0,0 +1,29 @@
package com.hnac.hzims.operational.station.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.operational.station.dto.StationPushConfigDTO;
import com.hnac.hzims.operational.station.entity.StationPushConfigEntity;
import com.hnac.hzims.operational.station.vo.StationPushConfigVO;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.mp.support.Query;
import java.util.List;
public interface IStationPushConfigService extends BaseService<StationPushConfigEntity> {
/**
* 查询列表
* @param request 查询条件
* @return
*/
List<StationPushConfigVO> list(StationPushConfigDTO request);
/**
* 分页查询
* @param query 分页条件
* @param request 查询条件
* @return
*/
IPage<StationPushConfigVO> listPage(Query query,StationPushConfigDTO request);
}

10
hzims-service/operational/src/main/java/com/hnac/hzims/operational/util/TimeUtils.java

@ -15,19 +15,11 @@ public class TimeUtils {
* @return
*/
public static Long getDifferTime(Date nowDate,Date endDate ) {
// long nd = 1000 * 24 * 60 * 60L;
// 获得两个时间的毫秒时间差异
// long nh = 1000 * 60 * 60L;
// long diff = endDate.getTime() - nowDate.getTime();
// BigDecimal s=BigDecimal.valueOf(diff).divide(BigDecimal.valueOf(diff)).setScale(0, BigDecimal.ROUND_HALF_UP);
// Long hour=s.longValue();
// return hour;
long nd = 1000 * 24 * 60 * 60L;
long nh = 1000 * 60 * 60L;
// 获得两个时间的毫秒时间差异
long diff = endDate.getTime() - nowDate.getTime();
// 计算差多少小时
long hour = diff % nd / nh;
long hour = diff/ nh;
return hour;
}

9
hzims-service/pom.xml

@ -55,13 +55,16 @@
<groupId>org.springblade</groupId>
<artifactId>blade-starter-datascope</artifactId>
</dependency>
<dependency>
<groupId>com.hnac.hzims</groupId>
<artifactId>middle-api</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/cn.afterturn/easypoi-spring-boot-starter -->
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-spring-boot-starter</artifactId>
<version>${easpoi.version}</version>
</dependency>
</dependencies>
</project>

49
hzims-service/ticket/pom.xml

@ -21,6 +21,8 @@
<easypoi.version>3.2.0</easypoi.version>
<documents4j.version>1.0.3</documents4j.version>
<swagger-bootstrap-ui.version>1.9.6</swagger-bootstrap-ui.version>
<!--特定版本-->
<poi.version>4.1.2</poi.version>
</properties>
<dependencies>
@ -57,7 +59,7 @@
<!--excel转换为pdf 通过https://repo.e-iceblue.cn/repository/maven-public/下载jar包-->
<dependency>
<groupId>e-iceblue </groupId>
<groupId>e-iceblue</groupId>
<artifactId>spire.xls.free</artifactId>
<version>3.9.1</version>
</dependency>
@ -66,33 +68,12 @@
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.0.0</version>
<version>${poi.version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.0.0</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.poi</groupId>-->
<!-- <artifactId>poi-ooxml-schemas</artifactId>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.poi</groupId>-->
<!-- <artifactId>poi-scratchpad</artifactId>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>cn.afterturn</groupId>-->
<!-- <artifactId>easypoi-web</artifactId>-->
<!-- <version>${easypoi.version}</version>-->
<!-- </dependency>-->
<!-- https://mvnrepository.com/artifact/cn.afterturn/easypoi-spring-boot-starter -->
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-spring-boot-starter</artifactId>
<version>4.0.0</version>
<version>${poi.version}</version>
</dependency>
<dependency>
@ -268,18 +249,18 @@
<artifactId>jedis</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.aliyun</groupId>-->
<!-- <artifactId>aliyun-java-sdk-ecs</artifactId>-->
<!-- <version>4.2.0</version>-->
<!-- <scope>compile</scope>-->
<!-- </dependency>-->
<!-- <groupId>com.aliyun</groupId>-->
<!-- <artifactId>aliyun-java-sdk-ecs</artifactId>-->
<!-- <version>4.2.0</version>-->
<!-- <scope>compile</scope>-->
<!-- </dependency>-->
<!--swagger-bootstrap-ui-->
<!-- <dependency>-->
<!-- <groupId>com.github.xiaoymin</groupId>-->
<!-- <artifactId>swagger-bootstrap-ui</artifactId>-->
<!-- <version>${swagger-bootstrap-ui.version}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.github.xiaoymin</groupId>-->
<!-- <artifactId>swagger-bootstrap-ui</artifactId>-->
<!-- <version>${swagger-bootstrap-ui.version}</version>-->
<!-- </dependency>-->
<dependency>
<groupId>com.hnac.hzims</groupId>
<artifactId>middle-api</artifactId>

9
pom.xml

@ -17,18 +17,14 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><java.version>1.8</java.version>
<maven.plugin.version>3.8.1</maven.plugin.version>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<hzinfo.data.version>5.0.1-SNAPSHOT</hzinfo.data.version>
<!-- <hzinfo.data.api.version>4.5.3-SNAPSHOT</hzinfo.data.api.version>-->
<!-- <hzinfo.data.sdk.version>4.5.4-RELEASE</hzinfo.data.sdk.version>-->
<flowable.version>6.4.2</flowable.version>
<dubbo.version>2.7.5</dubbo.version>
<spring.boot.version>2.1.14.RELEASE</spring.boot.version>
<spring.cloud.version>Greenwich.SR6</spring.cloud.version>
<spring.platform.version>Cairo-SR8</spring.platform.version>
<!-- 推荐使用Harbor -->
<docker.registry.url>192.168.0.157</docker.registry.url>
<docker.registry.host>http://${docker.registry.url}:2375</docker.registry.host>
@ -36,16 +32,13 @@
<docker.password>Harbor12345</docker.password>
<docker.namespace>blade</docker.namespace>
<docker.plugin.version>1.4.13</docker.plugin.version>
<poi.version>5.2.3</poi.version>
<!-- SonarQube代码走查 -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<sonar.host.url>http://192.168.65.246:9000</sonar.host.url>
<sonar.login>2743eef4724b4e61f7fc43ae4d8f51e458856771</sonar.login>
<easpoi.version>4.4.0</easpoi.version>
</properties>
<modules>

Loading…
Cancel
Save