zjh
2024-06-19 6d09f4ac6ee4718acd131f234f24ad1ac3c2ce3c
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjOrderController.java
@@ -1035,11 +1035,18 @@
            /*调用his接口*/
            String config = configService.selectConfigByKey("sfkqdyhis");
            if(null !=config && config.equals("Y")){
                hisApiMethod.HisApiMethods(tjCustomer,tjOrder.getOrderId());
                AjaxResult result = hisApiMethod.HisApiMethods(tjCustomer, tjOrder.getOrderId());
                if(!result.get("code").toString().equals("200")){
                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                    return AjaxResult.error("挂号失败!"+result.get("msg").toString());
                }
            }else {
            tjCustomer.setCardId("0");
            tjCustomerService.updateById(tjCustomer);
            transitionService.updateCardIdByTjNumAndIdCard(tjCustomer.getCusIdcard(),tjOrder.getTjNumber(),tjOrder.getTjNumber());
            tjOrder.setCardId(tjOrder.getTjNumber());
             tjOrderService.updateById(tjOrder);
            }
//            tjCustomer.setCardId("0");
//            tjCustomerService.updateById(tjCustomer);
            return AjaxResult.success(tjNumber);
        }
        return AjaxResult.error();
@@ -2328,7 +2335,7 @@
        if (null != order) {
            String payByTjNum = tjOrderService.isPayByTjNum(String.valueOf(order.getOrderId()));
            if (null != payByTjNum) {
                return AjaxResult.success("该用户已收费不可撤销签到!");
                return AjaxResult.error("该用户已收费不可撤销签到!");
            }
            tjOrderService.deleteTjOrderByOrderId(order.getOrderId());
            tjOrderDetailService.deleteTjOrderDetailByOrderDetailId(String.valueOf(order.getOrderId()));
@@ -2336,6 +2343,11 @@
            tjFlowingWaterService.deleteTjFlowingWaterByOrderId(String.valueOf(order.getOrderId()));
            transitionService.deletedTbTransitionByTjNum(tjNum);
            transitionService.updateTbTransitionByTjNum(tjNum);
            TjCustomer customer = tjCustomerService.getById(order.getUserId());
            if(null !=customer){
                customer.setCardId("0");
                tjCustomerService.updateById(customer);
            }
            String configByKey = configService.selectConfigByKey("sfkqdyhis");
            if (configByKey.equals("Y")){
                HashMap<String, Object> map = new HashMap<>();