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.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