输血申请单界面问题修改,护士标本录入界面

This commit is contained in:
jiangs 2026-07-24 17:57:42 +08:00
parent 95d997467f
commit 360a1076d8
19 changed files with 255 additions and 18 deletions

View File

@ -20,4 +20,8 @@ public class BloodPrintTypeConstants {
* 大量用血审批单
*/
public static final String LARGE_APPLY = "LARGE_APPLY";
/**
* 输血申请单
*/
public static final String BLOOD_APPLY = "BLOOD_APPLY";
}

View File

@ -16,6 +16,7 @@ public class XkProTransfuseProject {
private Integer sid;
@ApiModelProperty("项目名称")
private String pro_name;
@ApiModelProperty("结果类型A数值型,B阴阳型")
private String result_type;
private String unit;
private String need;

View File

@ -115,6 +115,7 @@ public class XkTransfuseApply {
private String agreement_ink;
private String exp1;
private String exp2;
@ApiModelProperty("输血科审核人")
private String exp3;
private String exp4;
@ApiModelProperty("最后修改时间")
@ -152,4 +153,6 @@ public class XkTransfuseApply {
private String need_check;
@ApiModelProperty("是否需要血型复核,生成条码标志(1=是,0=否)")
private String isxxfh;
@ApiModelProperty("审核时间")
private Date check_date;
}

View File

@ -26,4 +26,6 @@ public class XkTransfuseApplyTestitem {
private Date test_date;
@ApiModelProperty("上传标志")
private String upload_flag;
@ApiModelProperty("检验项目结果类型")
private String result_type;
}

View File

@ -126,9 +126,9 @@ public class BloodExtInterfaceService implements ExtSystemInterface {
String useSign = xkDmzd.getUse_sign();
sysDept.setDeptCode(xkDmzd.getWordbook_code());
if(useSign.equals("Y")) {
useSign = "1";
}else{
useSign = "0";
}else{
useSign = "1";
}
sysDept.setStatus(useSign);
sysDept.setCreateBy("admin");

View File

@ -173,6 +173,7 @@ public class BloodBankUtil {
public BigDecimal getApplyTransNum(String bloodBreed,BigDecimal applyNum){
BigDecimal applyTransNum = bloodBankMapper.getApplyTransNum(bloodBreed);
if(applyTransNum == null) return applyNum;
//计算结果保留 2 位小数,采用四舍五入规则。
return applyNum.divide(applyTransNum,2, RoundingMode.HALF_UP);
}

View File

@ -226,6 +226,7 @@
<if test="operation_name != null">operation_name = #{operation_name},</if>
<if test="operation_level != null">operation_level = #{operation_level},</if>
<if test="card_no != null">card_no = #{card_no},</if>
<if test="check_date != null">check_date = #{check_date},</if>
hos_id = #{hos_id}
</set>
where bill_no = #{bill_no}

View File

@ -71,7 +71,7 @@ public class TransfuseApplyBeforeController extends BaseController {
@ApiOperation("打印单据")
@GetMapping("/print")
public Result print(@ApiParam(value = "单据编号", required = true) String billNo,@ApiParam(value = "模板名称:ASSESS_BEFORE(输血前评估单),INFORMED_CONSENT(知情同意书),LARGE_APPLY(大量用血审批单)", required = true) String templateName){
public Result print(@ApiParam(value = "单据编号", required = true) String billNo,@ApiParam(value = "模板名称:ASSESS_BEFORE(输血前评估单),INFORMED_CONSENT(知情同意书),LARGE_APPLY(大量用血审批单),BLOOD_APPLY(输血申请单)", required = true) String templateName){
return transfuseApplyBeforeService.print(billNo,templateName);
}
}

View File

@ -210,11 +210,13 @@ public class TransfuseApplyBeforeServiceImpl implements TransfuseApplyBeforeServ
String currentTimeDate = bloodBankUtil.getCurrentTime();
String stime = DateUtil.format(DateUtil.offsetDay(bloodBankUtil.getCurrentTimeDate(), -1),"yyyy-MM-dd HH:mm:ss");
BigDecimal bloodSum = transfuseApplyBeforeMapper.getBloodSum(beinhosId,stime,currentTimeDate,largeKindStr);
reportParam.setBloodSum(bloodSum.toString());
reportParam.setBloodSum(BloodBankUtil.isBank(bloodSum));
Result result2 = reportUtil.printToPdf(BloodPrintTypeConstants.LARGE_APPLY, reportParam, true);
if(!result2.getCode().equals("0")) return result2;
return new Result("0","打印成功!",BloodBankUtil.isBank(result2.getData()));
case "BLOOD_APPLY":
Result result3 = reportUtil.printToPdf(BloodPrintTypeConstants.BLOOD_APPLY, reportParam, true);
return new Result("0","打印成功!",BloodBankUtil.isBank(result3.getData()));
}
return new Result("-1","没有找到对应的打印模版!");
@ -227,15 +229,15 @@ public class TransfuseApplyBeforeServiceImpl implements TransfuseApplyBeforeServ
if(xkTransfuseApplyBefore == null) return new Result("-1","没有找到对应的评估单!");
String billStatus = xkTransfuseApplyBefore.getBill_status();
if(billStatus.equals("2")) return new Result("-1","该单据已使用,无法修改!");
// XkTransfuseApply xkTransfuseApply = new XkTransfuseApply();
// xkTransfuseApply.setAssess_bill_no(billNo);
// List<XkTransfuseApply> xkTransfuseApplyList = xkTransfuseApplyMapper.queryList(xkTransfuseApply);
// if(xkTransfuseApplyList.size() > 0){
// for (XkTransfuseApply transfuseApply : xkTransfuseApplyList) {
// String checkSign = transfuseApply.getCheck_sign();
// if(checkSign.equals("Y")) return new Result("-1","该评估单对应的申请单已审核,无法修改或删除!");
// }
// }
XkTransfuseApply xkTransfuseApply = new XkTransfuseApply();
xkTransfuseApply.setAssess_bill_no(billNo);
List<XkTransfuseApply> xkTransfuseApplyList = xkTransfuseApplyMapper.queryList(xkTransfuseApply);
if(xkTransfuseApplyList.size() > 0){
for (XkTransfuseApply transfuseApply : xkTransfuseApplyList) {
String checkSign = transfuseApply.getCheck_sign();
if(checkSign.equals("Y")) return new Result("-1","该评估单对应的申请单已审核,无法修改或删除!");
}
}
return new Result("0","可以修改!");
}
}

View File

@ -85,6 +85,7 @@ public class TransfuseApplyServiceImpl implements TransfuseApplyService {
TransfuseApplyDTO transfuseApplyDTO = new TransfuseApplyDTO();
transfuseApplyDTO.setTransfuseApplyInfoOne((TransfuseApplyInfoOne)result.getData());
transfuseApplyDTO.setXkTransfuseApplyTestitemList(xkTransfuseApplyTestitemList);
//transfuseApplyDTO.setXkTransfuseApplyBloodbreedList(getBloodBreedList(xkTransfuseApplyBefore));
return new Result(code,warnMsg,transfuseApplyDTO);
}
@ -444,15 +445,15 @@ public class TransfuseApplyServiceImpl implements TransfuseApplyService {
//是否使用用血审批控制
String sfsyyxsp = bloodBankUtil.getParameterValue("SFSYYXSP");
//不是抢救用血的类型,就需要判断是否是大量用血的标准,
if(!exp2.equals("Y") && !sfsyyxsp.equals("Y")){
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 archiater = BloodBankUtil.isBank(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(applyLevel.equals("3")){
if(archiater.equals("")){
return new Result("-1","申请单24小时用血量达到大量用血标准,用血申请还未进行科室主任及医务部核准,暂不能审核,请到(大量用血申请)菜单进行审核!");
}else if(medicalDept.equals("")){
@ -699,6 +700,13 @@ public class TransfuseApplyServiceImpl implements TransfuseApplyService {
closedLoopStatus.setVisible("Y");
}
break;
case BloodApplyStatusConstants.BILL_STATUS_BANK_DIRECTOR_CHECK:
String checkSign = BloodBankUtil.isBank(xkTransfuseApply.getCheck_sign());
if(checkSign.equals("Y")){
closedLoopStatus.setOccurName(xkTransfuseApply.getExp3());
closedLoopStatus.setOccurDate(xkTransfuseApply.getCheck_date());
closedLoopStatus.setVisible("Y");
}
case BloodApplyStatusConstants.BILL_STATUS_BLOOD_TYPE_CHECK:
break;
case BloodApplyStatusConstants.BILL_STATUS_MATCH_CHECK:
@ -712,4 +720,19 @@ public class TransfuseApplyServiceImpl implements TransfuseApplyService {
return new Result("0","获取数据成功",closedLoopStatusList);
}
public List<XkTransfuseApplyBloodbreed> getBloodBreedList(XkTransfuseApplyBefore xkTransfuseApplyBefore) {
List<XkTransfuseApplyBloodbreed> bloodBreedList = new ArrayList<>();
if(xkTransfuseApplyBefore == null) return bloodBreedList;
String bloodBreed = xkTransfuseApplyBefore.getBlood_breed();
if(bloodBreed == null || bloodBreed.equals("")) return bloodBreedList;
XkTransfuseApplyBloodbreed xkTransfuseApplyBloodbreed = new XkTransfuseApplyBloodbreed();
xkTransfuseApplyBloodbreed.setBlood_breed(bloodBreed);
xkTransfuseApplyBloodbreed.setBlood_num(xkTransfuseApplyBefore.getBlood_num());
xkTransfuseApplyBloodbreed.setUnit(xkTransfuseApplyBefore.getUnit());
xkTransfuseApplyBloodbreed.setIntent(xkTransfuseApplyBefore.getIntent());
bloodBreedList.add(xkTransfuseApplyBloodbreed);
return bloodBreedList;
}
}

View File

@ -114,6 +114,7 @@ public class TransfuseCheckExplainServiceImpl implements TransfuseCheckExplainSe
xkTransfuseApplyTemp.setNotify_sign("Y");
xkTransfuseApplyTemp.setExp3(explainVO.getUserId());
xkTransfuseApplyTemp.setIsxxfh(isxxfh);
xkTransfuseApplyTemp.setCheck_date(bloodBankUtil.getCurrentTimeDate());
transfuseCheckExplainUtil.updateApplyStatus(xkTransfuseApplyTemp,xkCheckBloodtype);
//保存条码数据
Result result = transfuseCheckExplainUtil.createSampleData(applyNo);

View File

@ -47,6 +47,8 @@ public class TransfuseApplyUtil {
XkTransfuseApplyTestitemMapper xkTransfuseApplyTestitemMapper;
@Resource
XkTransfuseApplyMapper xkTransfuseApplyMapper;
@Resource
XkTransfuseApplyBeforeMapper xkTransfuseApplyBeforeMapper;
/**
@ -90,8 +92,9 @@ public class TransfuseApplyUtil {
List<String> bloodKindList = getLargeKindStr(xkTransfuseApplyBloodbreedList);
for (XkTransfuseApplyBloodbreed xkTransfuseApplyBloodbreed : xkTransfuseApplyBloodbreedList) {
String bloodBreed = xkTransfuseApplyBloodbreed.getBlood_breed();
XkBloodBreed xkBloodBreed = xkBloodBreedMapper.queryOne(bloodBreed);
BigDecimal bloodNum = xkTransfuseApplyBloodbreed.getBlood_num();
BigDecimal applyTransNum = bloodBankUtil.getApplyTransNum(bloodBreed,bloodNum);
BigDecimal applyTransNum = bloodBankUtil.getApplyTransNum(xkBloodBreed.getBlood_kind(),bloodNum);
totalApplyNum = totalApplyNum.add(applyTransNum);
}
@ -325,6 +328,13 @@ public class TransfuseApplyUtil {
xkTransfuseApplyApprovalMapper.insert(xkTransfuseApplyApproval);
}
//修改输血评估单状态
XkTransfuseApplyBefore xkTransfuseApplyBefore = new XkTransfuseApplyBefore();;
String assessBillNo = BloodBankUtil.isBank(xkTransfuseApply.getAssess_bill_no());
xkTransfuseApplyBefore.setBill_no(assessBillNo);
xkTransfuseApplyBefore.setBill_status("2");
xkTransfuseApplyBeforeMapper.updateXkTransfuseApplyBefore(xkTransfuseApplyBefore);
}

View File

@ -0,0 +1,30 @@
package com.czblood.busNurse.controller;
import com.czblood.busNurse.pojo.VO.SampleInfoVO;
import com.czblood.busNurse.service.SampleInfoService;
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/nurse/sampleInfo")
@Slf4j
public class SampleInfoController {
@Resource
private SampleInfoService sampleInfoService;
@ApiOperation("查询样本信息列表")
@GetMapping("/queryList")
public Result queryList(SampleInfoVO sampleInfoVO){
return sampleInfoService.queryList(sampleInfoVO);
}
}

View File

@ -0,0 +1,10 @@
package com.czblood.busNurse.mapper;
import com.czblood.busNurse.pojo.VO.SampleInfoVO;
import java.util.List;
import java.util.Map;
public interface SampleInfoMapper {
List<Map<String,Object>> queryList(SampleInfoVO sampleInfoVO);
}

View File

@ -0,0 +1,23 @@
package com.czblood.busNurse.pojo.VO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SampleInfoVO {
private Date stime;
private Date end;
private String dept;
private String sample_no;
private String hgbz;
private String status;
private String patno;
private String patname;
private String reqid;
private String reqzt;
}

View File

@ -0,0 +1,8 @@
package com.czblood.busNurse.service;
import com.czblood.busNurse.pojo.VO.SampleInfoVO;
import com.czblood.common.core.domain.Result;
public interface SampleInfoService {
Result queryList(SampleInfoVO sampleInfoVO);
}

View File

@ -0,0 +1,38 @@
package com.czblood.busNurse.service.impl;
import com.czblood.bus.utils.BloodBankUtil;
import com.czblood.busNurse.mapper.SampleInfoMapper;
import com.czblood.busNurse.pojo.VO.SampleInfoVO;
import com.czblood.busNurse.service.SampleInfoService;
import com.czblood.common.core.domain.Result;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
@Service
public class SampleInfoServiceImpl implements SampleInfoService {
@Resource
private SampleInfoMapper sampleInfoMapper;
@Resource
BloodBankUtil bloodBankUtil;
@Override
public Result queryList(SampleInfoVO sampleInfoVO) {
List<Map<String, Object>> mapList = sampleInfoMapper.queryList(sampleInfoVO);
return new Result("0", "操作成功", mapList);
}
public Result createSampleInfo(){
//条码是否在输血审核的时候生成","N","(Y,N)Y在输血审核的时候生成,N在标本录入的时候生成。
String tmsfzsxshsc = bloodBankUtil.getParameterValue("TMSFZSXSHSC");
if(tmsfzsxshsc.equals("Y")) return new Result("0","不在这里产生条码!");
//标本录入时条码生成方式(A-按照血型复核三天生成判断,B-全量生成)
String createsampletype = bloodBankUtil.getParameterValue("CREATESAMPLETYPE");
return null;
}
}

View File

@ -0,0 +1,73 @@
<?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.busNurse.mapper.SampleInfoMapper">
<select id="queryList" resultType="java.util.Map">
SELECT xk_sample_info.Sample_No,
xk_sample_info.Purpose,
xk_sample_info.Dept,
xk_sample_info.Relate_ApplyNo,
xk_sample_info.Blood_Type,
xk_sample_info.Rh_Blood_Type,
xk_sample_info.Sample_Name,
xk_sample_info.Sex,
xk_sample_info.Age,
xk_sample_info.Birthday,
xk_sample_info.Pick_Nurse,
xk_sample_info.Pick_Date,
xk_sample_info.Send_Nurse,
xk_sample_info.Send_Date,
xk_sample_info.TakeOver_Man,
xk_sample_info.TakeOver_Date,
xk_sample_info.Discard_Person,
xk_sample_info.Discard_Date,
xk_sample_info.Discard_Reason,
xk_sample_info.Exp2,
xk_sample_info.Overdue_Flag ,
xk_sample_info.sendperson,
xk_sample_info.sample_status,
xk_transfuse_apply_bloodbreed.blood_breed,
(select is_match from xk_blood_breed where xk_blood_breed.breed_code = xk_transfuse_apply_bloodbreed.blood_breed ) as is_match
FROM xk_sample_info
LEFT JOIN xk_transfuse_apply ON (xk_sample_info.Relate_ApplyNo = xk_transfuse_apply.bill_no)
LEFT JOIN xk_transfuse_apply_bloodbreed ON (xk_transfuse_apply_bloodbreed.bill_no = xk_transfuse_apply.bill_no)
where (xk_sample_info.pick_date Between #{stime} AND #{etime})
<if test="dept != null and dept != ''">AND (xk_sample_info.dept = #{dept})</if>
<if test="sample_no != null and sample_no != ''">and (xk_sample_info.Sample_No = #{sample_no})</if>
UNION ALL
SELECT
'不需要血型复核' AS Sample_No,
'A' AS Purpose,
xk_transfuse_apply.dept_id AS dept,
xk_transfuse_apply.bill_no AS Relate_ApplyNo,
xk_patient_info.abo AS Blood_Type,
xk_patient_info.rh AS Rh_Blood_Type,
xk_patient_info.patient_name AS Sample_Name,
xk_patient_info.patient_sex AS Sex,
xk_patient_info.age AS Age,
xk_patient_info.patient_birthday AS Birthday,
'' AS Pick_Nurse,
'' AS Pick_Date,
'' AS Send_Nurse,
'' AS Send_Date,
'' AS TakeOver_Man,
'' AS TakeOver_Date,
'' AS Discard_Person,
'' AS Discard_Date,
'' AS Discard_Reason,
'' AS Exp2,
'' AS Overdue_Flag,
'' AS sendperson,
'1' AS sample_status,
xk_transfuse_apply_bloodbreed.blood_breed,
(select is_match from xk_blood_breed where xk_blood_breed.breed_code = xk_transfuse_apply_bloodbreed.blood_breed ) as is_match
FROM xk_transfuse_apply
LEFT JOIN xk_transfuse_apply_bloodbreed ON (xk_transfuse_apply.bill_no = xk_transfuse_apply_bloodbreed.bill_no)
INNER JOIN xk_patient_info ON (xk_transfuse_apply.beinhos_id = xk_patient_info.beinhos_id)
WHERE xk_transfuse_apply.isxxfh = '0'
and xk_transfuse_apply.apply_date Between #{stime} AND #{etime}
<if test="dept != null and dept != ''">AND (xk_transfuse_apply.dept_id = #{dept})</if>
<if test="sample_no != null and sample_no != ''">and (xk_transfuse_apply.bill_no = #{sample_no)}</if>
</select>
</mapper>

View File

@ -501,3 +501,10 @@ IF NOT EXISTS (SELECT 1 FROM sys.key_constraints WHERE name = 'PK_xk_transfuse_a
ALTER TABLE xk_transfuse_apply_bloodbreed ADD CONSTRAINT PK_xk_transfuse_apply_bloodbreed PRIMARY KEY CLUSTERED (bill_no,blood_breed);
END
GO
if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'xk_transfuse_apply' AND COLUMN_NAME = 'check_date')
BEGIN
alter table xk_transfuse_apply add check_date datetime
END
GO