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
2fc0a4ae
Commit
2fc0a4ae
authored
Jul 11, 2023
by
leizhan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化农户管理列表
parent
c5120222
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
7 deletions
+28
-7
PeasantHouseholdDto.java
...in/amos/boot/module/hygf/api/dto/PeasantHouseholdDto.java
+4
-1
PeasantHouseholdController.java
...odule/hygf/biz/controller/PeasantHouseholdController.java
+7
-3
PeasantHouseholdServiceImpl.java
...le/hygf/biz/service/impl/PeasantHouseholdServiceImpl.java
+16
-2
SurveyInformationServiceImpl.java
...e/hygf/biz/service/impl/SurveyInformationServiceImpl.java
+1
-1
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/PeasantHouseholdDto.java
View file @
2fc0a4ae
...
...
@@ -64,9 +64,12 @@ public class PeasantHouseholdDto extends BaseDto {
@TableField
(
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
Integer
>
permanentAddress
;
@ApiModelProperty
(
value
=
"是否勘察 0,1"
)
@ApiModelProperty
(
value
=
"是否勘察 0,1
,2
"
)
private
Integer
surveyOrNot
;
@ApiModelProperty
(
value
=
"勘察状态描述"
)
private
String
surveyOrNotText
;
@ApiModelProperty
(
value
=
"身份证号"
)
private
String
idCard
;
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/PeasantHouseholdController.java
View file @
2fc0a4ae
...
...
@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.hygf.api.dto.PeasantHouseholdDtoP;
import
com.yeejoin.amos.boot.module.hygf.api.dto.SurveyInformationDto
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.SurveyInformationServiceImpl
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -75,12 +76,14 @@ public class PeasantHouseholdController extends BaseController {
area
=
area
+
re
.
getRegionName
()
+
"/"
;
}
}
model
.
setProjectAddressName
(
area
.
substring
(
0
,
area
.
length
()
-
2
));
model
.
setProjectAddressName
(
area
.
substring
(
0
,
area
.
length
()
-
2
)
+
"/"
+
model
.
getProjectAddressDetail
()
);
if
(
model
.
getIsPermanent
().
size
()>
0
)
{
model
.
setPermanentAddress
(
model
.
getProjectAddress
());
model
.
setPermanentAddressDetail
(
model
.
getProjectAddressDetail
());
}
model
.
setSurveyInformationId
(
surveyInformationDto
.
getSequenceNbr
());
model
.
setSurveyOrNot
(
0
);
model
.
setReview
(
0
);
PeasantHouseholdDto
householdDto
=
peasantHouseholdServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
householdDto
);
}
...
...
@@ -106,7 +109,7 @@ public class PeasantHouseholdController extends BaseController {
area
=
area
+
re
.
getRegionName
()
+
"/"
;
}
}
model
.
setProjectAddressName
(
area
.
substring
(
0
,
area
.
length
()
-
2
));
model
.
setProjectAddressName
(
area
.
substring
(
0
,
area
.
length
()
-
2
)
+
"/"
+
model
.
getProjectAddressDetail
()
);
if
(
model
.
getIsPermanent
().
size
()>
0
)
{
model
.
setPermanentAddress
(
model
.
getProjectAddress
());
model
.
setPermanentAddressDetail
(
model
.
getProjectAddressDetail
());
...
...
@@ -160,7 +163,8 @@ public class PeasantHouseholdController extends BaseController {
Page
<
PeasantHouseholdDto
>
page
=
new
Page
<
PeasantHouseholdDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
peasantHouseholdServiceImpl
.
queryForPeasantHouseholdPage
(
page
));
AgencyUserModel
userInfo
=
getUserInfo
();
return
ResponseHelper
.
buildResponse
(
peasantHouseholdServiceImpl
.
queryForPeasantHouseholdPage
(
page
,
userInfo
.
getAgencyCode
()));
}
/**
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PeasantHouseholdServiceImpl.java
View file @
2fc0a4ae
...
...
@@ -8,6 +8,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* 农户信息服务实现类
...
...
@@ -20,8 +21,21 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
/**
* 分页查询
*/
public
Page
<
PeasantHouseholdDto
>
queryForPeasantHouseholdPage
(
Page
<
PeasantHouseholdDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
public
Page
<
PeasantHouseholdDto
>
queryForPeasantHouseholdPage
(
Page
<
PeasantHouseholdDto
>
page
,
String
developerCode
)
{
Page
<
PeasantHouseholdDto
>
peasantHouseholdDtoPage
=
this
.
queryForPage
(
page
,
null
,
false
,
developerCode
);
List
<
PeasantHouseholdDto
>
records
=
peasantHouseholdDtoPage
.
getRecords
();
List
<
PeasantHouseholdDto
>
newRecords
=
records
.
stream
().
map
(
item
->
{
if
(
item
.
getSurveyOrNot
()
==
0
)
{
item
.
setSurveyOrNotText
(
"待勘察"
);
}
else
if
(
item
.
getSurveyOrNot
()
==
1
)
{
item
.
setSurveyOrNotText
(
"已勘察"
);
}
else
if
(
item
.
getSurveyOrNot
()
==
2
)
{
item
.
setSurveyOrNotText
(
"已提交审核"
);
}
return
item
;
}).
collect
(
Collectors
.
toList
());
peasantHouseholdDtoPage
.
setRecords
(
newRecords
);
return
peasantHouseholdDtoPage
;
}
/**
...
...
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 @
2fc0a4ae
...
...
@@ -113,7 +113,7 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
BeanUtils
.
copyProperties
(
peasantHousehold
,
surveyInfoAllDto
.
getSurveyInformation
());
if
(
peasantHousehold
.
getPermanentAddress
()
==
null
){
surveyInfoAllDto
.
getSurveyInformation
().
setPermanentAddress
(
JSON
.
parseArray
(
"[]"
,
Integer
.
class
));
surveyInfoAllDto
.
getSurveyInformation
().
setPermanentAddress
(
peasantHousehold
.
getProjectAddress
(
));
surveyInfoAllDto
.
getSurveyInformation
().
setIsPermanent
(
JSON
.
parseArray
(
"[1]"
,
String
.
class
));
}
surveyInfoAllDto
.
getSurveyInformation
().
setSequenceNbr
(
surveyInformation
.
getSequenceNbr
());
...
...
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