Commit c24cfb5e authored by zhangwanglin's avatar zhangwanglin

新增查询条件

parent d662953d
...@@ -17,6 +17,7 @@ import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgCostStandard; ...@@ -17,6 +17,7 @@ import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgCostStandard;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach; import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import com.hungraim.ltc.pojo.entity.account.*; import com.hungraim.ltc.pojo.entity.account.*;
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.account.*; import com.hungraim.ltc.pojo.vo.account.*;
import com.hungraim.ltc.util.*; import com.hungraim.ltc.util.*;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -572,6 +573,10 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -572,6 +573,10 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
List<AccountTaskExecuteReqVO> accountTaskList = entry.getValue(); List<AccountTaskExecuteReqVO> accountTaskList = entry.getValue();
// 处理具体的服务项目 // 处理具体的服务项目
try { try {
List<ChSrvTaskFinishItem> chSrvTaskFinishItems = chSrvTaskFinishItemMapper.selectList(new LambdaQueryWrapper<ChSrvTaskFinishItem>()
.eq(ChSrvTaskFinishItem::getTaskDetailId, taskDetailId));
for (AccountTaskExecuteReqVO accountTaskExecuteReqVO : accountTaskList) { for (AccountTaskExecuteReqVO accountTaskExecuteReqVO : accountTaskList) {
// 已申报的任务不允许再执行任务 // 已申报的任务不允许再执行任务
...@@ -587,10 +592,20 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -587,10 +592,20 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
if(integer == 0) { if(integer == 0) {
log.info("更新任务计划表失败"); log.info("更新任务计划表失败");
} }
ChSrvTaskDetail ca = new ChSrvTaskDetail();
ca.setStatus((short) 4);
ca.setTaskDetailId(Long.valueOf(accountTaskExecuteReqVO.getTaskDetailId())); List<ChSrvTaskFinishItem> chSrvTaskFinishItemStream = chSrvTaskFinishItems.stream()
chSrvTaskDetailMapper.updateById(ca); .filter(s -> s.getItemId().equals(Long.valueOf(accountTaskExecuteReqVO.getItemId()))).collect(Collectors.toList());
// 如果存在就不插入了
if (CollectionUtil.isNotEmpty(chSrvTaskFinishItemStream)) {
continue;
}
ChSrvTaskFinishItem chSrvTaskFinishItem = new ChSrvTaskFinishItem();
chSrvTaskFinishItem.setTaskDetailId(Long.valueOf(accountTaskExecuteReqVO.getTaskDetailId()));
chSrvTaskFinishItem.setItemId(Long.valueOf(accountTaskExecuteReqVO.getItemId()));
chSrvTaskFinishItemMapper.insert(chSrvTaskFinishItem);
} }
accountSave1(taskDetailId,accountTaskList); accountSave1(taskDetailId,accountTaskList);
} catch (Exception e) { } catch (Exception e) {
...@@ -608,6 +623,10 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis ...@@ -608,6 +623,10 @@ public class AccountServiceImpl extends ServiceImpl<ChDisabAccountsMapper, ChDis
if (CollectionUtil.isNotEmpty(accountsList)) { if (CollectionUtil.isNotEmpty(accountsList)) {
return; return;
} }
ChSrvTaskDetail ca = new ChSrvTaskDetail();
ca.setStatus((short) 4);
ca.setTaskDetailId(Long.valueOf(taskDetailId));
chSrvTaskDetailMapper.updateById(ca);
AccountTaskExecuteReqVO accountsVO = accountTaskList.get(0); AccountTaskExecuteReqVO accountsVO = accountTaskList.get(0);
ChDisabDetailAccounts chDisabDetailAccounts = new ChDisabDetailAccounts(); ChDisabDetailAccounts chDisabDetailAccounts = new ChDisabDetailAccounts();
String srvOrganId = accountsVO.getSrvOrganId(); String srvOrganId = accountsVO.getSrvOrganId();
......
...@@ -37,6 +37,9 @@ ...@@ -37,6 +37,9 @@
<if test="req.accountsStatus != null and req.accountsStatus != ''"> <if test="req.accountsStatus != null and req.accountsStatus != ''">
and d.status = #{req.accountsStatus} and d.status = #{req.accountsStatus}
</if> </if>
<if test="req.realName != null and req.realName != ''">
and info.real_name = #{req.realName}
</if>
<if test="req.srvOrganId != null and req.srvOrganId != '' and req.srvOrganId!=0"> <if test="req.srvOrganId != null and req.srvOrganId != '' and req.srvOrganId!=0">
and d.SRV_ORGAN_ID = #{req.srvOrganId} and d.SRV_ORGAN_ID = #{req.srvOrganId}
</if> </if>
...@@ -66,6 +69,7 @@ ...@@ -66,6 +69,7 @@
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}
and plan.IS_STATUS ='4' and plan.IS_STATUS ='4'
order by plan.SRV_PLAN_TIME desc
</select> </select>
<select id="queryNursingRecordsGoDoor" resultType="com.hungraim.ltc.pojo.entity.account.NursingRecordsRespVO"> <select id="queryNursingRecordsGoDoor" resultType="com.hungraim.ltc.pojo.entity.account.NursingRecordsRespVO">
...@@ -82,7 +86,8 @@ from CH_SRV_TASK_FINISH_ITEM item ...@@ -82,7 +86,8 @@ from CH_SRV_TASK_FINISH_ITEM item
LEFT JOIN CH_SRV_ORGAN organ ON organ.SRV_ORGAN_ID = m.SRV_ORGAN_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_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} and organ.SRV_ORGAN_ID = #{req.srvOrganId} 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
</select> </select>
...@@ -154,7 +159,8 @@ where to_char(detail.SRV_DATE, 'yyyy-MM') = #{req.accountsTime} and task.DISAB_ ...@@ -154,7 +159,8 @@ where to_char(detail.SRV_DATE, 'yyyy-MM') = #{req.accountsTime} and task.DISAB_
left join ch_srv_organ organ on plan.srv_organ_id = organ.srv_organ_id left join ch_srv_organ organ on plan.srv_organ_id = organ.srv_organ_id
left join ch_disable_info disable on plan.disab_info_id = disable.disab_info_id--失能人员 left join ch_disable_info disable on plan.disab_info_id = disable.disab_info_id--失能人员
left join CH_DISABLE_APPLY apply on apply.apply_id = disable.apply_id left join CH_DISABLE_APPLY apply on apply.apply_id = disable.apply_id
where plan.IS_STATUS = '4' and plan.IS_BILL = 1 and plan.TASK_DETAIL_ID = #{taskDetailId} left join CH_SRV_TASK_DETAIL deatil on deatil.TASK_DETAIL_ID = plan.TASK_DETAIL_ID
where deatil.STATUS = '4' and plan.TASK_DETAIL_ID = #{taskDetailId}
</select> </select>
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
AND organ.SRV_ORGAN_ID = #{req.srvOrganId} AND organ.SRV_ORGAN_ID = #{req.srvOrganId}
</if> </if>
</where> </where>
order by plan.SRV_PLAN_TIME desc
</select> </select>
......
...@@ -41,6 +41,8 @@ public class SrvOrganListReq extends BaseReq { ...@@ -41,6 +41,8 @@ public class SrvOrganListReq extends BaseReq {
private String accountsId; private String accountsId;
private String realName;
private List<String> accountsStatusList; private List<String> accountsStatusList;
} }
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