临床发血,打印模版界面

This commit is contained in:
jiangs 2026-08-25 17:34:52 +08:00
parent 71abe9d30d
commit aab8ed58b0
11 changed files with 237 additions and 10 deletions

View File

@ -2,9 +2,12 @@ package com.czblood.bus.mapper.xtwh;
import com.czblood.bus.pojo.xtwh.XkReportTemplate;
import java.util.List;
public interface XkReportTemplateMapper {
void insert(XkReportTemplate xkReportTemplate);
void update(XkReportTemplate xkReportTemplate);
XkReportTemplate queryOne(String reportNo);
void deleteByReportNo(String reportNo);
List<XkReportTemplate> queryList(XkReportTemplate xkReportTemplate);
}

View File

@ -1,5 +1,7 @@
package com.czblood.bus.pojo.xtwh;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@ -9,11 +11,22 @@ import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("打印模版表")
public class XkReportTemplate {
private String report_id;
@ApiModelProperty("打印模版编号")
private String report_no;
@ApiModelProperty("打印模版名称")
private String report_name;
@ApiModelProperty("打印模版大小")
private String report_size;
@ApiModelProperty("创建时间")
private Date create_time;
@ApiModelProperty("更新时间")
private Date update_time;
private Date create_time_s;
private Date create_time_e;
private Date update_time_s;
private Date update_time_e;
}

View File

@ -8,6 +8,7 @@
<if test="take_person != null">take_person,</if>
<if test="handle_person != null">handle_person,</if>
<if test="apply_no != null">apply_no,</if>
<if test="match_no != null">match_no,</if>
<if test="patient_name != null">patient_name,</if>
<if test="beinhos_id != null">beinhos_id,</if>
<if test="dept_id != null">dept_id,</if>
@ -35,6 +36,7 @@
<if test="take_person != null">#{take_person},</if>
<if test="handle_person != null">#{handle_person},</if>
<if test="apply_no != null">#{apply_no},</if>
<if test="match_no != null">#{match_no},</if>
<if test="patient_name != null">#{patient_name},</if>
<if test="beinhos_id != null">#{beinhos_id},</if>
<if test="dept_id != null">#{dept_id},</if>

View File

@ -20,4 +20,13 @@
<select id="queryOne" resultType="com.czblood.bus.pojo.xtwh.XkReportTemplate">
select * from xk_report_template
</select>
<select id="queryList" resultType="com.czblood.bus.pojo.xtwh.XkReportTemplate">
select * from xk_report_template
<where>
<if test="report_no != null">and report_no = #{report_no}</if>
<if test="report_name != null">and report_name = #{report_name}</if>
<if test="create_time != null">and create_time between #{create_time_s} and #{create_time_e}</if>
<if test="update_time != null">and update_time between #{update_time_s} and #{update_time_e}</if>
</where>
</select>
</mapper>

View File

@ -1,11 +1,45 @@
package com.czblood.busBloodbank.controller.xtwh;
import com.czblood.bus.pojo.xtwh.XkReportTemplate;
import com.czblood.busBloodbank.service.XkReportTemplateService;
import com.czblood.common.core.domain.Result;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@Api(tags = "打印模版维护")
@RestController
@RequestMapping("/bus/bloodbank/xkReportTemplate")
public class XkReportTemplateController {
@Resource
XkReportTemplateService xkReportTemplateService;
@ApiOperation("查询列表")
@PostMapping("/queryList")
public Result queryList(@RequestBody XkReportTemplate xkReportTemplate){
return xkReportTemplateService.queryList(xkReportTemplate);
}
@ApiOperation("新增模版")
@PostMapping("/add")
public Result add(@RequestBody XkReportTemplate xkReportTemplate){
return xkReportTemplateService.add(xkReportTemplate);
}
@ApiOperation("更新模版")
@PostMapping("/update")
public Result update(@RequestBody XkReportTemplate xkReportTemplate){
return xkReportTemplateService.update(xkReportTemplate);
}
@ApiOperation("删除模版")
@GetMapping("/delete")
public Result delete(String reportNo){
return xkReportTemplateService.delete(reportNo);
}
}

View File

