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
09dfbb07
Commit
09dfbb07
authored
Apr 09, 2021
by
zhangch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
列表查询条件机构的查询
parent
d0eae670
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
23 deletions
+53
-23
DisableApplyMapper.java
...rc/main/java/com/hungraim/ism/dao/DisableApplyMapper.java
+2
-2
DisableServiceImpl.java
...ava/com/hungraim/ism/service/impl/DisableServiceImpl.java
+46
-14
ChDisableApplyMapper.xml
...ervice/src/main/resources/mapper/ChDisableApplyMapper.xml
+5
-7
No files found.
apply/apply-service/src/main/java/com/hungraim/ism/dao/DisableApplyMapper.java
View file @
09dfbb07
...
@@ -22,7 +22,7 @@ public interface DisableApplyMapper extends BaseMapper<ChDisableApply> {
...
@@ -22,7 +22,7 @@ public interface DisableApplyMapper extends BaseMapper<ChDisableApply> {
/**
/**
* 查询待遇申请管理列表
* 查询待遇申请管理列表
*
*
* @param organId
机构代码
* @param organId
s 机构代码集合
* @param isIncludeSubsidiaries 是否包含子机构 0包含,1不包含
* @param isIncludeSubsidiaries 是否包含子机构 0包含,1不包含
* @param provincial 省
* @param provincial 省
* @param city 市
* @param city 市
...
@@ -32,7 +32,7 @@ public interface DisableApplyMapper extends BaseMapper<ChDisableApply> {
...
@@ -32,7 +32,7 @@ public interface DisableApplyMapper extends BaseMapper<ChDisableApply> {
* @param dataFrom 申请来源
* @param dataFrom 申请来源
* @param srvOrganId 护理机构
* @param srvOrganId 护理机构
*/
*/
Page
<
DisableVO
>
disableList
(
Page
<
DisableVO
>
page
,
String
organId
,
String
isIncludeSubsidiaries
,
String
provincial
,
Page
<
DisableVO
>
disableList
(
Page
<
DisableVO
>
page
,
List
<
String
>
organIds
,
String
isIncludeSubsidiaries
,
String
provincial
,
String
city
,
String
area
,
String
name
,
String
certiCode
,
String
city
,
String
area
,
String
name
,
String
certiCode
,
String
dataFrom
,
String
srvOrganId
);
String
dataFrom
,
String
srvOrganId
);
...
...
apply/apply-service/src/main/java/com/hungraim/ism/service/impl/DisableServiceImpl.java
View file @
09dfbb07
package
com
.
hungraim
.
ism
.
service
.
impl
;
package
com
.
hungraim
.
ism
.
service
.
impl
;
import
cn.hutool.core.util.StrUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ism.dao.DisableApplyMapper
;
import
com.hungraim.ism.dao.DisableApplyMapper
;
...
@@ -32,31 +33,62 @@ public class DisableServiceImpl implements DisableService {
...
@@ -32,31 +33,62 @@ public class DisableServiceImpl implements DisableService {
@Autowired
@Autowired
private
FndStreetMapper
fndStreetMapper
;
private
FndStreetMapper
fndStreetMapper
;
@Override
/**
public
Page
<
DisableVO
>
disableList
(
String
organId
,
String
isIncludeSubsidiaries
,
String
districtProvincial
,
String
districtCity
,
* 获取机构ids
String
districtArea
,
String
realName
,
String
certiCode
,
String
dataFrom
,
*
String
srvOrganId
,
int
page
,
int
pageSize
)
{
* @param organId 父机构id
//拼接子机构id
* @param organIds 机构list
if
(
"0"
.
equals
(
isIncludeSubsidiaries
))
{
*/
boolean
flag
=
true
;
private
void
getOrganList
(
String
organId
,
List
<
String
>
organIds
)
{
while
(
flag
)
{
QueryWrapper
<
ChFndOrgan
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
ChFndOrgan
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"STATUS"
,
"1"
);
queryWrapper
.
eq
(
"STATUS"
,
"1"
);
queryWrapper
.
eq
(
"PARENT_ID"
,
organId
);
queryWrapper
.
eq
(
"PARENT_ID"
,
organId
);
List
<
ChFndOrgan
>
organs
=
fndOrganMapper
.
selectList
(
queryWrapper
);
List
<
ChFndOrgan
>
organs
=
fndOrganMapper
.
selectList
(
queryWrapper
);
if
(
organs
!=
null
&&
organs
.
size
()
!=
0
)
{
if
(
organs
!=
null
&&
organs
.
size
()
!=
0
)
{
for
(
ChFndOrgan
chFndOrgan
:
organs
)
{
for
(
ChFndOrgan
chFndOrgan
:
organs
)
{
organId
=
organId
+
","
+
chFndOrgan
.
getOrganId
();
String
childOrganId
=
chFndOrgan
.
getOrganId
();
if
(
"2"
.
equals
(
chFndOrgan
.
getIsLeaf
()))
{
organIds
.
add
(
childOrganId
);
flag
=
false
;
if
(
"1"
.
equals
(
chFndOrgan
.
getIsLeaf
()))
{
getOrganList
(
childOrganId
,
organIds
);
}
}
}
}
}
}
else
{
flag
=
false
;
}
}
@Override
public
Page
<
DisableVO
>
disableList
(
String
organId
,
String
isIncludeSubsidiaries
,
String
districtProvincial
,
String
districtCity
,
String
districtArea
,
String
realName
,
String
certiCode
,
String
dataFrom
,
String
srvOrganId
,
int
page
,
int
pageSize
)
{
// 没有organId参数的时候,这个集合就为null
List
<
String
>
organIds
=
null
;
if
(
StrUtil
.
isNotBlank
(
organId
))
{
organIds
=
new
ArrayList
<>();
// 先把最顶层id添加到集合
organIds
.
add
(
organId
);
// 获取子孙机构集合
if
(
"0"
.
equals
(
isIncludeSubsidiaries
))
{
this
.
getOrganList
(
organId
,
organIds
);
// boolean flag = true;
// while (flag) {
// QueryWrapper<ChFndOrgan> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("STATUS", "1");
// queryWrapper.eq("PARENT_ID", organId);
// List<ChFndOrgan> organs = fndOrganMapper.selectList(queryWrapper);
// if (organs != null && organs.size() != 0) {
// for (ChFndOrgan chFndOrgan : organs) {
// organId = organId + "," + chFndOrgan.getOrganId();
// if ("2".equals(chFndOrgan.getIsLeaf())) {
// flag = false;
// }
// }
// } else {
// flag = false;
// }
// }
}
}
}
}
return
disableApplyMapper
.
disableList
(
new
Page
<>(
page
,
pageSize
),
organId
,
isIncludeSubsidiaries
,
districtProvincial
,
return
disableApplyMapper
.
disableList
(
new
Page
<>(
page
,
pageSize
),
organId
s
,
isIncludeSubsidiaries
,
districtProvincial
,
districtCity
,
districtArea
,
realName
,
certiCode
,
dataFrom
,
srvOrganId
);
districtCity
,
districtArea
,
realName
,
certiCode
,
dataFrom
,
srvOrganId
);
}
}
...
...
apply/apply-service/src/main/resources/mapper/ChDisableApplyMapper.xml
View file @
09dfbb07
...
@@ -27,13 +27,11 @@
...
@@ -27,13 +27,11 @@
LEFT JOIN CH_FND_ORGAN o ON a.organ_id = o.ORGAN_ID
LEFT JOIN CH_FND_ORGAN o ON a.organ_id = o.ORGAN_ID
LEFT JOIN CH_FND_SRV_MODE m ON a.srv_mode_id = m.SRV_MODE_ID
LEFT JOIN CH_FND_SRV_MODE m ON a.srv_mode_id = m.SRV_MODE_ID
<where>
<where>
<if
test=
"organId != null and organId != ''"
>
<if
test=
"organIds != null"
>
<if
test=
"isIncludeSubsidiaries == '0'"
>
and a.organ_id in
and a.organ_id in (#{organId})
<foreach
collection=
"organIds"
item=
"organId"
open=
"("
close=
")"
separator=
","
>
</if>
#{organId}
<if
test=
"isIncludeSubsidiaries != '0'"
>
</foreach>
and a.organ_id = #{organId}
</if>
</if>
</if>
<if
test=
"provincial != null and provincial != ''"
>
<if
test=
"provincial != null and provincial != ''"
>
and a.DISTRICT_PROVINCIAL = #{provincial}
and a.DISTRICT_PROVINCIAL = #{provincial}
...
...
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