患者信息,患者处方等相关接口新增
parent
bbc21a1a97
commit
c20dcbd4a5
@ -0,0 +1,109 @@
|
|||||||
|
package com.glxp.api.controller.basic;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.glxp.api.common.enums.ResultEnum;
|
||||||
|
import com.glxp.api.common.res.BaseResponse;
|
||||||
|
import com.glxp.api.common.util.ResultVOUtils;
|
||||||
|
import com.glxp.api.controller.BaseController;
|
||||||
|
import com.glxp.api.entity.auth.AuthAdmin;
|
||||||
|
import com.glxp.api.entity.basic.BasicSkSickerEntity;
|
||||||
|
import com.glxp.api.req.basic.BasicSkSickerRequest;
|
||||||
|
import com.glxp.api.res.PageSimpleResponse;
|
||||||
|
import com.glxp.api.res.basic.BasicSkSickerResponse;
|
||||||
|
import com.glxp.api.service.basic.BasicSkPrescribeService;
|
||||||
|
import com.glxp.api.service.basic.BasicSkSickerService;
|
||||||
|
import org.springframework.validation.BindingResult;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
public class BasicSickerController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
BasicSkSickerService basicSkSickerService;
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/udiwms/basic/sk/sicker/filter")
|
||||||
|
public BaseResponse filterSicker(BasicSkSickerRequest basicSkSickerRequest, BindingResult bindingResult) {
|
||||||
|
|
||||||
|
if (bindingResult.hasErrors()) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||||
|
}
|
||||||
|
List<BasicSkSickerResponse> basicSkSickerResponses = basicSkSickerService.filterList(basicSkSickerRequest);
|
||||||
|
PageInfo<BasicSkSickerResponse> pageInfo = new PageInfo<>(basicSkSickerResponses);
|
||||||
|
PageSimpleResponse<BasicSkSickerResponse> pageSimpleResponse = new PageSimpleResponse<>();
|
||||||
|
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
||||||
|
pageSimpleResponse.setList(basicSkSickerResponses);
|
||||||
|
return ResultVOUtils.success(pageSimpleResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/udiwms/basic/sk/sicker/add")
|
||||||
|
public BaseResponse addSicker(@RequestBody BasicSkSickerEntity basicSkSickerEntity) {
|
||||||
|
|
||||||
|
//判断名字和编号不能重复
|
||||||
|
QueryWrapper<BasicSkSickerEntity> ew = new QueryWrapper<>();
|
||||||
|
ew.clear();
|
||||||
|
ew.eq("code", basicSkSickerEntity.getCode());
|
||||||
|
long count = basicSkSickerService.count(ew);
|
||||||
|
if (count > 0) {
|
||||||
|
return ResultVOUtils.error(999, "编号已存在!");
|
||||||
|
}
|
||||||
|
|
||||||
|
AuthAdmin authAdmin = getUser();
|
||||||
|
basicSkSickerEntity.setId(IdUtil.getSnowflakeNextId());
|
||||||
|
basicSkSickerEntity.setCreateTime(new Date());
|
||||||
|
basicSkSickerEntity.setUpdateTime(new Date());
|
||||||
|
basicSkSickerEntity.setCreateUser(authAdmin.getId() + "");
|
||||||
|
basicSkSickerEntity.setUpdateUser(authAdmin.getId() + "");
|
||||||
|
|
||||||
|
Boolean falg = basicSkSickerService.save(basicSkSickerEntity);
|
||||||
|
if (!falg) {
|
||||||
|
return ResultVOUtils.error(999, "新增失败!");
|
||||||
|
}
|
||||||
|
return ResultVOUtils.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/udiwms/basic/sk/sicker/edit")
|
||||||
|
public BaseResponse editSicker(@RequestBody BasicSkSickerEntity basicSkSickerEntity) {
|
||||||
|
|
||||||
|
//判断名字和编号不能重复
|
||||||
|
QueryWrapper<BasicSkSickerEntity> ew = new QueryWrapper<>();
|
||||||
|
ew.eq("code", basicSkSickerEntity.getCode());
|
||||||
|
// ew.eq("type", 2);
|
||||||
|
BasicSkSickerEntity temp = basicSkSickerService.getOne(ew);
|
||||||
|
if (temp != null && !temp.getId().equals(temp.getId())) {
|
||||||
|
return ResultVOUtils.error(999, "编码已存在!");
|
||||||
|
}
|
||||||
|
|
||||||
|
AuthAdmin authAdmin = getUser();
|
||||||
|
basicSkSickerEntity.setUpdateTime(new Date());
|
||||||
|
basicSkSickerEntity.setUpdateUser(authAdmin.getId() + "");
|
||||||
|
|
||||||
|
Boolean falg = basicSkSickerService.updateById(basicSkSickerEntity);
|
||||||
|
if (!falg) {
|
||||||
|
return ResultVOUtils.error(999, "修改失败!");
|
||||||
|
}
|
||||||
|
return ResultVOUtils.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/udiwms/basic/sk/sicker/delete")
|
||||||
|
public BaseResponse delectSicker(@RequestBody BasicSkSickerEntity basicSkSickerEntity) {
|
||||||
|
|
||||||
|
Boolean falg = basicSkSickerService.removeById(basicSkSickerEntity.getId() + "");
|
||||||
|
if (!falg) {
|
||||||
|
return ResultVOUtils.error(999, "删除失败!");
|
||||||
|
}
|
||||||
|
return ResultVOUtils.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
package com.glxp.api.controller.basic;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.glxp.api.common.enums.ResultEnum;
|
||||||
|
import com.glxp.api.common.res.BaseResponse;
|
||||||
|
import com.glxp.api.common.util.ResultVOUtils;
|
||||||
|
import com.glxp.api.controller.BaseController;
|
||||||
|
import com.glxp.api.req.basic.BasicSkPrescribeRequest;
|
||||||
|
import com.glxp.api.res.PageSimpleResponse;
|
||||||
|
import com.glxp.api.res.basic.BasicSkPrescribeResponse;
|
||||||
|
import com.glxp.api.service.basic.BasicSkPrescribeService;
|
||||||
|
import org.springframework.validation.BindingResult;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
public class BasicSkPrescribeController extends BaseController {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
BasicSkPrescribeService basicSkPrescribeService;
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/udiwms/basic/sk/prescribe/filter")
|
||||||
|
public BaseResponse filterSicker(BasicSkPrescribeRequest basicSkPrescribeRequest, BindingResult bindingResult) {
|
||||||
|
|
||||||
|
if (bindingResult.hasErrors()) {
|
||||||
|
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||||
|
}
|
||||||
|
List<BasicSkPrescribeResponse> basicSkPrescribeResponses = basicSkPrescribeService.filterList(basicSkPrescribeRequest);
|
||||||
|
PageInfo<BasicSkPrescribeResponse> pageInfo = new PageInfo<>(basicSkPrescribeResponses);
|
||||||
|
PageSimpleResponse<BasicSkPrescribeResponse> pageSimpleResponse = new PageSimpleResponse<>();
|
||||||
|
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
||||||
|
pageSimpleResponse.setList(basicSkPrescribeResponses);
|
||||||
|
return ResultVOUtils.success(pageSimpleResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,72 @@
|
|||||||
|
package com.glxp.api.req.basic;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.glxp.api.util.page.ListPageRequest;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BasicSkPrescribeRequest extends ListPageRequest {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处方编码
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开方时间
|
||||||
|
*/
|
||||||
|
private Date prescribeDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开方医生
|
||||||
|
*/
|
||||||
|
private String createDr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 就诊科室编码
|
||||||
|
*/
|
||||||
|
private String deptCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 就诊科室名称
|
||||||
|
*/
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 诊断内容
|
||||||
|
*/
|
||||||
|
private String diagnosis;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 病人ID外键
|
||||||
|
*/
|
||||||
|
private String sickerIdFk;
|
||||||
|
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private String createUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
private String updateUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,113 @@
|
|||||||
|
package com.glxp.api.req.basic;
|
||||||
|
|
||||||
|
import com.glxp.api.util.page.ListPageRequest;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BasicSkSickerRequest extends ListPageRequest {
|
||||||
|
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 患者编码
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 住院号
|
||||||
|
*/
|
||||||
|
private String adNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 身份证号
|
||||||
|
*/
|
||||||
|
private String idNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机号
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 性别
|
||||||
|
*/
|
||||||
|
private String gender;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 职业
|
||||||
|
*/
|
||||||
|
private String job;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出生年月
|
||||||
|
*/
|
||||||
|
private String bornDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国籍
|
||||||
|
*/
|
||||||
|
private String nationality;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文化程度
|
||||||
|
*/
|
||||||
|
private String education;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监护人
|
||||||
|
*/
|
||||||
|
private String guardianName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监护人与患者关系
|
||||||
|
*/
|
||||||
|
private String guardianRel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 现居住地
|
||||||
|
*/
|
||||||
|
private String curAddr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 户籍地
|
||||||
|
*/
|
||||||
|
private String kosekiAddr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 医保
|
||||||
|
*/
|
||||||
|
private String medicalIns;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private String createUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
private String updateUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
}
|
@ -0,0 +1,71 @@
|
|||||||
|
package com.glxp.api.res.basic;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BasicSkPrescribeResponse {
|
||||||
|
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处方编码
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开方时间
|
||||||
|
*/
|
||||||
|
private Date prescribeDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开方医生
|
||||||
|
*/
|
||||||
|
private String createDr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 就诊科室编码
|
||||||
|
*/
|
||||||
|
private String deptCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 就诊科室名称
|
||||||
|
*/
|
||||||
|
private String deptName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 诊断内容
|
||||||
|
*/
|
||||||
|
private String diagnosis;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 病人ID外键
|
||||||
|
*/
|
||||||
|
private String sickerIdFk;
|
||||||
|
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private String createUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
private String updateUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,111 @@
|
|||||||
|
package com.glxp.api.res.basic;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BasicSkSickerResponse {
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 患者编码
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 住院号
|
||||||
|
*/
|
||||||
|
private String adNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 身份证号
|
||||||
|
*/
|
||||||
|
private String idNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机号
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 性别
|
||||||
|
*/
|
||||||
|
private String gender;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 职业
|
||||||
|
*/
|
||||||
|
private String job;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出生年月
|
||||||
|
*/
|
||||||
|
private String bornDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国籍
|
||||||
|
*/
|
||||||
|
private String nationality;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文化程度
|
||||||
|
*/
|
||||||
|
private String education;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监护人
|
||||||
|
*/
|
||||||
|
private String guardianName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监护人与患者关系
|
||||||
|
*/
|
||||||
|
private String guardianRel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 现居住地
|
||||||
|
*/
|
||||||
|
private String curAddr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 户籍地
|
||||||
|
*/
|
||||||
|
private String kosekiAddr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 医保
|
||||||
|
*/
|
||||||
|
private String medicalIns;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
private String createUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
private String updateUser;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
|
|
@ -1,10 +1,35 @@
|
|||||||
package com.glxp.api.service.basic;
|
package com.glxp.api.service.basic;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.glxp.api.dao.basic.BasicSkProjectMapper;
|
||||||
|
import com.glxp.api.req.basic.BasicSkPrescribeRequest;
|
||||||
|
import com.glxp.api.req.basic.BasicSkProjectRequest;
|
||||||
|
import com.glxp.api.res.basic.BasicSkPrescribeResponse;
|
||||||
|
import com.glxp.api.res.basic.BasicSkProjectResponse;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.glxp.api.entity.basic.BasicSkPrescribeEntity;
|
import com.glxp.api.entity.basic.BasicSkPrescribeEntity;
|
||||||
import com.glxp.api.dao.basic.BasicSkPrescribeMapper;
|
import com.glxp.api.dao.basic.BasicSkPrescribeMapper;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class BasicSkPrescribeService extends ServiceImpl<BasicSkPrescribeMapper, BasicSkPrescribeEntity> {
|
public class BasicSkPrescribeService extends ServiceImpl<BasicSkPrescribeMapper, BasicSkPrescribeEntity> {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
BasicSkPrescribeMapper basicSkPrescribeMapper;
|
||||||
|
|
||||||
|
public List<BasicSkPrescribeResponse> filterList(BasicSkPrescribeRequest basicSkPrescribeRequest) {
|
||||||
|
if (basicSkPrescribeRequest == null) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
if (basicSkPrescribeRequest.getPage() != null) {
|
||||||
|
int offset = (basicSkPrescribeRequest.getPage() - 1) * basicSkPrescribeRequest.getLimit();
|
||||||
|
PageHelper.offsetPage(offset, basicSkPrescribeRequest.getLimit());
|
||||||
|
}
|
||||||
|
List<BasicSkPrescribeResponse> data = basicSkPrescribeMapper.filterList(basicSkPrescribeRequest);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,34 @@
|
|||||||
package com.glxp.api.service.basic;
|
package com.glxp.api.service.basic;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.glxp.api.dao.basic.BasicSkProjectMapper;
|
||||||
|
import com.glxp.api.req.basic.BasicSkProjectRequest;
|
||||||
|
import com.glxp.api.req.basic.BasicSkSickerRequest;
|
||||||
|
import com.glxp.api.res.basic.BasicSkProjectResponse;
|
||||||
|
import com.glxp.api.res.basic.BasicSkSickerResponse;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.glxp.api.entity.basic.BasicSkSickerEntity;
|
import com.glxp.api.entity.basic.BasicSkSickerEntity;
|
||||||
import com.glxp.api.dao.basic.BasicSkSickerMapper;
|
import com.glxp.api.dao.basic.BasicSkSickerMapper;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class BasicSkSickerService extends ServiceImpl<BasicSkSickerMapper, BasicSkSickerEntity> {
|
public class BasicSkSickerService extends ServiceImpl<BasicSkSickerMapper, BasicSkSickerEntity> {
|
||||||
|
@Resource
|
||||||
|
BasicSkSickerMapper basicSkSickerMapper;
|
||||||
|
|
||||||
|
public List<BasicSkSickerResponse> filterList(BasicSkSickerRequest basicSkSickerRequest) {
|
||||||
|
if (basicSkSickerRequest == null) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
if (basicSkSickerRequest.getPage() != null) {
|
||||||
|
int offset = (basicSkSickerRequest.getPage() - 1) * basicSkSickerRequest.getLimit();
|
||||||
|
PageHelper.offsetPage(offset, basicSkSickerRequest.getLimit());
|
||||||
|
}
|
||||||
|
List<BasicSkSickerResponse> data = basicSkSickerMapper.filterList(basicSkSickerRequest);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,26 +1,42 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.glxp.api.dao.basic.BasicSkPrescribeMapper">
|
<mapper namespace="com.glxp.api.dao.basic.BasicSkPrescribeMapper">
|
||||||
<resultMap id="BaseResultMap" type="com.glxp.api.entity.basic.BasicSkPrescribeEntity">
|
<resultMap id="BaseResultMap" type="com.glxp.api.entity.basic.BasicSkPrescribeEntity">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
<!--@Table basic_sk_prescribe-->
|
<!--@Table basic_sk_prescribe-->
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
<result column="code" jdbcType="VARCHAR" property="code"/>
|
||||||
<result column="prescribeDate" jdbcType="TIMESTAMP" property="prescribeDate" />
|
<result column="prescribeDate" jdbcType="TIMESTAMP" property="prescribeDate"/>
|
||||||
<result column="createDr" jdbcType="VARCHAR" property="createDr" />
|
<result column="createDr" jdbcType="VARCHAR" property="createDr"/>
|
||||||
<result column="deptCode" jdbcType="VARCHAR" property="deptCode" />
|
<result column="deptCode" jdbcType="VARCHAR" property="deptCode"/>
|
||||||
<result column="deptName" jdbcType="VARCHAR" property="deptName" />
|
<result column="deptName" jdbcType="VARCHAR" property="deptName"/>
|
||||||
<result column="diagnosis" jdbcType="VARCHAR" property="diagnosis" />
|
<result column="diagnosis" jdbcType="VARCHAR" property="diagnosis"/>
|
||||||
<result column="sickerIdFk" jdbcType="VARCHAR" property="sickerIdFk" />
|
<result column="sickerIdFk" jdbcType="VARCHAR" property="sickerIdFk"/>
|
||||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
<result column="remark" jdbcType="VARCHAR" property="remark"/>
|
||||||
<result column="createUser" jdbcType="VARCHAR" property="createUser" />
|
<result column="createUser" jdbcType="VARCHAR" property="createUser"/>
|
||||||
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="createTime" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
<result column="updateUser" jdbcType="VARCHAR" property="updateUser" />
|
<result column="updateUser" jdbcType="VARCHAR" property="updateUser"/>
|
||||||
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
|
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
id, code, prescribeDate, createDr, deptCode, deptName, diagnosis, sickerIdFk, remark,
|
id, code, prescribeDate, createDr, deptCode, deptName, diagnosis, sickerIdFk, remark,
|
||||||
`createUser`, createTime, updateUser, updateTime
|
`createUser`, createTime, updateUser, updateTime
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="filterList" parameterType="com.glxp.api.req.basic.BasicSkPrescribeRequest"
|
||||||
|
resultType="com.glxp.api.res.basic.BasicSkPrescribeResponse">
|
||||||
|
SELECT *, cb.userName as createByName
|
||||||
|
FROM basic_sk_sicker
|
||||||
|
LEFT JOIN auth_user cb ON basic_sk_sicker.createUser = cb.id
|
||||||
|
<where>
|
||||||
|
<if test="code != '' and code != null">
|
||||||
|
AND code LIKE concat('%', #{code}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="sickerIdFk != null">
|
||||||
|
AND code = #{sickerIdFk}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -1,35 +1,51 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.glxp.api.dao.basic.BasicSkSickerMapper">
|
<mapper namespace="com.glxp.api.dao.basic.BasicSkSickerMapper">
|
||||||
<resultMap id="BaseResultMap" type="com.glxp.api.entity.basic.BasicSkSickerEntity">
|
<resultMap id="BaseResultMap" type="com.glxp.api.entity.basic.BasicSkSickerEntity">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
<!--@Table basic_sk_sicker-->
|
<!--@Table basic_sk_sicker-->
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
<result column="code" jdbcType="VARCHAR" property="code"/>
|
||||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
<result column="name" jdbcType="VARCHAR" property="name"/>
|
||||||
<result column="adNum" jdbcType="VARCHAR" property="adNum" />
|
<result column="adNum" jdbcType="VARCHAR" property="adNum"/>
|
||||||
<result column="idNum" jdbcType="VARCHAR" property="idNum" />
|
<result column="idNum" jdbcType="VARCHAR" property="idNum"/>
|
||||||
<result column="phone" jdbcType="VARCHAR" property="phone" />
|
<result column="phone" jdbcType="VARCHAR" property="phone"/>
|
||||||
<result column="gender" jdbcType="VARCHAR" property="gender" />
|
<result column="gender" jdbcType="VARCHAR" property="gender"/>
|
||||||
<result column="job" jdbcType="VARCHAR" property="job" />
|
<result column="job" jdbcType="VARCHAR" property="job"/>
|
||||||
<result column="bornDate" jdbcType="VARCHAR" property="bornDate" />
|
<result column="bornDate" jdbcType="VARCHAR" property="bornDate"/>
|
||||||
<result column="nationality" jdbcType="VARCHAR" property="nationality" />
|
<result column="nationality" jdbcType="VARCHAR" property="nationality"/>
|
||||||
<result column="education" jdbcType="VARCHAR" property="education" />
|
<result column="education" jdbcType="VARCHAR" property="education"/>
|
||||||
<result column="guardianName" jdbcType="VARCHAR" property="guardianName" />
|
<result column="guardianName" jdbcType="VARCHAR" property="guardianName"/>
|
||||||
<result column="guardianRel" jdbcType="VARCHAR" property="guardianRel" />
|
<result column="guardianRel" jdbcType="VARCHAR" property="guardianRel"/>
|
||||||
<result column="curAddr" jdbcType="VARCHAR" property="curAddr" />
|
<result column="curAddr" jdbcType="VARCHAR" property="curAddr"/>
|
||||||
<result column="kosekiAddr" jdbcType="VARCHAR" property="kosekiAddr" />
|
<result column="kosekiAddr" jdbcType="VARCHAR" property="kosekiAddr"/>
|
||||||
<result column="medicalIns" jdbcType="VARCHAR" property="medicalIns" />
|
<result column="medicalIns" jdbcType="VARCHAR" property="medicalIns"/>
|
||||||
<result column="createUser" jdbcType="VARCHAR" property="createUser" />
|
<result column="createUser" jdbcType="VARCHAR" property="createUser"/>
|
||||||
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="createTime" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
<result column="updateUser" jdbcType="VARCHAR" property="updateUser" />
|
<result column="updateUser" jdbcType="VARCHAR" property="updateUser"/>
|
||||||
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
|
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
<result column="remark" jdbcType="VARCHAR" property="remark"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
id, code, `name`, adNum, idNum, phone, gender, job, bornDate, nationality, education,
|
id, code, `name`, adNum, idNum, phone, gender, job, bornDate, nationality, education,
|
||||||
guardianName, guardianRel, curAddr, kosekiAddr, medicalIns, `createUser`, createTime,
|
guardianName, guardianRel, curAddr, kosekiAddr, medicalIns, `createUser`, createTime,
|
||||||
updateUser, updateTime, remark
|
updateUser, updateTime, remark
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="filterList" parameterType="com.glxp.api.req.basic.BasicSkSickerRequest"
|
||||||
|
resultType="com.glxp.api.res.basic.BasicSkSickerResponse">
|
||||||
|
SELECT *, cb.userName as createByName
|
||||||
|
FROM basic_sk_sicker
|
||||||
|
LEFT JOIN auth_user cb ON basic_sk_sicker.createUser = cb.id
|
||||||
|
<where>
|
||||||
|
<if test="name != '' and name != null">
|
||||||
|
AND name LIKE concat('%', #{name}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="code != '' and code != null">
|
||||||
|
AND code LIKE concat('%', #{code}, '%')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
Loading…
Reference in New Issue