From 962d1b2fb12dd90a661748c952825b8cebdcb35d Mon Sep 17 00:00:00 2001 From: zjh <zjh@888> Date: 星期四, 13 六月 2024 16:22:29 +0800 Subject: [PATCH] zjh 本地 2024/06/13 --2 --- ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiMethod.java | 88 +++++++++++++++++++++++++++++++------------- 1 files changed, 62 insertions(+), 26 deletions(-) diff --git a/ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiMethod.java b/ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiMethod.java index 85157ab..0524d57 100644 --- a/ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiMethod.java +++ b/ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiMethod.java @@ -63,7 +63,7 @@ //瀵规帴his鎬绘帴鍙� 娉ㄥ唽鎸傚彿鎺ヨ瘖鐢宠鍗曟搷浣� @Transactional - public void HisApiMethods(TjCustomer customer, Long orderId) { + public AjaxResult HisApiMethods(TjCustomer customer, Long orderId) { Date dates = new Date(); final String date = DateUtil.format(dates, "yyyy-MM-dd HH:mm:ss"); @@ -161,8 +161,10 @@ LambdaQueryWrapper<HisApiConfig> lambdaQueryWrapper = new LambdaQueryWrapper<>(); lambdaQueryWrapper.eq(HisApiConfig::getApiMethod, "Outpintestapply"); HisApiConfig hisApiConfig = hisApiConfigService.getOne(lambdaQueryWrapper); - hisApiGetMethodService.save(object4, "Outpintestapply", hisApiConfig); + hisApiGetMethodService.save(object4, "Outpintestapply", hisApiConfig,JSONUtil.toJsonStr(BeanUtil.beanToMap(dto))); + }else { + return AjaxResult.success(); } //闂ㄨ瘖妫�鏌ョ敵璇� OutpinexamapplyDto outpinexamapplyDto = new OutpinexamapplyDto(); @@ -218,8 +220,10 @@ LambdaQueryWrapper<HisApiConfig> lambdaQueryWrapper = new LambdaQueryWrapper<>(); lambdaQueryWrapper.eq(HisApiConfig::getApiMethod, "Outpinexamapply"); HisApiConfig hisApiConfig = hisApiConfigService.getOne(lambdaQueryWrapper); - hisApiGetMethodService.save(jsonObject, "Outpinexamapply", hisApiConfig); + hisApiGetMethodService.save(jsonObject, "Outpinexamapply", hisApiConfig,JSONUtil.toJsonStr(BeanUtil.beanToMap(outpinexamapplyDto))); + }else { + return AjaxResult.success(); } //闂ㄨ瘖娌荤枟澶勭疆鐢宠 @@ -274,21 +278,23 @@ map.put("cardId", customer.getCardId()); JSONObject jsonObject = JSONUtil.parseObj(map); LambdaQueryWrapper<HisApiConfig> lambdaQueryWrapper = new LambdaQueryWrapper<>(); - lambdaQueryWrapper.eq(HisApiConfig::getApiMethod, "Outpinmedapply"); + lambdaQueryWrapper.eq(HisApiConfig::getApiMethod, "Outpintreatapply"); HisApiConfig hisApiConfig = hisApiConfigService.getOne(lambdaQueryWrapper); - hisApiGetMethodService.save(jsonObject, "Outpinmedapply", hisApiConfig); - + hisApiGetMethodService.save(jsonObject, "Outpintreatapply", hisApiConfig,JSONUtil.toJsonStr(BeanUtil.beanToMap(dao))); + }else { + return AjaxResult.error(); } + return AjaxResult.success(); } } } - + return AjaxResult.error(); } //閫�璐瑰悗鍙栨秷鎺ヨ瘖浣滃簾鐢宠鍗曠瓑鎿嶄綔 @Transactional - public void ZfHisApiMethods(TjCustomer customer, TjOrder order) { + public boolean ZfHisApiMethods(TjCustomer customer, TjOrder order) { Date dates = new Date(); final String date = DateUtil.format(dates, "yyyy-MM-dd HH:mm:ss"); @@ -299,28 +305,58 @@ String zlsqdh = orderService.getHuoQuZlsqdh(order.getCardId()); - //浣滃簾闂ㄨ瘖妫�鏌ョ敵璇� - AjaxResult result = controller.Outpindelexamapply(order.getCardId(), "00029", jcsqdh); - String result1 = getAjaxResult(result); - JSONObject object = getJSONObject(result1); - String code = object.getStr("ResultCode"); - if (code.equals("0")) { - orderService.delHuoQuJcsqdh(order.getCardId()); + //2.1.6.5 浣滃簾闂ㄨ瘖妫�鏌ョ敵璇� + if (null !=jcsqdh){ + AjaxResult result = controller.Outpindelexamapply(order.getCardId(), "00029", jcsqdh); + String result1 = getAjaxResult(result); + JSONObject object = getJSONObject(result1); + String code = object.getStr("ResultCode"); + if (code.equals("0")) { + orderService.delHuoQuJcsqdh(order.getCardId()); + }else { + return false; + } } - //浣滃簾闂ㄨ瘖鐢宠 - AjaxResult ajaxResult = controller.Outpindeltestapply(order.getCardId(), "00029", jysqdh); - String result2 = getAjaxResult(ajaxResult); - JSONObject object1 = getJSONObject(result2); - String code1 = object1.getStr("ResultCode"); - if (code1.equals("0")) { - orderService.delHuoQuJysqdh(order.getCardId()); + + //2.1.6.3 浣滃簾闂ㄨ瘖妫�楠岀敵璇� + + AjaxResult ajaxResult =null; + String result2 =null; + JSONObject object1 =null; + String code1 =null; + + if(null !=jysqdh){ + ajaxResult = controller.Outpindeltestapply(order.getCardId(), "00029", jysqdh); + result2 = getAjaxResult(ajaxResult); + object1 = getJSONObject(result2); + code1 = object1.getStr("ResultCode"); + if (code1.equals("0")) { + orderService.delHuoQuJysqdh(order.getCardId()); + }else { + return false; + } } - controller.Outpinunconapply(order.getCardId(), date, "00029"); - - controller.Outpindelmedapply(order.getCardId(), "00029", zlsqdh); - + //2.1.6.9 浣滃簾闂ㄨ瘖娌荤枟澶勭疆鐢宠 + if(null !=zlsqdh){ + ajaxResult = controller.Outpintdelreatapply(order.getCardId(), "00029", zlsqdh); + result2 = getAjaxResult(ajaxResult); + object1 = getJSONObject(result2); + code1 = object1.getStr("ResultCode"); + if (!code1.equals("0")){ + return false; + } + } + //2.1.3 闂ㄨ瘖鍖荤敓鍙栨秷鎺ヨ瘖 + ajaxResult = controller.Outpinunconapply(order.getCardId(), date, "00029"); + result2 = getAjaxResult(ajaxResult); + object1 = getJSONObject(result2); + code1 = object1.getStr("ResultCode"); + if (!code1.equals("0")){ + return false; + } + return true; } -- Gitblit v1.8.0