From 42bc5219b6d14c6aa9ed7175ec9dc818aef7c43b Mon Sep 17 00:00:00 2001 From: wzp <2040239371@qq.com> Date: 星期一, 19 五月 2025 17:22:22 +0800 Subject: [PATCH] fix: 增加预估距离 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TbOrdersController.java | 54 +++++++++++++++++++------- ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/ServiceOrderAppVo.java | 6 +++ ruoyi-admin/src/main/resources/application.yml | 2 3 files changed, 46 insertions(+), 16 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TbOrdersController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TbOrdersController.java index c4f3ca2..d4cb7e2 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TbOrdersController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TbOrdersController.java @@ -127,11 +127,10 @@ SysClientApp scApp = clientAppService.selectSysClientAppByAppKey(tbOrders.getAppId()); - - ServiceOrderAppVo model = new ServiceOrderAppVo(); model.setMethod("ServiceOrder_APP"); // 璁剧疆鎺ュ彛鍚嶇О model.setAppId(scApp.getMinAppId()); // 璁剧疆鍟嗘埛 APPID + model.setUserID(scApp.getUserId()); model.setOrdType(tbOrders.getTypeCode().intValue()); model.setCoPhone(tbOrders.getLinkTel()); // 瀹㈡埛鑱旂郴鐢佃瘽 @@ -156,6 +155,13 @@ model.setPtDiagnosis(tbOrders.getComplaint()); // 璁剧疆璇婃柇淇℃伅 } + + //棰勪及璺濈 + if(tbOrders.getBookingKM()!=null) + { + model.setTraDistance(tbOrders.getBookingKM().toString()); + } + //濡傛灉澶囨敞淇℃伅涓虹┖锛屽垯涓嶈缃娉ㄤ俊鎭� if(tbOrders.getRemark() != null && !tbOrders.getRemark().equals("")) { @@ -163,8 +169,6 @@ } -// model.setDoctor("鍖荤敓" + (int) (Math.random() * 10)); // 闅忔満璁剧疆鎮h�呭尰鐢� -// model.setDoctorPhone("13" + (int) (Math.random() * 900000000 + 100000000)); // 闅忔満鐢熸垚鎮h�呭尰鐢熺數璇� model.setOfferPrice(tbOrders.getBookingPrice().doubleValue()); // 鐢熸垚鎶ヤ环 model.setReferrals(scApp.getReferrals()); // 璁剧疆鎺ㄤ粙浜哄悕绉颁负鏈烘瀯鍚嶇О // model.setUnitRemarks("鍟嗘埛闅忔満澶囨敞淇℃伅"); // 闅忔満璁剧疆鍟嗘埛澶囨敞 @@ -207,7 +211,9 @@ ServiceOrderAppVo model = new ServiceOrderAppVo(); model.setMethod("ServiceOrder_APP"); // 璁剧疆鎺ュ彛鍚嶇О - model.setAppId(tbOrders.getAppId()); // 璁剧疆鍟嗘埛 APPID + model.setAppId(scApp.getMinAppId()); // 璁剧疆鍟嗘埛 APPID + model.setUserID(scApp.getUserId()); + model.setOrdType(tbOrders.getTypeCode().intValue()); model.setCoPhone(tbOrders.getLinkTel()); // 瀹㈡埛鑱旂郴鐢佃瘽 model.setCoName(tbOrders.getLinkPerson()); // 瀹㈡埛濮撳悕 @@ -220,18 +226,36 @@ model.setPtName(tbOrders.getPatientName()); // 鎮h�呭鍚� model.setPtAge(tbOrders.getAge()); // 闅忔満鐢熸垚鎮h�呭勾榫� model.setPtSex(tbOrders.getSex() == 1 ? "鐢�" : "濂�"); // 闅忔満鐢熸垚鎮h�呮�у埆 -// model.setPtNat("涓浗"); // 璁剧疆鎮h�呭浗绫�--榛樿涓浗锛屼笉闇�瑕佽缃� +// model.setPtNat("涓浗"); // 璁剧疆鎮h�呭浗绫� model.setOutHosp(tbOrders.getLocalAddress()); // 璁剧疆杞嚭鍖婚櫌 model.setInHosp(tbOrders.getSendAddress()); // 璁剧疆杞叆鍖婚櫌 -// model.setPtServices("绉戝")); // 璁剧疆鎮h�呮墍鍦ㄧ瀹� - model.setPtDiagnosis(tbOrders.getComplaint()); // 璁剧疆璇婃柇淇℃伅 - model.setCondition(tbOrders.getRemark()); // 璁剧疆澶囨敞淇℃伅 -// model.setDoctor("鍖荤敓")); // 璁剧疆鎮h�呭尰鐢�--娌℃湁鍖荤敓淇℃伅 -// model.setDoctorPhone("")); // 璁剧疆鎮h�呭尰鐢熺數璇�--娌℃湁鍖荤敓鐢佃瘽 - model.setOfferPrice(tbOrders.getBookingPrice().doubleValue()); // 鎶ヤ环 -// model.setReferrals("鎺ㄤ粙浜�")); // 璁剧疆鎺ㄤ粙浜轰俊鎭�--娌℃湁鎺ㄤ粙浜轰俊鎭� -// model.setUnitRemarks("鍟嗘埛澶囨敞淇℃伅"); // 璁剧疆鍟嗘埛澶囨敞--娌℃湁鍟嗘埛澶囨敞 - model.setPayQRcodeURL(scApp.getPayUrl()); +// model.setPtServices("绉戝" + (int) (Math.random() * 10)); // 闅忔満璁剧疆鎮h�呮墍鍦ㄧ瀹� + + //濡傛灉璇婃柇淇℃伅涓虹┖锛屽垯涓嶈缃瘖鏂俊鎭� + if(tbOrders.getComplaint() != null && !tbOrders.getComplaint().equals("")) + { + model.setPtDiagnosis(tbOrders.getComplaint()); // 璁剧疆璇婃柇淇℃伅 + } + + + //棰勪及璺濈 + if(tbOrders.getBookingKM()!=null) + { + model.setTraDistance(tbOrders.getBookingKM().toString()); + } + + //濡傛灉澶囨敞淇℃伅涓虹┖锛屽垯涓嶈缃娉ㄤ俊鎭� + if(tbOrders.getRemark() != null && !tbOrders.getRemark().equals("")) + { + model.setCondition(tbOrders.getRemark()); // 璁剧疆澶囨敞淇℃伅 + } + + + model.setOfferPrice(tbOrders.getBookingPrice().doubleValue()); // 鐢熸垚鎶ヤ环 + model.setReferrals(scApp.getReferrals()); // 璁剧疆鎺ㄤ粙浜哄悕绉颁负鏈烘瀯鍚嶇О +// model.setUnitRemarks("鍟嗘埛闅忔満澶囨敞淇℃伅"); // 闅忔満璁剧疆鍟嗘埛澶囨敞 + model.setPayQRcodeURL(scApp.getPayUrl()); + ServiceOrderAppResultVo result = ServiceOrderUtil.CreateServiceOrder(model,scApp.getMinAppSecret()); diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 0128223..ae08b40 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -56,7 +56,7 @@ basename: i18n/messages profiles: # 鐜 dev|test|prod - active: prod + active: dev # 鏂囦欢涓婁紶 servlet: multipart: diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/ServiceOrderAppVo.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/ServiceOrderAppVo.java index 58943af..e376690 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/ServiceOrderAppVo.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/ServiceOrderAppVo.java @@ -95,6 +95,12 @@ * 璇婃柇淇℃伅 */ private String ptDiagnosis; + + /** + * 棰勪及璺濈 + */ + private String traDistance; + /** * 澶囨敞淇℃伅 */ -- Gitblit v1.9.1