瀏覽代碼

优化互联网平台发票打印问题

hurugang 2 年之前
父節點
當前提交
b206e70b99

+ 3 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzReceiptSerialServiceImpl.java

@@ -127,6 +127,9 @@ public class MzReceiptSerialServiceImpl implements MzReceiptSerialService {
     @Override
     @Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, timeout = 36000, rollbackFor = Exception.class)
     public String printReceiptSerial(MzReceiptSerial mzReceiptSerial, User user) throws MzException {
+        if(Constants.HLWYY_CODE.equals(mzReceiptSerial.getOperatorId())){
+            throw new MzException("互联网医院平台缴费无法在门诊窗口打印发票,请让患者联系互联网医院平台!");
+        }
         Receipt receipt = receiptMapper.selectByUserIdCode(user.getUserIdCode());
         if (receipt == null || StringUtils.isBlank(receipt.getReceiptCurrent())) {
             throw new MzException("用户id=" + user.getUserName() + "没有可用的门诊发票,请先维护发票。");

+ 3 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzyReqrecServiceImpl.java

@@ -599,6 +599,9 @@ public class MzyReqrecServiceImpl implements MzyReqrecService {
     @Override
     @Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT, timeout = 36000, rollbackFor = Exception.class)
     public int printMzyReqrecRecept(MzyReqrec mzyReqrec) throws MzException {
+        if(Constants.HLWYY_CODE.equals(mzyReqrec.getOpId())){
+            throw new MzException("互联网医院平台挂号无法在门诊窗口打印发票,请让患者联系互联网医院平台!");
+        }
         //有时候发票打印失败,需要补打,补打不增加发票号码
         boolean isReprint = StringUtils.isNotBlank(mzyReqrec.getReceiptBill()) && mzyReqrec.getReceiptBill().trim().length() == 8;
         MzyReqrec newMzyReqrec = new MzyReqrec();