Commit ad9b07e7 authored by 18310373984@163.com's avatar 18310373984@163.com

1.打卡管理列表增加登陆人员所属护理机构查询条件

2.机构端可查看护理人员打卡第二张照片 3.异地登记列表接口返回增加applyid,便于异地退出功能 4.异地费用计算增加退出时间限制条件
parent a6c17332
...@@ -148,12 +148,14 @@ ...@@ -148,12 +148,14 @@
report.PUBLICITY_END_TIME publicityEndTime, report.PUBLICITY_END_TIME publicityEndTime,
report.PUBLICITY_TIME publicityTime, report.PUBLICITY_TIME publicityTime,
to_char(info.OTHER_APPLY_TIME,'yyyy-MM-dd') otherApplyTime, to_char(info.OTHER_APPLY_TIME,'yyyy-MM-dd') otherApplyTime,
info.EXIT_FLAG exitFlag info.EXIT_FLAG exitFlag,
apply.APPLY_ID applyId
FROM CH_DISABLE_INFO info FROM CH_DISABLE_INFO info
LEFT JOIN CH_APR_TASK task ON info.DISAB_INFO_ID = task.DISABLE_INFO_ID 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_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_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
left join CH_DISABLE_APPLY apply on apply.APPLY_ID = info.APPLY_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) and report.DISABLE_LEVEL_ID in (3,4,5)
<if test="name != null and name != ''"> <if test="name != null and name != ''">
...@@ -178,6 +180,8 @@ ...@@ -178,6 +180,8 @@
and info.DISAB_INFO_ID not in ( and info.DISAB_INFO_ID not in (
select d.disab_info_id from CH_DISAB_ACCOUNTS_detail d where d.mode_name <![CDATA[ <> ]]> '异地' and to_char(d.accounts_time,'yyyy-MM') = to_char(sysdate,'yyyy-MM') select d.disab_info_id from CH_DISAB_ACCOUNTS_detail d where d.mode_name <![CDATA[ <> ]]> '异地' and to_char(d.accounts_time,'yyyy-MM') = to_char(sysdate,'yyyy-MM')
) )
-- 该人员未退出,或者退出时间大于等于当月时间才需要结算金额
and (info.EXIT_TIME is null or info.EXIT_TIME = to_date(to_char(sysdate,'yyyy-MM-dd'),'yyyy-MM-dd'))
</select> </select>
......
...@@ -18,4 +18,5 @@ public class PlaceOtherVO { ...@@ -18,4 +18,5 @@ public class PlaceOtherVO {
private String otherApplyTime; private String otherApplyTime;
private Integer exitFlag;//退出标识,如果已退出,则不用点击退出 private Integer exitFlag;//退出标识,如果已退出,则不用点击退出
private Integer applyId;
} }
...@@ -410,7 +410,8 @@ public class BuildBedController { ...@@ -410,7 +410,8 @@ public class BuildBedController {
@GetMapping("/chPunchDetailsQuery") @GetMapping("/chPunchDetailsQuery")
public Result chPunchDetailsQuery(@RequestHeader("Authorization") String token,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"); Integer userId = TokenParsingUtil.TokenParsing(token, "userId");
ChPunchDetailsVO chPunchDetailsVO = buildBedService.chPunchDetailsQuery(taskDetailId,certiCode,sevStarTime,sevEndTime,userId); Integer srvOrganId = TokenParsingUtil.TokenParsing(token, "srvOrganId");
ChPunchDetailsVO chPunchDetailsVO = buildBedService.chPunchDetailsQuery(taskDetailId,certiCode,sevStarTime,sevEndTime,userId,srvOrganId);
return Result.success(chPunchDetailsVO); return Result.success(chPunchDetailsVO);
} }
......
...@@ -41,7 +41,8 @@ public interface BuildBedMapper extends BaseMapper<ChSrvBuildBed> { ...@@ -41,7 +41,8 @@ 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,@Param("modeType")String modeType); List<ChServiceTypeDetailedVO> getServiceTypeDetailed(@Param("taskDetailId")Long taskDetailId,@Param("certiCode")String certiCode,@Param("sevStarTime")String sevStarTime,
@Param("sevEndTime")String sevEndTime,@Param("modeType")String modeType,@Param("srvOrganId")Integer srvOrganId);
List<ChServiceTypeVO> selectServiceTypeDetailed(); List<ChServiceTypeVO> selectServiceTypeDetailed();
...@@ -51,6 +52,7 @@ public interface BuildBedMapper extends BaseMapper<ChSrvBuildBed> { ...@@ -51,6 +52,7 @@ public interface BuildBedMapper extends BaseMapper<ChSrvBuildBed> {
List<Map> getSrvSumTime(@Param("taskDetailId")Long taskDetailId, @Param("certiCode")String certiCode, @Param("sevStarTime")String sevStarTime, @Param("sevEndTime")String sevEndTime, @Param("modeType")String modeType); List<Map> getSrvSumTime(@Param("taskDetailId")Long taskDetailId, @Param("certiCode")String certiCode, @Param("sevStarTime")String sevStarTime, @Param("sevEndTime")String sevEndTime, @Param("modeType")String modeType);
List<ChServiceTypeDetailedVO> getServiceTypeDetailedBySrvPlan(@Param("taskDetailId")Long taskDetailId,@Param("certiCode")String certiCode,@Param("sevStarTime")String sevStarTime,@Param("sevEndTime")String sevEndTime,@Param("modeType")String modeType); List<ChServiceTypeDetailedVO> getServiceTypeDetailedBySrvPlan(@Param("taskDetailId")Long taskDetailId,@Param("certiCode")String certiCode,@Param("sevStarTime")String sevStarTime,
@Param("sevEndTime")String sevEndTime,@Param("modeType")String modeType,@Param("srvOrganId")Integer srvOrganId);
} }
...@@ -53,5 +53,5 @@ public interface IBuildBedService extends IService<ChSrvBuildBed> { ...@@ -53,5 +53,5 @@ public interface IBuildBedService extends IService<ChSrvBuildBed> {
* 打卡详情 * 打卡详情
* @param taskDetailId * @param taskDetailId
*/ */
ChPunchDetailsVO chPunchDetailsQuery(Long taskDetailId,String certiCode,String sevStarTime,String sevEndTime,Integer userId); ChPunchDetailsVO chPunchDetailsQuery(Long taskDetailId,String certiCode,String sevStarTime,String sevEndTime,Integer userId, Integer srvOrganId);
} }
...@@ -131,7 +131,7 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB ...@@ -131,7 +131,7 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
* @param taskDetailId * @param taskDetailId
*/ */
@Override @Override
public ChPunchDetailsVO chPunchDetailsQuery(Long taskDetailId,String certiCode, String sevStarTime,String sevEndTime,Integer userId) { public ChPunchDetailsVO chPunchDetailsQuery(Long taskDetailId,String certiCode, String sevStarTime,String sevEndTime,Integer userId,Integer srvOrganId) {
List<ChPunchDetailVO> chPunchDetailVOS = new ArrayList<>(); List<ChPunchDetailVO> chPunchDetailVOS = new ArrayList<>();
//获取项目信息 //获取项目信息
List<ChServiceTypeVO> chServiceTypeDetaileds = buildBedMapper.selectServiceTypeDetailed(); List<ChServiceTypeVO> chServiceTypeDetaileds = buildBedMapper.selectServiceTypeDetailed();
...@@ -162,9 +162,9 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB ...@@ -162,9 +162,9 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
List<ChServiceTypeDetailedVO> serviceTypeDetailed1s = new ArrayList<ChServiceTypeDetailedVO>(); List<ChServiceTypeDetailedVO> serviceTypeDetailed1s = new ArrayList<ChServiceTypeDetailedVO>();
int sendCount=srvSendMapper.getCountSrvSend(certiCode); int sendCount=srvSendMapper.getCountSrvSend(certiCode);
if(sendCount>1) {//如果有多个分配记录,则按该方法查询打卡列表 if(sendCount>1) {//如果有多个分配记录,则按该方法查询打卡列表
serviceTypeDetailed1s = buildBedMapper.getServiceTypeDetailedBySrvPlan(taskDetailId,certiCode,sevStarTime, sevEndTime,modeType); serviceTypeDetailed1s = buildBedMapper.getServiceTypeDetailedBySrvPlan(taskDetailId,certiCode,sevStarTime, sevEndTime,modeType,srvOrganId);
}else{//否则还按原先逻辑 }else{//否则还按原先逻辑
serviceTypeDetailed1s = buildBedMapper.getServiceTypeDetailed(taskDetailId,certiCode,sevStarTime, sevEndTime,modeType); serviceTypeDetailed1s = buildBedMapper.getServiceTypeDetailed(taskDetailId,certiCode,sevStarTime, sevEndTime,modeType,srvOrganId);
} }
List<String> roleIds = picRoleConfig.getRoleId(); List<String> roleIds = picRoleConfig.getRoleId();
...@@ -179,9 +179,9 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB ...@@ -179,9 +179,9 @@ public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildB
srvPicList.add(srvStartPic); srvPicList.add(srvStartPic);
} }
// 机构端能护理人员的拍照和第三张拍照,其他都能看到 等于0角色不是机构端 // 机构端能护理人员的拍照和第三张拍照,其他都能看到 等于0角色不是机构端
if(roleByUserId == 0 && srvStartPic2!=null) { // if(roleByUserId == 0 && srvStartPic2!=null) {
srvPicList.add(srvStartPic2); srvPicList.add(srvStartPic2);//2024年8月29,和用户确认第二张照片开放
} // }
if(srvEndPic!=null) { if(srvEndPic!=null) {
srvPicList.add(srvEndPic); srvPicList.add(srvEndPic);
} }
......
...@@ -123,6 +123,11 @@ ...@@ -123,6 +123,11 @@
inner join CH_SERVICE_TYPE_DETAILED service on service.SERVICE_TYPE_DETAILED_ID = CSOP.ITEM_NAME inner join CH_SERVICE_TYPE_DETAILED service on service.SERVICE_TYPE_DETAILED_ID = CSOP.ITEM_NAME
inner join ch_disable_info info on task.disab_info_id=info.disab_info_id inner join ch_disable_info info on task.disab_info_id=info.disab_info_id
WHERE 1=1 WHERE 1=1
-- 增加护理机构ID查询条件字段,srv_ogran_id为空的查全部,srv_organ_id不为空的只查这个护理机构的数据
<if test="srvOrganId != null and srvOrganId != '' and srvOrganId!=0">
and program.SRV_ORGAN_ID = #{srvOrganId}
</if>
<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>
...@@ -241,6 +246,9 @@ ...@@ -241,6 +246,9 @@
inner join ch_disable_info info on task.disab_info_id=info.disab_info_id inner join ch_disable_info info on task.disab_info_id=info.disab_info_id
inner join ch_srv_send s on s.disab_info_id=task.disab_info_id inner join ch_srv_send s on s.disab_info_id=task.disab_info_id
WHERE 1=1 WHERE 1=1
<if test="srvOrganId != null and srvOrganId != '' and srvOrganId!=0">
and program.SRV_ORGAN_ID = #{srvOrganId}
</if>
<choose> <choose>
<when test="modeType == '上门'"> <when test="modeType == '上门'">
and detail.srv_start_time between s.allot_time and s.stop_time--打卡时间在分配有效时间内 and detail.srv_start_time between s.allot_time and s.stop_time--打卡时间在分配有效时间内
......
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