Commit 64489522 authored by zhangch's avatar zhangch
parents 38283e53 61e74816
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.hungraim.ltc.pojo.entity.PageInfo;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
...@@ -11,9 +12,9 @@ import java.io.Serializable; ...@@ -11,9 +12,9 @@ import java.io.Serializable;
@Data @Data
@TableName("CH_DISABLE_INFO") @TableName("CH_DISABLE_INFO")
@KeySequence(value = "SEQ_CH_DISABLE_INFO") @KeySequence(value = "SEQ_CH_DISABLE_INFO")
public class ChDisableInfo implements Serializable { public class ChDisableInfo extends PageInfo implements Serializable {
@TableId(value = "DISAB_INFO_ID", type = IdType.INPUT) @TableId(value = "DISAB_INFO_ID", type = IdType.INPUT)
private Integer disabInfoId; private Long disabInfoId;
private String agentLatitude; private String agentLatitude;
private String acptRoadDetail; private String acptRoadDetail;
private java.util.Date checkTime; private java.util.Date checkTime;
......
...@@ -54,4 +54,6 @@ public class DisableVO implements Serializable { ...@@ -54,4 +54,6 @@ public class DisableVO implements Serializable {
private String datafrom; private String datafrom;
//审核状态 //审核状态
private String applyStatus; private String applyStatus;
//分配状态
private String status;
} }
package com.hungraim.ltc.pojo.vo.governance;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 失能人员信息列表VO
*/
@Data
public class DisableInfoTaskVO implements Serializable {
private String realName;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date birthday;
private String medicalCard;
private Long srvModeId;
private String evaluateRating;
private Integer srvOrganIntent;
private String gender;
private String certiCode;
private String disease;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date finishTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date reAprTime;
private String permitId;
}
package com.hungraim.ltc.pojo.vo.governance;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hungraim.ltc.pojo.entity.PageInfo;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 失能人员信息列表VO
*/
@Data
public class SrvSendVO extends PageInfo implements Serializable {
//id
@TableId
private Integer sendId;
//失能人员ID
private Integer disableInfoId;
//适用机构
private String organName;
//机构idsrv
private Integer srvOrganId;
//机构代码
private String organId;
//所在省市
private String provincial;
private String city;
private String area;
//失能人员姓名
private String name;
//失能人员身份证号码
private String certiCode;
//待遇类型
private String treatmentTyte;
//联系人姓名
private String opername;
//年龄
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date birthday;
//性别
private String gender;
//失能人员身份证号码
private String opercertiCode;
//失能人员手机号
private String tel;
//失能人员固话
private String fixedtel;
//申请服务方式
private String srvModeName;
//诊断疾病
private String disease;
private String diseTypeS;
//申请时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date effTime;
//申请来源 网厅:0,核心:1,手机端:2,待遇申请:3
private String datafrom;
//审核状态
private String applyStatus;
//分配状态
private String status;
}
package com.hungraim.ltc.governance.controller; package com.hungraim.ltc.governance.controller;
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.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.hungraim.ltc.pojo.entity.assessment.ChAprTask;
import com.hungraim.ltc.pojo.vo.disable.DisableEvaluateVO; import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvSend;
import com.hungraim.ltc.governance.service.*; import com.hungraim.ltc.governance.service.*;
import com.hungraim.ltc.pojo.entity.disable.ChDisableApply;
import com.hungraim.ltc.pojo.entity.disable.ChSrvOrgan; import com.hungraim.ltc.pojo.entity.disable.ChSrvOrgan;
import com.hungraim.ltc.pojo.entity.governance.ChSrvBuildBed; import com.hungraim.ltc.pojo.entity.governance.ChSrvBuildBed;
import com.hungraim.ltc.pojo.vo.governance.BuildBedSearchReq; import com.hungraim.ltc.pojo.vo.governance.BuildBedSearchReq;
import com.hungraim.ltc.pojo.vo.governance.DisableInfoTaskVO;
import com.hungraim.ltc.pojo.vo.governance.SrvSendVO;
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.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -30,7 +32,7 @@ public class BuildBedController { ...@@ -30,7 +32,7 @@ public class BuildBedController {
@Resource @Resource
private IBuildBedService buildBedService; private IBuildBedService buildBedService;
@Resource @Resource
private ApplyService applyService; private SrvSendService sendService;
@Resource @Resource
private CrvService crvService; private CrvService crvService;
...@@ -54,132 +56,54 @@ public class BuildBedController { ...@@ -54,132 +56,54 @@ public class BuildBedController {
* 功能描述: 服务分配信息检索条件查询 * 功能描述: 服务分配信息检索条件查询
*/ */
@GetMapping("/pageFuwuCondition") @GetMapping("/pageFuwuCondition")
public Result pageFuwuCondition(HttpServletRequest request, public Result pageFuwuCondition(ChDisableInfo disableInfo, ChSrvOrgan chSrvOrgan, ChSrvSend chSrvSend) {
@RequestBody(required = false) ChDisableApply disableApply) {
// 创建一个page对象 // 创建一个page对象
Page<ChDisableApply> disableApplyPage = new Page<ChDisableApply>(disableApply.getCurrent(), disableApply.getLimit()); IPage<SrvSendVO> page = sendService.selectPage(disableInfo, chSrvOrgan, chSrvSend);
// 构建条件
QueryWrapper<ChDisableApply> queryWrapper = new QueryWrapper<>();
// 多条件组合查询
// 机构id
String organid = disableApply.getOrganId();
// 失能人员姓名
String name = disableApply.getRealName();
// 失能人员手机号码
String tel = disableApply.getTel();
// 省
String provincial = disableApply.getDistrictProvincial();
// 市
String city = disableApply.getDistrictCity();
// 县
String area = disableApply.getDistrictArea();
// 失能人员身份证号码
String certiCode = disableApply.getCertiCode();
// 意向护理机构
Long srvOrganId = disableApply.getSrvOrganId();
// 服务方式
Long srvModeId = disableApply.getSrvModeId();
// 状态
Short applyStatus = disableApply.getApplyStatus();
if (!StrUtil.isEmpty(organid)) {
queryWrapper.like("organ_id", organid);
}
if (!StrUtil.isEmpty(name)) {
queryWrapper.like("real_name", name);
}
if (!StrUtil.isEmpty(tel)) {
queryWrapper.like("tel", tel);
}
if (!StrUtil.isEmpty(city)) {
queryWrapper.like("district_City", city);
}
if (!StrUtil.isEmpty(provincial)) {
queryWrapper.like("district_Provincial", provincial);
}
if (!StrUtil.isEmpty(area)) {
queryWrapper.like("district_Area", area);
}
if (!StrUtil.isEmpty(certiCode)) {
queryWrapper.like("certi_Code", certiCode);
}
if (srvOrganId != null) {
queryWrapper.like("srv_Organ_Id", srvOrganId);
}
if (srvModeId != null) {
queryWrapper.like("srv_Mode_Id", srvModeId);
}
if (applyStatus != null) {
queryWrapper.like("apply_Status", applyStatus);
}
// 调用方法实现分页查询
Page<ChDisableApply> page = applyService.seletPage(disableApplyPage, queryWrapper);
//buildBedService.
// 总记录数 // 总记录数
long total = disableApplyPage.getTotal(); long total = page.getTotal();
List<ChDisableApply> records = disableApplyPage.getRecords(); List<SrvSendVO> records = page.getRecords();
Map map = new HashMap<>(); Map map = new HashMap<>();
map.put("total", total); map.put("total", total);
map.put("recors", records); map.put("records", records);
return Result.success(map); return Result.success(map);
} }
/** /**
* 根据id查询失能人员的评定信息 * 根据id查询失能人员的评定信息
*/ */
@GetMapping("/queryEvaluateById") @PostMapping("/queryEvaluateById")
public Result queryEvaluateById (@ModelAttribute ChDisableApply chDisableApply){ public Result queryEvaluateById (SrvSendVO srvSendVO){
Integer disableInfoId = srvSendVO.getDisableInfoId();
String organId = chDisableApply.getOrganId(); Integer srvOrganId = srvSendVO.getSrvOrganId();
Long srvOrganId = chDisableApply.getSrvOrganId(); if(StrUtil.isBlankIfStr(disableInfoId)){
String realName = chDisableApply.getRealName(); return Result.failed("失能人员ID 为空!");
String certiCode = chDisableApply.getCertiCode(); }
if (StrUtil.isBlankIfStr(srvOrganId)){
IPage<DisableEvaluateVO> disableEvaluateVOIPage = disableEvaluateService.disableEvaluateList(organId, srvOrganId, realName, certiCode, chDisableApply.getCurrent(), chDisableApply.getLimit()); return Result.failed("机构id不能为空");
}
ChDisableApply page = applyService.selectById(chDisableApply.getApplyId()); DisableInfoTaskVO disableInfoTaskVO = sendService.selectTaskById(disableInfoId, srvOrganId);
// 查询是能人员最新评定信息 List<ChAprTask> chAprTasks = sendService.selectBydisableInfoId(disableInfoId);
Map map = new HashMap<>(); Map map = new HashMap<>();
map.put("disableEvaluate", disableEvaluateVOIPage.getRecords()); map.put("disableInfoTaskVO", disableInfoTaskVO);
map.put("chDisableApply", page); map.put("chAprTasks", chAprTasks);
return Result.success(map); return Result.success(map);
} }
/** /**
*护理机构及服务方式檢索 *护理机构及服务方式檢索
*/ */
@GetMapping("/PageCrv") @GetMapping("/PageCrv")
public Result PageCrv(HttpServletRequest request, public Result PageCrv(HttpServletRequest request, ChSrvOrgan chSrvOrgan){
@RequestBody(required = false) ChSrvOrgan chSrvOrgan){
// 创建一个page对象
Page<ChSrvOrgan> chSrvOrganPage = new Page<ChSrvOrgan>(chSrvOrgan.getCurrent(), chSrvOrgan.getLimit());
// 构建条件
QueryWrapper<ChSrvOrgan> queryWrapper = new QueryWrapper<>();
// 多条件组合查询
// 机构id
String srvid = chSrvOrgan.getOrganId();
// 机构名称
String srvOrganName = chSrvOrgan.getSrvOrganName();
// 社会信用代码
String code = chSrvOrgan.getUnifiedSocialCreditCode();
if (!StrUtil.isEmpty(srvid)) {
queryWrapper.like("organ_id", srvid);
}
if (!StrUtil.isEmpty(srvOrganName)) {
queryWrapper.like("srv_Organ_Name", srvOrganName);
}
if (!StrUtil.isEmpty(code)) {
queryWrapper.like("unified_social_credit_code", code);
}
// 调用方法实现分页查询 // 调用方法实现分页查询
Page<ChSrvOrgan> page = crvService.seletPage(chSrvOrganPage, queryWrapper); IPage<ChSrvOrgan> page = crvService.seletSrvOrganPage(chSrvOrgan);
//buildBedService.
// 总记录数 // 总记录数
long total = chSrvOrganPage.getTotal(); long total = page.getTotal();
List<ChSrvOrgan> records = chSrvOrganPage.getRecords(); List<ChSrvOrgan> records = page.getRecords();
Map map = new HashMap<>(); Map map = new HashMap<>();
map.put("total", total); map.put("total", total);
map.put("recors", records); map.put("recors", records);
...@@ -190,29 +114,32 @@ public class BuildBedController { ...@@ -190,29 +114,32 @@ public class BuildBedController {
*提交分配机构 *提交分配机构
*/ */
@PostMapping("/submit") @PostMapping("/submit")
public Result submit(@RequestBody(required = false) ChDisableApply chDisableApply){ public Result submit(@RequestParam(value = "chSrvSends",required = false)List<ChSrvSend> chSrvSends ){
// 判斷參數是否存在 if(chSrvSends != null && chSrvSends.size()>0){
if (chDisableApply.getApplyId()==null){ Long disabInfoId = null;
return Result.failed("机构id無效"); for (ChSrvSend chSrvSend: chSrvSends) {
} disabInfoId = chSrvSend.getDisabInfoId();
// 查出失能人員相關信息 // 判斷參數是否存在
ChDisableApply apply = applyService.selectById(chDisableApply.getApplyId()); if (StrUtil.isBlankIfStr(chSrvSend.getDisabInfoId()) || StrUtil.isBlankIfStr(chSrvSend.getSrvOrganId()) || StrUtil.isBlankIfStr(chSrvSend.getSrvModeId())){
ChSrvOrgan chSrvOrgan = new ChSrvOrgan(); return Result.failed("参数不全!");
apply.setOrganId(chDisableApply.getOrganId()); }
apply.setDistrictProvincial(chDisableApply.getDistrictProvincial()); chSrvSend.setAllotTime(new Date());
apply.setDistrictCity(chDisableApply.getDistrictCity()); chSrvSend.setStatus(Short.valueOf("1"));
apply.setDistrictArea(chDisableApply.getDistrictArea()); sendService.saveOrUpdate(chSrvSend);
apply.setSrvModeId(chDisableApply.getSrvModeId()); }
// apply.setSrvOrganName(chDisableApply.getSrvOrganName()); ChDisableInfo disableInfo = new ChDisableInfo();
// apply.setOrganTypeId(chSrvOrgan.getOrganTypeId()); disableInfo.setDisabInfoId(disabInfoId);
// apply.setUnifiedSocialCreditCode(chSrvOrgan.getUnifiedSocialCreditCode()); IPage<SrvSendVO> page = sendService.selectPage(disableInfo,new ChSrvOrgan() , new ChSrvSend());
// apply.setSrvType(chSrvOrgan.getSrvType()); Map map = new HashMap();
apply.setEndTime(chDisableApply.getEndTime()); map.put("total",page.getTotal());
apply.setAcptRoadDetail(chDisableApply.getAcptRoadDetail()); map.put("rows",page.getRecords());
// apply.setAcptRoadType(chSrvOrgan.getAcptRoadType()); return Result.success(map);
// crvService.updateById(apply); }else{
applyService.updateById(apply); return Result.failed("提交失败,参数为空");
return Result.success(apply); }
} }
} }
......
package com.hungraim.ltc.governance.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.assessment.ChAprTask;
import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo;
import com.hungraim.ltc.pojo.entity.disable.ChSrvOrgan;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvSend;
import com.hungraim.ltc.pojo.vo.governance.BuildBedSearchReq;
import com.hungraim.ltc.pojo.vo.governance.BuildBedSearchRsp;
import com.hungraim.ltc.pojo.vo.governance.DisableInfoTaskVO;
import com.hungraim.ltc.pojo.vo.governance.SrvSendVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @author jiaguokai
* ChSrvBuildBed
*/
@Mapper
@Repository
public interface SrvSendMapper extends BaseMapper<ChSrvSend> {
Page<BuildBedSearchRsp> searchOrgBed(Page<BuildBedSearchRsp> page, @Param("req") BuildBedSearchReq req);
Page<SrvSendVO> selectSendList(Page<SrvSendVO> page, @Param("disableInfo")ChDisableInfo disableInfo, @Param("chSrvOrgan")ChSrvOrgan chSrvOrgan, @Param("chSrvSend")ChSrvSend chSrvSend);
@Select("select permit_id from ch_srv_organ where srv_organ_id=#{organId} ")
String selectByOrganId(Integer srvOrganId);
@Select(" select s.real_name," +
" s.birthday," +
" s.medical_card," +
" s.srv_mode_id," +
" o.evaluate_rating," +
" s.srv_organ_intent," +
" s.gender," +
" s.certi_code," +
" s.disease," +
" i.finish_time," +
" i.re_apr_time" +
" from ch_disable_info s" +
" left join ch_apr_task i" +
" on s.last_task_id = i.task_id" +
" left join ch_apr_report o" +
" on i.task_id = o.task_id " +
" where s.disab_info_id=#{disableInfoId}")
DisableInfoTaskVO selectBydisableInfoId(Integer disableInfoId);
@Select("select * from ch_apr_task where disable_info_id=#{disableInfoId}")
List<ChAprTask> selectTaskByDisableInfoId(Integer disableInfoId);
}
package com.hungraim.ltc.governance.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hungraim.ltc.pojo.entity.disable.ChDisableApply;
public interface ApplyService extends IService<ChDisableApply> {
Page<ChDisableApply> seletPage(Page<ChDisableApply> disableApplyPage, QueryWrapper<ChDisableApply> queryWrapper);
ChDisableApply selectById(Long applyId);
}
package com.hungraim.ltc.governance.service; package com.hungraim.ltc.governance.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 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.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.hungraim.ltc.pojo.entity.disable.ChDisableApply; import com.hungraim.ltc.pojo.entity.disable.ChDisableApply;
...@@ -13,4 +14,5 @@ public interface CrvService extends IService<ChSrvOrgan> { ...@@ -13,4 +14,5 @@ public interface CrvService extends IService<ChSrvOrgan> {
ChSrvOrgan selectById(long applyId); ChSrvOrgan selectById(long applyId);
IPage<ChSrvOrgan> seletSrvOrganPage(ChSrvOrgan chSrvOrgan);
} }
package com.hungraim.ltc.governance.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hungraim.ltc.pojo.entity.assessment.ChAprTask;
import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo;
import com.hungraim.ltc.pojo.entity.disable.ChSrvOrgan;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvSend;
import com.hungraim.ltc.pojo.vo.governance.DisableInfoTaskVO;
import com.hungraim.ltc.pojo.vo.governance.SrvSendVO;
import java.util.List;
public interface SrvSendService extends IService<ChSrvSend> {
IPage<SrvSendVO> selectPage(ChDisableInfo disableInfo, ChSrvOrgan chSrvOrgan, ChSrvSend chSrvSend);
DisableInfoTaskVO selectTaskById(Integer disableInfoId, Integer srvOrganId);
List<ChAprTask> selectBydisableInfoId(Integer disableInfoId);
}
package com.hungraim.ltc.governance.service.impl;
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.ApplyMapper;
import com.hungraim.ltc.governance.service.ApplyService;
import com.hungraim.ltc.pojo.entity.disable.ChDisableApply;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
public class ApplyServiceImpl extends ServiceImpl<ApplyMapper, ChDisableApply> implements ApplyService {
@Resource
private ApplyMapper applyMapper;
@Override
public Page<ChDisableApply> seletPage(Page<ChDisableApply> disableApplyPage, QueryWrapper<ChDisableApply> queryWrapper) {
return applyMapper.selectPage(disableApplyPage, queryWrapper);
}
@Override
public ChDisableApply selectById(Long applyId) {
return applyMapper.selectById(applyId);
}
}
package com.hungraim.ltc.governance.service.impl; 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.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.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hungraim.ltc.governance.dao.CrvMapper; import com.hungraim.ltc.governance.dao.CrvMapper;
import com.hungraim.ltc.governance.service.CrvService; import com.hungraim.ltc.governance.service.CrvService;
import com.hungraim.ltc.pojo.entity.disable.ChDisableApply;
import com.hungraim.ltc.pojo.entity.disable.ChSrvOrgan; import com.hungraim.ltc.pojo.entity.disable.ChSrvOrgan;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -29,5 +30,39 @@ public class CrvServiceImpl extends ServiceImpl<CrvMapper, ChSrvOrgan> implement ...@@ -29,5 +30,39 @@ public class CrvServiceImpl extends ServiceImpl<CrvMapper, ChSrvOrgan> implement
return crvMapper.selectById(applyId); return crvMapper.selectById(applyId);
} }
@Override
public IPage<ChSrvOrgan> seletSrvOrganPage(ChSrvOrgan chSrvOrgan) {
Integer current = chSrvOrgan.getCurrent();
Integer limit = chSrvOrgan.getLimit();
if (current == null || current < 1) {
current =1;
}
if (limit == null || limit < 1) {
limit =1 ;
}
// 创建一个page对象
Page<ChSrvOrgan> chSrvOrganPage = new Page<ChSrvOrgan>(current,limit);
// 构建条件
QueryWrapper<ChSrvOrgan> queryWrapper = new QueryWrapper<>();
// 多条件组合查询
// 机构id
String srvid = chSrvOrgan.getOrganId();
// 机构名称
String srvOrganName = chSrvOrgan.getSrvOrganName();
// 社会信用代码
String code = chSrvOrgan.getUnifiedSocialCreditCode();
if (!StrUtil.isEmpty(srvid)) {
queryWrapper.like("organ_id", srvid);
}
if (!StrUtil.isEmpty(srvOrganName)) {
queryWrapper.like("srv_Organ_Name", srvOrganName);
}
if (!StrUtil.isEmpty(code)) {
queryWrapper.like("unified_social_credit_code", code);
}
return crvMapper.selectPage(chSrvOrganPage,queryWrapper);
}
} }
package com.hungraim.ltc.governance.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hungraim.ltc.governance.dao.SrvSendMapper;
import com.hungraim.ltc.governance.service.SrvSendService;
import com.hungraim.ltc.pojo.entity.assessment.ChAprTask;
import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo;
import com.hungraim.ltc.pojo.entity.disable.ChSrvOrgan;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvSend;
import com.hungraim.ltc.pojo.vo.governance.DisableInfoTaskVO;
import com.hungraim.ltc.pojo.vo.governance.SrvSendVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class SrvSendServiceImpl extends ServiceImpl<SrvSendMapper, ChSrvSend> implements SrvSendService {
@Autowired
private SrvSendMapper sendMapper;
@Override
public IPage<SrvSendVO> selectPage(ChDisableInfo disableInfo, ChSrvOrgan chSrvOrgan, ChSrvSend chSrvSend) {
Integer current = disableInfo.getCurrent();
Integer limit = disableInfo.getLimit();
if (current == null || current < 1) {
current =1;
}
if (limit == null || limit < 1) {
limit =1 ;
}
Page<SrvSendVO> page = new Page<>(current,limit);
return sendMapper.selectSendList(page, disableInfo, chSrvOrgan, chSrvSend);
}
@Override
public DisableInfoTaskVO selectTaskById(Integer disableInfoId, Integer srvOrganId) {
DisableInfoTaskVO disableInfoTaskVO = sendMapper.selectBydisableInfoId(disableInfoId);
String s = sendMapper.selectByOrganId(srvOrganId);
disableInfoTaskVO.setPermitId(s);
return disableInfoTaskVO;
}
@Override
public List<ChAprTask> selectBydisableInfoId(Integer disableInfoId) {
return sendMapper.selectTaskByDisableInfoId(disableInfoId);
}
}
<?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.SrvSendMapper">
<resultMap id="sendresultMap" type="com.hungraim.ltc.pojo.vo.governance.SrvSendVO">
<id column="srv_send_id" jdbcType="VARCHAR" property="sendId"/>
<result column="srv_organ_id" jdbcType="VARCHAR" property="srvOrganId"/>
<result column="organ_id" jdbcType="VARCHAR" property="organId"/>
<result column="disab_info_id" jdbcType="VARCHAR" property="disableInfoId"/>
<result column="SRV_ORGAN_NAME" jdbcType="VARCHAR" property="organName"/>
<result column="district_provincial" jdbcType="VARCHAR" property="provincial"/>
<result column="district_city" jdbcType="VARCHAR" property="city"/>
<result column="district_area" jdbcType="VARCHAR" property="area"/>
<result column="real_name" jdbcType="VARCHAR" property="name"/>
<result column="certi_code" jdbcType="VARCHAR" property="certiCode"/>
<result column="gender" jdbcType="VARCHAR" property="gender"/>
<result column="tel" jdbcType="VARCHAR" property="tel"/>
<result column="birthday" jdbcType="DATE" property="birthday"/>
<result column="status" jdbcType="VARCHAR" property="status"/>
</resultMap>
<!--查询服务分配信息列表-->
<select id="selectSendList" resultMap="sendresultMap">
select s.srv_send_id,
i.disab_info_id,
o.srv_organ_id,
o.organ_id,
o.SRV_ORGAN_NAME,
i.district_provincial,
i.district_city,
i.district_area,
i.real_name,
i.certi_code,
i.gender,
i.tel,
i.birthday,
s.status
from ch_disable_info i
left join ch_srv_send s
on s.disab_info_id = i.disab_info_id
left join ch_srv_organ o
on s.srv_organ_id = o.srv_organ_id
<where>
<if test="chSrvOrgan.srvOrganId != null and chSrvOrgan.srvOrganId != ''">
AND s.srv_organ_id = #{chSrvOrgan.srvOrganId}
</if>
<if test="disableInfo.realName != null and disableInfo.realName != ''">
AND i.real_name = #{disableInfo.realName}
</if>
<if test="disableInfo.tel != null and disableInfo.tel != ''">
AND i.tel = #{disableInfo.tel}
</if>
<if test="disableInfo.certiCode != null and disableInfo.certiCode != ''">
AND i.certi_code = #{disableInfo.certiCode}
</if>
<if test="disableInfo.districtProvincial != null and disableInfo.districtProvincial != ''">
AND i.district_provincial = #{disableInfo.districtProvincial}
</if>
<if test="disableInfo.districtCity != null and disableInfo.districtCity != ''">
AND i.district_city = #{disableInfo.districtCity}
</if>
<if test="disableInfo.districtArea != null and disableInfo.districtArea != ''">
AND i.district_area = #{disableInfo.districtArea}
</if>
<if test="disableInfo.srvOrganIntent != null and disableInfo.srvOrganIntent != ''">
AND i.srv_organ_intent = #{disableInfo.srvOrganIntent}
</if>
<if test="chSrvSend.srvModeId != null and chSrvSend.srvModeId != ''">
AND s.srv_mode_id = #{chSrvSend.srvModeId}
</if>
<if test="chSrvSend.status != null and chSrvSend.status != ''">
AND (s.status is not null and s.status = #{chSrvSend.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