Commit b0b035ae authored by 董天德's avatar 董天德

服务参数配置页面修改

parent cc8be972
package com.hungraim.ltc.pojo.entity.disable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* CH_SERVICE_TYPE
* 服务类型码表
* @author dtd
*/
@Data
@TableName("CH_SERVICE_TYPE")
@KeySequence("SEQ_CH_SERVICE_TYPE")
public class ChServiceType implements Serializable {
/**
* 服务类型id
*/
@TableId(type = IdType.INPUT)
private Long serviceTypeId;
/**
* 服务类型名称
*/
private String serviceTypeName;
/**
* 父类id
*/
private Long paraId;
/**
* 首次操作时间
*/
private Date fcd;
/**
* 首次操作人
*/
private Long fcu;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.hungraim.ltc.pojo.entity.disable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* CH_SERVICE_TYPE
* 服务类型码表
* @author dtd
*/
@Data
@TableName("CH_SERVICE_TYPE_DETAILED")
@KeySequence("SEQ_CH_SERVICE_TYPE_DETAILED")
public class ChServiceTypeDetailed implements Serializable {
/**
* 服务类型id
*/
@TableId(type = IdType.INPUT)
private Long serviceTypeDetailedId;
/**
* 服务类型名称
*/
private String serviceTypeDetailedName;
/**
* 父类id
*/
private Long paraId;
/**
* 首次操作时间
*/
private Date fcd;
/**
* 首次操作人
*/
private Long fcu;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package com.hungraim.ltc.pojo.vo.disable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hungraim.ltc.pojo.entity.disable.ChServiceType;
import com.hungraim.ltc.pojo.entity.disable.ChServiceTypeDetailed;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* CH_SERVICE_TYPE
* 服务类型码表
* @author dtd
*/
@Data
public class ChServiceTypeVo {
//服务类型id
private Long serviceTypeId;
//服务类型名称
private String serviceTypeName;
//子服务类型
private List<ChServiceTypeDetailed> list;
}
\ No newline at end of file
......@@ -4,7 +4,9 @@ import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.governance.service.NursingServiceItemsService;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.entity.disable.ChServiceType;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganProject;
import com.hungraim.ltc.pojo.vo.disable.ChServiceTypeVo;
import com.hungraim.ltc.pojo.vo.disable.SrvModeVo;
import com.hungraim.ltc.pojo.vo.governance.OrganProjectVO;
import com.hungraim.ltc.util.Result;
......@@ -17,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
/**
......@@ -48,6 +51,8 @@ public class NursingServiceItemsController {
}
/**
* 护理机构护理项目配置
*
......@@ -148,4 +153,13 @@ public class NursingServiceItemsController {
return Result.success();
}
/**
* 服务类型定义配置列表
*/
@RequestMapping("/serviceTypeList")
public Result<List<ChServiceTypeVo>> queryServiceTypeList() {
List<ChServiceTypeVo> list = nursingServiceItemsService.queryServiceTypeList();
return Result.success(list);
}
}
package com.hungraim.ltc.governance.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.disable.ChServiceTypeDetailed;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
@Mapper
@Repository
public interface ServiceTypeDetailedMapper extends BaseMapper<ChServiceTypeDetailed> {
}
\ No newline at end of file
package com.hungraim.ltc.governance.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.disable.ChServiceType;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
@Mapper
@Repository
public interface ServiceTypeMapper extends BaseMapper<ChServiceType> {
}
\ No newline at end of file
......@@ -2,7 +2,9 @@ package com.hungraim.ltc.governance.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.entity.disable.ChServiceType;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganProject;
import com.hungraim.ltc.pojo.vo.disable.ChServiceTypeVo;
import com.hungraim.ltc.pojo.vo.disable.SrvModeVo;
import com.hungraim.ltc.pojo.vo.governance.OrganProjectVO;
import org.springframework.stereotype.Service;
......@@ -38,4 +40,6 @@ public interface NursingServiceItemsService {
* @return 返回执行结果
*/
void deleteSrvModel(Long modeId);
List<ChServiceTypeVo> queryServiceTypeList();
}
......@@ -4,13 +4,14 @@ import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.api.SrvModeFeignService;
import com.hungraim.ltc.governance.dao.ChSrvOrganProjectMapper;
import com.hungraim.ltc.governance.dao.DisableLevelMapper;
import com.hungraim.ltc.governance.dao.SrvModeMapper;
import com.hungraim.ltc.governance.dao.*;
import com.hungraim.ltc.governance.service.NursingServiceItemsService;
import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgSrvMode;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.entity.disable.ChServiceType;
import com.hungraim.ltc.pojo.entity.disable.ChServiceTypeDetailed;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganProject;
import com.hungraim.ltc.pojo.vo.disable.ChServiceTypeVo;
import com.hungraim.ltc.pojo.vo.disable.SrvModeVo;
import com.hungraim.ltc.pojo.vo.governance.OrganProjectVO;
import com.hungraim.ltc.util.Result;
......@@ -18,6 +19,7 @@ import lombok.AllArgsConstructor;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
......@@ -30,6 +32,8 @@ public class NursingServiceItemsServiceImpl implements NursingServiceItemsServic
private final DisableLevelMapper disableLevelMapper;
private final SrvModeMapper srvModeMapper;
private final SrvModeFeignService srvModeFeignService;
private final ServiceTypeMapper serviceTypeMapper;
private final ServiceTypeDetailedMapper serviceTypeDetailedMapper;
@Override
public Page<OrganProjectVO> organProjectList(Page<OrganProjectVO> page, String organIds, String name, String status) {
......@@ -107,4 +111,23 @@ public class NursingServiceItemsServiceImpl implements NursingServiceItemsServic
public void deleteSrvModel(Long modeId) {
srvModeMapper.deleteById(modeId);
}
@Override
public List<ChServiceTypeVo> queryServiceTypeList() {
List<ChServiceType> list = serviceTypeMapper.selectList(new QueryWrapper<>());
List<ChServiceTypeVo> chServiceTypeVoList = new ArrayList<ChServiceTypeVo>();
for(ChServiceType chServiceType : list){
if(chServiceType.getParaId() == 0L){
ChServiceTypeVo chServiceTypeVo = new ChServiceTypeVo();
chServiceTypeVo.setServiceTypeId(chServiceType.getServiceTypeId());
chServiceTypeVo.setServiceTypeName(chServiceType.getServiceTypeName());
QueryWrapper<ChServiceTypeDetailed> wrapper = new QueryWrapper<ChServiceTypeDetailed>();
wrapper.eq("para_id", chServiceType.getServiceTypeId());
List<ChServiceTypeDetailed> detailedList = serviceTypeDetailedMapper.selectList(wrapper);
chServiceTypeVo.setList(detailedList);
chServiceTypeVoList.add(chServiceTypeVo);
}
}
return chServiceTypeVoList;
}
}
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