Browse Source

1、增加commType区分是通信类型,给前端进行界面判断

dev
25604 2 weeks ago
parent
commit
1b3166d8b1
  1. 4
      user-service/src/main/java/com/mh/user/entity/BuildingEntity.java
  2. 1
      user-service/src/main/java/com/mh/user/mapper/BuildingMapper.java
  3. 13
      user-service/src/main/java/com/mh/user/model/AreaBuildingTreeModel.java
  4. 3
      user-service/src/main/java/com/mh/user/service/impl/BuildingServiceImpl.java
  5. 4
      user-service/src/main/resources/application-dev.yml
  6. 20
      user-service/src/main/resources/application-prod.yml
  7. 2
      user-service/src/main/resources/application.yml

4
user-service/src/main/java/com/mh/user/entity/BuildingEntity.java

@ -20,5 +20,9 @@ public class BuildingEntity {
private Double lowTankHeight;
private int pumpCount;
private int sort;
/**
* 0三旺通信1PLC通信
*/
private int commType;
}

1
user-service/src/main/java/com/mh/user/mapper/BuildingMapper.java

@ -137,6 +137,7 @@ public interface BuildingMapper {
@Result(property="tankHeight",column="tankHeight"),
@Result(property="lowTankHeight",column="low_tank_height"),
@Result(property="sort",column="sort"),
@Result(property="commType",column="comm_type")
})
@Select("select * from building ")
List<BuildingEntity> selectAll();

13
user-service/src/main/java/com/mh/user/model/AreaBuildingTreeModel.java

@ -25,8 +25,21 @@ public class AreaBuildingTreeModel {
*/
private int level;
/**
* 类型0三旺通信1PLC通信
*/
private int commType;
private List<AreaBuildingTreeModel> children;
public int getCommType() {
return commType;
}
public void setCommType(int commType) {
this.commType = commType;
}
public int getLevel() {
return level;
}

3
user-service/src/main/java/com/mh/user/service/impl/BuildingServiceImpl.java

@ -141,6 +141,7 @@ public class BuildingServiceImpl implements BuildingService {
projectNode.setSort(0);
projectNode.setParentId(-1L);
projectNode.setLevel(0);
projectNode.setCommType(0);
projectNode.setChildren(new ArrayList<>());
// 判断区域是否有数据
@ -155,6 +156,7 @@ public class BuildingServiceImpl implements BuildingService {
buildingNode.setParentId(0L);
buildingNode.setSort(building.getSort());
buildingNode.setLevel(2);
buildingNode.setCommType(building.getCommType());
buildingNode.setChildren(null);
return buildingNode;
})
@ -185,6 +187,7 @@ public class BuildingServiceImpl implements BuildingService {
buildingNode.setParentId(area.getId());
buildingNode.setSort(building.getSort());
buildingNode.setLevel(2);
buildingNode.setCommType(building.getCommType());
buildingNode.setChildren(null);
return buildingNode;
})

4
user-service/src/main/resources/application-dev.yml

@ -26,11 +26,11 @@ spring:
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
username: sa
password: mh@803
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=chws_hx;allowMultiQueries=true
# url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=chws_chx;allowMultiQueries=true;encrypt=false
# driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
# username: sa
# password: mh@803
# url: jdbc:sqlserver://119.29.33.133:2008;DatabaseName=chws_gsh;allowMultiQueries=true
# url: jdbc:sqlserver://119.29.33.133:2008;DatabaseName=chws_gsh;allowMultiQueries=true;encrypt=false
# driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
# username: chws
# password: mh@803

20
user-service/src/main/resources/application-prod.yml

@ -74,11 +74,11 @@ spring:
# username: chws_gw
# password: chws_gw@803
# # 华软江门
# url: jdbc:sqlserver://127.0.0.1:57238;DatabaseName=chws_jm;allowMultiQueries=true
# driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
# username: chws_jm
# password: Mhtech@803
# 华软江门
url: jdbc:sqlserver://127.0.0.1:57238;DatabaseName=chws_jm;allowMultiQueries=true
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
username: chws_jm
password: Mhtech@803
# # 珠海北师大
# url: jdbc:sqlserver://127.0.0.1:8033;DatabaseName=chws_bsdz;allowMultiQueries=true;encrypt=false
@ -86,11 +86,11 @@ spring:
# username: chws_bsdz
# password: Mhtech@803803
#南方学院
url: jdbc:sqlserver://175.178.153.91:8033;DatabaseName=chws_nfxy;allowMultiQueries=true;encrypt=false
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
username: chws_nfxy
password: minghan@123456
# #南方学院
# url: jdbc:sqlserver://175.178.153.91:8033;DatabaseName=chws_nfxy;allowMultiQueries=true;encrypt=false
# driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
# username: chws_nfxy
# password: minghan@123456
filters: stat,wall,config
max-active: 100

2
user-service/src/main/resources/application.yml

@ -1,6 +1,6 @@
spring:
profiles:
active: prod
active: dev
mvc:
pathmatch:
matching-strategy: ant_path_matcher

Loading…
Cancel
Save