Commit 0b02a799 authored by 何龙龙's avatar 何龙龙

服务分配页面第三次提交 添加字段

parent 61e74816
...@@ -10,7 +10,7 @@ spring: ...@@ -10,7 +10,7 @@ spring:
nacos: nacos:
discovery: discovery:
server-addr: qw.hungraim.com:31158 server-addr: qw.hungraim.com:31158
namespace: 0e0f834a-a665-4d27-ae04-9d53c2e02140 namespace: 3b93a812-d992-482e-a891-fcb3e455dc36
config: config:
namespace: 0e0f834a-a665-4d27-ae04-9d53c2e02140 namespace: 0e0f834a-a665-4d27-ae04-9d53c2e02140
server-addr: qw.hungraim.com:31158 server-addr: qw.hungraim.com:31158
......
...@@ -15,7 +15,7 @@ import java.util.Date; ...@@ -15,7 +15,7 @@ import java.util.Date;
*/ */
@TableName("CH_SRV_SEND") @TableName("CH_SRV_SEND")
@Data @Data
@KeySequence("CH_SRV_SEND_SQE") //@KeySequence("CH_SRV_SEND_SQE")
public class ChSrvSend implements Serializable { public class ChSrvSend implements Serializable {
/** /**
* 服务分配ID * 服务分配ID
......
package com.hungraim.ltc.pojo.vo.disable;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvSend;
import lombok.Data;
import java.util.List;
@Data
public class ChrSrvVo extends ChSrvSend {
private List<ChSrvSend> chSrvSends;
}
...@@ -26,5 +26,7 @@ public class DisableInfoTaskVO implements Serializable { ...@@ -26,5 +26,7 @@ public class DisableInfoTaskVO implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date reAprTime; private Date reAprTime;
private String permitId; private String permitId;
private String tel;
private Integer taskStatus;
} }
package com.hungraim.ltc.pojo.vo.governance;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hungraim.ltc.pojo.entity.PageInfo;
import lombok.Data;
import java.util.Date;
@Data
public class DisableInfoVo extends PageInfo {
//失能人员ID
private Integer disableInfoId;
//所在省市
private String provincial;
private String city;
private String area;
private String realName;
private String gender;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date birthday;
//失能人员身份证号码
private String certiCode;
//失能人员手机号
private String tel;
//诊断疾病
private String disease;
//申请服务方式
private String srvModeName;
private Integer srvOrganIntent;
private String permitId;
//机构id
private Integer srvOrganId;
private Date aggign_time;
private Date endTime;
private Integer starts;
private String acptAddress;
}
...@@ -16,11 +16,13 @@ public class SrvSendVO extends PageInfo implements Serializable { ...@@ -16,11 +16,13 @@ public class SrvSendVO extends PageInfo implements Serializable {
//id //id
@TableId @TableId
private Integer sendId; private Integer sendId;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date stopTime;
//失能人员ID //失能人员ID
private Integer disableInfoId; private Integer disableInfoId;
//适用机构 //适用机构
private String organName; private String organName;
//机构idsrv //机构id
private Integer srvOrganId; private Integer srvOrganId;
//机构代码 //机构代码
private String organId; private String organId;
......
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.entity.assessment.ChAprTask;
import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo; import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvSend; 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.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.disable.ChrSrvVo;
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.DisableInfoTaskVO;
import com.hungraim.ltc.pojo.vo.governance.DisableInfoVo;
import com.hungraim.ltc.pojo.vo.governance.SrvSendVO; 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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
...@@ -35,12 +40,13 @@ public class BuildBedController { ...@@ -35,12 +40,13 @@ public class BuildBedController {
private SrvSendService sendService; private SrvSendService sendService;
@Resource @Resource
private CrvService crvService; private CrvService crvService;
@Autowired
private DisableInfoServie disableInfoServie;
@Resource @Resource
private DisableEvaluateService disableEvaluateService; private DisableEvaluateService disableEvaluateService;
@PostMapping("/searchOrgBed") @PostMapping("/searchOrgBed")
public Result searchOrgBed(@RequestBody BuildBedSearchReq req) { public Result searchOrgBed(@RequestBody BuildBedSearchReq req) {
return buildBedService.searchOrgBed(req); return buildBedService.searchOrgBed(req);
...@@ -55,7 +61,7 @@ public class BuildBedController { ...@@ -55,7 +61,7 @@ public class BuildBedController {
/** /**
* 功能描述: 服务分配信息检索条件查询 * 功能描述: 服务分配信息检索条件查询
*/ */
@GetMapping("/pageFuwuCondition") @PostMapping("/pageFuwuCondition")
public Result pageFuwuCondition(ChDisableInfo disableInfo, ChSrvOrgan chSrvOrgan, ChSrvSend chSrvSend) { public Result pageFuwuCondition(ChDisableInfo disableInfo, ChSrvOrgan chSrvOrgan, ChSrvSend chSrvSend) {
// 创建一个page对象 // 创建一个page对象
...@@ -73,32 +79,29 @@ public class BuildBedController { ...@@ -73,32 +79,29 @@ public class BuildBedController {
* 根据id查询失能人员的评定信息 * 根据id查询失能人员的评定信息
*/ */
@PostMapping("/queryEvaluateById") @PostMapping("/queryEvaluateById")
public Result queryEvaluateById (SrvSendVO srvSendVO){ public Result queryEvaluateById(SrvSendVO srvSendVO) {
Integer disableInfoId = srvSendVO.getDisableInfoId(); Integer disableInfoId = srvSendVO.getDisableInfoId();
Integer srvOrganId = srvSendVO.getSrvOrganId(); Integer srvOrganId = srvSendVO.getSrvOrganId();
if(StrUtil.isBlankIfStr(disableInfoId)){ if (StrUtil.isBlankIfStr(disableInfoId)) {
return Result.failed("失能人员ID 为空!"); return Result.failed("失能人员ID 为空!");
} }
if (StrUtil.isBlankIfStr(srvOrganId)){ if (StrUtil.isBlankIfStr(srvOrganId)) {
return Result.failed("机构id不能为空"); return Result.failed("机构id不能为空");
} }
DisableInfoTaskVO disableInfoTaskVO = sendService.selectTaskById(disableInfoId, srvOrganId); DisableInfoTaskVO disableInfoTaskVO = sendService.selectTaskById(disableInfoId, srvOrganId);
List<ChAprTask> chAprTasks = sendService.selectBydisableInfoId(disableInfoId); List<DisableInfoTaskVO> disableInfoTaskVO1 = sendService.selectBydisableInfoId(disableInfoId);
Map map = new HashMap<>(); Map map = new HashMap<>();
map.put("disableInfoTaskVO", disableInfoTaskVO); map.put("disableInfoTaskVO", disableInfoTaskVO);
map.put("chAprTasks", chAprTasks); map.put("chAprTasks", disableInfoTaskVO1);
return Result.success(map); return Result.success(map);
} }
/** /**
*护理机构及服务方式檢索 * 护理机构及服务方式檢索
*/ */
@GetMapping("/PageCrv") @GetMapping("/PageCrv")
public Result PageCrv(HttpServletRequest request, ChSrvOrgan chSrvOrgan){ public Result PageCrv(HttpServletRequest request, ChSrvOrgan chSrvOrgan) {
// 调用方法实现分页查询 // 调用方法实现分页查询
IPage<ChSrvOrgan> page = crvService.seletSrvOrganPage(chSrvOrgan); IPage<ChSrvOrgan> page = crvService.seletSrvOrganPage(chSrvOrgan);
// 总记录数 // 总记录数
...@@ -111,34 +114,51 @@ public class BuildBedController { ...@@ -111,34 +114,51 @@ public class BuildBedController {
} }
/** /**
*提交分配机构 *已分配护理机构信息查询
*/
@PostMapping("/querySrvYet")
public Result querySrvYet(DisableInfoVo disableInfoVo){
if (StrUtil.isBlankIfStr(disableInfoVo.getDisableInfoId())){
return Result.failed("失能人员id不能为空");
}
Page<DisableInfoVo> disableInfoVos = disableInfoServie.querySrvYet(disableInfoVo.getDisableInfoId(),disableInfoVo.getCurrent(),disableInfoVo.getLimit());
long total = disableInfoVos.getTotal();
List<DisableInfoVo> records = disableInfoVos.getRecords();
Map map = new HashMap<>();
map.put("total", total);
map.put("recors", records);
return Result.success(map);
}
/**
* 提交分配机构
*/ */
@PostMapping("/submit") @PostMapping("/submit")
public Result submit(@RequestParam(value = "chSrvSends",required = false)List<ChSrvSend> chSrvSends ){ public Result submit(@RequestBody ChrSrvVo chrSrvVo) {
if(chSrvSends != null && chSrvSends.size()>0){ List<ChSrvSend> chSrvSends = chrSrvVo.getChSrvSends();
if (chSrvSends != null && chSrvSends.size() > 0) {
Long disabInfoId = null; Long disabInfoId = null;
for (ChSrvSend chSrvSend: chSrvSends) { for (ChSrvSend chSrvSend : chSrvSends) {
disabInfoId = chSrvSend.getDisabInfoId(); disabInfoId = chSrvSend.getDisabInfoId();
// 判斷參數是否存在 // 判斷參數是否存在
if (StrUtil.isBlankIfStr(chSrvSend.getDisabInfoId()) || StrUtil.isBlankIfStr(chSrvSend.getSrvOrganId()) || StrUtil.isBlankIfStr(chSrvSend.getSrvModeId())){ if (StrUtil.isBlankIfStr(chSrvSend.getDisabInfoId()) || StrUtil.isBlankIfStr(chSrvSend.getSrvOrganId()) || StrUtil.isBlankIfStr(chSrvSend.getSrvModeId())) {
return Result.failed("参数不全!"); return Result.failed("参数不全!");
} }
chSrvSend.setAllotTime(new Date()); chSrvSend.setAllotTime(new Date());
chSrvSend.setStatus(Short.valueOf("1")); chSrvSend.setStatus(Short.valueOf("1"));
if(chrSrvVo.getSrvSendId() == null){
Long id = sendService.selectMaxId();
if(id == null){
id = 0l;
}
chSrvSend.setSrvSendId(++id);
}
sendService.saveOrUpdate(chSrvSend); sendService.saveOrUpdate(chSrvSend);
} }
ChDisableInfo disableInfo = new ChDisableInfo(); } else {
disableInfo.setDisabInfoId(disabInfoId);
IPage<SrvSendVO> page = sendService.selectPage(disableInfo,new ChSrvOrgan() , new ChSrvSend());
Map map = new HashMap();
map.put("total",page.getTotal());
map.put("rows",page.getRecords());
return Result.success(map);
}else{
return Result.failed("提交失败,参数为空"); return Result.failed("提交失败,参数为空");
} }
return Result.success();
} }
......
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.disable.ChDisableInfo;
import com.hungraim.ltc.pojo.vo.governance.DisableInfoVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@Mapper
public interface DisableInfoMapper extends BaseMapper<ChDisableInfo> {
@Select("select s.real_name," +
" s.acpt_provincial," +
" s.acpt_city," +
" s.acpt_area," +
" s.gender," +
" s.birthday," +
" s.certi_code," +
" s.tel," +
" s.disease," +
" i.srv_mode_id," +
" s.srv_organ_intent," +
" j.permit_id," +
" j.srv_organ_name," +
" i.allot_time," +
" i.stop_time," +
" i.status," +
" i.acpt_address" +
" from ch_srv_send i" +
" left join ch_disable_info s " +
" on s.disab_info_id = i.disab_info_id" +
" left join ch_srv_organ j" +
" on s.organ_id = j.organ_id" +
" where i.disab_info_id=#{disableInfoId}")
Page<DisableInfoVo> querySrvYet(Page page,Integer disableInfoId);
}
...@@ -29,10 +29,11 @@ public interface SrvSendMapper extends BaseMapper<ChSrvSend> { ...@@ -29,10 +29,11 @@ public interface SrvSendMapper extends BaseMapper<ChSrvSend> {
Page<BuildBedSearchRsp> searchOrgBed(Page<BuildBedSearchRsp> page, @Param("req") BuildBedSearchReq req); 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); 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} ") @Select("select permit_id from ch_srv_organ where srv_organ_id=#{organId} ")
String selectByOrganId(Integer srvOrganId); String selectByOrganId(Integer organId);
@Select(" select s.real_name," + @Select(" select s.real_name," +
" s.birthday," + " s.birthday," +
" s.medical_card," + " s.medical_card," +
...@@ -51,6 +52,19 @@ public interface SrvSendMapper extends BaseMapper<ChSrvSend> { ...@@ -51,6 +52,19 @@ public interface SrvSendMapper extends BaseMapper<ChSrvSend> {
" on i.task_id = o.task_id " + " on i.task_id = o.task_id " +
" where s.disab_info_id=#{disableInfoId}") " where s.disab_info_id=#{disableInfoId}")
DisableInfoTaskVO selectBydisableInfoId(Integer disableInfoId); DisableInfoTaskVO selectBydisableInfoId(Integer disableInfoId);
@Select("select * from ch_apr_task where disable_info_id=#{disableInfoId}")
List<ChAprTask> selectTaskByDisableInfoId(Integer disableInfoId); @Select("select s.real_name," +
" s.certi_code," +
" s.tel," +
" s.disease," +
" i.finish_time," +
" i.re_apr_time," +
" i.task_status" +
" from ch_apr_task i" +
" left join ch_disable_info s " +
" on s.disab_info_id = i.disable_info_id" +
" where i.disable_info_id=#{disableInfoId}")
List<DisableInfoTaskVO> selectTaskByDisableInfoId(Integer disableInfoId);
@Select("SELECT max(srv_send_id) id from CH_SRV_SEND")
Long selectMaxId();
} }
package com.hungraim.ltc.governance.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo;
import com.hungraim.ltc.pojo.vo.governance.DisableInfoVo;
public interface DisableInfoServie extends IService<ChDisableInfo> {
Page<DisableInfoVo> querySrvYet(Integer disableInfoId, int current, int limit);
}
...@@ -2,7 +2,6 @@ package com.hungraim.ltc.governance.service; ...@@ -2,7 +2,6 @@ package com.hungraim.ltc.governance.service;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService; 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.ChDisableInfo;
import com.hungraim.ltc.pojo.entity.disable.ChSrvOrgan; import com.hungraim.ltc.pojo.entity.disable.ChSrvOrgan;
import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvSend; import com.hungraim.ltc.pojo.entity.serviceManage.ChSrvSend;
...@@ -19,5 +18,7 @@ public interface SrvSendService extends IService<ChSrvSend> { ...@@ -19,5 +18,7 @@ public interface SrvSendService extends IService<ChSrvSend> {
DisableInfoTaskVO selectTaskById(Integer disableInfoId, Integer srvOrganId); DisableInfoTaskVO selectTaskById(Integer disableInfoId, Integer srvOrganId);
List<ChAprTask> selectBydisableInfoId(Integer disableInfoId); List<DisableInfoTaskVO> selectBydisableInfoId(Integer disableInfoId);
Long selectMaxId();
} }
package com.hungraim.ltc.governance.service.impl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hungraim.ltc.governance.dao.DisableInfoMapper;
import com.hungraim.ltc.governance.service.DisableInfoServie;
import com.hungraim.ltc.pojo.entity.disable.ChDisableInfo;
import com.hungraim.ltc.pojo.vo.governance.DisableInfoVo;
import com.hungraim.ltc.pojo.vo.governance.SrvSendVO;
import org.springframework.stereotype.Service;
@Service
public class DisableInfoServieImpl extends ServiceImpl<DisableInfoMapper, ChDisableInfo> implements DisableInfoServie {
@Override
public Page<DisableInfoVo> querySrvYet(Integer disableInfoId, int current, int limit) {
Page<SrvSendVO> page = new Page<>(current,limit);
return this.baseMapper.querySrvYet(page,disableInfoId);
}
}
...@@ -13,6 +13,7 @@ import com.hungraim.ltc.pojo.vo.governance.DisableInfoTaskVO; ...@@ -13,6 +13,7 @@ import com.hungraim.ltc.pojo.vo.governance.DisableInfoTaskVO;
import com.hungraim.ltc.pojo.vo.governance.SrvSendVO; import com.hungraim.ltc.pojo.vo.governance.SrvSendVO;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
...@@ -40,6 +41,7 @@ public class SrvSendServiceImpl extends ServiceImpl<SrvSendMapper, ChSrvSend> im ...@@ -40,6 +41,7 @@ public class SrvSendServiceImpl extends ServiceImpl<SrvSendMapper, ChSrvSend> im
} }
@Override @Override
@Transactional(rollbackFor = Exception.class)
public DisableInfoTaskVO selectTaskById(Integer disableInfoId, Integer srvOrganId) { public DisableInfoTaskVO selectTaskById(Integer disableInfoId, Integer srvOrganId) {
DisableInfoTaskVO disableInfoTaskVO = sendMapper.selectBydisableInfoId(disableInfoId); DisableInfoTaskVO disableInfoTaskVO = sendMapper.selectBydisableInfoId(disableInfoId);
String s = sendMapper.selectByOrganId(srvOrganId); String s = sendMapper.selectByOrganId(srvOrganId);
...@@ -48,8 +50,14 @@ public class SrvSendServiceImpl extends ServiceImpl<SrvSendMapper, ChSrvSend> im ...@@ -48,8 +50,14 @@ public class SrvSendServiceImpl extends ServiceImpl<SrvSendMapper, ChSrvSend> im
} }
@Override @Override
public List<ChAprTask> selectBydisableInfoId(Integer disableInfoId) { @Transactional(rollbackFor = Exception.class)
public List<DisableInfoTaskVO> selectBydisableInfoId(Integer disableInfoId) {
return sendMapper.selectTaskByDisableInfoId(disableInfoId); return sendMapper.selectTaskByDisableInfoId(disableInfoId);
} }
@Override
public Long selectMaxId() {
return this.baseMapper.selectMaxId();
}
} }
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<result column="tel" jdbcType="VARCHAR" property="tel"/> <result column="tel" jdbcType="VARCHAR" property="tel"/>
<result column="birthday" jdbcType="DATE" property="birthday"/> <result column="birthday" jdbcType="DATE" property="birthday"/>
<result column="status" jdbcType="VARCHAR" property="status"/> <result column="status" jdbcType="VARCHAR" property="status"/>
<result column="stop_time" jdbcType="VARCHAR" property="stopTime"/>
</resultMap> </resultMap>
<!--查询服务分配信息列表--> <!--查询服务分配信息列表-->
...@@ -32,6 +33,7 @@ ...@@ -32,6 +33,7 @@
i.certi_code, i.certi_code,
i.gender, i.gender,
i.tel, i.tel,
s.stop_time,
i.birthday, i.birthday,
s.status s.status
from ch_disable_info i from ch_disable_info i
......
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