|
@@ -135,6 +135,19 @@ public class MzyReqrecServiceImpl implements MzyReqrecService {
|
|
|
MzVisitTable newMzVisitTable = getMzVisitTable(mzyReqrecPageDto, mzyReqrec, mzPatientMi, windows, times, serialNo, now);
|
|
|
mzVisitTableMapper.insertMzVisitTable(newMzVisitTable);
|
|
|
fomartReqrec(mzyReqrec, mzPatientMi, windows, mzyZdChargeType, times, serialNo, now, mzyRequest);
|
|
|
+ BigDecimal tempFee =BigDecimal.ZERO;
|
|
|
+ if(mzyReqrec.getOthFee()!=null){
|
|
|
+ tempFee=tempFee.add(mzyReqrec.getOthFee());
|
|
|
+ }
|
|
|
+ if(mzyReqrec.getReqFee()!=null){
|
|
|
+ tempFee=tempFee.add(mzyReqrec.getReqFee());
|
|
|
+ }
|
|
|
+ if(mzyReqrec.getClinicFee()!=null){
|
|
|
+ tempFee=tempFee.add(mzyReqrec.getClinicFee());
|
|
|
+ }
|
|
|
+ if(tempFee.compareTo(mzyReqrecPageDto.getTotalFee())!=0){
|
|
|
+ throw new MzException("当前病人已经挂号失败,实缴费用与实际费用不一致!");
|
|
|
+ }
|
|
|
//不需要做重复挂号的校验id集合 ,只有入库的时候需要该参数
|
|
|
mzyReqrec.setCanRepeatedly((jsyChargeTypes.contains(mzyReqrec.getChargeType()) && patientIds.contains(mzyReqrec.getPatientId())) ? YesNoEnum.YES.code : YesNoEnum.NO.code);
|
|
|
int num = mzyReqrecMapper.insertMzyReqrec(mzyReqrec);
|
|
@@ -298,6 +311,18 @@ public class MzyReqrecServiceImpl implements MzyReqrecService {
|
|
|
return mzfzPatientOrder;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @param mzyReqrec 挂号对象
|
|
|
+ * @param mzPatientMi 门诊病人
|
|
|
+ * @param windows 窗口记录
|
|
|
+ * @param mzyZdChargeType 收费类型
|
|
|
+ * @param times 挂号次数
|
|
|
+ * @param serialNo 流水号
|
|
|
+ * @param now 当前时间
|
|
|
+ * @param mzyRequest 挂号记录
|
|
|
+ * @throws MzException
|
|
|
+ */
|
|
|
private void fomartReqrec(MzyReqrec mzyReqrec, MzPatientMi mzPatientMi, Windows windows, MzyZdChargeType mzyZdChargeType, int times, int serialNo, Date now, MzyRequest mzyRequest) throws MzException {
|
|
|
mzyReqrec.setTimes(times);
|
|
|
mzyReqrec.setName(mzPatientMi.getName());
|
|
@@ -325,9 +350,9 @@ public class MzyReqrecServiceImpl implements MzyReqrecService {
|
|
|
mzyReqrec.setReqFee(BigDecimal.ZERO);
|
|
|
} else {
|
|
|
BigDecimal checkFee=BigDecimal.ZERO;
|
|
|
- if(mzyRequest.getCheckFee()!=null){
|
|
|
- checkFee=mzyRequest.getCheckFee();
|
|
|
- }
|
|
|
+// if(mzyRequest.getCheckFee()!=null){
|
|
|
+// checkFee=mzyRequest.getCheckFee();
|
|
|
+// }
|
|
|
if(mzyZdChargeType.getOthFee()!=null){
|
|
|
checkFee=checkFee.add(mzyZdChargeType.getOthFee());
|
|
|
}
|