Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
long-tern-care-service
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
hubin
long-tern-care-service
Commits
6f30b4e9
Commit
6f30b4e9
authored
Sep 07, 2021
by
zhangch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化查询失能人员信息接口
parent
dc9b9fb0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
73 additions
and
20 deletions
+73
-20
DisableController.java
...n/java/com/hungraim/ltc/controller/DisableController.java
+14
-10
DisableService.java
...rc/main/java/com/hungraim/ltc/service/DisableService.java
+4
-2
DisableServiceImpl.java
...ava/com/hungraim/ltc/service/impl/DisableServiceImpl.java
+9
-8
SearchDisableSimpleVo.java
...m/hungraim/ltc/pojo/vo/disable/SearchDisableSimpleVo.java
+46
-0
No files found.
apply/apply-service/src/main/java/com/hungraim/ltc/controller/DisableController.java
View file @
6f30b4e9
package
com
.
hungraim
.
ltc
.
controller
;
import
cn.hutool.core.util.StrUtil
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.pojo.entity.disable.*
;
import
com.hungraim.ltc.pojo.vo.assessment.ReTaskDistributionVO
;
import
com.hungraim.ltc.pojo.vo.disable.*
;
import
com.hungraim.ltc.service.DisableService
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.ResultCode
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -368,16 +369,19 @@ public class DisableController {
}
/**
* 失能人员信息变更-列表-查看修改
* 通过身份证搜索
* 失能人员信息修改申请详情页搜索失能人员接口
*
* @param pageNum 翻页参数
* @param pageSize 翻页参数
* @param realName 失能人员姓名
* @return 返回一组人员信息
*/
@GetMapping
(
"/searchByCertifNum"
)
public
Result
<
DisableInfoChangeDetailVo
>
searchByCertifNum
(
String
certifNum
)
{
DisableInfoChangeDetailVo
disableInfoChangeDetailVo
=
disableService
.
searchChangeByCertifNum
(
certifNum
);
if
(
disableInfoChangeDetailVo
!=
null
)
{
return
Result
.
success
(
disableInfoChangeDetailVo
);
@GetMapping
(
"/searchByRealName"
)
public
Result
<
IPage
<
SearchDisableSimpleVo
>>
searchByRealName
(
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
,
@RequestParam
(
defaultValue
=
"10"
)
Integer
pageSize
,
String
realName
)
{
if
(
StringUtils
.
isBlank
(
realName
))
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
return
Result
.
failed
(
"数据不一致"
);
IPage
<
SearchDisableSimpleVo
>
searchDisableSimpleVoIPage
=
disableService
.
searchByRealName
(
pageNum
,
pageSize
,
realName
);
return
Result
.
success
(
searchDisableSimpleVoIPage
);
}
}
apply/apply-service/src/main/java/com/hungraim/ltc/service/DisableService.java
View file @
6f30b4e9
package
com
.
hungraim
.
ltc
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.pojo.entity.disable.*
;
import
com.hungraim.ltc.pojo.vo.disable.*
;
import
com.hungraim.ltc.util.Result
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.List
;
...
...
@@ -120,6 +120,8 @@ public interface DisableService {
/**
* 失能人员信息变更-查看修改
*
* @return
*/
DisableInfoChangeDetailVo
searchChangeByCertifNum
(
String
certifNum
);
IPage
<
SearchDisableSimpleVo
>
searchByRealName
(
Integer
pageNum
,
Integer
pageSize
,
String
realName
);
}
apply/apply-service/src/main/java/com/hungraim/ltc/service/impl/DisableServiceImpl.java
View file @
6f30b4e9
...
...
@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
import
cn.hutool.core.util.StrUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.api.AttachFeignService
;
import
com.hungraim.ltc.dao.*
;
...
...
@@ -375,13 +376,12 @@ public class DisableServiceImpl implements DisableService {
}
@Override
public
DisableInfoChangeDetailVo
searchChangeByCertifNum
(
String
certifNum
)
{
ChDisableInfo
chDisableInfo
=
disableInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
ChDisableInfo
>().
eq
(
ChDisableInfo:
:
getCertiCode
,
certifNum
));
DisableInfoChangeDetailVo
disableInfoChangeDetailVo
=
null
;
if
(
chDisableInfo
!=
null
)
{
disableInfoChangeDetailVo
=
new
DisableInfoChangeDetailVo
();
BeanUtil
.
copyProperties
(
chDisableInfo
,
disableInfoChangeDetailVo
);
}
return
disableInfoChangeDetailVo
;
public
IPage
<
SearchDisableSimpleVo
>
searchByRealName
(
Integer
pageNum
,
Integer
pageSize
,
String
realName
)
{
Page
<
ChDisableInfo
>
chDisableInfoPage
=
disableInfoMapper
.
selectPage
(
new
Page
<>(
pageNum
,
pageSize
),
new
LambdaQueryWrapper
<
ChDisableInfo
>().
like
(
ChDisableInfo:
:
getRealName
,
realName
));
return
chDisableInfoPage
.
convert
(
disableInfo
->
{
SearchDisableSimpleVo
searchDisableSimpleVo
=
new
SearchDisableSimpleVo
();
BeanUtils
.
copyProperties
(
disableInfo
,
searchDisableSimpleVo
);
return
searchDisableSimpleVo
;
});
}
}
\ No newline at end of file
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/disable/SearchDisableSimpleVo.java
0 → 100644
View file @
6f30b4e9
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
disable
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
SearchDisableSimpleVo
{
/**
* 失能人员信息id
*/
private
Integer
disabInfoId
;
/**
* 失能人员姓名
*/
private
String
realName
;
/**
* 身份证号
*/
private
String
certiCode
;
/**
* 生日
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
,
timezone
=
"GMT+8"
)
private
Date
birthday
;
/**
* 性别
*/
private
String
gender
;
/**
* 手机号码
*/
private
String
tel
;
/**
* 诊断疾病
*/
private
Integer
diseTypeS
;
}
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