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
60b47cbb
Commit
60b47cbb
authored
Apr 01, 2026
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):设备在流程中添加日志
parent
505579ff
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
5 deletions
+22
-5
BaseEquipUsedCheckService.java
...module/jg/biz/service/impl/BaseEquipUsedCheckService.java
+1
-1
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.java
+21
-4
No files found.
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/BaseEquipUsedCheckService.java
View file @
60b47cbb
...
@@ -42,7 +42,7 @@ public abstract class BaseEquipUsedCheckService implements IEquipUsedCheck {
...
@@ -42,7 +42,7 @@ public abstract class BaseEquipUsedCheckService implements IEquipUsedCheck {
// 查询当前设备在流程中的申请单号列表
// 查询当前设备在流程中的申请单号列表
if
(
equipListOfUsed
!=
null
&&
equipListOfUsed
.
contains
(
record
))
{
if
(
equipListOfUsed
!=
null
&&
equipListOfUsed
.
contains
(
record
))
{
log
.
error
(
"设备已被其他流程使用,不允许重复提交,设备ID:{}"
,
record
);
log
.
error
(
"设备已被其他流程使用,不允许重复提交,设备ID:{}"
,
record
);
throw
new
BadRequest
(
"
设备已被其他流程使用,不允许重复提交,请联系管理员!
"
);
throw
new
BadRequest
(
"
该设备已在当前业务流程中使用,不能重复提交,请刷新页面查看单据状态!
"
);
}
}
setUsingData2Redis
(
record
,
companyCode
,
equipListOfUsed
);
setUsingData2Redis
(
record
,
companyCode
,
equipListOfUsed
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
...
...
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/JgVehicleInformationServiceImpl.java
View file @
60b47cbb
...
@@ -232,8 +232,12 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -232,8 +232,12 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
public
List
<
JgVehicleInformation
>
save
(
String
submit
,
JSONObject
map
)
{
public
List
<
JgVehicleInformation
>
save
(
String
submit
,
JSONObject
map
)
{
log
.
info
(
"【车用气瓶-提交开始】submit={}, userId={}, carNumber={}, identificationCode={}"
,
submit
,
RequestContext
.
getExeUserId
(),
map
.
getString
(
"carNumber"
),
map
.
getString
(
"identificationCode"
));
try
{
try
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submit
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submit
))
{
log
.
info
(
"【车用气瓶-提交类型】流程提交,userId={}, equipmentCount={}"
,
RequestContext
.
getExeUserId
(),
map
.
getJSONArray
(
"equipmentLists"
).
size
());
//校验登记表字段是否有值
//校验登记表字段是否有值
JSONArray
useRegistrationFormFile
=
map
.
getJSONArray
(
"useRegistrationFormFile"
);
JSONArray
useRegistrationFormFile
=
map
.
getJSONArray
(
"useRegistrationFormFile"
);
// if (CollUtil.isEmpty(useRegistrationFormFile)) {
// if (CollUtil.isEmpty(useRegistrationFormFile)) {
...
@@ -242,6 +246,8 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -242,6 +246,8 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
}
}
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
()))
+
""
,
ReginParams
.
class
);
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
()))
+
""
,
ReginParams
.
class
);
CompanyBo
company
=
reginParams
.
getCompany
();
CompanyBo
company
=
reginParams
.
getCompany
();
log
.
info
(
"【车用气瓶-用户信息】userId={}, companyCode={}, companyType={}"
,
RequestContext
.
getExeUserId
(),
company
.
getCompanyCode
(),
company
.
getCompanyType
());
JgVehicleInformationDto
vehicleInfoDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
map
),
JgVehicleInformationDto
.
class
);
JgVehicleInformationDto
vehicleInfoDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
map
),
JgVehicleInformationDto
.
class
);
//新增使用登记表字段
//新增使用登记表字段
...
@@ -254,6 +260,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -254,6 +260,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
vehicleInfoDto
.
setUseRegistrationFormUrl
(
String
.
valueOf
(
vehicle
.
get
(
"useRegistrationFormUrl"
)));
vehicleInfoDto
.
setUseRegistrationFormUrl
(
String
.
valueOf
(
vehicle
.
get
(
"useRegistrationFormUrl"
)));
}
}
List
<
Map
<
String
,
Object
>>
equipmentLists
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"equipmentLists"
);
List
<
Map
<
String
,
Object
>>
equipmentLists
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"equipmentLists"
);
log
.
info
(
"【车用气瓶-设备信息】设备数量={}"
,
equipmentLists
!=
null
?
equipmentLists
.
size
()
:
0
);
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submit
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submit
))
{
// 不限制一个车只能使用一个充装介质的气瓶
// 不限制一个车只能使用一个充装介质的气瓶
...
@@ -262,8 +269,10 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -262,8 +269,10 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
}
}
// 检查设备是否已经在使用
// 检查设备是否已经在使用
// 个人主体的身份证(6600_620422199903010258) 特殊处理 只取_后的身份证号码
// 个人主体的身份证(6600_620422199903010258) 特殊处理 只取_后的身份证号码
log
.
info
(
"【车用气瓶-设备重复检查】开始检查设备是否在流程中,设备数量={}"
,
equipmentLists
.
size
());
this
.
repeatUsedEquipCheck
(
equipmentLists
,
this
.
repeatUsedEquipCheck
(
equipmentLists
,
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
());
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
());
log
.
info
(
"【车用气瓶-设备重复检查】检查完成,设备均可使用"
);
List
<
IdxBizJgInspectionDetectionInfo
>
inspectionDetectionInfoList
=
idxBizJgInspectionDetectionInfoService
.
checkInspectionInfo
(
List
<
IdxBizJgInspectionDetectionInfo
>
inspectionDetectionInfoList
=
idxBizJgInspectionDetectionInfoService
.
checkInspectionInfo
(
equipmentLists
.
stream
()
equipmentLists
.
stream
()
.
map
(
v
->
(
String
)
v
.
get
(
"record"
))
.
map
(
v
->
(
String
)
v
.
get
(
"record"
))
...
@@ -496,21 +505,29 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
...
@@ -496,21 +505,29 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
commonService
.
saveOrUpdateHistory
(
BusinessTypeEnum
.
JG_VEHICLE_GAS_APPLICATION
.
getName
(),
JSON
.
parseArray
(
JSON
.
toJSONString
(
equipmentLists
)),
null
,
vehicleInformation
.
getSequenceNbr
()
+
""
);
commonService
.
saveOrUpdateHistory
(
BusinessTypeEnum
.
JG_VEHICLE_GAS_APPLICATION
.
getName
(),
JSON
.
parseArray
(
JSON
.
toJSONString
(
equipmentLists
)),
null
,
vehicleInformation
.
getSequenceNbr
()
+
""
);
return
Collections
.
singletonList
(
vehicleInformation
);
return
Collections
.
singletonList
(
vehicleInformation
);
}
catch
(
BadRequest
|
LocalBadRequest
e
)
{
}
catch
(
BadRequest
|
LocalBadRequest
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
"【车用气瓶-提交失败】userId={}, error={}"
,
RequestContext
.
getExeUserId
(),
e
.
getMessage
(),
e
);
this
.
rollBackForDelRedisData
();
this
.
rollBackForDelRedisData
();
throw
e
;
throw
e
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
log
.
error
(
"【车用气瓶-提交异常】userId={}, error={}"
,
RequestContext
.
getExeUserId
(),
e
.
getMessage
(),
e
);
this
.
rollBackForDelRedisData
();
this
.
rollBackForDelRedisData
();
throw
new
BadRequest
(
"保存失败,请检查填写内容或联系管理员!"
);
throw
new
BadRequest
(
"保存失败,请检查填写内容或联系管理员!"
);
}
finally
{
}
finally
{
log
.
info
(
"【车用气瓶-提交结束】userId={}"
,
RequestContext
.
getExeUserId
());
FlowingEquipRedisContext
.
clean
();
FlowingEquipRedisContext
.
clean
();
}
}
}
}
private
void
repeatUsedEquipCheck
(
List
<
Map
<
String
,
Object
>>
equipList
,
String
companyCode
)
{
private
void
repeatUsedEquipCheck
(
List
<
Map
<
String
,
Object
>>
equipList
,
String
companyCode
)
{
equipList
.
forEach
(
equipMap
->
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
DEFINITION_KEY
)
log
.
info
(
"【车用气瓶-设备重复检查】开始检查{}个设备,companyCode={}"
,
equipList
.
size
(),
companyCode
);
.
equipRepeatUsedCheck
(
String
.
valueOf
(
equipMap
.
get
(
"record"
)),
companyCode
));
equipList
.
forEach
(
equipMap
->
{
String
record
=
String
.
valueOf
(
equipMap
.
get
(
"record"
));
log
.
info
(
"【车用气瓶-设备重复检查】检查设备record={}"
,
record
);
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
DEFINITION_KEY
)
.
equipRepeatUsedCheck
(
record
,
companyCode
);
log
.
info
(
"【车用气瓶-设备重复检查】设备record={}检查通过"
,
record
);
});
log
.
info
(
"【车用气瓶-设备重复检查】所有设备检查完成"
);
}
}
/**
/**
...
...
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