Commit 33aab16f authored by zhangwanglin's avatar zhangwanglin

Merge branch 'dev_nursing_records_20230214' into dev_ch_master

parents 7209008c 51e4721e
......@@ -8,6 +8,7 @@ import com.hungraim.ltc.pojo.vo.account.*;
import com.hungraim.ltc.util.FileUtils;
import com.hungraim.ltc.util.Result;
import com.hungraim.ltc.util.ResultCode;
import com.hungraim.ltc.util.TokenParsingUtil;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
......@@ -129,7 +130,9 @@ public class AccountController {
* @return 返回
*/
@GetMapping("/getSrvTaskList")
public Result<Page<SrvTaskRespVO>> getSrvTaskList(SrvTaskReqVO srvTaskReqVO) {
public Result<Page<SrvTaskRespVO>> getSrvTaskList(@RequestHeader("Authorization") String token,SrvTaskReqVO srvTaskReqVO) {
long srvOrganId = TokenParsingUtil.TokenParsing(token, "srvOrganId");
srvTaskReqVO.setSrvOrganId(srvOrganId);
return Result.success(accountService.getSrvTaskList(srvTaskReqVO));
}
......@@ -141,9 +144,11 @@ public class AccountController {
* @return 返回
*/
@GetMapping("/searchSrvOrganAccountList")
public Result<Page<SrvOrganAccountListResp>> searchSrvOrganAccountList(SrvOrganListReq srvOrganListReq) {
public Result<Page<SrvOrganAccountListResp>> searchSrvOrganAccountList(@RequestHeader("Authorization") String token, SrvOrganListReq srvOrganListReq) {
List<String> list = Arrays.asList("1");
srvOrganListReq.setAccountsStatusList(list);
long srvOrganId = TokenParsingUtil.TokenParsing(token, "srvOrganId");
srvOrganListReq.setSrvOrganId(srvOrganId);
return Result.success(accountService.searchSrvOrganAccountList(srvOrganListReq));
}
......@@ -154,9 +159,11 @@ public class AccountController {
* @return 返回
*/
@GetMapping("/searchSrvOrganReviewList")
public Result<Page<SrvOrganAccountListResp>> searchSrvOrganReviewList(SrvOrganListReq srvOrganListReq) {
public Result<Page<SrvOrganAccountListResp>> searchSrvOrganReviewList(@RequestHeader("Authorization") String token, SrvOrganListReq srvOrganListReq) {
List<String> list = Arrays.asList("2", "3","4");
srvOrganListReq.setAccountsStatusList(list);
long srvOrganId = TokenParsingUtil.TokenParsing(token, "srvOrganId");
srvOrganListReq.setSrvOrganId(srvOrganId);
return Result.success(accountService.searchSrvOrganAccountList(srvOrganListReq));
}
......@@ -203,9 +210,11 @@ public class AccountController {
* @return
*/
@GetMapping("/queryAccountsDeclareList")
public Result<Page<ChDisabDetailAccountsResp>> queryAccountsDeclareList(Integer pageNum, Integer pageSize,SrvOrganListReq srvOrganListReq) {
public Result<Page<ChDisabDetailAccountsResp>> queryAccountsDeclareList(@RequestHeader("Authorization") String token,Integer pageNum, Integer pageSize,SrvOrganListReq srvOrganListReq) {
List<String> accountsStatusList = Arrays.asList("0", "1");
srvOrganListReq.setAccountsStatusList(accountsStatusList);
long srvOrganId = TokenParsingUtil.TokenParsing(token, "srvOrganId");
srvOrganListReq.setSrvOrganId(srvOrganId);
Page<ChDisabDetailAccountsResp> chAssessDetailAccounts = accountService.queryOrganAccountsDetail(pageNum,pageSize,srvOrganListReq);
return Result.success(chAssessDetailAccounts);
}
......@@ -216,9 +225,11 @@ public class AccountController {
* @return
*/
@GetMapping("/queryDelayAccountList")
public Result<Page<ChDisabDetailAccountsResp>> queryDelayAccountList(Integer pageNum, Integer pageSize,SrvOrganListReq srvOrganListReq) {
public Result<Page<ChDisabDetailAccountsResp>> queryDelayAccountList(@RequestHeader("Authorization") String token,Integer pageNum, Integer pageSize,SrvOrganListReq srvOrganListReq) {
List<String> list = Arrays.asList("1", "2");
srvOrganListReq.setAccountsStatusList(list);
long srvOrganId = TokenParsingUtil.TokenParsing(token, "srvOrganId");
srvOrganListReq.setSrvOrganId(srvOrganId);
Page<ChDisabDetailAccountsResp> chAssessDetailAccounts = accountService.queryOrganAccountsDetail(pageNum,pageSize,srvOrganListReq);
return Result.success(chAssessDetailAccounts);
}
......@@ -320,7 +331,9 @@ public class AccountController {
}
@GetMapping("/queryOverallCostList")
public Result<Page<OverallCostListRespVO>> queryOverallCostList(OverallCostReqVO req) {
public Result<Page<OverallCostListRespVO>> queryOverallCostList(@RequestHeader("Authorization") String token,OverallCostReqVO req) {
long srvOrganId = TokenParsingUtil.TokenParsing(token, "srvOrganId");
req.setSrvOrganId(srvOrganId);
Page<OverallCostListRespVO> overallCostRecords = accountService.queryFreeRdInfo(req);
return Result.success(overallCostRecords);
}
......
......@@ -17,12 +17,8 @@ import java.util.List;
@Repository
public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAccounts> {
List<OrganAccountsVO> getOrganAccountsList(String taskDetailId);
List<AccountExportDetailListResp> searchSrvOrganAccountDetailExport(SrvOrganListReq req);
List<ChDisabDetailAccounts> queryAccountByCondition(@Param("taskDetailIds") List<String> taskDetailIds);
List<OrganAccountsVO> getOtherPlaceList(String programId);
......@@ -30,6 +26,8 @@ public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAcc
Page<NursingRecordsRespVO> queryNursingRecords(Page page, NursingReqVO req);
Page<NursingRecordsRespVO> queryNursingRecordsGoDoor(Page page, NursingReqVO req);
OverallEduceDecreaseCostRespVO queryOverallCostRecords(OverallCostReqVO req);
......
......@@ -47,7 +47,6 @@ public interface AccountService extends IService<ChDisabAccounts> {
int updateChDisabAccounts(int id);
Result organAccountTaskExecute(List<AccountTaskExecuteReqVO> accountTaskExecuteReqVOS);
Result accountTaskExecute(List<AccountTaskExecuteReqVO> accountTaskExecuteReqVOS);
......
......@@ -31,10 +31,13 @@
<if test="req.accountsId != null and req.accountsId != ''">
and d.ACCOUNTS_ID = #{req.accountsId}
</if>
<if test="req.modeId != null and req.modeId != ''">
and DECODE(d.mode_name, '医疗','1','养老', '2','上门','3', '异地', '4') = #{req.modeId}
</if>
<if test="req.accountsStatus != null and req.accountsStatus != ''">
and d.status = #{req.accountsStatus}
</if>
<if test="req.srvOrganId != null and req.srvOrganId != ''">
<if test="req.srvOrganId != null and req.srvOrganId != '' and req.srvOrganId!=0">
and d.SRV_ORGAN_ID = #{req.srvOrganId}
</if>
......@@ -54,7 +57,7 @@
<select id="queryNursingRecords" resultType="com.hungraim.ltc.pojo.entity.account.NursingRecordsRespVO">
select organ.SRV_ORGAN_NAME srvOrganName,
to_char(plan.SRV_PLAN_TIME,'yyyy-MM-dd') srvPlanTime,
DECODE(plan.MODE_ID, '1','医疗','2', '养老','3','上门', '4', '异地') modeName,
DECODE(plan.MODE_ID, '1','医疗','2', '养老','3','上门') modeName,
to_char(plan.CREATION_TIME,'yyyy-MM-dd HH24:mi:ss') executionTime,
plan.item_name itemName
from CH_SRV_PLAN plan
......@@ -65,6 +68,24 @@
and plan.IS_STATUS ='4'
</select>
<select id="queryNursingRecordsGoDoor" resultType="com.hungraim.ltc.pojo.entity.account.NursingRecordsRespVO">
select
organ.SRV_ORGAN_NAME srvOrganName,
to_char(detail.SRV_DATE,'yyyy-MM-dd') srvPlanTime,
'上门' modeName,
to_char(item.FCD,'yyyy-MM-dd HH24:mi:ss') executionTime,
service.SERVICE_TYPE_DETAILED_NAME itemName
from CH_SRV_TASK_FINISH_ITEM item
left join CH_SRV_TASK_DETAIL detail on detail.TASK_DETAIL_ID = item.TASK_DETAIL_ID
left join CH_SRV_TASK task on task.SRV_TASK_ID = detail.SRV_TASK_ID
LEFT JOIN CH_SRV_ORGAN_EMP m ON m.EMP_ID = task.SRV_EMP_ID
LEFT JOIN CH_SRV_ORGAN organ ON organ.SRV_ORGAN_ID = m.SRV_ORGAN_ID
LEFT JOIN CH_SRV_ORGAN_PROJECT CSOP ON CSOP.PROJECT_ID = item.ITEM_ID
left join CH_SERVICE_TYPE_DETAILED service on service.SERVICE_TYPE_DETAILED_ID = CSOP.ITEM_NAME
where to_char(detail.SRV_DATE, 'yyyy-MM') = #{req.accountsTime} and task.DISAB_INFO_ID = #{req.disabInfoId} and organ.SRV_ORGAN_ID = #{req.srvOrganId}
</select>
......@@ -104,44 +125,7 @@
</where>
</select>
<select id="getOrganAccountsList" resultType="com.hungraim.ltc.pojo.vo.account.OrganAccountsVO">
select
detail.TASK_DETAIL_ID taskDetailId,
--失能人员姓名
disable.real_name realName,
disable.DISAB_INFO_ID disabInfoId,
--身份证号
disable.CERTI_CODE certiCode,
--所在省市
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
program.SRV_MODE_ID modeId,
--服务方式
DECODE(program.SRV_MODE_ID, '1','医疗','2', '养老','3','上门', '4', '异地') srvModeName,
--护理机构名称
organ.srv_organ_id srvOrganId,
--护理机构名称
organ.srv_organ_name srvOrganName,
--护理服务人员 Id
emp.EMP_ID empId,
--任务时间
detail.SRV_DATE srvDate,
-- 机构等级
organ.LEVEL_CODE levelCode
from ch_srv_task_detail detail--服务计划
left join ch_srv_task task on task.srv_task_id = detail.srv_task_id--服务计划详情
left join ch_disable_info disable on task.disab_info_id = disable.disab_info_id--失能人员
left join CH_DISABLE_APPLY apply on apply.apply_id = disable.apply_id
left join ch_srv_organ_emp emp on task.srv_emp_id = emp.emp_id--护理人员
left join ch_srv_program program on task.program_id = program.program_id--服务方案
left join ch_srv_organ organ on program.srv_organ_id = organ.srv_organ_id--服务机构
LEFT JOIN CH_SRV_TASK_FINISH_ITEM CSTFI ON detail.TASK_DETAIL_ID = CSTFI.TASK_DETAIL_ID
<where>
detail.STATUS = '4'
<if test="taskDetailId != null and taskDetailId != ''">
AND detail.TASK_DETAIL_ID = #{taskDetailId}
</if>
</where>
</select>
<select id="queryPlanInfoByDetailId" resultType="com.hungraim.ltc.pojo.vo.account.OrganAccountsVO">
select
......@@ -173,16 +157,7 @@
where plan.IS_STATUS = '4' and plan.IS_BILL = 1 and plan.TASK_DETAIL_ID = #{taskDetailId}
</select>
<select id="queryAccountByCondition" resultType="com.hungraim.ltc.pojo.entity.account.ChDisabDetailAccounts">
select * from CH_DISAB_ACCOUNTS_DETAIL t where t.MODE_NAME in ('养老','医疗')
<if test="taskDetailIds != null and taskDetailIds.size() > 0">
AND t.TASK_DETAIL_ID IN
<foreach collection="taskDetailIds" separator="," open="(" close=")" item="taskDetailId">
#{taskDetailId}
</foreach>
</if>
</select>
<!--查询评估信息-->
<select id="getAssessAccountsList" resultType="com.hungraim.ltc.pojo.vo.account.AssessAccountsVO">
......
......@@ -59,7 +59,7 @@
#{organId}
</foreach>
</if>
<if test='req.srvOrganId != null'>
<if test="req.srvOrganId != null and req.srvOrganId != '' and req.srvOrganId!=0">
AND t2.SRV_ORGAN_ID = #{req.srvOrganId}
</if>
<if test="req.accountsTime != null and req.accountsTime != ''">
......
......@@ -14,6 +14,7 @@
organ.SRV_ORGAN_NAME srvOrganName,
rd.AMOUNT_OF_MONEY amountOfMoney,
rd.FREE_RD_ID freeRdId,
rd.REMARKS remarks,
d.ACCOUNTS_STATUS accountsStatus
from CH_DISAB_FREE_RD_INFO rd left join
CH_DISAB_ACCOUNTS_DETAIL detail on
......@@ -32,6 +33,9 @@
<if test="req.srvOrganName != null and req.srvOrganName != ''">
and organ.SRV_ORGAN_NAME = #{req.srvOrganName}
</if>
<if test="req.srvOrganId != null and req.srvOrganId != '' and req.srvOrganId!=0">
AND organ.SRV_ORGAN_ID = #{req.srvOrganId}
</if>
<if test="req.certiCode != null and req.certiCode != ''">
and info.certi_Code = #{req.certiCode}
</if>
......
......@@ -36,6 +36,9 @@
<if test="req.srvDate != null and req.srvDate != ''">
AND to_char(plan.SRV_PLAN_TIME,'yyyy-MM-dd') = #{req.srvDate}
</if>
<if test="req.srvOrganId != null and req.srvOrganId != '' and req.srvOrganId!=0">
AND organ.SRV_ORGAN_ID = #{req.srvOrganId}
</if>
</where>
</select>
......
......@@ -506,13 +506,15 @@ public class DisableController {
* @return 失能人员信息列表
*/
@RequestMapping("/disableInfoList")
public Result<Page<DisableInfoListVo>> disableInfoList(Integer pageNum, Integer pageSize, Long srvOrganId,String certiCode,String realName,String svrModelId) {
public Result<Page<DisableInfoListVo>> disableInfoList(@RequestHeader("Authorization") String token,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;
}
long srvOrganIdL = TokenParsingUtil.TokenParsing(token, "srvOrganId");
srvOrganId = new Long(srvOrganIdL);
Page<DisableInfoListVo> page = new Page<>(pageNum, pageSize);
page = disableService.getDisableInfoList(page, srvOrganId,certiCode,realName,svrModelId);
return Result.success(page);
......
......@@ -38,8 +38,10 @@
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}
<where>
<if test="srvOrganId != null and srvOrganId != '' and srvOrganId!=0">
and T1.SRV_ORGAN_ID = #{srvOrganId}
</if>
<if test="certiCode != null and certiCode != ''">
and T2.CERTI_CODE = #{certiCode}
</if>
......@@ -49,6 +51,7 @@
<if test="svrModelId != null and svrModelId != ''">
and T7.MODE_ID = #{svrModelId}
</if>
</where>
</select>
<update id="updateChSrvProgram">
......
......@@ -11,6 +11,7 @@
organ.organ_name assessOrganName,
to_char(d.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
(select district_name from ch_fnd_district dis where apply.MEDICAL_AREA = dis.district_code) medicalArea,
(select type.APREMP_NAME from CH_CFG_APREMP_TYPE type where type.APREMP_TYPE_ID = emp.APREMP_TYPE_ID_S) aprempTypeS,
to_char(d.assess_time,'yyyy-MM-dd') assessTime,
emp.REAL_NAME empName
from CH_ASSESS_ACCOUNTS_DETAIL d
......@@ -23,12 +24,13 @@ from CH_ASSESS_ACCOUNTS_DETAIL d
<select id="assessAccountDetailExport" resultType="com.hungraim.ltc.pojo.vo.account.AssessAccountsExportResp">
SELECT
t2.REAL_NAME realName,
(select type.APREMP_NAME from CH_CFG_APREMP_TYPE type where type.APREMP_TYPE_ID = t4.APREMP_TYPE_ID_S) aprempTypeS,
t3.ORGAN_NAME organName,
to_char(t1.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
t1.ASSESS_COST assessCost,
to_char(t1.assess_time,'yyyy-MM-dd') assessTime,
t4.REAL_NAME empName,
(select district_name from ch_fnd_district dis where t2.MEDICAL_AREA = dis.district_code) medicalArea,
(select district_name from ch_fnd_district dis where t2.MEDICAL_AREA = dis.district_code) medicalArea
FROM
CH_ASSESS_ACCOUNTS_DETAIL t1
left join CH_DISABLE_APPLY t2 on t1.APPLY_ID = t2.APPLY_ID
......@@ -36,7 +38,5 @@ FROM
left join CH_APR_EMP t4 on t4.EMP_ID = t1.EMP_ID
where t1.ASSESS_ACCOUNTS_ID = #{assessAccountsId}
</select>
</mapper>
......@@ -16,10 +16,11 @@ public class NursingReqVO extends BaseReq {
private String disabInfoId;
private String modeId;
private String modeName;
private String modeId;
private String srvOrganId;
......
......@@ -65,4 +65,6 @@ public class OverallCostListRespVO {
private String srvOrganName;
private String accountsStatus;
private String remarks;
}
......@@ -32,4 +32,6 @@ public class OverallCostReqVO extends BaseReq {
private Integer dealType;
private Long srvOrganId;
}
......@@ -37,6 +37,11 @@ public class ChAssessDetailAccountsResp implements Serializable {
*/
private String medicalArea;
/**
* 评定资质
*/
private String aprempTypeS;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
......@@ -24,6 +24,9 @@ public class AssessAccountsExportResp {
@Excel(name = "评定人员姓名",width = 20)
private String empName;
@Excel(name = "评定资质",width = 20)
private String aprempTypeS;
@Excel(name = "评估时间",width = 20)
private String assessTime;
......
......@@ -24,6 +24,8 @@ public class SrvOrganListReq extends BaseReq {
*/
private Long srvOrganId;
private String modeId;
/**
* 护理机构id
......
......@@ -18,4 +18,6 @@ public class SrvTaskReqVO extends BaseReq {
private String status;
private String srvOrganName;
private Long srvOrganId;
}
......@@ -18,7 +18,7 @@ public class SrvTaskScheduledServiceImpl {
@Autowired
private SrvTaskService srvTaskService;
@Scheduled(cron = "30 30 23 * * ?")
@Scheduled(cron = "30 20 11 * * ?")
public void timeAllocationSrvTask() {
log.info("timeAllocationSrvTask========start");
srvTaskService.timeAllocationSrvTask();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment