输血申请单保存业务,审核业务,查询业务
This commit is contained in:
parent
4f00d8fa84
commit
49cd553f51
@ -132,6 +132,13 @@ public class BloodCommonController extends BaseController {
|
||||
return getDataTable(sysUserList);
|
||||
}
|
||||
|
||||
@ApiOperation("获取员工的部门类型")
|
||||
@GetMapping("/getDeptType")
|
||||
public String getDeptType(String userId){
|
||||
SysUser userInfo = bloodBankUtil.getUserInfo(userId);
|
||||
return BloodBankUtil.isBank(userInfo.getDept().getDeptType());
|
||||
}
|
||||
|
||||
// @ApiOperation("测试接口")
|
||||
// @GetMapping("/test01")
|
||||
// public Result test01(String billNo){
|
||||
|
||||
@ -76,7 +76,7 @@
|
||||
<if test="operation_level != null">operation_level,</if>
|
||||
<if test="card_no != null">card_no,</if>
|
||||
|
||||
bill_no, beinhos_id, assess_bill_no, hos_id
|
||||
bill_no, beinhos_id, hos_id
|
||||
)values (
|
||||
<if test="beinhos_number != null">#{beinhos_number},</if>
|
||||
<if test="zone_id != null">#{zone_id},</if>
|
||||
@ -150,7 +150,7 @@
|
||||
<if test="operation_level != null">#{operation_level},</if>
|
||||
<if test="card_no != null">#{card_no},</if>
|
||||
|
||||
#{bill_no}, #{beinhos_id}, #{assess_bill_no}, #{hos_id})
|
||||
#{bill_no}, #{beinhos_id}, #{hos_id})
|
||||
</insert>
|
||||
<update id="update">
|
||||
update xk_transfuse_apply
|
||||
|
||||
@ -105,7 +105,7 @@ public class TransfuseApplyController extends BaseController {
|
||||
@Log(title = BloodSysLogConstants.LOG_TYPE_TRANSFUSE_APPLY, businessType = BusinessType.CHECK_MEDIC)
|
||||
@ApiOperation("上级医生审核")
|
||||
@PostMapping("/applyMedicCheck")
|
||||
public Result applyMedicCheck(CheckMedicVO checkMedicVO){
|
||||
public Result applyMedicCheck(@RequestBody CheckMedicVO checkMedicVO){
|
||||
return transfuseApplyService.applyMedicCheck(checkMedicVO);
|
||||
}
|
||||
|
||||
@ -118,10 +118,10 @@ public class TransfuseApplyController extends BaseController {
|
||||
return getDataTable(xkXtwhIllDiagnoseList);
|
||||
}
|
||||
|
||||
@Log(title = BloodSysLogConstants.LOG_TYPE_TRANSFUSE_APPLY, businessType = BusinessType.CHECK)
|
||||
|
||||
@ApiOperation("申请单审核前校验")
|
||||
@PostMapping("/applyCheck")
|
||||
public Result applyPreCheck(ApplyCheckVO applyCheckVO){
|
||||
public Result applyPreCheck(@RequestBody ApplyCheckVO applyCheckVO){
|
||||
applyCheckVO.setUserId(getUsername());
|
||||
return transfuseApplyService.applyPreCheck(applyCheckVO);
|
||||
}
|
||||
@ -129,9 +129,16 @@ public class TransfuseApplyController extends BaseController {
|
||||
@Log(title = BloodSysLogConstants.LOG_TYPE_TRANSFUSE_APPLY, businessType = BusinessType.UNCHECK_MEDIC)
|
||||
@ApiOperation("取消上级医生审核")
|
||||
@PostMapping("/cancelApplyMedicCheck")
|
||||
public Result cancelApplyMedicCheck(CheckMedicVO checkMedicVO){
|
||||
public Result cancelApplyMedicCheck(@RequestBody CheckMedicVO checkMedicVO){
|
||||
return transfuseApplyService.cancelApplyMedicCheck(checkMedicVO);
|
||||
}
|
||||
|
||||
@ApiOperation("取消申请单审核")
|
||||
@PostMapping("/cancelApplyCheck")
|
||||
public Result cancelApplyCheck(){
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -21,4 +21,12 @@ public class TransfuseApplyVO {
|
||||
private String bill_no;
|
||||
@ApiModelProperty("操作用户")
|
||||
private String user_id;
|
||||
@ApiModelProperty("查询的病人ID")
|
||||
private String beinhos_id;
|
||||
@ApiModelProperty("病人姓名")
|
||||
private String patient_name;
|
||||
@ApiModelProperty("查询的申请开始时间")
|
||||
private String stime;
|
||||
@ApiModelProperty("查询的申请结束时间")
|
||||
private String etime;
|
||||
}
|
||||
|
||||
@ -124,6 +124,7 @@ public class TransfuseApplyServiceImpl implements TransfuseApplyService {
|
||||
//xkTransfuseApply.setDept_Type(""); //这个前端传吧,而且是必填的
|
||||
xkTransfuseApply.setValid_Flag("Y"); //默认是合理的
|
||||
xkTransfuseApply.setNotice_yn("N");
|
||||
xkTransfuseApply.setBill_sort("N");
|
||||
xkTransfuseApply.setAssess_bill_no(xkTransfuseApplyBefore.getBill_no()); //输血评估单号
|
||||
xkPatientInfoSet.setPatient_name(xkPatientInfo.getPatient_name());
|
||||
xkPatientInfoSet.setPatient_sex(xkPatientInfo.getPatient_sex());
|
||||
@ -293,7 +294,7 @@ public class TransfuseApplyServiceImpl implements TransfuseApplyService {
|
||||
* 暂时就以大量用血审批表来做判断吧,有大量用血的审批,标志为Y,否则为N
|
||||
* String spyxlParam = bloodBankUtil.getParameterValue("spyxl");
|
||||
*/
|
||||
if(code.equals("0")){
|
||||
if(!code.equals("0")){
|
||||
xkTransfuseApply.setIs_large_use("Y");
|
||||
}else{
|
||||
xkTransfuseApply.setIs_large_use("N");
|
||||
@ -418,16 +419,16 @@ public class TransfuseApplyServiceImpl implements TransfuseApplyService {
|
||||
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);
|
||||
}
|
||||
// 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);
|
||||
// }
|
||||
/**
|
||||
* 下面是输血科审核的逻辑
|
||||
*/
|
||||
|
||||
@ -279,9 +279,6 @@ public class TransfuseApplyUtil {
|
||||
}else{
|
||||
//保存申请单信息表
|
||||
xkTransfuseApplyMapper.insert(xkTransfuseApply);
|
||||
for (XkTransfuseApplyBloodbreed xkTransfuseApplyBloodbreed : xkTransfuseApplyBloodbreedList) {
|
||||
xkTransfuseApplyBloodbreedMapper.insert(xkTransfuseApplyBloodbreed);
|
||||
}
|
||||
//保存申请单品种表
|
||||
for (XkTransfuseApplyBloodbreed xkTransfuseApplyBloodbreed : xkTransfuseApplyBloodbreedList) {
|
||||
xkTransfuseApplyBloodbreedMapper.insert(xkTransfuseApplyBloodbreed);
|
||||
@ -289,7 +286,7 @@ public class TransfuseApplyUtil {
|
||||
}
|
||||
|
||||
//保存输血指征表
|
||||
if(xkTransfuseApplyCausalisList.size() > 0){
|
||||
if(xkTransfuseApplyCausalisList != null && !xkTransfuseApplyCausalisList.isEmpty()){
|
||||
xkTransfuseApplyCausalisMapper.deleteByBillNo(xkTransfuseApplyCausalisList.get(0).getBill_No());
|
||||
for (XkTransfuseApplyCausalis xkTransfuseApplyCausalis : xkTransfuseApplyCausalisList) {
|
||||
xkTransfuseApplyCausalisMapper.insert(xkTransfuseApplyCausalis);
|
||||
@ -303,8 +300,11 @@ public class TransfuseApplyUtil {
|
||||
}
|
||||
|
||||
//大量用血申请单表
|
||||
xkTransfuseApplyApprovalMapper.delete(xkTransfuseApplyApproval.getBill_No());
|
||||
xkTransfuseApplyApprovalMapper.insert(xkTransfuseApplyApproval);
|
||||
if(xkTransfuseApplyApproval != null){
|
||||
xkTransfuseApplyApprovalMapper.delete(xkTransfuseApplyApproval.getBill_No());
|
||||
xkTransfuseApplyApprovalMapper.insert(xkTransfuseApplyApproval);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -19,9 +19,13 @@
|
||||
WHERE ( xk_transfuse_apply.operation_type = 'C' OR ISNULL(xk_transfuse_apply.operation_type,'') = '')
|
||||
and xk_transfuse_apply.apply_date > getdate() - #{day} and xk_transfuse_apply.hos_id = #{hos_id}
|
||||
<if test="bill_status != null and bill_status != ''">and xk_transfuse_apply.bill_stasus = #{bill_status}</if>
|
||||
<if test="dept_code != null and dept_code != ''">and xk_transfuse_apply.dept_id = #{dept_code}</if>
|
||||
<if test="bill_no != null and bill_no != ''">and xk_transfuse_apply.bill_no = #{bill_no}</if>
|
||||
<if test="dept_code != null and dept_code != ''">and (xk_transfuse_apply.dept_id = #{dept_code} or xk_transfuse_apply.input_dept = #{dept_code})</if>
|
||||
<if test="doctor_code != null and doctor_code != ''">and xk_transfuse_apply.apply_medic = #{doctor_code}</if>
|
||||
<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="stime != null"><![CDATA[and xk_transfuse_apply.apply_date >= #{stime}]]></if>
|
||||
<if test="etime != null"><![CDATA[and xk_transfuse_apply.apply_date <= #{etime}]]></if>
|
||||
</select>
|
||||
<select id="queryApplyOne" resultType="com.czblood.busDoctor.pojo.DTO.TransfuseApplyInfoOne">
|
||||
SELECT top 1 xk_patient_info.hos_id,
|
||||
|
||||
@ -494,3 +494,9 @@ if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'sys_
|
||||
alter table sys_dept add dept_type varchar(10)
|
||||
end
|
||||
go
|
||||
|
||||
IF NOT EXISTS (SELECT 1 FROM sys.key_constraints WHERE name = 'PK_xk_transfuse_apply_bloodbreed' AND type = 'PK' )
|
||||
BEGIN
|
||||
ALTER TABLE xk_transfuse_apply_bloodbreed ADD CONSTRAINT PK_xk_transfuse_apply_bloodbreed PRIMARY KEY CLUSTERED (bill_no,blood_breed);
|
||||
END
|
||||
GO
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user