Commit aeb39278 authored by zhangch's avatar zhangch

服务项目接口调试、以往错误接口修改

parent b57407d7
package com.hungraim.ltc.api;
import com.hungraim.ltc.pojo.vo.disable.SrvModeVo;
import com.hungraim.ltc.util.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import java.util.List;
@FeignClient("LTC-APPLY-SERVICE")
public interface SrvModeFeignService {
/**
* feign api 获取所有的服务方式接口
* @return 返回所有服务方式
*/
@GetMapping("/api.apply/disable/fndSrvMode")
Result<List<SrvModeVo>> cfgSrvMode();
}
...@@ -73,10 +73,19 @@ public class DisableController { ...@@ -73,10 +73,19 @@ public class DisableController {
} }
/** /**
* 查询所有机构
*/
@RequestMapping("/fndAllOrgan")
public Result<List<ChFndOrgan>> fndAllOrgan() {
List<ChFndOrgan> organs = disableService.fndAllOrgan();
return Result.success(organs);
}
/**
* 查询所有服务方式 * 查询所有服务方式
*/ */
@RequestMapping("/fndSrvMode") @RequestMapping("/fndSrvMode")
public Result cfgSrvMode() { public Result<List<SrvModeVo>> cfgSrvMode() {
List<SrvModeVo> fndSrvModes = disableService.cfgSrvModeList(); List<SrvModeVo> fndSrvModes = disableService.cfgSrvModeList();
return Result.success(fndSrvModes); return Result.success(fndSrvModes);
} }
......
...@@ -91,4 +91,10 @@ public interface DisableService { ...@@ -91,4 +91,10 @@ public interface DisableService {
List<ChFndDiseaseType> fndAllDisease(); List<ChFndDiseaseType> fndAllDisease();
DisableInfoVO getDisableInfo(String disableInfoId); DisableInfoVO getDisableInfo(String disableInfoId);
/**
* 查询所有适用机构
* @return 返回列表
*/
List<ChFndOrgan> fndAllOrgan();
} }
...@@ -177,13 +177,13 @@ public class DisableServiceImpl implements DisableService { ...@@ -177,13 +177,13 @@ public class DisableServiceImpl implements DisableService {
public List<ChFndOrgan> fndOrganRoot() { public List<ChFndOrgan> fndOrganRoot() {
QueryWrapper<ChFndOrgan> queryWrapper = new QueryWrapper<>(); QueryWrapper<ChFndOrgan> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("IS_LEAF", "1"); queryWrapper.eq("IS_LEAF", "1");
queryWrapper.eq("STATUS","1");
queryWrapper.and(wrapper -> wrapper.isNull("PARENT_ID").or().eq("PARENT_ID", "")); queryWrapper.and(wrapper -> wrapper.isNull("PARENT_ID").or().eq("PARENT_ID", ""));
return fndOrganMapper.selectList(queryWrapper); return fndOrganMapper.selectList(queryWrapper);
} }
@Override @Override
public List<SrvModeVo> cfgSrvModeList() { public List<SrvModeVo> cfgSrvModeList() {
return srvModeMapper.selectAll(); return srvModeMapper.selectAll();
} }
...@@ -244,4 +244,12 @@ public class DisableServiceImpl implements DisableService { ...@@ -244,4 +244,12 @@ public class DisableServiceImpl implements DisableService {
public DisableInfoVO getDisableInfo(String disableInfoId) { public DisableInfoVO getDisableInfo(String disableInfoId) {
return disableApplyMapper.getDisableInfo(disableInfoId); return disableApplyMapper.getDisableInfo(disableInfoId);
} }
@Override
public List<ChFndOrgan> fndAllOrgan() {
QueryWrapper<ChFndOrgan> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("IS_LEAF", "1");
queryWrapper.eq("STATUS","1");
return fndOrganMapper.selectList(queryWrapper);
}
} }
\ No newline at end of file
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
<select id="selectAll" resultType="com.hungraim.ltc.pojo.vo.disable.SrvModeVo"> <select id="selectAll" resultType="com.hungraim.ltc.pojo.vo.disable.SrvModeVo">
SELECT MODE_ID srvModeId, SELECT MODE_ID srvModeId,
MODE_NAME srvModeName MODE_NAME srvModeName,
REMARK remark
FROM CH_CFG_SRV_MODE FROM CH_CFG_SRV_MODE
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -9,4 +9,5 @@ import lombok.Data; ...@@ -9,4 +9,5 @@ import lombok.Data;
public class SrvModeVo { public class SrvModeVo {
private Integer srvModeId; private Integer srvModeId;
private String srvModeName; private String srvModeName;
private String remark;
} }
package com.hungraim.ltc.pojo.vo.governance; package com.hungraim.ltc.pojo.vo.governance;
import com.hungraim.ltc.pojo.entity.PageInfo;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
/** /**
* 护理机构护理项目配置列表VO * 护理机构护理项目配置列表VO
*/ */
@Data @Data
public class OrganProjectVO extends PageInfo implements Serializable { public class OrganProjectVO implements Serializable {
/** /**
* 护理服务项目id * 护理服务项目id
*/ */
private Integer projectId; private Long projectId;
/** /**
* 适用机构 * 护理机构
*/ */
private String srvOrganName; private String srvOrganName;
/** /**
* 机构代码 * 护理机构代码
*/
private Long srvOrganId;
/**
* 适用机构
*/ */
private Integer organId; private Long organId;
/** /**
* 模板名称 * 模板名称
*/ */
...@@ -33,5 +38,35 @@ public class OrganProjectVO extends PageInfo implements Serializable { ...@@ -33,5 +38,35 @@ public class OrganProjectVO extends PageInfo implements Serializable {
/** /**
* 状态 * 状态
*/ */
private String status; private Integer status;
/**
* 类服务包类型(1基础护理、2日常照护项目、3其它、4巡诊)
*/
private Integer categoryType;
/**
* 频次
*/
private Integer itemTimes;
/**
* 频次类型(1:次/每月,2:必要时)
*/
private Integer itemTimesType;
/**
* 服务单价
*/
private BigDecimal itemPrice;
/**
* 是否必需项(是:1;否:0)
*/
private Integer isConf;
/**
* 服务内容
*/
private String serviceContent;
} }
...@@ -70,6 +70,20 @@ ...@@ -70,6 +70,20 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
</dependency> </dependency>
<!--feign服务调用-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<!--apply-api-->
<dependency>
<groupId>com.hungraim.ltc</groupId>
<artifactId>apply-api</artifactId>
<version>0.0.1</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -3,6 +3,7 @@ package com.hungraim.ltc; ...@@ -3,6 +3,7 @@ package com.hungraim.ltc;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.EnableTransactionManagement;
/** /**
...@@ -10,6 +11,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; ...@@ -10,6 +11,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
*/ */
@SpringBootApplication @SpringBootApplication
@EnableDiscoveryClient @EnableDiscoveryClient
@EnableFeignClients
@EnableTransactionManagement @EnableTransactionManagement
public class GovernanceApplication { public class GovernanceApplication {
public static void main(String[] args) { public static void main(String[] args) {
......
package com.hungraim.ltc.governance.controller; package com.hungraim.ltc.governance.controller;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.governance.service.NursingServiceItemsService; 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.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganProject; import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganProject;
import com.hungraim.ltc.pojo.vo.disable.SrvModeVo;
import com.hungraim.ltc.pojo.vo.governance.OrganProjectVO; import com.hungraim.ltc.pojo.vo.governance.OrganProjectVO;
import com.hungraim.ltc.util.Result; import com.hungraim.ltc.util.Result;
import com.hungraim.ltc.util.ResultCode; import com.hungraim.ltc.util.ResultCode;
...@@ -55,11 +56,8 @@ public class NursingServiceItemsController { ...@@ -55,11 +56,8 @@ public class NursingServiceItemsController {
@RequestMapping("/organProjectConfig") @RequestMapping("/organProjectConfig")
public Result<Object> organProjectConfig(ChSrvOrganProject project) { public Result<Object> organProjectConfig(ChSrvOrganProject project) {
//参数校验 //参数校验
if (project.getSrvOrganId() == null//机构id if (project.getSrvOrganId() == null || StrUtil.isBlank(project.getItemName()) || StrUtil.isBlank(project.getServiceContent()) || project.getCategoryType() == null || project.getItemPrice() == null) {
|| StringUtils.isBlank(project.getItemName())//服务项目名称 return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
|| project.getStatus() == null//状态 0有效,1无效
) {
return Result.failed("参数异常!");
} }
nursingServiceItemsService.organProjectConfig(project); nursingServiceItemsService.organProjectConfig(project);
return Result.success(); return Result.success();
...@@ -112,8 +110,8 @@ public class NursingServiceItemsController { ...@@ -112,8 +110,8 @@ public class NursingServiceItemsController {
* 服务方式定义配置列表 * 服务方式定义配置列表
*/ */
@RequestMapping("/modeConfigList") @RequestMapping("/modeConfigList")
public Result<List<ChCfgSrvMode>> modeConfigList() { public Result<List<SrvModeVo>> modeConfigList() {
List<ChCfgSrvMode> list = nursingServiceItemsService.modeConfigList(); List<SrvModeVo> list = nursingServiceItemsService.modeConfigList();
return Result.success(list); return Result.success(list);
} }
......
package com.hungraim.ltc.governance.service; package com.hungraim.ltc.governance.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgSrvMode;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel; import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganProject; import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganProject;
import com.hungraim.ltc.pojo.vo.disable.SrvModeVo;
import com.hungraim.ltc.pojo.vo.governance.OrganProjectVO; import com.hungraim.ltc.pojo.vo.governance.OrganProjectVO;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -22,7 +22,7 @@ public interface NursingServiceItemsService { ...@@ -22,7 +22,7 @@ public interface NursingServiceItemsService {
List<ChCfgSrvDisableLevel> disableLevelConfigList(); List<ChCfgSrvDisableLevel> disableLevelConfigList();
List<ChCfgSrvMode> modeConfigList(); List<SrvModeVo> modeConfigList();
/** /**
* 删除对应失能等级数据 * 删除对应失能等级数据
......
...@@ -3,6 +3,7 @@ package com.hungraim.ltc.governance.service.impl; ...@@ -3,6 +3,7 @@ package com.hungraim.ltc.governance.service.impl;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; 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.ChSrvOrganProjectMapper;
import com.hungraim.ltc.governance.dao.DisableLevelMapper; import com.hungraim.ltc.governance.dao.DisableLevelMapper;
import com.hungraim.ltc.governance.dao.SrvModeMapper; import com.hungraim.ltc.governance.dao.SrvModeMapper;
...@@ -10,9 +11,11 @@ import com.hungraim.ltc.governance.service.NursingServiceItemsService; ...@@ -10,9 +11,11 @@ import com.hungraim.ltc.governance.service.NursingServiceItemsService;
import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgSrvMode; import com.hungraim.ltc.pojo.entity.SysConfig.ChCfgSrvMode;
import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel; import com.hungraim.ltc.pojo.entity.disable.ChCfgSrvDisableLevel;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganProject; import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvOrganProject;
import com.hungraim.ltc.pojo.vo.disable.SrvModeVo;
import com.hungraim.ltc.pojo.vo.governance.OrganProjectVO; import com.hungraim.ltc.pojo.vo.governance.OrganProjectVO;
import com.hungraim.ltc.util.Result;
import lombok.AllArgsConstructor;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Arrays; import java.util.Arrays;
...@@ -20,14 +23,13 @@ import java.util.Date; ...@@ -20,14 +23,13 @@ import java.util.Date;
import java.util.List; import java.util.List;
@Service @Service
@AllArgsConstructor
public class NursingServiceItemsServiceImpl implements NursingServiceItemsService { public class NursingServiceItemsServiceImpl implements NursingServiceItemsService {
@Autowired private final ChSrvOrganProjectMapper chSrvOrganProjectMapper;
private ChSrvOrganProjectMapper chSrvOrganProjectMapper; private final DisableLevelMapper disableLevelMapper;
@Autowired private final SrvModeMapper srvModeMapper;
private DisableLevelMapper disableLevelMapper; private final SrvModeFeignService srvModeFeignService;
@Autowired
private SrvModeMapper srvModeMapper;
@Override @Override
public Page<OrganProjectVO> organProjectList(Page<OrganProjectVO> page, String organIds, String name, String status) { public Page<OrganProjectVO> organProjectList(Page<OrganProjectVO> page, String organIds, String name, String status) {
...@@ -41,9 +43,9 @@ public class NursingServiceItemsServiceImpl implements NursingServiceItemsServic ...@@ -41,9 +43,9 @@ public class NursingServiceItemsServiceImpl implements NursingServiceItemsServic
@Override @Override
public void organProjectConfig(ChSrvOrganProject project) { public void organProjectConfig(ChSrvOrganProject project) {
if (project.getProjectId() != null) { if (project.getProjectId() != null) {
project.setEffTime(new Date());//创建时间
} else {
chSrvOrganProjectMapper.updateById(project); chSrvOrganProjectMapper.updateById(project);
} else {
project.setEffTime(new Date());//创建时间
chSrvOrganProjectMapper.insert(project); chSrvOrganProjectMapper.insert(project);
} }
} }
...@@ -88,8 +90,12 @@ public class NursingServiceItemsServiceImpl implements NursingServiceItemsServic ...@@ -88,8 +90,12 @@ public class NursingServiceItemsServiceImpl implements NursingServiceItemsServic
} }
@Override @Override
public List<ChCfgSrvMode> modeConfigList() { public List<SrvModeVo> modeConfigList() {
return srvModeMapper.selectList(new QueryWrapper<>()); Result<List<SrvModeVo>> listResult = srvModeFeignService.cfgSrvMode();
if ("00000".equals(listResult.getCode())) {
return listResult.getData();
}
return null;
} }
@Override @Override
......
...@@ -75,15 +75,23 @@ ...@@ -75,15 +75,23 @@
--适用机构 --适用机构
organ.srv_organ_name srvOrganName, organ.srv_organ_name srvOrganName,
--机构代码 --机构代码
project.srv_organ_id organId, project.srv_organ_id srvOrganId,
org.ORGAN_ID organId,
--护理服务项目名称 --护理服务项目名称
project.item_name itemName, project.item_name itemName,
--备注 --备注
project.remark remark, project.remark remark,
--状态 --状态
project.status status project.status status,
project.CATEGORY_TYPE categoryType,
project.ITEM_TIMES itemTimes,
project.ITEM_TIMES_TYPE itemTimesType,
project.ITEM_PRICE itemPrice,
project.SERVICE_CONTENT serviceContent,
project.IS_CONF isConf
FROM CH_SRV_ORGAN_PROJECT project FROM CH_SRV_ORGAN_PROJECT project
left join ch_srv_organ organ on project.SRV_ORGAN_ID = organ.SRV_ORGAN_ID left join ch_srv_organ organ on project.SRV_ORGAN_ID = organ.SRV_ORGAN_ID
left join CH_FND_ORGAN org on organ.ORGAN_ID = org.ORGAN_ID
<where> <where>
<if test="organIds != null"> <if test="organIds != null">
and project.srv_organ_id in and project.srv_organ_id in
......
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