Commit 5f93835f authored by zhangwanglin's avatar zhangwanglin

打卡记录问题

parent 49994246
...@@ -235,6 +235,11 @@ public class AccountController { ...@@ -235,6 +235,11 @@ public class AccountController {
return Result.success(chAssessDetailAccounts); return Result.success(chAssessDetailAccounts);
} }
/** /**
* 暂缓列表查询 * 暂缓列表查询
* @param * @param
......
...@@ -6,8 +6,11 @@ import com.hungraim.ltc.pojo.entity.account.ChDisabFreeRdInfo; ...@@ -6,8 +6,11 @@ import com.hungraim.ltc.pojo.entity.account.ChDisabFreeRdInfo;
import com.hungraim.ltc.pojo.entity.account.OverallCostListRespVO; import com.hungraim.ltc.pojo.entity.account.OverallCostListRespVO;
import com.hungraim.ltc.pojo.entity.account.OverallCostReqVO; import com.hungraim.ltc.pojo.entity.account.OverallCostReqVO;
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;
import java.util.List;
/** /**
* @author zwl * @author zwl
* @ClassName ChDisabFreeRdInfoMapper * @ClassName ChDisabFreeRdInfoMapper
...@@ -19,5 +22,7 @@ import org.springframework.stereotype.Repository; ...@@ -19,5 +22,7 @@ import org.springframework.stereotype.Repository;
public interface ChDisabFreeRdInfoMapper extends BaseMapper<ChDisabFreeRdInfo> { public interface ChDisabFreeRdInfoMapper extends BaseMapper<ChDisabFreeRdInfo> {
Page<OverallCostListRespVO> queryFreeRdInfo(Page page, OverallCostReqVO req); Page<OverallCostListRespVO> queryFreeRdInfo(Page page, OverallCostReqVO req);
List<String> selectByAccountsId(@Param("accountsId")Long accountsId,@Param("dealType") int dealType);
} }
...@@ -136,7 +136,30 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -136,7 +136,30 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
@Override @Override
public Page<SrvOrganAccountListResp> searchSrvOrganAccountList(SrvOrganListReq srvOrganListReq) { public Page<SrvOrganAccountListResp> searchSrvOrganAccountList(SrvOrganListReq srvOrganListReq) {
List<Long> organIds = baseAccountService.getOrganIds(srvOrganListReq.getOrganId(), srvOrganListReq.getIsInvolveChild()); List<Long> organIds = baseAccountService.getOrganIds(srvOrganListReq.getOrganId(), srvOrganListReq.getIsInvolveChild());
return disabAccountsMapper.searchSrvOrganAccountList(new Page<>(srvOrganListReq.getPageNum(), srvOrganListReq.getPageSize()), organIds, srvOrganListReq); Page<SrvOrganAccountListResp> srvOrganAccountListRespPage = disabAccountsMapper.searchSrvOrganAccountList(new Page<>(srvOrganListReq.getPageNum(), srvOrganListReq.getPageSize()), organIds, srvOrganListReq);
List<SrvOrganAccountListResp> records = srvOrganAccountListRespPage.getRecords();
for (SrvOrganAccountListResp record : records) {
Short accountsStatus = record.getAccountsStatus();
if(accountsStatus == 4){
Long accountsId = record.getAccountsId();
// 1 补发 2 扣减
List<String> list = chDisabFreeRdInfoMapper.selectByAccountsId(accountsId, 1);
// 补发
record.setReissueReason(list);
List<String> list1 = chDisabFreeRdInfoMapper.selectByAccountsId(accountsId, 2);
// 扣减
record.setDeductionReason(list1);
Date accountsTime = record.getAccountsTime();
String accountsTimeStr = DateUtils.dateToStr(accountsTime);
Date firstDayOfMonth = DateUtils.getFirstDayOfMonth(DateUtils.strToDate(accountsTimeStr));
record.setSvrStartTime(DateUtils.dateToStr(firstDayOfMonth));
Date date = DateUtils.getlastDayOfMonth(DateUtils.strToDate(accountsTimeStr));
record.setSvrEndTime(DateUtils.dateToStr(date));
}
}
return srvOrganAccountListRespPage;
} }
...@@ -491,7 +514,44 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -491,7 +514,44 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
@Override @Override
public Page<ChDisabDetailAccountsResp> queryOrganAccountsDetail(Integer pageNum, Integer pageSize,SrvOrganListReq srvOrganListReq) { public Page<ChDisabDetailAccountsResp> queryOrganAccountsDetail(Integer pageNum, Integer pageSize,SrvOrganListReq srvOrganListReq) {
return chDisabAccountsDetailMapper.queryOrganAccountsDetail(new Page<>(pageNum, pageSize),srvOrganListReq); Page<ChDisabDetailAccountsResp> chDisabDetailAccountsRespPage = chDisabAccountsDetailMapper.queryOrganAccountsDetail(new Page<>(pageNum, pageSize), srvOrganListReq);
List<ChDisabDetailAccountsResp> records = chDisabDetailAccountsRespPage.getRecords();
for (ChDisabDetailAccountsResp record : records) {
Integer status = record.getStatus();
if(status == 1){
BigDecimal reportableAmount = new BigDecimal(0);
BigDecimal institutionsDeserve = new BigDecimal(0);
BigDecimal personalDeserve = new BigDecimal(0);
String accountsStartTime = record.getAccountsStartTime();
Date date = DateUtils.strToDate(accountsStartTime);
int daysOfMonth = DateUtils.getDaysOfMonth(date);
String modeName = record.getModeName();
if ("上门".equals(modeName)) {
reportableAmount = new BigDecimal(1200);
institutionsDeserve = new BigDecimal(960);
personalDeserve = new BigDecimal(240);
} else if ("养老".equals(modeName)) {
reportableAmount = new BigDecimal(50).multiply(new BigDecimal(daysOfMonth));
institutionsDeserve = reportableAmount.multiply(new BigDecimal("0.7"));
personalDeserve = reportableAmount.multiply(new BigDecimal("0.3"));
} else if ("医疗".equals(modeName) && "1".equals(record.getLevelCode())) {
reportableAmount = new BigDecimal(80).multiply(new BigDecimal(daysOfMonth));
institutionsDeserve = reportableAmount.multiply(new BigDecimal("0.7"));
personalDeserve = reportableAmount.multiply(new BigDecimal("0.3"));
// 二级及以上医疗机构其限额为 100 元/人/天,由长期护理保险基金支付 70%,个人支付 30%;
} else if ("医疗".equals(modeName) && (!"1".equals(record.getLevelCode()))) {
reportableAmount = new BigDecimal(100).multiply(new BigDecimal(daysOfMonth));
institutionsDeserve = reportableAmount.multiply(new BigDecimal("0.7"));
personalDeserve = reportableAmount.multiply(new BigDecimal("0.3"));
}
record.setReportableAmount(reportableAmount.toString());
record.setInstitutionsDeserve(institutionsDeserve.toString());
record.setPersonalDeserve(personalDeserve.toString());
}
}
return chDisabDetailAccountsRespPage;
} }
......
...@@ -15,12 +15,14 @@ ...@@ -15,12 +15,14 @@
o.SRV_ORGAN_NAME srvOrganName, o.SRV_ORGAN_NAME srvOrganName,
o.SRV_ORGAN_ID srvOrganId, o.SRV_ORGAN_ID srvOrganId,
info.REAL_NAME realName, info.REAL_NAME realName,
info.CERTI_CODE certiCode,
info.DISAB_INFO_ID disabInfoId, info.DISAB_INFO_ID disabInfoId,
d.DEDUCTION_AMOUNT deductionAmount, d.DEDUCTION_AMOUNT deductionAmount,
d.REISSUE_AMOUNT reissueAmount, d.REISSUE_AMOUNT reissueAmount,
d.ACCOUNTS_DETAIL_ID accountsDetailId, d.ACCOUNTS_DETAIL_ID accountsDetailId,
d.STATUS, d.STATUS,
d.ACCOUNTS_ID accountsId d.ACCOUNTS_ID accountsId,
o.LEVEL_CODE levelCode
from CH_DISAB_ACCOUNTS_DETAIL d from CH_DISAB_ACCOUNTS_DETAIL d
left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID left join CH_DISABLE_INFO info on d.DISAB_INFO_ID = info.DISAB_INFO_ID
left join CH_DISABLE_APPLY apply on info.APPLY_ID=apply.APPLY_ID left join CH_DISABLE_APPLY apply on info.APPLY_ID=apply.APPLY_ID
...@@ -81,7 +83,7 @@ ...@@ -81,7 +83,7 @@
and plan.MODE_ID = #{req.modeId} and plan.MODE_ID = #{req.modeId}
and to_char(plan.SRV_PLAN_TIME,'yyyy-MM') = #{req.accountsTime} and to_char(plan.SRV_PLAN_TIME,'yyyy-MM') = #{req.accountsTime}
and plan.IS_STATUS ='4' and plan.IS_STATUS ='4'
order by plan.SRV_PLAN_TIME desc order by plan.SRV_PLAN_TIME desc,plan.PLAN_ID
</select> </select>
<select id="queryNursingRecordsGoDoor" resultType="com.hungraim.ltc.pojo.entity.account.NursingRecordsRespVO"> <select id="queryNursingRecordsGoDoor" resultType="com.hungraim.ltc.pojo.entity.account.NursingRecordsRespVO">
...@@ -104,7 +106,7 @@ from CH_SRV_TASK_FINISH_ITEM item ...@@ -104,7 +106,7 @@ from CH_SRV_TASK_FINISH_ITEM item
LEFT JOIN CH_SRV_ORGAN_PROJECT CSOP ON CSOP.PROJECT_ID = item.ITEM_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 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} where to_char(detail.SRV_DATE, 'yyyy-MM') = #{req.accountsTime} and task.DISAB_INFO_ID = #{req.disabInfoId}
and organ.SRV_ORGAN_ID = #{req.srvOrganId} order by detail.SRV_DATE desc and organ.SRV_ORGAN_ID = #{req.srvOrganId} order by detail.SRV_DATE desc,detail.TASK_DETAIL_ID
</select> </select>
......
...@@ -47,7 +47,8 @@ ...@@ -47,7 +47,8 @@
to_char(t1.SVR_END_TIME,'yyyy-MM-dd') svrEndTime, to_char(t1.SVR_END_TIME,'yyyy-MM-dd') svrEndTime,
t1.TOTAL_ALLOCATED_EXPENSES totalAllocatedExpenses, t1.TOTAL_ALLOCATED_EXPENSES totalAllocatedExpenses,
t1.REISSUE_AMOUNT_TOTAL reissueAmountTotal, t1.REISSUE_AMOUNT_TOTAL reissueAmountTotal,
t1.DEDUCTION_AMOUNT_TOTAL deductionAmountTotal t1.DEDUCTION_AMOUNT_TOTAL deductionAmountTotal,
(select count(1) from CH_DISAB_ACCOUNTS_DETAIL d where d.ACCOUNTS_ID =t1.ACCOUNTS_ID and d.STATUS = 1) personDay
FROM FROM
CH_DISAB_ACCOUNTS t1 CH_DISAB_ACCOUNTS t1
LEFT JOIN CH_SRV_ORGAN t2 ON t1.SRV_ORGAN_ID = t2.SRV_ORGAN_ID LEFT JOIN CH_SRV_ORGAN t2 ON t1.SRV_ORGAN_ID = t2.SRV_ORGAN_ID
......
...@@ -48,5 +48,14 @@ ...@@ -48,5 +48,14 @@
<select id="selectByAccountsId" resultType="java.lang.String">
select f.real_name||':'||i.REMARKS from CH_DISAB_FREE_RD_INFO i left join CH_DISAB_ACCOUNTS_DETAIL d on
i.ACCOUNTS_DETAIL_ID = d.ACCOUNTS_DETAIL_ID left join CH_DISABLE_INFO f
on d.DISAB_INFO_ID = f.DISAB_INFO_ID
where i.ACCOUNTS_ID = #{accountsId} and
i.DEAL_TYPE = #{dealType}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -53,6 +53,8 @@ public class ChDisabDetailAccountsResp implements Serializable { ...@@ -53,6 +53,8 @@ public class ChDisabDetailAccountsResp implements Serializable {
private String realName; private String realName;
private String certiCode;
private String taskDetailId; private String taskDetailId;
private String deductionAmount; private String deductionAmount;
...@@ -67,5 +69,18 @@ public class ChDisabDetailAccountsResp implements Serializable { ...@@ -67,5 +69,18 @@ public class ChDisabDetailAccountsResp implements Serializable {
private Integer status; private Integer status;
// 可报金额
private String reportableAmount;
// 机构应得
private String institutionsDeserve;
// 个人应得
private String personalDeserve;
private String levelCode;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }
\ No newline at end of file
...@@ -2,6 +2,8 @@ package com.hungraim.ltc.pojo.entity.account; ...@@ -2,6 +2,8 @@ package com.hungraim.ltc.pojo.entity.account;
import lombok.Data; import lombok.Data;
import java.util.List;
/** /**
* @author mq * @author mq
*/ */
...@@ -21,4 +23,12 @@ public class ChServiceTypeDetailedVO { ...@@ -21,4 +23,12 @@ public class ChServiceTypeDetailedVO {
*/ */
private String serviceTypeDetailedId; private String serviceTypeDetailedId;
private List<String> srvPicList;
private String srvStartPic;
private String srvStartPic2;
private String srvEndPic;
} }
...@@ -7,6 +7,7 @@ import org.springframework.format.annotation.DateTimeFormat; ...@@ -7,6 +7,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List;
@Data @Data
public class SrvOrganAccountListResp { public class SrvOrganAccountListResp {
...@@ -97,5 +98,20 @@ public class SrvOrganAccountListResp { ...@@ -97,5 +98,20 @@ public class SrvOrganAccountListResp {
*/ */
private String reviewRemark; private String reviewRemark;
/**
*人次/人天
*/
private String personDay;
/**
*扣费原因
*/
private List<String> deductionReason;
/**
*补费原因
*/
private List<String> reissueReason;
} }
...@@ -964,6 +964,14 @@ public class DateUtils { ...@@ -964,6 +964,14 @@ public class DateUtils {
return day.equals(nowDay); return day.equals(nowDay);
} }
public static int getDaysOfMonth(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
return calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
}
public static void main(String[] args) {
System.out.println(getDaysOfMonth(new Date()));
}
} }
...@@ -21,6 +21,7 @@ import com.hungraim.ltc.pojo.vo.disable.SearchDisableSimpleVo; ...@@ -21,6 +21,7 @@ import com.hungraim.ltc.pojo.vo.disable.SearchDisableSimpleVo;
import com.hungraim.ltc.pojo.vo.governance.*; import com.hungraim.ltc.pojo.vo.governance.*;
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 com.hungraim.ltc.util.TokenParsingUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import oracle.sql.DATE; import oracle.sql.DATE;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
...@@ -382,7 +383,8 @@ public class BuildBedController { ...@@ -382,7 +383,8 @@ public class BuildBedController {
* @return * @return
*/ */
@GetMapping("/chPunchDetailsQuery") @GetMapping("/chPunchDetailsQuery")
public Result chPunchDetailsQuery(Long taskDetailId,String certiCode,String sevStarTime,String sevEndTime){ public Result chPunchDetailsQuery(@RequestHeader("Authorization") String token,Long taskDetailId,String certiCode,String sevStarTime,String sevEndTime){
Integer userId = TokenParsingUtil.TokenParsing(token, "userId");
ChPunchDetailsVO chPunchDetailsVO = buildBedService.chPunchDetailsQuery(taskDetailId,certiCode,sevStarTime,sevEndTime); ChPunchDetailsVO chPunchDetailsVO = buildBedService.chPunchDetailsQuery(taskDetailId,certiCode,sevStarTime,sevEndTime);
return Result.success(chPunchDetailsVO); return Result.success(chPunchDetailsVO);
......
...@@ -146,6 +146,16 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB ...@@ -146,6 +146,16 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
//打卡详情 //打卡详情
String modeType = buildBedMapper.selectModeTypeById(taskDetailId); String modeType = buildBedMapper.selectModeTypeById(taskDetailId);
List<ChServiceTypeDetailedVO> serviceTypeDetailed1s = buildBedMapper.getServiceTypeDetailed(taskDetailId,certiCode,sevStarTime, sevEndTime,modeType); List<ChServiceTypeDetailedVO> serviceTypeDetailed1s = buildBedMapper.getServiceTypeDetailed(taskDetailId,certiCode,sevStarTime, sevEndTime,modeType);
for (ChServiceTypeDetailedVO serviceTypeDetailed1 : serviceTypeDetailed1s) {
String srvStartPic = serviceTypeDetailed1.getSrvStartPic();
String srvStartPic2 = serviceTypeDetailed1.getSrvStartPic2();
String srvEndPic = serviceTypeDetailed1.getSrvEndPic();
List<String> srvPicList = new ArrayList<>();
srvPicList.add(srvStartPic);
srvPicList.add(srvStartPic2);
srvPicList.add(srvEndPic);
serviceTypeDetailed1.setSrvPicList(srvPicList);
}
log.info("chPunchDetailsQuery打卡详情:"+serviceTypeDetailed1s); log.info("chPunchDetailsQuery打卡详情:"+serviceTypeDetailed1s);
chPunchDetailsVO.setRecordData(chPunchDetailVOS); chPunchDetailsVO.setRecordData(chPunchDetailVOS);
chPunchDetailsVO.setChPunchDetailVOS(serviceTypeDetailed1s); chPunchDetailsVO.setChPunchDetailVOS(serviceTypeDetailed1s);
......
...@@ -88,7 +88,10 @@ ...@@ -88,7 +88,10 @@
case when mode1.MODE_NAME='上门' then to_char(detail.SRV_DATE, 'dd' ) case when mode1.MODE_NAME='上门' then to_char(detail.SRV_DATE, 'dd' )
else to_char(detail.SRV_DATE, 'dd' ) end executionTime, else to_char(detail.SRV_DATE, 'dd' ) end executionTime,
service.SERVICE_TYPE_DETAILED_NAME itemName, service.SERVICE_TYPE_DETAILED_NAME itemName,
service.SERVICE_TYPE_DETAILED_ID serviceTypeDetailedId service.SERVICE_TYPE_DETAILED_ID serviceTypeDetailedId,
detail.SRV_START_PIC srvStartPic,
detail.SRV_START_PIC2 srvStartPic2,
detail.SRV_END_PIC srvEndPic
FROM FROM
CH_SRV_TASK_DETAIL detail CH_SRV_TASK_DETAIL detail
inner JOIN ch_srv_task task ON task.srv_task_id = detail.srv_task_id inner JOIN ch_srv_task task ON task.srv_task_id = detail.srv_task_id
......
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