@ -24,5 +24,6 @@ public interface BloodOutMapper {
List<Map<String,Object>> queryList(BloodOutQueryVO bloodOutQueryVO);
List<Map<String,Object>> queryStockInfo(String applyNo);
List<Map<String,Object>> queryMoreBloodOutList(BloodOutMoreQueryVO bloodOutMoreQueryVO);
List<Map<String,Object>> queryApplyInfoOne(String billNo);
}

View File

@ -1,5 +1,6 @@
package com.czblood.busBloodbank.pojo.DTO;
import com.czblood.bus.pojo.XkOutMain;
import com.czblood.bus.pojo.XkTransfuseApplyBloodbreed;
import lombok.AllArgsConstructor;
import lombok.Data;
@ -15,4 +16,5 @@ public class BloodOutDTO {
List<Map<String,Object>> applyInfoList;
List<XkTransfuseApplyBloodbreed> xkTransfuseApplyBloodbreedList;
List<Map<String,Object>> stockInfoList;
XkOutMain xkOutMain;
}

View File

@ -1,4 +1,11 @@
package com.czblood.busBloodbank.service;
import com.czblood.bus.pojo.xtwh.XkReportTemplate;
import com.czblood.common.core.domain.Result;
public interface XkReportTemplateService {
Result queryList(XkReportTemplate xkReportTemplate);
Result add(XkReportTemplate xkReportTemplate);
Result update(XkReportTemplate xkReportTemplate);
Result delete(String reportNo);
}

View File

