Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
20a6cc83
Commit
20a6cc83
authored
Mar 31, 2026
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
平台升级nacos适配
parent
c88b4ead
Hide whitespace changes
Inline
Side-by-side
Showing
76 changed files
with
406 additions
and
507 deletions
+406
-507
DynamicEnumUtil.java
...m/yeejoin/amos/boot/biz/common/utils/DynamicEnumUtil.java
+133
-133
RedisUtils.java
...va/com/yeejoin/amos/boot/biz/common/utils/RedisUtils.java
+2
-1
pom.xml
amos-boot-data/amos-boot-data-accessapi/pom.xml
+0
-4
AccessapiApplication.java
.../src/main/java/com/yeejoin/amos/AccessapiApplication.java
+2
-5
SSOServiceImpl.java
...yeejoin/amos/api/openapi/face/service/SSOServiceImpl.java
+2
-2
TaAccessConfigBizeEnum.java
...om/yeejoin/amos/openapi/enums/TaAccessConfigBizeEnum.java
+1
-1
pom.xml
amos-boot-data/amos-boot-data-openapi/pom.xml
+0
-4
OpenapiApplication.java
...pi/src/main/java/com/yeejoin/amos/OpenapiApplication.java
+2
-7
Amos96333Application.java
.../src/main/java/com/yeejoin/amos/Amos96333Application.java
+0
-2
SpecialEquipmentController.java
...e/elevator/biz/controller/SpecialEquipmentController.java
+1
-1
ESElevatorServiceImpl.java
...dule/elevator/biz/service/impl/ESElevatorServiceImpl.java
+3
-19
TzsAuthServiceImpl.java
.../module/elevator/biz/service/impl/TzsAuthServiceImpl.java
+1
-1
RedisUtil.java
...eejoin/amos/boot/module/elevator/biz/utils/RedisUtil.java
+2
-2
CylinderInfoController.java
...e/elevator/flc/biz/controller/CylinderInfoController.java
+2
-2
UnitInfoController.java
...odule/elevator/flc/biz/controller/UnitInfoController.java
+1
-1
CylinderInfoServiceImpl.java
...levator/flc/biz/service/impl/CylinderInfoServiceImpl.java
+1
-1
AmosWeAppApplication.java
.../src/main/java/com/yeejoin/amos/AmosWeAppApplication.java
+0
-2
TzsAuthServiceImpl.java
.../boot/module/app/biz/service/impl/TzsAuthServiceImpl.java
+1
-1
RedisUtil.java
...com/yeejoin/amos/boot/module/app/biz/utils/RedisUtil.java
+1
-1
ESOrgUsrDto.java
.../yeejoin/amos/boot/module/common/api/dto/ESOrgUsrDto.java
+1
-1
ESOrgUsrService.java
.../boot/module/common/biz/service/impl/ESOrgUsrService.java
+31
-21
AmosCylinderApplication.java
...c/main/java/com/yeejoin/amos/AmosCylinderApplication.java
+1
-2
SpecialEquipmentController.java
...e/cylinder/biz/controller/SpecialEquipmentController.java
+1
-1
TzsAuthController.java
...oot/module/cylinder/biz/controller/TzsAuthController.java
+1
-1
ESElevatorServiceImpl.java
...dule/cylinder/biz/service/impl/ESElevatorServiceImpl.java
+4
-9
TzsAuthServiceImpl.java
.../module/cylinder/biz/service/impl/TzsAuthServiceImpl.java
+2
-2
RedisUtil.java
...eejoin/amos/boot/module/cylinder/biz/utils/RedisUtil.java
+1
-1
CylinderInfoController.java
...e/cylinder/flc/biz/controller/CylinderInfoController.java
+2
-2
UnitInfoController.java
...odule/cylinder/flc/biz/controller/UnitInfoController.java
+1
-1
CylinderInfoServiceImpl.java
...ylinder/flc/biz/service/impl/CylinderInfoServiceImpl.java
+1
-1
AmosJczsApplication.java
...z/src/main/java/com/yeejoin/amos/AmosJczsApplication.java
+0
-2
SpecialEquipmentController.java
...odule/jczs/biz/controller/SpecialEquipmentController.java
+1
-1
ESElevatorServiceImpl.java
...t/module/jczs/biz/service/impl/ESElevatorServiceImpl.java
+3
-15
TzsAuthServiceImpl.java
...boot/module/jczs/biz/service/impl/TzsAuthServiceImpl.java
+1
-1
RedisUtil.java
...om/yeejoin/amos/boot/module/jczs/biz/utils/RedisUtil.java
+2
-2
CylinderInfoController.java
...odule/jczs/flc/biz/controller/CylinderInfoController.java
+2
-2
UnitInfoController.java
...ot/module/jczs/flc/biz/controller/UnitInfoController.java
+1
-1
CylinderInfoServiceImpl.java
...le/jczs/flc/biz/service/impl/CylinderInfoServiceImpl.java
+1
-1
pom.xml
...m-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/pom.xml
+8
-0
AmosJGApplication.java
...biz/src/main/java/com/yeejoin/amos/AmosJGApplication.java
+5
-3
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+1
-0
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+2
-0
RedisUtil.java
.../com/yeejoin/amos/boot/module/jg/biz/utils/RedisUtil.java
+2
-2
application-cluster.properties
...-jg-biz/src/main/resources/application-cluster.properties
+0
-11
application-dev.properties
...dule-jg-biz/src/main/resources/application-dev.properties
+22
-31
application.properties
...t-module-jg-biz/src/main/resources/application.properties
+15
-43
registry.conf
.../amos-boot-module-jg-biz/src/main/resources/registry.conf
+9
-4
AmosJyjcApplication.java
...z/src/main/java/com/yeejoin/amos/AmosJyjcApplication.java
+0
-2
AmosStatisticsApplication.java
...main/java/com/yeejoin/amos/AmosStatisticsApplication.java
+0
-1
AmosTcmApplication.java
...iz/src/main/java/com/yeejoin/amos/AmosTcmApplication.java
+0
-2
SpecialEquipmentController.java
...module/tcm/biz/controller/SpecialEquipmentController.java
+1
-1
ESElevatorServiceImpl.java
...ot/module/tcm/biz/service/impl/ESElevatorServiceImpl.java
+4
-8
TzsAuthServiceImpl.java
.../boot/module/tcm/biz/service/impl/TzsAuthServiceImpl.java
+1
-1
RedisUtil.java
...com/yeejoin/amos/boot/module/tcm/biz/utils/RedisUtil.java
+2
-2
CylinderInfoController.java
...module/tcm/flc/biz/controller/CylinderInfoController.java
+2
-2
CylinderInfoServiceImpl.java
...ule/tcm/flc/biz/service/impl/CylinderInfoServiceImpl.java
+1
-1
application-cluster.properties
...tcm-biz/src/main/resources/application-cluster.properties
+12
-12
application-dev.properties
...ule-tcm-biz/src/main/resources/application-dev.properties
+9
-8
application.properties
...-module-tcm-biz/src/main/resources/application.properties
+16
-15
pom.xml
amos-boot-system-tzs/amos-boot-module-tcm/pom.xml
+6
-0
PatrolApplication.java
...biz/src/main/java/com/yeejoin/amos/PatrolApplication.java
+0
-3
PlanTaskServiceImpl.java
...mos/patrol/business/service/impl/PlanTaskServiceImpl.java
+24
-7
AmosYmtApplication.java
...iz/src/main/java/com/yeejoin/amos/AmosYmtApplication.java
+0
-3
SpecialEquipmentController.java
...module/ymt/biz/controller/SpecialEquipmentController.java
+3
-29
ESElevatorServiceImpl.java
...ot/module/ymt/biz/service/impl/ESElevatorServiceImpl.java
+2
-2
TzsAuthServiceImpl.java
.../boot/module/ymt/biz/service/impl/TzsAuthServiceImpl.java
+1
-1
RedisUtil.java
...com/yeejoin/amos/boot/module/ymt/biz/utils/RedisUtil.java
+1
-1
CylinderInfoController.java
...module/ymt/flc/biz/controller/CylinderInfoController.java
+2
-2
UnitInfoController.java
...oot/module/ymt/flc/biz/controller/UnitInfoController.java
+1
-1
CylinderInfoServiceImpl.java
...ule/ymt/flc/biz/service/impl/CylinderInfoServiceImpl.java
+1
-1
application-cluster.properties
...ymt-biz/src/main/resources/application-cluster.properties
+3
-19
application-dev.properties
...ule-ymt-biz/src/main/resources/application-dev.properties
+7
-11
application.properties
...-module-ymt-biz/src/main/resources/application.properties
+2
-10
RedisUtil.java
.../com/yeejoin/amos/boot/module/ys/biz/utils/RedisUtil.java
+1
-1
pom.xml
amos-boot-system-tzs/pom.xml
+15
-5
pom.xml
pom.xml
+13
-5
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/DynamicEnumUtil.java
View file @
20a6cc83
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
utils
;
import
sun.reflect.ConstructorAccessor
;
import
sun.reflect.FieldAccessor
;
import
sun.reflect.ReflectionFactory
;
import
java.lang.reflect.AccessibleObject
;
import
java.lang.reflect.Array
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Modifier
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
/**
* 动态枚举工具类
*
* @author DELL
*/
public
class
DynamicEnumUtil
{
private
static
ReflectionFactory
reflectionFactory
=
ReflectionFactory
.
getReflectionFactory
();
private
static
void
setFailsafeFieldValue
(
Field
field
,
Object
target
,
Object
value
)
throws
NoSuchFieldException
,
IllegalAccessException
{
// 反射访问私有变量
field
.
setAccessible
(
true
);
/**
* 接下来,我们将字段实例中的修饰符更改为不再是final,
* 从而使反射允许我们修改静态final字段。
*/
Field
modifiersField
=
Field
.
class
.
getDeclaredField
(
"modifiers"
);
modifiersField
.
setAccessible
(
true
);
int
modifiers
=
modifiersField
.
getInt
(
field
);
// 去掉修饰符int中的最后一位
modifiers
&=
~
Modifier
.
FINAL
;
modifiersField
.
setInt
(
field
,
modifiers
);
FieldAccessor
fa
=
reflectionFactory
.
newFieldAccessor
(
field
,
false
);
fa
.
set
(
target
,
value
);
}
private
static
void
blankField
(
Class
<?>
enumClass
,
String
fieldName
)
throws
NoSuchFieldException
,
IllegalAccessException
{
for
(
Field
field
:
Class
.
class
.
getDeclaredFields
())
{
if
(
field
.
getName
().
contains
(
fieldName
))
{
AccessibleObject
.
setAccessible
(
new
Field
[]{
field
},
true
);
setFailsafeFieldValue
(
field
,
enumClass
,
null
);
break
;
}
}
}
private
static
void
cleanEnumCache
(
Class
<?>
enumClass
)
throws
NoSuchFieldException
,
IllegalAccessException
{
// Sun (Oracle?!?) JDK 1.5/6
blankField
(
enumClass
,
"enumConstantDirectory"
);
// IBM JDK
blankField
(
enumClass
,
"enumConstants"
);
}
private
static
ConstructorAccessor
getConstructorAccessor
(
Class
<?>
enumClass
,
Class
<?>[]
additionalParameterTypes
)
throws
NoSuchMethodException
{
Class
<?>[]
parameterTypes
=
new
Class
[
additionalParameterTypes
.
length
+
2
];
parameterTypes
[
0
]
=
String
.
class
;
parameterTypes
[
1
]
=
int
.
class
;
System
.
arraycopy
(
additionalParameterTypes
,
0
,
parameterTypes
,
2
,
additionalParameterTypes
.
length
);
return
reflectionFactory
.
newConstructorAccessor
(
enumClass
.
getDeclaredConstructor
(
parameterTypes
));
}
private
static
Object
makeEnum
(
Class
<?>
enumClass
,
String
value
,
int
ordinal
,
Class
<?>[]
additionalTypes
,
Object
[]
additionalValues
)
throws
Exception
{
Object
[]
params
=
new
Object
[
additionalValues
.
length
+
2
];
params
[
0
]
=
value
;
params
[
1
]
=
Integer
.
valueOf
(
ordinal
);
System
.
arraycopy
(
additionalValues
,
0
,
params
,
2
,
additionalValues
.
length
);
return
enumClass
.
cast
(
getConstructorAccessor
(
enumClass
,
additionalTypes
).
newInstance
(
params
));
}
/**
* 将枚举实例添加到作为参数提供的枚举类中
*
* @param <T>
* @param enumType 要修改的枚举类型
* @param enumName 添加的枚举类型名字
* @param additionalTypes 枚举类型参数类型列表
* @param additionalValues 枚举类型参数值列表
* @return
*/
@SuppressWarnings
(
"unchecked"
)
public
static
<
T
extends
Enum
<?>>
T
addEnum
(
Class
<
T
>
enumType
,
String
enumName
,
Class
<?>[]
additionalTypes
,
Object
[]
additionalValues
)
{
// 0. 检查类型
if
(!
Enum
.
class
.
isAssignableFrom
(
enumType
))
{
throw
new
RuntimeException
(
"class "
+
enumType
+
" is not an instance of Enum"
);
}
// 1. 在枚举类中查找“$values”持有者并获取以前的枚举实例
Field
valuesField
=
null
;
Field
[]
fields
=
enumType
.
getDeclaredFields
();
for
(
Field
field
:
fields
)
{
if
(
field
.
getName
().
contains
(
"$VALUES"
))
{
valuesField
=
field
;
break
;
}
}
AccessibleObject
.
setAccessible
(
new
Field
[]{
valuesField
},
true
);
try
{
// 2. 将他拷贝到数组
T
[]
previousValues
=
(
T
[])
valuesField
.
get
(
enumType
);
List
<
T
>
values
=
new
ArrayList
<
T
>(
Arrays
.
asList
(
previousValues
));
// 3. 创建新的枚举项
T
newValue
=
(
T
)
makeEnum
(
enumType
,
enumName
,
values
.
size
(),
additionalTypes
,
additionalValues
);
// 4. 添加新的枚举项
values
.
add
(
newValue
);
// 5. 设定拷贝的数组,到枚举类型
setFailsafeFieldValue
(
valuesField
,
null
,
values
.
toArray
((
T
[])
Array
.
newInstance
(
enumType
,
0
)));
// 6. 清楚枚举的缓存
cleanEnumCache
(
enumType
);
return
newValue
;
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
.
getMessage
(),
e
);
}
}
}
\ No newline at end of file
//package com.yeejoin.amos.boot.biz.common.utils;
//
//import sun.reflect.ConstructorAccessor;
//import sun.reflect.FieldAccessor;
//import sun.reflect.ReflectionFactory;
//
//import java.lang.reflect.AccessibleObject;
//import java.lang.reflect.Array;
//import java.lang.reflect.Field;
//import java.lang.reflect.Modifier;
//import java.util.ArrayList;
//import java.util.Arrays;
//import java.util.List;
//
///**
// * 动态枚举工具类
// *
// * @author DELL
// */
//public class DynamicEnumUtil {
// private static ReflectionFactory reflectionFactory = ReflectionFactory.getReflectionFactory();
//
// private static void setFailsafeFieldValue(Field field, Object target, Object value) throws NoSuchFieldException,
// IllegalAccessException {
//
// // 反射访问私有变量
// field.setAccessible(true);
//
// /**
// * 接下来,我们将字段实例中的修饰符更改为不再是final,
// * 从而使反射允许我们修改静态final字段。
// */
// Field modifiersField = Field.class.getDeclaredField("modifiers");
// modifiersField.setAccessible(true);
// int modifiers = modifiersField.getInt(field);
//
// // 去掉修饰符int中的最后一位
// modifiers &= ~Modifier.FINAL;
// modifiersField.setInt(field, modifiers);
//
// FieldAccessor fa = reflectionFactory.newFieldAccessor(field, false);
// fa.set(target, value);
// }
//
// private static void blankField(Class<?> enumClass, String fieldName) throws NoSuchFieldException,
// IllegalAccessException {
// for (Field field : Class.class.getDeclaredFields()) {
// if (field.getName().contains(fieldName)) {
// AccessibleObject.setAccessible(new Field[]{field}, true);
// setFailsafeFieldValue(field, enumClass, null);
// break;
// }
// }
// }
//
// private static void cleanEnumCache(Class<?> enumClass) throws NoSuchFieldException, IllegalAccessException {
// // Sun (Oracle?!?) JDK 1.5/6
// blankField(enumClass, "enumConstantDirectory");
// // IBM JDK
// blankField(enumClass, "enumConstants");
// }
//
// private static ConstructorAccessor getConstructorAccessor(Class<?> enumClass, Class<?>[] additionalParameterTypes)
// throws NoSuchMethodException {
// Class<?>[] parameterTypes = new Class[additionalParameterTypes.length + 2];
// parameterTypes[0] = String.class;
// parameterTypes[1] = int.class;
// System.arraycopy(additionalParameterTypes, 0, parameterTypes, 2, additionalParameterTypes.length);
// return reflectionFactory.newConstructorAccessor(enumClass.getDeclaredConstructor(parameterTypes));
// }
//
// private static Object makeEnum(Class<?> enumClass, String value, int ordinal, Class<?>[] additionalTypes,
// Object[] additionalValues) throws Exception {
// Object[] params = new Object[additionalValues.length + 2];
// params[0] = value;
// params[1] = Integer.valueOf(ordinal);
// System.arraycopy(additionalValues, 0, params, 2, additionalValues.length);
// return enumClass.cast(getConstructorAccessor(enumClass, additionalTypes).newInstance(params));
// }
//
// /**
// * 将枚举实例添加到作为参数提供的枚举类中
// *
// * @param <T>
// * @param enumType 要修改的枚举类型
// * @param enumName 添加的枚举类型名字
// * @param additionalTypes 枚举类型参数类型列表
// * @param additionalValues 枚举类型参数值列表
// * @return
// */
// @SuppressWarnings("unchecked")
// public static <T extends Enum<?>> T addEnum(Class<T> enumType, String enumName, Class<?>[] additionalTypes,
// Object[] additionalValues) {
//
// // 0. 检查类型
// if (!Enum.class.isAssignableFrom(enumType)) {
// throw new RuntimeException("class " + enumType + " is not an instance of Enum");
// }
//
// // 1. 在枚举类中查找“$values”持有者并获取以前的枚举实例
// Field valuesField = null;
// Field[] fields = enumType.getDeclaredFields();
// for (Field field : fields) {
// if (field.getName().contains("$VALUES")) {
// valuesField = field;
// break;
// }
// }
// AccessibleObject.setAccessible(new Field[]{valuesField}, true);
//
// try {
// // 2. 将他拷贝到数组
// T[] previousValues = (T[]) valuesField.get(enumType);
// List<T> values = new ArrayList<T>(Arrays.asList(previousValues));
//
// // 3. 创建新的枚举项
// T newValue = (T) makeEnum(enumType, enumName, values.size(), additionalTypes, additionalValues);
//
// // 4. 添加新的枚举项
// values.add(newValue);
//
// // 5. 设定拷贝的数组,到枚举类型
// setFailsafeFieldValue(valuesField, null, values.toArray((T[]) Array.newInstance(enumType, 0)));
//
// // 6. 清楚枚举的缓存
// cleanEnumCache(enumType);
// return newValue;
// } catch (Exception e) {
// throw new RuntimeException(e.getMessage(), e);
// }
// }
//}
\ No newline at end of file
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/RedisUtils.java
View file @
20a6cc83
...
...
@@ -8,6 +8,7 @@ import org.springframework.util.CollectionUtils;
import
org.typroject.tyboot.component.cache.enumeration.CacheType
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
...
...
@@ -71,7 +72,7 @@ public class RedisUtils {
if
(
key
.
length
==
1
)
{
redisTemplate
.
delete
(
key
[
0
]);
}
else
{
redisTemplate
.
delete
(
CollectionUtils
.
arrayToList
(
key
))
;
redisTemplate
.
delete
(
Arrays
.
asList
(
key
));
;
}
}
}
...
...
amos-boot-data/amos-boot-data-accessapi/pom.xml
View file @
20a6cc83
...
...
@@ -18,10 +18,6 @@
</properties>
<dependencies>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-client
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
</dependency>
...
...
amos-boot-data/amos-boot-data-accessapi/src/main/java/com/yeejoin/amos/AccessapiApplication.java
View file @
20a6cc83
package
com
.
yeejoin
.
amos
;
import
java.net.InetAddress
;
import
com.yeejoin.amos.api.openapi.face.service.TaAccessConfigServiceImpl
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.mybatis.spring.annotation.MapperScan
;
...
...
@@ -11,7 +10,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.Bean
;
...
...
@@ -22,7 +20,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler
;
import
com.yeejoin.amos.api.openapi.face.service.TaAccessConfigServiceImpl
;
import
java.net.InetAddress
;
/**
*
...
...
@@ -40,7 +38,6 @@ import com.yeejoin.amos.api.openapi.face.service.TaAccessConfigServiceImpl;
@EnableDiscoveryClient
@EnableFeignClients
@EnableAsync
@EnableEurekaClient
@EnableScheduling
@MapperScan
(
value
=
{
"org.typroject.tyboot.*.*.face.orm.dao"
,
"com.yeejoin.amos.api.*.face.orm.dao"
,
"org.typroject.tyboot.face.*.orm.dao*"
,
"com.yeejoin.amos.boot.biz.common.dao.mapper"
})
...
...
amos-boot-data/amos-boot-data-accessapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/SSOServiceImpl.java
View file @
20a6cc83
...
...
@@ -11,7 +11,7 @@ import com.yeejoin.amos.component.robot.AmosRequestContext;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.VerifyCodeAuthModel
;
import
com.yeejoin.amos.feign.privilege.util.
Aes
Util
;
import
com.yeejoin.amos.feign.privilege.util.
Pwd
Util
;
import
com.yeejoin.amos.openapi.enums.SSOLoginStatusEnum
;
import
com.yeejoin.amos.openapi.enums.TaAccessConfigBizeEnum
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -87,7 +87,7 @@ public class SSOServiceImpl {
Map
<
String
,
String
>
agencyUserModel
=
(
Map
<
String
,
String
>)
agencyUserModelList
.
getRecords
().
get
(
0
);
VerifyCodeAuthModel
verifyCodeAuthModel
=
new
VerifyCodeAuthModel
();
verifyCodeAuthModel
.
setLoginId
(
agencyUserModel
.
get
(
"userName"
));
verifyCodeAuthModel
.
setVerifyCode
(
AesUtil
.
encode
(
agencyUserModel
.
get
(
"userName"
),
"qaz"
));
verifyCodeAuthModel
.
setVerifyCode
(
PwdUtil
.
encode
(
agencyUserModel
.
get
(
"userName"
)
));
FeignClientResult
<
Map
<
String
,
String
>>
loginResult
;
loginResult
=
Privilege
.
authClient
.
userNameVerifyCode
(
verifyCodeAuthModel
);
if
(
loginResult
.
getStatus
()
!=
200
)
{
...
...
amos-boot-data/amos-boot-data-accessapi/src/main/java/com/yeejoin/amos/openapi/enums/TaAccessConfigBizeEnum.java
View file @
20a6cc83
package
com
.
yeejoin
.
amos
.
openapi
.
enums
;
import
com.google.common.collect
.Lists
;
import
org.apache.commons.compress.utils
.Lists
;
import
java.util.List
;
...
...
amos-boot-data/amos-boot-data-openapi/pom.xml
View file @
20a6cc83
...
...
@@ -14,10 +14,6 @@
<dependencies>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-client
</artifactId>
</dependency>
<!-- druid -->
<!-- <dependency>-->
<!-- <groupId>com.alibaba</groupId>-->
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/OpenapiApplication.java
View file @
20a6cc83
package
com
.
yeejoin
.
amos
;
import
java.net.InetAddress
;
import
com.yeejoin.amos.api.openapi.service.StartPlatformTokenService
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.WebApplicationType
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.context.annotation.FilterType
;
import
org.springframework.core.env.Environment
;
...
...
@@ -26,6 +20,8 @@ import org.springframework.scheduling.annotation.EnableScheduling;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler
;
import
java.net.InetAddress
;
/**
*
* <pre>
...
...
@@ -42,7 +38,6 @@ import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
@EnableDiscoveryClient
@EnableFeignClients
@EnableAsync
@EnableEurekaClient
@EnableScheduling
@MapperScan
(
basePackages
=
{
"org.typroject.tyboot.*.*.face.orm.dao"
,
"com.yeejoin.amos.api.*.face.orm.dao"
,
...
...
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/Amos96333Application.java
View file @
20a6cc83
...
...
@@ -12,7 +12,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.Bean
;
...
...
@@ -41,7 +40,6 @@ import java.net.UnknownHostException;
@EnableFeignClients
@EnableAsync
@EnableSwagger2WebMvc
@EnableEurekaClient
@EnableSchedulerLock
(
defaultLockAtMostFor
=
"10m"
)
//@EnableScheduling
@MapperScan
({
"org.typroject.tyboot.demo.face.orm.dao*"
,
"org.typroject.tyboot.face.*.orm.dao*"
,
...
...
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/controller/SpecialEquipmentController.java
View file @
20a6cc83
...
...
@@ -297,7 +297,7 @@ public class SpecialEquipmentController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"初始化设备"
,
notes
=
"初始化设备"
)
public
void
initEquipment
(
Integer
num
){
IPage
<
Elevator
>
elevatorPage
=
new
Page
<>();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
// 按照最低级来查询数量 保存地址
RegionModel
start
=
tree
.
get
(
0
);
// 省
List
<
RegionModel
>
city
=
(
List
<
RegionModel
>)
start
.
getChildren
();
...
...
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/service/impl/ESElevatorServiceImpl.java
View file @
20a6cc83
package
com
.
yeejoin
.
amos
.
boot
.
module
.
elevator
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.elevator.api.dto.ESAlertCalledDto
;
import
com.yeejoin.amos.boot.module.elevator.api.dto.EsElevatorDto
;
import
com.yeejoin.amos.boot.module.elevator.api.dto.EsSpecialEquipmentDto
;
import
com.yeejoin.amos.boot.module.elevator.api.dto.EsSpecialEquipmentListDto
;
import
com.yeejoin.amos.boot.module.elevator.api.dto.SpecialEquipmentDto
;
import
com.yeejoin.amos.boot.module.elevator.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.elevator.api.entity.Elevator
;
import
com.yeejoin.amos.boot.module.elevator.api.entity.EsElevator
;
import
com.yeejoin.amos.boot.module.elevator.api.mapper.SuperviseInfoMapper
;
import
com.yeejoin.amos.boot.module.elevator.biz.dao.ESElavtorRepository
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.elasticsearch.common.geo.GeoBoundingBox
;
import
org.elasticsearch.common.geo.GeoPoint
;
import
org.elasticsearch.index.query.BoolQueryBuilder
;
import
org.elasticsearch.index.query.ConstantScoreQueryBuilder
;
import
org.elasticsearch.index.query.GeoBoundingBoxQueryBuilder
;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.elasticsearch.search.aggregations.Aggregation
;
import
org.elasticsearch.search.aggregations.AggregationBuilder
;
import
org.elasticsearch.search.aggregations.AggregationBuilders
;
import
org.elasticsearch.search.aggregations.Aggregations
;
import
org.elasticsearch.search.aggregations.bucket.filter.Filters
;
import
org.elasticsearch.search.aggregations.bucket.geogrid.GeoHashGridAggregationBuilder
;
import
org.elasticsearch.search.aggregations.bucket.geogrid.ParsedGeoHashGrid
;
import
org.elasticsearch.search.aggregations.bucket.geogrid.ParsedGeoHashGridBucket
;
import
org.elasticsearch.search.aggregations.bucket.terms.ParsedLongTerms
;
import
org.elasticsearch.search.aggregations.bucket.terms.ParsedStringTerms
;
import
org.elasticsearch.search.aggregations.bucket.terms.Terms
;
import
org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -50,12 +39,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.StopWatch
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -401,7 +385,7 @@ public class ESElevatorServiceImpl {
query
.
setTrackTotalHits
(
true
);
query
.
setMaxResults
(
10000
);
SearchHits
<
EsElevator
>
searchHits
=
elasticsearchTemplate
.
search
(
query
,
EsElevator
.
class
);
Aggregations
aggregations
=
searchHits
.
getA
ggregations
();
Aggregations
aggregations
=
(
Aggregations
)
Objects
.
requireNonNull
(
searchHits
.
getAggregations
()).
a
ggregations
();
ParsedGeoHashGrid
aggregation
=
aggregations
.
get
(
"96333"
);
List
<?
extends
Terms
.
Bucket
>
buckets
=
(
List
<?
extends
Terms
.
Bucket
>)
aggregation
.
getBuckets
();
// 通过debug能看到aggregation.getBuckets里就是我所需要的分组信息,但是直接.出不来,这里我是手动拼出来并强转一下(ParsedLongTerms)
...
...
@@ -581,7 +565,7 @@ public class ESElevatorServiceImpl {
.
withQuery
(
boolMust
).
addAggregation
(
termsAggregationBuilder
);
SearchHits
<
EsElevator
>
searchHits
=
elasticsearchTemplate
.
search
(
queryBuilder
.
build
(),
EsElevator
.
class
);
Aggregations
aggregations
=
searchHits
.
getA
ggregations
();
Aggregations
aggregations
=
(
Aggregations
)
Objects
.
requireNonNull
(
searchHits
.
getAggregations
()).
a
ggregations
();
Terms
aggregation
=
aggregations
.
get
(
"number"
);
Map
<
String
,
Long
>
result
=
new
HashMap
<>();
for
(
Terms
.
Bucket
bucket
:
aggregation
.
getBuckets
())
{
...
...
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/service/impl/TzsAuthServiceImpl.java
View file @
20a6cc83
...
...
@@ -80,7 +80,7 @@ public class TzsAuthServiceImpl implements TzsAuthService {
List
<
String
>
regionList
=
this
.
getUserRegionCode
();
//AgencyUserModel me = Privilege.agencyUserClient.getme().getResult();
startPlatformTokenService
.
getToken
();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
// 循环list 将List 封装为 省市区 SET
Set
<
String
>
city
=
new
HashSet
<>();
Set
<
String
>
district
=
new
HashSet
<>();
...
...
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/biz/utils/RedisUtil.java
View file @
20a6cc83
...
...
@@ -3,8 +3,8 @@ package com.yeejoin.amos.boot.module.elevator.biz.utils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
...
...
@@ -76,7 +76,7 @@ public class RedisUtil {
if
(
key
.
length
==
1
)
{
redisTemplate
.
delete
(
key
[
0
]);
}
else
{
redisTemplate
.
delete
(
CollectionUtils
.
arrayToList
(
key
))
;
redisTemplate
.
delete
(
Arrays
.
asList
(
key
));
;
}
}
}
...
...
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/flc/biz/controller/CylinderInfoController.java
View file @
20a6cc83
...
...
@@ -885,7 +885,7 @@ public class CylinderInfoController extends BaseController {
CylinderUnit
cylinderUnit
=
cylinderUnitServiceImpl
.
getById
(
sequenceNbr
);
if
(
this
.
regionMap
==
null
)
{
this
.
regionMap
=
new
HashMap
<>();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
regions
.
stream
().
forEach
(
t
->
{
this
.
addRegionsMap
(
regionMap
,
t
);
});
...
...
@@ -985,7 +985,7 @@ public class CylinderInfoController extends BaseController {
if
(
this
.
regionMap
==
null
)
{
this
.
regionMap
=
new
HashMap
<>();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
regions
.
stream
().
forEach
(
t
->
{
this
.
addRegionsMap
(
regionMap
,
t
);
});
...
...
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/flc/biz/controller/UnitInfoController.java
View file @
20a6cc83
...
...
@@ -105,7 +105,7 @@ public class UnitInfoController extends BaseController {
tzsAuthServiceImpl
.
setRequestContext
();
Collection
<
RegionModel
>
result
=
null
;
if
(
parentId
==
null
)
{
result
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
result
=
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
}
else
{
result
=
Systemctl
.
regionClient
.
querySubAgencyTree
(
parentId
).
getResult
();
}
...
...
amos-boot-system-tzs/amos-boot-module-96333/amos-boot-module-96333-biz/src/main/java/com/yeejoin/amos/boot/module/elevator/flc/biz/service/impl/CylinderInfoServiceImpl.java
View file @
20a6cc83
...
...
@@ -906,7 +906,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
private
void
countByRegion
(
Consumer
<
RegionModel
>
consumer
)
{
List
<
RegionModel
>
regionList
=
new
ArrayList
<>();
startPlatformTokenService
.
getToken
();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
regions
.
forEach
(
regionModel
->
convertTreeToList
(
regionList
,
regionModel
));
regionList
.
forEach
(
consumer
);
}
...
...
amos-boot-system-tzs/amos-boot-module-app/amos-boot-module-app-biz/src/main/java/com/yeejoin/amos/AmosWeAppApplication.java
View file @
20a6cc83
...
...
@@ -12,7 +12,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.Bean
;
...
...
@@ -41,7 +40,6 @@ import java.net.UnknownHostException;
@EnableFeignClients
@EnableAsync
@EnableSwagger2WebMvc
@EnableEurekaClient
@EnableSchedulerLock
(
defaultLockAtMostFor
=
"10m"
)
//@EnableScheduling
@MapperScan
({
"org.typroject.tyboot.demo.face.orm.dao*"
,
"org.typroject.tyboot.face.*.orm.dao*"
,
...
...
amos-boot-system-tzs/amos-boot-module-app/amos-boot-module-app-biz/src/main/java/com/yeejoin/amos/boot/module/app/biz/service/impl/TzsAuthServiceImpl.java
View file @
20a6cc83
...
...
@@ -86,7 +86,7 @@ public class TzsAuthServiceImpl implements TzsAuthService {
List
<
String
>
regionList
=
this
.
getUserRegionCode
();
//AgencyUserModel me = Privilege.agencyUserClient.getme().getResult();
startPlatformTokenService
.
getToken
();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
// 循环list 将List 封装为 省市区 SET
Set
<
String
>
city
=
new
HashSet
<>();
Set
<
String
>
district
=
new
HashSet
<>();
...
...
amos-boot-system-tzs/amos-boot-module-app/amos-boot-module-app-biz/src/main/java/com/yeejoin/amos/boot/module/app/biz/utils/RedisUtil.java
View file @
20a6cc83
...
...
@@ -76,7 +76,7 @@ public class RedisUtil {
if
(
key
.
length
==
1
)
{
redisTemplate
.
delete
(
key
[
0
]);
}
else
{
redisTemplate
.
delete
(
CollectionUtils
.
arrayToList
(
key
))
;
redisTemplate
.
delete
(
Arrays
.
asList
(
key
));
;
}
}
}
...
...
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/ESOrgUsrDto.java
View file @
20a6cc83
...
...
@@ -14,7 +14,7 @@ import org.springframework.data.elasticsearch.annotations.Mapping;
*
*/
@Data
@Document
(
indexName
=
"org"
,
type
=
"_doc"
,
shards
=
1
,
replicas
=
0
)
@Document
(
indexName
=
"org"
,
shards
=
1
,
replicas
=
0
)
public
class
ESOrgUsrDto
{
/**部门主键 */
...
...
amos-boot-system-tzs/amos-boot-module-common/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/ESOrgUsrService.java
View file @
20a6cc83
...
...
@@ -10,21 +10,26 @@ import org.elasticsearch.index.query.MatchQueryBuilder;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate
;
import
org.springframework.data.elasticsearch.core.SearchHit
;
import
org.springframework.data.elasticsearch.core.query.NativeSearchQuery
;
import
org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.ArrayList
;
import
java.util.LinkedHashSet
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
/**
* <pre>
* 警情信息
ES
检索服务
* 警情信息
ES
检索服务
* </pre>
*
* @author gwb
* @version $Id: ESAlertCalledService.java, v 0.1 2021
年6月19日 下午
5:12:01 gwb Exp $
* @version $Id: ESAlertCalledService.java, v 0.1 2021
年 6 月 19 日 下午
5:12:01 gwb Exp $
*/
@Service
public
class
ESOrgUsrService
{
...
...
@@ -33,13 +38,16 @@ public class ESOrgUsrService {
private
ESOrgUsrDtoRepository
esOrgUsrDtoRepository
;
@Autowired
private
ElasticsearchRestTemplate
elasticsearchRestTemplate
;
@Autowired
private
OrgUsrServiceImpl
orgUsrServiceImpl
;
public
void
init
()
throws
Exception
{
// elasticsearchTemplate.deleteIndex(ESOrgUsrDto.class);
// elasticsearchTemplate.createIndex(ESOrgUsrDto.class);
// elasticsearchTemplate.putMapping(ESOrgUsrDto.class);
//初始化ES,重建索引
//初始化
ES,重建索引
initEs
();
}
...
...
@@ -65,7 +73,7 @@ public class ESOrgUsrService {
* 批量保存
* </pre>
*
* @param
list
警情信息列表
* @param
orgUsrs
警情信息列表
*/
public
void
saveAll
(
List
<
OrgUsr
>
orgUsrs
)
throws
Exception
{
...
...
@@ -119,22 +127,24 @@ public class ESOrgUsrService {
public
ESOrgUsrDto
saveAlertCalledToESNew
(
OrgUsr
orgUsr
)
throws
Exception
{
ESOrgUsrDto
esOrgUsrDto
=
new
ESOrgUsrDto
();
String
seqStr
=
String
.
valueOf
(
orgUsr
.
getSequenceNbr
());
try
{
Long
seq
=
Long
.
parseLong
(
seqStr
);
esOrgUsrDto
.
setSequenceNbr
(
seq
);
MatchQueryBuilder
queryBuilder
=
null
;
//设置模糊搜索
// 使用 ElasticsearchRestTemplate 进行查询
if
(
orgUsr
.
getBizOrgName
()
!=
null
)
{
queryBuilder
=
QueryBuilders
.
matchQuery
(
"bizOrgName"
,
orgUsr
.
getBizOrgName
());
}
Iterable
<
ESOrgUsrDto
>
search
=
esOrgUsrDtoRepository
.
search
(
queryBuilder
);
if
(!
search
.
iterator
().
hasNext
())
{
esOrgUsrDto
.
setBizOrgName
(
orgUsr
.
getBizOrgName
());
esOrgUsrDtoRepository
.
save
(
esOrgUsrDto
);
MatchQueryBuilder
queryBuilder
=
QueryBuilders
.
matchQuery
(
"bizOrgName"
,
orgUsr
.
getBizOrgName
());
NativeSearchQuery
searchQuery
=
new
NativeSearchQueryBuilder
().
withQuery
(
queryBuilder
).
build
();
List
<
ESOrgUsrDto
>
results
=
elasticsearchRestTemplate
.
search
(
searchQuery
,
ESOrgUsrDto
.
class
)
.
stream
()
.
map
(
SearchHit:
:
getContent
)
.
collect
(
Collectors
.
toList
());
if
(
results
.
isEmpty
())
{
esOrgUsrDto
.
setBizOrgName
(
orgUsr
.
getBizOrgName
());
esOrgUsrDtoRepository
.
save
(
esOrgUsrDto
);
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
@@ -144,7 +154,7 @@ public class ESOrgUsrService {
/**
* <pre>
* 从
ES
库批量删除
* 从
ES
库批量删除
* </pre>
*/
public
Boolean
deleteById
(
Long
sequenceNbr
)
throws
Exception
{
...
...
@@ -162,18 +172,18 @@ public class ESOrgUsrService {
*/
@SuppressWarnings
({
"rawtypes"
})
public
Set
<
ESOrgUsrDto
>
queryByKeys
(
String
name
)
{
//创建builder
//创建
builder
FuzzyQueryBuilder
queryBuilder
=
null
;
//设置模糊搜索
if
(
name
!=
null
)
{
queryBuilder
=
QueryBuilders
.
fuzzyQuery
(
"bizOrgName"
,
name
);
}
Iterable
<
ESOrgUsrDto
>
search
=
esOrgUsrDtoRepository
.
search
(
queryBuilder
);
Set
<
ESOrgUsrDto
>
list
=
new
LinkedHashSet
<>();
search
.
forEach
(
esOrgUsrDto
->
{
list
.
add
(
esOrgUsrDto
);
});
NativeSearchQuery
searchQuery
=
new
NativeSearchQueryBuilder
().
withQuery
(
queryBuilder
).
build
();
List
<
ESOrgUsrDto
>
results
=
elasticsearchRestTemplate
.
search
(
searchQuery
,
ESOrgUsrDto
.
class
)
.
stream
()
.
map
(
SearchHit:
:
getContent
)
.
collect
(
Collectors
.
toList
());
Set
<
ESOrgUsrDto
>
list
=
new
LinkedHashSet
<>(
results
);
return
list
;
...
...
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-biz/src/main/java/com/yeejoin/amos/AmosCylinderApplication.java
View file @
20a6cc83
...
...
@@ -14,7 +14,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.Bean
;
...
...
@@ -25,6 +24,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc
;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
...
...
@@ -43,7 +43,6 @@ import java.net.UnknownHostException;
@EnableFeignClients
@EnableAsync
@EnableSwagger2WebMvc
@EnableEurekaClient
@EnableScheduling
@EnableSchedulerLock
(
defaultLockAtMostFor
=
"10m"
)
@MapperScan
({
"org.typroject.tyboot.demo.face.orm.dao*"
,
"org.typroject.tyboot.face.*.orm.dao*"
,
...
...
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-biz/src/main/java/com/yeejoin/amos/boot/module/cylinder/biz/controller/SpecialEquipmentController.java
View file @
20a6cc83
...
...
@@ -282,7 +282,7 @@ public class SpecialEquipmentController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"初始化设备"
,
notes
=
"初始化设备"
)
public
void
initEquipment
(
Integer
num
){
IPage
<
Elevator
>
elevatorPage
=
new
Page
<>();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
// 按照最低级来查询数量 保存地址
RegionModel
start
=
tree
.
get
(
0
);
// 省
List
<
RegionModel
>
city
=
(
List
<
RegionModel
>)
start
.
getChildren
();
...
...
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-biz/src/main/java/com/yeejoin/amos/boot/module/cylinder/biz/controller/TzsAuthController.java
View file @
20a6cc83
...
...
@@ -98,7 +98,7 @@ public class TzsAuthController extends BaseController {
@GetMapping
(
value
=
"/getThreeUserReginTree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取组织机构树"
,
notes
=
"获取组织机构树"
)
public
ResponseModel
<
Collection
<
NewRegionModel
>>
getRegionTree
(
@RequestParam
(
value
=
"parentId"
,
required
=
false
)
Long
parentId
)
{
return
ResponseHelper
.
buildResponse
(
thirdLevelRegion
(
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
()));
return
ResponseHelper
.
buildResponse
(
thirdLevelRegion
(
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
()));
}
/**
...
...
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-biz/src/main/java/com/yeejoin/amos/boot/module/cylinder/biz/service/impl/ESElevatorServiceImpl.java
View file @
20a6cc83
...
...
@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.cylinder.biz.dao.ESElavtorRepository
;
import
com.yeejoin.amos.boot.module.cylinder.api.dto.EsElevatorDto
;
import
com.yeejoin.amos.boot.module.cylinder.api.dto.EsSpecialEquipmentDto
;
import
com.yeejoin.amos.boot.module.cylinder.api.dto.EsSpecialEquipmentListDto
;
...
...
@@ -12,6 +11,7 @@ import com.yeejoin.amos.boot.module.cylinder.api.dto.SpecialEquipmentDto;
import
com.yeejoin.amos.boot.module.cylinder.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.cylinder.api.entity.Elevator
;
import
com.yeejoin.amos.boot.module.cylinder.api.entity.EsElevator
;
import
com.yeejoin.amos.boot.module.cylinder.biz.dao.ESElavtorRepository
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
org.apache.commons.lang3.StringUtils
;
import
org.elasticsearch.common.geo.GeoPoint
;
...
...
@@ -37,12 +37,7 @@ import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilde
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -385,7 +380,7 @@ public class ESElevatorServiceImpl {
query
.
setTrackTotalHits
(
true
);
query
.
setMaxResults
(
10000
);
SearchHits
<
EsElevator
>
searchHits
=
elasticsearchTemplate
.
search
(
query
,
EsElevator
.
class
);
Aggregations
aggregations
=
searchHits
.
getA
ggregations
();
Aggregations
aggregations
=
(
Aggregations
)
Objects
.
requireNonNull
(
searchHits
.
getAggregations
()).
a
ggregations
();
ParsedGeoHashGrid
aggregation
=
aggregations
.
get
(
"96333"
);
List
<?
extends
Terms
.
Bucket
>
buckets
=
(
List
<?
extends
Terms
.
Bucket
>)
aggregation
.
getBuckets
();
// 通过debug能看到aggregation.getBuckets里就是我所需要的分组信息,但是直接.出不来,这里我是手动拼出来并强转一下(ParsedLongTerms)
...
...
@@ -563,7 +558,7 @@ public class ESElevatorServiceImpl {
.
withQuery
(
boolMust
).
addAggregation
(
termsAggregationBuilder
);
SearchHits
<
EsElevator
>
searchHits
=
elasticsearchTemplate
.
search
(
queryBuilder
.
build
(),
EsElevator
.
class
);
Aggregations
aggregations
=
searchHits
.
getA
ggregations
();
Aggregations
aggregations
=
(
Aggregations
)
Objects
.
requireNonNull
(
searchHits
.
getAggregations
()).
a
ggregations
();
Terms
aggregation
=
aggregations
.
get
(
"number"
);
Map
<
String
,
Long
>
result
=
new
HashMap
<>();
for
(
Terms
.
Bucket
bucket
:
aggregation
.
getBuckets
())
{
...
...
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-biz/src/main/java/com/yeejoin/amos/boot/module/cylinder/biz/service/impl/TzsAuthServiceImpl.java
View file @
20a6cc83
...
...
@@ -80,7 +80,7 @@ public class TzsAuthServiceImpl implements TzsAuthService {
List
<
String
>
regionList
=
this
.
getUserRegionCode
();
//AgencyUserModel me = Privilege.agencyUserClient.getme().getResult();
startPlatformTokenService
.
getToken
();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
// 循环list 将List 封装为 省市区 SET
Set
<
String
>
city
=
new
HashSet
<>();
Set
<
String
>
district
=
new
HashSet
<>();
...
...
@@ -142,7 +142,7 @@ public class TzsAuthServiceImpl implements TzsAuthService {
List
<
String
>
regionList
=
this
.
getUserRegionCode
();
//AgencyUserModel me = Privilege.agencyUserClient.getme().getResult();
startPlatformTokenService
.
getToken
();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
// 循环list 将List 封装为 省市区 SET
Set
<
String
>
city
=
new
HashSet
<>();
Set
<
String
>
district
=
new
HashSet
<>();
...
...
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-biz/src/main/java/com/yeejoin/amos/boot/module/cylinder/biz/utils/RedisUtil.java
View file @
20a6cc83
...
...
@@ -76,7 +76,7 @@ public class RedisUtil {
if
(
key
.
length
==
1
)
{
redisTemplate
.
delete
(
key
[
0
]);
}
else
{
redisTemplate
.
delete
(
CollectionUtils
.
arrayToList
(
key
))
;
redisTemplate
.
delete
(
Arrays
.
asList
(
key
));
;
}
}
}
...
...
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-biz/src/main/java/com/yeejoin/amos/boot/module/cylinder/flc/biz/controller/CylinderInfoController.java
View file @
20a6cc83
...
...
@@ -857,7 +857,7 @@ public class CylinderInfoController extends BaseController {
CylinderUnit
cylinderUnit
=
cylinderUnitServiceImpl
.
getById
(
sequenceNbr
);
if
(
this
.
regionMap
==
null
)
{
this
.
regionMap
=
new
HashMap
<>();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
regions
.
stream
().
forEach
(
t
->
{
this
.
addRegionsMap
(
regionMap
,
t
);
});
...
...
@@ -957,7 +957,7 @@ public class CylinderInfoController extends BaseController {
if
(
this
.
regionMap
==
null
)
{
this
.
regionMap
=
new
HashMap
<>();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
regions
.
stream
().
forEach
(
t
->
{
this
.
addRegionsMap
(
regionMap
,
t
);
});
...
...
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-biz/src/main/java/com/yeejoin/amos/boot/module/cylinder/flc/biz/controller/UnitInfoController.java
View file @
20a6cc83
...
...
@@ -105,7 +105,7 @@ public class UnitInfoController extends BaseController {
tzsAuthServiceImpl
.
setRequestContext
();
Collection
<
RegionModel
>
result
=
null
;
if
(
parentId
==
null
)
{
result
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
result
=
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
}
else
{
result
=
Systemctl
.
regionClient
.
querySubAgencyTree
(
parentId
).
getResult
();
}
...
...
amos-boot-system-tzs/amos-boot-module-cylinder/amos-boot-module-cylinder-biz/src/main/java/com/yeejoin/amos/boot/module/cylinder/flc/biz/service/impl/CylinderInfoServiceImpl.java
View file @
20a6cc83
...
...
@@ -1271,7 +1271,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
private
void
countByRegion
(
Consumer
<
RegionModel
>
consumer
)
{
List
<
RegionModel
>
regionList
=
new
ArrayList
<>();
startPlatformTokenService
.
getToken
();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
regions
.
forEach
(
regionModel
->
convertTreeToList
(
regionList
,
regionModel
));
regionList
.
forEach
(
consumer
);
}
...
...
amos-boot-system-tzs/amos-boot-module-jczs/amos-boot-module-jczs-biz/src/main/java/com/yeejoin/amos/AmosJczsApplication.java
View file @
20a6cc83
...
...
@@ -10,7 +10,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.ComponentScan
;
...
...
@@ -37,7 +36,6 @@ import java.net.UnknownHostException;
@EnableFeignClients
@EnableAsync
@EnableSwagger2WebMvc
@EnableEurekaClient
//@EnableScheduling
@MapperScan
({
"org.typroject.tyboot.demo.face.orm.dao*"
,
"org.typroject.tyboot.face.*.orm.dao*"
,
"org.typroject.tyboot.core.auth.face.orm.dao*"
,
"org.typroject.tyboot.component.*.face.orm.dao*"
,
...
...
amos-boot-system-tzs/amos-boot-module-jczs/amos-boot-module-jczs-biz/src/main/java/com/yeejoin/amos/boot/module/jczs/biz/controller/SpecialEquipmentController.java
View file @
20a6cc83
...
...
@@ -297,7 +297,7 @@ public class SpecialEquipmentController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"初始化设备"
,
notes
=
"初始化设备"
)
public
void
initEquipment
(
Integer
num
){
IPage
<
Elevator
>
elevatorPage
=
new
Page
<>();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
// 按照最低级来查询数量 保存地址
RegionModel
start
=
tree
.
get
(
0
);
// 省
List
<
RegionModel
>
city
=
(
List
<
RegionModel
>)
start
.
getChildren
();
...
...
amos-boot-system-tzs/amos-boot-module-jczs/amos-boot-module-jczs-biz/src/main/java/com/yeejoin/amos/boot/module/jczs/biz/service/impl/ESElevatorServiceImpl.java
View file @
20a6cc83
...
...
@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.jczs.api.dto.ESAlertCalledDto
;
import
com.yeejoin.amos.boot.module.jczs.api.dto.EsElevatorDto
;
import
com.yeejoin.amos.boot.module.jczs.api.dto.EsSpecialEquipmentDto
;
import
com.yeejoin.amos.boot.module.jczs.api.dto.EsSpecialEquipmentListDto
;
...
...
@@ -15,22 +14,16 @@ import com.yeejoin.amos.boot.module.jczs.api.entity.EsElevator;
import
com.yeejoin.amos.boot.module.jczs.biz.dao.ESElavtorRepository
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
org.apache.commons.lang3.StringUtils
;
import
org.elasticsearch.common.geo.GeoBoundingBox
;
import
org.elasticsearch.common.geo.GeoPoint
;
import
org.elasticsearch.index.query.BoolQueryBuilder
;
import
org.elasticsearch.index.query.ConstantScoreQueryBuilder
;
import
org.elasticsearch.index.query.GeoBoundingBoxQueryBuilder
;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.elasticsearch.search.aggregations.Aggregation
;
import
org.elasticsearch.search.aggregations.AggregationBuilder
;
import
org.elasticsearch.search.aggregations.AggregationBuilders
;
import
org.elasticsearch.search.aggregations.Aggregations
;
import
org.elasticsearch.search.aggregations.bucket.filter.Filters
;
import
org.elasticsearch.search.aggregations.bucket.geogrid.GeoHashGridAggregationBuilder
;
import
org.elasticsearch.search.aggregations.bucket.geogrid.ParsedGeoHashGrid
;
import
org.elasticsearch.search.aggregations.bucket.geogrid.ParsedGeoHashGridBucket
;
import
org.elasticsearch.search.aggregations.bucket.terms.ParsedLongTerms
;
import
org.elasticsearch.search.aggregations.bucket.terms.ParsedStringTerms
;
import
org.elasticsearch.search.aggregations.bucket.terms.Terms
;
import
org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -44,12 +37,7 @@ import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilde
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -392,7 +380,7 @@ public class ESElevatorServiceImpl {
query
.
setTrackTotalHits
(
true
);
query
.
setMaxResults
(
10000
);
SearchHits
<
EsElevator
>
searchHits
=
elasticsearchTemplate
.
search
(
query
,
EsElevator
.
class
);
Aggregations
aggregations
=
searchHits
.
getA
ggregations
();
Aggregations
aggregations
=
(
Aggregations
)
Objects
.
requireNonNull
(
searchHits
.
getAggregations
()).
a
ggregations
();
ParsedGeoHashGrid
aggregation
=
aggregations
.
get
(
"96333"
);
List
<?
extends
Terms
.
Bucket
>
buckets
=
(
List
<?
extends
Terms
.
Bucket
>)
aggregation
.
getBuckets
();
// 通过debug能看到aggregation.getBuckets里就是我所需要的分组信息,但是直接.出不来,这里我是手动拼出来并强转一下(ParsedLongTerms)
...
...
@@ -570,7 +558,7 @@ public class ESElevatorServiceImpl {
.
withQuery
(
boolMust
).
addAggregation
(
termsAggregationBuilder
);
SearchHits
<
EsElevator
>
searchHits
=
elasticsearchTemplate
.
search
(
queryBuilder
.
build
(),
EsElevator
.
class
);
Aggregations
aggregations
=
searchHits
.
getA
ggregations
();
Aggregations
aggregations
=
(
Aggregations
)
Objects
.
requireNonNull
(
searchHits
.
getAggregations
()).
a
ggregations
();
Terms
aggregation
=
aggregations
.
get
(
"number"
);
Map
<
String
,
Long
>
result
=
new
HashMap
<>();
for
(
Terms
.
Bucket
bucket
:
aggregation
.
getBuckets
())
{
...
...
amos-boot-system-tzs/amos-boot-module-jczs/amos-boot-module-jczs-biz/src/main/java/com/yeejoin/amos/boot/module/jczs/biz/service/impl/TzsAuthServiceImpl.java
View file @
20a6cc83
...
...
@@ -80,7 +80,7 @@ public class TzsAuthServiceImpl implements TzsAuthService {
List
<
String
>
regionList
=
this
.
getUserRegionCode
();
//AgencyUserModel me = Privilege.agencyUserClient.getme().getResult();
startPlatformTokenService
.
getToken
();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
// 循环list 将List 封装为 省市区 SET
Set
<
String
>
city
=
new
HashSet
<>();
Set
<
String
>
district
=
new
HashSet
<>();
...
...
amos-boot-system-tzs/amos-boot-module-jczs/amos-boot-module-jczs-biz/src/main/java/com/yeejoin/amos/boot/module/jczs/biz/utils/RedisUtil.java
View file @
20a6cc83
...
...
@@ -3,8 +3,8 @@ package com.yeejoin.amos.boot.module.jczs.biz.utils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
...
...
@@ -76,7 +76,7 @@ public class RedisUtil {
if
(
key
.
length
==
1
)
{
redisTemplate
.
delete
(
key
[
0
]);
}
else
{
redisTemplate
.
delete
(
CollectionUtils
.
arrayToList
(
key
))
;
redisTemplate
.
delete
(
Arrays
.
asList
(
key
));
;
}
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jczs/amos-boot-module-jczs-biz/src/main/java/com/yeejoin/amos/boot/module/jczs/flc/biz/controller/CylinderInfoController.java
View file @
20a6cc83
...
...
@@ -883,7 +883,7 @@ public class CylinderInfoController extends BaseController {
CylinderUnit
cylinderUnit
=
cylinderUnitServiceImpl
.
getById
(
sequenceNbr
);
if
(
this
.
regionMap
==
null
)
{
this
.
regionMap
=
new
HashMap
<>();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
regions
.
stream
().
forEach
(
t
->
{
this
.
addRegionsMap
(
regionMap
,
t
);
});
...
...
@@ -983,7 +983,7 @@ public class CylinderInfoController extends BaseController {
if
(
this
.
regionMap
==
null
)
{
this
.
regionMap
=
new
HashMap
<>();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
regions
.
stream
().
forEach
(
t
->
{
this
.
addRegionsMap
(
regionMap
,
t
);
});
...
...
amos-boot-system-tzs/amos-boot-module-jczs/amos-boot-module-jczs-biz/src/main/java/com/yeejoin/amos/boot/module/jczs/flc/biz/controller/UnitInfoController.java
View file @
20a6cc83
...
...
@@ -105,7 +105,7 @@ public class UnitInfoController extends BaseController {
tzsAuthServiceImpl
.
setRequestContext
();
Collection
<
RegionModel
>
result
=
null
;
if
(
parentId
==
null
)
{
result
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
result
=
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
}
else
{
result
=
Systemctl
.
regionClient
.
querySubAgencyTree
(
parentId
).
getResult
();
}
...
...
amos-boot-system-tzs/amos-boot-module-jczs/amos-boot-module-jczs-biz/src/main/java/com/yeejoin/amos/boot/module/jczs/flc/biz/service/impl/CylinderInfoServiceImpl.java
View file @
20a6cc83
...
...
@@ -910,7 +910,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
private
void
countByRegion
(
Consumer
<
RegionModel
>
consumer
)
{
List
<
RegionModel
>
regionList
=
new
ArrayList
<>();
startPlatformTokenService
.
getToken
();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
regions
.
forEach
(
regionModel
->
convertTreeToList
(
regionList
,
regionModel
));
regionList
.
forEach
(
consumer
);
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/pom.xml
View file @
20a6cc83
...
...
@@ -76,6 +76,14 @@
<build>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-resources-plugin
</artifactId>
<version>
3.2.0
</version>
<configuration>
<encoding>
UTF-8
</encoding>
</configuration>
</plugin>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
2.7.8
</version>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/AmosJGApplication.java
View file @
20a6cc83
...
...
@@ -14,7 +14,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.Bean
;
...
...
@@ -38,11 +37,10 @@ import java.net.UnknownHostException;
@EnableTransactionManagement
@EnableConfigurationProperties
@ServletComponentScan
@EnableDiscoveryClient
@EnableFeignClients
@EnableAsync
@EnableSwagger2WebMvc
@Enable
Eureka
Client
@Enable
Discovery
Client
@EnableSchedulerLock
(
defaultLockAtMostFor
=
"10m"
)
@MapperScan
({
"org.typroject.tyboot.demo.face.orm.dao*"
,
"org.typroject.tyboot.face.*.orm.dao*"
,
"org.typroject.tyboot.core.auth.face.orm.dao*"
,
"org.typroject.tyboot.component.*.face.orm.dao*"
,
...
...
@@ -71,6 +69,10 @@ public class AmosJGApplication {
logger
.
info
(
"\n----------------------------------------------------------\n\t"
+
"Application Amos-JG is running! Access URLs:\n\t"
+
"Swagger文档: \thttp://"
+
ip
+
":"
+
port
+
path
+
"/doc.html\n"
+
"----------------------------------------------------------\n"
);
// 打印 Nacos 配置
logger
.
info
(
"Nacos server-addr: "
+
env
.
getProperty
(
"spring.cloud.nacos.discovery.server-addr"
));
logger
.
info
(
"Nacos namespace: "
+
env
.
getProperty
(
"spring.cloud.nacos.discovery.namespace"
));
}
@Bean
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/CommonServiceImpl.java
View file @
20a6cc83
...
...
@@ -233,6 +233,7 @@ public class CommonServiceImpl implements ICommonService {
@Autowired
RegistrationInfoMapper
tzsJgRegistrationInfoMapper
;
@Autowired
@Lazy
JgMaintenanceContractServiceImpl
jgMaintenanceContractServiceImpl
;
@Autowired
JgUseRegistrationServiceImpl
jgUseRegistrationServiceImpl
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
View file @
20a6cc83
...
...
@@ -50,6 +50,7 @@ import org.redisson.api.RLock;
import
org.redisson.api.RedissonClient
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -88,6 +89,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
@Autowired
ICmWorkflowService
workflowService
;
@Autowired
@Lazy
CommonServiceImpl
commonService
;
@Autowired
IJgInstallationNoticeService
jrmInstallationNoticeService
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/utils/RedisUtil.java
View file @
20a6cc83
...
...
@@ -3,8 +3,8 @@ package com.yeejoin.amos.boot.module.jg.biz.utils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
...
...
@@ -76,7 +76,7 @@ public class RedisUtil {
if
(
key
.
length
==
1
)
{
redisTemplate
.
delete
(
key
[
0
]);
}
else
{
redisTemplate
.
delete
(
CollectionUtils
.
arrayTo
List
(
key
));
redisTemplate
.
delete
(
Arrays
.
as
List
(
key
));
}
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/application-cluster.properties
View file @
20a6cc83
...
...
@@ -7,7 +7,6 @@ spring.datasource.password=${POSTGRESQL_PASSWORD}
#注册中心地址
eureka.client.service-url.defaultZone
=
http://admin:a1234560@192.168.249.13:10001/eureka/,http://admin:a1234560@192.168.249.139:10001/eureka/
eureka.instance.prefer-ip-address
=
true
eureka.instance.ip-address
=
192.168.249.139
...
...
@@ -38,7 +37,6 @@ spring.redis.lettuce.cluster.refresh.period=2000
spring.redis.mode
=
cluster
#springboot指标显示器不使用默认的,使用自定义的MyRedisHealthIndicator
management.health.redis.enabled
=
false
...
...
@@ -93,12 +91,9 @@ flc.sms.tempCode=SMS_TZS_0001
## 预警通知模板id
tzs.wechat.tempId.warning
=
-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY
##督查整改通知
tzs.wechat.tempId.supervise
=
P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE
## 公众号测试用户id(平台userId)
tzs.wechat.test.userId
=
3413513
...
...
@@ -107,7 +102,6 @@ org.filter.group.seq=1564150103147573249
duty.seats.role.ids
=
1585956200472674305,1585956257590706177
## 规则配置 properties:
rule.definition.load
=
false
##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto
rule.definition.default-agency
=
tzs
...
...
@@ -119,20 +113,16 @@ tzs.auth.user.photo=/public/common/userPic.png
minio.url.path
=
${MINIO_FILESERVER_DOMAIN}/
#### 管理员变更机器人账号
tzs.admin.name
=
tzs_robot
tzs.admin.pwd
=
a1234567
##小程序appid
tzs.WxApp.appId
=
wx48a1b1915b10d14b
tzs.WxApp.secret
=
ac4f4a9d3c97676badb70c19a2f37b16
tzs.WxApp.grant-type
=
authorization_code
#气瓶充装信息定时同步至es
tzs.cylinder.fill.cron
=
0 0 12 * * ?
#气瓶基本信息定时同步至es
tzs.cylinder.info.cron
=
0 0 1 * * ?
outSystem.user.password
=
a1234560
...
...
@@ -140,5 +130,4 @@ amos.system.user.app-key=AMOS_STUDIO
amos.system.user.product
=
STUDIO_APP_WEB
##生成监管码前缀域名
regulatory_code_prefix
=
https://nav.sspai.top/tzs?code=
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/application-dev.properties
View file @
20a6cc83
localhost
=
${spring.cloud.client.ip-address}
#DB properties:
spring.datasource.url
=
jdbc:postgresql://172.16.10.243:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz&allowMultiQueries=true
spring.datasource.username
=
admin
spring.datasource.password
=
Yeejoin@2023
spring.datasource.hikari.register-mbeans
=
true
eureka.client.service-url.defaultZone
=
http://172.16.10.243:10001/eureka/
eureka.instance.prefer-ip-address
=
true
management.endpoint.health.show-details
=
always
management.endpoints.web.exposure.include
=
*
eureka.instance.health-check-url
=
http://${localhost}:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path
=
${server.servlet.context-path}/actuator
eureka.instance.status-page-url
=
http://${localhost}:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs
=
http://${localhost}:${server.port}${server.servlet.context-path}/doc.html
eureka.instance.ip-address
=
${localhost}
## ES properties:
elasticsearch.username
=
elastic
elasticsearch.password
=
a123456
spring.elasticsearch.rest.uris
=
http://172.16.10.243:9200
## unit(h)
alertcall.es.synchrony.time
=
48
#redis properties:
spring.redis.database
=
1
spring.redis.host
=
172.16.10.243
...
...
@@ -37,6 +29,7 @@ emqx.broker=tcp://172.16.10.243:2883
emqx.client-user-name
=
super
emqx.client-password
=
123456
emqx.keepAliveInterval
=
1000
tzs.cti.appkey
=
4e805006-3fef-ae43-3915-a153731007c4
tzs.cti.secretkey
=
7bd29115-99ee-4f7d-1fb1-7c4719d5f43a
tzs.cti.url
=
http://36.41.172.83:8000
...
...
@@ -53,34 +46,26 @@ tzs.wechat.url.wx=tzs.yeeamos.com/repairPersondetail.html
#tzs.wechat.tempId.ts=Kr7lcV8g4g_lgyW_RpwnNgw_HDxxRuVx759EoFWrIfU
tzs.wechat.tempId.ts
=
VWqgY-lXFt4dg2EL4pLjfDCBAU49Z0mRxVaQhAMMW8Q
tzs.wechat.url.ts
=
tzs.yeeamos.com/taskComplaintDetail.html
mqtt.topic.task.newtask
=
tzs-task-newtask
mqtt.topic.task.personinfo
=
tzs-task-personinfo
mqtt.topic.elevator.push
=
/tzs/tcb_elevator
mqtt.topic.alertInfo.push
=
/tzs/tcb_alertInfo
mqtt.topic.alertReport.push
=
/tzs/tcb_alertReport
mqtt.topic.alertHeart.push
=
/tzs/tcb_alertHeart
mqtt.topic.alertMatrix.push
=
/tzs/tcb_alertMatrix
mqtt.topic.cti.push
=
/cti/record
cti.user.name
=
tzs_cti
cti.user.pwd
=
a1234567
flc.sms.tempCode
=
SMS_TZS_0001
## ??????id
tzs.wechat.tempId.warning
=
-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY
##??????
tzs.wechat.tempId.supervise
=
P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE
## ???????id???userId?
tzs.wechat.test.userId
=
3413513
##new properties
org.filter.group.seq
=
1564150103147573249
fileserver.domain
=
http://172.16.10.243:19000/
log.level
=
INFO
duty.seats.role.ids
=
1585956200472674305,1585956257590706177
## ???? properties:
rule.definition.load
=
false
##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto
rule.definition.default-agency
=
tzs
rule.definition.local-ip
=
172.16.10.243
# minio ??
minio.endpoint
=
http://172.16.10.243:9000
minio.accessKey
=
root
minio.secretKey
=
Yeejoin@2020
...
...
@@ -88,14 +73,20 @@ minio.secretKey=Yeejoin@2020
tzs.domain
=
http://sxtzsb.sxsei.com
outSystem.user.password
=
a1234560
amos.system.user.user-name
=
robot_admin
amos.system.user.password
=
a1234567
amos.system.user.app-key
=
AMOS_STUDIO
amos.system.user.product
=
STUDIO_APP
_WEB
amos.system.user.product
=
AMOS_STUDIO
_WEB
#Seata Config
seata.tx-service-group
=
tzs-seata
seata.service.grouplist.tzs-seata
=
172.16.10.243:8091
#
??????
(0<=datacenter-id<=31)
# (0<=datacenter-id<=31)
mybatis-plus.global-config.datacenter-id
=
1
# ??????(0<=worker-id<=31)
mybatis-plus.global-config.worker-id
=
2
\ No newline at end of file
# (0<=worker-id<=31)
mybatis-plus.global-config.worker-id
=
2
tzs.admin.name
=
tzs_robot
tzs.admin.pwd
=
a1234567
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/application.properties
View file @
20a6cc83
...
...
@@ -16,17 +16,9 @@ spring.liquibase.enabled= false
feign.client.config.default.connect-timeout
=
30000
feign.client.config.default.read-timeout
=
30000
## eureka properties:
eureka.client.registry-fetch-interval-seconds
=
5
eureka.instance.prefer-ip-address
=
true
management.endpoint.health.show-details
=
always
management.endpoints.web.exposure.include
=
*
eureka.instance.health-check-url-path
=
/actuator/health
eureka.instance.lease-expiration-duration-in-seconds
=
10
eureka.instance.lease-renewal-interval-in-seconds
=
5
eureka.instance.metadata-map.management.context-path
=
${server.servlet.context-path}/actuator
eureka.instance.status-page-url-path
=
/actuator/info
eureka.instance.metadata-map.management.api-docs
=
http://localhost:${server.port}${server.servlet.context-path}/doc.html
#DB properties:
spring.datasource.driver-class-name
=
org.postgresql.Driver
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
...
...
@@ -38,7 +30,6 @@ spring.datasource.hikari.pool-name=DatebookHikariCP
spring.datasource.hikari.max-lifetime
=
120000
spring.datasource.hikari.connection-timeout
=
30000
spring.datasource.hikari.connection-test-query
=
SELECT 1
spring.datasource.schema
=
amos_tzs_biz
spring.main.allow-bean-definition-overriding
=
true
iot.fegin.name
=
AMOS-API-IOT
...
...
@@ -51,9 +42,9 @@ security.systemctl.name=AMOS-API-SYSTEMCTL
jcs.company.topic.add
=
jcs/company/topic/add
jcs.company.topic.delete
=
jcs/company/topic/delete
## \uFFFD\u8C78\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uD94E\uDE33\uFFFD\uFFFD\uFFFD\uFFFD\u0161\uFFFD\uFFFD\u3CA5\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u58E9
control.fegin.name
=
JCS-API-CONTROL
## redis\uFFFD\uFFFD\u02B1\u02B1\uFFFD\uFFFD
redis.cache.failure.time
=
10800
failure.work.flow.processDefinitionKey
=
malfunction_repair
video.fegin.name
=
video
...
...
@@ -61,10 +52,10 @@ latentDanger.feign.name=AMOS-LATENT-DANGER
Knowledgebase.fegin.name
=
AMOS-API-KNOWLEDGEBASE
## \uFFFD\u8C78\uFFFD\uFFFD\u05AA\uFFFD\uFFFD\uFFFD\uFFFDv1
inform.work.flow.processDefinitionKey
=
equipment_inform_process_v1
## \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u052E\uFFFD\uFFFD\uFFFD\u03F2\uFFFDID
fire-rescue
=
1432549862557130753
...
...
@@ -92,41 +83,25 @@ tzs.wechat.tempId.ts=VWqgY-lXFt4dg2EL4pLjfDCBAU49Z0mRxVaQhAMMW8Q
tzs.wechat.url.ts
=
tzs.yeeamos.com/taskComplaintDetail.html
mqtt.topic.task.newtask
=
tzs-task-newtask
mqtt.topic.task.personinfo
=
tzs-task-personinfo
mqtt.topic.elevator.push
=
/tzs/tcb_elevator
mqtt.topic.alertInfo.push
=
/tzs/tcb_alertInfo
mqtt.topic.alertReport.push
=
/tzs/tcb_alertReport
mqtt.topic.alertHeart.push
=
/tzs/tcb_alertHeart
mqtt.topic.alertMatrix.push
=
/tzs/tcb_alertMatrix
mqtt.topic.cti.push
=
/cti/record
mqtt.topic.cyl.warning.push
=
/tzs/cyl_cyl_warning
cti.user.name
=
tzs_cti
cti.user.pwd
=
a1234567
flc.sms.tempCode
=
SMS_TZS_0001
### \u7BA1\u7406\u5458\u53D8\u66F4\u673A\u5668\u4EBA\u8D26\u53F7
#tzs.admin.name=tzs_admin
## \u0524\uFFFD\uFFFD\u0368\u05AA\u0123\uFFFD\uFFFDid
tzs.wechat.tempId.warning
=
-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY
##\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0368\u05AA
tzs.wechat.tempId.supervise
=
P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE
## \uFFFD\uFFFD\uFFFD\u06BA\u0172\uFFFD\uFFFD\uFFFD\uFFFD\u00FB\uFFFDid\uFFFD\uFFFD\u01BD\u0328userId\uFFFD\uFFFD
tzs.wechat.test.userId
=
3393279
amos.secret.key
=
qaz
knife4j.production=false
amos.secret.key
=
qaz
knife4j.production
=
false
knife4j.enable
=
true
...
...
@@ -138,17 +113,11 @@ spring.security.user.name=admin
spring.security.user.password
=
a1234560
spring.security.user.roles
=
SBA_ADMIN
## \u540E\u53F0\u6267\u884C\u673A\u5668\u4EBA\u8D26\u53F7\u914D\u7F6E
amos.system.user.user-name
=
jyjg04
amos.system.user.password
=
a1234560
amos.system.user.app-key
=
AMOS_STUDIO
amos.system.user.product
=
AMOS_STUDIO_WEB
## ??????????????topic
amos.operation.log
=
$share/${spring.application.name}//amos/operation/log
amos.agency.code
=
tzs
## ?????orgCode
regulator.unit.code
=
50
# \u82E5tzs\u548Cugp\u4E00\u8D77\uFF0C\u5219true
...
...
@@ -165,5 +134,8 @@ amos.wechat.robot.user=we_robot
amos.wechat.robot.password
=
a1234567
feign.okhttp.enabled
=
true
#二维码前缀,用来生成证的二维码
qrcode.prefix
=
https://sxtzsb.sxsei.com:19435/tzs
\ No newline at end of file
#\u4E8C\u7EF4\u7801\u524D\u7F00\uFF0C\u7528\u6765\u751F\u6210\u8BC1\u7684\u4E8C\u7EF4\u7801
qrcode.prefix
=
https://sxtzsb.sxsei.com:19435/tzs
spring.main.allow-circular-references
=
true
spring.mvc.pathmatch.matching-strategy
=
ant_path_matcher
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/registry.conf
View file @
20a6cc83
registry
{
# file 、nacos 、eureka、redis、zk、consul、etcd3、sofa
type
=
"
eureka
"
type
=
"
nacos
"
nacos
{
serverAddr
=
"localhost"
namespace
=
""
cluster
=
"default"
application
=
"seata-server"
serverAddr
=
"172.16.10.243:8848"
group
=
"SEATA_GROUP"
namespace
=
"qa"
cluster
=
"default"
username
=
"nacos"
password
=
"nacos"
}
eureka
{
serviceUrl
=
"http://172.16.10.243:10001/eureka"
application
=
"default"
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/AmosJyjcApplication.java
View file @
20a6cc83
...
...
@@ -10,7 +10,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.ComponentScan
;
...
...
@@ -36,7 +35,6 @@ import java.net.UnknownHostException;
@EnableFeignClients
@EnableAsync
@EnableSwagger2WebMvc
@EnableEurekaClient
@EnableSchedulerLock
(
defaultLockAtMostFor
=
"10m"
)
@MapperScan
({
"org.typroject.tyboot.demo.face.orm.dao*"
,
"org.typroject.tyboot.face.*.orm.dao*"
,
"org.typroject.tyboot.core.auth.face.orm.dao*"
,
"org.typroject.tyboot.component.*.face.orm.dao*"
,
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/AmosStatisticsApplication.java
View file @
20a6cc83
...
...
@@ -31,7 +31,6 @@ import java.net.UnknownHostException;
@EnableDiscoveryClient
@EnableFeignClients
@EnableSwagger2WebMvc
@MapperScan
({
"org.typroject.tyboot.demo.face.orm.dao*"
,
"org.typroject.tyboot.face.*.orm.dao*"
,
"org.typroject.tyboot.core.auth.face.orm.dao*"
,
"org.typroject.tyboot.component.*.face.orm.dao*"
,
"com.yeejoin.amos.boot.module.**.api.mapper"
,
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/AmosTcmApplication.java
View file @
20a6cc83
...
...
@@ -27,7 +27,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.Bean
;
...
...
@@ -58,7 +57,6 @@ import java.util.List;
@EnableFeignClients
@EnableAsync
@EnableSwagger2WebMvc
@EnableEurekaClient
@EnableSchedulerLock
(
defaultLockAtMostFor
=
"10m"
)
@MapperScan
({
"org.typroject.tyboot.demo.face.orm.dao*"
,
"org.typroject.tyboot.face.*.orm.dao*"
,
"org.typroject.tyboot.core.auth.face.orm.dao*"
,
"org.typroject.tyboot.component.*.face.orm.dao*"
,
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/controller/SpecialEquipmentController.java
View file @
20a6cc83
...
...
@@ -282,7 +282,7 @@ public class SpecialEquipmentController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"初始化设备"
,
notes
=
"初始化设备"
)
public
void
initEquipment
(
Integer
num
){
IPage
<
Elevator
>
elevatorPage
=
new
Page
<>();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
// 按照最低级来查询数量 保存地址
RegionModel
start
=
tree
.
get
(
0
);
// 省
List
<
RegionModel
>
city
=
(
List
<
RegionModel
>)
start
.
getChildren
();
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/ESElevatorServiceImpl.java
View file @
20a6cc83
...
...
@@ -37,12 +37,7 @@ import org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilde
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -385,7 +380,8 @@ public class ESElevatorServiceImpl {
query
.
setTrackTotalHits
(
true
);
query
.
setMaxResults
(
10000
);
SearchHits
<
EsElevator
>
searchHits
=
elasticsearchTemplate
.
search
(
query
,
EsElevator
.
class
);
Aggregations
aggregations
=
searchHits
.
getAggregations
();
// Spring Data Elasticsearch 4.x+ API change: getAggregations() returns AggregationsContainer
Aggregations
aggregations
=
(
Aggregations
)
Objects
.
requireNonNull
(
searchHits
.
getAggregations
()).
aggregations
();
ParsedGeoHashGrid
aggregation
=
aggregations
.
get
(
"96333"
);
List
<?
extends
Terms
.
Bucket
>
buckets
=
(
List
<?
extends
Terms
.
Bucket
>)
aggregation
.
getBuckets
();
// 通过debug能看到aggregation.getBuckets里就是我所需要的分组信息,但是直接.出不来,这里我是手动拼出来并强转一下(ParsedLongTerms)
...
...
@@ -563,7 +559,7 @@ public class ESElevatorServiceImpl {
.
withQuery
(
boolMust
).
addAggregation
(
termsAggregationBuilder
);
SearchHits
<
EsElevator
>
searchHits
=
elasticsearchTemplate
.
search
(
queryBuilder
.
build
(),
EsElevator
.
class
);
Aggregations
aggregations
=
searchHits
.
getA
ggregations
();
Aggregations
aggregations
=
(
Aggregations
)
Objects
.
requireNonNull
(
searchHits
.
getAggregations
()).
a
ggregations
();
Terms
aggregation
=
aggregations
.
get
(
"number"
);
Map
<
String
,
Long
>
result
=
new
HashMap
<>();
for
(
Terms
.
Bucket
bucket
:
aggregation
.
getBuckets
())
{
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzsAuthServiceImpl.java
View file @
20a6cc83
...
...
@@ -80,7 +80,7 @@ public class TzsAuthServiceImpl implements TzsAuthService {
List
<
String
>
regionList
=
this
.
getUserRegionCode
();
//AgencyUserModel me = Privilege.agencyUserClient.getme().getResult();
startPlatformTokenService
.
getToken
();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
// 循环list 将List 封装为 省市区 SET
Set
<
String
>
city
=
new
HashSet
<>();
Set
<
String
>
district
=
new
HashSet
<>();
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/utils/RedisUtil.java
View file @
20a6cc83
...
...
@@ -3,8 +3,8 @@ package com.yeejoin.amos.boot.module.tcm.biz.utils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
...
...
@@ -83,7 +83,7 @@ public class RedisUtil {
if
(
key
.
length
==
1
)
{
redisTemplate
.
delete
(
key
[
0
]);
}
else
{
redisTemplate
.
delete
(
CollectionUtils
.
arrayToList
(
key
))
;
redisTemplate
.
delete
(
Arrays
.
asList
(
key
));
;
}
}
}
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/flc/biz/controller/CylinderInfoController.java
View file @
20a6cc83
...
...
@@ -883,7 +883,7 @@ public class CylinderInfoController extends BaseController {
CylinderUnit
cylinderUnit
=
cylinderUnitServiceImpl
.
getById
(
sequenceNbr
);
if
(
this
.
regionMap
==
null
)
{
this
.
regionMap
=
new
HashMap
<>();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
regions
.
stream
().
forEach
(
t
->
{
this
.
addRegionsMap
(
regionMap
,
t
);
});
...
...
@@ -983,7 +983,7 @@ public class CylinderInfoController extends BaseController {
if
(
this
.
regionMap
==
null
)
{
this
.
regionMap
=
new
HashMap
<>();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
regions
.
stream
().
forEach
(
t
->
{
this
.
addRegionsMap
(
regionMap
,
t
);
});
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/flc/biz/service/impl/CylinderInfoServiceImpl.java
View file @
20a6cc83
...
...
@@ -905,7 +905,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
private
void
countByRegion
(
Consumer
<
RegionModel
>
consumer
)
{
List
<
RegionModel
>
regionList
=
new
ArrayList
<>();
startPlatformTokenService
.
getToken
();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
regions
.
forEach
(
regionModel
->
convertTreeToList
(
regionList
,
regionModel
));
regionList
.
forEach
(
consumer
);
}
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/resources/application-cluster.properties
View file @
20a6cc83
...
...
@@ -4,7 +4,7 @@ spring.datasource.username=${POSTGRESQL_USER}
spring.datasource.password
=
${POSTGRESQL_PASSWORD}
#注册中心地址
eureka.client.service-url.defaultZone
=
http://admin:a1234560@192.168.249.13:10001/eureka/,http://admin:a1234560@192.168.249.139:10001/eureka/
eureka.instance.prefer-ip-address
=
true
eureka.instance.ip-address
=
192.168.249.139
...
...
@@ -33,13 +33,13 @@ spring.redis.cluster.max-redirects=3
spring.redis.timeout
=
10000
spring.redis.lettuce.cluster.refresh.adaptive
=
true
spring.redis.lettuce.cluster.refresh.period
=
2000
#默认配置,生产时需要调优
spring.redis.lettuce.pool.max-active
=
8
spring.redis.lettuce.pool.max-wait
=
-1
spring.redis.lettuce.pool.max-idle
=
8
spring.redis.lettuce.pool.min-idle
=
0
#springboot指标显示器不使用默认的,使用自定义的MyRedisHealthIndicator
management.health.redis.enabled
=
false
##emqx
...
...
@@ -93,12 +93,12 @@ flc.sms.tempCode=SMS_TZS_0001
## 预警通知模板id
tzs.wechat.tempId.warning
=
-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY
##督查整改通知
tzs.wechat.tempId.supervise
=
P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE
## 公众号测试用户id(平台userId)
tzs.wechat.test.userId
=
3413513
...
...
@@ -107,7 +107,7 @@ org.filter.group.seq=1564150103147573249
duty.seats.role.ids
=
1585956200472674305,1585956257590706177
## 规则配置 properties:
rule.definition.load
=
false
##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto
rule.definition.default-agency
=
tzs
...
...
@@ -119,20 +119,20 @@ tzs.auth.user.photo=/public/common/userPic.png
minio.url.path
=
${MINIO_FILESERVER_DOMAIN}/
#### 管理员变更机器人账号
tzs.admin.name
=
tzs_robot
tzs.admin.pwd
=
a1234567
##小程序appid
tzs.WxApp.appId
=
wx48a1b1915b10d14b
tzs.WxApp.secret
=
ac4f4a9d3c97676badb70c19a2f37b16
tzs.WxApp.grant-type
=
authorization_code
#气瓶充装信息定时同步至es
tzs.cylinder.fill.cron
=
0 0 12 * * ?
#气瓶基本信息定时同步至es
tzs.cylinder.info.cron
=
0 0 1 * * ?
outSystem.user.password
=
a1234560
...
...
@@ -140,5 +140,5 @@ amos.system.user.app-key=AMOS_STUDIO
amos.system.user.product
=
STUDIO_APP_WEB
##生成监管码前缀域名
regulatory_code_prefix
=
https://nav.sspai.top/tzs?code=
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/resources/application-dev.properties
View file @
20a6cc83
...
...
@@ -63,18 +63,18 @@ mqtt.topic.cti.push=/cti/record
cti.user.name
=
tzs_cti
cti.user.pwd
=
a1234567
flc.sms.tempCode
=
SMS_TZS_0001
## ??????id
tzs.wechat.tempId.warning
=
-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY
##??????
tzs.wechat.tempId.supervise
=
P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE
## ???????id???userId?
tzs.wechat.test.userId
=
3413513
##new properties
org.filter.group.seq
=
1564150103147573249
fileserver.domain
=
http://172.16.10.243:19000/
log.level
=
INFO
duty.seats.role.ids
=
1585956200472674305,1585956257590706177
##
????
properties:
## properties:
rule.definition.load
=
false
##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto
rule.definition.default-agency
=
tzs
...
...
@@ -83,15 +83,15 @@ rule.definition.local-ip=172.16.10.243
tzs.cylinder.fill.cron
=
0 0 12 * * ?
#\u6C14\u74F6\u57FA\u672C\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.info.cron
=
0 0 1 * * ?
#
??????????
#
minio.url.path
=
http://172.16.10.243:9000/
## ɼǰ
regulatory_code_prefix
=
https://nav.sspai.top/tzs?code=
outSystem.user.password
=
a1234560
amos.system.user.app-key
=
AMOS_STUDIO
amos.system.user.product
=
STUDIO_APP_WEB
#
??????
(0<=datacenter-id<=31)
# (0<=datacenter-id<=31)
mybatis-plus.global-config.datacenter-id
=
1
#
??????
(0<=worker-id<=31)
# (0<=worker-id<=31)
mybatis-plus.global-config.worker-id
=
4
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/resources/application.properties
View file @
20a6cc83
...
...
@@ -2,13 +2,13 @@ spring.application.name=TZS-COMMON
server.servlet.context-path
=
/tcm
server.port
=
11002
spring.profiles.active
=
dev
#最大等待队列长度,默认100
server.tomcat.accept-count
=
1000
#最大链接数,默认8192
server.tomcat.max-connections
=
10000
#最大线程数,默认200
server.tomcat.threads.max
=
800
#最小线程数,默认10
server.tomcat.threads.min-spare
=
100
logging.level.net.javacrumbs.shedlock
=
DEBUG
...
...
@@ -58,9 +58,9 @@ security.systemctl.name=AMOS-API-SYSTEMCTL
jcs.company.topic.add
=
jcs/company/topic/add
jcs.company.topic.delete
=
jcs/company/topic/delete
## \uFFFD\u8C78\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uD94E\uDE33\uFFFD\uFFFD\uFFFD\uFFFD\u0161\uFFFD\uFFFD\u3CA5\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u58E9
control.fegin.name
=
JCS-API-CONTROL
## redis\uFFFD\uFFFD\u02B1\u02B1\uFFFD\uFFFD
redis.cache.failure.time
=
10800
failure.work.flow.processDefinitionKey
=
malfunction_repair
video.fegin.name
=
video
...
...
@@ -68,10 +68,10 @@ latentDanger.feign.name=AMOS-LATENT-DANGER
Knowledgebase.fegin.name
=
AMOS-API-KNOWLEDGEBASE
## \uFFFD\u8C78\uFFFD\uFFFD\u05AA\uFFFD\uFFFD\uFFFD\uFFFDv1
inform.work.flow.processDefinitionKey
=
equipment_inform_process_v1
## \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u052E\uFFFD\uFFFD\uFFFD\u03F2\uFFFDID
fire-rescue
=
1432549862557130753
...
...
@@ -124,12 +124,12 @@ flc.sms.tempCode=SMS_TZS_0001
### \u7BA1\u7406\u5458\u53D8\u66F4\u673A\u5668\u4EBA\u8D26\u53F7
#tzs.admin.name=tzs_admin
## \u0524\uFFFD\uFFFD\u0368\u05AA\u0123\uFFFD\uFFFDid
tzs.wechat.tempId.warning
=
-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY
##\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0368\u05AA
tzs.wechat.tempId.supervise
=
P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE
## \uFFFD\uFFFD\uFFFD\u06BA\u0172\uFFFD\uFFFD\uFFFD\uFFFD\u00FB\uFFFDid\uFFFD\uFFFD\u01BD\u0328userId\uFFFD\uFFFD
tzs.wechat.test.userId
=
3393279
...
...
@@ -151,11 +151,11 @@ amos.system.user.password=a1234560
amos.system.user.app-key
=
AMOS_STUDIO
amos.system.user.product
=
AMOS_STUDIO_WEB
##
??????????????
topic
## topic
amos.operation.log
=
$share/${spring.application.name}//amos/operation/log
amos.agency.code
=
tzs
##
?????
orgCode
## orgCode
regulator.unit.code
=
50
spring.main.allow-bean-definition-overriding
=
true
...
...
@@ -170,7 +170,7 @@ tzs.WxApp.appId=wx48a1b1915b10d14b
tzs.WxApp.secret
=
ac4f4a9d3c97676badb70c19a2f37b16
tzs.WxApp.grant-type
=
authorization_code
#
??????
(0<=datacenter-id<=31)
# (0<=datacenter-id<=31)
mybatis-plus.global-config.datacenter-id
=
1
#
??????
(0<=worker-id<=31)
# (0<=worker-id<=31)
mybatis-plus.global-config.worker-id
=
2
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-tcm/pom.xml
View file @
20a6cc83
...
...
@@ -12,6 +12,12 @@
<artifactId>
amos-boot-module-tcm
</artifactId>
<packaging>
pom
</packaging>
<description>
公共模块
</description>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
</properties>
<modules>
<module>
amos-boot-module-tcm-api
</module>
<module>
amos-boot-module-tcm-biz
</module>
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/java/com/yeejoin/amos/PatrolApplication.java
View file @
20a6cc83
...
...
@@ -13,7 +13,6 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.client.loadbalancer.LoadBalanced
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.Bean
;
...
...
@@ -21,7 +20,6 @@ import org.springframework.context.annotation.ComponentScan;
import
org.springframework.context.annotation.FilterType
;
import
org.springframework.core.env.Environment
;
import
org.springframework.data.jpa.repository.config.EnableJpaAuditing
;
import
org.springframework.data.jpa.repository.config.EnableJpaRepositories
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.web.client.RestTemplate
;
...
...
@@ -50,7 +48,6 @@ import java.net.UnknownHostException;
@EnableDiscoveryClient
@EnableFeignClients
@EnableAsync
@EnableEurekaClient
@ComponentScan
(
value
=
{
"org.typroject"
,
"com.yeejoin.amos"
},
excludeFilters
=
{
@ComponentScan
.
Filter
(
type
=
FilterType
.
ASSIGNABLE_TYPE
,
classes
=
{
JsonSerializerManage
.
class
})})
@MapperScan
(
basePackages
=
{
"com.yeejoin.amos.patrol.business.dao.mapper"
,
"org.typroject.tyboot.core.auth.face.orm.dao"
,
"com.yeejoin.amos.boot.biz.common.dao.mapper"
,
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PlanTaskServiceImpl.java
View file @
20a6cc83
...
...
@@ -14,7 +14,6 @@ import com.yeejoin.amos.boot.module.common.api.dao.ESTaskDetail;
import
com.yeejoin.amos.boot.module.common.api.dto.ESPlanTaskListDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESTaskDetailDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.PlanTaskDetailDto
;
import
com.yeejoin.amos.patrol.dao.entity.PlanTaskDetail
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
...
...
@@ -80,6 +79,11 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate
;
import
org.springframework.data.elasticsearch.core.SearchHit
;
import
org.springframework.data.elasticsearch.core.SearchHits
;
import
org.springframework.data.elasticsearch.core.query.NativeSearchQuery
;
import
org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.stereotype.Service
;
...
...
@@ -138,6 +142,9 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
private
DataSource
dataSource
;
@Autowired
private
ElasticsearchRestTemplate
elasticsearchRestTemplate
;
@Autowired
ESPlanTaskList
esPlanTaskList
;
@Autowired
...
...
@@ -1798,19 +1805,29 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
private
List
<
ESPlanTaskListDto
>
queryTaskListEs
(
String
planTaskIds
)
{
List
<
ESPlanTaskListDto
>
esPlanTaskListDtos
=
new
ArrayList
<>();
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
boolMust
.
must
(
QueryBuilders
.
termsQuery
(
"planTaskId"
,
planTaskIds
.
split
(
","
)));
esPlanTaskList
.
search
(
boolMust
).
forEach
(
esPlanTaskListDtos:
:
add
);
return
esPlanTaskListDtos
;
NativeSearchQuery
searchQuery
=
new
NativeSearchQueryBuilder
()
.
withQuery
(
boolMust
)
.
build
();
SearchHits
<
ESPlanTaskListDto
>
searchHits
=
elasticsearchRestTemplate
.
search
(
searchQuery
,
ESPlanTaskListDto
.
class
);
return
searchHits
.
stream
().
map
(
SearchHit:
:
getContent
).
collect
(
Collectors
.
toList
());
}
private
List
<
ESTaskDetailDto
>
queryTaskDetailEs
(
String
planTaskIds
)
{
List
<
ESTaskDetailDto
>
esTaskDetailDtos
=
new
ArrayList
<>();
BoolQueryBuilder
boolMust
=
QueryBuilders
.
boolQuery
();
boolMust
.
must
(
QueryBuilders
.
termsQuery
(
"planTaskId"
,
planTaskIds
.
split
(
","
)));
esTaskDetail
.
search
(
boolMust
).
forEach
(
esTaskDetailDtos:
:
add
);
return
esTaskDetailDtos
;
NativeSearchQuery
esTaskDetail
=
new
NativeSearchQueryBuilder
()
.
withQuery
(
boolMust
)
.
build
();
SearchHits
<
ESTaskDetailDto
>
searchHits
=
elasticsearchRestTemplate
.
search
(
esTaskDetail
,
ESTaskDetailDto
.
class
);
return
searchHits
.
stream
().
map
(
SearchHit:
:
getContent
).
collect
(
Collectors
.
toList
());
}
private
void
finishPlanTask
(
List
<
PlanTask
>
planTasks
,
List
<
PlanTaskDetail
>
planTaskDetails
)
{
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/AmosYmtApplication.java
View file @
20a6cc83
...
...
@@ -12,7 +12,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.Bean
;
...
...
@@ -40,8 +39,6 @@ import java.net.UnknownHostException;
@EnableFeignClients
@EnableAsync
@EnableSwagger2WebMvc
@EnableEurekaClient
//@EnableScheduling
@MapperScan
({
"org.typroject.tyboot.demo.face.orm.dao*"
,
"org.typroject.tyboot.face.*.orm.dao*"
,
"org.typroject.tyboot.core.auth.face.orm.dao*"
,
"org.typroject.tyboot.component.*.face.orm.dao*"
,
"com.yeejoin.amos.boot.module.**.api.mapper"
,
"com.yeejoin.amos.boot.biz.common.dao.mapper"
})
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/controller/SpecialEquipmentController.java
View file @
20a6cc83
...
...
@@ -7,37 +7,16 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import
com.yeejoin.amos.boot.biz.common.feign.AmosFeignService
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.AlertMsgDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.AlertPaperInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.ESAlertCalledDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.ElevatorBaseInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.ElevatorDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.ElevatorInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.ElevatorListDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.ElevatorMaintenanceInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.ElevatorNewDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.ElevatorTestInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.ElevatorWlInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.EsElevatorDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.EsSpecialEquipmentDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.EsSpecialEquipmentListDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.SpecialEquipmentDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.Elevator
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentRegionNum
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.MaintainInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TestInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.SpecialEquipmentCategoryEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.service.IElevatorRelationService
;
import
com.yeejoin.amos.boot.module.ymt.api.service.IElevatorService
;
import
com.yeejoin.amos.boot.module.ymt.api.service.TzsAuthService
;
import
com.yeejoin.amos.boot.module.ymt.biz.service.impl.ESCylinderServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.biz.service.impl.ESElevatorServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.biz.service.impl.ElevatorServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.biz.service.impl.EquipmentRegionNumServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.biz.service.impl.MaintainInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.biz.service.impl.MsgLogServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.biz.service.impl.TestInfoServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.biz.service.impl.*
;
import
com.yeejoin.amos.boot.module.ymt.flc.api.dto.CylinderInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.flc.api.entity.CylinderInfo
;
import
com.yeejoin.amos.boot.module.ymt.flc.api.mapper.CylinderInfoMapper
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
...
...
@@ -48,12 +27,7 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
...
...
@@ -297,7 +271,7 @@ public class SpecialEquipmentController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"初始化设备"
,
notes
=
"初始化设备"
)
public
void
initEquipment
(
Integer
num
){
IPage
<
Elevator
>
elevatorPage
=
new
Page
<>();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
// 按照最低级来查询数量 保存地址
RegionModel
start
=
tree
.
get
(
0
);
// 省
List
<
RegionModel
>
city
=
(
List
<
RegionModel
>)
start
.
getChildren
();
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/service/impl/ESElevatorServiceImpl.java
View file @
20a6cc83
...
...
@@ -378,7 +378,7 @@ public class ESElevatorServiceImpl {
query
.
setTrackTotalHits
(
true
);
query
.
setMaxResults
(
10000
);
SearchHits
<
EsElevator
>
searchHits
=
elasticsearchTemplate
.
search
(
query
,
EsElevator
.
class
);
Aggregations
aggregations
=
searchHits
.
getA
ggregations
();
Aggregations
aggregations
=
(
Aggregations
)
Objects
.
requireNonNull
(
searchHits
.
getAggregations
()).
a
ggregations
();
ParsedGeoHashGrid
aggregation
=
aggregations
.
get
(
"96333"
);
List
<?
extends
Terms
.
Bucket
>
buckets
=
(
List
<?
extends
Terms
.
Bucket
>)
aggregation
.
getBuckets
();
// 通过debug能看到aggregation.getBuckets里就是我所需要的分组信息,但是直接.出不来,这里我是手动拼出来并强转一下(ParsedLongTerms)
...
...
@@ -556,7 +556,7 @@ public class ESElevatorServiceImpl {
.
withQuery
(
boolMust
).
addAggregation
(
termsAggregationBuilder
);
SearchHits
<
EsElevator
>
searchHits
=
elasticsearchTemplate
.
search
(
queryBuilder
.
build
(),
EsElevator
.
class
);
Aggregations
aggregations
=
searchHits
.
getA
ggregations
();
Aggregations
aggregations
=
(
Aggregations
)
Objects
.
requireNonNull
(
searchHits
.
getAggregations
()).
a
ggregations
();
Terms
aggregation
=
aggregations
.
get
(
"number"
);
Map
<
String
,
Long
>
result
=
new
HashMap
<>();
for
(
Terms
.
Bucket
bucket
:
aggregation
.
getBuckets
())
{
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/service/impl/TzsAuthServiceImpl.java
View file @
20a6cc83
...
...
@@ -80,7 +80,7 @@ public class TzsAuthServiceImpl implements TzsAuthService {
List
<
String
>
regionList
=
this
.
getUserRegionCode
();
//AgencyUserModel me = Privilege.agencyUserClient.getme().getResult();
startPlatformTokenService
.
getToken
();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
List
<
RegionModel
>
tree
=
(
List
<
RegionModel
>)
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
// 循环list 将List 封装为 省市区 SET
Set
<
String
>
city
=
new
HashSet
<>();
Set
<
String
>
district
=
new
HashSet
<>();
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/utils/RedisUtil.java
View file @
20a6cc83
...
...
@@ -76,7 +76,7 @@ public class RedisUtil {
if
(
key
.
length
==
1
)
{
redisTemplate
.
delete
(
key
[
0
]);
}
else
{
redisTemplate
.
delete
(
CollectionUtils
.
arrayToList
(
key
))
;
redisTemplate
.
delete
(
Arrays
.
asList
(
key
));
;
}
}
}
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/flc/biz/controller/CylinderInfoController.java
View file @
20a6cc83
...
...
@@ -884,7 +884,7 @@ public class CylinderInfoController extends BaseController {
CylinderUnit
cylinderUnit
=
cylinderUnitServiceImpl
.
getById
(
sequenceNbr
);
if
(
this
.
regionMap
==
null
)
{
this
.
regionMap
=
new
HashMap
<>();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
regions
.
stream
().
forEach
(
t
->
{
this
.
addRegionsMap
(
regionMap
,
t
);
});
...
...
@@ -984,7 +984,7 @@ public class CylinderInfoController extends BaseController {
if
(
this
.
regionMap
==
null
)
{
this
.
regionMap
=
new
HashMap
<>();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
regions
.
stream
().
forEach
(
t
->
{
this
.
addRegionsMap
(
regionMap
,
t
);
});
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/flc/biz/controller/UnitInfoController.java
View file @
20a6cc83
...
...
@@ -105,7 +105,7 @@ public class UnitInfoController extends BaseController {
tzsAuthServiceImpl
.
setRequestContext
();
Collection
<
RegionModel
>
result
=
null
;
if
(
parentId
==
null
)
{
result
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
result
=
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
}
else
{
result
=
Systemctl
.
regionClient
.
querySubAgencyTree
(
parentId
).
getResult
();
}
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/flc/biz/service/impl/CylinderInfoServiceImpl.java
View file @
20a6cc83
...
...
@@ -906,7 +906,7 @@ public class CylinderInfoServiceImpl extends BaseService<CylinderInfoDto, Cylind
private
void
countByRegion
(
Consumer
<
RegionModel
>
consumer
)
{
List
<
RegionModel
>
regionList
=
new
ArrayList
<>();
startPlatformTokenService
.
getToken
();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
).
getResult
();
Collection
<
RegionModel
>
regions
=
Systemctl
.
regionClient
.
queryForTree
(
null
,
null
).
getResult
();
regions
.
forEach
(
regionModel
->
convertTreeToList
(
regionList
,
regionModel
));
regionList
.
forEach
(
consumer
);
}
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/resources/application-cluster.properties
View file @
20a6cc83
spring.datasource.url
=
jdbc:vastbase://${POSTGRESQL_IP_port}/${POSTGRESQL_NAME}?currentSchema=${TZS_IDX_BIZ_DATABASE}&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false&noAccessToProcedureBodies=true&allowMultiQueries=true
spring.datasource.username
=
${POSTGRESQL_USER}
spring.datasource.password
=
${POSTGRESQL_PASSWORD}
#注册中心地址
eureka.client.service-url.defaultZone
=
http://admin:a1234560@192.168.249.13:10001/eureka/,http://admin:a1234560@192.168.249.139:10001/eureka/
eureka.instance.prefer-ip-address
=
true
eureka.instance.ip-address
=
192.168.249.139
...
...
@@ -34,13 +30,11 @@ spring.redis.cluster.max-redirects=3
spring.redis.timeout
=
10000
spring.redis.lettuce.cluster.refresh.adaptive
=
true
spring.redis.lettuce.cluster.refresh.period
=
2000
#默认配置,生产时需要调优
spring.redis.lettuce.pool.max-active
=
8
spring.redis.lettuce.pool.max-wait
=
-1
spring.redis.lettuce.pool.max-idle
=
8
spring.redis.lettuce.pool.min-idle
=
0
#springboot指标显示器不使用默认的,使用自定义的MyRedisHealthIndicator
management.health.redis.enabled
=
false
##emqx
...
...
@@ -92,23 +86,16 @@ cti.user.pwd=a1234567
flc.sms.tempCode
=
SMS_TZS_0001
## 预警通知模板id
tzs.wechat.tempId.warning
=
-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY
##督查整改通知
tzs.wechat.tempId.supervise
=
P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE
## 公众号测试用户id(平台userId)
tzs.wechat.test.userId
=
3413513
fileserver.domain
=
https://rpm.yeeamos.com:8888/
org.filter.group.seq
=
1564150103147573249
duty.seats.role.ids
=
1585956200472674305,1585956257590706177
## 规则配置 properties:
rule.definition.load
=
false
##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto
rule.definition.default-agency
=
tzs
...
...
@@ -119,21 +106,18 @@ tzs.auth.user.photo=/public/common/userPic.png
minio.url.path
=
${MINIO_FILESERVER_DOMAIN}/
#### 管理员变更机器人账号
tzs.admin.name
=
tzs_robot
tzs.admin.pwd
=
a1234567
##小程序appid
tzs.WxApp.appId
=
wx48a1b1915b10d14b
tzs.WxApp.secret
=
ac4f4a9d3c97676badb70c19a2f37b16
tzs.WxApp.grant-type
=
authorization_code
#
气瓶充装信息定时同步至
es
#
\uFFFD\uFFFD\u01BF\uFFFD\uFFFD\u05F0\uFFFD\uFFFD\u03E2\uFFFD\uFFFD\u02B1\u036C\uFFFD\uFFFD\uFFFD\uFFFD
es
tzs.cylinder.fill.cron
=
0 0 12 * * ?
#
气瓶基本信息定时同步至
es
#
\uFFFD\uFFFD\u01BF\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u03E2\uFFFD\uFFFD\u02B1\u036C\uFFFD\uFFFD\uFFFD\uFFFD
es
tzs.cylinder.info.cron
=
0 0 1 * * ?
outSystem.user.password
=
a1234560
...
...
@@ -141,5 +125,5 @@ amos.system.user.app-key=AMOS_STUDIO
amos.system.user.product
=
STUDIO_APP_WEB
##
生成监管码前缀域名
##
\uFFFD\uFFFD\uFFFD\u027C\uFFFD\uFFFD\uFFFD\uFFFD\u01F0\u05FA\uFFFD\uFFFD\uFFFD\uFFFD
regulatory_code_prefix
=
https://nav.sspai.top/tzs?code=
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/resources/application-dev.properties
View file @
20a6cc83
...
...
@@ -63,18 +63,17 @@ mqtt.topic.cti.push=/cti/record
cti.user.name
=
tzs_cti
cti.user.pwd
=
a1234567
flc.sms.tempCode
=
SMS_TZS_0001
## ??????id
tzs.wechat.tempId.warning
=
-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY
##??????
tzs.wechat.tempId.supervise
=
P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE
## ???????id???userId?
tzs.wechat.test.userId
=
3413513
##new properties
org.filter.group.seq
=
1564150103147573249
fileserver.domain
=
http://172.16.10.210:19000/
log.level
=
INFO
duty.seats.role.ids
=
1585956200472674305,1585956257590706177
## ???? properties:
rule.definition.load
=
false
##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto
rule.definition.default-agency
=
tzs
...
...
@@ -83,10 +82,7 @@ rule.definition.local-ip=172.16.10.210
tzs.cylinder.fill.cron
=
0 0 12 * * ?
#\u6C14\u74F6\u57FA\u672C\u4FE1\u606F\u5B9A\u65F6\u540C\u6B65\u81F3es
tzs.cylinder.info.cron
=
0 0 1 * * ?
# ??????????
minio.url.path
=
http://172.16.10.210:9000/
## ɼǰ
regulatory_code_prefix
=
https://sxtzsb.sxsei.com:9435/tzs?code=
#outSystem.user.password=a1234560
#amos.system.user.app-key=AMOS_STUDIO
#
amos.system.user.product
=
STUDIO_APP_WEB
\ No newline at end of file
regulatory_code_prefix
=
https://sxtzsb.sxsei.com:9435/tzs?code=
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/resources/application.properties
View file @
20a6cc83
...
...
@@ -48,20 +48,17 @@ security.systemctl.name=AMOS-API-SYSTEMCTL
jcs.company.topic.add
=
jcs/company/topic/add
jcs.company.topic.delete
=
jcs/company/topic/delete
## \uFFFD\u8C78\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uD94E\uDE33\uFFFD\uFFFD\uFFFD\uFFFD\u0161\uFFFD\uFFFD\u3CA5\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u58E9
control.fegin.name
=
JCS-API-CONTROL
## redis\uFFFD\uFFFD\u02B1\u02B1\uFFFD\uFFFD
redis.cache.failure.time
=
10800
failure.work.flow.processDefinitionKey
=
malfunction_repair
video.fegin.name
=
video
latentDanger.feign.name
=
AMOS-LATENT-DANGER
Knowledgebase.fegin.name
=
AMOS-API-KNOWLEDGEBASE
## \uFFFD\u8C78\uFFFD\uFFFD\u05AA\uFFFD\uFFFD\uFFFD\uFFFDv1
inform.work.flow.processDefinitionKey
=
equipment_inform_process_v1
## \uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u052E\uFFFD\uFFFD\uFFFD\u03F2\uFFFDID
fire-rescue
=
1432549862557130753
...
...
@@ -114,12 +111,9 @@ flc.sms.tempCode=SMS_TZS_0001
### \u7BA1\u7406\u5458\u53D8\u66F4\u673A\u5668\u4EBA\u8D26\u53F7
#tzs.admin.name=tzs_admin
## \u0524\uFFFD\uFFFD\u0368\u05AA\u0123\uFFFD\uFFFDid
tzs.wechat.tempId.warning
=
-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY
##\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u0368\u05AA
tzs.wechat.tempId.supervise
=
P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE
## \uFFFD\uFFFD\uFFFD\u06BA\u0172\uFFFD\uFFFD\uFFFD\uFFFD\u00FB\uFFFDid\uFFFD\uFFFD\u01BD\u0328userId\uFFFD\uFFFD
tzs.wechat.test.userId
=
3393279
...
...
@@ -141,11 +135,9 @@ amos.system.user.password=a1234567
amos.system.user.app-key
=
AMOS_STUDIO
amos.system.user.product
=
AMOS_STUDIO_WEB
## ??????????????topic
amos.operation.log
=
$share/${spring.application.name}//amos/operation/log
amos.agency.code
=
tzs
## ?????orgCode
regulator.unit.code
=
50
spring.main.allow-bean-definition-overriding
=
true
...
...
amos-boot-system-tzs/amos-boot-module-ys/amos-boot-module-ys-biz/src/main/java/com/yeejoin/amos/boot/module/ys/biz/utils/RedisUtil.java
View file @
20a6cc83
...
...
@@ -76,7 +76,7 @@ public class RedisUtil {
if
(
key
.
length
==
1
)
{
redisTemplate
.
delete
(
key
[
0
]);
}
else
{
redisTemplate
.
delete
(
CollectionUtils
.
arrayToList
(
key
))
;
redisTemplate
.
delete
(
Arrays
.
asList
(
key
));
;
}
}
}
...
...
amos-boot-system-tzs/pom.xml
View file @
20a6cc83
...
...
@@ -20,12 +20,24 @@
<module>
amos-boot-module-jczs
</module>
<module>
amos-boot-module-app
</module>
<module>
amos-boot-module-tzspatrol
</module>
<module>
amos-boot-module-ys
</module
>
<!-- <module>amos-boot-module-ys</module>--
>
</modules>
<properties>
<amos.version.tzs>
1.10.8-TZS
</amos.version.tzs>
</properties>
<dependencies>
<dependency>
<groupId>
com.alibaba.cloud
</groupId>
<artifactId>
spring-cloud-starter-alibaba-nacos-discovery
</artifactId>
</dependency>
<dependency>
<groupId>
com.alibaba.cloud
</groupId>
<artifactId>
spring-cloud-starter-alibaba-nacos-config
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-bootstrap
</artifactId>
</dependency>
<dependency>
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-boot-biz-common
</artifactId>
...
...
@@ -77,6 +89,7 @@
<dependency>
<groupId>
com.yeejoin
</groupId>
<artifactId>
amos-component-security
</artifactId>
<version>
${amos.version}
</version>
</dependency>
<dependency>
<groupId>
org.redisson
</groupId>
...
...
@@ -84,12 +97,9 @@
<version>
2.7.0
</version>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-client
</artifactId>
</dependency>
<dependency>
<groupId>
com.yeejoin
</groupId>
<artifactId>
amos-feign-systemctl
</artifactId>
<version>
${amos.version}
</version>
</dependency>
</dependencies>
...
...
pom.xml
View file @
20a6cc83
...
...
@@ -12,7 +12,7 @@
<parent>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
2.
3.11.RELEASE
</version>
<version>
2.
7.18
</version>
<relativePath
/>
</parent>
...
...
@@ -23,13 +23,14 @@
<maven.compiler.target>
1.8
</maven.compiler.target>
<fastjson.version>
1.2.83
</fastjson.version>
<knife4j-spring-boot-starter.version>
2.0.7
</knife4j-spring-boot-starter.version>
<springboot.version>
2.
3.11.RELEASE
</springboot.version>
<springcloud.version>
Hoxton.SR8
</springcloud.version>
<springboot.version>
2.
7.18
</springboot.version>
<springcloud.version>
2021.0.9
</springcloud.version>
<maven-jar-plugin.version>
3.1.1
</maven-jar-plugin.version>
<tyboot-version>
1.
1.26-TZS
</tyboot-version>
<amos.version>
1.10.8
-TZS
</amos.version>
<tyboot-version>
1.
2.2-SNAPSHOT
</tyboot-version>
<amos.version>
2.0.2
-TZS
</amos.version>
<itext.version>
7.1.1
</itext.version>
<elasticsearch.version>
7.15.2
</elasticsearch.version>
<alibaba.cloud.version>
2021.0.5.0
</alibaba.cloud.version>
</properties>
<dependencies>
...
...
@@ -183,6 +184,13 @@
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
com.alibaba.cloud
</groupId>
<artifactId>
spring-cloud-alibaba-dependencies
</artifactId>
<version>
${alibaba.cloud.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-dependencies
</artifactId>
<version>
${springcloud.version}
</version>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment