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
3f7532b9
Commit
3f7532b9
authored
Feb 25, 2025
by
Lambertliu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):特殊登记修改
parent
39e78c5f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
24 deletions
+49
-24
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+13
-5
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+22
-14
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+13
-5
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+1
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
3f7532b9
...
...
@@ -940,15 +940,23 @@
ri."EQU_CATEGORY" = '2300'
and ui."DATA_SOURCE" like 'jg%'
and (ri.whether_vehicle_cylinder is null or ri.whether_vehicle_cylinder != 1)
<if
test=
"jsonObject.DATA_SOURCE
!= null and jsonObject.DATA_SOURCE != 'jg_his
'"
>
<if
test=
"jsonObject.DATA_SOURCE
== null or jsonObject.DATA_SOURCE == '
'"
>
and ui."DATA_SOURCE" like 'jg%'
and ui."DATA_SOURCE" not like 'jg_his%'
</if>
<if
test=
"jsonObject.DATA_SOURCE != null and jsonObject.DATA_SOURCE == 'jg_his'"
>
<if
test=
"jsonObject.DATA_SOURCE != null"
>
<choose>
<when
test=
"jsonObject.DATA_SOURCE == 'jg_his_black'"
>
and ui."DATA_SOURCE" like 'jg_his_black%'
</when>
<when
test=
"jsonObject.DATA_SOURCE == 'jg_his'"
>
and ui."DATA_SOURCE" like 'jg_his%'
</if>
<if
test=
"jsonObject.DATA_SOURCE == null or jsonObject.DATA_SOURCE == ''"
>
and ui."DATA_SOURCE" not like 'jg_his_black%'
</when>
<otherwise>
and ui."DATA_SOURCE" like 'jg%'
and ui."DATA_SOURCE" not like 'jg_his%'
</otherwise>
</choose>
</if>
-- 保证使用单位选择设备时(record为null) 能选择到本单位的设备 并且 监管单位在查看时(record 不为null)可以匹配到所有的设备
<if
test=
"jsonObject.useUnitCreditCode != null and jsonObject.useUnitCreditCode != '' and jsonObject.record == null"
>
...
...
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 @
3f7532b9
...
...
@@ -108,6 +108,7 @@ import java.time.LocalDateTime;
import
java.time.format.DateTimeFormatter
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
import
java.util.function.Function
;
import
java.util.regex.Pattern
;
import
java.util.stream.Collectors
;
...
...
@@ -1334,26 +1335,33 @@ public class CommonServiceImpl implements ICommonService {
@Override
public
Object
invokeBusinessType
(
Map
<
String
,
Object
>
map
)
{
String
historyEquType
=
(
String
)
map
.
get
(
HISTORY_EQU_TYPE
);
Map
<
String
,
Object
>
noticeObj
=
(
Map
<
String
,
Object
>)
map
.
get
(
SECOND
);
JSONObject
jsonObject
=
new
JSONObject
(
noticeObj
);
switch
(
historyEquType
)
{
case
"unit"
:
return
jgUseRegistrationServiceImpl
.
handleUnitHistoryEquip
(
jsonObject
);
case
"vehicle"
:
return
jgVehicleInformationService
.
saveOrUpdateHisData
(
jsonObject
);
case
"set_sp"
:
//特殊历史登记
JSONObject
jsonObject
=
new
JSONObject
((
Map
<
String
,
Object
>)
map
.
get
(
SECOND
));
Map
<
String
,
Object
>
useRegFormUploadObj
=
(
Map
<
String
,
Object
>)
map
.
get
(
useRegFormUpload
);
String
uploadMode
=
String
.
valueOf
(
useRegFormUploadObj
.
get
(
"uploadMode"
));
Map
<
String
,
Function
<
JSONObject
,
Object
>>
handlerMap
=
new
HashMap
<>();
handlerMap
.
put
(
"unit"
,
jgUseRegistrationServiceImpl:
:
handleUnitHistoryEquip
);
handlerMap
.
put
(
"vehicle"
,
jgVehicleInformationService:
:
saveOrUpdateHisData
);
handlerMap
.
put
(
"set_sp"
,
obj
->
handleSpecialRegistration
(
obj
,
useRegFormUploadObj
,
uploadMode
,
jgUseRegistrationServiceImpl:
:
handleUseRegistration
));
handlerMap
.
put
(
"unit_sp"
,
obj
->
handleSpecialRegistration
(
obj
,
useRegFormUploadObj
,
uploadMode
,
jgUseRegistrationServiceImpl:
:
handleUnitUseRegistration
));
return
handlerMap
.
getOrDefault
(
historyEquType
,
jgUseRegistrationServiceImpl:
:
handleHistoryEquip
)
.
apply
(
jsonObject
);
}
/**
* 处理特殊登记逻辑
*/
private
Object
handleSpecialRegistration
(
JSONObject
jsonObject
,
Map
<
String
,
Object
>
useRegFormUploadObj
,
String
uploadMode
,
Function
<
JSONObject
,
Object
>
handler
)
{
jsonObject
.
put
(
"regType"
,
"2"
);
jsonObject
.
put
(
"businessCode"
,
"DJ_SY"
);
String
uploadMode
=
String
.
valueOf
(
useRegFormUploadObj
.
get
(
"uploadMode"
));
if
(
Integer
.
toString
(
1
).
equals
(
uploadMode
))
{
if
(
"1"
.
equals
(
uploadMode
))
{
jsonObject
.
put
(
"submit"
,
Boolean
.
TRUE
);
}
jsonObject
.
putAll
(
useRegFormUploadObj
);
return
jgUseRegistrationServiceImpl
.
handleUseRegistration
(
jsonObject
);
default
:
return
jgUseRegistrationServiceImpl
.
handleHistoryEquip
(
jsonObject
);
}
return
handler
.
apply
(
jsonObject
);
}
@Override
...
...
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/IdxBizJgRegisterInfoServiceImpl.java
View file @
3f7532b9
...
...
@@ -513,8 +513,14 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
.
doubleValue
()
);
// 历史黑设备新增由使用单位新增
if
(
dataSource
.
contains
(
"black"
)){
projectContraption
.
setUseUnitName
(
companyInfoMap
.
get
(
"companyName"
).
toString
());
projectContraption
.
setUseUnitCreditCode
(
companyInfoMap
.
get
(
"creditCode"
).
toString
());
}
else
{
projectContraption
.
setUscUnitName
(
companyInfoMap
.
get
(
"companyName"
).
toString
());
projectContraption
.
setUscUnitCreditCode
(
companyInfoMap
.
get
(
"creditCode"
).
toString
());
}
projectContraption
.
setIsFirstMerge
(
false
);
idxBizJgProjectContraptionService
.
saveOrUpdateData
(
projectContraption
);
...
...
@@ -685,6 +691,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
esEquipmentDto
.
setSTATUS
(
"已认领"
);
esEquipmentDto
.
setUSC_UNIT_CREDIT_CODE
(
projectContraption
.
getUscUnitCreditCode
());
esEquipmentDto
.
setUSC_UNIT_NAME
(
projectContraption
.
getUscUnitName
());
esEquipmentDto
.
setUSE_UNIT_CREDIT_CODE
(
projectContraption
.
getUseUnitCreditCode
());
esEquipmentDto
.
setUSE_UNIT_NAME
(
projectContraption
.
getUseUnitName
());
esEquipmentDto
.
setPROJECT_CONTRAPTION
(
projectContraption
.
getProjectContraption
());
esEquipmentDto
.
setPRODUCT_NAME
(
pipelineInfo
.
getPipeName
());
esEquipmentDto
.
setProjectContraptionId
(
String
.
valueOf
(
sequenceNbr
));
...
...
@@ -1166,11 +1174,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
.
filter
(
x
->
"8300"
.
equals
(
x
.
getDictDataKey
()))
.
collect
(
Collectors
.
toList
());
}
// if (EquipmentClassifityEnum.YLGD.getCode().equals(equList) && "black".equals(dataSource)) {
// return this.baseMapper.queryAllEquCategoriesUnderTheEquList(equList).stream()
// .filter(x -> !"8300".equals(x.getDictDataKey())
)
// .collect(Collectors.toList());
// }
}
if
(
EquipmentClassifityEnum
.
YLGD
.
getCode
().
equals
(
equList
))
{
return
this
.
baseMapper
.
queryAllEquCategoriesUnderTheEquList
(
equList
).
stream
(
)
.
sorted
(
Comparator
.
comparing
(
DictionarieValueModel:
:
getDictDataKey
,
Comparator
.
reverseOrder
()))
.
collect
(
Collectors
.
toList
());
}
return
this
.
baseMapper
.
queryAllEquCategoriesUnderTheEquList
(
equList
);
}
...
...
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/JgUseRegistrationServiceImpl.java
View file @
3f7532b9
...
...
@@ -925,6 +925,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
useRegistration
.
setApplyNo
(
listResponseModel
.
getResult
().
get
(
0
));
useRegistration
.
setAuditStatus
(
"待提交"
);
useRegistration
.
setStatus
(
WorkFlowStatusEnum
.
USE_SUBMIT
.
getPass
());
useRegistration
.
setRegType
(
"2"
.
equals
(
map
.
get
(
"regType"
))
?
"2"
:
"0"
);
this
.
save
(
useRegistration
);
}
else
{
this
.
updateById
(
useRegistration
);
...
...
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