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

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

parent 61e74816
......@@ -10,7 +10,7 @@ spring:
nacos:
discovery:
server-addr: qw.hungraim.com:31158
namespace: 0e0f834a-a665-4d27-ae04-9d53c2e02140
namespace: 3b93a812-d992-482e-a891-fcb3e455dc36
config:
namespace: 0e0f834a-a665-4d27-ae04-9d53c2e02140
server-addr: qw.hungraim.com:31158
......
......@@ -15,7 +15,7 @@ import java.util.Date;
*/
@TableName("CH_SRV_SEND")
@Data
@KeySequence("CH_SRV_SEND_SQE")
//@KeySequence("CH_SRV_SEND_SQE")
public class ChSrvSend implements Serializable {
/**
* 服务分配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 {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date reAprTime;
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 {
//id
@TableId
private Integer sendId;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date stopTime;
//失能人员ID
private Integer disableInfoId;
//适用机构
private String organName;
//机构idsrv
//机构id
private Integer srvOrganId;
//机构代码
private String organId;
......
package com.hungraim.ltc.governance.controller;
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.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.serviceManage.ChSrvSend;
import com.hungraim.ltc.governance.service.*;
import com.hungraim.ltc.pojo.entity.disable.ChSrvOrgan;
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.DisableInfoTaskVO;
import com.hungraim.ltc.pojo.vo.governance.DisableInfoVo;
import com.hungraim.ltc.pojo.vo.governance.SrvSendVO;
import com.hungraim.ltc.util.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
......@@ -35,12 +40,13 @@ public class BuildBedController {
private SrvSendService sendService;
@Resource
private CrvService crvService;
@Autowired
private DisableInfoServie disableInfoServie;
@Resource
private DisableEvaluateService disableEvaluateService;
@PostMapping("/searchOrgBed")
public Result searchOrgBed(@RequestBody BuildBedSearchReq req) {
return buildBedService.searchOrgBed(req);
......@@ -55,7 +61,7 @@ public class BuildBedController {
/**
* 功能描述: 服务分配信息检索条件查询
*/
@GetMapping("/pageFuwuCondition")
@PostMapping("/pageFuwuCondition")
public Result pageFuwuCondition(ChDisableInfo disableInfo, ChSrvOrgan chSrvOrgan, ChSrvSend chSrvSend) {
// 创建一个page对象
......@@ -73,32 +79,29 @@ public class BuildBedController {
* 根据id查询失能人员的评定信息
*/
@PostMapping("/queryEvaluateById")
public Result queryEvaluateById (SrvSendVO srvSendVO){
public Result queryEvaluateById(SrvSendVO srvSendVO) {
Integer disableInfoId = srvSendVO.getDisableInfoId();
Integer srvOrganId = srvSendVO.getSrvOrganId();
if(StrUtil.isBlankIfStr(disableInfoId)){
if (StrUtil.isBlankIfStr(disableInfoId)) {
return Result.failed("失能人员ID 为空!");
}
if (StrUtil.isBlankIfStr(srvOrganId)){
if (StrUtil.isBlankIfStr(srvOrganId)) {
return Result.failed("机构id不能为空");
}
DisableInfoTaskVO disableInfoTaskVO = sendService.selectTaskById(disableInfoId, srvOrganId);
List<ChAprTask> chAprTasks = sendService.selectBydisableInfoId(disableInfoId);
List<DisableInfoTaskVO> disableInfoTaskVO1 = sendService.selectBydisableInfoId(disableInfoId);
Map map = new HashMap<>();
map.put("disableInfoTaskVO", disableInfoTaskVO);
map.put("chAprTasks", chAprTasks);
map.put("chAprTasks", disableInfoTaskVO1);
return Result.success(map);
}
/**
*护理机构及服务方式檢索
* 护理机构及服务方式檢索
*/
@GetMapping("/PageCrv")
public Result PageCrv(HttpServletRequest request, ChSrvOrgan chSrvOrgan){
public Result PageCrv(HttpServletRequest request, ChSrvOrgan chSrvOrgan) {
// 调用方法实现分页查询
IPage<ChSrvOrgan> page = crvService.seletSrvOrganPage(chSrvOrgan);
// 总记录数
......@@ -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")
public Result submit(@RequestParam(value = "chSrvSends",required = false)List<ChSrvSend> chSrvSends ){
if(chSrvSends != null && chSrvSends.size()>0){
public Result submit(@RequestBody ChrSrvVo chrSrvVo) {
List<ChSrvSend> chSrvSends = chrSrvVo.getChSrvSends();
if (chSrvSends != null && chSrvSends.size() > 0) {
Long disabInfoId = null;
for (ChSrvSend chSrvSend: chSrvSends) {
for (ChSrvSend chSrvSend : chSrvSends) {
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("参数不全!");
}
chSrvSend.setAllotTime(new Date());
chSrvSend.setStatus(Short.valueOf("1"));
if(chrSrvVo.getSrvSendId() == null){
Long id = sendService.selectMaxId();
if(id == null){
id = 0l;
}
chSrvSend.setSrvSendId(++id);
}
sendService.saveOrUpdate(chSrvSend);
}
ChDisableInfo disableInfo = new ChDisableInfo();
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{
} else {
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> {
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} ")
String selectByOrganId(Integer srvOrganId);
String selectByOrganId(Integer organId);
@Select(" select s.real_name," +
" s.birthday," +
" s.medical_card," +
......@@ -51,6 +52,19 @@ public interface SrvSendMapper extends BaseMapper<ChSrvSend> {
" 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);
@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;
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;
......@@ -19,5 +18,7 @@ public interface SrvSendService extends IService<ChSrvSend> {
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;
import com.hungraim.ltc.pojo.vo.governance.SrvSendVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
......@@ -40,6 +41,7 @@ public class SrvSendServiceImpl extends ServiceImpl<SrvSendMapper, ChSrvSend> im
}
@Override
@Transactional(rollbackFor = Exception.class)
public DisableInfoTaskVO selectTaskById(Integer disableInfoId, Integer srvOrganId) {
DisableInfoTaskVO disableInfoTaskVO = sendMapper.selectBydisableInfoId(disableInfoId);
String s = sendMapper.selectByOrganId(srvOrganId);
......@@ -48,8 +50,14 @@ public class SrvSendServiceImpl extends ServiceImpl<SrvSendMapper, ChSrvSend> im
}
@Override
public List<ChAprTask> selectBydisableInfoId(Integer disableInfoId) {
@Transactional(rollbackFor = Exception.class)
public List<DisableInfoTaskVO> selectBydisableInfoId(Integer disableInfoId) {
return sendMapper.selectTaskByDisableInfoId(disableInfoId);
}
@Override
public Long selectMaxId() {
return this.baseMapper.selectMaxId();
}
}
......@@ -16,6 +16,7 @@
<result column="tel" jdbcType="VARCHAR" property="tel"/>
<result column="birthday" jdbcType="DATE" property="birthday"/>
<result column="status" jdbcType="VARCHAR" property="status"/>
<result column="stop_time" jdbcType="VARCHAR" property="stopTime"/>
</resultMap>
<!--查询服务分配信息列表-->
......@@ -32,6 +33,7 @@
i.certi_code,
i.gender,
i.tel,
s.stop_time,
i.birthday,
s.status
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