Commit 0f7e394b authored by hubin's avatar hubin

Merge remote-tracking branch 'origin/master'

parents 5ff86d98 df9910ab
package com.hungraim.ism.controller; package com.hungraim.ism.controller;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hungraim.ism.pojo.vo.disable.ApplicationManagementListVO; import com.hungraim.ism.pojo.vo.disable.DisableVO;
import com.hungraim.ism.service.DisableService; import com.hungraim.ism.service.DisableService;
import com.hungraim.ltc.pojo.entity.disable.ChDisableApplyHis;
import com.hungraim.ltc.util.Result; import com.hungraim.ltc.util.Result;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
...@@ -28,29 +25,28 @@ public class DisableController { ...@@ -28,29 +25,28 @@ public class DisableController {
private DisableService disableService; private DisableService disableService;
/** /**
* 待遇申请管理列表 * 失能人员信息列表
* *
* @param organId 适用机构代码 * @param organId 适用机构代码
* @param districtProvincial 所在省 * @param districtProvincial 所在省
* @param districtCity 所在市 * @param districtCity 所在市
* @param districtArea 所在区域 * @param districtArea 所在区域
* @param realName 参保人员姓名 * @param realName 失能人员姓名
* @param certiCode 参保人身份证号码 * @param certiCode 失能人员身份证号码
* @param treatmentType 待遇类型 * @param dataFrom 申请来源
* @param applyStatus 审核状态 * @param srvOrganId 护理机构
* @return 待遇申请管理列表 * @param pageNum 当前页
* @param pageSize 每页几条数据
* @return 失能人员信息列表
*/ */
@RequestMapping("/applicationManagementList") @RequestMapping("/disableList")
public Result<List<ApplicationManagementListVO>> disableList(String organId, String districtProvincial, String districtCity, String districtArea, String realName, String certiCode, Short treatmentType, Short applyStatus) { public Result<List<DisableVO>> disableList(String organId, String districtProvincial,
IPage<ChDisableApplyHis> iPage = disableService.listDisableInfoByPage(organId, districtProvincial, districtCity, districtArea, realName, certiCode, treatmentType, applyStatus, 1, 10); String districtCity, String districtArea,
List<ChDisableApplyHis> records = iPage.getRecords(); String realName, String certiCode, String dataFrom,
List<ApplicationManagementListVO> vos = new ArrayList<>(); String srvOrganId, int pageNum, int pageSize) {
for (ChDisableApplyHis chDisableApplyHis : records) { IPage<DisableVO> iPage = disableService.disableList(organId, districtProvincial,
ApplicationManagementListVO applicationManagementListVO = new ApplicationManagementListVO(); districtCity, districtArea, realName, certiCode, dataFrom, srvOrganId, pageNum, pageSize);
BeanUtil.copyProperties(chDisableApplyHis, applicationManagementListVO); return Result.success(iPage.getRecords());
vos.add(applicationManagementListVO);
}
return Result.success(vos);
} }
} }
package com.hungraim.ism.dao; package com.hungraim.ism.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ism.pojo.vo.disable.ApplicationManagementInfoVO;
import com.hungraim.ism.pojo.vo.disable.DisableVO;
import com.hungraim.ltc.pojo.entity.disable.ChDisableApplyHis; import com.hungraim.ltc.pojo.entity.disable.ChDisableApplyHis;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
...@@ -13,4 +16,21 @@ import org.springframework.stereotype.Repository; ...@@ -13,4 +16,21 @@ import org.springframework.stereotype.Repository;
@Mapper @Mapper
@Repository @Repository
public interface DisableApplyHisMapper extends BaseMapper<ChDisableApplyHis> { public interface DisableApplyHisMapper extends BaseMapper<ChDisableApplyHis> {
/**
* 查询待遇申请管理列表
*
* @param organId 机构代码
* @param provincial 省
* @param city 市
* @param area 区
* @param name 参保人员姓名
* @param certiCode 参保人身份证号码
* @param dataFrom 申请来源
* @param srvOrganId 护理机构
*/
Page<DisableVO> disableList(Page<DisableVO> page, String organId, String provincial,
String city, String area, String name, String certiCode,
String dataFrom, String srvOrganId);
ApplicationManagementInfoVO selectApplicationManagementInfoById(String id);
} }
package com.hungraim.ism.service; package com.hungraim.ism.service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.disable.ChDisableApplyHis; import com.hungraim.ism.pojo.vo.disable.DisableVO;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/** /**
...@@ -19,12 +19,16 @@ public interface DisableService { ...@@ -19,12 +19,16 @@ public interface DisableService {
* @param districtProvincial 所在省 * @param districtProvincial 所在省
* @param districtCity 所在市 * @param districtCity 所在市
* @param districtArea 所在区域 * @param districtArea 所在区域
* @param realName 参保人员姓名 * @param realName 失能人员姓名
* @param certiCode 参保人身份证号码 * @param certiCode 失能人员身份证号码
* @param treatmentType 待遇类型 * @param dataFrom 申请来源
* @param applyStatus 审核状态 * @param srvOrganId 护理机构
* @param pageNum 当前页
* @param pageSize 每页几条数据
* @return list * @return list
*/ */
IPage<ChDisableApplyHis> listDisableInfoByPage(String organId, String districtProvincial, String districtCity, String districtArea, String realName, String certiCode, Short treatmentType, Short applyStatus, int page, int pageSize); Page<DisableVO> disableList(String organId, String districtProvincial, String districtCity,
String districtArea, String realName, String certiCode, String dataFrom,
String srvOrganId, int pageNum, int pageSize);
} }
package com.hungraim.ism.service.impl; package com.hungraim.ism.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ism.dao.DisableApplyHisMapper; import com.hungraim.ism.dao.DisableApplyHisMapper;
import com.hungraim.ltc.pojo.entity.disable.ChDisableApplyHis; import com.hungraim.ism.pojo.vo.disable.DisableVO;
import com.hungraim.ism.service.DisableService; import com.hungraim.ism.service.DisableService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -16,21 +14,11 @@ public class DisableServiceImpl implements DisableService { ...@@ -16,21 +14,11 @@ public class DisableServiceImpl implements DisableService {
private DisableApplyHisMapper disableApplyHisMapper; private DisableApplyHisMapper disableApplyHisMapper;
@Override @Override
public IPage<ChDisableApplyHis> listDisableInfoByPage(String organId, String districtProvincial, String districtCity, public Page<DisableVO> disableList(String organId, String districtProvincial, String districtCity,
String districtArea, String realName, String certiCode, Short treatmentType, String districtArea, String realName, String certiCode, String dataFrom,
Short applyStatus, int page, int pageSize) { String srvOrganId, int page, int pageSize) {
QueryWrapper<ChDisableApplyHis> wrapper = new QueryWrapper<>(); return disableApplyHisMapper.disableList(new Page(page, pageSize), organId, districtProvincial,
ChDisableApplyHis chDisableApplyHis = new ChDisableApplyHis(); districtCity, districtArea, realName, certiCode, dataFrom, srvOrganId);
chDisableApplyHis.setOrganId(organId);
chDisableApplyHis.setDistrictProvincial(districtProvincial);
chDisableApplyHis.setDistrictCity(districtCity);
chDisableApplyHis.setDistrictArea(districtArea);
chDisableApplyHis.setRealName(realName);
chDisableApplyHis.setCertiCode(certiCode);
chDisableApplyHis.setTreatmentType(treatmentType);
chDisableApplyHis.setApplyStatus(applyStatus);
wrapper.setEntity(chDisableApplyHis);
return disableApplyHisMapper.selectPage(new Page<>(page, pageSize), wrapper);
} }
} }
\ No newline at end of file
...@@ -31,3 +31,4 @@ server: ...@@ -31,3 +31,4 @@ server:
mybatis-plus: mybatis-plus:
configuration: configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mapper-locations: classpath*:mapper/*Mapper.xml
package com.hungraim.ism.pojo.vo.disable;
/**
* 待遇申请管理详情VO
*/
public class ApplicationManagementInfoVO {
//所在省市区
//参保人姓名
//参保人身份证号码
//居住地址
//联系人电话
//联系人身份证号码
//申请人电话
//与参保人关系
//病情描述及诊断
//意向服务机构
//提交时间
//审核人
//审核结果
//备注
}
package com.hungraim.ism.pojo.vo.disable;
/**
* 待遇申请管理列表VO
*/
public class ApplicationManagementListVO {
//适用机构
//机构代码
private String organId;
//所在省市
//参保人姓名
//参保人身份证号码
//待遇类型
//联系人姓名
//联系人身份证号码
//申请人电话
//居住地址
//审核状态
}
package com.hungraim.ism.pojo.vo.disable;
/**
* 失能人员信息列表VO
*/
public class DisableVO {
//id
private String applyHisId;
//适用机构
private String organName;
//机构代码
private String organId;
//所在省市
private String provincial;
private String city;
private String area;
//失能人员姓名
private String name;
//失能人员身份证号码
private String certiCode;
//待遇类型
private String treatmentTyte;
//联系人姓名
private String operName;
//年龄
//性别
private String gender;
//失能人员身份证号码
private String operCertiCode;
//失能人员联系方式
private String fixedTel;
//申请服务方式
private String srvModeId;
//诊断疾病
private String disease;
//申请时间
private String effTime;
//申请来源
private String dataFrom;
//审核状态
private String adressDetail;
public String getApplyHisId() {
return applyHisId;
}
public void setApplyHisId(String applyHisId) {
this.applyHisId = applyHisId;
}
public String getOrganName() {
return organName;
}
public void setOrganName(String organName) {
this.organName = organName;
}
public String getOrganId() {
return organId;
}
public void setOrganId(String organId) {
this.organId = organId;
}
public String getProvincial() {
return provincial;
}
public void setProvincial(String provincial) {
this.provincial = provincial;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getArea() {
return area;
}
public void setArea(String area) {
this.area = area;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCertiCode() {
return certiCode;
}
public void setCertiCode(String certiCode) {
this.certiCode = certiCode;
}
public String getTreatmentTyte() {
return treatmentTyte;
}
public void setTreatmentTyte(String treatmentTyte) {
this.treatmentTyte = treatmentTyte;
}
public String getOperName() {
return operName;
}
public void setOperName(String operName) {
this.operName = operName;
}
public String getOperCertiCode() {
return operCertiCode;
}
public void setOperCertiCode(String operCertiCode) {
this.operCertiCode = operCertiCode;
}
public String getAdressDetail() {
return adressDetail;
}
public void setAdressDetail(String adressDetail) {
this.adressDetail = adressDetail;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getFixedTel() {
return fixedTel;
}
public void setFixedTel(String fixedTel) {
this.fixedTel = fixedTel;
}
public String getSrvModeId() {
return srvModeId;
}
public void setSrvModeId(String srvModeId) {
this.srvModeId = srvModeId;
}
public String getDisease() {
return disease;
}
public void setDisease(String disease) {
this.disease = disease;
}
public String getEffTime() {
return effTime;
}
public void setEffTime(String effTime) {
this.effTime = effTime;
}
public String getDataFrom() {
return dataFrom;
}
public void setDataFrom(String dataFrom) {
this.dataFrom = dataFrom;
}
}
package com.hungraim.ism.pojo.entity.governance; package com.hungraim.ltc.pojo.entity.governance;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
...@@ -11,32 +11,116 @@ import java.util.Date; ...@@ -11,32 +11,116 @@ import java.util.Date;
@Data @Data
@TableName("CH_SRV_REMOVE_BED") @TableName("CH_SRV_REMOVE_BED")
public class ChSrvRemoveBed { public class ChSrvRemoveBed {
/**
* 撤床ID
*/
private Integer removeBedId; private Integer removeBedId;
/**
* 护理机构ID
*/
private Integer srvOrganId; private Integer srvOrganId;
/**
* 失能人员ID
*/
private Integer disabInfoId; private Integer disabInfoId;
/**
* 建床ID
*/
private Integer buildBedId; private Integer buildBedId;
/**
* 方案ID
*/
private Integer programId; private Integer programId;
/**
* 姓名
*/
private String realName; private String realName;
/**
* 性别(男:M;女:F;不确定 N)
*/
private String gender; private String gender;
/**
* 出生年月日
*/
private Date birthday; private Date birthday;
/**
* 手机号
*/
private String tel; private String tel;
/**
* 评定等级(1:1级,2:2级,3:3级,4:4级,5:5级)
*/
private Integer rating; private Integer rating;
/**
* 保障方式(1:院护,2:专户,3:巡护)
*/
private Integer guaranteeMode; private Integer guaranteeMode;
/**
* 建床日期
*/
private Date buildBedTime; private Date buildBedTime;
/**
* 专区
*/
private String specialZone; private String specialZone;
/**
* 长护号
*/
private String changhuNo; private String changhuNo;
/**
* 床号
*/
private String bedNumber; private String bedNumber;
/**
* 撤床日期
*/
private Date removeBedTime; private Date removeBedTime;
/**
* 在床天数
*/
private Integer bedDays; private Integer bedDays;
/**
* 诊断
*/
private String diagnosis; private String diagnosis;
/**
* 建床情况
*/
private String bedConstruction; private String bedConstruction;
/**
* 护理经过
*/
private String nursingProcess; private String nursingProcess;
/**
* 撤床原因(1好转、2不再符合条件,3转换保障方式,4加重、5转住院治疗,6对机构服务不满意,7更换医护机构,8对政策原因不满,9死亡、10撤床,11其他原因)
*/
private Integer removeBedReason; private Integer removeBedReason;
/**
* 撤床后建议
*/
private String removeBedProposal; private String removeBedProposal;
/**
* 状态(0有效,1失效)
*/
private Integer status; private Integer status;
/**
* 首次操作时间
*/
private Date fcd; private Date fcd;
/**
* 首次操作人
*/
private Integer fcu; private Integer fcu;
/**
* 末次操作时间
*/
private Date lcd; private Date lcd;
/**
* 末次操作人
*/
private Integer lcu; private Integer lcu;
/**
* 撤床备注
*/
private String removeBedReasonRemarks; private String removeBedReasonRemarks;
} }
package com.hungraim.ltc.pojo.vo.governance;
import lombok.Data;
/**
* @author jiaguokai
*/
@Data
public class BuildBedSearchReq {
private Integer pageNum;
private Integer pageSize;
/**
* 护理机构ID
*/
private Integer srvOrganId;
/**
* 姓名
*/
private String realName;
/**
* 身份证号码
*/
private String certiCode;
/**
* 状态(0已建床,1已撤床,2-全部)
*/
private Integer status;
}
package com.hungraim.ltc.pojo.vo.governance;
import lombok.Data;
/**
* @author jiaguokai
*/
@Data
public class BuildBedSearchRsp {
private String buildBedId;
private String provinceCity;
private String realName;
private String certiCode;
private String tel;
private String age;
private String gender;
private String address;
private String nursingDemandLevel;
private String srvMode;
private String changhuNo;
private String specialZone;
private String bedNumber;
private String buildBedTime;
private String removeBedTime;
private String status;
}
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<!--基础包--> <!--基础包-->
<dependency> <dependency>
<groupId>com.hungraim.ism</groupId> <groupId>com.hungraim.ltc</groupId>
<artifactId>common-core</artifactId> <artifactId>common-core</artifactId>
<version>0.0.1</version> <version>0.0.1</version>
<exclusions> <exclusions>
...@@ -54,12 +54,12 @@ ...@@ -54,12 +54,12 @@
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.hungraim.ism</groupId> <groupId>com.hungraim.ltc</groupId>
<artifactId>common-mybatis</artifactId> <artifactId>common-mybatis</artifactId>
<version>0.0.1</version> <version>0.0.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.hungraim.ism</groupId> <groupId>com.hungraim.ltc</groupId>
<artifactId>common-redis</artifactId> <artifactId>common-redis</artifactId>
<version>0.0.1</version> <version>0.0.1</version>
</dependency> </dependency>
......
package com.hungraim.ch.governance; package com.hungraim.ltc.governance;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
......
package com.hungraim.ltc.governance.controller;
import com.hungraim.ltc.governance.service.IBuildBedService;
import com.hungraim.ltc.pojo.entity.governance.ChSrvBuildBed;
import com.hungraim.ltc.pojo.vo.governance.BuildBedSearchReq;
import com.hungraim.ltc.util.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* @author jiaguokai
*/
@RestController
@RequestMapping("/api.governance/buildBed")
@Slf4j
public class BuildBedController {
@Resource
private IBuildBedService buildBedService;
@PostMapping("/searchOrgBed")
public Result searchOrgBed(@RequestBody BuildBedSearchReq req) {
return buildBedService.searchOrgBed(req);
}
@PostMapping("/addBuild")
public Result buildBed(ChSrvBuildBed buildBed) {
boolean b = buildBedService.save(buildBed);
return Result.success(b);
}
}
package com.hungraim.ltc.governance.controller;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.hungraim.ltc.governance.service.IBuildBedService;
import com.hungraim.ltc.governance.service.IRemoveBedService;
import com.hungraim.ltc.pojo.entity.governance.ChSrvBuildBed;
import com.hungraim.ltc.pojo.entity.governance.ChSrvRemoveBed;
import com.hungraim.ltc.util.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @author jiaguokai
*/
@RestController
@RequestMapping("/api.governance/")
@Slf4j
public class RemoveBedController {
@Resource
private IRemoveBedService removeBedService;
@Resource
private IBuildBedService buildBedService;
@PostMapping("/")
public Result removeOne(ChSrvRemoveBed removeBed) {
Integer buildBedId = removeBed.getBuildBedId();
buildBedService.update(new LambdaUpdateWrapper<ChSrvBuildBed>().eq(ChSrvBuildBed::getBuildBedId, buildBedId).set(ChSrvBuildBed::getStatus, 1));
return Result.success(removeBedService.removeOne(removeBed));
}
}
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.governance.ChSrvBuildBed;
import com.hungraim.ltc.pojo.vo.governance.BuildBedSearchReq;
import com.hungraim.ltc.pojo.vo.governance.BuildBedSearchRsp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
/**
* @author jiaguokai
* ChSrvBuildBed
*/
@Mapper
@Repository
public interface BuildBedMapper extends BaseMapper<ChSrvBuildBed> {
Page<BuildBedSearchRsp> searchOrgBed(Page<BuildBedSearchRsp> page, @Param("req") BuildBedSearchReq req);
}
package com.hungraim.ltc.governance.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hungraim.ltc.pojo.entity.governance.ChSrvRemoveBed;
import org.apache.ibatis.annotations.Mapper;
/**
* @author jiaguokai
*/
@Mapper
public interface RemoveBedMapper extends BaseMapper<ChSrvRemoveBed> {
}
package com.hungraim.ltc.governance.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hungraim.ltc.pojo.entity.governance.ChSrvBuildBed;
import com.hungraim.ltc.pojo.vo.governance.BuildBedSearchReq;
import com.hungraim.ltc.util.Result;
/**
* @author jiaguokai
*/
public interface IBuildBedService extends IService<ChSrvBuildBed> {
Result searchOrgBed(BuildBedSearchReq req);
}
package com.hungraim.ltc.governance.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hungraim.ltc.pojo.entity.governance.ChSrvRemoveBed;
/**
* @author jiaguokai
*/
public interface IRemoveBedService extends IService<ChSrvRemoveBed> {
Integer removeOne(ChSrvRemoveBed removeBed);
}
package com.hungraim.ltc.governance.service.impl;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hungraim.ltc.governance.dao.BuildBedMapper;
import com.hungraim.ltc.governance.service.IBuildBedService;
import com.hungraim.ltc.pojo.entity.governance.ChSrvBuildBed;
import com.hungraim.ltc.pojo.vo.governance.BuildBedSearchReq;
import com.hungraim.ltc.util.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* @author jiaguokai
*/
@Slf4j
@Service
public class BuildBedServiceImpl extends ServiceImpl<BuildBedMapper, ChSrvBuildBed> implements IBuildBedService {
@Resource
private BuildBedMapper buildBedMapper;
@Override
public Result searchOrgBed(BuildBedSearchReq req) {
// QueryWrapper<ChSrvBuildBed> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("SRV_ORGAN_ID", req.getSrvOrganId());
// if (StrUtil.isNotBlank(req.getRealName())) {
// queryWrapper.like("REAL_NAME", req.getRealName());
// }
// if (StrUtil.isNotBlank(req.getCertiCode())) {
// queryWrapper.eq("CERTI_CODE", req.getCertiCode());
// }
// if (req.getStatus() != null && req.getStatus() != 2) {
// queryWrapper.eq("STATUS", req.getStatus());
// }
// Page<ChSrvBuildBed> page = buildBedMapper.selectPage(new Page<>(req.getPageNum(), req.getPageSize()), queryWrapper);
if (2 == req.getStatus()) {
req.setStatus(null);
}
Page page = buildBedMapper.searchOrgBed(new Page<>(req.getPageNum(), req.getPageSize()), req);
return Result.success(page);
}
}
package com.hungraim.ltc.governance.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hungraim.ltc.governance.dao.BuildBedMapper;
import com.hungraim.ltc.governance.dao.RemoveBedMapper;
import com.hungraim.ltc.governance.service.IRemoveBedService;
import com.hungraim.ltc.pojo.entity.governance.ChSrvRemoveBed;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
/**
* @author jiaguokai
*/
@Service
@Slf4j
public class RemoveBedServiceImpl extends ServiceImpl<RemoveBedMapper, ChSrvRemoveBed> implements IRemoveBedService {
@Resource
private RemoveBedMapper removeBedMapper;
@Resource
private BuildBedMapper buildBedMapper;
@Override
public Integer removeOne(ChSrvRemoveBed removeBed) {
return null;
}
}
spring: spring:
devtools: devtools:
restart: restart:
enabled: true enabled: true
additional-paths: src/main/java additional-paths: src/main/java
application: application:
name: ISM-GOVERNANCE-SERVICE name: LTC-GOVERNANCE-SERVICE
cloud: cloud:
nacos: nacos:
discovery: discovery:
...@@ -16,10 +15,10 @@ spring: ...@@ -16,10 +15,10 @@ spring:
server-addr: qw.hungraim.com:31158 server-addr: qw.hungraim.com:31158
file-extension: yaml # 必须修改成yaml file-extension: yaml # 必须修改成yaml
extension-configs: extension-configs:
- data-id: ism-database.yaml - data-id: ltc-database.yaml
group: common group: common
refresh: true refresh: true
- data-id: ism-basic.yaml - data-id: ltc-basic.yaml
group: common group: common
refresh: true refresh: true
- data-id: thread-config.yaml - data-id: thread-config.yaml
...@@ -31,3 +30,4 @@ server: ...@@ -31,3 +30,4 @@ server:
mybatis-plus: mybatis-plus:
configuration: configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mapper-locations: classpath:com/hungraim/ltc/governance/mapper/*.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hungraim.ltc.governance.dao.BuildBedMapper">
<select id="searchOrgBed" parameterType="com.hungraim.ltc.pojo.vo.governance.BuildBedSearchReq"
resultType="com.hungraim.ltc.pojo.vo.governance.BuildBedSearchRsp">
SELECT a.BUILD_BED_ID, CONCAT(b.DISTRICT_PROVINCIAL, b.DISTRICT_CITY) AS province_city, b.REAL_NAME,
b.CERTI_CODE, b.TEL, TRUNC(months_between(sysdate, b.BIRTHDAY)/12) AS age,
DECODE(b.GENDER, 'M','男','F', '女') gender, a.ADRESS_DETAIL as address,
a.NURSING_DEMAND_LEVEL, a.SRV_MODE, a.CHANGHU_NO, a.SPECIAL_ZONE, a.BED_NUMBER, TO_CHAR(a.BUILD_BED_TIME, 'yyyy-MM-dd') AS build_bed_time,
TO_CHAR((CASE a.STATUS WHEN 1 THEN (SELECT REMOVE_BED_TIME FROM CH_SRV_REMOVE_BED c WHERE c.BUILD_BED_ID=a.BUILD_BED_ID) ELSE NULL END), 'yyyy-MM-dd') AS remove_bed_time,
(CASE a.STATUS when 0 THEN '已建床' when 1 then '已撤床' end) AS status
FROM CH_SRV_BUILD_BED a, CH_DISABLE_INFO b where a.DISAB_INFO_ID = b.DISAB_INFO_ID
AND a.SRV_ORGAN_ID =#{req.srvOrganId}
<if test="req.realName != null and req.realName != ''">
AND upper(a.REAL_NAME) LIKE '%' || upper#{req.realName}) || '%'
</if>
<if test="req.certiCode != null and req.certiCode != ''">
AND upper(a.CERTI_CODE) = upper(#{req.certiCode})
</if>
<if test="req.status != null and req.status != '' ">
AND a.STATUS= #{req.status}
</if>
ORDER BY a.BUILD_BED_TIME DESC, a.CERTI_CODE DESC
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hungraim.ltc.governance.dao.RemoveBedMapper">
</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