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
85ba2939
Commit
85ba2939
authored
Mar 29, 2023
by
zhangwanglin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
异地费用
parent
2abf5d7b
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
148 additions
and
47 deletions
+148
-47
ChSrvTaskDetailMapper.java
...a/com/hungraim/ltc/account/dao/ChSrvTaskDetailMapper.java
+4
-0
AccountService.java
...java/com/hungraim/ltc/account/service/AccountService.java
+1
-0
AccountServiceImpl.java
...hungraim/ltc/account/service/impl/AccountServiceImpl.java
+35
-29
ChSrvTaskDetailMapper.xml
...rvice/src/main/resources/mapper/ChSrvTaskDetailMapper.xml
+28
-0
DisableController.java
...n/java/com/hungraim/ltc/controller/DisableController.java
+6
-0
DisableInfoMapper.java
...src/main/java/com/hungraim/ltc/dao/DisableInfoMapper.java
+3
-2
DisableService.java
...rc/main/java/com/hungraim/ltc/service/DisableService.java
+2
-0
DisableServiceImpl.java
...ava/com/hungraim/ltc/service/impl/DisableServiceImpl.java
+35
-13
DisableInfoMapper.xml
...y-service/src/main/resources/mapper/DisableInfoMapper.xml
+34
-3
No files found.
account/account-service/src/main/java/com/hungraim/ltc/account/dao/ChSrvTaskDetailMapper.java
View file @
85ba2939
...
@@ -27,4 +27,7 @@ public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> {
...
@@ -27,4 +27,7 @@ public interface ChSrvTaskDetailMapper extends BaseMapper<ChSrvTaskDetail> {
Page
<
PlaceOtherVO
>
placeOtherQuery
(
Page
page
,
String
name
,
String
certiCode
);
Page
<
PlaceOtherVO
>
placeOtherQuery
(
Page
page
,
String
name
,
String
certiCode
);
List
<
PlaceOtherVO
>
placeOtherTaskQuery
();
}
}
\ No newline at end of file
account/account-service/src/main/java/com/hungraim/ltc/account/service/AccountService.java
View file @
85ba2939
...
@@ -66,4 +66,5 @@ public interface AccountService extends IService<ChDisabAccounts> {
...
@@ -66,4 +66,5 @@ public interface AccountService extends IService<ChDisabAccounts> {
Page
<
PlaceOtherVO
>
placeOtherQuery
(
Page
page
,
String
name
,
String
certiCode
);
Page
<
PlaceOtherVO
>
placeOtherQuery
(
Page
page
,
String
name
,
String
certiCode
);
void
placeOtherTaskQuery
();
}
}
account/account-service/src/main/java/com/hungraim/ltc/account/service/impl/AccountServiceImpl.java
View file @
85ba2939
...
@@ -697,31 +697,6 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -697,31 +697,6 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
@Override
@Override
public
void
otherPlaceHandler
(
String
programId
){
public
void
otherPlaceHandler
(
String
programId
){
/* List<OrganAccountsVO> accountsList = chDisabAccountsDetailMapper.getOtherPlaceList(programId);
for (OrganAccountsVO accountsVO : accountsList) {
ChDisabDetailAccounts chDisabDetailAccounts = new ChDisabDetailAccounts();
chDisabDetailAccounts.setSrvOrganId(accountsVO.getSrvOrganId());
// 异地
BigDecimal limit = BigDecimal.valueOf(20);
BigDecimal zero = BigDecimal.valueOf(0);
chDisabDetailAccounts.setAccountsAllCost(limit);
chDisabDetailAccounts.setAccountsPersonalCost(zero);
chDisabDetailAccounts.setAccountsOverallCost(zero);
chDisabDetailAccounts.setReissueAmount(zero);
chDisabDetailAccounts.setDeductionAmount(zero);
chDisabDetailAccounts.setStatus((short)0);
chDisabDetailAccounts.setModeName(accountsVO.getSrvModeName());
chDisabDetailAccounts.setCreationTime(new Date());
chDisabDetailAccounts.setAccountsTime(DateUtils.strToDate(accountsVO.getSrvDate()));
chDisabDetailAccounts.setAccountsStartTime(DateUtils.getFirstDayOfMonth(DateUtils.strToDate(accountsVO.getSrvDate())));
chDisabDetailAccounts.setAccountsEndTime(DateUtils.getlastDayOfMonth(DateUtils.strToDate(accountsVO.getSrvDate())));
chDisabDetailAccounts.setTaskDetailId(accountsVO.getTaskDetailId());
chDisabDetailAccounts.setMedicalArea(accountsVO.getMedicalArea());
chDisabDetailAccounts.setDisabInfoId(accountsVO.getDisabInfoId());
ChDisabAccounts chDisabAccounts = getChDisabAccounts1(accountsVO);
chDisabDetailAccounts.setAccountsId(chDisabAccounts.getAccountsId());
chDisabAccountsDetailMapper.insert(chDisabDetailAccounts);
}*/
}
}
@Override
@Override
...
@@ -901,10 +876,20 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -901,10 +876,20 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
@Override
@Override
public
int
placeOtherApply
(
Integer
disabInfoId
,
String
otherApplyTime
)
{
public
int
placeOtherApply
(
Integer
disabInfoId
,
String
otherApplyTime
)
{
int
result
=
taskDetailMapper
.
placeOtherApply
(
disabInfoId
,
otherApplyTime
);
int
result
=
taskDetailMapper
.
placeOtherApply
(
disabInfoId
,
otherApplyTime
);
Date
date
=
DateUtils
.
strToDate
(
otherApplyTime
);
boolean
now
=
DateUtils
.
isNow
(
date
);
if
(
now
)
{
placeFreeHandler
(
disabInfoId
,
otherApplyTime
);
}
return
result
;
}
private
void
placeFreeHandler
(
Integer
disabInfoId
,
String
otherApplyTime
)
{
BigDecimal
limit
=
BigDecimal
.
valueOf
(
20
);
BigDecimal
limit
=
BigDecimal
.
valueOf
(
20
);
BigDecimal
zero
=
BigDecimal
.
valueOf
(
0
);
BigDecimal
zero
=
BigDecimal
.
valueOf
(
0
);
ChDisabDetailAccounts
chDisabDetailAccountsDTO
=
chDisabAccountsDetailMapper
.
queryDisabDetailAccounts
(
"471"
,
otherApplyTime
,
String
.
valueOf
(
disabInfoId
),
"异地"
);
ChDisabDetailAccounts
chDisabDetailAccountsDTO
=
chDisabAccountsDetailMapper
.
queryDisabDetailAccounts
(
"471"
,
otherApplyTime
,
String
.
valueOf
(
disabInfoId
),
"异地"
);
if
(
Objects
.
isNull
(
chDisabDetailAccountsDTO
))
{
if
(
Objects
.
isNull
(
chDisabDetailAccountsDTO
))
{
// 异地
// 异地
ChDisabDetailAccounts
chDisabDetailAccounts
=
new
ChDisabDetailAccounts
();
ChDisabDetailAccounts
chDisabDetailAccounts
=
new
ChDisabDetailAccounts
();
chDisabDetailAccounts
.
setAccountsAllCost
(
limit
);
chDisabDetailAccounts
.
setAccountsAllCost
(
limit
);
...
@@ -914,7 +899,6 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -914,7 +899,6 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
chDisabDetailAccounts
.
setSrvOrganId
(
"471"
);
chDisabDetailAccounts
.
setSrvOrganId
(
"471"
);
chDisabDetailAccounts
.
setCreationTime
(
new
Date
());
chDisabDetailAccounts
.
setCreationTime
(
new
Date
());
chDisabDetailAccounts
.
setAccountsTime
(
DateUtils
.
strToDate
(
otherApplyTime
));
chDisabDetailAccounts
.
setAccountsTime
(
DateUtils
.
strToDate
(
otherApplyTime
));
// chDisabDetailAccounts.setMedicalArea(accountsVO.getMedicalArea());
chDisabDetailAccounts
.
setDisabInfoId
(
String
.
valueOf
(
disabInfoId
));
chDisabDetailAccounts
.
setDisabInfoId
(
String
.
valueOf
(
disabInfoId
));
chDisabDetailAccounts
.
setStatus
((
short
)
1
);
chDisabDetailAccounts
.
setStatus
((
short
)
1
);
chDisabDetailAccounts
.
setReissueAmount
(
BigDecimal
.
valueOf
(
0
));
chDisabDetailAccounts
.
setReissueAmount
(
BigDecimal
.
valueOf
(
0
));
...
@@ -933,10 +917,21 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -933,10 +917,21 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
chDisabAccounts
.
setReissueAmountTotal
(
zero
);
chDisabAccounts
.
setReissueAmountTotal
(
zero
);
chDisabAccounts
.
setDeductionAmountTotal
(
zero
);
chDisabAccounts
.
setDeductionAmountTotal
(
zero
);
disabAccountsMapper
.
insert
(
chDisabAccounts
);
disabAccountsMapper
.
insert
(
chDisabAccounts
);
}
else
{
BigDecimal
allCost1
=
chDisabAccounts
.
getAllCost
();
BigDecimal
overallCost1
=
chDisabAccounts
.
getOverallCost
();
allCost1
=
allCost1
.
add
(
chDisabDetailAccountsDTO
.
getAccountsAllCost
());
overallCost1
=
overallCost1
.
add
(
chDisabDetailAccountsDTO
.
getAccountsAllCost
());
ChDisabAccounts
chDisabAccount
=
new
ChDisabAccounts
();
chDisabAccount
.
setAllCost
(
allCost1
);
chDisabAccount
.
setOverallCost
(
overallCost1
);
Long
accountsId
=
chDisabAccounts
.
getAccountsId
();
chDisabAccount
.
setAccountsId
(
accountsId
);
disabAccountsMapper
.
updateById
(
chDisabAccount
);
}
}
chDisabDetailAccounts
.
setAccountsId
(
chDisabAccounts
.
getAccountsId
());
chDisabDetailAccounts
.
setAccountsId
(
chDisabAccounts
.
getAccountsId
());
chDisabAccountsDetailMapper
.
insert
(
chDisabDetailAccounts
);
chDisabAccountsDetailMapper
.
insert
(
chDisabDetailAccounts
);
}
else
{
}
else
{
BigDecimal
accountsAllCost
=
chDisabDetailAccountsDTO
.
getAccountsAllCost
();
BigDecimal
accountsAllCost
=
chDisabDetailAccountsDTO
.
getAccountsAllCost
();
BigDecimal
accountsOverallCost
=
chDisabDetailAccountsDTO
.
getAccountsOverallCost
();
BigDecimal
accountsOverallCost
=
chDisabDetailAccountsDTO
.
getAccountsOverallCost
();
chDisabDetailAccountsDTO
.
setAccountsAllCost
(
accountsAllCost
.
add
(
limit
));
chDisabDetailAccountsDTO
.
setAccountsAllCost
(
accountsAllCost
.
add
(
limit
));
...
@@ -944,7 +939,6 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -944,7 +939,6 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
chDisabDetailAccountsDTO
.
setAccountsPersonalCost
(
zero
);
chDisabDetailAccountsDTO
.
setAccountsPersonalCost
(
zero
);
chDisabAccountsDetailMapper
.
updateById
(
chDisabDetailAccountsDTO
);
chDisabAccountsDetailMapper
.
updateById
(
chDisabDetailAccountsDTO
);
}
}
return
result
;
}
}
@Override
@Override
...
@@ -953,4 +947,16 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
...
@@ -953,4 +947,16 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
return
placeOtherVOPage
;
return
placeOtherVOPage
;
}
}
@Override
public
void
placeOtherTaskQuery
(){
List
<
PlaceOtherVO
>
placeOtherVOS
=
taskDetailMapper
.
placeOtherTaskQuery
();
for
(
PlaceOtherVO
placeOtherVO
:
placeOtherVOS
)
{
Integer
disabInfoId
=
placeOtherVO
.
getDisabInfoId
();
String
otherApplyTime
=
placeOtherVO
.
getOtherApplyTime
();
placeFreeHandler
(
disabInfoId
,
otherApplyTime
);
}
}
}
}
account/account-service/src/main/resources/mapper/ChSrvTaskDetailMapper.xml
View file @
85ba2939
...
@@ -78,6 +78,34 @@
...
@@ -78,6 +78,34 @@
</if>
</if>
</select>
</select>
<select
id=
"placeOtherTaskQuery"
resultType=
"com.hungraim.ltc.pojo.vo.disable.PlaceOtherVO"
>
SELECT distinct info.DISAB_INFO_ID disabInfoId,
report.evaluate_time evaluateTime,
task.ORGAN_ID organId,
report.disable_level_id disableLevelId,
info.REAL_NAME realName,
info.CERTI_CODE certiCode,
(SELECT DISE_TYPE_CODE FROM CH_FND_DISEASE_TYPE WHERE info.DISE_TYPE_S = DISE_TYPE_ID) diseTypeS,
info.disease_desc diseaseDesc,
lev.DISABLE_LEVEL_NAME riskLevel,
report.PUBLICITY_START_TIME publicityStartTime,
report.PUBLICITY_END_TIME publicityEndTime,
report.PUBLICITY_TIME publicityTime,
to_char(info.OTHER_APPLY_TIME,'yyyy-MM-dd') otherApplyTime
FROM CH_DISABLE_INFO info
LEFT JOIN CH_APR_TASK task ON info.DISAB_INFO_ID = task.DISABLE_INFO_ID
LEFT JOIN ch_apr_report report ON report.TASK_ID = task.TASK_ID
left join ch_apr_organ aprOrgan on task.apr_organ_id = aprOrgan.apr_organ_id
LEFT JOIN CH_CFG_SRV_DISABLE_LEVEL lev ON report.DISABLE_LEVEL_ID = lev.DISABLE_LEVEL_ID
where info.SRV_MODE_ID ='4' and sysdate
<![CDATA[ > ]]>
report.PUBLICITY_END_TIME
and info.OTHER_APPLY_TIME is not null
and info.OTHER_APPLY_TIME = to_date(to_char(sysdate,'yyyy-MM-dd'),'yyyy-MM-dd')
</select>
<update
id=
"placeOtherApply"
>
<update
id=
"placeOtherApply"
>
update CH_DISABLE_INFO set OTHER_APPLY_TIME = TO_DATE ( #{otherApplyTime}, 'yyyy-MM-dd') where DISAB_INFO_ID = #{disabInfoId}
update CH_DISABLE_INFO set OTHER_APPLY_TIME = TO_DATE ( #{otherApplyTime}, 'yyyy-MM-dd') where DISAB_INFO_ID = #{disabInfoId}
...
...
apply/apply-service/src/main/java/com/hungraim/ltc/controller/DisableController.java
View file @
85ba2939
...
@@ -569,4 +569,10 @@ public class DisableController {
...
@@ -569,4 +569,10 @@ public class DisableController {
return
Result
.
success
(
1
);
return
Result
.
success
(
1
);
}
}
@GetMapping
(
"/disableExitTask"
)
public
Result
disableExitTask
(){
disableService
.
disableExitTask
();
return
Result
.
success
();
}
}
}
apply/apply-service/src/main/java/com/hungraim/ltc/dao/DisableInfoMapper.java
View file @
85ba2939
...
@@ -6,7 +6,6 @@ import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo;
...
@@ -6,7 +6,6 @@ import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvProgram
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvProgram
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvSend
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvSend
;
import
com.hungraim.ltc.pojo.vo.disable.DisableInfoListVo
;
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.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
...
@@ -31,7 +30,9 @@ public interface DisableInfoMapper extends BaseMapper<ChDisableInfo> {
...
@@ -31,7 +30,9 @@ public interface DisableInfoMapper extends BaseMapper<ChDisableInfo> {
*/
*/
Page
<
DisableInfoListVo
>
getDisableInfoList
(
Page
<
DisableInfoListVo
>
page
,
@Param
(
"srvOrganId"
)
Long
srvOrganId
,
String
certiCode
,
String
realName
,
String
svrModelId
);
Page
<
DisableInfoListVo
>
getDisableInfoList
(
Page
<
DisableInfoListVo
>
page
,
@Param
(
"srvOrganId"
)
Long
srvOrganId
,
String
certiCode
,
String
realName
,
String
svrModelId
);
int
deleteSrvSend
(
Integer
disableInfoId
,
String
exitTime
);
List
<
DisableInfoListVo
>
getDisableExitList
();
int
updateSrvProgramById
(
ChSrvProgram
chSrvProgram
);
int
updateSrvProgramById
(
ChSrvProgram
chSrvProgram
);
...
...
apply/apply-service/src/main/java/com/hungraim/ltc/service/DisableService.java
View file @
85ba2939
...
@@ -187,4 +187,6 @@ public interface DisableService {
...
@@ -187,4 +187,6 @@ public interface DisableService {
List
<
ChDisableExit
>
getDisableExitHis
(
Integer
disableInfoId
);
List
<
ChDisableExit
>
getDisableExitHis
(
Integer
disableInfoId
);
Integer
selectByCertiCode
(
String
certiCode
);
Integer
selectByCertiCode
(
String
certiCode
);
void
disableExitTask
();
}
}
apply/apply-service/src/main/java/com/hungraim/ltc/service/impl/DisableServiceImpl.java
View file @
85ba2939
...
@@ -16,13 +16,10 @@ import com.hungraim.ltc.pojo.entity.assessment.ChAprTask;
...
@@ -16,13 +16,10 @@ import com.hungraim.ltc.pojo.entity.assessment.ChAprTask;
import
com.hungraim.ltc.pojo.entity.assessment.ChDisableInfoHis
;
import
com.hungraim.ltc.pojo.entity.assessment.ChDisableInfoHis
;
import
com.hungraim.ltc.pojo.entity.disable.*
;
import
com.hungraim.ltc.pojo.entity.disable.*
;
import
com.hungraim.ltc.pojo.entity.riskLevel.ChDisableRiskLevel
;
import
com.hungraim.ltc.pojo.entity.riskLevel.ChDisableRiskLevel
;
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.entity.serviceManage.ChSrvProgram
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvProgram
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvSend
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvSend
;
import
com.hungraim.ltc.pojo.entity.serviceManage.ChSrvTaskDetail
;
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
;
...
@@ -39,7 +36,6 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -39,7 +36,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.awt.print.Book
;
import
java.util.*
;
import
java.util.*
;
@Service
@Service
...
@@ -643,8 +639,23 @@ public class DisableServiceImpl implements DisableService {
...
@@ -643,8 +639,23 @@ public class DisableServiceImpl implements DisableService {
int
result
=
disableInfoMapper
.
updateById
(
chDisableInfo
);
int
result
=
disableInfoMapper
.
updateById
(
chDisableInfo
);
boolean
now
=
DateUtils
.
isNow
(
date
);
boolean
now
=
DateUtils
.
isNow
(
date
);
if
(
now
)
{
if
(
now
)
{
disableExitHanlder
(
exitReasonId
,
srvOrganId
,
disableInfoId
,
date
);
}
return
result
;
}
/**
* 失能人员退出处理
*@param exitReasonId 失能退出原因
* @param srvOrganId 失能退出前所在护理机构
* @param disableInfoId 失能人员
* @param date 退出时间
*@return void
**/
private
void
disableExitHanlder
(
Integer
exitReasonId
,
Integer
srvOrganId
,
Integer
disableInfoId
,
Date
date
)
{
// 更新方案为已终止
ChSrvProgram
chSrvProgram
=
new
ChSrvProgram
();
ChSrvProgram
chSrvProgram
=
new
ChSrvProgram
();
chSrvProgram
.
setProgramId
(
chSrvProgram
.
getProgramId
());
chSrvProgram
.
setDisabInfoId
(
Long
.
valueOf
(
disableInfoId
));
chSrvProgram
.
setDisabInfoId
(
Long
.
valueOf
(
disableInfoId
));
chSrvProgram
.
setProgStatus
(
2
);
chSrvProgram
.
setProgStatus
(
2
);
chSrvProgram
.
setEndReason
(
"失能人员退出,终止方案"
);
chSrvProgram
.
setEndReason
(
"失能人员退出,终止方案"
);
...
@@ -659,6 +670,7 @@ public class DisableServiceImpl implements DisableService {
...
@@ -659,6 +670,7 @@ public class DisableServiceImpl implements DisableService {
// disableInfoMapper.updateSrvSendById(chSrvSend);
// disableInfoMapper.updateSrvSendById(chSrvSend);
// 1, 死亡
// 1, 死亡
}
else
if
(
exitReasonId
==
1
){
}
else
if
(
exitReasonId
==
1
){
// 更新已分配为已退出
chSrvSend
.
setStatus
((
short
)
3
);
chSrvSend
.
setStatus
((
short
)
3
);
disableInfoMapper
.
updateSrvSendById
(
chSrvSend
);
disableInfoMapper
.
updateSrvSendById
(
chSrvSend
);
}
else
{
}
else
{
...
@@ -672,20 +684,13 @@ public class DisableServiceImpl implements DisableService {
...
@@ -672,20 +684,13 @@ public class DisableServiceImpl implements DisableService {
chSrvSend1
.
setStatus
((
short
)
0
);
chSrvSend1
.
setStatus
((
short
)
0
);
chSrvSendInfoMapper
.
insert
(
chSrvSend1
);
chSrvSendInfoMapper
.
insert
(
chSrvSend1
);
}
}
// 插入历史记录
}
// 解除护理机构分配
// delete from CH_SRV_SEND where DISAB_INFO_ID = '327'
// disableInfoMapper.deleteSrvSend(disableInfoId,exitTime);
// }
ChDisableExit
chDisableExit
=
new
ChDisableExit
();
ChDisableExit
chDisableExit
=
new
ChDisableExit
();
chDisableExit
.
setDisabInfoId
(
disableInfoId
);
chDisableExit
.
setDisabInfoId
(
disableInfoId
);
chDisableExit
.
setExitReasonId
(
exitReasonId
);
chDisableExit
.
setExitReasonId
(
exitReasonId
);
chDisableExit
.
setExitTime
(
date
);
chDisableExit
.
setExitTime
(
date
);
chDisableExit
.
setSrvOrganId
(
srvOrganId
);
chDisableExit
.
setSrvOrganId
(
srvOrganId
);
disableExitMapper
.
insert
(
chDisableExit
);
disableExitMapper
.
insert
(
chDisableExit
);
return
result
;
}
}
@Override
@Override
...
@@ -703,6 +708,23 @@ public class DisableServiceImpl implements DisableService {
...
@@ -703,6 +708,23 @@ public class DisableServiceImpl implements DisableService {
}
}
/**
* @desc 定时执行失能退出退出时间不是当天的
* @return void
**/
@Override
public
void
disableExitTask
(){
List
<
DisableInfoListVo
>
disableExitList
=
disableInfoMapper
.
getDisableExitList
();
for
(
DisableInfoListVo
disableInfoListVo
:
disableExitList
)
{
Integer
exitReasonId
=
disableInfoListVo
.
getExitReasonId
();
Long
srvOrganId
=
disableInfoListVo
.
getSrvOrganId
();
Long
disabInfoId
=
disableInfoListVo
.
getDisabInfoId
();
String
exitTime
=
disableInfoListVo
.
getExitTime
();
Date
date
=
DateUtils
.
strToDate
(
exitTime
);
disableExitHanlder
(
exitReasonId
,
srvOrganId
.
intValue
(),
disabInfoId
.
intValue
(),
date
);
}
}
}
}
apply/apply-service/src/main/resources/mapper/DisableInfoMapper.xml
View file @
85ba2939
...
@@ -48,19 +48,50 @@
...
@@ -48,19 +48,50 @@
<if
test=
"svrModelId != null and svrModelId != ''"
>
<if
test=
"svrModelId != null and svrModelId != ''"
>
and T7.MODE_ID = #{svrModelId}
and T7.MODE_ID = #{svrModelId}
</if>
</if>
</where>
</where>
</select>
<select
id=
"getDisableExitList"
resultType=
"com.hungraim.ltc.pojo.vo.disable.DisableInfoListVo"
>
SELECT distinct T2.DISAB_INFO_ID disabInfoId,
T1.PROGRAM_ID programId,
T6.SRV_ORGAN_ID srvOrganId,
T5.DISTRICT_PROVINCIAL districtProvincial,
T5.DISTRICT_CITY districtCity,
T2.REAL_NAME realName,
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 HH24:mi:ss') programDate,
to_char(T1.PROGRAM_EDN_DATE,'yyyy-MM-dd HH24:mi:ss') programEdnDate,
T2.EXIT_FLAG exitFlag,
T2.EXIT_REASON_ID exitReasonId
FROM CH_DISABLE_INFO T2
inner join (select * from CH_SRV_SEND where STATUS in(1,3)) T6 on T6.DISAB_INFO_ID = T2.DISAB_INFO_ID
LEFT 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_SRV_ORGAN T5 ON T6.SRV_ORGAN_ID = T5.SRV_ORGAN_ID
where T2.EXIT_TIME is not null
and T2.EXIT_TIME = to_date(to_char(sysdate,'yyyy-MM-dd'),'yyyy-MM-dd')
</select>
</select>
<update
id=
"updateChSrvProgram"
>
<update
id=
"updateChSrvProgram"
>
update CH_SRV_PROGRAM t set t.PROG_STATUS ='2' ,t.END_TIME =sysdate
update CH_SRV_PROGRAM t set t.PROG_STATUS ='2' ,t.END_TIME =sysdate
where t.PROGRAM_ID =#{programId}
where t.PROGRAM_ID =#{programId}
</update>
</update>
<delete
id=
"deleteSrvSend"
>
delete from CH_SRV_SEND where DISAB_INFO_ID = #{disableInfoId}
</delete>
<update
id=
"updateSrvProgramById"
parameterType=
"com.hungraim.ltc.pojo.entity.serviceManage.ChSrvProgram"
>
<update
id=
"updateSrvProgramById"
parameterType=
"com.hungraim.ltc.pojo.entity.serviceManage.ChSrvProgram"
>
...
...
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