@ -146,6 +146,7 @@ public class BloodOutServiceImpl implements BloodOutService {
if(xkTransfuseApply == null) return new Result("-1","没有获取到申请单信息,请检查!");
String newBillNo = "";
if(!bModify){
//新增
//如果上面没有取到,可能是不需要进行交叉配血的申请单,直接从血型复核当中取checkNo
if(checkNo.equals("")) checkNo = BloodBankUtil.isBank(bloodOutMapper.queryMaxCheckNo(applyNo));
xkOutMain.setMatch_no(matchNo);
@ -156,7 +157,7 @@ public class BloodOutServiceImpl implements BloodOutService {
xkOutMain.setBill_sort("C"); //程序默认C 了 。。。
xkOutMain.setIs_free_account("N");
xkOutMain.setAll_recycle_sign("N");
//新增
newBillNo = bloodBankUtil.produceBillNo("FXD");
xkOutMain.setBill_no(newBillNo);
for (XkOutDetail xkOutDetail : xkOutDetailList) {
@ -267,7 +268,7 @@ public class BloodOutServiceImpl implements BloodOutService {
return new Result("0","审核成功");
}
@Override
@Override
public Result notifyMessage(String billNo) {
notifyBloodOut(billNo);
return new Result("0","通知成功");
@ -299,9 +300,10 @@ public class BloodOutServiceImpl implements BloodOutService {
XkOutMain xkOutMain = xkOutMainMapper.queryOne(billNo);
if(xkOutMain == null) return new Result("-1","该单据不存在!");
String applyNo = xkOutMain.getApply_no();
List<Map<String, Object>> applyInfoList = bloodOutMapper.queryApplyInfo(applyNo);
List<Map<String, Object>> applyInfoList = bloodOutMapper.queryApplyInfoOne(billNo);
BloodOutDTO bloodOutDTO = new BloodOutDTO();
bloodOutDTO.setApplyInfoList(applyInfoList);
bloodOutDTO.setXkOutMain(xkOutMain);
List<XkTransfuseApplyBloodbreed> xkTransfuseApplyBloodbreedList = xkTransfuseApplyBloodbreedMapper.queryOne(applyNo);
bloodOutDTO.setXkTransfuseApplyBloodbreedList(xkTransfuseApplyBloodbreedList);
List<Map<String, Object>> queryStockInfoList = bloodOutMapper.queryStockInfo(applyNo);
@ -411,7 +413,7 @@ public class BloodOutServiceImpl implements BloodOutService {
public Result checkMatcheBlood(XkBloodInfo xkBloodInfo,String applyNo,BloodOutInfoDTO bloodOutInfoDTO){
String bloodBreed = xkBloodInfo.getBlood_breed();
XkBloodBreed xkBloodBreed = xkBloodBreedMapper.queryOne(bloodBreed);
String isMatch = xkBloodBreed.getIs_match();
String isMatch = BloodBankUtil.isBank(xkBloodBreed.getIs_match());
if(isMatch.equals("Y")){
//所选择的血液需要进行配血
List<Map<String,Object>> matchBloodList = bloodOutMapper.queryMatchBloodInfo(xkBloodInfo.getBlood_no(), xkBloodInfo.getProduct_no(), applyNo);
@ -436,9 +438,11 @@ public class BloodOutServiceImpl implements BloodOutService {
//标本采集时间与发血的时间间隔,当标本采集时间与发血时间的间隔大于本参数时进行相应的操作,参数值为正数,天数
String overstepDay = bloodBankUtil.getParameterValue("overstep_day");
Date pickDate = DateUtil.offsetDay(maxPickDate, Integer.parseInt(overstepDay));
Date currentTimeDate = bloodBankUtil.getCurrentTimeDate();
if(pickDate.compareTo(currentTimeDate) <= 0){
return new Result("-1","标本时间已经超过了设定的有效天数,不可以继续操作!");
if(pickDate != null){
Date currentTimeDate = bloodBankUtil.getCurrentTimeDate();
if(pickDate.compareTo(currentTimeDate) <= 0){
return new Result("-1","标本时间已经超过了设定的有效天数,不可以继续操作!");
}
}
return new Result("0","操作成功");
}
@ -453,6 +457,6 @@ public class BloodOutServiceImpl implements BloodOutService {
xkOutMainTemp.setExp2("Y");
xkOutMainTemp.setNotify_time(bloodBankUtil.getCurrentTimeDate());
xkOutMainTemp.setBill_no(billNo);
xkOutMainMapper.insert(xkOutMainTemp);
xkOutMainMapper.update(xkOutMainTemp);
}
}

View File

@ -1,8 +1,42 @@
package com.czblood.busBloodbank.service.impl;
import com.czblood.bus.mapper.xtwh.XkReportTemplateMapper;
import com.czblood.bus.pojo.xtwh.XkReportTemplate;
import com.czblood.busBloodbank.service.XkReportTemplateService;
import com.czblood.common.core.domain.Result;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
@Service
public class XkReportTemplateServiceImpl implements XkReportTemplateService {
@Resource
XkReportTemplateMapper xkReportTemplateMapper;
@Override
public Result queryList(XkReportTemplate xkReportTemplate) {
List<XkReportTemplate> xkReportTemplateList = xkReportTemplateMapper.queryList(xkReportTemplate);
return new Result("0","查询成功!",xkReportTemplateList);
}
@Override
public Result add(XkReportTemplate xkReportTemplate) {
xkReportTemplateMapper.insert(xkReportTemplate);
return new Result("0","新增数据成功!");
}
@Override
public Result update(XkReportTemplate xkReportTemplate) {
xkReportTemplateMapper.update(xkReportTemplate);
return new Result("0","修改成功!");
}
@Override
public Result delete(String reportNo) {
xkReportTemplateMapper.deleteByReportNo(reportNo);
return new Result("0","删除成功!");
}
}

View File

@ -275,4 +275,122 @@
xk_match_main.beinhos_id,
xk_transfuse_apply.patient_bed,xk_blood_info.unit,xk_blood_info.blood_breed
</select>
<select id="queryApplyInfoOne" resultType="java.util.Map">
SELECT xk_patient_info.patient_name,
xk_patient_info.age,
xk_patient_info.patient_sex,
xk_transfuse_apply.bill_no,
xk_patient_info.transfuse_history,
xk_patient_info.gestation_history,
xk_patient_info.parturition_history,
xk_patient_info.reaction_history,
xk_patient_info.match_history,
xk_transfuse_apply.apply_date,
xk_transfuse_apply.abo_type,
xk_transfuse_apply.rh_type,
xk_transfuse_apply.diagnoses,
xk_transfuse_apply.intent,
xk_transfuse_apply.apply_type,
xk_transfuse_apply.zone_id,
xk_transfuse_apply.use3_date,
xk_transfuse_apply.use2_date,
xk_transfuse_apply.use1_date,
xk_transfuse_apply.beinhos_id,
xk_transfuse_apply.dept_id,
xk_transfuse_apply.patient_bed,
xk_transfuse_apply.bill_stasus,
xk_check_bloodtype.affirm_abo,
xk_check_bloodtype.check_rh,
xk_check_bloodtype.affirm_antibody,
xk_check_bloodtype.Sub_Blood,
xk_out_main.bill_no as out_bill_no,
xk_out_main.check_sign
FROM xk_patient_info RIGHT OUTER JOIN xk_transfuse_apply ON xk_patient_info.beinhos_id = xk_transfuse_apply.beinhos_id,
xk_check_bloodtype,xk_out_main
WHERE
( xk_transfuse_apply.bill_no = xk_check_bloodtype.apply_no ) and
( xk_transfuse_apply.bill_no = xk_out_main.apply_no) AND
( xk_out_main.bill_no = #{billNo}) AND
( xk_transfuse_apply.bill_sort = 'B') AND
( xk_transfuse_apply.operation_type = 'C' OR isnull(xk_transfuse_apply.operation_type,'') = '')
union
SELECT xk_patient_info.patient_name,
xk_patient_info.age,
xk_patient_info.patient_sex,
xk_transfuse_apply.bill_no,
xk_patient_info.transfuse_history,
xk_patient_info.gestation_history,
xk_patient_info.parturition_history,
xk_patient_info.reaction_history,
xk_patient_info.match_history,
xk_transfuse_apply.apply_date,
xk_transfuse_apply.abo_type,
xk_transfuse_apply.rh_type,
xk_transfuse_apply.diagnoses,
xk_transfuse_apply.intent,
xk_transfuse_apply.apply_type,
xk_transfuse_apply.zone_id,
xk_transfuse_apply.use3_date,
xk_transfuse_apply.use2_date,
xk_transfuse_apply.use1_date,
xk_transfuse_apply.beinhos_id,
xk_transfuse_apply.dept_id,
xk_transfuse_apply.patient_bed,
xk_transfuse_apply.bill_stasus,
space(4) affirm_abo,
space(4) check_rh,
space(8) affirm_antibody,
space(8) Sub_Blood,
xk_out_main.bill_no as out_bill_no,
xk_out_main.check_sign
FROM xk_patient_info RIGHT OUTER JOIN xk_transfuse_apply ON xk_patient_info.beinhos_id = xk_transfuse_apply.beinhos_id,
xk_out_main
WHERE
( xk_transfuse_apply.bill_no = xk_out_main.apply_no) AND
( xk_out_main.bill_no = #{billNo}) AND
( xk_transfuse_apply.bill_sort = 'C')AND
( xk_transfuse_apply.operation_type = 'C' OR isnull(xk_transfuse_apply.operation_type,'') = '')
union
SELECT xk_patient_info.patient_name,
xk_patient_info.age,
xk_patient_info.patient_sex,
xk_transfuse_apply.bill_no,
xk_patient_info.transfuse_history,
xk_patient_info.gestation_history,
xk_patient_info.parturition_history,
xk_patient_info.reaction_history,
xk_patient_info.match_history,
xk_transfuse_apply.apply_date,
xk_transfuse_apply.abo_type,
xk_transfuse_apply.rh_type,
xk_transfuse_apply.diagnoses,
xk_transfuse_apply.intent,
xk_transfuse_apply.apply_type,
xk_transfuse_apply.zone_id,
xk_transfuse_apply.use3_date,
xk_transfuse_apply.use2_date,
xk_transfuse_apply.use1_date,
xk_transfuse_apply.beinhos_id,
xk_transfuse_apply.dept_id,
xk_transfuse_apply.patient_bed,
xk_transfuse_apply.bill_stasus,
xk_check_bloodtype.affirm_abo,
xk_check_bloodtype.check_rh,
xk_check_bloodtype.affirm_antibody ,
xk_check_bloodtype.Sub_Blood,
xk_out_main.bill_no as out_bill_no,
xk_out_main.check_sign
FROM xk_patient_info RIGHT OUTER JOIN xk_transfuse_apply ON xk_patient_info.beinhos_id = xk_transfuse_apply.beinhos_id,
xk_check_bloodtype,xk_out_main
WHERE
( xk_transfuse_apply.bill_no = xk_check_bloodtype.apply_no ) and
( xk_transfuse_apply.bill_sort = 'A')AND
( xk_transfuse_apply.operation_type = 'C' OR isnull(xk_transfuse_apply.operation_type,'') = '')AND
( xk_transfuse_apply.bill_no = xk_out_main.apply_no) AND
( xk_out_main.bill_no = #{billNo})
</select>
</mapper>