From 1ea4e6b1fce036ba234c9f21c69e9fd68649abb2 Mon Sep 17 00:00:00 2001 From: zjh <zjh@888> Date: 星期三, 05 六月 2024 18:45:22 +0800 Subject: [PATCH] zjh 本地 2024/06/05 --2 --- ltkj-admin/src/main/java/com/ltkj/web/controller/his/HisApiMethod.java | 51 +++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 43 insertions(+), 8 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 b3f55ee..dfc1860 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 @@ -1,7 +1,6 @@ package com.ltkj.web.controller.his; - import cn.hutool.core.date.DateUtil; import cn.hutool.json.JSONArray; import cn.hutool.json.JSONObject; @@ -10,6 +9,7 @@ import com.ltkj.common.core.domain.AjaxResult; import com.ltkj.common.utils.SecurityUtils; import com.ltkj.hosp.domain.TjCustomer; +import com.ltkj.hosp.domain.TjOrder; import com.ltkj.hosp.domain.TjOrderDetail; import com.ltkj.hosp.domain.TjProject; import com.ltkj.hosp.hisDto.OutpinexamapplyDto; @@ -59,10 +59,10 @@ return result.get("data").toString(); } - //瀵规帴his鎬绘帴鍙� + //瀵规帴his鎬绘帴鍙� 娉ㄥ唽鎸傚彿鎺ヨ瘖鐢宠鍗曟搷浣� @Transactional public void HisApiMethods(TjCustomer customer, Long orderId) { - HisApiGetMethodService hisApiGetMethodService=new HisApiGetMethodService(); + HisApiGetMethodService hisApiGetMethodService = new HisApiGetMethodService(); Date dates = new Date(); final String date = DateUtil.format(dates, "yyyy-MM-dd HH:mm:ss"); @@ -147,9 +147,11 @@ String code3 = object3.getStr("ResultCode"); if (code3.equals("0")) { Map<String, Object> datas = object3.getJSONObject("ResultData"); - datas.put("cardId",hisRegistrationId); + datas.put("cardId", hisRegistrationId); JSONObject object4 = JSONUtil.parseObj(datas); - hisApiGetMethodService.save(object4,"Outpintestapply"); + if(null ==orderService.getHuoQuJysqdh(hisRegistrationId)){ + hisApiGetMethodService.save(object4, "Outpintestapply"); + } //闂ㄨ瘖妫�鏌ョ敵璇� OutpinexamapplyDto outpinexamapplyDto = new OutpinexamapplyDto(); outpinexamapplyDto.setHisRegistrationId(hisRegistrationId); @@ -179,11 +181,12 @@ String result6 = getAjaxResult(ajaxResult2); JSONObject object5 = getJSONObject(result6); String code4 = object5.getStr("ResultCode"); - if(code4.equals("0")){ + if (code4.equals("0")) { Map<String, Object> map = object5.getJSONObject("ResultData"); - map.put("cardId",hisRegistrationId); + map.put("cardId", hisRegistrationId); JSONObject jsonObject = JSONUtil.parseObj(map); - hisApiGetMethodService.save(jsonObject,"Outpinexamapply"); + if(null ==orderService.getHuoQuJcsqdh(hisRegistrationId)) + hisApiGetMethodService.save(jsonObject, "Outpinexamapply"); } } } @@ -198,4 +201,36 @@ } } + + //閫�璐瑰悗鍙栨秷鎺ヨ瘖浣滃簾鐢宠鍗曠瓑鎿嶄綔 + @Transactional + public void ZfHisApiMethods(TjCustomer customer, TjOrder order) { + Date dates = new Date(); + final String date = DateUtil.format(dates, "yyyy-MM-dd HH:mm:ss"); + + String jcsqdh= orderService.getHuoQuJcsqdh(order.getCardId()); + + String jysqdh= orderService.getHuoQuJysqdh(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()); + } + + //浣滃簾闂ㄨ瘖鐢宠 + 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()); + } + + controller.Outpinunconapply(order.getCardId(),date,"00029"); + + } } -- Gitblit v1.8.0