自助开单界面

This commit is contained in:
jiangs 2026-03-10 18:04:19 +08:00
parent 4b9bb812f9
commit 2e0a7064f6
12 changed files with 377 additions and 17 deletions

View File

@ -0,0 +1,58 @@
package com.transitPlatForm.common.core.domain.entity.reg;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RegApply {
private String PatId;
private String PatCardType;
private String PatCardNo;
private String PatType;
private String RegNo;
private String PatName;
private String PatSex;
private String PatAge;
private String AgeUnit;
private String PatAgeShow;
private Date PatBirthday;
private String PatIdentity;
private String Phone;
private String Address;
private String PatFeeType;
private String DepartCode;
private String DepartName;
private String AreaCode;
private String AreaName;
private String PatBed;
private String DiagnosisCode;
private String DiagnosisName;
private String ReciNumber;
private String DoctorCode;
private String DoctorName;
private Date OrderTime;
private String ExecDeptCode;
private String ExecDeptName;
private String SrcHospCode;
private String SrcHospName;
private BigDecimal Amount;
private String ChargeState;
private String PatInvoiceNum;
private String UserCode;
private String UserName;
private String DataSource;
private String create_by;
private Date create_time;
private String update_by;
private Date update_time;
/**
* 状态 0.正常,1 作废
*/
private String Status;
}

View File

@ -0,0 +1,27 @@
package com.transitPlatForm.common.core.domain.entity.reg;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RegApplyDetail {
private String applyid;
private BigDecimal OrderItemSerial;
private String OrderItemCode;
private String OrderItemName;
private String SampleTypeCode;
private String SampleTypeName;
private String BodyCode;
private String BodyName;
private String create_by;
private Date create_time;
private String update_by;
private Date update_time;
private String DataSource;
}

View File

@ -0,0 +1,39 @@
package com.transitPlatForm.common.core.domain.entity.reg;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RegItem {
private String itemcode;
private String itemname;
private String itemclass;
private String xmlb;
private BigDecimal dj;
private BigDecimal dj1;
private BigDecimal dj2;
private BigDecimal dj3;
private BigDecimal dj4;
private String zjf;
private Integer bgts;
private String yblx;
private String bz;
private Integer bglqdh;
private String spec;
private String dept;
/**
* 状态
* 0正常,1停用
*/
private String Status;
private String create_by;
private Date create_time;
private String update_by;
private Date update_time;
}

View File

@ -0,0 +1,47 @@
package com.transitPlatForm.transitPF.controller;
import com.transitPlatForm.common.core.controller.BaseController;
import com.transitPlatForm.common.core.domain.Result;
import com.transitPlatForm.transitPF.pojo.DTO.RegRequestInfoDTO;
import com.transitPlatForm.transitPF.service.RegRequestInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 自助开单界面
*/
@Api(tags = "自助开单界面")
@RestController
@RequestMapping("/regRequestInfo")
@Slf4j
public class RegRequestInfoController extends BaseController {
@Autowired
private RegRequestInfoService regRequestInfoService;
@ApiOperation("查询申请单信息")
@GetMapping("/queryRegRequestInfo")
public Result queryRegRequestInfo(RegRequestInfoDTO regRequestInfoDTO) {
return regRequestInfoService.queryRegRequestInfo(regRequestInfoDTO);
}
@ApiOperation("获取病人明细信息")
@GetMapping("/queryReqDetail")
public Result queryReqDetail(String applyId){
return regRequestInfoService.queryReqDetail(applyId);
}
@ApiOperation("开单项目信息")
@GetMapping("/getItemInfo")
public Result getItemInfo(){
return regRequestInfoService.getItemInfo();
}
}

View File

@ -0,0 +1,16 @@
package com.transitPlatForm.transitPF.mapper;
import com.transitPlatForm.common.core.domain.entity.reg.RegApply;
import com.transitPlatForm.common.core.domain.entity.reg.RegApplyDetail;
import com.transitPlatForm.common.core.domain.entity.reg.RegItem;
import com.transitPlatForm.transitPF.pojo.DTO.RegRequestInfoDTO;
import java.util.List;
public interface RegRequestInfoMapper {
List<RegApply> queryRegRequestInfo(RegRequestInfoDTO regRequestInfoDTO);
List<RegApplyDetail> queryReqDetail(String applyId);
List<RegItem> getItemInfo();
}

View File

@ -0,0 +1,18 @@
package com.transitPlatForm.transitPF.pojo.DTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RegRequestInfoDTO {
private String patId;
private String brxm;
private String status;
private Date begdate;
private Date enddate;
}

View File

