临床发血,打印模版界面
This commit is contained in:
parent
9d6c723c7b
commit
71abe9d30d
@ -2,8 +2,11 @@ package com.czblood.bus.mapper;
|
|||||||
|
|
||||||
import com.czblood.bus.pojo.XkMatchMain;
|
import com.czblood.bus.pojo.XkMatchMain;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface XkMatchMainMapper {
|
public interface XkMatchMainMapper {
|
||||||
void insertMatch(XkMatchMain xkMatchMain);
|
void insertMatch(XkMatchMain xkMatchMain);
|
||||||
XkMatchMain queryOne(String bill_no);
|
XkMatchMain queryOne(String bill_no);
|
||||||
void update(XkMatchMain xkMatchMain);
|
void update(XkMatchMain xkMatchMain);
|
||||||
|
List<XkMatchMain> queryList(XkMatchMain xkMatchMain);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,9 +3,12 @@ package com.czblood.bus.mapper;
|
|||||||
import com.czblood.bus.pojo.XkOutMain;
|
import com.czblood.bus.pojo.XkOutMain;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface XkOutMainMapper {
|
public interface XkOutMainMapper {
|
||||||
XkOutMain queryOne(@Param("billNo") String billNo);
|
XkOutMain queryOne(@Param("billNo") String billNo);
|
||||||
void insert(XkOutMain xkOutMain);
|
void insert(XkOutMain xkOutMain);
|
||||||
void update(XkOutMain xkOutMain);
|
void update(XkOutMain xkOutMain);
|
||||||
|
List<XkOutMain> queryList(XkOutMain xkOutMain);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,10 @@
|
|||||||
|
package com.czblood.bus.mapper.xtwh;
|
||||||
|
|
||||||
|
import com.czblood.bus.pojo.xtwh.XkReportTemplate;
|
||||||
|
|
||||||
|
public interface XkReportTemplateMapper {
|
||||||
|
void insert(XkReportTemplate xkReportTemplate);
|
||||||
|
void update(XkReportTemplate xkReportTemplate);
|
||||||
|
XkReportTemplate queryOne(String reportNo);
|
||||||
|
void deleteByReportNo(String reportNo);
|
||||||
|
}
|
||||||
@ -64,4 +64,6 @@ public class XkOutMain {
|
|||||||
private String all_recycle_sign;
|
private String all_recycle_sign;
|
||||||
private String receive_person;
|
private String receive_person;
|
||||||
private String receive_id;
|
private String receive_id;
|
||||||
|
@ApiModelProperty("多次发血标志")
|
||||||
|
private String more_sign;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,19 @@
|
|||||||
|
package com.czblood.bus.pojo.xtwh;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class XkReportTemplate {
|
||||||
|
private String report_id;
|
||||||
|
private String report_no;
|
||||||
|
private String report_name;
|
||||||
|
private String report_size;
|
||||||
|
private Date create_time;
|
||||||
|
private Date update_time;
|
||||||
|
}
|
||||||
@ -51,4 +51,17 @@
|
|||||||
<select id="queryOne" resultType="com.czblood.bus.pojo.XkMatchMain">
|
<select id="queryOne" resultType="com.czblood.bus.pojo.XkMatchMain">
|
||||||
select * from xk_match_main where bill_no = #{bill_no}
|
select * from xk_match_main where bill_no = #{bill_no}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="queryList" resultType="com.czblood.bus.pojo.XkMatchMain">
|
||||||
|
select * from xk_match_main
|
||||||
|
<where>
|
||||||
|
<if test="apply_no != null">and apply_no = #{apply_no}</if>
|
||||||
|
<if test="beinhos_id != null">and beinhos_id = #{beinhos_id}</if>
|
||||||
|
<if test="patient_name != null">and patient_name = #{patient_name}</if>
|
||||||
|
<if test="check_no != null">and check_no = #{check_no}</if>
|
||||||
|
<if test="dept_id != null">and dept_id = #{dept_id}</if>
|
||||||
|
<if test="sample_id != null">and sample_id = #{sample_id}</if>
|
||||||
|
<if test="bill_status != null">and bill_status = #{bill_status}</if>
|
||||||
|
<if test="match_sign != null">and match_sign = #{match_sign}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -28,6 +28,7 @@
|
|||||||
<if test="all_recycle_sign != null">all_recycle_sign,</if>
|
<if test="all_recycle_sign != null">all_recycle_sign,</if>
|
||||||
<if test="receive_person != null">receive_person,</if>
|
<if test="receive_person != null">receive_person,</if>
|
||||||
<if test="receive_id != null">receive_id,</if>
|
<if test="receive_id != null">receive_id,</if>
|
||||||
|
<if test="more_sign != null">more_sign,</if>
|
||||||
bill_no, hos_id,occur_date
|
bill_no, hos_id,occur_date
|
||||||
)values (
|
)values (
|
||||||
<if test="total_money != null">#{total_money},</if>
|
<if test="total_money != null">#{total_money},</if>
|
||||||
@ -54,6 +55,7 @@
|
|||||||
<if test="all_recycle_sign != null">#{all_recycle_sign},</if>
|
<if test="all_recycle_sign != null">#{all_recycle_sign},</if>
|
||||||
<if test="receive_person != null">#{receive_person},</if>
|
<if test="receive_person != null">#{receive_person},</if>
|
||||||
<if test="receive_id != null">#{receive_id},</if>
|
<if test="receive_id != null">#{receive_id},</if>
|
||||||
|
<if test="more_sign != null">#{more_sign},</if>
|
||||||
#{bill_no}, #{hos_id}, #{occur_date}
|
#{bill_no}, #{hos_id}, #{occur_date}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
@ -84,6 +86,7 @@
|
|||||||
<if test="all_recycle_sign != null">all_recycle_sign = #{all_recycle_sign},</if>
|
<if test="all_recycle_sign != null">all_recycle_sign = #{all_recycle_sign},</if>
|
||||||
<if test="receive_person != null">receive_person = #{receive_person},</if>
|
<if test="receive_person != null">receive_person = #{receive_person},</if>
|
||||||
<if test="receive_id != null">receive_id = #{receive_id},</if>
|
<if test="receive_id != null">receive_id = #{receive_id},</if>
|
||||||
|
<if test="more_sign != null">more_sign = #{more_sign},</if>
|
||||||
bill_no = #{bill_no}
|
bill_no = #{bill_no}
|
||||||
where bill_no = #{bill_no}
|
where bill_no = #{bill_no}
|
||||||
</update>
|
</update>
|
||||||
@ -91,4 +94,16 @@
|
|||||||
<select id="queryOne" resultType="com.czblood.bus.pojo.XkOutMain">
|
<select id="queryOne" resultType="com.czblood.bus.pojo.XkOutMain">
|
||||||
select * from xk_out_main where bill_no = #{billNo}
|
select * from xk_out_main where bill_no = #{billNo}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="queryList" resultType="com.czblood.bus.pojo.XkOutMain">
|
||||||
|
select * from xk_out_main
|
||||||
|
<where>
|
||||||
|
<if test="apply_no != null">and apply_no = #{apply_no}</if>
|
||||||
|
<if test="match_no != null">and match_no = #{match_no}</if>
|
||||||
|
<if test="beinhos_id != null">and beinhos_id = #{beinhos_id}</if>
|
||||||
|
<if test="check_no != null">and check_no = #{check_no}</if>
|
||||||
|
<if test="bill_sort != null">and bill_sort = #{bill_sort}</if>
|
||||||
|
<if test="input_person != null">and input_person = #{input_person}</if>
|
||||||
|
<if test="check_sign != null">and check_sign = #{check_sign}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
<?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.XkReportTemplateMapper">
|
||||||
|
|
||||||
|
<insert id="insert">
|
||||||
|
insert into xk_report_template (report_no, report_name, report_size, create_time, update_time)
|
||||||
|
values ( #{report_no}, #{report_name}, #{report_size}, #{create_time}, #{update_time})
|
||||||
|
</insert>
|
||||||
|
<update id="update">
|
||||||
|
update xk_report_template
|
||||||
|
set report_name = #{report_name},
|
||||||
|
report_size = #{report_size},
|
||||||
|
update_time = #{update_time}
|
||||||
|
where report_no = #{report_no}
|
||||||
|
</update>
|
||||||
|
<delete id="deleteByReportNo">
|
||||||
|
delete from xk_report_template where report_no = #{reportNo}
|
||||||
|
</delete>
|
||||||
|
<select id="queryOne" resultType="com.czblood.bus.pojo.xtwh.XkReportTemplate">
|
||||||
|
select * from xk_report_template
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
@Api(tags = "血液出库")
|
@Api(tags = "临床发血")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/bus/bloodbank/bloodOut")
|
@RequestMapping("/bus/bloodbank/bloodOut")
|
||||||
public class BloodOutController extends BaseController {
|
public class BloodOutController extends BaseController {
|
||||||
@ -26,10 +26,16 @@ public class BloodOutController extends BaseController {
|
|||||||
@Resource
|
@Resource
|
||||||
private BloodOutService bloodOutService;
|
private BloodOutService bloodOutService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多次发血,moreSign = Y
|
||||||
|
* @param applyNo
|
||||||
|
* @param moreSign
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@ApiOperation("查询申请单数据")
|
@ApiOperation("查询申请单数据")
|
||||||
@GetMapping("/queryOne")
|
@GetMapping("/queryOne")
|
||||||
public Result queryOne(String applyNo){
|
public Result queryOne(String applyNo,String moreSign){
|
||||||
return bloodOutService.queryOne(applyNo);
|
return bloodOutService.queryOne(applyNo,moreSign);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -87,11 +93,11 @@ public class BloodOutController extends BaseController {
|
|||||||
return bloodOutService.queryInfo(billNo);
|
return bloodOutService.queryInfo(billNo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("多次发血")
|
// @ApiOperation("多次发血")
|
||||||
@GetMapping("/moreBloodOut")
|
// @GetMapping("/moreBloodOut")
|
||||||
public Result moreBloodOut(){
|
// public Result moreBloodOut(){
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
|
|
||||||
@ApiOperation("查询多次发血单数据列表")
|
@ApiOperation("查询多次发血单数据列表")
|
||||||
@GetMapping("/queryMoreBloodOutList")
|
@GetMapping("/queryMoreBloodOutList")
|
||||||
|
|||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.czblood.busBloodbank.controller.xtwh;
|
||||||
|
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@Api(tags = "打印模版维护")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/bus/bloodbank/xkReportTemplate")
|
||||||
|
public class XkReportTemplateController {
|
||||||
|
}
|
||||||
@ -22,7 +22,7 @@ public interface BloodOutMapper {
|
|||||||
Date querySampleMaxPickDate(String applyNo);
|
Date querySampleMaxPickDate(String applyNo);
|
||||||
List<XkCheckBloodtype> queryCheckBloodtype(String applyNo);
|
List<XkCheckBloodtype> queryCheckBloodtype(String applyNo);
|
||||||
List<Map<String,Object>> queryList(BloodOutQueryVO bloodOutQueryVO);
|
List<Map<String,Object>> queryList(BloodOutQueryVO bloodOutQueryVO);
|
||||||
List<Map<String,Object>> queryStockInfo(String billNo);
|
List<Map<String,Object>> queryStockInfo(String applyNo);
|
||||||
List<Map<String,Object>> queryMoreBloodOutList(BloodOutMoreQueryVO bloodOutMoreQueryVO);
|
List<Map<String,Object>> queryMoreBloodOutList(BloodOutMoreQueryVO bloodOutMoreQueryVO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import com.czblood.bus.pojo.XkOutDetail;
|
|||||||
import com.czblood.bus.pojo.XkOutMain;
|
import com.czblood.bus.pojo.XkOutMain;
|
||||||
import com.czblood.bus.pojo.XkPatientInfo;
|
import com.czblood.bus.pojo.XkPatientInfo;
|
||||||
import com.czblood.bus.pojo.XkTransfuseApply;
|
import com.czblood.bus.pojo.XkTransfuseApply;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
@ -19,4 +20,6 @@ public class BloodOutInfoVO {
|
|||||||
private XkTransfuseApply xkTransfuseApply;
|
private XkTransfuseApply xkTransfuseApply;
|
||||||
private XkPatientInfo xkPatientInfo;
|
private XkPatientInfo xkPatientInfo;
|
||||||
private String userId;
|
private String userId;
|
||||||
|
@ApiModelProperty("是否多次发血")
|
||||||
|
private String moreSign;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import com.czblood.busBloodbank.pojo.VO.BloodOutQueryVO;
|
|||||||
import com.czblood.common.core.domain.Result;
|
import com.czblood.common.core.domain.Result;
|
||||||
|
|
||||||
public interface BloodOutService {
|
public interface BloodOutService {
|
||||||
Result queryOne(String applyNo);
|
Result queryOne(String applyNo,String moreSign);
|
||||||
Result queryWaitInfo();
|
Result queryWaitInfo();
|
||||||
Result getBloodInfoOut(String bloodNo, String productNo,String applyNo);
|
Result getBloodInfoOut(String bloodNo, String productNo,String applyNo);
|
||||||
Result saveData(BloodOutInfoVO bloodOutInfoVO);
|
Result saveData(BloodOutInfoVO bloodOutInfoVO);
|
||||||
|
|||||||
@ -0,0 +1,4 @@
|
|||||||
|
package com.czblood.busBloodbank.service;
|
||||||
|
|
||||||
|
public interface XkReportTemplateService {
|
||||||
|
}
|
||||||
@ -59,20 +59,26 @@ public class BloodOutServiceImpl implements BloodOutService {
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result queryOne(String applyNo) {
|
public Result queryOne(String applyNo,String moreSign) {
|
||||||
XkTransfuseApply xkTransfuseApply = xkTransfuseApplyMapper.queryOne(applyNo);
|
XkTransfuseApply xkTransfuseApply = xkTransfuseApplyMapper.queryOne(applyNo);
|
||||||
if(xkTransfuseApply == null) return new Result("-1","该申请单不存在,请检查!");
|
if(xkTransfuseApply == null) return new Result("-1","该申请单不存在,请检查!");
|
||||||
String operationType = xkTransfuseApply.getOperation_type();
|
String operationType = xkTransfuseApply.getOperation_type();
|
||||||
if(operationType.equals("Z")) return new Result("-1","该申请单为自体血申请单,无法在这操作!");
|
if(operationType.equals("Z")) return new Result("-1","该申请单为自体血申请单,无法在这操作!");
|
||||||
if(!operationType.equals("S")) return new Result("-1","该申请单为输血治疗申请单,无法在这操作!");
|
if(operationType.equals("S")) return new Result("-1","该申请单为输血治疗申请单,无法在这操作!");
|
||||||
|
if(!moreSign.equals("Y")){
|
||||||
Result result = checkBloodValid(xkTransfuseApply);
|
Result result = checkBloodValid(xkTransfuseApply);
|
||||||
if(!result.getCode().equals("0")) return result;
|
if(!result.getCode().equals("0")) return result;
|
||||||
|
}
|
||||||
//返回数据
|
//返回数据
|
||||||
List<Map<String, Object>> mapList = bloodOutMapper.queryApplyInfo(applyNo);
|
List<Map<String, Object>> mapList = bloodOutMapper.queryApplyInfo(applyNo);
|
||||||
List<XkTransfuseApplyBloodbreed> xkTransfuseApplyBloodbreedList = xkTransfuseApplyBloodbreedMapper.queryOne(applyNo);
|
List<XkTransfuseApplyBloodbreed> xkTransfuseApplyBloodbreedList = xkTransfuseApplyBloodbreedMapper.queryOne(applyNo);
|
||||||
|
List<Map<String, Object>> queryStockInfoList = bloodOutMapper.queryStockInfo(applyNo);
|
||||||
BloodOutDTO bloodOutDTO = new BloodOutDTO();
|
BloodOutDTO bloodOutDTO = new BloodOutDTO();
|
||||||
bloodOutDTO.setApplyInfoList(mapList);
|
bloodOutDTO.setApplyInfoList(mapList);
|
||||||
bloodOutDTO.setXkTransfuseApplyBloodbreedList(xkTransfuseApplyBloodbreedList);
|
bloodOutDTO.setXkTransfuseApplyBloodbreedList(xkTransfuseApplyBloodbreedList);
|
||||||
|
if(!moreSign.equals("Y")){
|
||||||
|
bloodOutDTO.setStockInfoList(queryStockInfoList);
|
||||||
|
}
|
||||||
return new Result("0","操作成功",bloodOutDTO);
|
return new Result("0","操作成功",bloodOutDTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,13 +128,15 @@ public class BloodOutServiceImpl implements BloodOutService {
|
|||||||
XkOutMain xkOutMain = bloodOutInfoVO.getXkOutMain();
|
XkOutMain xkOutMain = bloodOutInfoVO.getXkOutMain();
|
||||||
String billNo = BloodBankUtil.isBank(xkOutMain.getBill_no());
|
String billNo = BloodBankUtil.isBank(xkOutMain.getBill_no());
|
||||||
String applyNo = xkOutMain.getApply_no();
|
String applyNo = xkOutMain.getApply_no();
|
||||||
|
String moreSign = bloodOutInfoVO.getMoreSign();
|
||||||
|
xkOutMain.setMore_sign(moreSign); //是否多次发血
|
||||||
List<XkOutDetail> xkOutDetailList = bloodOutInfoVO.getXkOutDetailList();
|
List<XkOutDetail> xkOutDetailList = bloodOutInfoVO.getXkOutDetailList();
|
||||||
if(xkOutDetailList.isEmpty()) return new Result("-1","出库血液为空,请选择出库血液!");
|
if(xkOutDetailList.isEmpty()) return new Result("-1","出库血液为空,请选择出库血液!");
|
||||||
boolean bModify = false;
|
boolean bModify = false;
|
||||||
if(!billNo.equals("")) bModify = true;
|
if(!billNo.equals("")) bModify = true;
|
||||||
String matchNo = "";
|
String matchNo = "";
|
||||||
String checkNo = "";
|
String checkNo = "";
|
||||||
Date currentTimeDate = bloodBankUtil.getCurrentTimeDate();
|
//Date currentTimeDate = bloodBankUtil.getCurrentTimeDate();
|
||||||
XkMatchMain xkMatchMain = bloodOutMapper.queryXkMatchMain(applyNo);
|
XkMatchMain xkMatchMain = bloodOutMapper.queryXkMatchMain(applyNo);
|
||||||
if(xkMatchMain != null) {
|
if(xkMatchMain != null) {
|
||||||
matchNo = BloodBankUtil.isBank(xkMatchMain.getBill_no());
|
matchNo = BloodBankUtil.isBank(xkMatchMain.getBill_no());
|
||||||
|
|||||||
@ -0,0 +1,8 @@
|
|||||||
|
package com.czblood.busBloodbank.service.impl;
|
||||||
|
|
||||||
|
import com.czblood.busBloodbank.service.XkReportTemplateService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
public class XkReportTemplateServiceImpl implements XkReportTemplateService {
|
||||||
|
}
|
||||||
@ -28,6 +28,7 @@
|
|||||||
xk_transfuse_apply.beinhos_id,
|
xk_transfuse_apply.beinhos_id,
|
||||||
xk_transfuse_apply.dept_id,
|
xk_transfuse_apply.dept_id,
|
||||||
xk_transfuse_apply.patient_bed,
|
xk_transfuse_apply.patient_bed,
|
||||||
|
xk_transfuse_apply.bill_stasus,
|
||||||
xk_check_bloodtype.affirm_abo,
|
xk_check_bloodtype.affirm_abo,
|
||||||
xk_check_bloodtype.check_rh,
|
xk_check_bloodtype.check_rh,
|
||||||
xk_check_bloodtype.affirm_antibody,
|
xk_check_bloodtype.affirm_antibody,
|
||||||
@ -64,6 +65,7 @@
|
|||||||
xk_transfuse_apply.beinhos_id,
|
xk_transfuse_apply.beinhos_id,
|
||||||
xk_transfuse_apply.dept_id,
|
xk_transfuse_apply.dept_id,
|
||||||
xk_transfuse_apply.patient_bed,
|
xk_transfuse_apply.patient_bed,
|
||||||
|
xk_transfuse_apply.bill_stasus,
|
||||||
space(4) affirm_abo,
|
space(4) affirm_abo,
|
||||||
space(4) check_rh,
|
space(4) check_rh,
|
||||||
space(8) affirm_antibody,
|
space(8) affirm_antibody,
|
||||||
@ -98,6 +100,7 @@
|
|||||||
xk_transfuse_apply.beinhos_id,
|
xk_transfuse_apply.beinhos_id,
|
||||||
xk_transfuse_apply.dept_id,
|
xk_transfuse_apply.dept_id,
|
||||||
xk_transfuse_apply.patient_bed,
|
xk_transfuse_apply.patient_bed,
|
||||||
|
xk_transfuse_apply.bill_stasus,
|
||||||
xk_check_bloodtype.affirm_abo,
|
xk_check_bloodtype.affirm_abo,
|
||||||
xk_check_bloodtype.check_rh,
|
xk_check_bloodtype.check_rh,
|
||||||
xk_check_bloodtype.affirm_antibody ,
|
xk_check_bloodtype.affirm_antibody ,
|
||||||
@ -205,6 +208,7 @@
|
|||||||
xk_blood_info.unit,
|
xk_blood_info.unit,
|
||||||
xk_blood_info.valid_date,
|
xk_blood_info.valid_date,
|
||||||
xk_blood_info.auto_no ,
|
xk_blood_info.auto_no ,
|
||||||
|
(select top 1 price from xk_instorage_detail where xk_blood_info.blood_no = blood_no and xk_blood_info.product_no = product_no) as price,
|
||||||
space(10) as match_method,
|
space(10) as match_method,
|
||||||
space(10) as check_method,
|
space(10) as check_method,
|
||||||
space(10) as result,
|
space(10) as result,
|
||||||
@ -227,17 +231,18 @@
|
|||||||
xk_blood_info.unit,
|
xk_blood_info.unit,
|
||||||
xk_blood_info.valid_date,
|
xk_blood_info.valid_date,
|
||||||
xk_blood_info.auto_no ,
|
xk_blood_info.auto_no ,
|
||||||
|
(select top 1 price from xk_instorage_detail where xk_blood_info.blood_no = blood_no and xk_blood_info.product_no = product_no) as price,
|
||||||
xk_match_detail.match_method as match_method,
|
xk_match_detail.match_method as match_method,
|
||||||
xk_match_detail.check_method as check_method,
|
xk_match_detail.check_method as check_method,
|
||||||
xk_match_detail.result as result,
|
xk_match_detail.result as result,
|
||||||
'' as choose,
|
'' as choose,
|
||||||
'' as special_deal
|
'' as special_deal
|
||||||
from xk_blood_info,xk_out_main ,xk_out_detail
|
from xk_blood_info
|
||||||
left join xk_match_detail on (xk_out_detail.blood_no = xk_match_detail.blood_no and xk_match_detail.product_no = xk_out_detail.product_no)
|
left join xk_out_detail on (xk_out_detail.blood_no = xk_blood_info.blood_no and xk_out_detail.product_no = xk_blood_info.product_no)
|
||||||
|
left join xk_out_main on (xk_out_main.bill_no = xk_out_detail.bill_no)
|
||||||
|
left join xk_match_detail on (xk_blood_info.blood_no = xk_match_detail.blood_no and xk_match_detail.product_no = xk_blood_info.product_no)
|
||||||
left join xk_match_main on (xk_match_detail.bill_no = xk_match_main.bill_no)
|
left join xk_match_main on (xk_match_detail.bill_no = xk_match_main.bill_no)
|
||||||
where xk_out_main.bill_no = xk_out_detail.bill_no
|
where xk_match_main.apply_no = #{applyNo}
|
||||||
and xk_blood_info.blood_no = xk_out_detail.blood_no and xk_blood_info.product_no = xk_out_detail.product_no
|
|
||||||
and xk_out_main.bill_no = #{billNo}
|
|
||||||
AND ( xk_blood_info.blood_sort in('C','W' )OR isnull(xk_blood_info.blood_sort,'') = '')
|
AND ( xk_blood_info.blood_sort in('C','W' )OR isnull(xk_blood_info.blood_sort,'') = '')
|
||||||
<![CDATA[ AND(xk_match_main.bill_status <> 'ZF') ]]>
|
<![CDATA[ AND(xk_match_main.bill_status <> 'ZF') ]]>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.czblood.busDoctor.mapper;
|
|||||||
|
|
||||||
|
|
||||||
import com.czblood.bus.pojo.XkCheckBloodtype;
|
import com.czblood.bus.pojo.XkCheckBloodtype;
|
||||||
|
import com.czblood.bus.pojo.XkMatchMain;
|
||||||
import com.czblood.bus.pojo.XkOutMain;
|
import com.czblood.bus.pojo.XkOutMain;
|
||||||
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;
|
||||||
@ -23,4 +24,5 @@ public interface TransfuseApplyMapper {
|
|||||||
long queryBillStatusCount(String beinhos_id);
|
long queryBillStatusCount(String beinhos_id);
|
||||||
XkCheckBloodtype queryCheckDate(String beinhos_id);
|
XkCheckBloodtype queryCheckDate(String beinhos_id);
|
||||||
int queryXkOutMainCount(String applyNo);
|
int queryXkOutMainCount(String applyNo);
|
||||||
|
List<XkMatchMain> queryXkMatchMainList(String applyNo);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -54,6 +54,10 @@ public class TransfuseApplyServiceImpl implements TransfuseApplyService {
|
|||||||
XkTransfuseApplyApprovalMapper xkTransfuseApplyApprovalMapper;
|
XkTransfuseApplyApprovalMapper xkTransfuseApplyApprovalMapper;
|
||||||
@Resource
|
@Resource
|
||||||
XkTransfuseApplyMapper xkTransfuseApplyMapper;
|
XkTransfuseApplyMapper xkTransfuseApplyMapper;
|
||||||
|
@Resource
|
||||||
|
XkCheckBloodtypeMapper xkCheckBloodtypeMapper;
|
||||||
|
@Resource
|
||||||
|
XkOutMainMapper xkOutMainMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取病人信息
|
* 获取病人信息
|
||||||
@ -654,10 +658,24 @@ public class TransfuseApplyServiceImpl implements TransfuseApplyService {
|
|||||||
@Override
|
@Override
|
||||||
public Result bloodCloseLoop(String billNo) {
|
public Result bloodCloseLoop(String billNo) {
|
||||||
List<String> applyStatusList = BloodApplyStatusConstants.values();
|
List<String> applyStatusList = BloodApplyStatusConstants.values();
|
||||||
|
//输血申请
|
||||||
XkTransfuseApply xkTransfuseApply = xkTransfuseApplyMapper.queryOne(billNo);
|
XkTransfuseApply xkTransfuseApply = xkTransfuseApplyMapper.queryOne(billNo);
|
||||||
if(xkTransfuseApply == null) return new Result("-1","没有查到该申请单的信息!");
|
if(xkTransfuseApply == null) return new Result("-1","没有查到该申请单的信息!");
|
||||||
List<ClosedLoopStatus> closedLoopStatusList = new ArrayList<>();
|
List<ClosedLoopStatus> closedLoopStatusList = new ArrayList<>();
|
||||||
|
//大量用血
|
||||||
XkTransfuseApplyApproval xkTransfuseApplyApproval = xkTransfuseApplyApprovalMapper.queryOneByBillNo(billNo);
|
XkTransfuseApplyApproval xkTransfuseApplyApproval = xkTransfuseApplyApprovalMapper.queryOneByBillNo(billNo);
|
||||||
|
//复核血型
|
||||||
|
XkCheckBloodtype xkCheckBloodtypeQuery = new XkCheckBloodtype();
|
||||||
|
xkCheckBloodtypeQuery.setApply_no(xkTransfuseApply.getBill_no());
|
||||||
|
List<XkCheckBloodtype> xkCheckBloodtypeList = xkCheckBloodtypeMapper.queryList(xkCheckBloodtypeQuery);
|
||||||
|
//交叉配血
|
||||||
|
List<XkMatchMain> xkMatchMainList = transfuseApplyMapper.queryXkMatchMainList(xkTransfuseApply.getBill_no());
|
||||||
|
//临床发血
|
||||||
|
XkOutMain xkOutMainQuery = new XkOutMain();
|
||||||
|
xkOutMainQuery.setApply_no(billNo);
|
||||||
|
xkOutMainQuery.setCheck_sign("Y");
|
||||||
|
List<XkOutMain> xkOutMainList = xkOutMainMapper.queryList(xkOutMainQuery);
|
||||||
|
|
||||||
for (String statusName : applyStatusList) {
|
for (String statusName : applyStatusList) {
|
||||||
//大量用血申请表没有,说明没有科主任审核和医务科审核
|
//大量用血申请表没有,说明没有科主任审核和医务科审核
|
||||||
if((xkTransfuseApplyApproval == null) && (statusName.equals(BloodApplyStatusConstants.BILL_STATUS_ARCHIATER_CHECK) || statusName.equals(BloodApplyStatusConstants.BILL_STATUS_MEDICAL_CHECK))) continue;
|
if((xkTransfuseApplyApproval == null) && (statusName.equals(BloodApplyStatusConstants.BILL_STATUS_ARCHIATER_CHECK) || statusName.equals(BloodApplyStatusConstants.BILL_STATUS_MEDICAL_CHECK))) continue;
|
||||||
@ -708,10 +726,25 @@ public class TransfuseApplyServiceImpl implements TransfuseApplyService {
|
|||||||
closedLoopStatus.setVisible("Y");
|
closedLoopStatus.setVisible("Y");
|
||||||
}
|
}
|
||||||
case BloodApplyStatusConstants.BILL_STATUS_BLOOD_TYPE_CHECK:
|
case BloodApplyStatusConstants.BILL_STATUS_BLOOD_TYPE_CHECK:
|
||||||
|
if(!xkCheckBloodtypeList.isEmpty()){
|
||||||
|
closedLoopStatus.setOccurName(xkCheckBloodtypeList.get(0).getCheck_person());
|
||||||
|
closedLoopStatus.setOccurDate(xkCheckBloodtypeList.get(0).getTest_date());
|
||||||
|
closedLoopStatus.setVisible("Y");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case BloodApplyStatusConstants.BILL_STATUS_MATCH_CHECK:
|
case BloodApplyStatusConstants.BILL_STATUS_MATCH_CHECK:
|
||||||
|
if(!xkMatchMainList.isEmpty()){
|
||||||
|
closedLoopStatus.setOccurName(xkMatchMainList.get(0).getInput_person());
|
||||||
|
closedLoopStatus.setOccurDate(xkMatchMainList.get(0).getInput_date());
|
||||||
|
closedLoopStatus.setVisible("Y");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case BloodApplyStatusConstants.BILL_STATUS_OUT_CHECK:
|
case BloodApplyStatusConstants.BILL_STATUS_OUT_CHECK:
|
||||||
|
if(!xkOutMainList.isEmpty()){
|
||||||
|
closedLoopStatus.setOccurName(xkOutMainList.get(0).getCheck_person());
|
||||||
|
closedLoopStatus.setOccurDate(xkOutMainList.get(0).getCheck_date());
|
||||||
|
closedLoopStatus.setVisible("Y");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
closedLoopStatusList.add(closedLoopStatus);
|
closedLoopStatusList.add(closedLoopStatus);
|
||||||
|
|||||||
@ -192,4 +192,8 @@
|
|||||||
<select id="queryXkOutMainCount" resultType="java.lang.Integer">
|
<select id="queryXkOutMainCount" resultType="java.lang.Integer">
|
||||||
select count(*) from xk_out_main where apply_no = #{applyNo}
|
select count(*) from xk_out_main where apply_no = #{applyNo}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="queryXkMatchMainList" resultType="com.czblood.bus.pojo.XkMatchMain">
|
||||||
|
<![CDATA[select * from xk_match_main where apply_no = #{applyNo} and bill_status <> 'ZF']]>
|
||||||
|
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -471,3 +471,25 @@ if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'xk_c
|
|||||||
alter table xk_check_bloodtype add plt_test varchar(5)
|
alter table xk_check_bloodtype add plt_test varchar(5)
|
||||||
END
|
END
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'xk_out_main' AND COLUMN_NAME = 'more_sign')
|
||||||
|
BEGIN
|
||||||
|
alter table xk_out_main add more_sign varchar(2)
|
||||||
|
END
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'xk_report_template')
|
||||||
|
begin
|
||||||
|
create table xk_report_template
|
||||||
|
(
|
||||||
|
report_id bigint primary key identity(1,1),
|
||||||
|
report_no varchar(100) not null,
|
||||||
|
report_name varchar(500) not null,
|
||||||
|
report_size varchar(50),
|
||||||
|
create_time datetime,
|
||||||
|
update_time datetime
|
||||||
|
)
|
||||||
|
ALTER TABLE xk_report_template ADD CONSTRAINT UQ_xk_report_template_reportNo UNIQUE(report_no);
|
||||||
|
end
|
||||||
Loading…
x
Reference in New Issue
Block a user