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
9b555473
Commit
9b555473
authored
Jul 13, 2023
by
leizhan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
兼容微信小程序省市县的回显问题
parent
e8f662cb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
7 deletions
+39
-7
CommercialDto.java
.../yeejoin/amos/boot/module/hygf/api/dto/CommercialDto.java
+6
-0
Commercial.java
.../yeejoin/amos/boot/module/hygf/api/entity/Commercial.java
+6
-1
SurveyInformationServiceImpl.java
...e/hygf/biz/service/impl/SurveyInformationServiceImpl.java
+27
-6
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/CommercialDto.java
View file @
9b555473
...
...
@@ -39,6 +39,12 @@ public class CommercialDto extends BaseDto {
@TableField
(
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
Integer
>
projectAddress
;
@ApiModelProperty
(
value
=
"省市区名称"
)
private
String
projectAddressName
;
@ApiModelProperty
(
value
=
"省市区文字集合"
)
private
List
<
String
>
projectAddressText
;
@ApiModelProperty
(
value
=
"设备信息"
)
private
String
device
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/entity/Commercial.java
View file @
9b555473
...
...
@@ -55,10 +55,15 @@ public class Commercial extends BaseEntity {
private
String
telephone
;
/**
* 省市区
* 省市区
code
*/
@TableField
(
value
=
"project_address"
,
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
Object
>
projectAddress
;
/**
* 省市区名称
*/
@TableField
(
"project_address_name"
)
private
String
projectAddressName
;
/**
* 设备信息
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/SurveyInformationServiceImpl.java
View file @
9b555473
...
...
@@ -73,6 +73,9 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
public
SurveyInfoAllDto
saveSurveyInfo
(
SurveyInfoAllDto
surveyInfoAllDto
,
String
operationType
)
{
JSONArray
regionName
=
getRegionName
();
List
<
RegionModel
>
list
=
JSONArray
.
parseArray
(
regionName
.
toJSONString
(),
RegionModel
.
class
);
//更新勘察基本信息
SurveyInformation
surveyInformation
=
BeanDtoUtils
.
convert
(
surveyInfoAllDto
.
getSurveyInformation
(),
SurveyInformation
.
class
);
surveyInformation
.
setReview
(
0
);
...
...
@@ -92,6 +95,16 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
//更新商务信息
CommercialDto
oldCommercial
=
surveyInfoAllDto
.
getCommercial
();
Commercial
commercial
=
BeanDtoUtils
.
convert
(
oldCommercial
,
Commercial
.
class
);
// 处理省市县
String
paddressName
=
""
;
for
(
Integer
reg
:
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddress
())
{
for
(
RegionModel
re
:
list
)
{
if
(
re
.
getRegionCode
().
equals
(
Integer
.
valueOf
(
reg
)))
{
paddressName
=
paddressName
+
re
.
getRegionName
()
+
"/"
;
}
}
}
commercial
.
setProjectAddressName
(
paddressName
.
substring
(
0
,
paddressName
.
length
()
-
2
));
commercial
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
());
commercialService
.
saveOrUpdate
(
commercial
);
...
...
@@ -119,25 +132,26 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
peasantHousehold
.
setPermanentAddress
(
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddress
());
peasantHousehold
.
setPermanentAddressDetail
(
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddressDetail
());
peasantHousehold
.
setPermanentAddressDetail
(
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddressDetail
());
JSONArray
regionName
=
getRegionName
();
List
<
RegionModel
>
list
=
JSONArray
.
parseArray
(
regionName
.
toJSONString
(),
RegionModel
.
class
);
// 处理项目地址
String
projectAddressName
=
""
;
for
(
Integer
reg
:
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddress
())
for
(
Integer
reg
:
surveyInfoAllDto
.
getSurveyInformation
().
getProjectAddress
())
{
for
(
RegionModel
re
:
list
)
{
if
(
re
.
getRegionCode
().
equals
(
Integer
.
valueOf
(
reg
)))
{
projectAddressName
=
projectAddressName
+
re
.
getRegionName
()
+
"/"
;
}
}
}
peasantHousehold
.
setProjectAddressName
(
projectAddressName
.
substring
(
0
,
projectAddressName
.
length
()
-
2
));
//常住地址
String
permanentAddressName
=
""
;
for
(
Integer
reg
:
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddress
())
for
(
Integer
reg
:
surveyInfoAllDto
.
getSurveyInformation
().
getPermanentAddress
())
{
for
(
RegionModel
re
:
list
)
{
if
(
re
.
getRegionCode
().
equals
(
Integer
.
valueOf
(
reg
)))
{
permanentAddressName
=
permanentAddressName
+
re
.
getRegionName
()
+
"/"
;
}
}
}
peasantHousehold
.
setPermanentAddressName
(
permanentAddressName
.
substring
(
0
,
permanentAddressName
.
length
()
-
2
));
peasantHouseholdServiceImpl
.
saveOrUpdate
(
peasantHousehold
);
return
surveyInfoAllDto
;
...
...
@@ -156,8 +170,12 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
peasantHouseholdQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformationId
);
PeasantHousehold
peasantHousehold
=
peasantHouseholdServiceImpl
.
getBaseMapper
().
selectOne
(
peasantHouseholdQueryWrapper
);
BeanUtils
.
copyProperties
(
peasantHousehold
,
surveyInfoAllDto
.
getSurveyInformation
());
surveyInfoAllDto
.
getSurveyInformation
().
setProjectAddressText
(
Arrays
.
asList
(
peasantHousehold
.
getProjectAddressName
().
split
(
"/"
)));
surveyInfoAllDto
.
getSurveyInformation
().
setPermanentAddressText
(
Arrays
.
asList
(
peasantHousehold
.
getPermanentAddressName
().
split
(
"/"
)));
if
(!
StringUtils
.
isEmpty
(
peasantHousehold
.
getProjectAddressName
()))
{
surveyInfoAllDto
.
getSurveyInformation
().
setProjectAddressText
(
Arrays
.
asList
(
peasantHousehold
.
getProjectAddressName
().
split
(
"/"
)));
}
if
(!
StringUtils
.
isEmpty
(
peasantHousehold
.
getPermanentAddressName
())){
surveyInfoAllDto
.
getSurveyInformation
().
setPermanentAddressText
(
Arrays
.
asList
(
peasantHousehold
.
getPermanentAddressName
().
split
(
"/"
)));
}
if
(
peasantHousehold
.
getPermanentAddress
()
==
null
){
surveyInfoAllDto
.
getSurveyInformation
().
setPermanentAddress
(
peasantHousehold
.
getProjectAddress
());
...
...
@@ -182,6 +200,9 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
Commercial
commercial
=
commercialService
.
getBaseMapper
().
selectOne
(
commercialQueryWrapper
);
surveyInfoAllDto
.
setCommercial
(
BeanDtoUtils
.
convert
(
commercial
,
CommercialDto
.
class
));
if
(
commercial
!=
null
&&
!
StringUtils
.
isEmpty
(
commercial
.
getProjectAddressName
())){
surveyInfoAllDto
.
getCommercial
().
setProjectAddressText
(
Arrays
.
asList
(
commercial
.
getProjectAddressName
().
split
(
"/"
)));
}
QueryWrapper
<
ExtendedInformation
>
extendedInformationQueryWrapper
=
new
QueryWrapper
<>();
extendedInformationQueryWrapper
.
eq
(
"survey_information_id"
,
surveyInformationId
);
...
...
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