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
76956efb
Commit
76956efb
authored
Mar 25, 2024
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
漏洞文件漏洞修改
parent
70b64d2f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
464 additions
and
276 deletions
+464
-276
ExcelUtil.java
...ava/com/yeejoin/amos/boot/biz/common/excel/ExcelUtil.java
+36
-14
WorkflowExcuteServiceImpl.java
...ot/biz/common/service/impl/WorkflowExcuteServiceImpl.java
+2
-2
DynamicEnumUtil.java
...m/yeejoin/amos/boot/biz/common/utils/DynamicEnumUtil.java
+16
-12
QRCodeUtil.java
...va/com/yeejoin/amos/boot/biz/common/utils/QRCodeUtil.java
+2
-3
SecureRandomUtil.java
.../yeejoin/amos/boot/biz/common/utils/SecureRandomUtil.java
+30
-0
TreeParser.java
...va/com/yeejoin/amos/boot/biz/common/utils/TreeParser.java
+13
-6
WordConverterUtils.java
...eejoin/amos/boot/biz/common/utils/WordConverterUtils.java
+42
-32
oConvertUtils.java
...com/yeejoin/amos/boot/biz/common/utils/oConvertUtils.java
+14
-4
HttpContentTypeUtil.java
...com/yeejoin/amos/api/alarm/utils/HttpContentTypeUtil.java
+31
-31
ExcelUtil.java
.../yeejoin/amos/boot/module/common/api/excel/ExcelUtil.java
+0
-0
TemplateDynamicCellWriteHandlerDate.java
...common/api/excel/TemplateDynamicCellWriteHandlerDate.java
+3
-2
QRCodeUtil.java
...java/com/yeejoin/equipmanage/common/utils/QRCodeUtil.java
+5
-3
RandomUtil.java
...java/com/yeejoin/equipmanage/common/utils/RandomUtil.java
+5
-2
RandomUtils.java
...ava/com/yeejoin/equipmanage/common/utils/RandomUtils.java
+5
-2
WordTemplateUtils.java
...m/yeejoin/equipmanage/common/utils/WordTemplateUtils.java
+5
-3
FailureDetailsServiceImpl.java
...le/common/biz/service/impl/FailureDetailsServiceImpl.java
+2
-2
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+1
-1
ConfigureController.java
...m/yeejoin/equipmanage/controller/ConfigureController.java
+1
-1
EmergencyController.java
...m/yeejoin/equipmanage/controller/EmergencyController.java
+18
-18
EquipmentIndexController.java
...join/equipmanage/controller/EquipmentIndexController.java
+2
-2
TopographyController.java
.../yeejoin/equipmanage/controller/TopographyController.java
+1
-1
AreaSynRiskOperator.java
...om/yeejoin/equipmanage/operation/AreaSynRiskOperator.java
+4
-2
EquipmentIndexImpl.java
.../yeejoin/equipmanage/service/impl/EquipmentIndexImpl.java
+2
-2
EquipmentManageServiceImpl.java
.../equipmanage/service/impl/EquipmentManageServiceImpl.java
+2
-1
EquipmentSpecificAlarmServiceImpl.java
...anage/service/impl/EquipmentSpecificAlarmServiceImpl.java
+13
-12
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+2
-2
MqttReceiveServiceImpl.java
...join/equipmanage/service/impl/MqttReceiveServiceImpl.java
+2
-2
WarehouseStructureServiceImpl.java
...uipmanage/service/impl/WarehouseStructureServiceImpl.java
+1
-1
AlertSubmittedServiceImpl.java
...odule/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
+23
-5
VoiceRecordLogServiceImpl.java
...odule/jcs/biz/service/impl/VoiceRecordLogServiceImpl.java
+10
-9
CheckServiceImpl.java
...n/amos/patrol/business/service/impl/CheckServiceImpl.java
+4
-4
LatentDangerServiceImpl.java
...patrol/business/service/impl/LatentDangerServiceImpl.java
+1
-1
PointServiceImpl.java
...n/amos/patrol/business/service/impl/PointServiceImpl.java
+7
-5
SynDataServiceImpl.java
...amos/patrol/business/service/impl/SynDataServiceImpl.java
+2
-1
DateUtil.java
.../java/com/yeejoin/amos/patrol/business/util/DateUtil.java
+8
-4
DesUtil.java
...n/java/com/yeejoin/amos/patrol/business/util/DesUtil.java
+107
-59
PlanTaskUtil.java
...a/com/yeejoin/amos/patrol/business/util/PlanTaskUtil.java
+12
-10
QRCodeUtil.java
...ava/com/yeejoin/amos/patrol/business/util/QRCodeUtil.java
+2
-1
RandomUtil.java
...ava/com/yeejoin/amos/patrol/business/util/RandomUtil.java
+5
-2
WordTemplateUtils.java
.../yeejoin/amos/patrol/business/util/WordTemplateUtils.java
+5
-3
DateUtil.java
...main/java/com/yeejoin/amos/patrol/core/util/DateUtil.java
+4
-2
DateUtil.java
...n/java/com/yeejoin/amos/jpush/common/entity/DateUtil.java
+6
-3
DateUtil.java
...va/com/yeejoin/amos/jpush/service/core/util/DateUtil.java
+4
-2
DateUtil.java
...h/src/main/java/com/yeejoin/amos/jpush/util/DateUtil.java
+4
-2
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/excel/ExcelUtil.java
View file @
76956efb
...
@@ -46,7 +46,9 @@ public class ExcelUtil {
...
@@ -46,7 +46,9 @@ public class ExcelUtil {
Class
<?>
model
,
DataSources
dataDictionaryMapper
,
boolean
flag
)
{
Class
<?>
model
,
DataSources
dataDictionaryMapper
,
boolean
flag
)
{
HorizontalCellStyleStrategy
horizontalCellStyleStrategy
=
setMyCellStyle
();
HorizontalCellStyleStrategy
horizontalCellStyleStrategy
=
setMyCellStyle
();
OutputStream
outputStream
=
null
;
try
{
try
{
outputStream
=
getOutputStream
(
fileName
,
response
,
ExcelTypeEnum
.
XLSX
);
//下拉列表集合
//下拉列表集合
Map
<
Integer
,
String
[]>
explicitListConstraintMap
=
new
HashMap
<>();
Map
<
Integer
,
String
[]>
explicitListConstraintMap
=
new
HashMap
<>();
if
(
flag
)
{
if
(
flag
)
{
...
@@ -59,16 +61,25 @@ public class ExcelUtil {
...
@@ -59,16 +61,25 @@ public class ExcelUtil {
resolveExplicitConstraint
(
explicitListConstraintMap
,
explicitConstraint
,
dataDictionaryMapper
);
resolveExplicitConstraint
(
explicitListConstraintMap
,
explicitConstraint
,
dataDictionaryMapper
);
}
}
}
}
EasyExcel
.
write
(
getOutputStream
(
fileName
,
response
,
ExcelTypeEnum
.
XLSX
),
model
)
if
(
null
!=
outputStream
)
{
.
excelType
(
ExcelTypeEnum
.
XLSX
).
sheet
(
sheetName
)
EasyExcel
.
write
(
outputStream
,
model
)
.
registerWriteHandler
(
new
TemplateCellWriteHandlerDate
(
explicitListConstraintMap
))
.
excelType
(
ExcelTypeEnum
.
XLSX
).
sheet
(
sheetName
)
.
registerWriteHandler
(
new
TemplateCellWriteHandler
())
.
registerWriteHandler
(
new
TemplateCellWriteHandlerDate
(
explicitListConstraintMap
))
.
registerWriteHandler
(
horizontalCellStyleStrategy
)
.
registerWriteHandler
(
new
TemplateCellWriteHandler
())
.
doWrite
(
data
);
.
registerWriteHandler
(
horizontalCellStyleStrategy
)
.
doWrite
(
data
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
"系统异常!"
);
throw
new
RuntimeException
(
"系统异常!"
);
}
finally
{
if
(
null
!=
outputStream
)
{
try
{
outputStream
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
}
}
}
...
@@ -88,7 +99,9 @@ public class ExcelUtil {
...
@@ -88,7 +99,9 @@ public class ExcelUtil {
boolean
flag
)
{
boolean
flag
)
{
HorizontalCellStyleStrategy
horizontalCellStyleStrategy
=
setMyCellStyle
();
HorizontalCellStyleStrategy
horizontalCellStyleStrategy
=
setMyCellStyle
();
OutputStream
outputStream
=
null
;
try
{
try
{
outputStream
=
getOutputStream
(
fileName
,
response
,
ExcelTypeEnum
.
XLSX
);
// 组装表头
// 组装表头
List
<
List
<
String
>>
dutyCarTitleList
=
new
ArrayList
<>();
List
<
List
<
String
>>
dutyCarTitleList
=
new
ArrayList
<>();
Field
[]
declaredFields
=
model
.
getDeclaredFields
();
Field
[]
declaredFields
=
model
.
getDeclaredFields
();
...
@@ -127,16 +140,25 @@ public class ExcelUtil {
...
@@ -127,16 +140,25 @@ public class ExcelUtil {
}
}
// String s = new String(fileName.getBytes(), "UTF-8");
// String s = new String(fileName.getBytes(), "UTF-8");
// response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(s, "UTF-8"));
// response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(s, "UTF-8"));
ExcelWriterSheetBuilder
excelWriterSheetBuilder
=
EasyExcel
.
write
(
getOutputStream
(
fileName
,
response
,
if
(
null
!=
outputStream
)
{
ExcelTypeEnum
.
XLSX
)).
head
(
dutyCarTitleList
).
excelType
(
ExcelTypeEnum
.
XLSX
)
ExcelWriterSheetBuilder
excelWriterSheetBuilder
=
EasyExcel
.
write
(
outputStream
)
.
sheet
(
sheetName
).
registerWriteHandler
(
new
TemplateCellWriteHandlerDate
(
explicitListConstraintMap
))
.
head
(
dutyCarTitleList
).
excelType
(
ExcelTypeEnum
.
XLSX
)
.
registerWriteHandler
(
new
TemplateCellWriteHandler
())
.
sheet
(
sheetName
).
registerWriteHandler
(
new
TemplateCellWriteHandlerDate
(
explicitListConstraintMap
))
.
registerWriteHandler
(
horizontalCellStyleStrategy
);
.
registerWriteHandler
(
new
TemplateCellWriteHandler
())
excelWriterSheetBuilder
.
doWrite
(
data
);
.
registerWriteHandler
(
horizontalCellStyleStrategy
);
excelWriterSheetBuilder
.
doWrite
(
data
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
"系统异常!"
);
throw
new
RuntimeException
(
"系统异常!"
);
}
finally
{
if
(
null
!=
outputStream
)
{
try
{
outputStream
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
}
}
}
...
...
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/service/impl/WorkflowExcuteServiceImpl.java
View file @
76956efb
...
@@ -6,6 +6,7 @@ import com.google.common.collect.Sets;
...
@@ -6,6 +6,7 @@ import com.google.common.collect.Sets;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.enums.WorkFlowEnum
;
import
com.yeejoin.amos.boot.biz.common.enums.WorkFlowEnum
;
import
com.yeejoin.amos.boot.biz.common.service.IWorkflowExcuteService
;
import
com.yeejoin.amos.boot.biz.common.service.IWorkflowExcuteService
;
import
com.yeejoin.amos.boot.biz.common.utils.SecureRandomUtil
;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -29,9 +30,8 @@ public class WorkflowExcuteServiceImpl implements IWorkflowExcuteService {
...
@@ -29,9 +30,8 @@ public class WorkflowExcuteServiceImpl implements IWorkflowExcuteService {
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
newDate
=
sdf
.
format
(
new
Date
());
String
newDate
=
sdf
.
format
(
new
Date
());
String
result
=
""
;
String
result
=
""
;
Random
random
=
new
Random
();
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
result
+=
random
.
nextInt
(
10
);
result
+=
SecureRandomUtil
.
getIntSecureRandom
(
10
);
}
}
return
newDate
+
result
;
return
newDate
+
result
;
}
}
...
...
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/DynamicEnumUtil.java
View file @
76956efb
...
@@ -109,22 +109,26 @@ public class DynamicEnumUtil {
...
@@ -109,22 +109,26 @@ public class DynamicEnumUtil {
AccessibleObject
.
setAccessible
(
new
Field
[]{
valuesField
},
true
);
AccessibleObject
.
setAccessible
(
new
Field
[]{
valuesField
},
true
);
try
{
try
{
// 2. 将他拷贝到数组
if
(
null
!=
valuesField
)
{
T
[]
previousValues
=
(
T
[])
valuesField
.
get
(
enumType
);
// 2. 将他拷贝到数组
List
<
T
>
values
=
new
ArrayList
<
T
>(
Arrays
.
asList
(
previousValues
));
T
[]
previousValues
=
(
T
[])
valuesField
.
get
(
enumType
);
List
<
T
>
values
=
new
ArrayList
<
T
>(
Arrays
.
asList
(
previousValues
));
// 3. 创建新的枚举项
// 3. 创建新的枚举项
T
newValue
=
(
T
)
makeEnum
(
enumType
,
enumName
,
values
.
size
(),
additionalTypes
,
additionalValues
);
T
newValue
=
(
T
)
makeEnum
(
enumType
,
enumName
,
values
.
size
(),
additionalTypes
,
additionalValues
);
// 4. 添加新的枚举项
// 4. 添加新的枚举项
values
.
add
(
newValue
);
values
.
add
(
newValue
);
// 5. 设定拷贝的数组,到枚举类型
// 5. 设定拷贝的数组,到枚举类型
setFailsafeFieldValue
(
valuesField
,
null
,
values
.
toArray
((
T
[])
Array
.
newInstance
(
enumType
,
0
)));
setFailsafeFieldValue
(
valuesField
,
null
,
values
.
toArray
((
T
[])
Array
.
newInstance
(
enumType
,
0
)));
// 6. 清楚枚举的缓存
// 6. 清楚枚举的缓存
cleanEnumCache
(
enumType
);
cleanEnumCache
(
enumType
);
return
newValue
;
return
newValue
;
}
else
{
return
null
;
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
.
getMessage
(),
e
);
throw
new
RuntimeException
(
e
.
getMessage
(),
e
);
}
}
...
...
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/QRCodeUtil.java
View file @
76956efb
...
@@ -58,10 +58,9 @@ public class QRCodeUtil {
...
@@ -58,10 +58,9 @@ public class QRCodeUtil {
try
{
try
{
res
=
simpleDateFormat
.
format
(
new
Date
(
System
.
currentTimeMillis
())).
substring
(
5
,
8
)
+
String
.
valueOf
(
IdWorker
.
getFlowIdWorkerInstance
().
nextId
()).
substring
(
0
,
10
)
+
randomNumForQrCode
;
res
=
simpleDateFormat
.
format
(
new
Date
(
System
.
currentTimeMillis
())).
substring
(
5
,
8
)
+
String
.
valueOf
(
IdWorker
.
getFlowIdWorkerInstance
().
nextId
()).
substring
(
0
,
10
)
+
randomNumForQrCode
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
Random
random
=
new
Random
(
System
.
currentTimeMillis
());
String
tmp
=
""
;
String
tmp
=
""
;
for
(
int
i
=
0
;
i
<
13
;
i
++)
{
for
(
int
i
=
0
;
i
<
13
;
i
++)
{
tmp
+=
random
.
nextInt
(
10
);
tmp
+=
SecureRandomUtil
.
getIntSecureRandom
(
10
);
}
}
res
=
simpleDateFormat
.
format
(
new
Date
(
System
.
currentTimeMillis
())).
substring
(
2
,
8
)
+
tmp
.
substring
(
0
,
10
)
+
randomNumForQrCode
;
res
=
simpleDateFormat
.
format
(
new
Date
(
System
.
currentTimeMillis
())).
substring
(
2
,
8
)
+
tmp
.
substring
(
0
,
10
)
+
randomNumForQrCode
;
}
finally
{
}
finally
{
...
@@ -78,7 +77,7 @@ public class QRCodeUtil {
...
@@ -78,7 +77,7 @@ public class QRCodeUtil {
*/
*/
public
static
String
temporaryQrCode
()
{
public
static
String
temporaryQrCode
()
{
long
qrCode
=
-
1
*
System
.
currentTimeMillis
();
long
qrCode
=
-
1
*
System
.
currentTimeMillis
();
qrCode
+=
(
long
)
(
random
.
next
Double
()
*
10000000
);
qrCode
+=
(
long
)
(
SecureRandomUtil
.
getIntSecureRandomBy
Double
()
*
10000000
);
return
String
.
valueOf
(
qrCode
);
return
String
.
valueOf
(
qrCode
);
}
}
...
...
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/SecureRandomUtil.java
0 → 100644
View file @
76956efb
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
utils
;
import
java.security.SecureRandom
;
import
java.util.Random
;
public
class
SecureRandomUtil
{
public
static
int
getIntSecureRandom
(
Integer
bound
)
{
SecureRandom
secureRandom
=
new
SecureRandom
();
return
secureRandom
.
nextInt
(
bound
);
}
public
static
Double
getIntSecureRandomByDouble
()
{
SecureRandom
secureRandom
=
new
SecureRandom
();
return
secureRandom
.
nextDouble
();
}
public
static
int
getIntSecureRandom
(
Integer
bound
,
SecureRandom
secureRandom
)
{
return
secureRandom
.
nextInt
(
bound
);
}
public
static
void
main
(
String
[]
args
)
{
SecureRandom
secureRandom
=
new
SecureRandom
();
System
.
out
.
println
((
secureRandom
.
nextDouble
()
*
9
+
1
)
*
100000
+
"-----"
);
Random
random
=
new
Random
();
System
.
out
.
println
((
Math
.
random
()
*
9
+
1
)
*
100000
);
System
.
out
.
println
((
int
)
(
secureRandom
.
nextDouble
()
*
900
+
100
));
}
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/TreeParser.java
View file @
76956efb
...
@@ -322,7 +322,10 @@ public class TreeParser {
...
@@ -322,7 +322,10 @@ public class TreeParser {
String
.
valueOf
(
NAMEMethodNameme
.
invoke
(
entity
)),
String
.
valueOf
(
NAMEMethodNameme
.
invoke
(
entity
)),
String
.
valueOf
(
NAMEMethodNameme
.
invoke
(
entity
)),
String
.
valueOf
(
NAMEMethodNameme
.
invoke
(
entity
)),
String
.
valueOf
(
NAMEMethodNameme
.
invoke
(
entity
)),
parentId
,
String
.
valueOf
(
NAMEMethodNameme
.
invoke
(
entity
)),
parentId
,
String
.
valueOf
(
nodeTypeMethod
==
null
?
"0"
:
nodeTypeMethod
.
invoke
(
entity
)));
"0"
);
if
(
null
!=
nodeTypeMethod
&&
null
!=
nodeTypeMethod
.
invoke
(
entity
))
{
menu
.
setNodeType
(
String
.
valueOf
(
nodeTypeMethod
.
invoke
(
entity
)));
}
resultList
.
add
(
menu
);
resultList
.
add
(
menu
);
}
}
}
}
...
@@ -385,7 +388,10 @@ public class TreeParser {
...
@@ -385,7 +388,10 @@ public class TreeParser {
String
.
valueOf
(
NAMEMethodNameme
.
invoke
(
entity
)),
String
.
valueOf
(
NAMEMethodNameme
.
invoke
(
entity
)),
String
.
valueOf
(
NAMEMethodNameme
.
invoke
(
entity
)),
String
.
valueOf
(
NAMEMethodNameme
.
invoke
(
entity
)),
String
.
valueOf
(
NAMEMethodNameme
.
invoke
(
entity
)),
parentId
,
String
.
valueOf
(
NAMEMethodNameme
.
invoke
(
entity
)),
parentId
,
String
.
valueOf
(
nodeTypeMethod
==
null
?
"0"
:
nodeTypeMethod
.
invoke
(
entity
)));
"0"
);
if
(
null
!=
nodeTypeMethod
&&
null
!=
nodeTypeMethod
.
invoke
(
entity
))
{
menu
.
setNodeType
(
String
.
valueOf
(
nodeTypeMethod
.
invoke
(
entity
)));
}
childList
.
add
(
menu
);
childList
.
add
(
menu
);
}
}
}
else
{
}
else
{
...
@@ -396,7 +402,10 @@ public class TreeParser {
...
@@ -396,7 +402,10 @@ public class TreeParser {
String
.
valueOf
(
NAMEMethodNameme
.
invoke
(
entity
)),
String
.
valueOf
(
NAMEMethodNameme
.
invoke
(
entity
)),
String
.
valueOf
(
NAMEMethodNameme
.
invoke
(
entity
)),
String
.
valueOf
(
NAMEMethodNameme
.
invoke
(
entity
)),
String
.
valueOf
(
NAMEMethodNameme
.
invoke
(
entity
)),
parentId
,
String
.
valueOf
(
NAMEMethodNameme
.
invoke
(
entity
)),
parentId
,
String
.
valueOf
(
nodeTypeMethod
==
null
?
"0"
:
nodeTypeMethod
.
invoke
(
entity
)));
"0"
);
if
(
null
!=
nodeTypeMethod
&&
null
!=
nodeTypeMethod
.
invoke
(
entity
))
{
menu
.
setNodeType
(
String
.
valueOf
(
nodeTypeMethod
.
invoke
(
entity
)));
}
childList
.
add
(
menu
);
childList
.
add
(
menu
);
}
}
}
}
...
@@ -420,11 +429,9 @@ public class TreeParser {
...
@@ -420,11 +429,9 @@ public class TreeParser {
public
static
String
genTreeCode
()
{
public
static
String
genTreeCode
()
{
int
length
=
CODE_LENGTH
;
int
length
=
CODE_LENGTH
;
String
str
=
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
;
String
str
=
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
;
Random
random
=
new
Random
();
StringBuffer
sb
=
new
StringBuffer
();
StringBuffer
sb
=
new
StringBuffer
();
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
int
number
=
random
.
nextInt
(
62
);
sb
.
append
(
str
.
charAt
(
SecureRandomUtil
.
getIntSecureRandom
(
62
)));
sb
.
append
(
str
.
charAt
(
number
));
}
}
return
sb
.
toString
();
return
sb
.
toString
();
}
}
...
...
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/WordConverterUtils.java
View file @
76956efb
...
@@ -82,7 +82,8 @@ public class WordConverterUtils {
...
@@ -82,7 +82,8 @@ public class WordConverterUtils {
* @param fileService 图片上传接口
* @param fileService 图片上传接口
*/
*/
private
static
void
docToHtml
(
String
imagePathStr
,
String
readUrl
,
String
srcFile
,
File
targetFile
,
FileService
fileService
,
String
product
,
String
appKey
,
String
token
)
{
private
static
void
docToHtml
(
String
imagePathStr
,
String
readUrl
,
String
srcFile
,
File
targetFile
,
FileService
fileService
,
String
product
,
String
appKey
,
String
token
)
{
try
{
InputStream
in
=
null
;
try
{
File
imagePath
=
new
File
(
imagePathStr
);
File
imagePath
=
new
File
(
imagePathStr
);
if
(!
imagePath
.
exists
())
{
if
(!
imagePath
.
exists
())
{
imagePath
.
mkdirs
();
imagePath
.
mkdirs
();
...
@@ -91,39 +92,48 @@ public class WordConverterUtils {
...
@@ -91,39 +92,48 @@ public class WordConverterUtils {
//链接url
//链接url
URLConnection
uc
=
url
.
openConnection
();
URLConnection
uc
=
url
.
openConnection
();
//获取输入流
//获取输入流
InputStream
in
=
uc
.
getInputStream
();
in
=
uc
.
getInputStream
();
if
(
null
!=
in
)
{
HWPFDocument
wordDocument
=
new
HWPFDocument
(
in
);
HWPFDocument
wordDocument
=
new
HWPFDocument
(
in
);
org
.
w3c
.
dom
.
Document
document
=
DocumentBuilderFactory
.
newInstance
().
newDocumentBuilder
().
newDocument
();
org
.
w3c
.
dom
.
Document
document
=
DocumentBuilderFactory
.
newInstance
().
newDocumentBuilder
().
newDocument
();
WordToHtmlConverter
wordToHtmlConverter
=
new
WordToHtmlConverter
(
document
);
WordToHtmlConverter
wordToHtmlConverter
=
new
WordToHtmlConverter
(
document
);
wordToHtmlConverter
.
setPicturesManager
((
content
,
pictureType
,
name
,
width
,
height
)
->
{
wordToHtmlConverter
.
setPicturesManager
((
content
,
pictureType
,
name
,
width
,
height
)
->
{
try
{
try
{
FileOutputStream
out
=
new
FileOutputStream
(
imagePathStr
+
name
);
FileOutputStream
out
=
new
FileOutputStream
(
imagePathStr
+
name
);
out
.
write
(
content
);
out
.
write
(
content
);
String
urlString
=
fileService
.
uploadFile
(
fileToMultipartFile
(
new
File
(
imagePathStr
+
name
)),
product
,
appKey
,
token
);
String
urlString
=
fileService
.
uploadFile
(
fileToMultipartFile
(
new
File
(
imagePathStr
+
name
)),
product
,
appKey
,
token
);
//上传平台
//上传平台
return
readUrl
+
urlString
;
return
readUrl
+
urlString
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
return
""
;
return
""
;
}
}
});
});
wordToHtmlConverter
.
processDocument
(
wordDocument
);
wordToHtmlConverter
.
processDocument
(
wordDocument
);
org
.
w3c
.
dom
.
Document
htmlDocument
=
wordToHtmlConverter
.
getDocument
();
org
.
w3c
.
dom
.
Document
htmlDocument
=
wordToHtmlConverter
.
getDocument
();
DOMSource
domSource
=
new
DOMSource
(
htmlDocument
);
DOMSource
domSource
=
new
DOMSource
(
htmlDocument
);
StreamResult
streamResult
=
new
StreamResult
(
targetFile
);
StreamResult
streamResult
=
new
StreamResult
(
targetFile
);
TransformerFactory
tf
=
TransformerFactory
.
newInstance
();
TransformerFactory
tf
=
TransformerFactory
.
newInstance
();
Transformer
serializer
=
tf
.
newTransformer
();
Transformer
serializer
=
tf
.
newTransformer
();
serializer
.
setOutputProperty
(
OutputKeys
.
ENCODING
,
"utf-8"
);
serializer
.
setOutputProperty
(
OutputKeys
.
ENCODING
,
"utf-8"
);
serializer
.
setOutputProperty
(
OutputKeys
.
INDENT
,
"yes"
);
serializer
.
setOutputProperty
(
OutputKeys
.
INDENT
,
"yes"
);
serializer
.
setOutputProperty
(
OutputKeys
.
METHOD
,
"html"
);
serializer
.
setOutputProperty
(
OutputKeys
.
METHOD
,
"html"
);
serializer
.
transform
(
domSource
,
streamResult
);
serializer
.
transform
(
domSource
,
streamResult
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
finally
{
if
(
null
!=
in
)
{
try
{
in
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
}
}
...
...
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/oConvertUtils.java
View file @
76956efb
...
@@ -544,9 +544,8 @@ public class oConvertUtils {
...
@@ -544,9 +544,8 @@ public class oConvertUtils {
public
static
String
randomGen
(
int
place
)
{
public
static
String
randomGen
(
int
place
)
{
String
base
=
"qwertyuioplkjhgfdsazxcvbnmQAZWSXEDCRFVTGBYHNUJMIKLOP0123456789"
;
String
base
=
"qwertyuioplkjhgfdsazxcvbnmQAZWSXEDCRFVTGBYHNUJMIKLOP0123456789"
;
StringBuffer
sb
=
new
StringBuffer
();
StringBuffer
sb
=
new
StringBuffer
();
Random
rd
=
new
Random
();
for
(
int
i
=
0
;
i
<
place
;
i
++)
{
for
(
int
i
=
0
;
i
<
place
;
i
++)
{
sb
.
append
(
base
.
charAt
(
rd
.
nextInt
(
base
.
length
()
)));
sb
.
append
(
base
.
charAt
(
SecureRandomUtil
.
getIntSecureRandom
(
62
)));
}
}
return
sb
.
toString
();
return
sb
.
toString
();
}
}
...
@@ -657,12 +656,23 @@ public class oConvertUtils {
...
@@ -657,12 +656,23 @@ public class oConvertUtils {
*/
*/
public
static
String
readStatic
(
String
url
)
{
public
static
String
readStatic
(
String
url
)
{
String
json
=
""
;
String
json
=
""
;
InputStream
stream
=
null
;
try
{
try
{
//换个写法,解决springboot读取jar包中文件的问题
//换个写法,解决springboot读取jar包中文件的问题
InputStream
stream
=
oConvertUtils
.
class
.
getClassLoader
().
getResourceAsStream
(
url
.
replace
(
"classpath:"
,
""
));
stream
=
oConvertUtils
.
class
.
getClassLoader
().
getResourceAsStream
(
url
.
replace
(
"classpath:"
,
""
));
json
=
IOUtils
.
toString
(
stream
,
"UTF-8"
);
if
(
null
!=
stream
)
{
json
=
IOUtils
.
toString
(
stream
,
"UTF-8"
);
}
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
}
finally
{
if
(
null
!=
stream
)
{
try
{
stream
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
}
return
json
;
return
json
;
}
}
...
...
amos-boot-data/amos-boot-data-alarm/src/main/java/com/yeejoin/amos/api/alarm/utils/HttpContentTypeUtil.java
View file @
76956efb
...
@@ -401,37 +401,37 @@ public class HttpContentTypeUtil {
...
@@ -401,37 +401,37 @@ public class HttpContentTypeUtil {
return
sendHttpGet
(
httpGet
);
return
sendHttpGet
(
httpGet
);
}
}
/**
//
/**
* 发送 delete请求带请求头
//
* 发送 delete请求带请求头
*/
//
*/
public
static
String
sendHttpDeleteJsonWithHeader
(
String
httpUrl
,
String
paramsJson
,
Map
<
String
,
String
>
headerMap
)
{
//
public static String sendHttpDeleteJsonWithHeader(String httpUrl, String paramsJson, Map<String, String> headerMap) {
StringBuffer
content
=
new
StringBuffer
();
//
StringBuffer content = new StringBuffer();
try
{
//
try {
URL
url
=
new
URL
(
httpUrl
);
//
URL url = new URL(httpUrl);
HttpURLConnection
connection
=
(
HttpURLConnection
)
url
.
openConnection
();
//
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection
.
setRequestMethod
(
"DELETE"
);
//
connection.setRequestMethod("DELETE");
connection
.
setDoInput
(
true
);
//
connection.setDoInput(true);
connection
.
setDoOutput
(
true
);
//
connection.setDoOutput(true);
connection
.
setRequestProperty
(
"Content-Type"
,
"application/json;charset=UTF-8"
);
//
connection.setRequestProperty("Content-Type", "application/json;charset=UTF-8");
for
(
Map
.
Entry
<
String
,
String
>
entry
:
headerMap
.
entrySet
())
{
//
for (Map.Entry<String, String> entry : headerMap.entrySet()) {
connection
.
setRequestProperty
(
entry
.
getKey
(),
entry
.
getValue
());
//
connection.setRequestProperty(entry.getKey(), entry.getValue());
}
//
}
PrintWriter
printWriter
=
new
PrintWriter
(
connection
.
getOutputStream
());
//
PrintWriter printWriter = new PrintWriter(connection.getOutputStream());
printWriter
.
write
(
paramsJson
);
//
printWriter.write(paramsJson);
printWriter
.
flush
();
//
printWriter.flush();
//
BufferedReader
br
=
new
BufferedReader
(
new
InputStreamReader
(
connection
.
getInputStream
()));
//
BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String
line
;
//
String line;
while
((
line
=
br
.
readLine
())
!=
null
)
{
//
while ((line = br.readLine()) != null) {
content
.
append
(
line
);
//
content.append(line);
}
//
}
br
.
close
();
//
br.close();
connection
.
disconnect
();
//
connection.disconnect();
}
catch
(
Exception
e
)
{
//
} catch (Exception e) {
//
}
//
}
return
content
.
toString
();
//
return content.toString();
}
//
}
/**
/**
* 发送 post请求
* 发送 post请求
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/excel/ExcelUtil.java
View file @
76956efb
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/excel/TemplateDynamicCellWriteHandlerDate.java
View file @
76956efb
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
excel
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
excel
;
import
java.security.SecureRandom
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Random
;
import
java.util.Random
;
import
com.yeejoin.amos.boot.biz.common.utils.SecureRandomUtil
;
import
org.apache.poi.ss.usermodel.DataValidation
;
import
org.apache.poi.ss.usermodel.DataValidation
;
import
org.apache.poi.ss.usermodel.DataValidationConstraint
;
import
org.apache.poi.ss.usermodel.DataValidationConstraint
;
import
org.apache.poi.ss.usermodel.DataValidationHelper
;
import
org.apache.poi.ss.usermodel.DataValidationHelper
;
...
@@ -72,8 +74,7 @@ public class TemplateDynamicCellWriteHandlerDate implements SheetWriteHandler{
...
@@ -72,8 +74,7 @@ public class TemplateDynamicCellWriteHandlerDate implements SheetWriteHandler{
if
(
v
.
length
>
LIMIT_NUMBER
)
{
if
(
v
.
length
>
LIMIT_NUMBER
)
{
//定义sheet的名称
//定义sheet的名称
//1.创建一个隐藏的sheet 名称为 hidden + k+随机数防止数据过多造成的名字重复
//1.创建一个隐藏的sheet 名称为 hidden + k+随机数防止数据过多造成的名字重复
Random
random
=
new
Random
();
String
sheetName
=
"hidden"
+
startIndex
+
k
+
SecureRandomUtil
.
getIntSecureRandom
(
1000
);
String
sheetName
=
"hidden"
+
startIndex
+
k
+
random
.
nextInt
(
1000
);
Workbook
workbook
=
writeWorkbookHolder
.
getWorkbook
();
Workbook
workbook
=
writeWorkbookHolder
.
getWorkbook
();
Sheet
hiddenSheet
=
workbook
.
createSheet
(
sheetName
);
Sheet
hiddenSheet
=
workbook
.
createSheet
(
sheetName
);
for
(
int
i
=
0
,
length
=
v
.
length
;
i
<
length
;
i
++)
{
for
(
int
i
=
0
,
length
=
v
.
length
;
i
<
length
;
i
++)
{
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/QRCodeUtil.java
View file @
76956efb
...
@@ -7,6 +7,7 @@ import com.google.zxing.client.j2se.MatrixToImageWriter;
...
@@ -7,6 +7,7 @@ import com.google.zxing.client.j2se.MatrixToImageWriter;
import
com.google.zxing.common.BitMatrix
;
import
com.google.zxing.common.BitMatrix
;
import
com.google.zxing.qrcode.QRCodeWriter
;
import
com.google.zxing.qrcode.QRCodeWriter
;
import
com.google.zxing.qrcode.decoder.ErrorCorrectionLevel
;
import
com.google.zxing.qrcode.decoder.ErrorCorrectionLevel
;
import
com.yeejoin.amos.boot.biz.common.utils.SecureRandomUtil
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
javax.imageio.ImageIO
;
import
javax.imageio.ImageIO
;
...
@@ -14,6 +15,7 @@ import java.awt.*;
...
@@ -14,6 +15,7 @@ import java.awt.*;
import
java.awt.image.BufferedImage
;
import
java.awt.image.BufferedImage
;
import
java.io.ByteArrayOutputStream
;
import
java.io.ByteArrayOutputStream
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.security.SecureRandom
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Base64
;
import
java.util.Base64
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -70,10 +72,10 @@ public class QRCodeUtil {
...
@@ -70,10 +72,10 @@ public class QRCodeUtil {
try
{
try
{
res
=
simpleDateFormat
.
format
(
new
Date
(
System
.
currentTimeMillis
())).
substring
(
5
,
8
)
+
String
.
valueOf
(
IdWorker
.
getFlowIdWorkerInstance
().
nextId
()).
substring
(
0
,
10
)
+
randomNumForQrCode
;
res
=
simpleDateFormat
.
format
(
new
Date
(
System
.
currentTimeMillis
())).
substring
(
5
,
8
)
+
String
.
valueOf
(
IdWorker
.
getFlowIdWorkerInstance
().
nextId
()).
substring
(
0
,
10
)
+
randomNumForQrCode
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
Random
random
=
new
Random
(
System
.
currentTimeMillis
()
);
SecureRandom
random
=
new
SecureRandom
(
);
String
tmp
=
""
;
String
tmp
=
""
;
for
(
int
i
=
0
;
i
<
13
;
i
++)
{
for
(
int
i
=
0
;
i
<
13
;
i
++)
{
tmp
+=
random
.
nextInt
(
10
);
tmp
+=
SecureRandomUtil
.
getIntSecureRandom
(
10
,
random
);
}
}
res
=
simpleDateFormat
.
format
(
new
Date
(
System
.
currentTimeMillis
())).
substring
(
2
,
8
)
+
tmp
.
substring
(
0
,
10
)
+
randomNumForQrCode
;
res
=
simpleDateFormat
.
format
(
new
Date
(
System
.
currentTimeMillis
())).
substring
(
2
,
8
)
+
tmp
.
substring
(
0
,
10
)
+
randomNumForQrCode
;
}
finally
{
}
finally
{
...
@@ -90,7 +92,7 @@ public class QRCodeUtil {
...
@@ -90,7 +92,7 @@ public class QRCodeUtil {
*/
*/
public
static
String
temporaryQrCode
()
{
public
static
String
temporaryQrCode
()
{
long
qrCode
=
-
1
*
System
.
currentTimeMillis
();
long
qrCode
=
-
1
*
System
.
currentTimeMillis
();
qrCode
+=
(
long
)
(
random
.
next
Double
()
*
10000000
);
qrCode
+=
(
long
)
(
SecureRandomUtil
.
getIntSecureRandomBy
Double
()
*
10000000
);
return
String
.
valueOf
(
qrCode
);
return
String
.
valueOf
(
qrCode
);
}
}
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/RandomUtil.java
View file @
76956efb
package
com
.
yeejoin
.
equipmanage
.
common
.
utils
;
package
com
.
yeejoin
.
equipmanage
.
common
.
utils
;
import
com.yeejoin.amos.boot.biz.common.utils.SecureRandomUtil
;
import
java.security.SecureRandom
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.Random
;
import
java.util.Random
;
...
@@ -12,9 +15,9 @@ public class RandomUtil {
...
@@ -12,9 +15,9 @@ public class RandomUtil {
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
);
String
newDate
=
sdf
.
format
(
new
Date
());
String
newDate
=
sdf
.
format
(
new
Date
());
String
result
=
""
;
String
result
=
""
;
Random
random
=
new
Random
();
SecureRandom
random
=
new
Secure
Random
();
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
result
+=
random
.
nextInt
(
10
);
result
+=
SecureRandomUtil
.
getIntSecureRandom
(
10
,
random
);
}
}
return
newDate
+
result
;
return
newDate
+
result
;
}
}
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/RandomUtils.java
View file @
76956efb
package
com
.
yeejoin
.
equipmanage
.
common
.
utils
;
package
com
.
yeejoin
.
equipmanage
.
common
.
utils
;
import
com.yeejoin.amos.boot.biz.common.utils.SecureRandomUtil
;
import
java.security.SecureRandom
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.Random
;
import
java.util.Random
;
...
@@ -17,9 +20,9 @@ public class RandomUtils {
...
@@ -17,9 +20,9 @@ public class RandomUtils {
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"ddHHmmss"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"ddHHmmss"
);
String
newDate
=
sdf
.
format
(
new
Date
());
String
newDate
=
sdf
.
format
(
new
Date
());
String
result
=
""
;
String
result
=
""
;
Random
random
=
new
Random
();
SecureRandom
random
=
new
Secure
Random
();
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
result
+=
random
.
nextInt
(
10
);
result
+=
SecureRandomUtil
.
getIntSecureRandom
(
10
,
random
);
}
}
return
Long
.
valueOf
(
newDate
+
result
);
return
Long
.
valueOf
(
newDate
+
result
);
}
}
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/WordTemplateUtils.java
View file @
76956efb
...
@@ -197,9 +197,11 @@ public class WordTemplateUtils {
...
@@ -197,9 +197,11 @@ public class WordTemplateUtils {
e1
.
printStackTrace
();
e1
.
printStackTrace
();
}
}
try
{
try
{
data
=
new
byte
[
in
.
available
()];
if
(
null
!=
in
)
{
in
.
read
(
data
);
data
=
new
byte
[
in
.
available
()];
in
.
close
();
in
.
read
(
data
);
in
.
close
();
}
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
finally
{
}
finally
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureDetailsServiceImpl.java
View file @
76956efb
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.SecureRandomUtil
;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
import
com.yeejoin.amos.boot.biz.common.workflow.feign.WorkflowFeignService
;
import
com.yeejoin.amos.boot.module.common.api.dto.CurrentStatusDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.CurrentStatusDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto
;
...
@@ -550,9 +551,8 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -550,9 +551,8 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
newDate
=
sdf
.
format
(
new
Date
());
String
newDate
=
sdf
.
format
(
new
Date
());
String
result
=
""
;
String
result
=
""
;
Random
random
=
new
Random
();
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
result
+=
random
.
nextInt
(
10
);
result
+=
SecureRandomUtil
.
getIntSecureRandom
(
10
);
}
}
return
newDate
+
result
;
return
newDate
+
result
;
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
76956efb
...
@@ -3090,7 +3090,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -3090,7 +3090,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
String
code
=
key
.
substring
(
0
,
key
.
indexOf
(
"Code"
));
String
code
=
key
.
substring
(
0
,
key
.
indexOf
(
"Code"
));
o
=
map
.
get
(
code
);
o
=
map
.
get
(
code
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
o
))
{
if
(
null
!=
o
&&
!
ObjectUtils
.
isEmpty
(
o
))
{
dynamicFormInstanceDto
.
setFieldValue
(
value
.
toString
());
dynamicFormInstanceDto
.
setFieldValue
(
value
.
toString
());
dynamicFormInstanceDto
.
setFieldValueLabel
(
o
.
toString
());
dynamicFormInstanceDto
.
setFieldValueLabel
(
o
.
toString
());
}
else
{
}
else
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/ConfigureController.java
View file @
76956efb
...
@@ -282,7 +282,7 @@ public class ConfigureController extends AbstractBaseController {
...
@@ -282,7 +282,7 @@ public class ConfigureController extends AbstractBaseController {
unit
=
fireFightingSystemMapper
.
getWaterlevelUnit
(
s
,
"FHS_WirelessliquidDetector_WaterLevel"
);
unit
=
fireFightingSystemMapper
.
getWaterlevelUnit
(
s
,
"FHS_WirelessliquidDetector_WaterLevel"
);
}
}
}
}
if
(!
ObjectUtils
.
isEmpty
(
unit
)
&&
"CM"
.
equals
(
unit
.
get
(
"unit"
))
||
"cm"
.
equals
(
unit
.
get
(
"unit"
))
||
"厘米"
.
equals
(
unit
.
get
(
"unit"
))){
if
(!
ObjectUtils
.
isEmpty
(
unit
)
&&
(
"CM"
.
equals
(
unit
.
get
(
"unit"
))
||
"cm"
.
equals
(
unit
.
get
(
"unit"
))
||
"厘米"
.
equals
(
unit
.
get
(
"unit"
)
))){
BigDecimal
divide
=
new
BigDecimal
(
100
);
BigDecimal
divide
=
new
BigDecimal
(
100
);
if
(!
ObjectUtils
.
isEmpty
(
record
.
get
(
"nowLevel"
))
&&
!
"--"
.
equals
(
record
.
get
(
"nowLevel"
))){
if
(!
ObjectUtils
.
isEmpty
(
record
.
get
(
"nowLevel"
))
&&
!
"--"
.
equals
(
record
.
get
(
"nowLevel"
))){
BigDecimal
nowLevel
=
new
BigDecimal
(
String
.
valueOf
(
record
.
get
(
"nowLevel"
)));
BigDecimal
nowLevel
=
new
BigDecimal
(
String
.
valueOf
(
record
.
get
(
"nowLevel"
)));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EmergencyController.java
View file @
76956efb
...
@@ -211,8 +211,8 @@ public class EmergencyController extends AbstractBaseController {
...
@@ -211,8 +211,8 @@ public class EmergencyController extends AbstractBaseController {
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
long
startTime
=
weekStart
.
getTime
()
;
long
startTime
=
null
!=
weekStart
?
weekStart
.
getTime
()
:
0
;
long
endTime
=
weekEnd
.
getTime
()
;
long
endTime
=
null
!=
weekEnd
?
weekEnd
.
getTime
()
:
0
;
HashMap
<
String
,
Object
>
mapData
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
mapData
=
new
HashMap
<>();
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
Date
check
=
null
;
Date
check
=
null
;
...
@@ -221,7 +221,7 @@ public class EmergencyController extends AbstractBaseController {
...
@@ -221,7 +221,7 @@ public class EmergencyController extends AbstractBaseController {
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
if
(!
ObjectUtils
.
isEmpty
(
check
)
&&
check
.
getTime
()
>=
startTime
&&
check
.
getTime
()
<=
endTime
)
{
if
(
null
!=
check
&&
!
ObjectUtils
.
isEmpty
(
check
)
&&
check
.
getTime
()
>=
startTime
&&
check
.
getTime
()
<=
endTime
)
{
if
(!
ObjectUtils
.
isEmpty
(
mapData
))
{
if
(!
ObjectUtils
.
isEmpty
(
mapData
))
{
BigDecimal
old
=
new
BigDecimal
(
String
.
valueOf
(
mapData
.
get
(
"faultNum"
)));
BigDecimal
old
=
new
BigDecimal
(
String
.
valueOf
(
mapData
.
get
(
"faultNum"
)));
BigDecimal
add
=
new
BigDecimal
(
String
.
valueOf
(
map
.
get
(
"faultNum"
)));
BigDecimal
add
=
new
BigDecimal
(
String
.
valueOf
(
map
.
get
(
"faultNum"
)));
...
@@ -259,8 +259,8 @@ public class EmergencyController extends AbstractBaseController {
...
@@ -259,8 +259,8 @@ public class EmergencyController extends AbstractBaseController {
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
long
startTime1
=
weekStart1
.
getTime
()
;
long
startTime1
=
null
!=
weekStart1
?
weekStart1
.
getTime
()
:
0
;
long
endTime1
=
weekEnd1
.
getTime
()
;
long
endTime1
=
null
!=
weekEnd1
?
weekEnd1
.
getTime
()
:
0
;
HashMap
<
String
,
Object
>
mapData1
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
mapData1
=
new
HashMap
<>();
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
Date
check
=
null
;
Date
check
=
null
;
...
@@ -269,7 +269,7 @@ public class EmergencyController extends AbstractBaseController {
...
@@ -269,7 +269,7 @@ public class EmergencyController extends AbstractBaseController {
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
if
(!
ObjectUtils
.
isEmpty
(
check
)
&&
check
.
getTime
()
>=
startTime1
&&
check
.
getTime
()
<=
endTime1
)
{
if
(
null
!=
check
&&
!
ObjectUtils
.
isEmpty
(
check
)
&&
check
.
getTime
()
>=
startTime1
&&
check
.
getTime
()
<=
endTime1
)
{
if
(!
ObjectUtils
.
isEmpty
(
mapData1
))
{
if
(!
ObjectUtils
.
isEmpty
(
mapData1
))
{
BigDecimal
old
=
new
BigDecimal
(
String
.
valueOf
(
mapData1
.
get
(
"faultNum"
)));
BigDecimal
old
=
new
BigDecimal
(
String
.
valueOf
(
mapData1
.
get
(
"faultNum"
)));
BigDecimal
add
=
new
BigDecimal
(
String
.
valueOf
(
map
.
get
(
"faultNum"
)));
BigDecimal
add
=
new
BigDecimal
(
String
.
valueOf
(
map
.
get
(
"faultNum"
)));
...
@@ -358,8 +358,8 @@ public class EmergencyController extends AbstractBaseController {
...
@@ -358,8 +358,8 @@ public class EmergencyController extends AbstractBaseController {
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
long
startTime
=
weekStart
.
getTime
()
;
long
startTime
=
null
!=
weekStart
?
weekStart
.
getTime
()
:
0
;
long
endTime
=
weekEnd
.
getTime
()
;
long
endTime
=
null
!=
weekEnd
?
weekEnd
.
getTime
()
:
0
;
HashMap
<
String
,
Object
>
mapData
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
mapData
=
new
HashMap
<>();
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
Date
check
=
null
;
Date
check
=
null
;
...
@@ -368,7 +368,7 @@ public class EmergencyController extends AbstractBaseController {
...
@@ -368,7 +368,7 @@ public class EmergencyController extends AbstractBaseController {
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
if
(!
ObjectUtils
.
isEmpty
(
check
)
&&
check
.
getTime
()
>=
startTime
&&
check
.
getTime
()
<=
endTime
)
{
if
(
null
!=
check
&&
!
ObjectUtils
.
isEmpty
(
check
)
&&
check
.
getTime
()
>=
startTime
&&
check
.
getTime
()
<=
endTime
)
{
if
(!
ObjectUtils
.
isEmpty
(
mapData
))
{
if
(!
ObjectUtils
.
isEmpty
(
mapData
))
{
BigDecimal
old
=
new
BigDecimal
(
String
.
valueOf
(
mapData
.
get
(
"controlCabinetAlarmNum"
)));
BigDecimal
old
=
new
BigDecimal
(
String
.
valueOf
(
mapData
.
get
(
"controlCabinetAlarmNum"
)));
BigDecimal
add
=
new
BigDecimal
(
String
.
valueOf
(
map
.
get
(
"controlCabinetAlarmNum"
)));
BigDecimal
add
=
new
BigDecimal
(
String
.
valueOf
(
map
.
get
(
"controlCabinetAlarmNum"
)));
...
@@ -407,8 +407,8 @@ public class EmergencyController extends AbstractBaseController {
...
@@ -407,8 +407,8 @@ public class EmergencyController extends AbstractBaseController {
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
long
startTime1
=
weekStart1
.
getTime
()
;
long
startTime1
=
null
!=
weekStart1
?
weekStart1
.
getTime
()
:
0
;
long
endTime1
=
weekEnd1
.
getTime
()
;
long
endTime1
=
null
!=
weekEnd1
?
weekEnd1
.
getTime
()
:
0
;
HashMap
<
String
,
Object
>
mapData1
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
mapData1
=
new
HashMap
<>();
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
Date
check
=
null
;
Date
check
=
null
;
...
@@ -417,7 +417,7 @@ public class EmergencyController extends AbstractBaseController {
...
@@ -417,7 +417,7 @@ public class EmergencyController extends AbstractBaseController {
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
if
(!
ObjectUtils
.
isEmpty
(
check
)
&&
check
.
getTime
()
>=
startTime1
&&
check
.
getTime
()
<=
endTime1
)
{
if
(
null
!=
check
&&
!
ObjectUtils
.
isEmpty
(
check
)
&&
check
.
getTime
()
>=
startTime1
&&
check
.
getTime
()
<=
endTime1
)
{
if
(!
ObjectUtils
.
isEmpty
(
mapData1
))
{
if
(!
ObjectUtils
.
isEmpty
(
mapData1
))
{
BigDecimal
old
=
new
BigDecimal
(
String
.
valueOf
(
mapData1
.
get
(
"controlCabinetAlarmNum"
)));
BigDecimal
old
=
new
BigDecimal
(
String
.
valueOf
(
mapData1
.
get
(
"controlCabinetAlarmNum"
)));
BigDecimal
add
=
new
BigDecimal
(
String
.
valueOf
(
map
.
get
(
"controlCabinetAlarmNum"
)));
BigDecimal
add
=
new
BigDecimal
(
String
.
valueOf
(
map
.
get
(
"controlCabinetAlarmNum"
)));
...
@@ -479,8 +479,8 @@ public class EmergencyController extends AbstractBaseController {
...
@@ -479,8 +479,8 @@ public class EmergencyController extends AbstractBaseController {
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
long
startTime
=
weekStart
.
getTime
()
;
long
startTime
=
null
!=
weekStart
?
weekStart
.
getTime
()
:
0
;
long
endTime
=
weekEnd
.
getTime
()
;
long
endTime
=
null
!=
weekEnd
?
weekEnd
.
getTime
()
:
0
;
HashMap
<
String
,
Object
>
mapData
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
mapData
=
new
HashMap
<>();
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
Date
check
=
null
;
Date
check
=
null
;
...
@@ -489,7 +489,7 @@ public class EmergencyController extends AbstractBaseController {
...
@@ -489,7 +489,7 @@ public class EmergencyController extends AbstractBaseController {
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
if
(!
ObjectUtils
.
isEmpty
(
check
)
&&
check
.
getTime
()
>=
startTime
&&
check
.
getTime
()
<=
endTime
)
{
if
(
null
!=
check
&&
!
ObjectUtils
.
isEmpty
(
check
)
&&
check
.
getTime
()
>=
startTime
&&
check
.
getTime
()
<=
endTime
)
{
if
(!
ObjectUtils
.
isEmpty
(
mapData
))
{
if
(!
ObjectUtils
.
isEmpty
(
mapData
))
{
BigDecimal
old
=
new
BigDecimal
(
String
.
valueOf
(
mapData
.
get
(
"powerLossNum"
)));
BigDecimal
old
=
new
BigDecimal
(
String
.
valueOf
(
mapData
.
get
(
"powerLossNum"
)));
BigDecimal
add
=
new
BigDecimal
(
String
.
valueOf
(
map
.
get
(
"powerLossNum"
)));
BigDecimal
add
=
new
BigDecimal
(
String
.
valueOf
(
map
.
get
(
"powerLossNum"
)));
...
@@ -534,8 +534,8 @@ public class EmergencyController extends AbstractBaseController {
...
@@ -534,8 +534,8 @@ public class EmergencyController extends AbstractBaseController {
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
long
startTime1
=
weekStart1
.
getTime
()
;
long
startTime1
=
null
!=
weekStart1
?
weekStart1
.
getTime
()
:
0
;
long
endTime1
=
weekEnd1
.
getTime
()
;
long
endTime1
=
null
!=
weekEnd1
?
weekEnd1
.
getTime
()
:
0
;
HashMap
<
String
,
Object
>
mapData1
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
mapData1
=
new
HashMap
<>();
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
Date
check
=
null
;
Date
check
=
null
;
...
@@ -544,7 +544,7 @@ public class EmergencyController extends AbstractBaseController {
...
@@ -544,7 +544,7 @@ public class EmergencyController extends AbstractBaseController {
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
if
(!
ObjectUtils
.
isEmpty
(
check
)
&&
check
.
getTime
()
>=
startTime1
&&
check
.
getTime
()
<=
endTime1
)
{
if
(
null
!=
check
&&
!
ObjectUtils
.
isEmpty
(
check
)
&&
check
.
getTime
()
>=
startTime1
&&
check
.
getTime
()
<=
endTime1
)
{
if
(!
ObjectUtils
.
isEmpty
(
mapData1
))
{
if
(!
ObjectUtils
.
isEmpty
(
mapData1
))
{
BigDecimal
old
=
new
BigDecimal
(
String
.
valueOf
(
mapData1
.
get
(
"powerLossNum"
)));
BigDecimal
old
=
new
BigDecimal
(
String
.
valueOf
(
mapData1
.
get
(
"powerLossNum"
)));
BigDecimal
add
=
new
BigDecimal
(
String
.
valueOf
(
map
.
get
(
"powerLossNum"
)));
BigDecimal
add
=
new
BigDecimal
(
String
.
valueOf
(
map
.
get
(
"powerLossNum"
)));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentIndexController.java
View file @
76956efb
...
@@ -182,7 +182,7 @@ public class EquipmentIndexController {
...
@@ -182,7 +182,7 @@ public class EquipmentIndexController {
for
(
CarProperty
x
:
list
)
{
for
(
CarProperty
x
:
list
)
{
x
.
setEquipmentIndexKey
(
equipmentIndex
.
getPerfQuotaDefinitionId
());
x
.
setEquipmentIndexKey
(
equipmentIndex
.
getPerfQuotaDefinitionId
());
x
.
setEquipmentIndexName
(
equipmentIndex
.
getPerfQuotaName
());
x
.
setEquipmentIndexName
(
equipmentIndex
.
getPerfQuotaName
());
if
(
bool
.
get
())
{
if
(
bool
.
get
()
&&
null
!=
signalClassify
)
{
x
.
setEmergencyLevelColor
(
signalClassify
.
getEmergencyLevelColor
());
x
.
setEmergencyLevelColor
(
signalClassify
.
getEmergencyLevelColor
());
x
.
setIsAlarm
(
signalClassify
.
getIsAlarm
());
x
.
setIsAlarm
(
signalClassify
.
getIsAlarm
());
x
.
setEmergencyLevel
(
signalClassify
.
getEmergencyLevel
());
x
.
setEmergencyLevel
(
signalClassify
.
getEmergencyLevel
());
...
@@ -200,7 +200,7 @@ public class EquipmentIndexController {
...
@@ -200,7 +200,7 @@ public class EquipmentIndexController {
y
.
setEquipmentIndexKey
(
equipmentIndex
.
getPerfQuotaDefinitionId
());
y
.
setEquipmentIndexKey
(
equipmentIndex
.
getPerfQuotaDefinitionId
());
y
.
setEquipmentIndexName
(
equipmentIndex
.
getPerfQuotaName
());
y
.
setEquipmentIndexName
(
equipmentIndex
.
getPerfQuotaName
());
y
.
setValueEnum
(
equipmentIndex
.
getValueEnum
());
y
.
setValueEnum
(
equipmentIndex
.
getValueEnum
());
if
(
bool
.
get
()
&&
!
ObjectUtils
.
isEmpty
(
signalClassify
))
{
if
(
bool
.
get
()
&&
null
!=
signalClassify
&&
!
ObjectUtils
.
isEmpty
(
signalClassify
))
{
y
.
setEmergencyLevelColor
(
signalClassify
.
getEmergencyLevelColor
());
y
.
setEmergencyLevelColor
(
signalClassify
.
getEmergencyLevelColor
());
y
.
setIsAlarm
(
signalClassify
.
getIsAlarm
());
y
.
setIsAlarm
(
signalClassify
.
getIsAlarm
());
y
.
setEmergencyLevel
(
signalClassify
.
getEmergencyLevel
());
y
.
setEmergencyLevel
(
signalClassify
.
getEmergencyLevel
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/TopographyController.java
View file @
76956efb
...
@@ -1068,7 +1068,7 @@ public class TopographyController extends AbstractBaseController {
...
@@ -1068,7 +1068,7 @@ public class TopographyController extends AbstractBaseController {
}
}
j
++;
j
++;
}
}
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
if
(!
CollectionUtils
.
isEmpty
(
list
)
&&
null
!=
iotIndexRes
)
{
iotIndexRes
.
setIotData
(
list
);
iotIndexRes
.
setIotData
(
list
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
iotIndexRes
))
{
if
(!
ObjectUtils
.
isEmpty
(
iotIndexRes
))
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/operation/AreaSynRiskOperator.java
View file @
76956efb
package
com
.
yeejoin
.
equipmanage
.
operation
;
package
com
.
yeejoin
.
equipmanage
.
operation
;
import
com.yeejoin.amos.boot.biz.common.utils.SecureRandomUtil
;
import
com.yeejoin.equipmanage.common.vo.AreaResquest
;
import
com.yeejoin.equipmanage.common.vo.AreaResquest
;
import
com.yeejoin.equipmanage.context.SpringContextHolder
;
import
com.yeejoin.equipmanage.context.SpringContextHolder
;
import
com.yeejoin.equipmanage.remote.RiskModelFeign
;
import
com.yeejoin.equipmanage.remote.RiskModelFeign
;
...
@@ -7,6 +8,7 @@ import com.yeejoin.equipmanage.remote.RiskSource;
...
@@ -7,6 +8,7 @@ import com.yeejoin.equipmanage.remote.RiskSource;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
lombok.Getter
;
import
java.security.SecureRandom
;
import
java.util.Random
;
import
java.util.Random
;
@Getter
@Getter
...
@@ -32,9 +34,9 @@ public enum AreaSynRiskOperator {
...
@@ -32,9 +34,9 @@ public enum AreaSynRiskOperator {
public
RiskSource
getRiskSource
(
AreaResquest
areaResquest
){
public
RiskSource
getRiskSource
(
AreaResquest
areaResquest
){
RiskSource
riskSource
=
new
RiskSource
();
RiskSource
riskSource
=
new
RiskSource
();
StringBuilder
code
=
new
StringBuilder
();
StringBuilder
code
=
new
StringBuilder
();
Random
random
=
new
Random
();
SecureRandom
random
=
new
Secure
Random
();
for
(
int
i
=
0
;
i
<
24
;
i
++)
{
for
(
int
i
=
0
;
i
<
24
;
i
++)
{
code
.
append
(
random
.
nextInt
(
10
));
code
.
append
(
SecureRandomUtil
.
getIntSecureRandom
(
10
,
random
));
}
}
riskSource
.
setCode
(
code
.
toString
());
riskSource
.
setCode
(
code
.
toString
());
riskSource
.
setId
(
Long
.
parseLong
(
String
.
valueOf
(
areaResquest
.
getId
())));
riskSource
.
setId
(
Long
.
parseLong
(
String
.
valueOf
(
areaResquest
.
getId
())));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentIndexImpl.java
View file @
76956efb
...
@@ -133,7 +133,7 @@ public class EquipmentIndexImpl extends ServiceImpl<EquipmentIndexMapper, Equipm
...
@@ -133,7 +133,7 @@ public class EquipmentIndexImpl extends ServiceImpl<EquipmentIndexMapper, Equipm
carProperty
.
setEquipmentIndexId
(
equipmentIndex
.
getId
());
carProperty
.
setEquipmentIndexId
(
equipmentIndex
.
getId
());
carProperty
.
setEquipmentIndexKey
(
equipmentIndex
.
getPerfQuotaDefinitionId
());
carProperty
.
setEquipmentIndexKey
(
equipmentIndex
.
getPerfQuotaDefinitionId
());
carProperty
.
setEquipmentIndexName
(
equipmentIndex
.
getPerfQuotaName
());
carProperty
.
setEquipmentIndexName
(
equipmentIndex
.
getPerfQuotaName
());
if
(
bool
.
get
())
{
if
(
bool
.
get
()
&&
null
!=
signalClassify
)
{
carProperty
.
setEmergencyLevelColor
(
signalClassify
.
getEmergencyLevelColor
());
carProperty
.
setEmergencyLevelColor
(
signalClassify
.
getEmergencyLevelColor
());
carProperty
.
setIsAlarm
(
signalClassify
.
getIsAlarm
());
carProperty
.
setIsAlarm
(
signalClassify
.
getIsAlarm
());
carProperty
.
setEmergencyLevel
(
signalClassify
.
getEmergencyLevel
());
carProperty
.
setEmergencyLevel
(
signalClassify
.
getEmergencyLevel
());
...
@@ -160,7 +160,7 @@ public class EquipmentIndexImpl extends ServiceImpl<EquipmentIndexMapper, Equipm
...
@@ -160,7 +160,7 @@ public class EquipmentIndexImpl extends ServiceImpl<EquipmentIndexMapper, Equipm
equipmentSpecificIndex
.
setEquipmentIndexKey
(
equipmentIndex
.
getPerfQuotaDefinitionId
());
equipmentSpecificIndex
.
setEquipmentIndexKey
(
equipmentIndex
.
getPerfQuotaDefinitionId
());
equipmentSpecificIndex
.
setEquipmentIndexName
(
equipmentIndex
.
getPerfQuotaName
());
equipmentSpecificIndex
.
setEquipmentIndexName
(
equipmentIndex
.
getPerfQuotaName
());
equipmentSpecificIndex
.
setEquipmentSpecificName
(
y
.
getName
());
equipmentSpecificIndex
.
setEquipmentSpecificName
(
y
.
getName
());
if
(
bool
.
get
())
{
if
(
bool
.
get
()
&&
null
!=
signalClassify
)
{
equipmentSpecificIndex
.
setEmergencyLevelColor
(
signalClassify
.
getEmergencyLevelColor
());
equipmentSpecificIndex
.
setEmergencyLevelColor
(
signalClassify
.
getEmergencyLevelColor
());
equipmentSpecificIndex
.
setIsAlarm
(
signalClassify
.
getIsAlarm
());
equipmentSpecificIndex
.
setIsAlarm
(
signalClassify
.
getIsAlarm
());
equipmentSpecificIndex
.
setEmergencyLevel
(
signalClassify
.
getEmergencyLevel
());
equipmentSpecificIndex
.
setEmergencyLevel
(
signalClassify
.
getEmergencyLevel
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentManageServiceImpl.java
View file @
76956efb
...
@@ -2,6 +2,7 @@ package com.yeejoin.equipmanage.service.impl;
...
@@ -2,6 +2,7 @@ package com.yeejoin.equipmanage.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.SecureRandomUtil
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.equipmanage.common.entity.DynamicFormGroup
;
import
com.yeejoin.equipmanage.common.entity.DynamicFormGroup
;
import
com.yeejoin.equipmanage.common.entity.EquipmentManageEntity
;
import
com.yeejoin.equipmanage.common.entity.EquipmentManageEntity
;
...
@@ -137,7 +138,7 @@ public class EquipmentManageServiceImpl extends ServiceImpl<EquipmentManageMappe
...
@@ -137,7 +138,7 @@ public class EquipmentManageServiceImpl extends ServiceImpl<EquipmentManageMappe
@Override
@Override
public
String
checkCode
(
String
param
)
{
public
String
checkCode
(
String
param
)
{
int
num
=
(
int
)
(
Math
.
random
()
*
900
+
100
);
int
num
=
(
int
)
(
SecureRandomUtil
.
getIntSecureRandomByDouble
()
*
900
+
100
);
;
;
String
val
=
param
;
String
val
=
param
;
val
+=
String
.
valueOf
(
num
);
val
+=
String
.
valueOf
(
num
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificAlarmServiceImpl.java
View file @
76956efb
...
@@ -788,18 +788,19 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
...
@@ -788,18 +788,19 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
int
allNum
=
0
;
int
allNum
=
0
;
// 启动次数
// 启动次数
int
startNum
=
0
;
int
startNum
=
0
;
if
(
null
!=
vo
)
{
ResponseModel
all
=
iotFeign
.
selectListNew
(
vo
.
getIotCode
().
substring
(
0
,
8
),
null
,
startTime
,
endTime
,
null
,
pressurePumpStart
);
ResponseModel
all
=
iotFeign
.
selectListNew
(
vo
.
getIotCode
().
substring
(
0
,
8
),
null
,
startTime
,
endTime
,
null
,
pressurePumpStart
);
if
(
200
==
all
.
getStatus
()
&&
!
ObjectUtils
.
isEmpty
(
all
.
getResult
()))
{
if
(
200
==
all
.
getStatus
()
&&
!
ObjectUtils
.
isEmpty
(
all
.
getResult
()))
{
String
json1
=
JSON
.
toJSONString
(
all
.
getResult
());
String
json1
=
JSON
.
toJSONString
(
all
.
getResult
());
List
<
Map
<
String
,
String
>>
listObject1
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
json1
);
List
<
Map
<
String
,
String
>>
listObject1
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
json1
);
allNum
=
listObject1
.
size
();
allNum
=
listObject1
.
size
();
}
}
ResponseModel
start
=
iotFeign
.
selectListNew
(
vo
.
getIotCode
().
substring
(
0
,
8
),
null
,
startTime
,
endTime
,
"true"
,
pressurePumpStart
);
ResponseModel
start
=
iotFeign
.
selectListNew
(
vo
.
getIotCode
().
substring
(
0
,
8
),
null
,
startTime
,
endTime
,
"true"
,
pressurePumpStart
);
if
(
200
==
start
.
getStatus
()
&&
!
ObjectUtils
.
isEmpty
(
start
.
getResult
()))
{
if
(
200
==
start
.
getStatus
()
&&
!
ObjectUtils
.
isEmpty
(
start
.
getResult
()))
{
String
json1
=
JSON
.
toJSONString
(
start
.
getResult
());
String
json1
=
JSON
.
toJSONString
(
start
.
getResult
());
List
<
Map
<
String
,
String
>>
listObject1
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
json1
);
List
<
Map
<
String
,
String
>>
listObject1
=
(
List
<
Map
<
String
,
String
>>)
JSONArray
.
parse
(
json1
);
startNum
=
listObject1
.
size
();
startNum
=
listObject1
.
size
();
}
}
}
Map
<
String
,
Object
>
retMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
retMap
=
new
HashMap
<>();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
76956efb
...
@@ -590,7 +590,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -590,7 +590,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
p
.
setDataConfig
(
map
);
p
.
setDataConfig
(
map
);
if
(
StringUtils
.
isEmpty
(
id
))
{
if
(
StringUtils
.
isEmpty
(
id
))
{
// 建筑
// 建筑
if
(
equipSpecificIds
.
contains
(
valueOf
(
equipSpecificId
)))
{
if
(
null
!=
equipSpecificIds
&&
equipSpecificIds
.
contains
(
valueOf
(
equipSpecificId
)))
{
p
.
setBinding
(
true
);
p
.
setBinding
(
true
);
}
else
{
}
else
{
p
.
setBinding
(
false
);
p
.
setBinding
(
false
);
...
@@ -671,7 +671,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
...
@@ -671,7 +671,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
p
.
setDataConfig
(
map
);
p
.
setDataConfig
(
map
);
if
(
StringUtils
.
isEmpty
(
id
))
{
if
(
StringUtils
.
isEmpty
(
id
))
{
// 建筑
// 建筑
if
(
equipSpecificIds
.
contains
(
valueOf
(
equipSpecificId
)))
{
if
(
null
!=
equipSpecificIds
&&
equipSpecificIds
.
contains
(
valueOf
(
equipSpecificId
)))
{
p
.
setBinding
(
true
);
p
.
setBinding
(
true
);
}
else
{
}
else
{
p
.
setBinding
(
false
);
p
.
setBinding
(
false
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MqttReceiveServiceImpl.java
View file @
76956efb
...
@@ -577,9 +577,9 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
...
@@ -577,9 +577,9 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
jsonObjectData
.
put
(
"astId"
,
equipmentSpeIndex
.
getSpecificCode
());
jsonObjectData
.
put
(
"astId"
,
equipmentSpeIndex
.
getSpecificCode
());
jsonObjectData
.
put
(
"equipType"
,
equipmentSpeIndex
.
getEquipmentCode
());
jsonObjectData
.
put
(
"equipType"
,
equipmentSpeIndex
.
getEquipmentCode
());
jsonObjectData
.
put
(
"name"
,
equipmentSpeIndex
.
getEquipmentSpecificName
()
+
"-"
+
equipmentSpeIndex
.
getEquipmentSpecificIndexName
());
jsonObjectData
.
put
(
"name"
,
equipmentSpeIndex
.
getEquipmentSpecificName
()
+
"-"
+
equipmentSpeIndex
.
getEquipmentSpecificIndexName
());
if
(
value
.
equals
(
"true"
))
{
if
(
null
!=
value
&&
value
.
equals
(
"true"
))
{
jsonObjectData
.
put
(
"value"
,
"1"
);
jsonObjectData
.
put
(
"value"
,
"1"
);
}
else
if
(
value
.
equals
(
"false"
))
{
}
else
if
(
null
!=
value
&&
value
.
equals
(
"false"
))
{
jsonObjectData
.
put
(
"value"
,
"0"
);
jsonObjectData
.
put
(
"value"
,
"0"
);
}
else
{
}
else
{
jsonObjectData
.
put
(
"value"
,
value
);
jsonObjectData
.
put
(
"value"
,
value
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/WarehouseStructureServiceImpl.java
View file @
76956efb
...
@@ -331,7 +331,7 @@ public class WarehouseStructureServiceImpl extends ServiceImpl<WarehouseStructur
...
@@ -331,7 +331,7 @@ public class WarehouseStructureServiceImpl extends ServiceImpl<WarehouseStructur
if
(
ws
.
getParentId
()
==
null
)
{
if
(
ws
.
getParentId
()
==
null
)
{
ws
.
setCellCode
(
ws
.
getCode
());
ws
.
setCellCode
(
ws
.
getCode
());
}
else
{
}
else
{
ws
.
setCellCode
(
parent
.
getCellCode
()
+
code
);
ws
.
setCellCode
(
null
!=
parent
?
parent
.
getCellCode
()
:
""
+
code
);
}
}
save
(
ws
);
save
(
ws
);
}
else
{
}
else
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertSubmittedServiceImpl.java
View file @
76956efb
...
@@ -586,7 +586,9 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -586,7 +586,9 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
for
(
Map
<
String
,
Object
>
orgUser
:
orgUsers
)
{
for
(
Map
<
String
,
Object
>
orgUser
:
orgUsers
)
{
AlertSubmittedObject
alertSubmittedObject
=
new
AlertSubmittedObject
();
AlertSubmittedObject
alertSubmittedObject
=
new
AlertSubmittedObject
();
if
(!
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情初报
.
getCode
()))
{
if
(!
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情初报
.
getCode
()))
{
alertSubmittedObject
.
setAlertSubmittedId
(
alertSubmittedNew
.
getSequenceNbr
());
if
(
null
!=
alertSubmittedNew
)
{
alertSubmittedObject
.
setAlertSubmittedId
(
alertSubmittedNew
.
getSequenceNbr
());
}
}
else
{
}
else
{
alertSubmittedObject
.
setAlertSubmittedId
(
Long
.
parseLong
(
alertSubmittedId
));
alertSubmittedObject
.
setAlertSubmittedId
(
Long
.
parseLong
(
alertSubmittedId
));
}
}
...
@@ -632,7 +634,9 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -632,7 +634,9 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
// 调用短信发送接口
// 调用短信发送接口
Map
<
String
,
String
>
besidesMap
=
new
HashMap
<>();
Map
<
String
,
String
>
besidesMap
=
new
HashMap
<>();
besidesMap
.
put
(
alterId
,
String
.
valueOf
(
alertCalled
.
getSequenceNbr
()));
if
(
null
!=
alertCalled
)
{
besidesMap
.
put
(
alterId
,
String
.
valueOf
(
alertCalled
.
getSequenceNbr
()));
}
if
(
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情初报
.
getCode
()))
{
if
(
alertWay
.
equals
(
AlertBusinessTypeEnum
.
警情初报
.
getCode
()))
{
alertCalledAction
.
sendAlertCalleCmd
(
smsCode
,
mobiles
,
smsParams
);
alertCalledAction
.
sendAlertCalleCmd
(
smsCode
,
mobiles
,
smsParams
);
...
@@ -660,8 +664,9 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -660,8 +664,9 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
if
(
null
!=
alertCalledId
)
{
emqKeeper
.
getMqttClient
().
publish
(
topic
,
alertCalledId
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
emqKeeper
.
getMqttClient
().
publish
(
topic
,
alertCalledId
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
}
}
}
/**
/**
...
@@ -1031,7 +1036,6 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1031,7 +1036,6 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
if
(!
ValidationUtil
.
isEmpty
(
report
))
{
if
(!
ValidationUtil
.
isEmpty
(
report
))
{
String
os
=
System
.
getProperty
(
"os.name"
);
String
os
=
System
.
getProperty
(
"os.name"
);
InputStream
resourceAsStream
=
this
.
getClass
().
getClassLoader
().
getResourceAsStream
(
"templates/check-report-template.docx"
);
String
path
=
this
.
getClass
().
getProtectionDomain
().
getCodeSource
().
getLocation
().
getPath
();
String
path
=
this
.
getClass
().
getProtectionDomain
().
getCodeSource
().
getLocation
().
getPath
();
String
filePath
=
""
;
String
filePath
=
""
;
...
@@ -1052,6 +1056,20 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
...
@@ -1052,6 +1056,20 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
Configure
.
ConfigureBuilder
configureBuilder
=
Configure
.
newBuilder
();
Configure
.
ConfigureBuilder
configureBuilder
=
Configure
.
newBuilder
();
configureBuilder
.
setElMode
(
ELMode
.
SPEL_MODE
).
bind
(
"alertCalledPowerInfoDtoList"
,
calledPowerInfoTablePolicy
)
configureBuilder
.
setElMode
(
ELMode
.
SPEL_MODE
).
bind
(
"alertCalledPowerInfoDtoList"
,
calledPowerInfoTablePolicy
)
.
bind
(
"alertCallCommandDtoList"
,
alertCallCommandTablePolicy
).
build
();
.
bind
(
"alertCallCommandDtoList"
,
alertCallCommandTablePolicy
).
build
();
InputStream
resourceAsStream
=
null
;
try
{
resourceAsStream
=
this
.
getClass
().
getClassLoader
().
getResourceAsStream
(
"templates/check-report-template.docx"
);
}
catch
(
Exception
e
)
{
}
finally
{
if
(
null
!=
resourceAsStream
)
{
try
{
resourceAsStream
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
XWPFTemplate
template
=
XWPFTemplate
.
compile
(
resourceAsStream
,
configureBuilder
.
build
()).
render
(
report
);
XWPFTemplate
template
=
XWPFTemplate
.
compile
(
resourceAsStream
,
configureBuilder
.
build
()).
render
(
report
);
File
file
=
new
File
(
fileName
);
File
file
=
new
File
(
fileName
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/VoiceRecordLogServiceImpl.java
View file @
76956efb
...
@@ -102,15 +102,16 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
...
@@ -102,15 +102,16 @@ public class VoiceRecordLogServiceImpl extends BaseService<VoiceRecordLogDto,Voi
model
.
setFileType
(
"坐席呼出"
);
model
.
setFileType
(
"坐席呼出"
);
}
}
Map
<
String
,
String
>
downloadFile
=
null
;
// 注掉无用代码
// Map<String, String> downloadFile = null;
if
(
downloadFile
.
isEmpty
())
{
//
this
.
updateById
(
l
);
// if(downloadFile.isEmpty()) {
return
;
// this.updateById(l);
}
// return;
for
(
Map
.
Entry
<
String
,
String
>
file
:
downloadFile
.
entrySet
())
{
// }
model
.
setFilePath
(
file
.
getKey
());
// for(Map.Entry<String,String> file : downloadFile.entrySet()) {
}
// model.setFilePath(file.getKey());
// }
});
});
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/CheckServiceImpl.java
View file @
76956efb
...
@@ -350,13 +350,13 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -350,13 +350,13 @@ public class CheckServiceImpl implements ICheckService {
score
+=
checkInput
.
getScore
();
score
+=
checkInput
.
getScore
();
checkItemList
.
add
(
checkInput
);
checkItemList
.
add
(
checkInput
);
EquipmentInputItemRo
equipmentInputItemRo
=
new
EquipmentInputItemRo
();
EquipmentInputItemRo
equipmentInputItemRo
=
new
EquipmentInputItemRo
();
if
(!
StringUtils
.
isBlank
(
pointClassify
.
getName
())){
if
(
null
!=
pointClassify
&&
!
StringUtils
.
isBlank
(
pointClassify
.
getName
())){
equipmentInputItemRo
.
setEquipmentName
(
pointClassify
.
getName
());
equipmentInputItemRo
.
setEquipmentName
(
pointClassify
.
getName
());
}
}
equipmentInputItemRo
.
setCheckResult
(
item
.
getInputValue
());
equipmentInputItemRo
.
setCheckResult
(
item
.
getInputValue
());
equipmentInputItemRo
.
setRuleType
(
RuleTypeEnum
.
CHECKRESULT
.
getCode
());
equipmentInputItemRo
.
setRuleType
(
RuleTypeEnum
.
CHECKRESULT
.
getCode
());
equipmentInputItemRo
.
setCheckContent
(
inputItem
.
getItemNo
());
equipmentInputItemRo
.
setCheckContent
(
inputItem
.
getItemNo
());
if
(!
StringUtils
.
isBlank
(
pointClassify
.
getEquipmentId
())){
if
(
null
!=
pointClassify
&&
!
StringUtils
.
isBlank
(
pointClassify
.
getEquipmentId
())){
equipmentInputItemRoList
.
add
(
equipmentInputItemRo
);
equipmentInputItemRoList
.
add
(
equipmentInputItemRo
);
}
}
}
}
...
@@ -432,7 +432,7 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -432,7 +432,7 @@ public class CheckServiceImpl implements ICheckService {
if
(
imgList
.
size
()>
0
){
if
(
imgList
.
size
()>
0
){
checkService
.
saveCheckImg
(
imgList
);
checkService
.
saveCheckImg
(
imgList
);
}
}
if
(
check
.
getPlanTaskId
()
>
0
)
{
if
(
check
.
getPlanTaskId
()
>
0
&&
null
!=
detail
)
{
planTaskDetailMapper
.
finishTaskDetail
(
Long
.
parseLong
(
detail
.
get
(
"planTaskDetailId"
).
toString
()),
requestParam
.
getPointId
(),
requestParam
.
getPlanTaskId
(),
user
.
getUserId
());
planTaskDetailMapper
.
finishTaskDetail
(
Long
.
parseLong
(
detail
.
get
(
"planTaskDetailId"
).
toString
()),
requestParam
.
getPointId
(),
requestParam
.
getPlanTaskId
(),
user
.
getUserId
());
}
else
{
}
else
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
...
@@ -686,7 +686,7 @@ public class CheckServiceImpl implements ICheckService {
...
@@ -686,7 +686,7 @@ public class CheckServiceImpl implements ICheckService {
if
(
imgList
.
size
()
>
0
)
{
if
(
imgList
.
size
()
>
0
)
{
checkService
.
saveCheckImg
(
imgList
);
checkService
.
saveCheckImg
(
imgList
);
}
}
if
(
check
.
getPlanTaskId
()
>
0
)
{
if
(
check
.
getPlanTaskId
()
>
0
&&
null
!=
detail
)
{
planTaskDetailMapper
.
finishTaskDetail
(
Long
.
parseLong
(
detail
.
get
(
"planTaskDetailId"
).
toString
()),
requestParam
.
getPointId
(),
requestParam
.
getPlanTaskId
(),
requestParam
.
getUserId
());
planTaskDetailMapper
.
finishTaskDetail
(
Long
.
parseLong
(
detail
.
get
(
"planTaskDetailId"
).
toString
()),
requestParam
.
getPointId
(),
requestParam
.
getPlanTaskId
(),
requestParam
.
getUserId
());
}
else
{
}
else
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/LatentDangerServiceImpl.java
View file @
76956efb
...
@@ -728,7 +728,7 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
...
@@ -728,7 +728,7 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
}
}
// 延期治理选择的延期日期不能早于整改日期校验
// 延期治理选择的延期日期不能早于整改日期校验
if
(
executeTypeEnum
.
equals
(
LatentDangerExcuteTypeEnum
.
隐患延期治理
))
{
if
(
executeTypeEnum
.
equals
(
LatentDangerExcuteTypeEnum
.
隐患延期治理
))
{
if
(
latentDangerBo
.
getReformLimitDate
().
compareTo
(
DateUtil
.
longStr2Date
(
latentDangerExcuteParam
.
getDelayLimitDate
()))
>=
0
)
{
if
(
null
!=
latentDangerBo
&&
latentDangerBo
.
getReformLimitDate
().
compareTo
(
DateUtil
.
longStr2Date
(
latentDangerExcuteParam
.
getDelayLimitDate
()))
>=
0
)
{
executeSubmitDto
.
setIsOk
(
false
);
executeSubmitDto
.
setIsOk
(
false
);
executeSubmitDto
.
setMsg
(
"延期日期不能早于整改期限"
);
executeSubmitDto
.
setMsg
(
"延期日期不能早于整改期限"
);
return
executeSubmitDto
;
return
executeSubmitDto
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PointServiceImpl.java
View file @
76956efb
...
@@ -1413,11 +1413,13 @@ public class PointServiceImpl implements IPointService {
...
@@ -1413,11 +1413,13 @@ public class PointServiceImpl implements IPointService {
for
(
Map
<
String
,
String
>
statusEnum
:
statusEnums
)
{
for
(
Map
<
String
,
String
>
statusEnum
:
statusEnums
)
{
String
code
=
statusEnum
.
get
(
"value"
);
String
code
=
statusEnum
.
get
(
"value"
);
boolean
isCreate
=
true
;
boolean
isCreate
=
true
;
for
(
HashMap
<
String
,
Object
>
c
:
content
)
{
if
(
null
!=
content
)
{
if
(
code
.
equals
(
c
.
get
(
"status"
)))
{
for
(
HashMap
<
String
,
Object
>
c
:
content
)
{
isCreate
=
false
;
if
(
code
.
equals
(
c
.
get
(
"status"
)))
{
rContent
.
add
(
c
);
isCreate
=
false
;
break
;
rContent
.
add
(
c
);
break
;
}
}
}
}
}
if
(
isCreate
)
{
if
(
isCreate
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/SynDataServiceImpl.java
View file @
76956efb
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.boot.biz.common.utils.SecureRandomUtil
;
import
com.yeejoin.amos.patrol.business.constants.XJConstant
;
import
com.yeejoin.amos.patrol.business.constants.XJConstant
;
import
com.yeejoin.amos.patrol.business.dao.mapper.PlanTaskMapper
;
import
com.yeejoin.amos.patrol.business.dao.mapper.PlanTaskMapper
;
import
com.yeejoin.amos.patrol.business.dao.repository.*
;
import
com.yeejoin.amos.patrol.business.dao.repository.*
;
...
@@ -537,6 +538,6 @@ public class SynDataServiceImpl implements ISynDataService {
...
@@ -537,6 +538,6 @@ public class SynDataServiceImpl implements ISynDataService {
}
}
private
String
buildRandomNum
(
String
originalId
)
{
private
String
buildRandomNum
(
String
originalId
)
{
return
"SPC_"
+
(
int
)
((
Math
.
random
()
*
9
+
1
)
*
100000
)
+
"_"
+
originalId
;
return
"SPC_"
+
(
int
)
((
SecureRandomUtil
.
getIntSecureRandomByDouble
()
*
9
+
1
)
*
100000
)
+
"_"
+
originalId
;
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/util/DateUtil.java
View file @
76956efb
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
util
;
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
util
;
import
com.yeejoin.amos.boot.biz.common.utils.SecureRandomUtil
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
java.security.SecureRandom
;
import
java.text.DateFormat
;
import
java.text.DateFormat
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.ParsePosition
;
import
java.text.ParsePosition
;
...
@@ -1092,8 +1094,10 @@ public class DateUtil {
...
@@ -1092,8 +1094,10 @@ public class DateUtil {
{
{
;
;
}
}
long
day
=
(
date
.
getTime
()
-
mydate
.
getTime
())
/
(
24
*
60
*
60
*
1000
);
if
(
null
!=
date
&&
null
!=
mydate
)
{
return
day
;
return
(
date
.
getTime
()
-
mydate
.
getTime
())
/
(
24
*
60
*
60
*
1000
);
}
return
0
;
}
}
/**
/**
...
@@ -1136,13 +1140,13 @@ public class DateUtil {
...
@@ -1136,13 +1140,13 @@ public class DateUtil {
*/
*/
private
static
String
getRandom
(
int
i
)
private
static
String
getRandom
(
int
i
)
{
{
Random
jjj
=
new
Random
();
SecureRandom
jjj
=
new
Secure
Random
();
// int suiJiShu = jjj.nextInt(9);
// int suiJiShu = jjj.nextInt(9);
if
(
i
==
0
)
return
""
;
if
(
i
==
0
)
return
""
;
String
jj
=
""
;
String
jj
=
""
;
for
(
int
k
=
0
;
k
<
i
;
k
++)
for
(
int
k
=
0
;
k
<
i
;
k
++)
{
{
jj
=
jj
+
jjj
.
nextInt
(
9
);
jj
=
jj
+
SecureRandomUtil
.
getIntSecureRandom
(
9
,
jjj
);
}
}
return
jj
;
return
jj
;
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/util/DesUtil.java
View file @
76956efb
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/util/PlanTaskUtil.java
View file @
76956efb
...
@@ -298,17 +298,19 @@ public static List<HashMap<String, Date>> genExeDate(Plan plan, CalDateVo vo,Str
...
@@ -298,17 +298,19 @@ public static List<HashMap<String, Date>> genExeDate(Plan plan, CalDateVo vo,Str
init
=
init
+
exeInt
;
init
=
init
+
exeInt
;
calDate
=
DateUtil
.
getIntervalDate
(
exeDate
,
init
);
calDate
=
DateUtil
.
getIntervalDate
(
exeDate
,
init
);
}
else
if
(
XJConstant
.
PLAN_TYPE_WEEK
.
equals
(
planType
)){
//周计划
}
else
if
(
XJConstant
.
PLAN_TYPE_WEEK
.
equals
(
planType
)){
//周计划
for
(
String
str
:
strArr
){
if
(
null
!=
strArr
)
{
HashMap
<
String
,
Date
>
tempMap
=
new
HashMap
<
String
,
Date
>();
for
(
String
str
:
strArr
)
{
int
inter
=
Integer
.
parseInt
(
str
);
HashMap
<
String
,
Date
>
tempMap
=
new
HashMap
<
String
,
Date
>();
calDate
=
DateUtil
.
getIntervalDate
(
weekDate
,
inter
);
int
inter
=
Integer
.
parseInt
(
str
);
if
(
calDate
.
getTime
()
>=
exeDate
.
getTime
()
&&
(
calDate
.
getTime
()>=
exeBeginDate
.
getTime
()
&&
calDate
.
getTime
()
<=
exeEndDate
.
getTime
())){
calDate
=
DateUtil
.
getIntervalDate
(
weekDate
,
inter
);
tempMap
.
put
(
"begin_date"
,
calDate
);
if
(
calDate
.
getTime
()
>=
exeDate
.
getTime
()
&&
(
calDate
.
getTime
()
>=
exeBeginDate
.
getTime
()
&&
calDate
.
getTime
()
<=
exeEndDate
.
getTime
()))
{
tempMap
.
put
(
"end_date"
,
calDate
);
tempMap
.
put
(
"begin_date"
,
calDate
);
tempMap
.
put
(
"next_gen_date"
,
calDate
);
tempMap
.
put
(
"end_date"
,
calDate
);
dateList
.
add
(
tempMap
);
tempMap
.
put
(
"next_gen_date"
,
calDate
);
dateList
.
add
(
tempMap
);
}
}
}
}
}
init
=
init
+
exeInt
;
init
=
init
+
exeInt
;
weekDate
=
DateUtil
.
getIntervalWeekDate
(
exeDate
,
init
);
weekDate
=
DateUtil
.
getIntervalWeekDate
(
exeDate
,
init
);
}
else
if
(
XJConstant
.
PLAN_TYPE_MONTH
.
equals
(
planType
)){
//月计划
}
else
if
(
XJConstant
.
PLAN_TYPE_MONTH
.
equals
(
planType
)){
//月计划
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/util/QRCodeUtil.java
View file @
76956efb
...
@@ -5,6 +5,7 @@ import com.google.zxing.EncodeHintType;
...
@@ -5,6 +5,7 @@ import com.google.zxing.EncodeHintType;
import
com.google.zxing.MultiFormatWriter
;
import
com.google.zxing.MultiFormatWriter
;
import
com.google.zxing.common.BitMatrix
;
import
com.google.zxing.common.BitMatrix
;
import
com.google.zxing.qrcode.decoder.ErrorCorrectionLevel
;
import
com.google.zxing.qrcode.decoder.ErrorCorrectionLevel
;
import
com.yeejoin.amos.boot.biz.common.utils.SecureRandomUtil
;
import
javax.imageio.ImageIO
;
import
javax.imageio.ImageIO
;
import
java.awt.image.BufferedImage
;
import
java.awt.image.BufferedImage
;
...
@@ -49,7 +50,7 @@ public class QRCodeUtil {
...
@@ -49,7 +50,7 @@ public class QRCodeUtil {
*/
*/
public
static
String
temporaryQrCode
()
{
public
static
String
temporaryQrCode
()
{
long
qrCode
=
-
1
*
System
.
currentTimeMillis
();
long
qrCode
=
-
1
*
System
.
currentTimeMillis
();
qrCode
+=
(
long
)(
random
.
next
Double
()
*
10000000
);
qrCode
+=
(
long
)(
SecureRandomUtil
.
getIntSecureRandomBy
Double
()
*
10000000
);
return
String
.
valueOf
(
qrCode
);
return
String
.
valueOf
(
qrCode
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/util/RandomUtil.java
View file @
76956efb
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
util
;
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
util
;
import
com.yeejoin.amos.boot.biz.common.utils.SecureRandomUtil
;
import
java.security.SecureRandom
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.Random
;
import
java.util.Random
;
...
@@ -10,9 +13,9 @@ public class RandomUtil {
...
@@ -10,9 +13,9 @@ public class RandomUtil {
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
);
String
newDate
=
sdf
.
format
(
new
Date
());
String
newDate
=
sdf
.
format
(
new
Date
());
String
result
=
""
;
String
result
=
""
;
Random
random
=
new
Random
();
SecureRandom
random
=
new
Secure
Random
();
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
result
+=
random
.
nextInt
(
10
);
result
+=
SecureRandomUtil
.
getIntSecureRandom
(
10
,
random
);
}
}
return
newDate
+
result
;
return
newDate
+
result
;
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/util/WordTemplateUtils.java
View file @
76956efb
...
@@ -222,9 +222,11 @@ public class WordTemplateUtils {
...
@@ -222,9 +222,11 @@ public class WordTemplateUtils {
e1
.
printStackTrace
();
e1
.
printStackTrace
();
}
}
try
{
try
{
data
=
new
byte
[
in
.
available
()];
if
(
null
!=
in
)
{
in
.
read
(
data
);
data
=
new
byte
[
in
.
available
()];
in
.
close
();
in
.
read
(
data
);
in
.
close
();
}
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/core/util/DateUtil.java
View file @
76956efb
...
@@ -382,8 +382,10 @@ public class DateUtil {
...
@@ -382,8 +382,10 @@ public class DateUtil {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
Time
date
=
new
Time
(
d
.
getTime
());
if
(
null
!=
d
)
{
return
date
;
return
new
Time
(
d
.
getTime
());
}
return
null
;
}
}
/**
/**
...
...
amos-boot-utils/amos-boot-utils-jpush/src/main/java/com/yeejoin/amos/jpush/common/entity/DateUtil.java
View file @
76956efb
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.jpush.common.entity;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.jpush.common.entity;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
java.security.SecureRandom
;
import
java.text.DateFormat
;
import
java.text.DateFormat
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.ParsePosition
;
import
java.text.ParsePosition
;
...
@@ -1070,8 +1071,10 @@ public class DateUtil {
...
@@ -1070,8 +1071,10 @@ public class DateUtil {
{
{
;
;
}
}
long
day
=
(
date
.
getTime
()
-
mydate
.
getTime
())
/
(
24
*
60
*
60
*
1000
);
if
(
null
!=
date
&&
null
!=
mydate
)
{
return
day
;
return
(
date
.
getTime
()
-
mydate
.
getTime
())
/
(
24
*
60
*
60
*
1000
);
}
return
0
;
}
}
/**
/**
...
@@ -1114,7 +1117,7 @@ public class DateUtil {
...
@@ -1114,7 +1117,7 @@ public class DateUtil {
*/
*/
private
static
String
getRandom
(
int
i
)
private
static
String
getRandom
(
int
i
)
{
{
Random
jjj
=
new
Random
();
SecureRandom
jjj
=
new
Secure
Random
();
// int suiJiShu = jjj.nextInt(9);
// int suiJiShu = jjj.nextInt(9);
if
(
i
==
0
)
return
""
;
if
(
i
==
0
)
return
""
;
String
jj
=
""
;
String
jj
=
""
;
...
...
amos-boot-utils/amos-boot-utils-jpush/src/main/java/com/yeejoin/amos/jpush/service/core/util/DateUtil.java
View file @
76956efb
...
@@ -383,8 +383,10 @@ public class DateUtil {
...
@@ -383,8 +383,10 @@ public class DateUtil {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
Time
date
=
new
Time
(
d
.
getTime
());
if
(
null
!=
d
)
{
return
date
;
return
new
Time
(
d
.
getTime
());
}
return
null
;
}
}
/**
/**
...
...
amos-boot-utils/amos-boot-utils-jpush/src/main/java/com/yeejoin/amos/jpush/util/DateUtil.java
View file @
76956efb
...
@@ -1070,8 +1070,10 @@ public class DateUtil {
...
@@ -1070,8 +1070,10 @@ public class DateUtil {
{
{
;
;
}
}
long
day
=
(
date
.
getTime
()
-
mydate
.
getTime
())
/
(
24
*
60
*
60
*
1000
);
if
(
null
!=
date
&&
null
!=
mydate
)
{
return
day
;
return
(
date
.
getTime
()
-
mydate
.
getTime
())
/
(
24
*
60
*
60
*
1000
);
}
return
0
;
}
}
/**
/**
...
...
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