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
ec039e99
Commit
ec039e99
authored
Apr 08, 2026
by
tianbo
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_main' into develop_tzs_dev_nacos
parents
06d2f469
7cc01d65
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
99 additions
and
35 deletions
+99
-35
TmCylinderInfoService.java
.../amos/api/openapi/face/service/TmCylinderInfoService.java
+15
-2
SafetyProblemTracingController.java
...ule/jg/biz/controller/SafetyProblemTracingController.java
+6
-1
BaseEquipUsedCheckService.java
...module/jg/biz/service/impl/BaseEquipUsedCheckService.java
+1
-1
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+2
-2
JgChangeRegistrationUnitServiceImpl.java
...biz/service/impl/JgChangeRegistrationUnitServiceImpl.java
+54
-25
JgVehicleInformationServiceImpl.java
.../jg/biz/service/impl/JgVehicleInformationServiceImpl.java
+21
-4
No files found.
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/TmCylinderInfoService.java
View file @
ec039e99
...
@@ -22,6 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -22,6 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -130,14 +131,26 @@ public class TmCylinderInfoService extends MyBaseServiceImpl<TmCylinderInfoModel
...
@@ -130,14 +131,26 @@ public class TmCylinderInfoService extends MyBaseServiceImpl<TmCylinderInfoModel
* @return 合规性检查结果
* @return 合规性检查结果
*/
*/
public
Object
complianceCheck
(
Map
<
String
,
List
<
String
>>
sequenceCodes
)
{
public
Object
complianceCheck
(
Map
<
String
,
List
<
String
>>
sequenceCodes
)
{
try
{
if
(!
ValidationUtil
.
isEmpty
(
sequenceCodes
)
&&
!
ValidationUtil
.
isEmpty
(
sequenceCodes
.
get
(
"sequenceCodes"
)))
{
if
(!
ValidationUtil
.
isEmpty
(
sequenceCodes
)
&&
!
ValidationUtil
.
isEmpty
(
sequenceCodes
.
get
(
"sequenceCodes"
)))
{
List
<
String
>
sequenceCodeList
=
sequenceCodes
.
get
(
"sequenceCodes"
);
List
<
String
>
sequenceCodeList
=
sequenceCodes
.
get
(
"sequenceCodes"
);
if
(
sequenceCodeList
.
size
()
>
100
)
{
if
(
sequenceCodeList
.
size
()
>
100
)
{
return
new
HashMap
<
String
,
Object
>()
{{
return
new
HashMap
<
String
,
Object
>()
{{
put
(
"result"
,
"请不要一次性提交超过100
个气瓶."
);
put
(
"errorMsg"
,
"请不要一次性提交超过 100
个气瓶."
);
}};
}};
}
}
return
jgServiceFeignClient
.
cylinderComplianceCheck
(
sequenceCodeList
).
getResult
();
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
response
=
jgServiceFeignClient
.
cylinderComplianceCheck
(
sequenceCodeList
);
if
(
response
==
null
||
response
.
getResult
()
==
null
)
{
log
.
error
(
"气瓶合规性检查服务调用失败,返回结果为空。请查看监管服务详细日志"
);
return
new
HashMap
<
String
,
Object
>()
{{
put
(
"errorMsg"
,
"气瓶合规性检查服务暂时不可用,请稍后重试"
);
}};
}
return
response
.
getResult
();
}
}
catch
(
Exception
e
)
{
log
.
error
(
"气瓶合规性检查服务调用失败"
,
e
);
throw
new
BadRequest
(
"气瓶合规性检查服务暂时不可用,请稍后重试"
);
}
}
return
Lists
.
newArrayList
();
return
Lists
.
newArrayList
();
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/SafetyProblemTracingController.java
View file @
ec039e99
...
@@ -12,6 +12,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -12,6 +12,7 @@ import io.swagger.annotations.ApiOperation;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
@@ -110,7 +111,11 @@ public class SafetyProblemTracingController extends BaseController {
...
@@ -110,7 +111,11 @@ public class SafetyProblemTracingController extends BaseController {
Page
<
SafetyProblemTracingDto
>
page
=
new
Page
<>();
Page
<
SafetyProblemTracingDto
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
page
.
setSize
(
size
);
problemModel
.
setGoverningBodyOrgCode
(
loginParams
.
getCompany
().
getOrgCode
());
if
(!
ValidationUtil
.
isEmpty
(
problemModel
.
getGoverningBodyOrgCode
()))
{
if
(!
problemModel
.
getGoverningBodyOrgCode
().
startsWith
(
loginParams
.
getCompany
().
getOrgCode
()))
{
return
ResponseHelper
.
buildResponse
(
new
Page
<>());
}
}
return
ResponseHelper
.
buildResponse
(
safetyProblemTracingServiceImpl
.
queryForSafetyProblemTracingPage
(
page
,
problemModel
));
return
ResponseHelper
.
buildResponse
(
safetyProblemTracingServiceImpl
.
queryForSafetyProblemTracingPage
(
page
,
problemModel
));
}
}
...
...
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 @
ec039e99
...
@@ -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/CommonServiceImpl.java
View file @
ec039e99
...
@@ -3406,7 +3406,6 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -3406,7 +3406,6 @@ public class CommonServiceImpl implements ICommonService {
List
<
Map
<
String
,
Object
>>
result
=
Lists
.
newArrayList
();
List
<
Map
<
String
,
Object
>>
result
=
Lists
.
newArrayList
();
try
{
try
{
BoolQueryBuilder
boolQuery
=
QueryBuilders
.
boolQuery
();
BoolQueryBuilder
boolQuery
=
QueryBuilders
.
boolQuery
();
boolQuery
.
must
(
QueryBuilders
.
termQuery
(
"IS_INTO_MANAGEMENT"
,
true
));
for
(
String
sequenceCode
:
sequenceCodes
)
{
for
(
String
sequenceCode
:
sequenceCodes
)
{
String
[]
keys
=
sequenceCode
.
split
(
"-"
,
2
);
String
[]
keys
=
sequenceCode
.
split
(
"-"
,
2
);
BoolQueryBuilder
combinationQuery
=
QueryBuilders
.
boolQuery
()
BoolQueryBuilder
combinationQuery
=
QueryBuilders
.
boolQuery
()
...
@@ -3466,12 +3465,13 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -3466,12 +3465,13 @@ public class CommonServiceImpl implements ICommonService {
}
}
}
}
});
});
log
.
info
(
"查询的气瓶对应使用登记证号集合:{}"
,
useRegistrationList
);
// 查询合规气瓶使用登记证的发证登记机关
// 查询合规气瓶使用登记证的发证登记机关
useRegistrationList
=
useRegistrationList
.
stream
().
filter
(
code
->
!
ValidationUtil
.
isEmpty
(
code
)).
collect
(
Collectors
.
toSet
());
useRegistrationList
=
useRegistrationList
.
stream
().
filter
(
code
->
!
ValidationUtil
.
isEmpty
(
code
)).
collect
(
Collectors
.
toSet
());
if
(
ValidationUtil
.
isEmpty
(
useRegistrationList
))
{
if
(
ValidationUtil
.
isEmpty
(
useRegistrationList
))
{
return
result
;
return
result
;
}
}
List
<
JgUseRegistrationManage
>
manageList
=
jgUseRegistrationManageMapper
.
selectList
(
new
LambdaQueryWrapper
<
JgUseRegistrationManage
>().
in
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
useRegistrationList
));
List
<
JgUseRegistrationManage
>
manageList
=
jgUseRegistrationManageMapper
.
selectList
(
new
LambdaQueryWrapper
<
JgUseRegistrationManage
>().
eq
(
JgUseRegistrationManage:
:
getIsDelete
,
false
).
in
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
useRegistrationList
).
orderByDesc
(
JgUseRegistrationManage:
:
getRecDate
));
if
(!
ValidationUtil
.
isEmpty
(
manageList
))
{
if
(!
ValidationUtil
.
isEmpty
(
manageList
))
{
result
.
forEach
(
map
->
{
result
.
forEach
(
map
->
{
manageList
.
stream
().
filter
(
i
->
i
.
getUseRegistrationCode
().
equals
(
map
.
get
(
"useRegistrationCode"
))).
findFirst
().
ifPresent
(
i
->
map
.
put
(
"registrationAuthority"
,
i
.
getReceiveOrgName
()));
manageList
.
stream
().
filter
(
i
->
i
.
getUseRegistrationCode
().
equals
(
map
.
get
(
"useRegistrationCode"
))).
findFirst
().
ifPresent
(
i
->
map
.
put
(
"registrationAuthority"
,
i
.
getReceiveOrgName
()));
...
...
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/JgChangeRegistrationUnitServiceImpl.java
View file @
ec039e99
...
@@ -3656,6 +3656,34 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -3656,6 +3656,34 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
if
(
device
.
containsKey
(
"record"
))
{
if
(
device
.
containsKey
(
"record"
))
{
unitEq
.
setEquId
((
String
)
device
.
get
(
"record"
));
//设备主键
unitEq
.
setEquId
((
String
)
device
.
get
(
"record"
));
//设备主键
}
}
if
(
device
.
containsKey
(
"nextInspectDate"
)
&&
device
.
get
(
"nextInspectDate"
)
!=
null
)
{
Object
nextInspectDate
=
device
.
get
(
"nextInspectDate"
);
// 处理 Timestamp 类型
if
(
nextInspectDate
instanceof
java
.
sql
.
Timestamp
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
device
.
put
(
"nextInspectDate"
,
sdf
.
format
((
java
.
sql
.
Timestamp
)
nextInspectDate
));
}
else
if
(
nextInspectDate
instanceof
Date
)
{
// 处理其他 Date 类型
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
device
.
put
(
"nextInspectDate"
,
sdf
.
format
((
Date
)
nextInspectDate
));
}
else
if
(
nextInspectDate
instanceof
Number
)
{
// 如果是时间戳格式(纯数字),则转换为 YYYY-MM-DD 格式
Instant
instant
=
Instant
.
ofEpochMilli
(((
Number
)
nextInspectDate
).
longValue
());
ZoneId
zoneId
=
ZoneId
.
systemDefault
();
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
).
withZone
(
zoneId
);
device
.
put
(
"nextInspectDate"
,
formatter
.
format
(
instant
));
}
else
if
(
nextInspectDate
instanceof
String
&&
!((
String
)
nextInspectDate
).
contains
(
"-"
))
{
// 如果是不含 "-" 的字符串格式时间戳
try
{
Instant
instant
=
Instant
.
ofEpochMilli
(
Long
.
parseLong
((
String
)
nextInspectDate
));
ZoneId
zoneId
=
ZoneId
.
systemDefault
();
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
).
withZone
(
zoneId
);
device
.
put
(
"nextInspectDate"
,
formatter
.
format
(
instant
));
}
catch
(
NumberFormatException
e
)
{
// 如果转换失败,保持原值
}
}
}
unitEq
.
setUnitChangeRegistrationId
(
registrationUnit
.
getSequenceNbr
().
toString
());
//单位变更业务主键
unitEq
.
setUnitChangeRegistrationId
(
registrationUnit
.
getSequenceNbr
().
toString
());
//单位变更业务主键
unitEq
.
setDeviceInfo
(
JSON
.
toJSONString
(
device
));
//设备信息json
unitEq
.
setDeviceInfo
(
JSON
.
toJSONString
(
device
));
//设备信息json
jgRelationEquipList
.
add
(
unitEq
);
jgRelationEquipList
.
add
(
unitEq
);
...
@@ -3978,34 +4006,34 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -3978,34 +4006,34 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
this
.
delRepeatUseEquipData
(
registration
.
getApplyNo
(),
registration
.
getStatus
(),
registration
.
getNewUseUnitCreditCode
());
this
.
delRepeatUseEquipData
(
registration
.
getApplyNo
(),
registration
.
getStatus
(),
registration
.
getNewUseUnitCreditCode
());
}
}
@ResultFieldMapping
({
@ResultFieldMapping
.
ResultFieldMap
(
sourceField
=
"estateUnitCode"
,
targetField
=
"estateUnitSeq"
,
serviceClass
=
CommonServiceImpl
.
class
,
queryMethod
=
"queryTcmUnitSeqByCreditCode"
,
secondParamValue
=
"CQ"
)})
//
@ResultFieldMapping({@ResultFieldMapping.ResultFieldMap(sourceField = "estateUnitCode", targetField = "estateUnitSeq", serviceClass = CommonServiceImpl.class, queryMethod = "queryTcmUnitSeqByCreditCode", secondParamValue = "CQ")})
public
Map
<
String
,
Object
>
queryEquipInfoByRegistrationCode
(
String
useRegistrationCode
)
{
public
Map
<
String
,
Object
>
queryEquipInfoByRegistrationCode
(
String
useRegistrationCode
)
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"useRegistrationCode"
,
useRegistrationCode
);
map
.
put
(
"useRegistrationCode"
,
useRegistrationCode
);
JgUseRegistrationManage
registrationManage
=
//
JgUseRegistrationManage registrationManage =
jgUseRegistrationManageService
.
lambdaQuery
()
//
jgUseRegistrationManageService.lambdaQuery()
.
eq
(
JgUseRegistrationManage:
:
getUseRegistrationCode
,
useRegistrationCode
)
//
.eq(JgUseRegistrationManage::getUseRegistrationCode, useRegistrationCode)
.
eq
(
JgUseRegistrationManage:
:
getIsDelete
,
0
)
//
.eq(JgUseRegistrationManage::getIsDelete, 0)
.
last
(
"LIMIT 1"
)
//
.last("LIMIT 1")
.
one
();
//
.one();
List
<
JSONObject
>
jsonObjects
=
registrationManage
==
null
?
Collections
.
emptyList
():
//
List<JSONObject> jsonObjects = registrationManage == null ? Collections.emptyList():
Optional
.
ofNullable
(
jgUseRegistrationManageService
.
queryEquByCertificateSeq
(
registrationManage
.
getSequenceNbr
())
//
Optional.ofNullable(jgUseRegistrationManageService.queryEquByCertificateSeq(registrationManage.getSequenceNbr())
).
orElse
(
Collections
.
emptyList
());
//
).orElse(Collections.emptyList());
if
(!
org
.
springframework
.
util
.
ObjectUtils
.
isEmpty
(
jsonObjects
))
{
//
if (!org.springframework.util.ObjectUtils.isEmpty(jsonObjects)) {
List
<
String
>
records
=
jsonObjects
.
stream
().
map
(
a
->
String
.
valueOf
(
a
.
get
(
"SEQUENCE_NBR"
))).
collect
(
Collectors
.
toList
());
//
List<String> records = jsonObjects.stream().map(a -> String.valueOf(a.get("SEQUENCE_NBR"))).collect(Collectors.toList());
List
<
Map
<
String
,
Object
>>
equList
=
this
.
getBaseMapper
().
getEstateUnitInfo
(
records
);
//
List<Map<String, Object>> equList = this.getBaseMapper().getEstateUnitInfo(records);
String
estateUnitName
=
equList
.
stream
()
//
String estateUnitName = equList.stream()
.
map
(
e
->
e
.
get
(
"estateUnitName"
))
//
.map(e -> e.get("estateUnitName"))
.
filter
(
Objects:
:
nonNull
)
//
.filter(Objects::nonNull)
.
filter
(
String
.
class
::
isInstance
)
//
.filter(String.class::isInstance)
.
map
(
String
.
class
::
cast
)
//
.map(String.class::cast)
.
findFirst
()
//
.findFirst()
.
orElse
(
""
);
//
.orElse("");
if
(!
ValidationUtil
.
isEmpty
(
estateUnitName
)
&&
estateUnitName
.
contains
(
"_"
))
{
//
if (!ValidationUtil.isEmpty(estateUnitName) && estateUnitName.contains("_")) {
map
.
put
(
"estateUnitCode"
,
estateUnitName
.
split
(
"_"
)[
0
]);
//
map.put("estateUnitCode", estateUnitName.split("_")[0]);
map
.
put
(
"estateUnitName"
,
estateUnitName
.
split
(
"_"
)[
1
]);
//
map.put("estateUnitName", estateUnitName.split("_")[1]);
}
//
}
}
//
}
return
map
;
return
map
;
}
}
}
}
\ No newline at end of file
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 @
ec039e99
...
@@ -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