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
17ba53a1
Commit
17ba53a1
authored
Jan 17, 2025
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):历史管道登记增加设备使用省市区
parent
5c5277c0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
3 deletions
+63
-3
EquipRequestParamsDto.java
...in/amos/boot/module/jg/api/dto/EquipRequestParamsDto.java
+11
-0
DataDockServiceImpl.java
.../boot/module/jg/biz/service/impl/DataDockServiceImpl.java
+52
-3
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/EquipRequestParamsDto.java
View file @
17ba53a1
...
...
@@ -41,4 +41,14 @@ public class EquipRequestParamsDto {
private
String
equCode
;
private
String
inspectUnitCreditCode
;
private
String
inspectUnitName
;
private
String
province
;
private
String
provinceName
;
private
String
city
;
private
String
cityName
;
private
String
county
;
private
String
countyName
;
private
String
street
;
private
String
streetName
;
private
String
address
;
private
String
usePlace
;
}
\ 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/DataDockServiceImpl.java
View file @
17ba53a1
...
...
@@ -43,7 +43,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.math.NumberUtils
;
import
org.
aspectj.weaver.ast.Var
;
import
org.
springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
...
...
@@ -1535,7 +1535,7 @@ public class DataDockServiceImpl {
* @param paramsDto
*/
public
void
checkTheUnitRegManageAlreadyExists
(
EquipRequestParamsDto
paramsDto
)
{
idxBizJgRegisterInfoServiceImpl
.
checkUseRegistrationCode
(
paramsDto
.
getUseOrgCode
(),
"unit"
);
idxBizJgRegisterInfoServiceImpl
.
checkUseRegistrationCode
(
paramsDto
.
getUseOrgCode
(),
"unit"
);
Integer
useRegManageCount
=
jgUseRegistrationManageService
.
lambdaQuery
()
.
eq
(
JgUseRegistrationManage:
:
getUseUnitCreditCode
,
paramsDto
.
getCompanyCode
())
.
eq
(
JgUseRegistrationManage:
:
getUseUnitName
,
paramsDto
.
getCompanyName
())
...
...
@@ -1566,7 +1566,24 @@ public class DataDockServiceImpl {
String
inspectUnitCreditCode
=
Optional
.
ofNullable
(
equLists
.
get
(
0
).
getInspectOrgCode
()).
orElse
(
""
);
String
inspectUnitName
=
Optional
.
ofNullable
(
equLists
.
get
(
0
).
getInspectOrgName
()).
orElse
(
""
);
String
useOrgCode
=
String
.
valueOf
(
equipInfo
.
get
(
"USE_ORG_CODE"
));
String
province
=
String
.
valueOf
(
equipInfo
.
get
(
"province"
));
String
city
=
String
.
valueOf
(
equipInfo
.
get
(
"city"
));
String
county
=
String
.
valueOf
(
equipInfo
.
get
(
"county"
));
String
street
=
String
.
valueOf
(
equipInfo
.
get
(
"street"
));
String
address
=
String
.
valueOf
(
equipInfo
.
get
(
"address"
));
String
usePlace
=
String
.
valueOf
(
equipInfo
.
get
(
"usePlace"
));
return
new
EquipRequestParamsDto
().
setCompanyCode
(
company
.
getCompanyCode
().
split
(
"_"
)[
0
])
.
setProvince
(
province
)
.
setProvinceName
(
"陕西省"
)
.
setCity
(
city
)
.
setCityName
(
this
.
getRegionName
(
"CITY"
,
"CITY"
.
toLowerCase
(),
equipInfo
))
.
setCounty
(
county
)
.
setCountyName
(
this
.
getRegionName
(
"REGION"
,
"COUNTY"
.
toLowerCase
(),
equipInfo
))
.
setStreet
(
street
)
.
setStreetName
(
this
.
getRegionName
(
"STREET"
,
"STREET"
.
toLowerCase
(),
equipInfo
))
.
setAddress
(
address
)
.
setUsePlace
(
usePlace
)
.
setCompanyName
(
company
.
getCompanyName
())
.
setCompanyAddress
(
company
.
getAddress
())
.
setExecUserId
(
userModel
.
getUserId
())
...
...
@@ -1595,6 +1612,24 @@ public class DataDockServiceImpl {
}
/**
* 根据code获取市区县名字
*
* @param key key
* @param codeKey codeKey
* @param mapData 表单信息
* @return name
*/
private
String
getRegionName
(
String
key
,
String
codeKey
,
JSONObject
mapData
)
{
return
Optional
.
ofNullable
((
List
<
LinkedHashMap
>)
redisUtils
.
get
(
key
))
.
flatMap
(
list
->
list
.
stream
()
.
filter
(
item
->
String
.
valueOf
(
item
.
get
(
"regionCode"
))
.
equals
(
String
.
valueOf
(
mapData
.
get
(
codeKey
))))
.
map
(
item
->
(
String
)
item
.
get
(
"regionName"
))
.
findFirst
())
.
orElse
(
""
);
}
/**
* 检查本单位是否已存在该工程装置
* 存在则抛出异常
*
...
...
@@ -1662,6 +1697,7 @@ public class DataDockServiceImpl {
useInfo
.
setUseUnitName
(
paramsDto
.
getCompanyName
());
useInfo
.
setProjectContraption
(
paramsDto
.
getProjectContraption
());
useInfo
.
setProjectContraptionId
(
paramsDto
.
getProjectContraptionSeq
());
BeanUtils
.
copyProperties
(
paramsDto
,
useInfo
);
useInfoList
.
add
(
useInfo
);
// 检验检测信息
...
...
@@ -1763,6 +1799,17 @@ public class DataDockServiceImpl {
esEquipmentDto
.
setPRODUCT_NAME
(
pipelineInfo
.
getPipeName
());
esEquipmentDto
.
setProjectContraptionId
(
paramsDto
.
getProjectContraptionSeq
());
esEquipmentDto
.
setUSE_ORG_CODE
(
paramsDto
.
getUseOrgCode
());
esEquipmentDto
.
setSUPERVISORY_CODE
(
proCon
.
getSupervisoryCode
());
esEquipmentDto
.
setUSE_UNIT_CREDIT_CODE
(
paramsDto
.
getCompanyCode
());
esEquipmentDto
.
setUSE_UNIT_NAME
(
paramsDto
.
getCompanyName
());
esEquipmentDto
.
setADDRESS
(
paramsDto
.
getAddress
());
esEquipmentDto
.
setUSE_PLACE
(
paramsDto
.
getProvinceName
()
+
"/"
+
paramsDto
.
getCityName
()
+
"/"
+
paramsDto
.
getCountyName
()
+
"/"
+
paramsDto
.
getStreetName
());
esEquipmentDto
.
setUSE_PLACE_CODE
(
paramsDto
.
getProvince
()
+
"#"
+
paramsDto
.
getCity
()
+
"#"
+
paramsDto
.
getCounty
()
+
"#"
+
paramsDto
.
getStreet
());
esEquipmentDto
.
setUSE_SITE_CODE
(
paramsDto
.
getUsePlace
());
esEquipmentDto
.
setORG_BRANCH_CODE
(
paramsDto
.
getOrgBranchCode
());
esEquipmentDto
.
setORG_BRANCH_NAME
(
paramsDto
.
getOrgBranchName
());
esEquipmentDto
.
setEQU_STATE
(
1
);
esEquipmentDto
.
setEQU_CODE
(
paramsDto
.
getEquCode
());
if
(
inspectionDetectionInfo
.
getNextInspectDate
()
!=
null
)
{
esEquipmentDto
.
setNEXT_INSPECT_DATE
(
inspectionDetectionInfo
.
getNextInspectDate
().
getTime
());
}
...
...
@@ -1945,7 +1992,9 @@ public class DataDockServiceImpl {
.
orgCode
(
paramsDto
.
getOrgBranchCode
())
.
orgName
(
paramsDto
.
getOrgBranchName
())
.
productQualificationCertificate
(
paramsDto
.
getProductQualificationCertificate
())
// .province().provinceName().city().cityName().county().countyName().street().streetName().address()
.
province
(
paramsDto
.
getProvince
()).
provinceName
(
paramsDto
.
getProvinceName
()).
city
(
paramsDto
.
getCity
()).
cityName
(
paramsDto
.
getCityName
())
.
county
(
paramsDto
.
getCounty
()).
countyName
(
paramsDto
.
getCountyName
()).
street
(
paramsDto
.
getStreet
()).
streetName
(
paramsDto
.
getStreetName
())
.
address
(
paramsDto
.
getAddress
())
.
supervisoryCode
(
idxBizJgRegisterInfoServiceImpl
.
getSupervisoryCode
(
paramsDto
.
getVehicleApanage
(),
paramsDto
.
getEquCategoryCode
())).
isIntoManagement
(
Boolean
.
TRUE
).
dataSource
(
paramsDto
.
getDataSource
()).
equCode
(
paramsDto
.
getEquCode
()).
isFirstMerge
(
Boolean
.
FALSE
).
build
();
contraption
.
setSequenceNbr
(
seq
);
paramsDto
.
setProjectContraptionSeq
(
String
.
valueOf
(
seq
));
...
...
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