输血申请单,患者输血历史查询

This commit is contained in:
jiangs 2026-07-13 09:23:01 +08:00
parent 2213876352
commit 62574d4647
4 changed files with 109 additions and 0 deletions

View File

@ -0,0 +1,32 @@
package com.czblood.busDoctor.controller;
import com.czblood.busDoctor.mapper.TransfuseApplyHistoryMapper;
import com.czblood.busDoctor.pojo.VO.TransfuseApplyHistoryVO;
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.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
@Api(tags = "输血申请历史")
@RestController
@RequestMapping("/bus/doctor/history")
@Slf4j
public class TransfuseApplyHistoryController {
@Resource
private TransfuseApplyHistoryMapper transfuseApplyHistoryMapper;
@ApiOperation("查询输血申请历史列表")
@RequestMapping("/queryList")
public Result queryList(TransfuseApplyHistoryVO transfuseApplyHistoryVO){
List<Map<String,Object>> list = transfuseApplyHistoryMapper.queryList(transfuseApplyHistoryVO);
return new Result("0","查询成功!",list);
}
}

View File

@ -0,0 +1,10 @@
package com.czblood.busDoctor.mapper;
import com.czblood.busDoctor.pojo.VO.TransfuseApplyHistoryVO;
import java.util.List;
import java.util.Map;
public interface TransfuseApplyHistoryMapper {
List<Map<String,Object>> queryList(TransfuseApplyHistoryVO transfuseApplyHistoryVO);
}

View File

@ -0,0 +1,14 @@
package com.czblood.busDoctor.pojo.VO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TransfuseApplyHistoryVO {
private String beinhos_id;
private String patient_name;
private String dept;
}

View File

@ -0,0 +1,53 @@
<?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.TransfuseApplyHistoryMapper">
<select id="queryList" resultType="java.util.Map">
SELECT Count(xk_blood_info.blood_no) as ds ,
xk_blood_info.blood_breed,
xk_blood_info.capacity,
xk_blood_info.unit,
xk_patient_info.match_history,
xk_transfuse_apply.intent,
xk_patient_info.parturition_history,
xk_patient_info.gestation_history,
xk_patient_info.reaction_history,
xk_patient_info.patient_name,
xk_patient_info.patient_sex,
xk_patient_info.age,
xk_patient_info.beinhos_id,
xk_transfuse_apply.abo_type,
xk_out_main.occur_date,
xk_transfuse_apply.dept_id
FROM xk_out_detail,
xk_out_main,
xk_patient_info,
xk_transfuse_apply,
xk_blood_info
WHERE ( xk_out_detail.bill_no = xk_out_main.bill_no ) and
( xk_out_main.apply_no = xk_transfuse_apply.bill_no ) and
( xk_patient_info.beinhos_id = xk_transfuse_apply.beinhos_id) and
( xk_out_detail.blood_no = xk_blood_info.blood_no ) AND
( xk_out_detail.product_no = xk_blood_info.product_no ) AND
( xk_transfuse_apply.operation_type = 'C' OR isnull(xk_transfuse_apply.operation_type,'') = '')
<if test="beinhos_id != null and beinhos_id != ''">and xk_transfuse_apply.beinhos_id = #{beinhos_id}</if>
<if test="patient_name != null and patient_name != ''">and xk_patient_info.patient_name like '%'+ #{patient_name} +'%' </if>
<if test="dept != null and dept != ''">and xk_transfuse_apply.dept_id = #{dept}</if>
Group by xk_blood_info.blood_breed,
xk_blood_info.capacity,
xk_blood_info.unit,
xk_patient_info.match_history,
xk_transfuse_apply.intent,
xk_patient_info.parturition_history,
xk_patient_info.gestation_history,
xk_patient_info.reaction_history,
xk_patient_info.patient_name,
xk_patient_info.patient_sex,
xk_patient_info.age,
xk_patient_info.beinhos_id,
xk_transfuse_apply.abo_type,
xk_out_main.occur_date,
xk_transfuse_apply.dept_id
</select>
</mapper>