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
54ea673d
Commit
54ea673d
authored
Apr 15, 2025
by
tianbo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_tzs_bugfix' into develop_tzs_register
parents
c9e2db69
b74a5ca5
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
17 deletions
+26
-17
BaseEnterpriseVideoServiceImpl.java
...mmon/biz/service/impl/BaseEnterpriseVideoServiceImpl.java
+1
-0
EquipSourceEnum.java
...eejoin/amos/boot/module/jg/api/enums/EquipSourceEnum.java
+6
-11
CommonMapper.xml
...-module-jg-api/src/main/resources/mapper/CommonMapper.xml
+1
-1
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+2
-2
CancellationEventListener.java
...dule/jg/biz/event/listener/CancellationEventListener.java
+7
-1
ICommonService.java
...ejoin/amos/boot/module/jg/biz/service/ICommonService.java
+1
-1
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+8
-1
No files found.
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/BaseEnterpriseVideoServiceImpl.java
View file @
54ea673d
...
@@ -113,6 +113,7 @@ public class BaseEnterpriseVideoServiceImpl extends BaseService<BaseEnterpriseVi
...
@@ -113,6 +113,7 @@ public class BaseEnterpriseVideoServiceImpl extends BaseService<BaseEnterpriseVi
if
(
result
.
get
(
"data"
)
instanceof
JSONObject
)
{
if
(
result
.
get
(
"data"
)
instanceof
JSONObject
)
{
JSONObject
dataObj
=
(
JSONObject
)
result
.
get
(
"data"
);
JSONObject
dataObj
=
(
JSONObject
)
result
.
get
(
"data"
);
String
cameraUrl
=
dataObj
.
getString
(
"url"
);
String
cameraUrl
=
dataObj
.
getString
(
"url"
);
video
.
setType
(
param
.
getString
(
"protocol"
));
video
.
setUrl
(
cameraUrl
);
video
.
setUrl
(
cameraUrl
);
video
.
setType
(
param
.
getString
(
"protocol"
));
video
.
setType
(
param
.
getString
(
"protocol"
));
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/EquipSourceEnum.java
View file @
54ea673d
...
@@ -10,14 +10,16 @@ import java.util.Map;
...
@@ -10,14 +10,16 @@ import java.util.Map;
@Getter
@Getter
@AllArgsConstructor
@AllArgsConstructor
public
enum
EquipSourceEnum
{
public
enum
EquipSourceEnum
{
jg_his
(
"历史设备"
,
"jg_his"
),
jg_his
(
"历史设备"
,
"jg_his"
,
"his"
),
jg_his_black
(
"历史设备(无登记证)"
,
"jg_his_black"
),
jg_his_black
(
"历史设备(无登记证)"
,
"jg_his_black"
,
"black"
),
jg
(
"新设备"
,
"jg"
);
jg
(
"新设备"
,
"jg"
,
"new"
);
private
final
String
name
;
private
final
String
name
;
private
final
String
code
;
private
final
String
code
;
private
final
String
type
;
public
static
String
getMessage
(
String
code
)
{
public
static
String
getMessage
(
String
code
)
{
for
(
EquipSourceEnum
constants
:
values
())
{
for
(
EquipSourceEnum
constants
:
values
())
{
...
@@ -30,6 +32,7 @@ public enum EquipSourceEnum {
...
@@ -30,6 +32,7 @@ public enum EquipSourceEnum {
public
static
Map
<
Integer
,
String
>
getName
=
new
HashMap
<>();
public
static
Map
<
Integer
,
String
>
getName
=
new
HashMap
<>();
public
static
Map
<
String
,
Integer
>
getCode
=
new
HashMap
<>();
public
static
Map
<
String
,
Integer
>
getCode
=
new
HashMap
<>();
public
static
Map
<
String
,
Integer
>
getType
=
new
HashMap
<>();
static
{
static
{
for
(
ConstructionEnum
e
:
ConstructionEnum
.
values
()){
for
(
ConstructionEnum
e
:
ConstructionEnum
.
values
()){
...
@@ -39,14 +42,6 @@ public enum EquipSourceEnum {
...
@@ -39,14 +42,6 @@ public enum EquipSourceEnum {
}
}
public
String
getCode
()
{
return
code
;
}
public
String
getName
()
{
return
name
;
}
public
static
String
getDataSourceName
(
String
dataSource
)
{
public
static
String
getDataSourceName
(
String
dataSource
)
{
if
(
StringUtils
.
isEmpty
(
dataSource
)){
if
(
StringUtils
.
isEmpty
(
dataSource
)){
return
EquipSourceEnum
.
jg_his
.
getName
();
return
EquipSourceEnum
.
jg_his
.
getName
();
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/CommonMapper.xml
View file @
54ea673d
...
@@ -2334,7 +2334,7 @@
...
@@ -2334,7 +2334,7 @@
WHERE tjvi."USE_UNIT_CREDIT_CODE" = #{useCode}
WHERE tjvi."USE_UNIT_CREDIT_CODE" = #{useCode}
AND tjvi.is_delete = '0'
AND tjvi.is_delete = '0'
</select>
</select>
<select
id=
"countEquipInUseTimesWithOutZF"
resultType=
"java.lang.Integer"
>
<select
id=
"countEquipInUseTimesWithOutZF"
resultType=
"java.lang.Integer"
flushCache=
"true"
>
select
select
sum(inUseNumber)
sum(inUseNumber)
from (
from (
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/CommonController.java
View file @
54ea673d
...
@@ -364,8 +364,8 @@ public class CommonController extends BaseController {
...
@@ -364,8 +364,8 @@ public class CommonController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询监管业务名称列表"
,
notes
=
"查询监管业务名称列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询监管业务名称列表"
,
notes
=
"查询监管业务名称列表"
)
@GetMapping
(
value
=
"/superviseBusinessCategory"
)
@GetMapping
(
value
=
"/superviseBusinessCategory"
)
public
ResponseModel
<
Object
>
equipTree
(
@RequestParam
(
value
=
"businessType"
)
String
businessType
)
{
public
ResponseModel
<
Object
>
equipTree
(
@RequestParam
(
value
=
"businessType"
)
String
businessType
,
String
dataSource
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
superviseBusinessCategory
(
businessType
));
return
ResponseHelper
.
buildResponse
(
commonService
.
superviseBusinessCategory
(
businessType
,
dataSource
));
}
}
/**
/**
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/event/listener/CancellationEventListener.java
View file @
54ea673d
...
@@ -53,12 +53,17 @@ public class CancellationEventListener {
...
@@ -53,12 +53,17 @@ public class CancellationEventListener {
@PostConstruct
@PostConstruct
public
void
init
()
{
public
void
init
()
{
ExecutorService
executorService
=
Executors
.
newFixedThreadPool
(
threadNumber
);
ExecutorService
executorService
=
Executors
.
newFixedThreadPool
(
threadNumber
,
r
->
{
Thread
t
=
new
Thread
(
r
);
t
.
setName
(
"CancellationWorker-"
+
t
.
getId
());
return
t
;
});
for
(
int
i
=
0
;
i
<
threadNumber
;
i
++)
{
for
(
int
i
=
0
;
i
<
threadNumber
;
i
++)
{
executorService
.
execute
(()
->
{
executorService
.
execute
(()
->
{
while
(
true
)
{
while
(
true
)
{
try
{
try
{
String
record
=
queue
.
take
();
String
record
=
queue
.
take
();
log
.
info
(
"线程 {} 开始处理 record: {}"
,
Thread
.
currentThread
().
getName
(),
record
);
this
.
dealData
(
record
);
this
.
dealData
(
record
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
e
.
getMessage
(),
e
);
...
@@ -70,6 +75,7 @@ public class CancellationEventListener {
...
@@ -70,6 +75,7 @@ public class CancellationEventListener {
}
}
private
void
dealData
(
String
record
)
{
private
void
dealData
(
String
record
)
{
log
.
info
(
"开始检查设备的引用:{}"
,
record
);
// 所有业务单据(除去作废、删除状态单据),有在引用设备的则不修改设备纳管状态
// 所有业务单据(除去作废、删除状态单据),有在引用设备的则不修改设备纳管状态
Boolean
inUsed
=
commonService
.
checkEquipIsUsed
(
record
);
Boolean
inUsed
=
commonService
.
checkEquipIsUsed
(
record
);
// 无引用则进行修改纳管状态为未纳管
// 无引用则进行修改纳管状态为未纳管
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/ICommonService.java
View file @
54ea673d
...
@@ -64,7 +64,7 @@ public interface ICommonService {
...
@@ -64,7 +64,7 @@ public interface ICommonService {
List
<
LinkedHashMap
>
creatApproveTree
();
List
<
LinkedHashMap
>
creatApproveTree
();
List
<
Map
<
String
,
Object
>>
superviseBusinessCategory
(
String
businessType
);
List
<
Map
<
String
,
Object
>>
superviseBusinessCategory
(
String
businessType
,
String
dataSource
);
List
<
Map
<
String
,
Object
>>
businessScenarios
(
String
type
);
List
<
Map
<
String
,
Object
>>
businessScenarios
(
String
type
);
...
...
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 @
54ea673d
...
@@ -85,6 +85,7 @@ import org.springframework.core.io.Resource;
...
@@ -85,6 +85,7 @@ import org.springframework.core.io.Resource;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.Assert
;
import
org.springframework.util.Assert
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
...
@@ -732,7 +733,7 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -732,7 +733,7 @@ public class CommonServiceImpl implements ICommonService {
}
}
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
superviseBusinessCategory
(
String
businessType
)
{
public
List
<
Map
<
String
,
Object
>>
superviseBusinessCategory
(
String
businessType
,
String
dataSource
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
resourceJson
=
JsonUtils
.
getResourceJson
(
superviseBusinessCategory
);
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
resourceJson
=
JsonUtils
.
getResourceJson
(
superviseBusinessCategory
);
if
(
XZSB
.
equals
(
businessType
)
&&
CompanyTypeEnum
.
CONSTRUCTION
.
getName
().
equals
(
reginParams
.
getCompany
().
getCompanyType
()))
{
if
(
XZSB
.
equals
(
businessType
)
&&
CompanyTypeEnum
.
CONSTRUCTION
.
getName
().
equals
(
reginParams
.
getCompany
().
getCompanyType
()))
{
...
@@ -745,6 +746,11 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -745,6 +746,11 @@ public class CommonServiceImpl implements ICommonService {
}
}
return
resourceJson
.
get
(
businessType
);
return
resourceJson
.
get
(
businessType
);
}
}
// 历史有证设备(气瓶、管道)只能通过导入进系统,不能按单位录入进系统
if
(
EquipSourceEnum
.
jg_his
.
getType
().
equals
(
dataSource
))
{
resourceJson
.
get
(
businessType
).
removeIf
(
item
->
item
.
get
(
CODE
).
equals
(
DW_LR
));
return
resourceJson
.
get
(
businessType
);
}
return
resourceJson
.
get
(
businessType
);
return
resourceJson
.
get
(
businessType
);
}
}
...
@@ -2152,6 +2158,7 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -2152,6 +2158,7 @@ public class CommonServiceImpl implements ICommonService {
}
}
@Override
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRES_NEW
)
public
Boolean
checkEquipIsUsed
(
String
record
)
{
public
Boolean
checkEquipIsUsed
(
String
record
)
{
Integer
useTime
=
commonMapper
.
countEquipInUseTimesWithOutZF
(
record
);
Integer
useTime
=
commonMapper
.
countEquipInUseTimesWithOutZF
(
record
);
log
.
info
(
"检查设备是否被使用,设备:{},业务数:{}"
,
record
,
useTime
);
log
.
info
(
"检查设备是否被使用,设备:{},业务数:{}"
,
record
,
useTime
);
...
...
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