Commit dc18762d authored by maqing's avatar maqing

服务参数配置中的服务项目定义列表需要加机构权限控制

parent 86472d9c
......@@ -50,8 +50,9 @@ public class NursingServiceItemsController {
@RequestParam(defaultValue = "10") Integer pageSize,
String organIds, String name, String status) {
long organId = TokenParsingUtil.TokenParsing(token, "organId");
long srvOrganId = TokenParsingUtil.TokenParsing(token, "srvOrganId");
Page<OrganProjectVO> page = new Page<>(pageNum, pageSize);
page = nursingServiceItemsService.organProjectList(page, organIds, name, status);
page = nursingServiceItemsService.organProjectList(page, String.valueOf(srvOrganId),String.valueOf(organId), name, status);
return Result.success(page);
}
......
......@@ -23,5 +23,5 @@ public interface ChSrvOrganProjectMapper extends BaseMapper<ChSrvOrganProject> {
*/
List<ProgramSetAndProjectVo> selectOrganProjectsBySrvOrganId(@Param("srvOrganId") Long srvOrganId);
Page<OrganProjectVO> organProjectList(Page<OrganProjectVO> page, List<String> organIds, String name, String status);
Page<OrganProjectVO> organProjectList(Page<OrganProjectVO> page, String srvOrganId,String organId, String name, String status);
}
\ No newline at end of file
......@@ -15,7 +15,7 @@ import java.util.List;
@Service
public interface NursingServiceItemsService {
Page<OrganProjectVO> organProjectList(Page<OrganProjectVO> page, String organIds, String name, String status);
Page<OrganProjectVO> organProjectList(Page<OrganProjectVO> page, String organIds,String organId, String name, String status);
void organProjectConfig(ChSrvOrganProject project);
......
......@@ -40,12 +40,14 @@ public class NursingServiceItemsServiceImpl implements NursingServiceItemsServic
private final FndDiseaseTypeMapper fndDiseaseTypeMapper;
@Override
public Page<OrganProjectVO> organProjectList(Page<OrganProjectVO> page, String organIds, String name, String status) {
List<String> organIdList = null;
if (StrUtil.isNotBlank(organIds)) {
organIdList = Arrays.asList(organIds.split(","));
public Page<OrganProjectVO> organProjectList(Page<OrganProjectVO> page, String srvOrganId,String organId, String name, String status) {
Page<OrganProjectVO> organProjectVOPage;
if(organId.equals("0") || organId==null){
organProjectVOPage = chSrvOrganProjectMapper.organProjectList(page, null, null, name, status);
}else{
organProjectVOPage= chSrvOrganProjectMapper.organProjectList(page, srvOrganId, organId, name, status);
}
return chSrvOrganProjectMapper.organProjectList(page, organIdList, name, status);
return organProjectVOPage;
}
@Override
......
......@@ -97,11 +97,8 @@
left join CH_FND_ORGAN org on organ.ORGAN_ID = org.ORGAN_ID
left join CH_SERVICE_TYPE_detailed d on d.service_type_detailed_id = project.item_name
<where>
<if test="organIds != null">
and project.srv_organ_id in
<foreach collection="organIds" item="organId" open="(" close=")" separator=",">
#{organId}
</foreach>
<if test="srvOrganId != null and srvOrganId != '' ">
and project.srv_organ_id = #{srvOrganId}
</if>
<if test="name != null and name != ''">
and project.item_name like CONCAT(CONCAT('%',#{name}) ,'%')
......@@ -109,6 +106,9 @@
<if test="status != null and status != ''">
and project.status = #{status}
</if>
<if test="organId != null and organId != ''">
and org.ORGAN_ID = #{organId}
</if>
</where>
order by project.project_id desc
</select>
......
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