Commit 2796198c authored by 蔡镇泽's avatar 蔡镇泽

护理服务项目列表

parent 5bd7d9e9
package com.hungraim.ltc.pojo.vo.governance;
import com.hungraim.ltc.pojo.entity.PageInfo;
import lombok.Data;
import java.io.Serializable;
/**
* 护理服务项目列表VO
*/
@Data
public class NursingServiceItemsVO extends PageInfo implements Serializable {
/**
* 护理服务项目id
*/
private Integer projectId;
/**
* 适用机构
*/
private String srvOrganName;
/**
* 机构代码
*/
private Integer organId;
/**
* 模板名称
*/
private String itemName;
/**
* 备注
*/
private String remark;
/**
* 状态
*/
private String status;
}
package com.hungraim.ltc.governance.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.governance.service.NursingServiceItemsService;
import com.hungraim.ltc.pojo.vo.governance.NursingServiceItemsVO;
import com.hungraim.ltc.util.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* 护理服务项目Controller
*
* @author czz
*/
@RestController
@RequestMapping("/api.governance/nursing")
@Slf4j
public class NursingServiceItemsController {
@Autowired
private NursingServiceItemsService nursingServiceItemsService;
/**
* 服务参数详细配置
*
* @param disableLevelName 失能等级定义列表 失能等级
* @param disableLevelStartValue 失能等级定义列表 值1
* @param disableLevelEndValue 失能等级定义列表 值2
* @param disableLevelRemark 失能等级定义列表 备注
* -----------
* @param modeName 服务方式定义列表 服务方式
* @param modeRemark 服务方式定义列表 备注
* -----------
* @param itemId 服务项目定义列表 序号
* @param showNumber 服务项目定义列表 展示序号
* @param itemName 服务项目定义列表 服务项目
* @param cateId 服务项目定义列表 服务项目分类
* @param srvLevelId 服务项目定义列表 服务等级
* @param chooseFlag 服务项目定义列表 是否必选
* @param payType 服务项目定义列表 付款类型 1,基金支付0自费费用
* @param itemRemark 服务项目定义列表 备注
*/
@RequestMapping("/serviceConfigInfo")
public Result<Object> serviceConfigInfo(String[] disableLevelName, String[] disableLevelStartValue, String[] disableLevelEndValue, String[] disableLevelRemark,
String[] modeName, String[] modeRemark,
String[] itemId, String[] showNumber, String[] itemName, String[] cateId, String[] srvLevelId, String[] chooseFlag, String[] payType, String[] itemRemark) {
// nursingServiceItemsService.serviceConfigInfo(page, organIds, aprName, status);
return Result.success();
}
/**
* 护理服务项目列表
*
* @param organIds 机构id
* @param name 护理服务项目名称
* @param status 状态
*/
@RequestMapping("/nursingServiceItemsList")
public Result<Page<NursingServiceItemsVO>> nursingServiceItemsList(@RequestParam(defaultValue = "1") Integer pageNum, @RequestParam(defaultValue = "10") Integer pageSize,
String organIds, String name, String status) {
Page<NursingServiceItemsVO> page = new Page<>(pageNum, pageSize);
page = nursingServiceItemsService.nursingServiceItemsList(page, organIds, name, status);
return Result.success(page);
}
}
package com.hungraim.ltc.governance.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganProject;
import com.hungraim.ltc.pojo.vo.governance.NursingServiceItemsVO;
import com.hungraim.ltc.pojo.vo.governance.ProgramSetAndProjectVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -20,4 +22,6 @@ public interface ChSrvOrganProjectMapper extends BaseMapper<ChSrvOrganProject> {
* @return 返回项目列表
*/
List<ProgramSetAndProjectVo> selectOrganProjectsBySrvOrganId(@Param("srvOrganId") Long srvOrganId);
Page<NursingServiceItemsVO> nursingServiceItemsList(Page<NursingServiceItemsVO> page, List<String> organIds, String name, String status);
}
\ No newline at end of file
package com.hungraim.ltc.governance.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.vo.governance.NursingServiceItemsVO;
import org.springframework.stereotype.Service;
@Service
public interface NursingServiceItemsService {
Page<NursingServiceItemsVO> nursingServiceItemsList(Page<NursingServiceItemsVO> page, String organIds, String name, String status);
}
package com.hungraim.ltc.governance.service.impl;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.governance.dao.ChSrvOrganProjectMapper;
import com.hungraim.ltc.governance.service.NursingServiceItemsService;
import com.hungraim.ltc.pojo.vo.governance.NursingServiceItemsVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.List;
@Service
public class NursingServiceItemsServiceImpl implements NursingServiceItemsService {
@Autowired
private ChSrvOrganProjectMapper chSrvOrganProjectMapper;
@Override
public Page<NursingServiceItemsVO> nursingServiceItemsList(Page<NursingServiceItemsVO> page, String organIds, String name, String status) {
List<String> organIdList = null;
if (StrUtil.isNotBlank(organIds)) {
organIdList = Arrays.asList(organIds.split(","));
}
return chSrvOrganProjectMapper.nursingServiceItemsList(page, organIdList, name, status);
}
}
......@@ -67,4 +67,36 @@
WHERE SRV_ORGAN_ID = #{srvOrganId}
AND STATUS = 0
</select>
<select id="nursingServiceItemsList" resultType="com.hungraim.ltc.pojo.vo.governance.NursingServiceItemsVO">
SELECT
--护理服务项目id
project.project_id projectId,
--适用机构
organ.srv_organ_name srvOrganName,
--机构代码
project.srv_organ_id organId,
--护理服务项目名称
project.item_name itemName,
--备注
project.remark remark,
--状态
project.status status
FROM CH_SRV_ORGAN_PROJECT project
left join ch_srv_organ organ on project.SRV_ORGAN_ID = organ.SRV_ORGAN_ID
<where>
<if test="organIds != null">
and project.srv_organ_id in
<foreach collection="organIds" item="organId" open="(" close=")" separator=",">
#{organId}
</foreach>
</if>
<if test="name != null and name != ''">
and project.item_name like CONCAT(CONCAT('%',#{name}) ,'%')
</if>
<if test="status != null and status != ''">
and project.status = #{status}
</if>
</where>
</select>
</mapper>
\ No newline at end of file
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