Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-cloud-account
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.account
pica-cloud-account
提交
9495214a
提交
9495214a
编写于
7月 23, 2019
作者:
dong.an
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
查询用户信息
上级
3217e131
流水线
#12440
已失败 于阶段
in 0 second
变更
3
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
40 行增加
和
25 行删除
+40
-25
AccountInfoReq.java
...pica/cloud/account/account/common/req/AccountInfoReq.java
+15
-13
AccountInfoController.java
...ount/account/server/controller/AccountInfoController.java
+3
-2
AccountInfoMapper.xml
server/src/main/resources/mybatis/AccountInfoMapper.xml
+22
-10
未找到文件。
common/src/main/java/com/pica/cloud/account/account/common/req/AccountInfoReq.java
浏览文件 @
9495214a
...
...
@@ -3,6 +3,8 @@ package com.pica.cloud.account.account.common.req;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.List
;
/**
* @author andong
* @create 2019/7/18
...
...
@@ -20,19 +22,19 @@ public class AccountInfoReq {
private
Long
countyId
;
@ApiModelProperty
(
"技术职称ID"
)
private
L
ong
titleId
;
private
L
ist
<
Long
>
titleIds
;
@ApiModelProperty
(
"医院等级编号"
)
private
Integer
levelGrade
;
private
List
<
Integer
>
levelGrades
;
public
AccountInfoReq
()
{}
public
AccountInfoReq
(
Long
provinceId
,
Long
cityId
,
Long
countyId
,
L
ong
titleId
,
Integer
levelGrade
)
{
public
AccountInfoReq
(
Long
provinceId
,
Long
cityId
,
Long
countyId
,
L
ist
<
Long
>
titleIds
,
List
<
Integer
>
levelGrades
)
{
this
.
provinceId
=
provinceId
;
this
.
cityId
=
cityId
;
this
.
countyId
=
countyId
;
this
.
titleId
=
titleId
;
this
.
levelGrade
=
levelGrade
;
this
.
titleId
s
=
titleIds
;
this
.
levelGrade
s
=
levelGrades
;
}
public
Long
getProvinceId
()
{
...
...
@@ -59,19 +61,19 @@ public class AccountInfoReq {
this
.
countyId
=
countyId
;
}
public
L
ong
getTitleId
()
{
return
titleId
;
public
L
ist
<
Long
>
getTitleIds
()
{
return
titleId
s
;
}
public
void
setTitleId
(
Long
titleId
)
{
this
.
titleId
=
titleId
;
public
void
setTitleId
s
(
List
<
Long
>
titleIds
)
{
this
.
titleId
s
=
titleIds
;
}
public
Integer
getLevelGrade
()
{
return
levelGrade
;
public
List
<
Integer
>
getLevelGrades
()
{
return
levelGrade
s
;
}
public
void
setLevelGrade
(
Integer
levelGrade
)
{
this
.
levelGrade
=
levelGrade
;
public
void
setLevelGrade
s
(
List
<
Integer
>
levelGrades
)
{
this
.
levelGrade
s
=
levelGrades
;
}
}
server/src/main/java/com/pica/cloud/account/account/server/controller/AccountInfoController.java
浏览文件 @
9495214a
...
...
@@ -5,6 +5,7 @@ import com.pica.cloud.account.account.server.service.AccountInfoService;
import
com.pica.cloud.foundation.entity.PicaResponse
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -28,7 +29,7 @@ public class AccountInfoController {
@GetMapping
(
"/count"
)
public
PicaResponse
<
Integer
>
getCount
(
AccountInfoReq
req
)
{
if
(
req
.
getProvinceId
()
==
null
&&
req
.
getCityId
()
==
null
&&
req
.
getCountyId
()
==
null
&&
req
.
getTitleId
()
==
null
&&
req
.
getLevelGrade
()
==
null
)
{
&&
CollectionUtils
.
isEmpty
(
req
.
getTitleIds
())
&&
CollectionUtils
.
isEmpty
(
req
.
getLevelGrades
())
)
{
return
PicaResponse
.
toResponse
(
accountInfoService
.
getTotalCount
());
}
return
PicaResponse
.
toResponse
(
accountInfoService
.
getCount
(
req
));
...
...
@@ -38,7 +39,7 @@ public class AccountInfoController {
@GetMapping
(
"/doctorIds"
)
public
PicaResponse
<
List
<
Integer
>>
getDoctorIds
(
AccountInfoReq
req
)
{
if
(
req
.
getProvinceId
()
==
null
&&
req
.
getCityId
()
==
null
&&
req
.
getCountyId
()
==
null
&&
req
.
getTitleId
()
==
null
&&
req
.
getLevelGrade
()
==
null
)
{
&&
CollectionUtils
.
isEmpty
(
req
.
getTitleIds
())
&&
CollectionUtils
.
isEmpty
(
req
.
getLevelGrades
())
)
{
return
PicaResponse
.
toResponse
(
Collections
.
emptyList
());
}
return
PicaResponse
.
toResponse
(
accountInfoService
.
getDoctorIds
(
req
));
...
...
server/src/main/resources/mybatis/AccountInfoMapper.xml
浏览文件 @
9495214a
...
...
@@ -19,11 +19,17 @@
<if
test=
"countyId != null"
>
and h.county_id = #{countyId}
</if>
<if
test=
"titleId != null"
>
and d.title_id = #{titleId}
</if>
<if
test=
"levelGrade != null"
>
and h.level_grade = #{levelGrade}
<if
test=
"titleIds != null and titleIds.size > 0"
>
and d.title_id in
<foreach
item=
"item"
collection=
"titleIds"
separator=
","
open=
"("
close=
")"
index=
""
>
#{item}
</foreach>
</if>
<if
test=
"levelGrades != null and levelGrades.size > 0"
>
and h.level_grade in
<foreach
item=
"item"
collection=
"levelGrades"
separator=
","
open=
"("
close=
")"
index=
""
>
#{item}
</foreach>
</if>
</select>
...
...
@@ -40,11 +46,17 @@
<if
test=
"countyId != null"
>
and h.county_id = #{countyId}
</if>
<if
test=
"titleId != null"
>
and d.title_id = #{titleId}
</if>
<if
test=
"levelGrade != null"
>
and h.level_grade = #{levelGrade}
<if
test=
"titleIds != null and titleIds.size > 0"
>
and d.title_id in
<foreach
item=
"item"
collection=
"titleIds"
separator=
","
open=
"("
close=
")"
index=
""
>
#{item}
</foreach>
</if>
<if
test=
"levelGrades != null and levelGrades.size > 0"
>
and h.level_grade in
<foreach
item=
"item"
collection=
"levelGrades"
separator=
","
open=
"("
close=
")"
index=
""
>
#{item}
</foreach>
</if>
</select>
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录