@ -34,4 +34,10 @@ public class SampleSignVO {
private String sendUserCode;
@ApiModelProperty(value = "标本送出人姓名")
private String sendUserName;
@ApiModelProperty(value = "标本签收时间")
private Date signTime;
@ApiModelProperty(value = "标本签收人代码")
private String signUserCode;
@ApiModelProperty(value = "标本签收人姓名")
private String signUserName;
}

View File

@ -0,0 +1,15 @@
package com.transitPlatForm.transitPF.pojo.VO;
import com.transitPlatForm.common.core.domain.entity.reg.RegTransitSample;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class RequestInfoVO {
private List<RegTransitSample> regTransitSampleList;
}

View File

@ -0,0 +1,12 @@
package com.transitPlatForm.transitPF.service;
import com.transitPlatForm.common.core.domain.Result;
import com.transitPlatForm.transitPF.pojo.DTO.RegRequestInfoDTO;
public interface RegRequestInfoService {
Result queryRegRequestInfo(RegRequestInfoDTO regRequestInfoDTO);
Result queryReqDetail(String applyId);
Result getItemInfo();
}

View File

@ -4,6 +4,7 @@ import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.transitPlatForm.common.core.domain.Result;
import com.transitPlatForm.interfaceCommon.utils.CommonUtil;
import com.transitPlatForm.transitPF.mapper.RegTransitSampleMapper;
import com.transitPlatForm.transitPF.pojo.DTO.SampleSignVO;
import com.transitPlatForm.common.core.domain.entity.reg.RegTransitSample;
@ -20,6 +21,8 @@ import java.util.List;
public class RegInterfaceImpl {
@Autowired
RegTransitSampleMapper regTransitSampleMapper;
@Autowired
private CommonUtil commonUtil;
/**
*{
@ -133,9 +136,8 @@ public class RegInterfaceImpl {
JSONObject jsonObject = JSONUtil.parseObj(jsonStr);
SampleSignVO sampleSignVO = jsonObject.getJSONObject("req").getJSONObject("param").toBean(SampleSignVO.class);
List<String> barcodeList = sampleSignVO.getBarcode();
Date sendPackTime = sampleSignVO.getSendPackTime();
String sendUserCode = sampleSignVO.getSendUserCode();
String sendUserName = sampleSignVO.getSendUserName();
String statusParam = sampleSignVO.getStatus();
//状态判断
for (String barcode : barcodeList) {
RegTransitSample regTransitSample1 = new RegTransitSample();
@ -143,21 +145,70 @@ public class RegInterfaceImpl {
List<RegTransitSample> regTransitSampleList = regTransitSampleMapper.getRegTransitSample(regTransitSample1);
if(regTransitSampleList.size() <= 0) return new Result("-1","没有查到该标本的信息!");
String status = regTransitSampleList.get(0).getStatus();
if(Integer.parseInt(status) >= 30) return new Result("-1","该标本已经送检!");
RegTransitSample regTransitSample = new RegTransitSample();
regTransitSample.setBarcode(barcode);
regTransitSample.setSendUserCode(sendUserCode);
regTransitSample.setSendUserName(sendUserName);
try{
regTransitSample.setSendPackTime(sendPackTime);
}catch (Exception e){
e.printStackTrace();
return new Result("-1","日期时间格式不正确!");
}
regTransitSample.setStatus("30");
regTransitSampleMapper.updateRegTransitSample(regTransitSample);
}
switch (statusParam){
case "20": //标本采集
if(Integer.parseInt(status) >= 20) continue;//return new Result("0","该标本已经采集!");
String affirmUserCode = sampleSignVO.getAffirmUserCode();
String affirmUserName = sampleSignVO.getAffirmUserName();
Date affirmTime = sampleSignVO.getAffirmTime();
if(affirmUserCode == null || affirmUserCode.equals("")) return new Result("-1","affirmUserCode标本采集人员不能为空!");
if(affirmUserName == null || affirmUserName.equals("")) return new Result("-1","affirmUserName标本采集人员姓名不能为空!");
if(affirmTime == null) return new Result("-1","affirmTime标本采集时间不能为空!");
RegTransitSample regTransitSample20 = new RegTransitSample();
regTransitSample20.setBarcode(barcode);
regTransitSample20.setAffirmTime(affirmTime);
regTransitSample20.setAffirmUserCode(affirmUserCode);
regTransitSample20.setAffirmUserName(affirmUserName);
regTransitSample20.setStatus("20");
regTransitSampleMapper.updateRegTransitSample(regTransitSample20);
case "30": //标本送检
Date sendPackTime = sampleSignVO.getSendPackTime();
String sendUserCode = sampleSignVO.getSendUserCode();
String sendUserName = sampleSignVO.getSendUserName();
if(Integer.parseInt(status) >= 30) continue;//return new Result("0","该标本已经送检!");
if(sendUserCode == null || sendUserCode.equals("")) return new Result("-1","sendUserCode标本送检人员不能为空!");
if(sendUserName == null || sendUserName.equals("")) return new Result("-1","sendUserName标本送检人员姓名不能为空!");
if(sendPackTime == null) return new Result("-1","sendPackTime标本送检时间不能为空!");
RegTransitSample regTransitSample = new RegTransitSample();
regTransitSample.setBarcode(barcode);
regTransitSample.setSendUserCode(sendUserCode);
regTransitSample.setSendUserName(sendUserName);
try{
regTransitSample.setSendPackTime(sendPackTime);
}catch (Exception e){
e.printStackTrace();
return new Result("-1","日期时间格式不正确!");
}
regTransitSample.setStatus("30");
regTransitSampleMapper.updateRegTransitSample(regTransitSample);
break;
case "40": //标本外送
break;
case "50": //标本签收
Date signTime = sampleSignVO.getSignTime();
String signUserName = sampleSignVO.getSignUserName();
String signUserCode = sampleSignVO.getSignUserCode();
if(signTime == null) return new Result("-1","signTime标本签收时间不能为空!");
if(signUserName == null || signUserName.equals("")) return new Result("-1","signUserName标本签收人员姓名不能为空!");
if(signUserCode == null || signUserCode.equals("")) return new Result("-1","signUserCode标本签收人员不能为空!");
if(Integer.parseInt(status) > 50) continue;//return new Result("0","该标本已经签收!");
RegTransitSample regTransitSample50 = new RegTransitSample();
regTransitSample50.setBarcode(barcode);
regTransitSample50.setSignInTime(signTime);
regTransitSample50.setSignInUserCode(signUserCode);
regTransitSample50.setSignInUserName(signUserName);
regTransitSample50.setStatus("50");
regTransitSampleMapper.updateRegTransitSample(regTransitSample50);
break;
case "60": //上机检测
break;
}
}
}catch (Exception e){
e.printStackTrace();
log.error("json格式不合法",e);

View File

@ -0,0 +1,50 @@
package com.transitPlatForm.transitPF.service.impl;
import com.transitPlatForm.common.core.domain.Result;
import com.transitPlatForm.common.core.domain.entity.reg.RegApply;
import com.transitPlatForm.common.core.domain.entity.reg.RegApplyDetail;
import com.transitPlatForm.common.core.domain.entity.reg.RegItem;
import com.transitPlatForm.transitPF.mapper.RegRequestInfoMapper;
import com.transitPlatForm.transitPF.pojo.DTO.RegRequestInfoDTO;
import com.transitPlatForm.transitPF.service.RegRequestInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
@Slf4j
public class RegRequestInfoServiceImpl implements RegRequestInfoService {
@Autowired
RegRequestInfoMapper regRequestInfoMapper;
/**
* 获取申请单列表
* @param regRequestInfoDTO
* @return
*/
@Override
public Result queryRegRequestInfo(RegRequestInfoDTO regRequestInfoDTO) {
List<RegApply> regApplyList = regRequestInfoMapper.queryRegRequestInfo(regRequestInfoDTO);
return new Result("0","查询成功!",regApplyList);
}
/**
* 获取明细信息
* @param applyId
* @return
*/
@Override
public Result queryReqDetail(String applyId) {
List<RegApplyDetail> regApplyDetailList = regRequestInfoMapper.queryReqDetail(applyId);
return new Result("0","查询成功!",regApplyDetailList);
}
@Override
public Result getItemInfo() {
List<RegItem> regItemList = regRequestInfoMapper.getItemInfo();
return new Result("0","查询成功!",regItemList);
}
}

View File

@ -0,0 +1,21 @@
<?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.transitPlatForm.transitPF.mapper.RegRequestInfoMapper">
<select id="queryRegRequestInfo" resultType="com.transitPlatForm.common.core.domain.entity.reg.RegApply">
<![CDATA[select * from reg_apply where OrderTime >= #{begdate} and OrderTime <= #{enddate} ]]>
<if test="patId != null and patId != ''"> and PatId = #{patId}</if>
<if test="brxm != null and brxm != ''">and PatName like '%'+brxm+'%'</if>
<if test="status != null and status != ''">and Status = #{status}</if>
</select>
<select id="queryReqDetail" resultType="com.transitPlatForm.common.core.domain.entity.reg.RegApplyDetail">
select * from reg_apply_detail where applyid = #{applyId}
</select>
<select id="getItemInfo" resultType="com.transitPlatForm.common.core.domain.entity.reg.RegItem">
select * from reg_item where Status = '1'
</select>
</mapper>