Commit cb71342b authored by 董天德's avatar 董天德

Merge remote-tracking branch 'origin/uat_ch_master' into uat_ch_master

parents 8f9b3294 30bbcec8
...@@ -224,6 +224,8 @@ public class AccountController { ...@@ -224,6 +224,8 @@ public class AccountController {
if(srvOrganId !=0) { if(srvOrganId !=0) {
srvOrganListReq.setSrvOrganId(srvOrganId); srvOrganListReq.setSrvOrganId(srvOrganId);
} }
// 不展示异地
srvOrganListReq.setFlag("1");
Page<ChDisabDetailAccountsResp> chAssessDetailAccounts = accountService.queryOrganAccountsDetail(pageNum,pageSize,srvOrganListReq); Page<ChDisabDetailAccountsResp> chAssessDetailAccounts = accountService.queryOrganAccountsDetail(pageNum,pageSize,srvOrganListReq);
return Result.success(chAssessDetailAccounts); return Result.success(chAssessDetailAccounts);
} }
...@@ -378,13 +380,8 @@ public class AccountController { ...@@ -378,13 +380,8 @@ public class AccountController {
@RequestMapping("/placeOtherApply") @RequestMapping("/placeOtherApply")
public Result placeOtherApply(Integer disabInfoId, String otherApplyTime) { public Result placeOtherApply(Integer disabInfoId, String otherApplyTime) {
Result result = accountService.placeOtherApply(disabInfoId, otherApplyTime);
int result = accountService.placeOtherApply(disabInfoId, otherApplyTime); return result;
if (result > 0) {
return Result.success();
}else {
return Result.failed("申请失败");
}
} }
......
...@@ -38,6 +38,7 @@ public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAcc ...@@ -38,6 +38,7 @@ public interface ChDisabAccountsDetailMapper extends BaseMapper<ChDisabDetailAcc
List<OrganAccountsVO> queryPlanInfoByDetailId(String taskDetailId); List<OrganAccountsVO> queryPlanInfoByDetailId(String taskDetailId);
int queryPlanByTaskDetailId(String taskDetailId);
int updateByPlanId(String planId); int updateByPlanId(String planId);
......
...@@ -62,7 +62,7 @@ public interface AccountService extends IService<ChDisabAccounts> { ...@@ -62,7 +62,7 @@ public interface AccountService extends IService<ChDisabAccounts> {
Page<ChDisabDetailAccountsResp> queryOrganAccountsDetail(Integer pageNum, Integer pageSize,SrvOrganListReq srvOrganListReq); Page<ChDisabDetailAccountsResp> queryOrganAccountsDetail(Integer pageNum, Integer pageSize,SrvOrganListReq srvOrganListReq);
int placeOtherApply(Integer disabInfoId, String otherApplyTime); Result placeOtherApply(Integer disabInfoId, String otherApplyTime);
Page<PlaceOtherVO> placeOtherQuery(Page page, String name, String certiCode); Page<PlaceOtherVO> placeOtherQuery(Page page, String name, String certiCode);
......
...@@ -70,6 +70,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -70,6 +70,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
chDisabAccounts.setReviewRemark(accountOperVo.getReviewRemark()); chDisabAccounts.setReviewRemark(accountOperVo.getReviewRemark());
Short accountsStatus = accountOperVo.getAccountsStatus(); Short accountsStatus = accountOperVo.getAccountsStatus();
String accountsId = String.valueOf(accountOperVo.getAccountsId()); String accountsId = String.valueOf(accountOperVo.getAccountsId());
String modeName = accountOperVo.getModeName();
// 驳回 // 驳回
if(accountsStatus == 0) { if(accountsStatus == 0) {
chDisabAccountsDetailMapper.updateByAccountsId(accountsId,0); chDisabAccountsDetailMapper.updateByAccountsId(accountsId,0);
...@@ -80,7 +81,9 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -80,7 +81,9 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
chDisabAccounts.setDeductionAmountTotal(BigDecimal.valueOf(0)); chDisabAccounts.setDeductionAmountTotal(BigDecimal.valueOf(0));
HashMap map = new HashMap(); HashMap map = new HashMap();
map.put("ACCOUNTS_ID",accountsId); map.put("ACCOUNTS_ID",accountsId);
// 删除对应扣减历史数据
chDisabFreeRdInfoMapper.deleteByMap(map); chDisabFreeRdInfoMapper.deleteByMap(map);
} }
// 已结算 // 已结算
if(accountsStatus == 4) { if(accountsStatus == 4) {
...@@ -611,6 +614,12 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -611,6 +614,12 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
List<OrganAccountsVO> accountsList = chDisabAccountsDetailMapper.queryPlanInfoByDetailId(taskDetailId); List<OrganAccountsVO> accountsList = chDisabAccountsDetailMapper.queryPlanInfoByDetailId(taskDetailId);
if (CollectionUtil.isNotEmpty(accountsList)) { if (CollectionUtil.isNotEmpty(accountsList)) {
return; return;
}else {
// 不同的护理人员同一天对同一个失能人员服务项目只计一条费用
int count = chDisabAccountsDetailMapper.queryPlanByTaskDetailId(taskDetailId);
if(count>0){
return;
}
} }
ChSrvTaskDetail ca = new ChSrvTaskDetail(); ChSrvTaskDetail ca = new ChSrvTaskDetail();
ca.setStatus((short) 4); ca.setStatus((short) 4);
...@@ -647,7 +656,6 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -647,7 +656,6 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
chDisabDetailAccounts.setAccountsPersonalCost(personalCost); chDisabDetailAccounts.setAccountsPersonalCost(personalCost);
chDisabDetailAccounts.setModeName(accountsVO.getSrvModeName()); chDisabDetailAccounts.setModeName(accountsVO.getSrvModeName());
chDisabDetailAccounts.setSrvOrganId(srvOrganId); chDisabDetailAccounts.setSrvOrganId(srvOrganId);
chDisabDetailAccounts.setEmpId(accountsVO.getEmpId());
chDisabDetailAccounts.setCreationTime(new Date()); chDisabDetailAccounts.setCreationTime(new Date());
chDisabDetailAccounts.setAccountsTime(accountsTime); chDisabDetailAccounts.setAccountsTime(accountsTime);
chDisabDetailAccounts.setAccountsStartTime(DateUtils.getFirstDayOfMonth(DateUtils.strToDate(accountsVO.getSrvDate()))); chDisabDetailAccounts.setAccountsStartTime(DateUtils.getFirstDayOfMonth(DateUtils.strToDate(accountsVO.getSrvDate())));
...@@ -874,18 +882,23 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -874,18 +882,23 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
} }
@Override @Override
public int placeOtherApply(Integer disabInfoId, String otherApplyTime) { public Result placeOtherApply(Integer disabInfoId, String otherApplyTime) {
int result = taskDetailMapper.placeOtherApply(disabInfoId,otherApplyTime); int result = taskDetailMapper.placeOtherApply(disabInfoId,otherApplyTime);
Date date = DateUtils.strToDate(otherApplyTime); Result result1 =Result.success();
boolean now = DateUtils.isNow(date); if (result > 0) {
if (now) { Date date = DateUtils.strToDate(otherApplyTime);
placeFreeHandler(disabInfoId, otherApplyTime); boolean now = DateUtils.isNow(date);
if (now) {
result1 = placeFreeHandler(disabInfoId, otherApplyTime);
}
return result1;
}else {
return Result.failed("申请失败");
} }
return result;
} }
private void placeFreeHandler(Integer disabInfoId, String otherApplyTime) { private Result 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), "异地");
...@@ -920,8 +933,8 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -920,8 +933,8 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
}else { }else {
BigDecimal allCost1 = chDisabAccounts.getAllCost(); BigDecimal allCost1 = chDisabAccounts.getAllCost();
BigDecimal overallCost1 = chDisabAccounts.getOverallCost(); BigDecimal overallCost1 = chDisabAccounts.getOverallCost();
allCost1 = allCost1.add(chDisabDetailAccountsDTO.getAccountsAllCost()); allCost1 = allCost1.add(limit);
overallCost1 = overallCost1.add(chDisabDetailAccountsDTO.getAccountsAllCost()); overallCost1 = overallCost1.add(limit);
ChDisabAccounts chDisabAccount = new ChDisabAccounts(); ChDisabAccounts chDisabAccount = new ChDisabAccounts();
chDisabAccount.setAllCost(allCost1); chDisabAccount.setAllCost(allCost1);
chDisabAccount.setOverallCost(overallCost1); chDisabAccount.setOverallCost(overallCost1);
...@@ -932,6 +945,13 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -932,6 +945,13 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
chDisabDetailAccounts.setAccountsId(chDisabAccounts.getAccountsId()); chDisabDetailAccounts.setAccountsId(chDisabAccounts.getAccountsId());
chDisabAccountsDetailMapper.insert(chDisabDetailAccounts); chDisabAccountsDetailMapper.insert(chDisabDetailAccounts);
} else { } else {
Long accountsId = chDisabDetailAccountsDTO.getAccountsId();
ChDisabAccounts chDisabAccountDTO = disabAccountsMapper.selectById(accountsId);
Short accountsStatus = chDisabAccountDTO.getAccountsStatus();
if(accountsStatus > 1){
log.info("{},已完成审核",accountsId);
Result.failed("提交月份已完成审核,请联系管理员");;
}
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));
...@@ -939,6 +959,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -939,6 +959,7 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
chDisabDetailAccountsDTO.setAccountsPersonalCost(zero); chDisabDetailAccountsDTO.setAccountsPersonalCost(zero);
chDisabAccountsDetailMapper.updateById(chDisabDetailAccountsDTO); chDisabAccountsDetailMapper.updateById(chDisabDetailAccountsDTO);
} }
return Result.success();
} }
@Override @Override
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
to_char(d.ACCOUNTS_START_TIME,'yyyy-MM-dd') accountsStartTime, to_char(d.ACCOUNTS_START_TIME,'yyyy-MM-dd') accountsStartTime,
to_char(d.ACCOUNTS_END_TIME,'yyyy-MM-dd') accountsEndTime, to_char(d.ACCOUNTS_END_TIME,'yyyy-MM-dd') accountsEndTime,
to_char(d.ACCOUNTS_TIME,'yyyy-MM') accountsTime, to_char(d.ACCOUNTS_TIME,'yyyy-MM') accountsTime,
emp.EMP_NAME empName,
d.ACCOUNTS_ALL_COST accountsAllCost, d.ACCOUNTS_ALL_COST accountsAllCost,
d.ACCOUNTS_OVERALL_COST accountsOverallCost, d.ACCOUNTS_OVERALL_COST accountsOverallCost,
d.ACCOUNTS_PERSONAL_COST accountsPersonalCost, d.ACCOUNTS_PERSONAL_COST accountsPersonalCost,
...@@ -25,9 +24,11 @@ ...@@ -25,9 +24,11 @@
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
left join CH_SRV_ORGAN o on d.SRV_ORGAN_ID = o.SRV_ORGAN_ID left join CH_SRV_ORGAN o on d.SRV_ORGAN_ID = o.SRV_ORGAN_ID
left join ch_srv_organ_emp emp on d.emp_id = emp.emp_id
<where> <where>
1=1 1=1
<if test="req.flag != null and req.flag != ''">
and d.mode_name <![CDATA[ <>]]> '异地'
</if>
<if test="req.accountsId != null and req.accountsId != ''"> <if test="req.accountsId != null and req.accountsId != ''">
and d.ACCOUNTS_ID = #{req.accountsId} and d.ACCOUNTS_ID = #{req.accountsId}
</if> </if>
...@@ -62,9 +63,11 @@ ...@@ -62,9 +63,11 @@
to_char(plan.SRV_PLAN_TIME,'yyyy-MM-dd') srvPlanTime, to_char(plan.SRV_PLAN_TIME,'yyyy-MM-dd') srvPlanTime,
DECODE(plan.MODE_ID, '1','医疗','2', '养老','3','上门') modeName, DECODE(plan.MODE_ID, '1','医疗','2', '养老','3','上门') modeName,
to_char(plan.CREATION_TIME,'yyyy-MM-dd HH24:mi:ss') executionTime, to_char(plan.CREATION_TIME,'yyyy-MM-dd HH24:mi:ss') executionTime,
plan.item_name itemName plan.item_name itemName,
emp.EMP_NAME empName
from CH_SRV_PLAN plan from CH_SRV_PLAN plan
left join CH_SRV_ORGAN organ on organ.SRV_ORGAN_ID = plan.SRV_ORGAN_ID left join CH_SRV_ORGAN organ on organ.SRV_ORGAN_ID = plan.SRV_ORGAN_ID
left join ch_srv_organ_emp emp on plan.emp_id = emp.emp_id
where plan.DISAB_INFO_ID = #{req.disabInfoId} where plan.DISAB_INFO_ID = #{req.disabInfoId}
and plan.SRV_ORGAN_ID = #{req.srvOrganId} and plan.SRV_ORGAN_ID = #{req.srvOrganId}
and plan.MODE_ID = #{req.modeId} and plan.MODE_ID = #{req.modeId}
...@@ -80,7 +83,8 @@ ...@@ -80,7 +83,8 @@
to_char(item.FCD,'yyyy-MM-dd HH24:mi:ss') executionTime, to_char(item.FCD,'yyyy-MM-dd HH24:mi:ss') executionTime,
service.SERVICE_TYPE_DETAILED_NAME itemName, service.SERVICE_TYPE_DETAILED_NAME itemName,
to_char(detail.SRV_START_TIME,'yyyy-MM-dd HH24:mi:ss') srvStartTime, to_char(detail.SRV_START_TIME,'yyyy-MM-dd HH24:mi:ss') srvStartTime,
to_char(detail.SRV_END_TIME,'yyyy-MM-dd HH24:mi:ss') srvEndTime to_char(detail.SRV_END_TIME,'yyyy-MM-dd HH24:mi:ss') srvEndTime,
m.EMP_NAME empName
from CH_SRV_TASK_FINISH_ITEM item 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_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_TASK task on task.SRV_TASK_ID = detail.SRV_TASK_ID
...@@ -165,6 +169,11 @@ and organ.SRV_ORGAN_ID = #{req.srvOrganId} order by detail.SRV_DATE desc ...@@ -165,6 +169,11 @@ and organ.SRV_ORGAN_ID = #{req.srvOrganId} order by detail.SRV_DATE desc
where deatil.STATUS = '4' and plan.TASK_DETAIL_ID = #{taskDetailId} where deatil.STATUS = '4' and plan.TASK_DETAIL_ID = #{taskDetailId}
</select> </select>
<select id="queryPlanByTaskDetailId" resultType="java.lang.Integer">
select count(1) from CH_SRV_PLAN p where p.DISAB_INFO_ID
in (select DISAB_INFO_ID from CH_SRV_PLAN where TASK_DETAIL_ID = #{taskDetailId}) and p.IS_STATUS = '4'
</select>
<!--查询评估信息--> <!--查询评估信息-->
......
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
left join ch_apr_organ aprOrgan on task.apr_organ_id = aprOrgan.apr_organ_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 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 where info.SRV_MODE_ID ='4' and sysdate <![CDATA[ > ]]> report.PUBLICITY_END_TIME
and report.DISABLE_LEVEL_ID in (3,4,5)
<if test="name != null and name != ''"> <if test="name != null and name != ''">
and info.REAL_NAME like CONCAT(CONCAT('%',#{name}) ,'%') and info.REAL_NAME like CONCAT(CONCAT('%',#{name}) ,'%')
</if> </if>
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_CITY = dis.DISTRICT_CODE) districPity, (select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_CITY = dis.DISTRICT_CODE) districPity,
(select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_AREA = dis.DISTRICT_CODE) districtArea, (select DISTRICT_NAME from CH_FND_DISTRICT dis where task.DISTRICT_AREA = dis.DISTRICT_CODE) districtArea,
disable.real_name realName, disable.real_name realName,
task.fcd fcd, to_char(apply.APPLY_TIME,'yyyy-MM-dd') fcd,
disable.certi_code certiCode, disable.certi_code certiCode,
disable.disease_desc diseaseDesc, disable.disease_desc diseaseDesc,
disable.adress_detail operAddress, disable.adress_detail operAddress,
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
left join ch_apr_organ aprOrgan on task.apr_organ_id = aprOrgan.apr_organ_id left join ch_apr_organ aprOrgan on task.apr_organ_id = aprOrgan.apr_organ_id
-- left join ch_srv_organ organ on aprOrgan.organ_id = organ.organ_id -- left join ch_srv_organ organ on aprOrgan.organ_id = organ.organ_id
left join ch_disable_info disable on task.disable_info_id = disable.disab_info_id left join ch_disable_info disable on task.disable_info_id = disable.disab_info_id
left join CH_DISABLE_APPLY apply on apply.apply_id = disable.apply_id
left join ch_apr_emp emp on task.apr_emp_id = emp.emp_id and emp.IS_LOCK = 0 left join ch_apr_emp emp on task.apr_emp_id = emp.emp_id and emp.IS_LOCK = 0
left join ch_apr_task_push push on task.task_id = push.task_id left join ch_apr_task_push push on task.task_id = push.task_id
left join ch_apr_task_emp cate on task.task_id = cate.task_id left join ch_apr_task_emp cate on task.task_id = cate.task_id
......
...@@ -84,10 +84,7 @@ public class ChDisabDetailAccounts implements Serializable { ...@@ -84,10 +84,7 @@ public class ChDisabDetailAccounts implements Serializable {
*/ */
private String taskDetailId; private String taskDetailId;
/**
* 护理人员id
*/
private Long empId;
/** /**
* 统筹区 * 统筹区
......
...@@ -37,5 +37,7 @@ public class NursingRecordsRespVO { ...@@ -37,5 +37,7 @@ public class NursingRecordsRespVO {
private String srvEndTime; private String srvEndTime;
private String empName;
} }
...@@ -15,6 +15,11 @@ public class AccountOperVo extends ChDisabAccounts { ...@@ -15,6 +15,11 @@ public class AccountOperVo extends ChDisabAccounts {
private String organId; private String organId;
/** /**
* 服务方式
**/
private String modeName;
/**
* 文件列表数据对象 * 文件列表数据对象
*/ */
private List<ChFndAttach> fileDataList; private List<ChFndAttach> fileDataList;
......
...@@ -44,5 +44,7 @@ public class SrvOrganListReq extends BaseReq { ...@@ -44,5 +44,7 @@ public class SrvOrganListReq extends BaseReq {
private String realName; private String realName;
private List<String> accountsStatusList; private List<String> accountsStatusList;
// 是否展示异地 1 不展示
private String flag;
} }
...@@ -22,8 +22,9 @@ public class TaskDistributionVO { ...@@ -22,8 +22,9 @@ public class TaskDistributionVO {
//失能人员姓名 //失能人员姓名
private String realName; private String realName;
//申请日期 //申请日期
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") // @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date fcd; // private Date fcd;
private String fcd;
//失能人员身份证号码 //失能人员身份证号码
private String certiCode; private String certiCode;
//保单号 //保单号
......
...@@ -182,6 +182,13 @@ public class BuildBedController { ...@@ -182,6 +182,13 @@ public class BuildBedController {
if (StrUtil.isBlankIfStr(disableInfoId)) { if (StrUtil.isBlankIfStr(disableInfoId)) {
return Result.failed("失能人员ID 为空!"); return Result.failed("失能人员ID 为空!");
} }
ChDisableInfo chDisableInfo = disableInfoServie.querySrvModeId(Long.valueOf(disableInfoId));
Integer exitReasonId = chDisableInfo.getExitReasonId();
if(exitReasonId != null && 1 == exitReasonId){
return Result.failed("该失能人员已死亡退出,不能进行操作");
}
DisableInfoTaskVO disableInfoTaskVO = sendService.selectTaskById(disableInfoId, srvOrganId); DisableInfoTaskVO disableInfoTaskVO = sendService.selectTaskById(disableInfoId, srvOrganId);
List<DisableInfoTaskVO> disableInfoTaskVO1 = sendService.selectBydisableInfoId(disableInfoId); List<DisableInfoTaskVO> disableInfoTaskVO1 = sendService.selectBydisableInfoId(disableInfoId);
Map map = new HashMap<>(); Map map = new HashMap<>();
...@@ -242,17 +249,17 @@ public class BuildBedController { ...@@ -242,17 +249,17 @@ public class BuildBedController {
} }
ChDisableInfo chDisableInfo = disableInfoServie.querySrvModeId(disabInfoId); ChDisableInfo chDisableInfo = disableInfoServie.querySrvModeId(disabInfoId);
Integer srvModeId = chDisableInfo.getSrvModeId(); Integer srvModeId = chDisableInfo.getSrvModeId();
Integer exitReasonId = chDisableInfo.getExitReasonId(); /* Integer exitReasonId = chDisableInfo.getExitReasonId();
if(exitReasonId!= null && 1 == exitReasonId){ if(exitReasonId!= null && 1 == exitReasonId){
return Result.failed("该失能人员已死亡退出,不能进行操作"); return Result.failed("该失能人员已死亡退出,不能进行操作");
} }
*/
List<ChSrvSend> chSrvSendsList = chSrvSendMapper.selectList(new LambdaQueryWrapper<ChSrvSend>() List<ChSrvSend> chSrvSendsList = chSrvSendMapper.selectList(new LambdaQueryWrapper<ChSrvSend>()
.eq(ChSrvSend::getDisabInfoId, disabInfoId) .eq(ChSrvSend::getDisabInfoId, disabInfoId)
.eq(ChSrvSend::getStatus, (short) 1)); .eq(ChSrvSend::getStatus, (short) 1));
if (chSrvSendsList.size() > 0) { /* if (chSrvSendsList.size() > 0) {
return Result.failed("已分配护理机构,请先终止或退出再操作"); return Result.failed("已分配护理机构,请先终止或退出再操作");
} }*/
Long srvModeId1 = chSrvSend.getSrvModeId(); Long srvModeId1 = chSrvSend.getSrvModeId();
if(srvModeId != srvModeId1.intValue()){ if(srvModeId != srvModeId1.intValue()){
......
...@@ -170,12 +170,12 @@ public class SrvProgramController { ...@@ -170,12 +170,12 @@ public class SrvProgramController {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR); return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
} }
// 添加的话,需要校验其它服务方案是否已终止 // 添加的话,需要校验其它服务方案是否已终止
if (programDetailVo.getProgramId() == null) { /* if (programDetailVo.getProgramId() == null) {
List<ChSrvProgram> srvPrograms = srvProgramService.getProgramSetCountByProgStatus(programDetailVo.getDisabInfoId(), programDetailVo.getSrvOrganId(), "2"); List<ChSrvProgram> srvPrograms = srvProgramService.getProgramSetCountByProgStatus(programDetailVo.getDisabInfoId(), programDetailVo.getSrvOrganId(), "2");
if (srvPrograms.size() > 0) { if (srvPrograms.size() > 0) {
return Result.failed(ResultCode.REQUEST_PROGRAM_ADD_ERROR); return Result.failed(ResultCode.REQUEST_PROGRAM_ADD_ERROR);
} }
} }*/
// 进行添加或者修改操作 // 进行添加或者修改操作
srvProgramService.addProgramAndProgramSetList(programDetailVo); srvProgramService.addProgramAndProgramSetList(programDetailVo);
return Result.success(); return Result.success();
......
...@@ -40,7 +40,9 @@ public interface BuildBedMapper extends BaseMapper<ChSrvBuildBed> { ...@@ -40,7 +40,9 @@ public interface BuildBedMapper extends BaseMapper<ChSrvBuildBed> {
ChPunchDetailsVO getsrvOrgan(Long taskDetailId); ChPunchDetailsVO getsrvOrgan(Long taskDetailId);
List<ChServiceTypeDetailedVO> getServiceTypeDetailed(@Param("taskDetailId")Long taskDetailId,@Param("certiCode")String certiCode,@Param("sevStarTime")String sevStarTime,@Param("sevEndTime")String sevEndTime); List<ChServiceTypeDetailedVO> getServiceTypeDetailed(@Param("taskDetailId")Long taskDetailId,@Param("certiCode")String certiCode,@Param("sevStarTime")String sevStarTime,@Param("sevEndTime")String sevEndTime,@Param("modeType")String modeType);
List<ChServiceTypeVO> selectServiceTypeDetailed(); List<ChServiceTypeVO> selectServiceTypeDetailed();
String selectModeTypeById(@Param("pId")Long pId);
} }
...@@ -144,7 +144,8 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB ...@@ -144,7 +144,8 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
} }
log.info("chPunchDetailsQuery获取服务机构和服务类型:"+chPunchDetailsVO); log.info("chPunchDetailsQuery获取服务机构和服务类型:"+chPunchDetailsVO);
//打卡详情 //打卡详情
List<ChServiceTypeDetailedVO> serviceTypeDetailed1s = buildBedMapper.getServiceTypeDetailed(taskDetailId,certiCode,sevStarTime, sevEndTime); String modeType = buildBedMapper.selectModeTypeById(taskDetailId);
List<ChServiceTypeDetailedVO> serviceTypeDetailed1s = buildBedMapper.getServiceTypeDetailed(taskDetailId,certiCode,sevStarTime, sevEndTime,modeType);
log.info("chPunchDetailsQuery打卡详情:"+serviceTypeDetailed1s); log.info("chPunchDetailsQuery打卡详情:"+serviceTypeDetailed1s);
chPunchDetailsVO.setRecordData(chPunchDetailVOS); chPunchDetailsVO.setRecordData(chPunchDetailVOS);
chPunchDetailsVO.setChPunchDetailVOS(serviceTypeDetailed1s); chPunchDetailsVO.setChPunchDetailVOS(serviceTypeDetailed1s);
......
...@@ -72,20 +72,27 @@ ...@@ -72,20 +72,27 @@
</select> </select>
<select id="selectModeTypeById" resultType="String">
select mode1.MODE_NAME from ch_srv_program program
inner JOIN ch_cfg_srv_mode mode1 ON program.srv_mode_id = mode1.mode_id
where program.PROGRAM_ID = #{pId}
</select>
<select id="getServiceTypeDetailed" parameterType="Long" resultType="com.hungraim.ltc.pojo.entity.account.ChServiceTypeDetailedVO"> <select id="getServiceTypeDetailed" parameterType="Long" resultType="com.hungraim.ltc.pojo.entity.account.ChServiceTypeDetailedVO">
SELECT SELECT
detail.TASK_DETAIL_ID, case when mode1.MODE_NAME='上门' then to_char(detail.SRV_START_TIME, 'dd' )
detail.SRV_START_TIME , else to_char(item.FCD, 'dd' ) end executionTime,
detail.SRV_END_TIME,
to_char( detail.SRV_START_TIME, 'dd' ) 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
FROM FROM
CH_SRV_TASK_DETAIL detail CH_SRV_TASK_DETAIL detail
LEFT 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
LEFT JOIN CH_SRV_TASK_FINISH_ITEM item ON detail.TASK_DETAIL_ID = item.TASK_DETAIL_ID inner JOIN ch_srv_program program on program.PROGRAM_ID=task.PROGRAM_ID
LEFT JOIN CH_SRV_ORGAN_PROJECT CSOP ON CSOP.PROJECT_ID = item.ITEM_ID inner JOIN ch_cfg_srv_mode mode1 ON program.srv_mode_id = mode1.mode_id
left join CH_SERVICE_TYPE_DETAILED service on service.SERVICE_TYPE_DETAILED_ID = CSOP.ITEM_NAME inner JOIN CH_SRV_TASK_FINISH_ITEM item ON detail.TASK_DETAIL_ID = item.TASK_DETAIL_ID
inner JOIN CH_SRV_ORGAN_PROJECT CSOP ON CSOP.PROJECT_ID = item.ITEM_ID
inner join CH_SERVICE_TYPE_DETAILED service on service.SERVICE_TYPE_DETAILED_ID = CSOP.ITEM_NAME
WHERE 1=1 WHERE 1=1
<if test="taskDetailId != null and taskDetailId != ''"> <if test="taskDetailId != null and taskDetailId != ''">
and task.PROGRAM_ID = #{taskDetailId} and task.PROGRAM_ID = #{taskDetailId}
...@@ -94,12 +101,19 @@ ...@@ -94,12 +101,19 @@
<if test="certiCode != null and certiCode != ''"> <if test="certiCode != null and certiCode != ''">
and task.DISAB_INFO_ID = (select DISAB_INFO_ID from CH_DISABLE_INFO where CERTI_CODE =#{certiCode}) and task.DISAB_INFO_ID = (select DISAB_INFO_ID from CH_DISABLE_INFO where CERTI_CODE =#{certiCode})
</if> </if>
<if test="sevStarTime != null and sevStarTime != ''"> <choose>
AND detail.SRV_START_TIME &gt;= TO_DATE (substr(#{sevStarTime},1,10), 'yyyy-mm-dd') <when test="modeType == '上门'">
</if> <if test="sevStarTime != null and sevStarTime != ''">
<if test="sevEndTime != null and sevEndTime != ''"> AND detail.SRV_START_TIME &gt;= TO_DATE (substr(#{sevStarTime},1,10), 'yyyy-mm-dd')
AND detail.SRV_END_TIME &lt;= TO_DATE (substr(#{sevEndTime},1,10), 'yyyy-mm-dd') </if>
</if> <if test="sevEndTime != null and sevEndTime != ''">
AND detail.SRV_END_TIME &lt;= TO_DATE (substr(#{sevEndTime},1,10), 'yyyy-mm-dd')
</if>
</when>
<otherwise>
AND item.FCD >= TO_DATE (substr(#{sevStarTime},1,10), 'yyyy-mm-dd')
</otherwise>
</choose>
</select> </select>
<select id="selectServiceTypeDetailed" resultType="com.hungraim.ltc.pojo.entity.account.ChServiceTypeVO"> <select id="selectServiceTypeDetailed" resultType="com.hungraim.ltc.pojo.entity.account.ChServiceTypeVO">
...@@ -115,5 +129,4 @@ ...@@ -115,5 +129,4 @@
</mapper> </mapper>
\ No newline at end of file
...@@ -52,9 +52,11 @@ ...@@ -52,9 +52,11 @@
FROM CH_SRV_SEND T1 FROM CH_SRV_SEND T1
INNER JOIN CH_SRV_ORGAN T2 ON T1.SRV_ORGAN_ID = T2.SRV_ORGAN_ID INNER JOIN CH_SRV_ORGAN T2 ON T1.SRV_ORGAN_ID = T2.SRV_ORGAN_ID
INNER JOIN CH_DISABLE_INFO T3 ON T1.DISAB_INFO_ID = T3.DISAB_INFO_ID INNER JOIN CH_DISABLE_INFO T3 ON T1.DISAB_INFO_ID = T3.DISAB_INFO_ID
INNER JOIN CH_SRV_BUILD_BED T4 ON T1.DISAB_INFO_ID = T4.DISAB_INFO_ID
<where> <where>
T4.STATUS = 0
<if test="srvOrganId != null and srvOrganId != 0"> <if test="srvOrganId != null and srvOrganId != 0">
T1.SRV_ORGAN_ID = #{srvOrganId} AND T1.SRV_ORGAN_ID = #{srvOrganId}
</if> </if>
<if test="realName != null and realName != ''"> <if test="realName != null and realName != ''">
AND T3.REAL_NAME LIKE CONCAT(CONCAT('%',#{realName}),'%') AND T3.REAL_NAME LIKE CONCAT(CONCAT('%',#{realName}),'%')
......
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