输血申请单保存业务,审核业务
This commit is contained in:
parent
fa0fc0d361
commit
67c19dd9a2
@ -13,39 +13,39 @@ import java.util.Collection;
|
|||||||
public class OptionCache {
|
public class OptionCache {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置字典缓存
|
* 设置参数缓存
|
||||||
*
|
*
|
||||||
* @param key 参数键
|
* @param key 参数键
|
||||||
* @param xkParameter 参数值
|
* @param xkParameter 参数值
|
||||||
*/
|
*/
|
||||||
public static void setDictCache(String key, XkParameter xkParameter) {
|
public static void setOptCache(String key, XkParameter xkParameter) {
|
||||||
removeDictCache( key);
|
removeOptCache( key);
|
||||||
SpringUtils.getBean(RedisCache.class).setCacheObject(getCacheKey(key), xkParameter);
|
SpringUtils.getBean(RedisCache.class).setCacheObject(getCacheKey(key), xkParameter);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取字典缓存
|
* 获取参数缓存
|
||||||
*
|
*
|
||||||
* @param key 参数键
|
* @param key 参数键
|
||||||
* @return dictDatas 字典数据列表
|
* @return 参数值
|
||||||
*/
|
*/
|
||||||
public static XkParameter getOptCache(String key) {
|
public static XkParameter getOptCache(String key) {
|
||||||
return SpringUtils.getBean(RedisCache.class).getCacheObject(getCacheKey(key));
|
return SpringUtils.getBean(RedisCache.class).getCacheObject(getCacheKey(key));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除指定字典缓存
|
* 删除指定参数缓存
|
||||||
*
|
*
|
||||||
* @param key 字典键
|
* @param key 参数键
|
||||||
*/
|
*/
|
||||||
public static void removeDictCache(String key) {
|
public static void removeOptCache(String key) {
|
||||||
SpringUtils.getBean(RedisCache.class).deleteObject(getCacheKey(key));
|
SpringUtils.getBean(RedisCache.class).deleteObject(getCacheKey(key));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 清空字典缓存
|
* 清空参数缓存
|
||||||
*/
|
*/
|
||||||
public static void clearDictCache() {
|
public static void clearOptCache() {
|
||||||
Collection<String> keys = SpringUtils.getBean(RedisCache.class).keys(CacheConstants.XK_PARAMETER_KEY + "*");
|
Collection<String> keys = SpringUtils.getBean(RedisCache.class).keys(CacheConstants.XK_PARAMETER_KEY + "*");
|
||||||
SpringUtils.getBean(RedisCache.class).deleteObject(keys);
|
SpringUtils.getBean(RedisCache.class).deleteObject(keys);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,4 +24,8 @@ public class BloodInterfaceTypeConstants {
|
|||||||
* 使用his接口验证密码
|
* 使用his接口验证密码
|
||||||
*/
|
*/
|
||||||
public static final String HIS_USE_PASSWORD = "HIS_USE_PASSWORD";
|
public static final String HIS_USE_PASSWORD = "HIS_USE_PASSWORD";
|
||||||
|
/**
|
||||||
|
* 获取lis血型结果
|
||||||
|
*/
|
||||||
|
public static final String GET_TEST_RESULT_BLOOD_TYPE = "GET_TEST_RESULT_BLOOD_TYPE";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,11 +2,13 @@ package com.czblood.bus.controller;
|
|||||||
|
|
||||||
import com.czblood.bus.mapper.XkProTransfuseProjectMapper;
|
import com.czblood.bus.mapper.XkProTransfuseProjectMapper;
|
||||||
import com.czblood.bus.mapper.XkXtwhIllDiagnoseMapper;
|
import com.czblood.bus.mapper.XkXtwhIllDiagnoseMapper;
|
||||||
|
import com.czblood.bus.mapper.xtwh.XkXtwhOperationMapper;
|
||||||
import com.czblood.bus.pojo.*;
|
import com.czblood.bus.pojo.*;
|
||||||
import com.czblood.bus.pojo.inter.HisUsePasswordRequest;
|
import com.czblood.bus.pojo.inter.HisUsePasswordRequest;
|
||||||
import com.czblood.bus.pojo.xtwh.XkBloodBreed;
|
import com.czblood.bus.pojo.xtwh.XkBloodBreed;
|
||||||
import com.czblood.bus.pojo.xtwh.XkDmzd;
|
import com.czblood.bus.pojo.xtwh.XkDmzd;
|
||||||
import com.czblood.bus.pojo.xtwh.XkXtwhIllDiagnose;
|
import com.czblood.bus.pojo.xtwh.XkXtwhIllDiagnose;
|
||||||
|
import com.czblood.bus.pojo.xtwh.XkXtwhOperation;
|
||||||
import com.czblood.bus.utils.BloodBankUtil;
|
import com.czblood.bus.utils.BloodBankUtil;
|
||||||
import com.czblood.bus.utils.BloodInterfaceUtil;
|
import com.czblood.bus.utils.BloodInterfaceUtil;
|
||||||
import com.czblood.common.core.controller.BaseController;
|
import com.czblood.common.core.controller.BaseController;
|
||||||
@ -14,6 +16,7 @@ import com.czblood.common.core.domain.Result;
|
|||||||
import com.czblood.common.core.domain.entity.SysUser;
|
import com.czblood.common.core.domain.entity.SysUser;
|
||||||
import com.czblood.common.core.page.TableDataInfo;
|
import com.czblood.common.core.page.TableDataInfo;
|
||||||
import com.czblood.common.utils.SecurityUtils;
|
import com.czblood.common.utils.SecurityUtils;
|
||||||
|
import com.czblood.system.mapper.SysUserMapper;
|
||||||
import com.czblood.system.util.CommonUtil;
|
import com.czblood.system.util.CommonUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@ -35,6 +38,10 @@ public class BloodCommonController extends BaseController {
|
|||||||
CommonUtil commonUtil;
|
CommonUtil commonUtil;
|
||||||
@Resource
|
@Resource
|
||||||
XkXtwhIllDiagnoseMapper xkXtwhIllDiagnoseMapper;
|
XkXtwhIllDiagnoseMapper xkXtwhIllDiagnoseMapper;
|
||||||
|
@Resource
|
||||||
|
XkXtwhOperationMapper xkXtwhOperationMapper;
|
||||||
|
@Resource
|
||||||
|
SysUserMapper sysUserMapper;
|
||||||
|
|
||||||
@ApiOperation("获取输血前检验项目")
|
@ApiOperation("获取输血前检验项目")
|
||||||
@PostMapping("/queryLisProject")
|
@PostMapping("/queryLisProject")
|
||||||
@ -109,6 +116,22 @@ public class BloodCommonController extends BaseController {
|
|||||||
return new Result("0","校验成功!");
|
return new Result("0","校验成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("查询手术字典")
|
||||||
|
@GetMapping("/queryOperation")
|
||||||
|
public TableDataInfo queryOperation(XkXtwhOperation xkXtwhOperation){
|
||||||
|
startPage();
|
||||||
|
List<XkXtwhOperation> xkXtwhOperationList = xkXtwhOperationMapper.queryList(xkXtwhOperation);
|
||||||
|
return getDataTable(xkXtwhOperationList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("获取员工数据")
|
||||||
|
@GetMapping("/queryUserInfo")
|
||||||
|
public TableDataInfo queryUserInfo(SysUser sysUser){
|
||||||
|
List<SysUser> sysUserList = sysUserMapper.selectUserList(sysUser);
|
||||||
|
return getDataTable(sysUserList);
|
||||||
|
}
|
||||||
|
|
||||||
// @ApiOperation("测试接口")
|
// @ApiOperation("测试接口")
|
||||||
// @GetMapping("/test01")
|
// @GetMapping("/test01")
|
||||||
// public Result test01(String billNo){
|
// public Result test01(String billNo){
|
||||||
|
|||||||
@ -0,0 +1,9 @@
|
|||||||
|
package com.czblood.bus.mapper.xtwh;
|
||||||
|
|
||||||
|
import com.czblood.bus.pojo.xtwh.XkXtwhOperation;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface XkXtwhOperationMapper {
|
||||||
|
List<XkXtwhOperation> queryList(XkXtwhOperation xkXtwhOperation);
|
||||||
|
}
|
||||||
@ -148,4 +148,6 @@ public class XkTransfuseApply {
|
|||||||
private String operation_level;
|
private String operation_level;
|
||||||
@ApiModelProperty("身份证号")
|
@ApiModelProperty("身份证号")
|
||||||
private String card_no;
|
private String card_no;
|
||||||
|
@ApiModelProperty("是否需要做血型复核(A,B需要,C申请单无交叉配血需求时不做血型复查)")
|
||||||
|
private String need_check;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,20 @@
|
|||||||
|
package com.czblood.bus.pojo.inter;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.czblood.bus.constants.BloodInterfaceTypeConstants;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class GetTestResultBloodTypeRequest implements BloodInterfaceType {
|
||||||
|
private final String method = BloodInterfaceTypeConstants.GET_TEST_RESULT;
|
||||||
|
private String beinhos_id;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String serializationJson() {
|
||||||
|
return JSONUtil.toJsonStr( this);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
package com.czblood.bus.pojo.xtwh;
|
||||||
|
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Api(tags = "手术字典")
|
||||||
|
public class XkXtwhOperation {
|
||||||
|
private String icd_code;
|
||||||
|
private String oper_name;
|
||||||
|
private String oper_level;
|
||||||
|
private String zjf;
|
||||||
|
}
|
||||||
@ -133,6 +133,12 @@ public class BloodExtInterfaceService implements ExtSystemInterface {
|
|||||||
sysDept.setStatus(useSign);
|
sysDept.setStatus(useSign);
|
||||||
sysDept.setCreateBy("admin");
|
sysDept.setCreateBy("admin");
|
||||||
sysDept.setCreateTime(bloodBankUtil.getCurrentTimeDate());
|
sysDept.setCreateTime(bloodBankUtil.getCurrentTimeDate());
|
||||||
|
//科室类别,001 临床科室 002 输血科室
|
||||||
|
if(xkDmzd.getWordbook_name().contains("输血科")){
|
||||||
|
sysDept.setDeptType("002");
|
||||||
|
}else{
|
||||||
|
sysDept.setDeptType("001");
|
||||||
|
}
|
||||||
sysDeptMapper.insertDept(sysDept);
|
sysDeptMapper.insertDept(sysDept);
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -109,6 +109,7 @@ public class BloodBankUtil {
|
|||||||
if(parameterCache == null){
|
if(parameterCache == null){
|
||||||
XkParameter xkParameter = xkParameterMapper.queryOne(parameterCode);
|
XkParameter xkParameter = xkParameterMapper.queryOne(parameterCode);
|
||||||
if(xkParameter == null) return "";
|
if(xkParameter == null) return "";
|
||||||
|
OptionCache.setOptCache(parameterCode, xkParameter);
|
||||||
return BloodBankUtil.isBank(xkParameter.getParameter_value());
|
return BloodBankUtil.isBank(xkParameter.getParameter_value());
|
||||||
}else{
|
}else{
|
||||||
return BloodBankUtil.isBank(parameterCache.getParameter_value());
|
return BloodBankUtil.isBank(parameterCache.getParameter_value());
|
||||||
|
|||||||
@ -0,0 +1,12 @@
|
|||||||
|
<?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.czblood.bus.mapper.xtwh.XkXtwhOperationMapper">
|
||||||
|
<select id="queryList" resultType="com.czblood.bus.pojo.xtwh.XkXtwhOperation">
|
||||||
|
select * from xk_xtwh_operation
|
||||||
|
<where>
|
||||||
|
<if test="icd_code != null and icd_code != ''">and icd_code = #{icd_code}</if>
|
||||||
|
<if test="oper_name != null and oper_name != ''">and oper_name like '%'+ #{oper_name} +'%' </if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@ -7,6 +7,7 @@ import com.czblood.bus.pojo.xtwh.XkXtwhIllDiagnose;
|
|||||||
import com.czblood.busDoctor.pojo.DTO.TransfuseApplyDTO;
|
import com.czblood.busDoctor.pojo.DTO.TransfuseApplyDTO;
|
||||||
import com.czblood.busDoctor.pojo.VO.ApplyCheckVO;
|
import com.czblood.busDoctor.pojo.VO.ApplyCheckVO;
|
||||||
import com.czblood.busDoctor.pojo.VO.CheckMedicVO;
|
import com.czblood.busDoctor.pojo.VO.CheckMedicVO;
|
||||||
|
import com.czblood.busDoctor.pojo.VO.ExplainVO;
|
||||||
import com.czblood.busDoctor.pojo.VO.TransfuseApplyVO;
|
import com.czblood.busDoctor.pojo.VO.TransfuseApplyVO;
|
||||||
import com.czblood.busDoctor.service.TransfuseApplyService;
|
import com.czblood.busDoctor.service.TransfuseApplyService;
|
||||||
import com.czblood.common.annotation.Log;
|
import com.czblood.common.annotation.Log;
|
||||||
@ -118,10 +119,17 @@ public class TransfuseApplyController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Log(title = BloodSysLogConstants.LOG_TYPE_TRANSFUSE_APPLY, businessType = BusinessType.CHECK)
|
@Log(title = BloodSysLogConstants.LOG_TYPE_TRANSFUSE_APPLY, businessType = BusinessType.CHECK)
|
||||||
@ApiOperation("申请单审核")
|
@ApiOperation("申请单审核前校验")
|
||||||
@PostMapping("/applyCheck")
|
@PostMapping("/applyCheck")
|
||||||
public Result applyCheck(ApplyCheckVO applyCheckVO){
|
public Result applyPreCheck(ApplyCheckVO applyCheckVO){
|
||||||
return transfuseApplyService.applyCheck(applyCheckVO);
|
applyCheckVO.setUserId(getUsername());
|
||||||
|
return transfuseApplyService.applyPreCheck(applyCheckVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("申请单审核结果填写")
|
||||||
|
@PostMapping("/checkExplain")
|
||||||
|
public Result checkExplain(ExplainVO explainVO){
|
||||||
|
return transfuseApplyService.checkExplain(explainVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,38 @@
|
|||||||
|
package com.czblood.busDoctor.controller;
|
||||||
|
|
||||||
|
import com.czblood.busDoctor.pojo.VO.ExplainVO;
|
||||||
|
import com.czblood.busDoctor.service.TransfuseCheckExplainService;
|
||||||
|
import com.czblood.common.core.domain.Result;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
|
||||||
|
@Api(tags = "审核意见")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/bus/doctor/checkExplain")
|
||||||
|
@Slf4j
|
||||||
|
public class TransfuseCheckExplainController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
TransfuseCheckExplainService transfuseCheckExplainService;
|
||||||
|
|
||||||
|
@ApiOperation("获取输血指征数据")
|
||||||
|
@GetMapping("/queryCausailsList")
|
||||||
|
public Result queryCausailsList(String billNo){
|
||||||
|
return transfuseCheckExplainService.queryCausailsList(billNo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("审核意见")
|
||||||
|
@PostMapping("/checkExplain")
|
||||||
|
public Result checkExplain(ExplainVO explainVO){
|
||||||
|
return transfuseCheckExplainService.checkExplain(explainVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
package com.czblood.busDoctor.mapper;
|
package com.czblood.busDoctor.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.czblood.bus.pojo.XkCheckBloodtype;
|
||||||
import com.czblood.busDoctor.pojo.DTO.TransfuseApplyInfoOne;
|
import com.czblood.busDoctor.pojo.DTO.TransfuseApplyInfoOne;
|
||||||
import com.czblood.busDoctor.pojo.VO.TransfuseApplyVO;
|
import com.czblood.busDoctor.pojo.VO.TransfuseApplyVO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
@ -18,4 +19,6 @@ public interface TransfuseApplyMapper {
|
|||||||
String checkSameBloodType(@Param("beinhos_id") String beinhos_id,@Param("blood_breed") String blood_breed);
|
String checkSameBloodType(@Param("beinhos_id") String beinhos_id,@Param("blood_breed") String blood_breed);
|
||||||
List<Map<String,Object>> checkSelfBlood(@Param("beinhos_id") String beinhos_id);
|
List<Map<String,Object>> checkSelfBlood(@Param("beinhos_id") String beinhos_id);
|
||||||
BigDecimal queryApplyTransTotalNum(@Param("beinhos_id") String beinhos_id,@Param("stime") Date stime, @Param("etime") Date etime,@Param("bloodKindList") List<String> bloodKindList,@Param("billNo") String billNo);
|
BigDecimal queryApplyTransTotalNum(@Param("beinhos_id") String beinhos_id,@Param("stime") Date stime, @Param("etime") Date etime,@Param("bloodKindList") List<String> bloodKindList,@Param("billNo") String billNo);
|
||||||
|
long queryBillStatusCount(String beinhos_id);
|
||||||
|
XkCheckBloodtype queryCheckDate(String beinhos_id);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,7 @@
|
|||||||
|
package com.czblood.busDoctor.mapper;
|
||||||
|
|
||||||
|
import com.czblood.bus.pojo.XkCheckBloodtype;
|
||||||
|
|
||||||
|
public interface TransfuseCheckExplainMapper {
|
||||||
|
XkCheckBloodtype queryCheckDate(String beinhos_id);
|
||||||
|
}
|
||||||
@ -1,12 +1,23 @@
|
|||||||
package com.czblood.busDoctor.pojo.VO;
|
package com.czblood.busDoctor.pojo.VO;
|
||||||
|
|
||||||
|
import com.czblood.busDoctor.pojo.DTO.TransfuseApplyInfoOne;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class ApplyCheckVO {
|
public class ApplyCheckVO {
|
||||||
|
@NotBlank(message = "单据号不能为空!")
|
||||||
private String billNo;
|
private String billNo;
|
||||||
|
private String userId;
|
||||||
|
@NotBlank(message = "上级医生不能为空!")
|
||||||
|
private String checkMedic;
|
||||||
|
@NotBlank(message = "审核时间不能为空!")
|
||||||
|
private Date checkDate;
|
||||||
|
private TransfuseApplyInfoOne transfuseApplyInfoOne;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,26 @@
|
|||||||
|
package com.czblood.busDoctor.pojo.VO;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ExplainVO {
|
||||||
|
@ApiModelProperty("上次血型复核结果")
|
||||||
|
private String checkResult;
|
||||||
|
@ApiModelProperty("审核意见")
|
||||||
|
private String checkExplain;
|
||||||
|
@ApiModelProperty("是否需要血型复核")
|
||||||
|
private String needCheck;
|
||||||
|
@ApiModelProperty("申请单号")
|
||||||
|
private String applyNo;
|
||||||
|
@ApiModelProperty("输血是否合理")
|
||||||
|
private String validFlag;
|
||||||
|
@ApiModelProperty("上次血型复核时间")
|
||||||
|
private String checkDateText;
|
||||||
|
@ApiModelProperty("申请单类别")
|
||||||
|
private String billSort;
|
||||||
|
}
|
||||||
@ -4,6 +4,7 @@ import com.czblood.bus.pojo.XkTransfuseApply;
|
|||||||
import com.czblood.busDoctor.pojo.DTO.TransfuseApplyDTO;
|
import com.czblood.busDoctor.pojo.DTO.TransfuseApplyDTO;
|
||||||
import com.czblood.busDoctor.pojo.VO.ApplyCheckVO;
|
import com.czblood.busDoctor.pojo.VO.ApplyCheckVO;
|
||||||
import com.czblood.busDoctor.pojo.VO.CheckMedicVO;
|
import com.czblood.busDoctor.pojo.VO.CheckMedicVO;
|
||||||
|
import com.czblood.busDoctor.pojo.VO.ExplainVO;
|
||||||
import com.czblood.busDoctor.pojo.VO.TransfuseApplyVO;
|
import com.czblood.busDoctor.pojo.VO.TransfuseApplyVO;
|
||||||
import com.czblood.common.core.domain.Result;
|
import com.czblood.common.core.domain.Result;
|
||||||
|
|
||||||
@ -26,5 +27,7 @@ public interface TransfuseApplyService {
|
|||||||
|
|
||||||
Result applyMedicCheck(CheckMedicVO checkMedicVO);
|
Result applyMedicCheck(CheckMedicVO checkMedicVO);
|
||||||
|
|
||||||
Result applyCheck(ApplyCheckVO applyCheckVO);
|
Result applyPreCheck(ApplyCheckVO applyCheckVO);
|
||||||
|
|
||||||
|
Result checkExplain(ExplainVO explainVO);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,10 @@
|
|||||||
|
package com.czblood.busDoctor.service;
|
||||||
|
|
||||||
|
import com.czblood.busDoctor.pojo.VO.ExplainVO;
|
||||||
|
import com.czblood.common.core.domain.Result;
|
||||||
|
|
||||||
|
public interface TransfuseCheckExplainService {
|
||||||
|
Result queryCausailsList(String billNo);
|
||||||
|
|
||||||
|
Result checkExplain(ExplainVO explainVO);
|
||||||
|
}
|
||||||
@ -1,14 +1,18 @@
|
|||||||
package com.czblood.busDoctor.service.impl;
|
package com.czblood.busDoctor.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.czblood.bus.mapper.*;
|
import com.czblood.bus.mapper.*;
|
||||||
import com.czblood.bus.pojo.*;
|
import com.czblood.bus.pojo.*;
|
||||||
|
import com.czblood.bus.pojo.inter.GetTestResultBloodTypeRequest;
|
||||||
import com.czblood.bus.pojo.xtwh.XkDmzd;
|
import com.czblood.bus.pojo.xtwh.XkDmzd;
|
||||||
import com.czblood.bus.utils.BloodBankUtil;
|
import com.czblood.bus.utils.BloodBankUtil;
|
||||||
|
import com.czblood.bus.utils.BloodInterfaceUtil;
|
||||||
import com.czblood.busDoctor.mapper.TransfuseApplyMapper;
|
import com.czblood.busDoctor.mapper.TransfuseApplyMapper;
|
||||||
import com.czblood.busDoctor.pojo.DTO.TransfuseApplyDTO;
|
import com.czblood.busDoctor.pojo.DTO.TransfuseApplyDTO;
|
||||||
import com.czblood.busDoctor.pojo.DTO.TransfuseApplyInfoOne;
|
import com.czblood.busDoctor.pojo.DTO.TransfuseApplyInfoOne;
|
||||||
import com.czblood.busDoctor.pojo.VO.ApplyCheckVO;
|
import com.czblood.busDoctor.pojo.VO.ApplyCheckVO;
|
||||||
import com.czblood.busDoctor.pojo.VO.CheckMedicVO;
|
import com.czblood.busDoctor.pojo.VO.CheckMedicVO;
|
||||||
|
import com.czblood.busDoctor.pojo.VO.ExplainVO;
|
||||||
import com.czblood.busDoctor.pojo.VO.TransfuseApplyVO;
|
import com.czblood.busDoctor.pojo.VO.TransfuseApplyVO;
|
||||||
import com.czblood.busDoctor.service.TransfuseApplyService;
|
import com.czblood.busDoctor.service.TransfuseApplyService;
|
||||||
import com.czblood.busDoctor.utils.TransfuseApplyUtil;
|
import com.czblood.busDoctor.utils.TransfuseApplyUtil;
|
||||||
@ -19,6 +23,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -86,8 +91,8 @@ public class TransfuseApplyServiceImpl implements TransfuseApplyService {
|
|||||||
private Result getTransfuseApplyInfo(XkTransfuseApplyBefore xkTransfuseApplyBefore,XkPatientInfo xkPatientInfo,String userId) {
|
private Result getTransfuseApplyInfo(XkTransfuseApplyBefore xkTransfuseApplyBefore,XkPatientInfo xkPatientInfo,String userId) {
|
||||||
String beinhosId = xkTransfuseApplyBefore.getBeinhos_id();
|
String beinhosId = xkTransfuseApplyBefore.getBeinhos_id();
|
||||||
TransfuseApplyInfoOne transfuseApplyInfoOne = new TransfuseApplyInfoOne();
|
TransfuseApplyInfoOne transfuseApplyInfoOne = new TransfuseApplyInfoOne();
|
||||||
XkTransfuseApply xkTransfuseApply = transfuseApplyInfoOne.getXkTransfuseApply();
|
XkTransfuseApply xkTransfuseApply = new XkTransfuseApply();
|
||||||
XkPatientInfo xkPatientInfoSet = transfuseApplyInfoOne.getXkPatientInfo();
|
XkPatientInfo xkPatientInfoSet = new XkPatientInfo();
|
||||||
xkTransfuseApply.setBeinhos_id(beinhosId);
|
xkTransfuseApply.setBeinhos_id(beinhosId);
|
||||||
xkTransfuseApply.setHos_id(xkTransfuseApplyBefore.getHos_id());
|
xkTransfuseApply.setHos_id(xkTransfuseApplyBefore.getHos_id());
|
||||||
xkTransfuseApply.setBeinhos_number(xkPatientInfo.getBeinhos_number());
|
xkTransfuseApply.setBeinhos_number(xkPatientInfo.getBeinhos_number());
|
||||||
@ -124,6 +129,8 @@ public class TransfuseApplyServiceImpl implements TransfuseApplyService {
|
|||||||
xkPatientInfoSet.setPatient_sex(xkPatientInfo.getPatient_sex());
|
xkPatientInfoSet.setPatient_sex(xkPatientInfo.getPatient_sex());
|
||||||
xkPatientInfoSet.setAge(xkPatientInfo.getAge());
|
xkPatientInfoSet.setAge(xkPatientInfo.getAge());
|
||||||
xkPatientInfoSet.setApanage(xkPatientInfo.getApanage());
|
xkPatientInfoSet.setApanage(xkPatientInfo.getApanage());
|
||||||
|
transfuseApplyInfoOne.setXkTransfuseApply(xkTransfuseApply);
|
||||||
|
transfuseApplyInfoOne.setXkPatientInfo(xkPatientInfoSet);
|
||||||
return new Result("0","操作成功",transfuseApplyInfoOne);
|
return new Result("0","操作成功",transfuseApplyInfoOne);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -385,14 +392,17 @@ public class TransfuseApplyServiceImpl implements TransfuseApplyService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 输血申请单审核
|
* 输血申请单审核前校验
|
||||||
* @param applyCheckVO
|
* @param applyCheckVO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Result applyCheck(ApplyCheckVO applyCheckVO) {
|
public Result applyPreCheck(ApplyCheckVO applyCheckVO) {
|
||||||
String billNo = applyCheckVO.getBillNo();
|
String billNo = applyCheckVO.getBillNo();
|
||||||
|
String userId = applyCheckVO.getUserId();
|
||||||
XkTransfuseApply xkTransfuseApply = xkTransfuseApplyMapper.queryOne(billNo);
|
XkTransfuseApply xkTransfuseApply = xkTransfuseApplyMapper.queryOne(billNo);
|
||||||
|
XkTransfuseApplyApproval xkTransfuseApplyApproval = xkTransfuseApplyApprovalMapper.queryOneByBillNo(billNo);
|
||||||
|
List<XkTransfuseApplyBloodbreed> xkTransfuseApplyBloodbreedList = xkTransfuseApplyBloodbreedMapper.queryOne(billNo);
|
||||||
String billStasus = xkTransfuseApply.getBill_stasus();
|
String billStasus = xkTransfuseApply.getBill_stasus();
|
||||||
switch (billStasus){
|
switch (billStasus){
|
||||||
case "B":
|
case "B":
|
||||||
@ -407,6 +417,101 @@ public class TransfuseApplyServiceImpl implements TransfuseApplyService {
|
|||||||
return new Result("-1","该单据已发血,不允许重复审核!");
|
return new Result("-1","该单据已发血,不允许重复审核!");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
SysUser userInfo = bloodBankUtil.getUserInfo(userId);
|
||||||
|
String deptType = userInfo.getDept().getDeptType();
|
||||||
|
if(deptType.equals("001")){
|
||||||
|
//临床科室,代表上级医生审核
|
||||||
|
CheckMedicVO checkMedicVO = new CheckMedicVO();
|
||||||
|
checkMedicVO.setBillNo(billNo);
|
||||||
|
checkMedicVO.setCheckMedic(applyCheckVO.getCheckMedic());
|
||||||
|
checkMedicVO.setCheckDate(applyCheckVO.getCheckDate());
|
||||||
|
return applyMedicCheck(checkMedicVO);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 下面是输血科审核的逻辑
|
||||||
|
*/
|
||||||
|
String applyType = xkTransfuseApply.getApply_type();
|
||||||
|
XkDmzd sqlxDictOne = bloodBankUtil.getDictCacheOne("sqlx", applyType);
|
||||||
|
String exp2 = BloodBankUtil.isBank(sqlxDictOne.getExp2());
|
||||||
|
//是否使用用血审批控制
|
||||||
|
String sfsyyxsp = bloodBankUtil.getParameterValue("SFSYYXSP");
|
||||||
|
//不是抢救用血的类型,就需要判断是否是大量用血的标准,\
|
||||||
|
if(!exp2.equals("Y") && !sfsyyxsp.equals("Y")){
|
||||||
|
if(xkTransfuseApplyApproval != null){
|
||||||
|
String applyLevel = xkTransfuseApplyApproval.getApplyLevel();
|
||||||
|
String flag = BloodBankUtil.isBank(xkTransfuseApplyApproval.getFlag());
|
||||||
|
String archiater = xkTransfuseApplyApproval.getArchiater();
|
||||||
|
String medicalDept = BloodBankUtil.isBank(xkTransfuseApplyApproval.getMedical_Dept());
|
||||||
|
if(applyLevel.equals("2") && flag.equals("N")) return new Result("-1","申请单24小时用血量达到大量用血标准,用血申请还未进行科室主任核准,暂不能审核,请到(大量用血申请)菜单进行审核!");
|
||||||
|
|
||||||
|
if(applyLevel.equals("3") && flag.equals("N")){
|
||||||
|
if(archiater.equals("")){
|
||||||
|
return new Result("-1","申请单24小时用血量达到大量用血标准,用血申请还未进行科室主任及医务部核准,暂不能审核,请到(大量用血申请)菜单进行审核!");
|
||||||
|
}else if(medicalDept.equals("")){
|
||||||
|
return new Result("-1","申请单24小时用血量达到大量用血标准,用血申请还未进行医务部审批,暂不能审核,请到(大量用血申请)菜单进行审核!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String sqdshpdxx = bloodBankUtil.getParameterValue("SQDSHPDXX");
|
||||||
|
if(sqdshpdxx.equals("Y")){
|
||||||
|
//调用lis接口,获取血型结果
|
||||||
|
GetTestResultBloodTypeRequest getTestResultBloodTypeRequest = new GetTestResultBloodTypeRequest();
|
||||||
|
getTestResultBloodTypeRequest.setBeinhos_id(xkTransfuseApply.getBeinhos_id());
|
||||||
|
Result result = BloodInterfaceUtil.invokeBloodInterface(getTestResultBloodTypeRequest);
|
||||||
|
if(!result.getCode().equals("0")) return result;
|
||||||
|
}
|
||||||
|
String billSort = transfuseApplyUtil.checkBillSort(xkTransfuseApplyBloodbreedList, xkTransfuseApply.getBeinhos_id());
|
||||||
|
ExplainVO explainVO = new ExplainVO();
|
||||||
|
explainVO.setCheckResult(xkTransfuseApply.getCheck_explain());
|
||||||
|
explainVO.setCheckExplain(xkTransfuseApply.getRemark());
|
||||||
|
explainVO.setBillSort(billSort);
|
||||||
|
explainVO.setApplyNo(xkTransfuseApply.getBill_no());
|
||||||
|
explainVO.setValidFlag(xkTransfuseApply.getValid_Flag());
|
||||||
|
int i = transfuseApplyMapper.queryXkCheckBloodtypeCount(xkTransfuseApply.getBeinhos_id());
|
||||||
|
String msg = "";
|
||||||
|
String needCheck = "";
|
||||||
|
if(i > 0) msg ="该患者的历史血型复核为亚型,请注意!";
|
||||||
|
/**
|
||||||
|
* 是否需要做血型复核
|
||||||
|
*/
|
||||||
|
//申请单无交叉配血需求时不做血型复查,Y是,N否!
|
||||||
|
String sqxwpxbzxx = bloodBankUtil.getParameterValue("SQXWPXBZXX");
|
||||||
|
if(sqxwpxbzxx.equals("Y") && explainVO.getNeedCheck().equals("A")) explainVO.setNeedCheck("C");
|
||||||
|
//上次血型复核时间
|
||||||
|
XkCheckBloodtype xkCheckBloodtype = transfuseApplyMapper.queryCheckDate(xkTransfuseApply.getBeinhos_id());
|
||||||
|
//上次复核三天前的时间
|
||||||
|
Date threeDayBefore = null;
|
||||||
|
if(xkCheckBloodtype != null){
|
||||||
|
Date testDate = xkCheckBloodtype.getTest_date();
|
||||||
|
threeDayBefore = DateUtil.offsetDay(xkCheckBloodtype.getTest_date(), 3);
|
||||||
|
if(testDate != null) explainVO.setCheckDateText("血型复核时间:"+ DateUtil.format(testDate,"yyyy-MM-dd HH:mm:ss"));
|
||||||
|
}
|
||||||
|
if(explainVO.getNeedCheck().equals("A") || explainVO.getNeedCheck().equals("B")){
|
||||||
|
needCheck = "Y"; //需要做血型复核
|
||||||
|
}else{
|
||||||
|
needCheck = "N"; //不需要做血型复核
|
||||||
|
}
|
||||||
|
if(explainVO.getNeedCheck().equals("B")){
|
||||||
|
if(xkCheckBloodtype == null){ //没有做过血型鉴定的,必须要做
|
||||||
|
needCheck = "Y";
|
||||||
|
}else if(DateUtil.compare(bloodBankUtil.getCurrentTimeDate(),threeDayBefore) > 0){ //之前做的血型鉴定的结果,超过了三天,也需要重新再做
|
||||||
|
needCheck = "Y";
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
needCheck = "N";
|
||||||
|
}
|
||||||
|
explainVO.setNeedCheck(needCheck);
|
||||||
|
|
||||||
|
if(!msg.equals("")){
|
||||||
|
return new Result("1",msg,explainVO);
|
||||||
|
}else{
|
||||||
|
return new Result("0","校验成功!",explainVO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result checkExplain(ExplainVO explainVO) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,62 @@
|
|||||||
|
package com.czblood.busDoctor.service.impl;
|
||||||
|
|
||||||
|
import com.czblood.bus.mapper.XkTransfuseApplyCausalisMapper;
|
||||||
|
import com.czblood.bus.pojo.XkTransfuseApplyCausalis;
|
||||||
|
import com.czblood.bus.utils.BloodBankUtil;
|
||||||
|
import com.czblood.busDoctor.pojo.VO.ExplainVO;
|
||||||
|
import com.czblood.busDoctor.service.TransfuseCheckExplainService;
|
||||||
|
import com.czblood.common.core.domain.Result;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class TransfuseCheckExplainServiceImpl implements TransfuseCheckExplainService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
XkTransfuseApplyCausalisMapper xkTransfuseApplyCausalisMapper;
|
||||||
|
@Resource
|
||||||
|
BloodBankUtil bloodBankUtil;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result queryCausailsList(String billNo) {
|
||||||
|
List<XkTransfuseApplyCausalis> xkTransfuseApplyCausalisList = xkTransfuseApplyCausalisMapper.queryListByBillNo(billNo);
|
||||||
|
return new Result("0","查询成功",xkTransfuseApplyCausalisList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result checkExplain(ExplainVO explainVO) {
|
||||||
|
String billSort = explainVO.getBillSort();
|
||||||
|
String billSortTemp = "";
|
||||||
|
String needCheck = explainVO.getNeedCheck();
|
||||||
|
if(billSort.equals("A") || billSort.equals("C")){
|
||||||
|
if(needCheck.equals("Y")){
|
||||||
|
billSortTemp = "A";
|
||||||
|
}else{
|
||||||
|
billSortTemp = "C";
|
||||||
|
}
|
||||||
|
}else if(billSort.equals("B")){
|
||||||
|
if(needCheck.equals("Y")){
|
||||||
|
billSortTemp = "B";
|
||||||
|
}else{
|
||||||
|
billSortTemp = "D";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String tmsfzsxshsc = bloodBankUtil.getParameterValue("TMSFZSXSHSC");
|
||||||
|
String ixxfh = "";
|
||||||
|
if (tmsfzsxshsc.equals("Y")) {
|
||||||
|
if(needCheck.equals("Y")){
|
||||||
|
ixxfh = "1";
|
||||||
|
}else{
|
||||||
|
ixxfh = "0";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -304,4 +304,28 @@ public class TransfuseApplyUtil {
|
|||||||
xkTransfuseApplyApprovalMapper.insert(xkTransfuseApplyApproval);
|
xkTransfuseApplyApprovalMapper.insert(xkTransfuseApplyApproval);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String checkBillSort(List<XkTransfuseApplyBloodbreed> xkTransfuseApplyBloodbreedList,String beinhos_id){
|
||||||
|
if(xkTransfuseApplyBloodbreedList.isEmpty()) return "";
|
||||||
|
//循环取血液品种中的bloodbreed,只要其中有一个需要进行配血,就算需要配血
|
||||||
|
boolean isMatch = false;
|
||||||
|
String sort = "";
|
||||||
|
for (XkTransfuseApplyBloodbreed xkTransfuseApplyBloodbreed : xkTransfuseApplyBloodbreedList) {
|
||||||
|
String bloodBreed = xkTransfuseApplyBloodbreed.getBlood_breed();
|
||||||
|
XkBloodBreed xkBloodBreed = xkBloodBreedMapper.queryOne(bloodBreed);
|
||||||
|
if(xkBloodBreed.getIs_match().equals("Y")) {
|
||||||
|
isMatch = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
long l = transfuseApplyMapper.queryBillStatusCount(beinhos_id);
|
||||||
|
if(isMatch){
|
||||||
|
sort = "B";
|
||||||
|
}else if(!isMatch && l > 0){
|
||||||
|
sort = "C";
|
||||||
|
}else if(!isMatch && l == 0){
|
||||||
|
sort = "A";
|
||||||
|
}
|
||||||
|
return sort;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -134,7 +134,7 @@
|
|||||||
select breed_code
|
select breed_code
|
||||||
from xk_blood_breed
|
from xk_blood_breed
|
||||||
where blood_kind ='0004' ) and
|
where blood_kind ='0004' ) and
|
||||||
t1.bill_no =t2.bill_no;
|
t1.bill_no =t2.bill_no and t1.hos_id = #{hos_id};
|
||||||
</select>
|
</select>
|
||||||
<select id="checkSelfBlood" resultType="java.util.Map">
|
<select id="checkSelfBlood" resultType="java.util.Map">
|
||||||
SELECT xk_blood_breed.breed_name,
|
SELECT xk_blood_breed.breed_name,
|
||||||
@ -151,7 +151,7 @@
|
|||||||
( xk_gather_main.apply_no = xk_transfuse_apply.bill_no ) and
|
( xk_gather_main.apply_no = xk_transfuse_apply.bill_no ) and
|
||||||
( ( xk_blood_info.blood_sort = 'Z' ) AND
|
( ( xk_blood_info.blood_sort = 'Z' ) AND
|
||||||
( xk_blood_info.blood_status = '1' ) AND
|
( xk_blood_info.blood_status = '1' ) AND
|
||||||
( xk_transfuse_apply.beinhos_id = #{beinhos_id} ) )
|
( xk_transfuse_apply.beinhos_id = #{beinhos_id} ) ) and xk_transfuse_apply.hos_id = #{hos_id}
|
||||||
group by xk_blood_breed.breed_name,xk_blood_info.unit
|
group by xk_blood_breed.breed_name,xk_blood_info.unit
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
@ -163,7 +163,7 @@
|
|||||||
k.blood_kind =b.blood_breed AND
|
k.blood_kind =b.blood_breed AND
|
||||||
t.blood_breed =k.breed_code AND
|
t.blood_breed =k.breed_code AND
|
||||||
<![CDATA[a.bill_stasus <> 'Z' and]]>
|
<![CDATA[a.bill_stasus <> 'Z' and]]>
|
||||||
a.apply_date Between #{stime} AND #{etime}
|
a.apply_date Between #{stime} AND #{etime} and a.hos_id = #{hos_id}
|
||||||
<if test="billNo != null and billNo != ''"><![CDATA[and a.bill_no <> #{billNo}]]></if>
|
<if test="billNo != null and billNo != ''"><![CDATA[and a.bill_no <> #{billNo}]]></if>
|
||||||
<if test="bloodKindList != null and bloodKindList.size() > 0">
|
<if test="bloodKindList != null and bloodKindList.size() > 0">
|
||||||
and k.blood_kind in
|
and k.blood_kind in
|
||||||
@ -172,4 +172,17 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="queryBillStatusCount" resultType="java.lang.Long">
|
||||||
|
SELECT Count ( *) FROM xk_transfuse_apply
|
||||||
|
Where xk_transfuse_apply.beinhos_id = #{beinhos_id} And
|
||||||
|
( xk_transfuse_apply.bill_stasus ='D' OR
|
||||||
|
xk_transfuse_apply.bill_stasus ='W' OR
|
||||||
|
xk_transfuse_apply.bill_stasus ='S' OR
|
||||||
|
xk_transfuse_apply.bill_stasus ='SF' ) and xk_transfuse_apply.hos_id = #{hos_id}
|
||||||
|
|
||||||
|
</select>
|
||||||
|
<select id="queryCheckDate" resultType="com.czblood.bus.pojo.XkCheckBloodtype">
|
||||||
|
SELECT * FROM xk_check_bloodtype
|
||||||
|
<![CDATA[ Where Beinhos_id = #{beinhos_id} and isnull(remark,'')<>'系统生成' Order By test_date Desc;]]>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
<?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.czblood.busDoctor.mapper.TransfuseCheckExplainMapper">
|
||||||
|
|
||||||
|
<select id="queryCheckDate" resultType="com.czblood.bus.pojo.XkCheckBloodtype">
|
||||||
|
SELECT * FROM xk_check_bloodtype
|
||||||
|
<![CDATA[ Where Beinhos_id = #{beinhos_id} and isnull(remark,'')<>'系统生成' Order By test_date Desc;]]>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@ -58,10 +58,19 @@ public class SysDept extends BaseEntity
|
|||||||
private String deptCodeOld;
|
private String deptCodeOld;
|
||||||
|
|
||||||
private String hos_id;
|
private String hos_id;
|
||||||
|
private String deptType;
|
||||||
|
|
||||||
/** 子部门 */
|
/** 子部门 */
|
||||||
private List<SysDept> children = new ArrayList<SysDept>();
|
private List<SysDept> children = new ArrayList<SysDept>();
|
||||||
|
|
||||||
|
public String getDeptType() {
|
||||||
|
return deptType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeptType(String deptType) {
|
||||||
|
this.deptType = deptType;
|
||||||
|
}
|
||||||
|
|
||||||
public String getDeptCodeOld() {
|
public String getDeptCodeOld() {
|
||||||
return deptCodeOld;
|
return deptCodeOld;
|
||||||
}
|
}
|
||||||
@ -232,6 +241,7 @@ public class SysDept extends BaseEntity
|
|||||||
.append("deptCode", getDeptCode())
|
.append("deptCode", getDeptCode())
|
||||||
.append("hos_id", getHos_id())
|
.append("hos_id", getHos_id())
|
||||||
.append("deptCodeOld", getDeptCodeOld())
|
.append("deptCodeOld", getDeptCodeOld())
|
||||||
|
.append("deptType", getDeptType())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,11 +21,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="deptType" column="dept_type" />
|
||||||
<result property="hos_id" column="hos_id" />
|
<result property="hos_id" column="hos_id" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectDeptVo">
|
<sql id="selectDeptVo">
|
||||||
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time ,d.dept_code,d.hos_id
|
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time ,d.dept_code,d.hos_id
|
||||||
|
,d.dept_type
|
||||||
from sys_dept d
|
from sys_dept d
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
@ -65,7 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
|
<select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
|
||||||
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,d.dept_code,d.hos_id,
|
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,d.dept_code,d.hos_id,
|
||||||
(select dept_name from sys_dept where dept_id = d.parent_id) parent_name
|
(select dept_name from sys_dept where dept_id = d.parent_id) parent_name,d.dept_type
|
||||||
from sys_dept d
|
from sys_dept d
|
||||||
where d.dept_id = #{deptId}
|
where d.dept_id = #{deptId}
|
||||||
</select>
|
</select>
|
||||||
@ -89,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<select id="checkDeptNameUnique" resultMap="SysDeptResult">
|
<select id="checkDeptNameUnique" resultMap="SysDeptResult">
|
||||||
select top 1 d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time,d.hos_id
|
select top 1 d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time,d.hos_id
|
||||||
|
,d.dept_type
|
||||||
from sys_dept d
|
from sys_dept d
|
||||||
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0'
|
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0'
|
||||||
</select>
|
</select>
|
||||||
@ -105,6 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="status != null">status,</if>
|
<if test="status != null">status,</if>
|
||||||
<if test="deptCode != null and deptCode != ''">dept_code,</if>
|
<if test="deptCode != null and deptCode != ''">dept_code,</if>
|
||||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
<if test="deptType != null and deptType != ''">dept_type,</if>
|
||||||
create_time,hos_id
|
create_time,hos_id
|
||||||
)values(
|
)values(
|
||||||
<if test="parentId != null and parentId != 0">#{parentId},</if>
|
<if test="parentId != null and parentId != 0">#{parentId},</if>
|
||||||
@ -117,6 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="status != null">#{status},</if>
|
<if test="status != null">#{status},</if>
|
||||||
<if test="deptCode != null and deptCode != ''">#{deptCode},</if>
|
<if test="deptCode != null and deptCode != ''">#{deptCode},</if>
|
||||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
<if test="deptType != null and deptType != ''">#{deptType},</if>
|
||||||
getdate(),#{hos_id}
|
getdate(),#{hos_id}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
@ -135,6 +140,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="status != null and status != ''">status = #{status},</if>
|
<if test="status != null and status != ''">status = #{status},</if>
|
||||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
<if test="hos_id != null and hos_id != ''">hos_id = #{hos_id},</if>
|
<if test="hos_id != null and hos_id != ''">hos_id = #{hos_id},</if>
|
||||||
|
<if test="deptType != null and deptType != ''">dept_type = #{deptType},</if>
|
||||||
update_time = getdate()
|
update_time = getdate()
|
||||||
</set>
|
</set>
|
||||||
where dept_id = #{deptId}
|
where dept_id = #{deptId}
|
||||||
|
|||||||
@ -488,3 +488,9 @@ IF NOT EXISTS (SELECT 1 FROM sys.key_constraints WHERE name = 'PK_xk_transfuse_a
|
|||||||
ALTER TABLE xk_transfuse_apply_causalis ADD CONSTRAINT PK_xk_transfuse_apply_causalis PRIMARY KEY CLUSTERED (bill_no,Causalis_Code);
|
ALTER TABLE xk_transfuse_apply_causalis ADD CONSTRAINT PK_xk_transfuse_apply_causalis PRIMARY KEY CLUSTERED (bill_no,Causalis_Code);
|
||||||
END
|
END
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'sys_dept' AND COLUMN_NAME = 'dept_type')
|
||||||
|
begin
|
||||||
|
alter table sys_dept add dept_type varchar(10)
|
||||||
|
end
|
||||||
|
go
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user