浏览代码

预交金优化

lihong 1 年之前
父节点
当前提交
788b31ab0d

+ 7 - 7
src/main/java/cn/hnthyy/thmz/controller/zy/ZyDepositFileController.java

@@ -178,13 +178,6 @@ public class ZyDepositFileController {
                     return resultMap;
                 }
             } else if (ZyDepositFileStatusEnum.STRAIGHT_BACK.code.equals(zyDepositFile.getStatus())) {
-                String ipAddress = HttpUtil.getIPAddress(httpServletRequest);
-                windowsDb = windowsService.queryLastWindowsIpAddress(ipAddress);
-                if (windowsDb == null || StringUtils.isBlank(windowsDb.getMisPosRouterCode())) {
-                    resultMap.put("code", -1);
-                    resultMap.put("message", "您暂未配置只能POS机的【路由识别码】,请配置完后重试!");
-                    return resultMap;
-                }
                 dbZyDepositFile = zyDepositFileService.queryZyDepositFileByReceiptNo(zyDepositFile.getReceiptNo());
                 if (dbZyDepositFile == null) {
                     resultMap.put("code", -1);
@@ -214,6 +207,13 @@ public class ZyDepositFileController {
             }
             zyDepositFileService.saveZyDepositFile(zyDepositFile);
             if (isPos && StringUtils.isNotBlank(windowsDb.getMisPosRouterCode())) {
+                String ipAddress = HttpUtil.getIPAddress(httpServletRequest);
+                windowsDb = windowsService.queryLastWindowsIpAddress(ipAddress);
+                if (windowsDb == null || StringUtils.isBlank(windowsDb.getMisPosRouterCode())) {
+                    resultMap.put("code", -1);
+                    resultMap.put("message", "您暂未配置只能POS机的【路由识别码】,请配置完后重试!");
+                    return resultMap;
+                }
                 String lsOrderNo = dbZyDepositFile.getPsordnum() + "_" + dbZyDepositFile.getDepoAmount().toString();
                 JSONObject jsonObject = transactionService.refund(windowsDb.getMisPosRouterCode(), BigDecimal.ZERO.subtract(zyDepositFile.getDepoAmount()), lsOrderNo, null, dbZyDepositFile.getDepoType(), dbZyDepositFile.getParChannel(), dbZyDepositFile.getPsordnum(), dbZyDepositFile.getTransDate(), dbZyDepositFile.getAgtordnum());
                 if (jsonObject == null) {

+ 3 - 0
src/main/resources/static/js/zy/hospitalized.js

@@ -674,6 +674,9 @@ function saveZyActpatient() {
                 });
                 printWristStrap();
                 clearInput();
+                if(confirm("是否跳转预交金处理页面?")){
+                    changeContent("/thmz/accepting")
+                }
             } else {
                 new PNotify({
                     title: '错误提示',