|
@@ -6,7 +6,7 @@ import cn.hnthyy.thmz.common.Constants;
|
|
|
import cn.hnthyy.thmz.common.SpringUtil;
|
|
|
import cn.hnthyy.thmz.entity.MzException;
|
|
|
import cn.hnthyy.thmz.entity.his.*;
|
|
|
-import cn.hnthyy.thmz.entity.thmz.PayInfo;
|
|
|
+import cn.hnthyy.thmz.entity.thmz.ReceiptSerialFee;
|
|
|
import cn.hnthyy.thmz.entity.thmz.Windows;
|
|
|
import cn.hnthyy.thmz.enums.*;
|
|
|
import cn.hnthyy.thmz.mapper.his.*;
|
|
@@ -310,7 +310,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
formatPriceRoundDetail(mzChargeDetail, mzChargeDetails, mzPatientMi, mzChargeDetailList, maxOrderNo, itemNo, receiptNo);
|
|
|
//yes 预览需要将原数据库中已存在的明细与临时生成的一起返回
|
|
|
if (YesNoEnum.YES.equals(yesNo)) {
|
|
|
- for (MzChargeDetail mcd:mzChargeDetailList){
|
|
|
+ for (MzChargeDetail mcd : mzChargeDetailList) {
|
|
|
mcd.setReceiptNo(receiptNo);
|
|
|
mzChargeDetails.add(mcd);
|
|
|
}
|
|
@@ -417,19 +417,20 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
//实际应付金额 四舍五入后的值 收费员收的钱小数点后只有一位有效值
|
|
|
BigDecimal totalPayableRound = totalPayable.setScale(1, BigDecimal.ROUND_HALF_UP);
|
|
|
//单病种收费不设置金额,所以自动设置金额
|
|
|
- if(Constants.DBZJF_CODE.equals(opId)){
|
|
|
+ if (Constants.DBZJF_CODE.equals(opId)) {
|
|
|
mzDepositFileVo.getMzDepositFiles().get(0).setAmount(totalPayableRound);
|
|
|
}
|
|
|
Date now = new Date();
|
|
|
int serialNo = mzSerialNoService.getSerialNo();
|
|
|
MzReceiptSerial mzReceiptSerial = new MzReceiptSerial();
|
|
|
+ ReceiptSerialFee receiptSerialFee = new ReceiptSerialFee();
|
|
|
//实际支付金额 收银员收的钱
|
|
|
- BigDecimal hadPayable = getHadPayable(opId, mzDepositFileVo, windows, mzPatientMi, feeMap, now, serialNo, mzReceiptSerial, receiptNo);
|
|
|
+ BigDecimal hadPayable = getHadPayable(opId, mzDepositFileVo, windows, mzPatientMi, feeMap, now, serialNo, mzReceiptSerial, receiptNo, receiptSerialFee);
|
|
|
if (hadPayable.compareTo(totalPayableRound) != 0) {
|
|
|
throw new MzException("收款金额有误,实际应付" + totalPayableRound.toString() + "元,实收" + hadPayable.toString() + "元,患者处方有修改,请重新刷当前病人收费数据");
|
|
|
}
|
|
|
getMzChargeDetailService().updateChargeFlag(opId, mzDepositFileVo.getPatientId(), mzDepositFileVo.getTimes(), mzPatientMi.getName(), mzChargeDetailList, now, serialNo, mzReceiptSerial.getChequeType(), null);
|
|
|
- getMzChargeDetailService().afterChargeFee(mzDepositFileVo.getPatientId(), mzDepositFileVo.getTimes(), mzDepositFileVo.getMzDepositFiles(), now, serialNo, mzReceiptSerial, totalPayable);
|
|
|
+ getMzChargeDetailService().afterChargeFee(mzDepositFileVo.getPatientId(), mzDepositFileVo.getTimes(), mzDepositFileVo.getMzDepositFiles(), now, serialNo, mzReceiptSerial, totalPayable, receiptSerialFee);
|
|
|
if (Constants.JZ_IC_CARD.equals(mzPatientMi.getIcCardNo())) {
|
|
|
mzChargeDetailMapper.updateNameByPatientIdAndTimes(mzPatientMi.getName(), mzDepositFileVo.getPatientId(), mzDepositFileVo.getTimes());
|
|
|
}
|
|
@@ -451,7 +452,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
*/
|
|
|
@Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, timeout = 36000, rollbackFor = Exception.class)
|
|
|
@Override
|
|
|
- public void afterChargeFee(String patientId, Integer times, List<MzDepositFile> mzDepositFiles, Date now, int serialNo, MzReceiptSerial mzReceiptSerial, BigDecimal totalPayable) throws MzException {
|
|
|
+ public void afterChargeFee(String patientId, Integer times, List<MzDepositFile> mzDepositFiles, Date now, int serialNo, MzReceiptSerial mzReceiptSerial, BigDecimal totalPayable, ReceiptSerialFee receiptSerialFee) throws MzException {
|
|
|
if (mzDepositFileMapper.selectBySameParams(mzDepositFiles.get(0)) > 0) {
|
|
|
throw new MzException("当前病人本次处方已经成功缴费,无需重复缴费");
|
|
|
}
|
|
@@ -462,36 +463,25 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
mzYjReqService.modifyMzYjReq(updateMzYjReq);
|
|
|
//新增收费方式记录
|
|
|
mzDepositFileMapper.batchInsertMzDepositFile(mzDepositFiles);
|
|
|
- mzReceiptSerialMapper.insertMzReceiptSerial(mzReceiptSerial);
|
|
|
+ if (mzReceiptSerial.getTotalCharge().compareTo(BigDecimal.ZERO) == 1) {
|
|
|
+ mzReceiptSerialMapper.insertMzReceiptSerial(mzReceiptSerial);
|
|
|
+ }
|
|
|
//本院记账金额
|
|
|
- BigDecimal byjzAmount = totalPayable.subtract(mzReceiptSerial.getTotalCharge());
|
|
|
- if (byjzAmount.compareTo(BigDecimal.ZERO) == 1) {
|
|
|
- byjzAmount = byjzAmount.setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
+ if (receiptSerialFee.getByjzje() != null && receiptSerialFee.getByjzje().compareTo(BigDecimal.ZERO) == 1) {
|
|
|
MzReceiptSerial jzMzReceiptSerial = CloneUtil.clone(mzReceiptSerial);
|
|
|
- jzMzReceiptSerial.setCharge1(BigDecimal.ZERO);
|
|
|
- jzMzReceiptSerial.setCharge2(BigDecimal.ZERO);
|
|
|
- jzMzReceiptSerial.setCharge3(BigDecimal.ZERO);
|
|
|
- jzMzReceiptSerial.setCharge4(BigDecimal.ZERO);
|
|
|
- jzMzReceiptSerial.setCharge5(BigDecimal.ZERO);
|
|
|
- jzMzReceiptSerial.setCharge6(BigDecimal.ZERO);
|
|
|
- jzMzReceiptSerial.setCharge7(BigDecimal.ZERO);
|
|
|
- jzMzReceiptSerial.setCharge8(BigDecimal.ZERO);
|
|
|
- jzMzReceiptSerial.setCharge9(BigDecimal.ZERO);
|
|
|
- jzMzReceiptSerial.setCharge10(BigDecimal.ZERO);
|
|
|
- jzMzReceiptSerial.setCharge11(BigDecimal.ZERO);
|
|
|
- jzMzReceiptSerial.setCharge12(BigDecimal.ZERO);
|
|
|
- jzMzReceiptSerial.setCharge13(BigDecimal.ZERO);
|
|
|
- jzMzReceiptSerial.setCharge14(BigDecimal.ZERO);
|
|
|
- jzMzReceiptSerial.setCharge15(BigDecimal.ZERO);
|
|
|
- jzMzReceiptSerial.setCharge16(BigDecimal.ZERO);
|
|
|
- jzMzReceiptSerial.setCharge17(BigDecimal.ZERO);
|
|
|
- jzMzReceiptSerial.setCharge18(BigDecimal.ZERO);
|
|
|
- jzMzReceiptSerial.setCharge19(BigDecimal.ZERO);
|
|
|
- jzMzReceiptSerial.setCharge20(BigDecimal.ZERO);
|
|
|
- jzMzReceiptSerial.setTotalCharge(byjzAmount);
|
|
|
+ resetParams(jzMzReceiptSerial);
|
|
|
+ jzMzReceiptSerial.setTotalCharge(receiptSerialFee.getByjzje());
|
|
|
jzMzReceiptSerial.setChequeType(Constants.BYJZ);
|
|
|
mzReceiptSerialMapper.insertMzReceiptSerial(jzMzReceiptSerial);
|
|
|
}
|
|
|
+ //医保记账金额
|
|
|
+ if (receiptSerialFee.getYbjzje() != null && receiptSerialFee.getYbjzje().compareTo(BigDecimal.ZERO) == 1) {
|
|
|
+ MzReceiptSerial jzMzReceiptSerial = CloneUtil.clone(mzReceiptSerial);
|
|
|
+ resetParams(jzMzReceiptSerial);
|
|
|
+ jzMzReceiptSerial.setTotalCharge(receiptSerialFee.getYbjzje());
|
|
|
+ jzMzReceiptSerial.setChequeType(Constants.YBJZ);
|
|
|
+ mzReceiptSerialMapper.insertMzReceiptSerial(jzMzReceiptSerial);
|
|
|
+ }
|
|
|
MzVisitTable newMzVisitTable = new MzVisitTable();
|
|
|
newMzVisitTable.setPatientId(patientId);
|
|
|
newMzVisitTable.setTimes(times);
|
|
@@ -501,6 +491,29 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
mzVisitTableMapper.updateMzVisitTable(newMzVisitTable);
|
|
|
}
|
|
|
|
|
|
+ private void resetParams(MzReceiptSerial jzMzReceiptSerial) {
|
|
|
+ jzMzReceiptSerial.setCharge1(BigDecimal.ZERO);
|
|
|
+ jzMzReceiptSerial.setCharge2(BigDecimal.ZERO);
|
|
|
+ jzMzReceiptSerial.setCharge3(BigDecimal.ZERO);
|
|
|
+ jzMzReceiptSerial.setCharge4(BigDecimal.ZERO);
|
|
|
+ jzMzReceiptSerial.setCharge5(BigDecimal.ZERO);
|
|
|
+ jzMzReceiptSerial.setCharge6(BigDecimal.ZERO);
|
|
|
+ jzMzReceiptSerial.setCharge7(BigDecimal.ZERO);
|
|
|
+ jzMzReceiptSerial.setCharge8(BigDecimal.ZERO);
|
|
|
+ jzMzReceiptSerial.setCharge9(BigDecimal.ZERO);
|
|
|
+ jzMzReceiptSerial.setCharge10(BigDecimal.ZERO);
|
|
|
+ jzMzReceiptSerial.setCharge11(BigDecimal.ZERO);
|
|
|
+ jzMzReceiptSerial.setCharge12(BigDecimal.ZERO);
|
|
|
+ jzMzReceiptSerial.setCharge13(BigDecimal.ZERO);
|
|
|
+ jzMzReceiptSerial.setCharge14(BigDecimal.ZERO);
|
|
|
+ jzMzReceiptSerial.setCharge15(BigDecimal.ZERO);
|
|
|
+ jzMzReceiptSerial.setCharge16(BigDecimal.ZERO);
|
|
|
+ jzMzReceiptSerial.setCharge17(BigDecimal.ZERO);
|
|
|
+ jzMzReceiptSerial.setCharge18(BigDecimal.ZERO);
|
|
|
+ jzMzReceiptSerial.setCharge19(BigDecimal.ZERO);
|
|
|
+ jzMzReceiptSerial.setCharge20(BigDecimal.ZERO);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
@Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, timeout = 36000, rollbackFor = Exception.class)
|
|
|
public int chargeFeeForByjz(String opId, MzDepositFileVo mzDepositFileVo) throws MzException {
|
|
@@ -1036,12 +1049,12 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
List<MzChargeDetail> mzChargeDetails = getNewListForRefundFee(opId, mzDepositFileVo, YesNoEnum.YES);
|
|
|
//是否全退
|
|
|
boolean allRefund = mzChargeDetails == null || mzChargeDetails.size() == 0;
|
|
|
- MzChargeDetailYb mzChargeDetailYb = new MzChargeDetailYb();
|
|
|
+ MzChargeDetailYb mzChargeDetailYb = new MzChargeDetailYb();
|
|
|
mzChargeDetailYb.setPatientId(mzDepositFileVo.getPatientId());
|
|
|
mzChargeDetailYb.setTimes(mzDepositFileVo.getTimes());
|
|
|
mzChargeDetailYb.setReceiptNo(mzDepositFileVo.getReceiptNo());
|
|
|
int count = mzChargeDetailYbMapper.selectTmCount(mzChargeDetailYb);
|
|
|
- if(count>0 && !allRefund){
|
|
|
+ if (count > 0 && !allRefund) {
|
|
|
throw new MzException("退费失败,特门收费必须全退!");
|
|
|
}
|
|
|
List<String> chargeItemCodeList = mzChargeDetails.stream().filter(u -> StringUtils.isNotBlank(u.getChargeItemCode())).map(u -> u.getChargeItemCode()).collect(Collectors.toList());
|
|
@@ -1076,9 +1089,9 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
//新增收费方式记录
|
|
|
mzDepositFileMapper.batchInsertMzDepositFile(fullNewMzDepositFiles);
|
|
|
times = 0;
|
|
|
- if(count>0){
|
|
|
+ if (count > 0) {
|
|
|
//PayInfo result=
|
|
|
- tsmzService.retractFees(opId, mzChargeDetailYb.getPatientId(),mzChargeDetailYb.getTimes(),mzChargeDetailYb.getReceiptNo());
|
|
|
+ tsmzService.retractFees(opId, mzChargeDetailYb.getPatientId(), mzChargeDetailYb.getTimes(), mzChargeDetailYb.getReceiptNo());
|
|
|
}
|
|
|
} else {
|
|
|
times = mzChargeDetails.get(0).getTimes();
|
|
@@ -1123,6 +1136,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
//实际应付金额
|
|
|
BigDecimal totalPayable = getTotalPayable(mzChargeDetails, feeMap);
|
|
|
MzReceiptSerial mzReceiptSerial = new MzReceiptSerial();
|
|
|
+ ReceiptSerialFee receiptSerialFee = new ReceiptSerialFee();
|
|
|
//退费后新的收款方式
|
|
|
List<MzDepositFile> newMzDepositFiles = new ArrayList<>();
|
|
|
String payWay = Constants.CASH;
|
|
@@ -1131,9 +1145,9 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
MzPatientMi mzPatientMi = mzPatientMiService.queryByPatientId(mzDepositFileVo.getPatientId());
|
|
|
mzDepositFileVo.setMzDepositFiles(newMzDepositFiles);
|
|
|
mzDepositFileVo.setTimes(times);
|
|
|
- getHadPayable(opId, mzDepositFileVo, windows, mzPatientMi, feeMap, now, serialNo, mzReceiptSerial, 1);
|
|
|
+ getHadPayable(opId, mzDepositFileVo, windows, mzPatientMi, feeMap, now, serialNo, mzReceiptSerial, 1, receiptSerialFee);
|
|
|
getMzChargeDetailService().updateChargeFlag(opId, mzDepositFileVo.getPatientId(), times, mzChargeDetails.get(0).getName(), mzChargeDetails, now, serialNo, payWay, mzDepositFileVo.getTimes());
|
|
|
- getMzChargeDetailService().afterChargeFee(mzDepositFileVo.getPatientId(), times, fullNewMzDepositFiles, now, serialNo, mzReceiptSerial, totalPayable);
|
|
|
+ getMzChargeDetailService().afterChargeFee(mzDepositFileVo.getPatientId(), times, fullNewMzDepositFiles, now, serialNo, mzReceiptSerial, totalPayable, receiptSerialFee);
|
|
|
MzPatientMi updateMzPatientMi = new MzPatientMi();
|
|
|
updateMzPatientMi.setPatientId(mzDepositFileVo.getPatientId());
|
|
|
updateMzPatientMi.setTimes(times);
|
|
@@ -1190,6 +1204,8 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
mz.setCharge20(BigDecimal.ZERO.subtract(mz.getCharge20()));
|
|
|
if (Constants.BYJZ.equals(mz.getChequeType())) {
|
|
|
mz.setChequeType(Constants.BYJZ);
|
|
|
+ }else if (Constants.YBJZ.equals(mz.getChequeType())) {
|
|
|
+ mz.setChequeType(Constants.YBJZ);
|
|
|
} else {
|
|
|
mz.setChequeType(Constants.CASH);
|
|
|
}
|
|
@@ -1692,13 +1708,16 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
* @param mzReceiptSerial
|
|
|
* @return
|
|
|
*/
|
|
|
- private BigDecimal getHadPayable(String opId, MzDepositFileVo mzDepositFileVo, Windows windows, MzPatientMi mzPatientMi, Map<String, BigDecimal> feeMap, Date now, int serialNo, MzReceiptSerial mzReceiptSerial, Integer receiptNo) {
|
|
|
- boolean isBenYuanJiZhang = true;
|
|
|
+ private BigDecimal getHadPayable(String opId, MzDepositFileVo mzDepositFileVo, Windows windows, MzPatientMi mzPatientMi, Map<String, BigDecimal> feeMap, Date now, int serialNo, MzReceiptSerial mzReceiptSerial, Integer receiptNo, ReceiptSerialFee receiptSerialFee) {
|
|
|
String chequeType = null;
|
|
|
//总收款金额
|
|
|
BigDecimal hadPayable = BigDecimal.ZERO;
|
|
|
- //排除本院记账的金额
|
|
|
+ //排除记账的金额
|
|
|
BigDecimal excludeByjzPay = BigDecimal.ZERO;
|
|
|
+ //本院记账的金额
|
|
|
+ BigDecimal byjzje = BigDecimal.ZERO;
|
|
|
+ //医保记账的金额
|
|
|
+ BigDecimal ybjzje = BigDecimal.ZERO;
|
|
|
for (MzDepositFile m : mzDepositFileVo.getMzDepositFiles()) {
|
|
|
if (m.getPatientId() == null) {
|
|
|
//此时是直接收费,需要设置相关参数
|
|
@@ -1719,14 +1738,22 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
if (chequeType == null) {
|
|
|
chequeType = Constants.BYJZ;
|
|
|
}
|
|
|
+ byjzje = byjzje.add(m.getAmount());
|
|
|
+ } else if (Constants.YBJZ.equals(m.getChequeType())) {
|
|
|
+ if (chequeType == null) {
|
|
|
+ chequeType = Constants.YBJZ;
|
|
|
+ }
|
|
|
+ ybjzje = ybjzje.add(m.getAmount());
|
|
|
} else {
|
|
|
- isBenYuanJiZhang = false;
|
|
|
excludeByjzPay = excludeByjzPay.add(m.getAmount());
|
|
|
chequeType = m.getChequeType();
|
|
|
}
|
|
|
}
|
|
|
+ receiptSerialFee.setZfTotalPayable(excludeByjzPay.setScale(2, BigDecimal.ROUND_FLOOR));
|
|
|
+ receiptSerialFee.setByjzje(byjzje.setScale(2, BigDecimal.ROUND_FLOOR));
|
|
|
+ receiptSerialFee.setYbjzje(ybjzje.setScale(2, BigDecimal.ROUND_FLOOR));
|
|
|
hadPayable.setScale(2, BigDecimal.ROUND_FLOOR);
|
|
|
- setMzReceiptSerial(opId, mzDepositFileVo.getPatientId(), mzDepositFileVo.getTimes(), windows, mzPatientMi.getResponseType(), feeMap, now, serialNo, mzReceiptSerial, chequeType, isBenYuanJiZhang ? hadPayable : excludeByjzPay, receiptNo);
|
|
|
+ setMzReceiptSerial(opId, mzDepositFileVo.getPatientId(), mzDepositFileVo.getTimes(), windows, mzPatientMi.getResponseType(), feeMap, now, serialNo, mzReceiptSerial, chequeType, receiptSerialFee, receiptNo);
|
|
|
return hadPayable;
|
|
|
}
|
|
|
|
|
@@ -1743,9 +1770,9 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
* @param serialNo
|
|
|
* @param mzReceiptSerial
|
|
|
* @param chequeType
|
|
|
- * @param hadPayable
|
|
|
+ * @param receiptSerialFee
|
|
|
*/
|
|
|
- private void setMzReceiptSerial(String opId, String patientId, Integer times, Windows windows, String responseType, Map<String, BigDecimal> feeMap, Date now, int serialNo, MzReceiptSerial mzReceiptSerial, String chequeType, BigDecimal hadPayable, Integer receiptNo) {
|
|
|
+ private void setMzReceiptSerial(String opId, String patientId, Integer times, Windows windows, String responseType, Map<String, BigDecimal> feeMap, Date now, int serialNo, MzReceiptSerial mzReceiptSerial, String chequeType, ReceiptSerialFee receiptSerialFee, Integer receiptNo) {
|
|
|
mzReceiptSerial.setPatientId(patientId);
|
|
|
mzReceiptSerial.setTimes(times);
|
|
|
mzReceiptSerial.setReceiptNo(receiptNo);
|
|
@@ -1773,7 +1800,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
mzReceiptSerial.setCharge19(feeMap.get(Constants.MZF) == null ? BigDecimal.ZERO : feeMap.get(Constants.MZF).setScale(2, BigDecimal.ROUND_HALF_UP));
|
|
|
mzReceiptSerial.setCharge20(feeMap.get(Constants.SSWRF) == null ? BigDecimal.ZERO : feeMap.get(Constants.SSWRF).setScale(2, BigDecimal.ROUND_HALF_UP));
|
|
|
mzReceiptSerial.setPayMark(PayMarkEnum.CHARGED.code);
|
|
|
- mzReceiptSerial.setTotalCharge(hadPayable);
|
|
|
+ mzReceiptSerial.setTotalCharge(receiptSerialFee.getZfTotalPayable());
|
|
|
mzReceiptSerial.setChargeDate(now);
|
|
|
mzReceiptSerial.setChequeType(chequeType);
|
|
|
mzReceiptSerial.setReceiptSn(serialNo);
|
|
@@ -2107,9 +2134,9 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
newMzChargeDetail.setPatientId(mzChargeDetail.getPatientId());
|
|
|
newMzChargeDetail.setTimes(mzChargeDetail.getTimes());
|
|
|
newMzChargeDetail.setReceiptNo(receiptNo);
|
|
|
- if(mzYjReq.getOrderNo()!=null && mzYjReq.getOrderNo()>0){
|
|
|
+ if (mzYjReq.getOrderNo() != null && mzYjReq.getOrderNo() > 0) {
|
|
|
newMzChargeDetail.setOrderNo(mzYjReq.getOrderNo());
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
newMzChargeDetail.setOrderNo(maxOrderNo);
|
|
|
}
|
|
|
newMzChargeDetail.setItemNo(itemNo++);
|
|
@@ -2188,9 +2215,9 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
newMzChargeDetail.setPatientId(mzChargeDetail.getPatientId());
|
|
|
newMzChargeDetail.setTimes(mzChargeDetail.getTimes());
|
|
|
newMzChargeDetail.setReceiptNo(receiptNo);
|
|
|
- if(mzYjReq.getOrderNo()!=null && mzYjReq.getOrderNo()>0){
|
|
|
+ if (mzYjReq.getOrderNo() != null && mzYjReq.getOrderNo() > 0) {
|
|
|
newMzChargeDetail.setOrderNo(mzYjReq.getOrderNo());
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
newMzChargeDetail.setOrderNo(maxOrderNo);
|
|
|
}
|
|
|
newMzChargeDetail.setItemNo(itemNo++);
|
|
@@ -2341,9 +2368,9 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
newMzChargeDetail.setPatientId(mzChargeDetail.getPatientId());
|
|
|
newMzChargeDetail.setTimes(mzChargeDetail.getTimes());
|
|
|
newMzChargeDetail.setReceiptNo(receiptNo);
|
|
|
- if(mzYjReq.getOrderNo()!=null && mzYjReq.getOrderNo()>0){
|
|
|
+ if (mzYjReq.getOrderNo() != null && mzYjReq.getOrderNo() > 0) {
|
|
|
newMzChargeDetail.setOrderNo(mzYjReq.getOrderNo());
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
newMzChargeDetail.setOrderNo(maxOrderNo);
|
|
|
}
|
|
|
newMzChargeDetail.setItemNo(itemNo++);
|
|
@@ -2424,9 +2451,9 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
newMzChargeDetail.setPatientId(mzChargeDetail.getPatientId());
|
|
|
newMzChargeDetail.setTimes(mzChargeDetail.getTimes());
|
|
|
newMzChargeDetail.setReceiptNo(receiptNo);
|
|
|
- if(mzYjReq.getOrderNo()!=null && mzYjReq.getOrderNo()>0){
|
|
|
+ if (mzYjReq.getOrderNo() != null && mzYjReq.getOrderNo() > 0) {
|
|
|
newMzChargeDetail.setOrderNo(mzYjReq.getOrderNo());
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
newMzChargeDetail.setOrderNo(maxOrderNo);
|
|
|
}
|
|
|
newMzChargeDetail.setItemNo(itemNo++);
|
|
@@ -2483,4 +2510,5 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
|
|
|
private MzChargeDetailService getMzChargeDetailService() {
|
|
|
return SpringUtil.getBean(this.getClass());
|
|
|
}
|
|
|
+
|
|
|
}
|