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
10047a2c
Commit
10047a2c
authored
Feb 27, 2023
by
zhangwanglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
结算代码提交
parent
8428183f
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
488 additions
and
55 deletions
+488
-55
AccountController.java
...om/hungraim/ltc/account/controller/AccountController.java
+27
-9
ChDisabAccountsDetailMapper.java
...hungraim/ltc/account/dao/ChDisabAccountsDetailMapper.java
+3
-2
AccountService.java
...java/com/hungraim/ltc/account/service/AccountService.java
+3
-1
AccountServiceImpl.java
...hungraim/ltc/account/service/impl/AccountServiceImpl.java
+30
-17
ChDisabAccountsDetailMapper.xml
...src/main/resources/mapper/ChDisabAccountsDetailMapper.xml
+31
-10
ChDisabAccountsMapper.xml
...rvice/src/main/resources/mapper/ChDisabAccountsMapper.xml
+8
-2
ChSrvTaskDetailMapper.xml
...rvice/src/main/resources/mapper/ChSrvTaskDetailMapper.xml
+3
-0
DisableController.java
...n/java/com/hungraim/ltc/controller/DisableController.java
+40
-3
DisableInfoMapper.java
...src/main/java/com/hungraim/ltc/dao/DisableInfoMapper.java
+16
-0
DisableService.java
...rc/main/java/com/hungraim/ltc/service/DisableService.java
+16
-0
DisableServiceImpl.java
...ava/com/hungraim/ltc/service/impl/DisableServiceImpl.java
+40
-1
DisableInfoMapper.xml
...y-service/src/main/resources/mapper/DisableInfoMapper.xml
+64
-0
ChDisableApply.java
.../com/hungraim/ltc/pojo/entity/disable/ChDisableApply.java
+8
-0
ChDisableInfo.java
...a/com/hungraim/ltc/pojo/entity/disable/ChDisableInfo.java
+6
-0
SrvOrganListReq.java
...ava/com/hungraim/ltc/pojo/vo/account/SrvOrganListReq.java
+6
-6
DisableInfoListVo.java
...a/com/hungraim/ltc/pojo/vo/disable/DisableInfoListVo.java
+122
-0
AllocationSrvTaskVO.java
.../hungraim/ltc/pojo/vo/governance/AllocationSrvTaskVO.java
+15
-0
SrvTaskController.java
...hungraim/ltc/governance/controller/SrvTaskController.java
+8
-0
ChSrvTaskDetailMapper.java
...om/hungraim/ltc/governance/dao/ChSrvTaskDetailMapper.java
+2
-0
SrvTaskMapper.java
...n/java/com/hungraim/ltc/governance/dao/SrvTaskMapper.java
+3
-4
SrvTaskService.java
...a/com/hungraim/ltc/governance/service/SrvTaskService.java
+3
-0
SrvTaskServiceImpl.java
...graim/ltc/governance/service/impl/SrvTaskServiceImpl.java
+23
-0
ChSrvTaskDetailMapper.xml
.../hungraim/ltc/governance/mapper/ChSrvTaskDetailMapper.xml
+5
-0
SrvTaskMapper.xml
...rces/com/hungraim/ltc/governance/mapper/SrvTaskMapper.xml
+6
-0
No files found.
account/account-service/src/main/java/com/hungraim/ltc/account/controller/AccountController.java
View file @
10047a2c
...
@@ -16,6 +16,8 @@ import org.springframework.web.bind.annotation.*;
...
@@ -16,6 +16,8 @@ import org.springframework.web.bind.annotation.*;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -133,16 +135,28 @@ public class AccountController {
...
@@ -133,16 +135,28 @@ public class AccountController {
/**
/**
* 查询机构结算列表
* 查询机构结算
审核
列表
*
*
* @param srvOrganListReq 请求参数对象
* @param srvOrganListReq 请求参数对象
* @return 返回
* @return 返回
*/
*/
@GetMapping
(
"/searchSrvOrganAccountList"
)
@GetMapping
(
"/searchSrvOrganAccountList"
)
public
Result
<
Page
<
SrvOrganAccountListResp
>>
searchSrvOrganAccountList
(
SrvOrganListReq
srvOrganListReq
)
{
public
Result
<
Page
<
SrvOrganAccountListResp
>>
searchSrvOrganAccountList
(
SrvOrganListReq
srvOrganListReq
)
{
return
Result
.
success
(
accountService
.
searchSrvOrganAccountList
(
srvOrganListReq
));
return
Result
.
success
(
accountService
.
searchSrvOrganAccountList
(
srvOrganListReq
));
}
}
/**
* 查询机构结算复核列表
*
* @param srvOrganListReq 请求参数对象
* @return 返回
*/
@GetMapping
(
"/searchSrvOrganReviewList"
)
public
Result
<
Page
<
SrvOrganAccountListResp
>>
searchSrvOrganReviewList
(
SrvOrganListReq
srvOrganListReq
)
{
List
<
String
>
list
=
Arrays
.
asList
(
"2"
,
"3"
,
"4"
);
srvOrganListReq
.
setAccountsStatusList
(
list
);
return
Result
.
success
(
accountService
.
searchSrvOrganAccountList
(
srvOrganListReq
));
}
/**
/**
* 机构结算明细导出
* 机构结算明细导出
...
@@ -167,15 +181,16 @@ public class AccountController {
...
@@ -167,15 +181,16 @@ public class AccountController {
/**
/**
* 查询机构结算信息列表明细
* 查询机构结算信息列表明细
*
*
* @param
accountsId 结算id
* @param
srvOrganListReq
* @return
* @return
*/
*/
@GetMapping
(
"/queryOrganAccountsDetail"
)
@GetMapping
(
"/queryOrganAccountsDetail"
)
public
Result
<
Page
<
ChDisabDetailAccountsResp
>>
queryOrganAccountsDetail
(
Integer
pageNum
,
Integer
pageSize
,
String
accountsId
)
{
public
Result
<
Page
<
ChDisabDetailAccountsResp
>>
queryOrganAccountsDetail
(
Integer
pageNum
,
Integer
pageSize
,
SrvOrganListReq
srvOrganListReq
)
{
String
accountsId
=
srvOrganListReq
.
getAccountsId
();
if
(
StringUtils
.
isBlank
(
accountsId
))
{
if
(
StringUtils
.
isBlank
(
accountsId
))
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
}
Page
<
ChDisabDetailAccountsResp
>
chAssessDetailAccounts
=
accountService
.
queryOrganAccountsDetail
(
pageNum
,
pageSize
,
accountsId
,
null
);
Page
<
ChDisabDetailAccountsResp
>
chAssessDetailAccounts
=
accountService
.
queryOrganAccountsDetail
(
pageNum
,
pageSize
,
srvOrganListReq
);
return
Result
.
success
(
chAssessDetailAccounts
);
return
Result
.
success
(
chAssessDetailAccounts
);
}
}
...
@@ -186,8 +201,9 @@ public class AccountController {
...
@@ -186,8 +201,9 @@ public class AccountController {
* @return
* @return
*/
*/
@GetMapping
(
"/queryAccountsDeclareList"
)
@GetMapping
(
"/queryAccountsDeclareList"
)
public
Result
<
Page
<
ChDisabDetailAccountsResp
>>
queryAccountsDeclareList
(
Integer
pageNum
,
Integer
pageSize
)
{
public
Result
<
Page
<
ChDisabDetailAccountsResp
>>
queryAccountsDeclareList
(
Integer
pageNum
,
Integer
pageSize
,
SrvOrganListReq
srvOrganListReq
)
{
Page
<
ChDisabDetailAccountsResp
>
chAssessDetailAccounts
=
accountService
.
queryOrganAccountsDetail
(
pageNum
,
pageSize
,
null
,
0
);
srvOrganListReq
.
setAccountsStatus
(
"0"
);
Page
<
ChDisabDetailAccountsResp
>
chAssessDetailAccounts
=
accountService
.
queryOrganAccountsDetail
(
pageNum
,
pageSize
,
srvOrganListReq
);
return
Result
.
success
(
chAssessDetailAccounts
);
return
Result
.
success
(
chAssessDetailAccounts
);
}
}
...
@@ -197,8 +213,10 @@ public class AccountController {
...
@@ -197,8 +213,10 @@ public class AccountController {
* @return
* @return
*/
*/
@GetMapping
(
"/queryDelayAccountList"
)
@GetMapping
(
"/queryDelayAccountList"
)
public
Result
<
Page
<
ChDisabDetailAccountsResp
>>
queryDelayAccountList
(
Integer
pageNum
,
Integer
pageSize
)
{
public
Result
<
Page
<
ChDisabDetailAccountsResp
>>
queryDelayAccountList
(
Integer
pageNum
,
Integer
pageSize
,
SrvOrganListReq
srvOrganListReq
)
{
Page
<
ChDisabDetailAccountsResp
>
chAssessDetailAccounts
=
accountService
.
queryOrganAccountsDetail
(
pageNum
,
pageSize
,
null
,
2
);
List
<
String
>
list
=
Arrays
.
asList
(
"1"
,
"2"
);
srvOrganListReq
.
setAccountsStatusList
(
list
);
Page
<
ChDisabDetailAccountsResp
>
chAssessDetailAccounts
=
accountService
.
queryOrganAccountsDetail
(
pageNum
,
pageSize
,
srvOrganListReq
);
return
Result
.
success
(
chAssessDetailAccounts
);
return
Result
.
success
(
chAssessDetailAccounts
);
}
}
...
...
account/account-service/src/main/java/com/hungraim/ltc/account/dao/ChDisabAccountsDetailMapper.java
View file @
10047a2c
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.hungraim.ltc.pojo.entity.account.*
;
import
com.hungraim.ltc.pojo.entity.account.*
;
import
com.hungraim.ltc.pojo.vo.account.AccountExportDetailListResp
;
import
com.hungraim.ltc.pojo.vo.account.AccountExportDetailListResp
;
import
com.hungraim.ltc.pojo.vo.account.OrganAccountsVO
;
import
com.hungraim.ltc.pojo.vo.account.OrganAccountsVO
;
import
com.hungraim.ltc.pojo.vo.account.SrvOrganListReq
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
...
@@ -24,7 +25,7 @@ public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAcc
...
@@ -24,7 +25,7 @@ public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAcc
List
<
OrganAccountsVO
>
getOtherPlaceList
(
String
programId
);
List
<
OrganAccountsVO
>
getOtherPlaceList
(
String
programId
);
Page
<
ChDisabDetailAccountsResp
>
queryOrganAccountsDetail
(
Page
page
,
S
tring
accountsId
,
Integer
status
);
Page
<
ChDisabDetailAccountsResp
>
queryOrganAccountsDetail
(
Page
page
,
S
rvOrganListReq
req
);
Page
<
NursingRecordsRespVO
>
queryNursingRecords
(
Page
page
,
String
taskDetailId
);
Page
<
NursingRecordsRespVO
>
queryNursingRecords
(
Page
page
,
String
taskDetailId
);
...
@@ -32,7 +33,7 @@ public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAcc
...
@@ -32,7 +33,7 @@ public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAcc
Page
<
OverallCostListRespVO
>
queryOverallCostList
(
Page
page
,
OverallCostReqVO
req
);
Page
<
OverallCostListRespVO
>
queryOverallCostList
(
Page
page
,
OverallCostReqVO
req
);
int
updateByAccountsId
(
String
accountsId
);
int
updateByAccountsId
(
String
accountsId
,
Integer
accountsStatus
);
...
...
account/account-service/src/main/java/com/hungraim/ltc/account/service/AccountService.java
View file @
10047a2c
...
@@ -31,7 +31,6 @@ public interface AccountService extends IService<ChDisabAccounts> {
...
@@ -31,7 +31,6 @@ public interface AccountService extends IService<ChDisabAccounts> {
Page
<
ChDisabDetailAccountsResp
>
queryOrganAccountsDetail
(
Integer
pageNum
,
Integer
pageSize
,
String
accountsId
,
Integer
status
);
Page
<
NursingRecordsRespVO
>
queryNursingRecords
(
Integer
pageNum
,
Integer
pageSize
,
String
taskDetailId
);
Page
<
NursingRecordsRespVO
>
queryNursingRecords
(
Integer
pageNum
,
Integer
pageSize
,
String
taskDetailId
);
...
@@ -54,4 +53,7 @@ public interface AccountService extends IService<ChDisabAccounts> {
...
@@ -54,4 +53,7 @@ public interface AccountService extends IService<ChDisabAccounts> {
int
accountsFreeCommit
(
Long
accountsDetailId
);
int
accountsFreeCommit
(
Long
accountsDetailId
);
int
delayAccountCommit
(
Long
accountsDetailId
,
Short
status
);
int
delayAccountCommit
(
Long
accountsDetailId
,
Short
status
);
Page
<
ChDisabDetailAccountsResp
>
queryOrganAccountsDetail
(
Integer
pageNum
,
Integer
pageSize
,
SrvOrganListReq
srvOrganListReq
);
}
}
account/account-service/src/main/java/com/hungraim/ltc/account/service/impl/AccountServiceImpl.java
View file @
10047a2c
...
@@ -65,23 +65,34 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -65,23 +65,34 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
ChDisabAccounts
chDisabAccounts
=
new
ChDisabAccounts
();
ChDisabAccounts
chDisabAccounts
=
new
ChDisabAccounts
();
BeanUtils
.
copyProperties
(
accountOperVo
,
chDisabAccounts
);
BeanUtils
.
copyProperties
(
accountOperVo
,
chDisabAccounts
);
chDisabAccounts
.
setChooseSettle
((
short
)
0
);
// 是否结算(0未结算,1已结算)
chDisabAccounts
.
setChooseSettle
((
short
)
0
);
// 是否结算(0未结算,1已结算)
this
.
saveOrUpdate
(
chDisabAccounts
);
Short
accountsStatus
=
accountOperVo
.
getAccountsStatus
();
Short
accountsStatus
=
accountOperVo
.
getAccountsStatus
();
String
accountsId
=
String
.
valueOf
(
accountOperVo
.
getAccountsId
());
String
accountsId
=
String
.
valueOf
(
accountOperVo
.
getAccountsId
());
if
(
accountsStatus
==
2
)
{
// 驳回
chDisabAccountsDetailMapper
.
updateByAccountsId
(
accountsId
);
if
(
accountsStatus
==
0
)
{
chDisabAccountsDetailMapper
.
updateByAccountsId
(
accountsId
,
0
);
chDisabAccounts
.
setAllCost
(
BigDecimal
.
valueOf
(
0
));
chDisabAccounts
.
setOverallCost
(
BigDecimal
.
valueOf
(
0
));
chDisabAccounts
.
setPersonalCost
(
BigDecimal
.
valueOf
(
0
));
chDisabAccounts
.
setReissueAmountTotal
(
BigDecimal
.
valueOf
(
0
));
chDisabAccounts
.
setDeductionAmountTotal
(
BigDecimal
.
valueOf
(
0
));
}
//待审核
if
(
accountsStatus
==
1
)
{
chDisabAccountsDetailMapper
.
updateByAccountsId
(
accountsId
,
1
);
}
}
if
(
accountsStatus
==
3
)
{
// 审核通过
if
(
accountsStatus
==
2
||
accountsStatus
==
3
)
{
chDisabAccountsDetailMapper
.
updateByAccountsId
(
accountsId
,
3
);
}
// 已结算
if
(
accountsStatus
==
4
)
{
ChDisabAccounts
chDisabAccountDTO
=
disabAccountsMapper
.
selectById
(
accountOperVo
.
getAccountsId
());
ChDisabAccounts
chDisabAccountDTO
=
disabAccountsMapper
.
selectById
(
accountOperVo
.
getAccountsId
());
BigDecimal
reissueAmountTotal
=
chDisabAccountDTO
.
getReissueAmountTotal
();
chDisabAccountDTO
.
setTotalAllocatedExpenses
(
chDisabAccountDTO
.
getTotalAllocatedExpenses
());
BigDecimal
deductionAmountTotal
=
chDisabAccountDTO
.
getDeductionAmountTotal
();
chDisabAccountDTO
.
setChooseSettle
((
short
)
1
);
// 是否结算(0未结算,1已结算)
BigDecimal
totalAllocatedExpenses
=
chDisabAccountDTO
.
getAllCost
().
add
(
reissueAmountTotal
).
subtract
(
deductionAmountTotal
);
chDisabAccountDTO
.
setTotalAllocatedExpenses
(
totalAllocatedExpenses
);
disabAccountsMapper
.
updateById
(
chDisabAccountDTO
);
disabAccountsMapper
.
updateById
(
chDisabAccountDTO
);
}
}
accountOperVo
.
setAccountsId
(
chDisabAccounts
.
getAccountsId
());
this
.
saveOrUpdate
(
chDisabAccounts
);
baseAccountService
.
updateAttachs
(
chDisabAccounts
.
getAccountsId
(),
accountOperVo
.
getFileDataList
(),
AttachType
.
SRV_ORGAN_ACCOUNT
);
}
}
@Override
@Override
public
Page
<
SrvOrganListResp
>
searchSrvOrganList
(
SrvOrganListReq
srvOrganListReq
)
{
public
Page
<
SrvOrganListResp
>
searchSrvOrganList
(
SrvOrganListReq
srvOrganListReq
)
{
...
@@ -446,11 +457,13 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -446,11 +457,13 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
@Override
@Override
public
Page
<
ChDisabDetailAccountsResp
>
queryOrganAccountsDetail
(
Integer
pageNum
,
Integer
pageSize
,
S
tring
accountsId
,
Integer
status
)
{
public
Page
<
ChDisabDetailAccountsResp
>
queryOrganAccountsDetail
(
Integer
pageNum
,
Integer
pageSize
,
S
rvOrganListReq
srvOrganListReq
)
{
return
chDisabAccountsDetailMapper
.
queryOrganAccountsDetail
(
new
Page
<>(
pageNum
,
pageSize
),
accountsId
,
status
);
return
chDisabAccountsDetailMapper
.
queryOrganAccountsDetail
(
new
Page
<>(
pageNum
,
pageSize
),
srvOrganListReq
);
}
}
@Override
@Override
public
Page
<
NursingRecordsRespVO
>
queryNursingRecords
(
Integer
pageNum
,
Integer
pageSize
,
String
taskDetailId
)
{
public
Page
<
NursingRecordsRespVO
>
queryNursingRecords
(
Integer
pageNum
,
Integer
pageSize
,
String
taskDetailId
)
{
return
chDisabAccountsDetailMapper
.
queryNursingRecords
(
new
Page
<>(
pageNum
,
pageSize
),
taskDetailId
);
return
chDisabAccountsDetailMapper
.
queryNursingRecords
(
new
Page
<>(
pageNum
,
pageSize
),
taskDetailId
);
...
@@ -462,15 +475,15 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -462,15 +475,15 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
}
}
@Override
@Override
public
Page
<
OverallCostListRespVO
>
queryOverallCostList
(
OverallCostReqVO
req
)
{
public
Page
<
OverallCostListRespVO
>
queryOverallCostList
(
OverallCostReqVO
req
)
{
req
.
setDealType
((
null
==
req
.
getDealType
()||
0
==
req
.
getDealType
())
?
null
:
req
.
getDealType
());
req
.
setDealType
((
null
==
req
.
getDealType
()
||
0
==
req
.
getDealType
())
?
null
:
req
.
getDealType
());
Page
<
OverallCostListRespVO
>
overallCostListRespVOPage
=
chDisabAccountsDetailMapper
.
queryOverallCostList
(
new
Page
<>(
req
.
getPageNum
(),
req
.
getPageSize
()),
req
);
Page
<
OverallCostListRespVO
>
overallCostListRespVOPage
=
chDisabAccountsDetailMapper
.
queryOverallCostList
(
new
Page
<>(
req
.
getPageNum
(),
req
.
getPageSize
()),
req
);
List
<
OverallCostListRespVO
>
records
=
overallCostListRespVOPage
.
getRecords
();
List
<
OverallCostListRespVO
>
records
=
overallCostListRespVOPage
.
getRecords
();
for
(
OverallCostListRespVO
record
:
records
)
{
for
(
OverallCostListRespVO
record
:
records
)
{
int
dealType
=
record
.
getDealType
();
int
dealType
=
record
.
getDealType
();
if
(
dealType
==
1
)
{
if
(
dealType
==
1
)
{
record
.
setAmountOfMoney
(
record
.
getReissueAmount
());
record
.
setAmountOfMoney
(
record
.
getReissueAmount
());
}
else
if
(
dealType
==
2
)
{
}
else
if
(
dealType
==
2
)
{
record
.
setAmountOfMoney
(
record
.
getDeductionAmount
());
record
.
setAmountOfMoney
(
record
.
getDeductionAmount
());
}
}
...
...
account/account-service/src/main/resources/mapper/ChDisabAccountsDetailMapper.xml
View file @
10047a2c
...
@@ -26,17 +26,24 @@ left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID
...
@@ -26,17 +26,24 @@ left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID
left join ch_srv_organ_emp emp on d.emp_id = emp.emp_id
left join ch_srv_organ_emp emp on d.emp_id = emp.emp_id
<where>
<where>
1=1
1=1
<if
test=
"
accountsId != null and
accountsId != ''"
>
<if
test=
"
req.accountsId != null and req.
accountsId != ''"
>
and d.ACCOUNTS_ID = #{accountsId}
and d.ACCOUNTS_ID = #{
req.
accountsId}
</if>
</if>
<if
test=
"
status != null and status == 2
"
>
<if
test=
"
req.accountsStatus != null and req.accountsStatus != ''
"
>
and d.status
in (1,2)
and d.status
= #{req.accountsStatus}
</if>
</if>
<if
test=
"
status == null
"
>
<if
test=
"
req.srvOrganId != null and req.srvOrganId != ''
"
>
and d.
status != 2
and d.
SRV_ORGAN_ID = #{req.srvOrganId}
</if>
</if>
<if
test=
"status != null and status != 2"
>
and d.status = #{status}
<if
test=
"req.accountsTime != null and req.accountsTime != ''"
>
AND to_char(d.ACCOUNTS_TIME,'yyyy-MM') = #{req.accountsTime}
</if>
<if
test=
'req.accountsStatusList != null and req.accountsStatusList.size()>0'
>
AND d.status IN
<foreach
collection=
"req.accountsStatusList"
open=
"("
close=
")"
item=
"accountsStatusList"
separator=
","
>
#{accountsStatusList}
</foreach>
</if>
</if>
</where>
</where>
...
@@ -59,7 +66,7 @@ left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID
...
@@ -59,7 +66,7 @@ left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID
<select
id=
"queryOverallCostList"
resultType=
"com.hungraim.ltc.pojo.entity.account.OverallCostListRespVO"
>
<select
id=
"queryOverallCostList"
resultType=
"com.hungraim.ltc.pojo.entity.account.OverallCostListRespVO"
>
select info.REAL_NAME realName,
select info.REAL_NAME realName,
info.CERTI_CODE certiCode,
info.CERTI_CODE certiCode,
apply.MEDICAL_AREA
medicalArea,
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code)
medicalArea,
detail.ACCOUNTS_DETAIL_ID accountsDetailId,
detail.ACCOUNTS_DETAIL_ID accountsDetailId,
detail.ACCOUNTS_START_TIME svrStartTime,
detail.ACCOUNTS_START_TIME svrStartTime,
detail.ACCOUNTS_END_TIME svrEndTime,
detail.ACCOUNTS_END_TIME svrEndTime,
...
@@ -271,7 +278,21 @@ left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID
...
@@ -271,7 +278,21 @@ left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID
<update
id=
"updateByAccountsId"
>
<update
id=
"updateByAccountsId"
>
update CH_DISAB_ACCOUNTS_DETAIL d set d.status = 3 where d.ACCOUNTS_ID = #{accountsId}
update CH_DISAB_ACCOUNTS_DETAIL d
<set>
<if
test=
"accountsStatus == 0"
>
d.status = #{accountsStatus},
d.REISSUE_AMOUNT = 0,
d.DEDUCTION_AMOUNT = 0
</if>
<if
test=
"accountsStatus == 1"
>
d.status = #{accountsStatus}
</if>
<if
test=
"accountsStatus == 3"
>
d.status = #{accountsStatus}
</if>
</set>
where d.ACCOUNTS_ID = #{accountsId}
</update>
</update>
</mapper>
</mapper>
...
...
account/account-service/src/main/resources/mapper/ChDisabAccountsMapper.xml
View file @
10047a2c
...
@@ -62,12 +62,18 @@
...
@@ -62,12 +62,18 @@
<if
test=
'req.srvOrganId != null'
>
<if
test=
'req.srvOrganId != null'
>
AND t2.SRV_ORGAN_ID = #{req.srvOrganId}
AND t2.SRV_ORGAN_ID = #{req.srvOrganId}
</if>
</if>
<if
test=
'req.accountsTime != null'
>
<if
test=
"req.accountsTime != null and req.accountsTime != ''"
>
AND t
1.ACCOUNTS_TIME
= #{req.accountsTime}
AND t
o_char(t1.ACCOUNTS_TIME,'yyyy-MM')
= #{req.accountsTime}
</if>
</if>
<if
test=
"req.accountsStatus != null and req.accountsStatus != ''"
>
<if
test=
"req.accountsStatus != null and req.accountsStatus != ''"
>
and t1.ACCOUNTS_STATUS = #{req.accountsStatus}
and t1.ACCOUNTS_STATUS = #{req.accountsStatus}
</if>
</if>
<if
test=
'req.accountsStatusList != null and req.accountsStatusList.size()>0'
>
AND t1.ACCOUNTS_STATUS IN
<foreach
collection=
"req.accountsStatusList"
open=
"("
close=
")"
item=
"accountsStatusList"
separator=
","
>
#{accountsStatusList}
</foreach>
</if>
</where>
</where>
</select>
</select>
...
...
account/account-service/src/main/resources/mapper/ChSrvTaskDetailMapper.xml
View file @
10047a2c
...
@@ -27,6 +27,9 @@
...
@@ -27,6 +27,9 @@
<if
test=
"req.srvOrganName != null and req.srvOrganName != ''"
>
<if
test=
"req.srvOrganName != null and req.srvOrganName != ''"
>
AND organ.SRV_ORGAN_NAME LIKE CONCAT('%',CONCAT(#{req.srvOrganName},'%'))
AND organ.SRV_ORGAN_NAME LIKE CONCAT('%',CONCAT(#{req.srvOrganName},'%'))
</if>
</if>
<if
test=
"req.srvDate != null and req.srvDate != ''"
>
AND to_char(plan.SRV_PLAN_TIME,'yyyy-MM-dd') = #{req.srvDate}
</if>
</where>
</where>
</select>
</select>
...
...
apply/apply-service/src/main/java/com/hungraim/ltc/controller/DisableController.java
View file @
10047a2c
...
@@ -17,8 +17,6 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -17,8 +17,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -329,7 +327,8 @@ public class DisableController {
...
@@ -329,7 +327,8 @@ public class DisableController {
* 新增失能申请
* 新增失能申请
*/
*/
@RequestMapping
(
"/addDisable"
)
@RequestMapping
(
"/addDisable"
)
public
Result
addDisable
(
ChDisableApply
chDisableApply
)
{
public
Result
addDisable
(
@RequestHeader
(
"Authorization"
)
String
token
,
ChDisableApply
chDisableApply
)
{
long
srvOrganId
=
TokenParsingUtil
.
TokenParsing
(
token
,
"srvOrganId"
);
//字段校验
//字段校验
//所在省市区
//所在省市区
if
(
StringUtils
.
isBlank
(
chDisableApply
.
getDistrictProvincial
())
||
StringUtils
.
isBlank
(
chDisableApply
.
getDistrictCity
())
||
StringUtils
.
isBlank
(
chDisableApply
.
getDistrictArea
()))
{
if
(
StringUtils
.
isBlank
(
chDisableApply
.
getDistrictProvincial
())
||
StringUtils
.
isBlank
(
chDisableApply
.
getDistrictCity
())
||
StringUtils
.
isBlank
(
chDisableApply
.
getDistrictArea
()))
{
...
@@ -482,4 +481,42 @@ public class DisableController {
...
@@ -482,4 +481,42 @@ public class DisableController {
DisableUpdateDetailVO
disableUpdateDetailVO
=
disableService
.
changeDisableDetail
(
changeId
);
DisableUpdateDetailVO
disableUpdateDetailVO
=
disableService
.
changeDisableDetail
(
changeId
);
return
Result
.
success
(
disableUpdateDetailVO
);
return
Result
.
success
(
disableUpdateDetailVO
);
}
}
/**
* 失能人员信息列表
*
* @param pageNum 当前页
* @param pageSize 每页几条数据
* @return 失能人员信息列表
*/
@RequestMapping
(
"/disableInfoList"
)
public
Result
<
Page
<
DisableInfoListVo
>>
disableInfoList
(
Integer
pageNum
,
Integer
pageSize
,
Long
srvOrganId
,
String
certiCode
,
String
realName
,
String
svrModelId
)
{
if
(
pageNum
==
null
||
pageNum
<
1
||
srvOrganId
==
null
||
srvOrganId
==
0
)
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
if
(
pageSize
==
null
||
pageSize
<
1
)
{
pageSize
=
10
;
}
Page
<
DisableInfoListVo
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
page
=
disableService
.
getDisableInfoList
(
page
,
srvOrganId
,
certiCode
,
realName
,
svrModelId
);
return
Result
.
success
(
page
);
}
@RequestMapping
(
"/disableInfoExit"
)
public
Result
disableInfoExit
(
Integer
disableInfoId
,
Integer
exitReasonId
,
Integer
applyId
,
Integer
srvOrganId
,
Integer
programId
,
String
exitTime
)
{
if
(
disableInfoId
==
null
||
exitReasonId
==
null
||
applyId
==
null
)
{
return
Result
.
failed
(
ResultCode
.
REQUEST_PARAM_ERROR
);
}
int
i
=
disableService
.
disableInfoExit
(
disableInfoId
,
exitReasonId
,
applyId
,
srvOrganId
,
programId
,
exitTime
);
if
(
i
>
0
)
{
return
Result
.
success
();
}
else
{
return
Result
.
failed
();
}
}
}
}
apply/apply-service/src/main/java/com/hungraim/ltc/dao/DisableInfoMapper.java
View file @
10047a2c
package
com
.
hungraim
.
ltc
.
dao
;
package
com
.
hungraim
.
ltc
.
dao
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.pojo.entity.disable.ChDisableInfo
;
import
com.hungraim.ltc.pojo.entity.disable.ChDisableInfo
;
import
com.hungraim.ltc.pojo.vo.disable.DisableInfoListVo
;
import
com.hungraim.ltc.pojo.vo.governance.ProgramListVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
/**
/**
...
@@ -13,4 +17,16 @@ import org.springframework.stereotype.Repository;
...
@@ -13,4 +17,16 @@ import org.springframework.stereotype.Repository;
@Mapper
@Mapper
@Repository
@Repository
public
interface
DisableInfoMapper
extends
BaseMapper
<
ChDisableInfo
>
{
public
interface
DisableInfoMapper
extends
BaseMapper
<
ChDisableInfo
>
{
/**
* 列表查询
*
* @param page 分页参数
* @param srvOrganId 服务机构id
* @return 返回列表
*/
Page
<
DisableInfoListVo
>
getDisableInfoList
(
Page
<
DisableInfoListVo
>
page
,
@Param
(
"srvOrganId"
)
Long
srvOrganId
,
String
certiCode
,
String
realName
,
String
svrModelId
);
int
deleteSrvSend
(
Integer
disableInfoId
,
String
exitTime
);
}
}
apply/apply-service/src/main/java/com/hungraim/ltc/service/DisableService.java
View file @
10047a2c
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.pojo.entity.disable.*
;
import
com.hungraim.ltc.pojo.entity.disable.*
;
import
com.hungraim.ltc.pojo.vo.disable.*
;
import
com.hungraim.ltc.pojo.vo.disable.*
;
import
com.hungraim.ltc.pojo.vo.governance.ProgramListVo
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.Result
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -145,6 +146,17 @@ public interface DisableService {
...
@@ -145,6 +146,17 @@ public interface DisableService {
*/
*/
DisableUpdateDetailVO
changeDisableDetail
(
Integer
changeId
);
DisableUpdateDetailVO
changeDisableDetail
(
Integer
changeId
);
/**
* 个人照护方案列表查询
*
* @param page 分页参数
* @param srvOrganId 服务机构id
* @return 返回个人照护方案列表
*/
Page
<
DisableInfoListVo
>
getDisableInfoList
(
Page
<
DisableInfoListVo
>
page
,
Long
srvOrganId
,
String
certiCode
,
String
realName
,
String
svrModelId
);
/**
/**
*@author zwl
*@author zwl
* @param organId
* @param organId
...
@@ -160,4 +172,8 @@ public interface DisableService {
...
@@ -160,4 +172,8 @@ public interface DisableService {
Workbook
disableDownload
(
String
organId
,
String
districtProvincial
,
String
districtCity
,
Workbook
disableDownload
(
String
organId
,
String
districtProvincial
,
String
districtCity
,
String
districtArea
,
String
realName
,
String
certiCode
,
String
dataFrom
,
String
districtArea
,
String
realName
,
String
certiCode
,
String
dataFrom
,
Integer
applyMethod
);
Integer
applyMethod
);
int
disableInfoExit
(
Integer
disableInfoId
,
Integer
exitReasonId
,
Integer
applyId
,
Integer
srvOrganId
,
Integer
programId
,
String
exitTime
);
}
}
apply/apply-service/src/main/java/com/hungraim/ltc/service/impl/DisableServiceImpl.java
View file @
10047a2c
...
@@ -19,10 +19,12 @@ import com.hungraim.ltc.pojo.entity.riskLevel.ChDisableRiskLevel;
...
@@ -19,10 +19,12 @@ import com.hungraim.ltc.pojo.entity.riskLevel.ChDisableRiskLevel;
import
com.hungraim.ltc.pojo.entity.riskLevel.ChSrvorganRiskLevel
;
import
com.hungraim.ltc.pojo.entity.riskLevel.ChSrvorganRiskLevel
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChCfgPara
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChCfgPara
;
import
com.hungraim.ltc.pojo.vo.disable.*
;
import
com.hungraim.ltc.pojo.vo.disable.*
;
import
com.hungraim.ltc.pojo.vo.governance.ProgramListVo
;
import
com.hungraim.ltc.pojo.vo.system.AttachUpdateVo
;
import
com.hungraim.ltc.pojo.vo.system.AttachUpdateVo
;
import
com.hungraim.ltc.service.DisableService
;
import
com.hungraim.ltc.service.DisableService
;
import
com.hungraim.ltc.service.OrganService
;
import
com.hungraim.ltc.service.OrganService
;
import
com.hungraim.ltc.util.AttachType
;
import
com.hungraim.ltc.util.AttachType
;
import
com.hungraim.ltc.util.DateUtils
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.Result
;
import
com.hungraim.ltc.util.ResultCode
;
import
com.hungraim.ltc.util.ResultCode
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
...
@@ -411,7 +413,7 @@ public class DisableServiceImpl implements DisableService {
...
@@ -411,7 +413,7 @@ public class DisableServiceImpl implements DisableService {
}
}
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Result
addOrUpdateDisInfoChange
(
DisableUpdateDetailVO
disableUpdateDetailVO
)
{
public
Result
addOrUpdateDisInfoChange
(
DisableUpdateDetailVO
disableUpdateDetailVO
)
{
// 添加或修改记录
// 添加或修改记录
Integer
changeId
=
disableUpdateDetailVO
.
getChangeId
();
Integer
changeId
=
disableUpdateDetailVO
.
getChangeId
();
...
@@ -533,6 +535,11 @@ public class DisableServiceImpl implements DisableService {
...
@@ -533,6 +535,11 @@ public class DisableServiceImpl implements DisableService {
return
disableUpdateDetailVO
;
return
disableUpdateDetailVO
;
}
}
@Override
public
Page
<
DisableInfoListVo
>
getDisableInfoList
(
Page
<
DisableInfoListVo
>
page
,
Long
srvOrganId
,
String
certiCode
,
String
realName
,
String
svrModelId
)
{
return
disableInfoMapper
.
getDisableInfoList
(
page
,
srvOrganId
,
certiCode
,
realName
,
svrModelId
);
}
@Override
@Override
public
Workbook
disableDownload
(
String
organId
,
String
districtProvincial
,
String
districtCity
,
public
Workbook
disableDownload
(
String
organId
,
String
districtProvincial
,
String
districtCity
,
...
@@ -561,4 +568,36 @@ public class DisableServiceImpl implements DisableService {
...
@@ -561,4 +568,36 @@ public class DisableServiceImpl implements DisableService {
return
workbook
;
return
workbook
;
}
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
int
disableInfoExit
(
Integer
disableInfoId
,
Integer
exitReasonId
,
Integer
applyId
,
Integer
srvOrganId
,
Integer
programId
,
String
exitTime
)
{
ChDisableApply
chDisableApply
=
new
ChDisableApply
();
Date
date
=
DateUtils
.
strToDate
(
exitTime
);
chDisableApply
.
setApplyId
(
Long
.
valueOf
(
applyId
));
chDisableApply
.
setExitFlag
(
1
);
chDisableApply
.
setExitReasonId
(
exitReasonId
);
chDisableApply
.
setExitSrvOrganId
(
srvOrganId
);
chDisableApply
.
setExitTime
(
date
);
disableApplyMapper
.
updateById
(
chDisableApply
);
ChDisableInfo
chDisableInfo
=
new
ChDisableInfo
();
chDisableInfo
.
setDisabInfoId
(
disableInfoId
);
chDisableInfo
.
setExitFlag
(
1
);
chDisableInfo
.
setExitTime
(
date
);
chDisableInfo
.
setExitReasonId
(
exitReasonId
);
chDisableInfo
.
setExitSrvOrganId
(
srvOrganId
);
int
result
=
disableInfoMapper
.
updateById
(
chDisableInfo
);
if
(
exitReasonId
==
3
||
exitReasonId
==
4
||
exitReasonId
==
5
||
exitReasonId
==
6
||
exitReasonId
==
7
){
// 解除护理机构分配
// delete from CH_SRV_SEND where DISAB_INFO_ID = '327'
disableInfoMapper
.
deleteSrvSend
(
disableInfoId
,
exitTime
);
}
return
result
;
}
}
}
apply/apply-service/src/main/resources/mapper/DisableInfoMapper.xml
0 → 100644
View file @
10047a2c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.hungraim.ltc.dao.DisableInfoMapper"
>
<select
id=
"getDisableInfoList"
resultType=
"com.hungraim.ltc.pojo.vo.disable.DisableInfoListVo"
>
SELECT T1.PROGRAM_ID programId,
T1.SRV_ORGAN_ID srvOrganId,
T1.DISAB_INFO_ID disabInfoId,
T5.DISTRICT_PROVINCIAL districtProvincial,
T5.DISTRICT_CITY districtCity,
T2.REAL_NAME realName,
T2.TEL realTel,
T2.BIRTHDAY birthday,
T2.GENDER gender,
T2.ACPT_PROVINCIAL acptProvincial,
T2.ACPT_CITY acptCity,
T2.ACPT_AREA acptArea,
T2.ACPT_STREET acptStreet,
T2.ACPT_ADDRESS acptAddress,
T6.DISABLE_LEVEL_NAME realLevel,
T4.FINISH_TIME assessDate,
T7.MODE_NAME svrModelName,
T5.SRV_ORGAN_NAME svrOrganName,
T1.PROG_STATUS progStatus,
T1.EFF_TIME effTime,
T2.CERTI_CODE certiCode,
T2.APPLY_ID applyId,
to_char(T2.EXIT_TIME,'yyyy-MM-dd') exitTime,
--服务方案起始日
--服务方案终止日
to_char(T1.PROGRAM_DATE,'yyyy-MM-dd HH:mm:ss') programDate,
to_char(T1.PROGRAM_EDN_DATE,'yyyy-MM-dd HH:mm:ss') programEdnDate,
T2.EXIT_FLAG exitFlag,
T2.EXIT_REASON_ID exitReasonId
FROM CH_DISABLE_INFO T2
INNER JOIN CH_SRV_PROGRAM T1 ON T1.DISAB_INFO_ID = T2.DISAB_INFO_ID
LEFT JOIN CH_CFG_SRV_MODE T7 ON T2.SRV_MODE_ID = T7.MODE_ID
LEFT JOIN CH_APR_REPORT T3 ON T2.LAST_TASK_ID = T3.TASK_ID
LEFT JOIN CH_CFG_SRV_DISABLE_LEVEL T6 ON T3.DISABLE_LEVEL_ID = T6.DISABLE_LEVEL_ID
LEFT JOIN CH_APR_TASK T4 ON T3.TASK_ID = T4.TASK_ID
LEFT JOIN CH_SRV_ORGAN T5 ON T1.SRV_ORGAN_ID = T5.SRV_ORGAN_ID
WHERE
T1.SRV_ORGAN_ID = #{srvOrganId}
<if
test=
"certiCode != null and certiCode != ''"
>
and T2.CERTI_CODE = #{certiCode}
</if>
<if
test=
"realName != null and realName != ''"
>
and T2.real_name = #{realName}
</if>
<if
test=
"svrModelId != null and svrModelId != ''"
>
and T7.MODE_ID = #{svrModelId}
</if>
</select>
<update
id=
"updateChSrvProgram"
>
update CH_SRV_PROGRAM t set t.PROG_STATUS ='2' ,t.END_TIME =sysdate
where t.PROGRAM_ID =#{programId}
</update>
<delete
id=
"deleteSrvSend"
>
delete from CH_SRV_SEND where DISAB_INFO_ID = #{disableInfoId}
</delete>
</mapper>
\ No newline at end of file
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/disable/ChDisableApply.java
View file @
10047a2c
...
@@ -626,6 +626,14 @@ public class ChDisableApply extends PageInfo implements Serializable {
...
@@ -626,6 +626,14 @@ public class ChDisableApply extends PageInfo implements Serializable {
*/
*/
private
String
medicalArea
;
private
String
medicalArea
;
private
Integer
exitFlag
;
private
Integer
exitReasonId
;
private
Integer
exitSrvOrganId
;
private
Date
exitTime
;
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
ChFndAttach
>
fileDataList
;
private
List
<
ChFndAttach
>
fileDataList
;
...
...
common/common-core/src/main/java/com/hungraim/ltc/pojo/entity/disable/ChDisableInfo.java
View file @
10047a2c
...
@@ -8,6 +8,7 @@ import com.hungraim.ltc.pojo.entity.PageInfo;
...
@@ -8,6 +8,7 @@ import com.hungraim.ltc.pojo.entity.PageInfo;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
@Data
@Data
@TableName
(
"CH_DISABLE_INFO"
)
@TableName
(
"CH_DISABLE_INFO"
)
...
@@ -128,4 +129,9 @@ public class ChDisableInfo extends PageInfo implements Serializable {
...
@@ -128,4 +129,9 @@ public class ChDisableInfo extends PageInfo implements Serializable {
private
Integer
applyStatus
;
private
Integer
applyStatus
;
private
String
tel
;
private
String
tel
;
private
String
acptSrvArea
;
private
String
acptSrvArea
;
private
Integer
exitFlag
;
private
Integer
exitReasonId
;
private
Integer
exitSrvOrganId
;
private
java
.
util
.
Date
exitTime
;
}
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/account/SrvOrganListReq.java
View file @
10047a2c
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
account
;
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
account
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.hungraim.ltc.pojo.vo.BaseReq
;
import
com.hungraim.ltc.pojo.vo.BaseReq
;
import
lombok.Data
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.
Date
;
import
java.util.
List
;
@Data
@Data
public
class
SrvOrganListReq
extends
BaseReq
{
public
class
SrvOrganListReq
extends
BaseReq
{
...
@@ -35,10 +33,12 @@ public class SrvOrganListReq extends BaseReq {
...
@@ -35,10 +33,12 @@ public class SrvOrganListReq extends BaseReq {
/**
/**
* 结算月份
* 结算月份
*/
*/
@DateTimeFormat
(
pattern
=
"yyyy-MM"
)
private
String
accountsTime
;
@JsonFormat
(
pattern
=
"yyyy-MM"
,
timezone
=
"GMT+8"
)
private
Date
accountsTime
;
private
String
accountsStatus
;
private
String
accountsStatus
;
private
String
accountsId
;
private
List
<
String
>
accountsStatusList
;
}
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/disable/DisableInfoListVo.java
0 → 100644
View file @
10047a2c
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
disable
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
java.util.Date
;
/**
* 列表页回显对象
*/
@Data
public
class
DisableInfoListVo
{
/**
* 服务分配ID
*/
private
Long
programId
;
/**
* 服务机构id
*/
private
Long
srvOrganId
;
/**
* 失能人员id
*/
private
Long
disabInfoId
;
/**
* 机构所在省
*/
private
String
districtProvincial
;
/**
* 机构所在市
*/
private
String
districtCity
;
/**
* 失能人员姓名
*/
private
String
realName
;
/**
* 失能人员手机号
*/
private
String
realTel
;
/**
* 失能人员生日
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
birthday
;
/**
* 失能人员性别
*/
private
String
gender
;
/**
* 接收服务省市区
*/
private
String
acptProvincial
;
private
String
acptCity
;
private
String
acptArea
;
private
String
acptStreet
;
private
String
acptAddress
;
/**
* 失能等级
*/
private
String
realLevel
;
/**
* 评定完成日期
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
assessDate
;
/**
* 服务方式
*/
private
String
svrModelName
;
/**
* 护理机构名称
*/
private
String
svrOrganName
;
private
String
certiCode
;
/**
* 方案开始时间
*/
private
String
programDate
;
/**
* 方案结束时间
*/
private
String
programEdnDate
;
/**
* 服务方案状态 0:未生效、1:已生效、2:已终止
*/
private
Integer
progStatus
;
/**
* 创建时间(服务方案制定时间)
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
effTime
;
private
Integer
exitFlag
;
private
Integer
exitReasonId
;
private
Integer
applyId
;
private
String
exitTime
;
}
common/common-core/src/main/java/com/hungraim/ltc/pojo/vo/governance/AllocationSrvTaskVO.java
0 → 100644
View file @
10047a2c
package
com
.
hungraim
.
ltc
.
pojo
.
vo
.
governance
;
import
lombok.Data
;
/**
* @author zwl
**/
@Data
public
class
AllocationSrvTaskVO
{
private
String
exitFlag
;
private
String
exitReasonId
;
private
String
exitTime
;
private
String
srvDate
;
private
Long
srvTaskId
;
}
governance/src/main/java/com/hungraim/ltc/governance/controller/SrvTaskController.java
View file @
10047a2c
...
@@ -144,4 +144,12 @@ public class SrvTaskController {
...
@@ -144,4 +144,12 @@ public class SrvTaskController {
srvTaskService
.
otherPlaceHandler
(
programId
);
srvTaskService
.
otherPlaceHandler
(
programId
);
}
}
/**
* 根据计划开始时间每天执行当天计划
**/
@GetMapping
(
"timeAllocationSrvTask"
)
public
void
timeAllocationSrvTask
()
{
srvTaskService
.
timeAllocationSrvTask
();
}
}
}
governance/src/main/java/com/hungraim/ltc/governance/dao/ChSrvTaskDetailMapper.java
View file @
10047a2c
...
@@ -8,4 +8,5 @@ import org.springframework.stereotype.Repository;
...
@@ -8,4 +8,5 @@ import org.springframework.stereotype.Repository;
@Mapper
@Mapper
@Repository
@Repository
public
interface
ChSrvTaskDetailMapper
extends
BaseMapper
<
ChSrvTaskDetail
>
{
public
interface
ChSrvTaskDetailMapper
extends
BaseMapper
<
ChSrvTaskDetail
>
{
int
getSrvTaskDetail
(
String
srvTaskId
,
String
srvDate
);
}
}
\ No newline at end of file
governance/src/main/java/com/hungraim/ltc/governance/dao/SrvTaskMapper.java
View file @
10047a2c
...
@@ -3,10 +3,7 @@ package com.hungraim.ltc.governance.dao;
...
@@ -3,10 +3,7 @@ package com.hungraim.ltc.governance.dao;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTask
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTask
;
import
com.hungraim.ltc.pojo.vo.governance.OrganEmpVO
;
import
com.hungraim.ltc.pojo.vo.governance.*
;
import
com.hungraim.ltc.pojo.vo.governance.SrvTaskDetailVO
;
import
com.hungraim.ltc.pojo.vo.governance.SrvTaskInfoVO
;
import
com.hungraim.ltc.pojo.vo.governance.SrvTaskVO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
...
@@ -26,4 +23,6 @@ public interface SrvTaskMapper extends BaseMapper<ChSrvTask> {
...
@@ -26,4 +23,6 @@ public interface SrvTaskMapper extends BaseMapper<ChSrvTask> {
Page
<
OrganEmpVO
>
getSrvOrganEmpList
(
Page
<
OrganEmpVO
>
page
,
String
organId
,
String
name
,
String
certiType
,
String
certifNum
);
Page
<
OrganEmpVO
>
getSrvOrganEmpList
(
Page
<
OrganEmpVO
>
page
,
String
organId
,
String
name
,
String
certiType
,
String
certifNum
);
List
<
AllocationSrvTaskVO
>
getAllocationSrvTask
();
}
}
governance/src/main/java/com/hungraim/ltc/governance/service/SrvTaskService.java
View file @
10047a2c
...
@@ -32,4 +32,7 @@ public interface SrvTaskService {
...
@@ -32,4 +32,7 @@ public interface SrvTaskService {
*/
*/
void
addOrUpdateSrvTask
(
SrvTaskInfoListVO
param
);
void
addOrUpdateSrvTask
(
SrvTaskInfoListVO
param
);
void
timeAllocationSrvTask
();
}
}
governance/src/main/java/com/hungraim/ltc/governance/service/impl/SrvTaskServiceImpl.java
View file @
10047a2c
package
com
.
hungraim
.
ltc
.
governance
.
service
.
impl
;
package
com
.
hungraim
.
ltc
.
governance
.
service
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
@@ -15,6 +17,7 @@ import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
...
@@ -15,6 +17,7 @@ import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import
com.hungraim.ltc.pojo.entity.governance.ChSrvPlan
;
import
com.hungraim.ltc.pojo.entity.governance.ChSrvPlan
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTask
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTask
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskFinishItem
;
import
com.hungraim.ltc.pojo.vo.governance.*
;
import
com.hungraim.ltc.pojo.vo.governance.*
;
import
com.hungraim.ltc.pojo.vo.system.AttachUpdateVo
;
import
com.hungraim.ltc.pojo.vo.system.AttachUpdateVo
;
import
com.hungraim.ltc.util.AttachType
;
import
com.hungraim.ltc.util.AttachType
;
...
@@ -202,4 +205,24 @@ public class SrvTaskServiceImpl implements SrvTaskService {
...
@@ -202,4 +205,24 @@ public class SrvTaskServiceImpl implements SrvTaskService {
return
srvTaskMapper
.
getSrvOrganEmpList
(
page
,
organId
,
name
,
certiType
,
certifNum
);
return
srvTaskMapper
.
getSrvOrganEmpList
(
page
,
organId
,
name
,
certiType
,
certifNum
);
}
}
@Override
public
void
timeAllocationSrvTask
()
{
// 查询需要执行的计划
List
<
AllocationSrvTaskVO
>
chSrvTasks
=
srvTaskMapper
.
getAllocationSrvTask
();
// 生成计划任务 CH_SRV_TASK_DETAIL
for
(
AllocationSrvTaskVO
chSrvTask
:
chSrvTasks
)
{
Long
srvTaskId
=
chSrvTask
.
getSrvTaskId
();
// 根据任务id和服务时间查询是否已经生成过计划,已经生成了就不需要再生成了
List
<
ChSrvTaskDetail
>
chSrvTaskDetailList
=
chSrvTaskDetailMapper
.
selectList
(
new
QueryWrapper
<
ChSrvTaskDetail
>().
eq
(
"srv_task_id"
,
srvTaskId
));
if
(
CollectionUtil
.
isNotEmpty
(
chSrvTaskDetailList
)){
}
ChSrvTaskDetail
chSrvTaskDetail
=
new
ChSrvTaskDetail
();
chSrvTaskDetail
.
setSrvTaskId
(
srvTaskId
);
//taskId
chSrvTaskDetail
.
setSrvDate
(
new
Date
());
//服务开始时间
chSrvTaskDetail
.
setStatus
((
short
)
0
);
//状态 未执行:0;执行中:1;已执行:2;已失效:3已完成4
chSrvTaskDetailMapper
.
insert
(
chSrvTaskDetail
);
}
}
}
}
governance/src/main/resources/com/hungraim/ltc/governance/mapper/ChSrvTaskDetailMapper.xml
View file @
10047a2c
...
@@ -56,4 +56,8 @@
...
@@ -56,4 +56,8 @@
AUDIT_RESULT, AUDIT_REMARK, AUDIT_DATE, ILLEGAL_TYPE, ILLEGAL_REMARK, ILLEGALRE_EMP,
AUDIT_RESULT, AUDIT_REMARK, AUDIT_DATE, ILLEGAL_TYPE, ILLEGAL_REMARK, ILLEGALRE_EMP,
ILLEGALRE_NAME, ILLEGALRE_TIME, ACCOUNT_SIGN, TASK_DETAIL_TYPE
ILLEGALRE_NAME, ILLEGALRE_TIME, ACCOUNT_SIGN, TASK_DETAIL_TYPE
</sql>
</sql>
<select
id=
"getSrvTaskDetail"
>
select count(*) from CH_SRV_TASK_DETAIL t where t.SRV_TASK_ID = #{srvTaskId} and to_char(t.SRV_DATE) = #{srvDate}
</select>
</mapper>
</mapper>
\ No newline at end of file
governance/src/main/resources/com/hungraim/ltc/governance/mapper/SrvTaskMapper.xml
View file @
10047a2c
...
@@ -213,5 +213,10 @@
...
@@ -213,5 +213,10 @@
</if>
</if>
</where>
</where>
</select>
</select>
<select
id=
"getAllocationSrvTask"
resultType=
"com.hungraim.ltc.pojo.vo.governance.AllocationSrvTaskVO"
>
select t.SRV_TASK_ID,t.SRV_DATE,sysdate,info.EXIT_TIME,info.EXIT_FLAG,info.EXIT_REASON_ID from CH_SRV_TASK t
left join CH_DISABLE_INFO info on t.DISAB_INFO_ID = info.DISAB_INFO_ID
where t.STATUS =1 and info.DISAB_INFO_ID = '327' and sysdate > t.SRV_DATE
</select>
</mapper>
</mapper>
\ No newline at end of file
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