Commit bb6fe136 authored by zhangwanglin's avatar zhangwanglin

服务方案查询

parent 64ece249
...@@ -84,7 +84,7 @@ public class SrvProgramController { ...@@ -84,7 +84,7 @@ public class SrvProgramController {
* @return 返回个人照护方案列表 * @return 返回个人照护方案列表
*/ */
@RequestMapping("/programSetList") @RequestMapping("/programSetList")
public Result getProgramSetList(Integer pageNum, Integer pageSize, Long disabInfoId, Long srvOrganId,String status) { public Result getProgramSetList(Integer pageNum, Integer pageSize, Long disabInfoId, Long srvOrganId,Long srvSendId,String status) {
if (pageNum == null || pageNum < 1 || disabInfoId == null || disabInfoId == 0 || srvOrganId == null || srvOrganId == 0) { if (pageNum == null || pageNum < 1 || disabInfoId == null || disabInfoId == 0 || srvOrganId == null || srvOrganId == 0) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR); return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
} }
...@@ -92,7 +92,7 @@ public class SrvProgramController { ...@@ -92,7 +92,7 @@ public class SrvProgramController {
pageSize = 10; pageSize = 10;
} }
Page<ProgramListVo> page = new Page<>(pageNum, pageSize); Page<ProgramListVo> page = new Page<>(pageNum, pageSize);
page = srvProgramService.getProgramSetList(page, disabInfoId, srvOrganId, status); page = srvProgramService.getProgramSetList(page, disabInfoId, srvOrganId,srvSendId, status);
List<ProgramListVo> records = page.getRecords(); List<ProgramListVo> records = page.getRecords();
records =records.stream().collect( records =records.stream().collect(
Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparingLong(ProgramListVo::getProgramId))), ArrayList::new)); Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparingLong(ProgramListVo::getProgramId))), ArrayList::new));
......
...@@ -25,7 +25,7 @@ public interface ChSrvProgramMapper extends BaseMapper<ChSrvProgram> { ...@@ -25,7 +25,7 @@ public interface ChSrvProgramMapper extends BaseMapper<ChSrvProgram> {
* @param programStatus 服务方案状态 0:未生效、1:已生效、2:已终止 * @param programStatus 服务方案状态 0:未生效、1:已生效、2:已终止
* @return 返回个人照护方案列表 * @return 返回个人照护方案列表
*/ */
Page<ProgramListVo> getProgramList(Page<ProgramListVo> page, @Param("disabInfoId") Long disabInfoId, @Param("srvOrganId") Long srvOrganId, @Param("programStatus") String programStatus); Page<ProgramListVo> getProgramList(Page<ProgramListVo> page, @Param("disabInfoId") Long disabInfoId, @Param("srvOrganId") Long srvOrganId, @Param("srvSendId")Long srvSendId ,@Param("programStatus") String programStatus);
/** /**
* 查看服务方案详情 * 查看服务方案详情
......
...@@ -32,7 +32,7 @@ public interface SrvProgramService { ...@@ -32,7 +32,7 @@ public interface SrvProgramService {
* @param programStatus 服务方案状态 0:未生效、1:已生效、2:已终止 * @param programStatus 服务方案状态 0:未生效、1:已生效、2:已终止
* @return 返回个人照护方案列表 * @return 返回个人照护方案列表
*/ */
Page<ProgramListVo> getProgramSetList(Page<ProgramListVo> page, Long disabInfoId, Long srvOrganId, String programStatus); Page<ProgramListVo> getProgramSetList(Page<ProgramListVo> page, Long disabInfoId, Long srvOrganId,Long srvSendId, String programStatus);
/** /**
* 个人照护方案记录条数,查询对应方案状态的记录条数 * 个人照护方案记录条数,查询对应方案状态的记录条数
......
...@@ -55,8 +55,8 @@ public class SrvProgramServiceImpl implements SrvProgramService { ...@@ -55,8 +55,8 @@ public class SrvProgramServiceImpl implements SrvProgramService {
} }
@Override @Override
public Page<ProgramListVo> getProgramSetList(Page<ProgramListVo> page, Long disabInfoId, Long srvOrganId, String programStatus) { public Page<ProgramListVo> getProgramSetList(Page<ProgramListVo> page, Long disabInfoId, Long srvOrganId,Long srvSendId, String programStatus) {
return chSrvProgramMapper.getProgramList(page, disabInfoId, srvOrganId, programStatus); return chSrvProgramMapper.getProgramList(page, disabInfoId, srvOrganId, srvSendId,programStatus);
} }
@Override @Override
......
...@@ -140,6 +140,9 @@ ...@@ -140,6 +140,9 @@
LEFT JOIN CH_SRV_ORGAN T5 ON T1.SRV_ORGAN_ID = T5.SRV_ORGAN_ID LEFT JOIN CH_SRV_ORGAN T5 ON T1.SRV_ORGAN_ID = T5.SRV_ORGAN_ID
WHERE T1.DISAB_INFO_ID = #{disabInfoId} WHERE T1.DISAB_INFO_ID = #{disabInfoId}
AND T1.SRV_ORGAN_ID = #{srvOrganId} AND T1.SRV_ORGAN_ID = #{srvOrganId}
<if test="srvSendId != null and srvSendId != ''">
AND T1.SRV_SEND_ID = #{srvSendId}
</if>
<!-- <!--
<if test="programStatus != null and programStatus != ''"> <if test="programStatus != null and programStatus != ''">
AND T1.PROG_STATUS = #{programStatus} AND T1.PROG_STATUS = #{programStatus}
......
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