From 86bb0542773fec123ea4bfb90852c503265426ac Mon Sep 17 00:00:00 2001
From: wzp <2040239371@qq.com>
Date: 星期六, 03 五月 2025 17:57:27 +0800
Subject: [PATCH] feat: 回调处理和详情展示优化
---
ruoyi-system/src/main/java/com/ruoyi/system/service/IDispatchOrdService.java | 35 ++
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AOrderStatusServiceImpl.java | 43 +++
ruoyi-admin/pom.xml | 5
ruoyi-system/src/main/java/com/ruoyi/system/service/IAOrderStatusService.java | 25 ++
ruoyi-ui/src/views/system/order/detail.vue | 6
ruoyi-system/src/main/java/com/ruoyi/system/domain/AOrderStatus.java | 14 +
ruoyi-system/src/main/resources/mapper/system/TbOrdersMapper.xml | 10
ruoyi-system/src/main/resources/mapper/system/AOrderStatusMapper.xml | 24 ++
ruoyi-system/src/main/java/com/ruoyi/system/mapper/DispatchOrdMapper.java | 36 +++
ruoyi-system/src/main/java/com/ruoyi/system/domain/DictionaryCondition.java | 33 ++
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/DispatchOrdServiceImpl.java | 47 +++
ruoyi-system/src/main/java/com/ruoyi/system/domain/OrderStatusCallBackVo.java | 56 ++++
ruoyi-system/src/main/java/com/ruoyi/system/service/ITbOrdersService.java | 18 +
ruoyi-quartz/pom.xml | 4
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java | 128 ++++++++++
ruoyi-system/src/main/java/com/ruoyi/system/mapper/AOrderStatusMapper.java | 26 ++
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TbOrdersServiceImpl.java | 25 ++
ruoyi-system/src/main/resources/mapper/system/DispatchOrdMapper.xml | 39 +++
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/APITestController.java | 40 +++
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ServiceOrderController.java | 34 ++
ruoyi-system/src/main/java/com/ruoyi/system/mapper/TbOrdersMapper.java | 18 +
21 files changed, 662 insertions(+), 4 deletions(-)
diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml
index 3ba8d4a..e4ff18f 100644
--- a/ruoyi-admin/pom.xml
+++ b/ruoyi-admin/pom.xml
@@ -64,6 +64,11 @@
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-generator</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/APITestController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/APITestController.java
new file mode 100644
index 0000000..e3194c9
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/APITestController.java
@@ -0,0 +1,40 @@
+package com.ruoyi.web.controller.system;
+
+import com.ruoyi.common.annotation.Anonymous;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.system.domain.OrderStatusCallBackVo;
+import org.springframework.web.bind.annotation.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+@Anonymous
+@RestController
+@RequestMapping("/system/apitest")
+public class APITestController extends BaseController {
+
+ private static final Logger log = LoggerFactory.getLogger(ServiceOrderController.class);
+
+ @Anonymous
+ @PostMapping("/orderCallback")
+ public AjaxResult updateOrderStatus(@RequestBody OrderStatusCallBackVo orderStatus) {
+ try {
+ // 杈撳嚭璇锋眰鍙傛暟
+ log.info("鏀跺埌璁㈠崟鐘舵�佹洿鏂板洖璋冿紝鍙傛暟锛歰rderId={}, thirdOrderNo={}, orderStatus={}, " +
+ "plateNo={}, driverMobile={}, driverName={}",
+ orderStatus.getOrderID(),
+ orderStatus.getThirdOrderNo(),
+ orderStatus.getOrderStatus(),
+ orderStatus.getPlateNo(),
+ orderStatus.getDriverMobile(),
+ orderStatus.getDriverName());
+
+ // 杩欓噷鍙互娣诲姞涓氬姟閫昏緫澶勭悊
+ return AjaxResult.success("鍥炶皟璁块棶鎴愬姛");
+ } catch (Exception e) {
+ return AjaxResult.error("鍥炶皟璁块棶澶辫触锛�" + e.getMessage());
+ }
+ }
+}
+
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ServiceOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ServiceOrderController.java
index 8c5394c..1e80c70 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ServiceOrderController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ServiceOrderController.java
@@ -13,6 +13,7 @@
import com.ruoyi.common.constant.HttpStatus;
import com.ruoyi.common.enums.DataSourceType;
+import com.ruoyi.system.domain.DictionaryCondition;
import com.ruoyi.system.domain.DispatchOrd;
import com.ruoyi.system.domain.TbOrders;
import com.ruoyi.system.service.IDispatchOrdService;
@@ -226,12 +227,43 @@
dispatchInfo.put("dispatchStatus","宸茶皟搴�");
}
+
+
+ //杞︾墝鍙�
+ String carLicense = dispatchOrdService.selectCarLicenseByCarId(Integer.valueOf(dispatchOrd.getDispatchOrdCarID()));
+ dispatchInfo.put("carLicense", carLicense);
}
+
+ //鐥呬汉鎯呭喌
+ Map<String, Object> medicalInfo = new HashMap<>();
+ medicalInfo.put("hasConsciousness", orderDetail.getSense());
+ medicalInfo.put("complaint",orderDetail.getComplaint());
+
+ //鏉′欢
+ List<DictionaryCondition> conditions = dispatchOrdService.selectDictionaryConditions();
+ List<Integer> conditionIds = dispatchOrdService.selectConditionIdsByServiceOrdCoId(Long.valueOf(orderDetail.getServiceOrdID()));
+
+ String patientCondition = "";//鐥呬汉鎯呭喌
+ String useVentilator = "";//浣跨敤鍛煎惛鏈�
+ for(DictionaryCondition condition : conditions){
+
+ if(conditionIds.contains(condition.getVID())){
+ patientCondition += condition.getVOrder2() + ": " + condition.getVtext() + "; ";
+ }
+
+ if(condition.getVOrder2().contains("鍛煎惛鏈�")){
+ useVentilator = condition.getVtext();
+ }
+ }
+
+ medicalInfo.put("patientCondition", patientCondition);
+ medicalInfo.put("useVentilator", useVentilator);
+
data.put("orderInfo", orderInfo);
data.put("patientInfo", patientInfo);
data.put("serviceInfo", serviceInfo);
- data.put("medicalInfo", new HashMap<>()); // 鏆傛椂涓虹┖
+ data.put("medicalInfo", medicalInfo); // 鏆傛椂涓虹┖
data.put("dispatchInfo", dispatchInfo); // 鏇存柊涓哄寘鍚汉鍛樹俊鎭殑dispatchInfo
data.put("paymentInfo", new ArrayList<>()); // 鏆傛椂涓虹┖
data.put("operationInfo", new ArrayList<>()); // 鏆傛椂涓虹┖
diff --git a/ruoyi-quartz/pom.xml b/ruoyi-quartz/pom.xml
index 0421087..df98f98 100644
--- a/ruoyi-quartz/pom.xml
+++ b/ruoyi-quartz/pom.xml
@@ -34,6 +34,10 @@
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.ruoyi</groupId>
+ <artifactId>ruoyi-system</artifactId>
+ </dependency>
</dependencies>
diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
index 853243b..6fdb634 100644
--- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
+++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
@@ -1,7 +1,23 @@
package com.ruoyi.quartz.task;
+import com.ruoyi.common.utils.HttpUtil;
+import com.ruoyi.system.domain.AOrderStatus;
+import com.ruoyi.system.domain.DispatchOrd;
+import com.ruoyi.system.domain.OrderStatusCallBackVo;
+import com.ruoyi.system.domain.TbOrders;
+import com.ruoyi.system.service.IAOrderStatusService;
+import com.ruoyi.system.service.IDispatchOrdService;
+import com.ruoyi.system.service.ITbOrdersService;
+import com.ruoyi.system.service.impl.SysUserServiceImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.ruoyi.common.utils.StringUtils;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
/**
* 瀹氭椂浠诲姟璋冨害娴嬭瘯
@@ -11,6 +27,16 @@
@Component("ryTask")
public class RyTask
{
+ private static final Logger log = LoggerFactory.getLogger(RyTask.class);
+ @Autowired
+ private IAOrderStatusService orderStatusService;
+
+ @Autowired
+ private ITbOrdersService tbOrdersService;
+
+ @Autowired
+ private IDispatchOrdService dispatchOrdService;
+
public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i)
{
System.out.println(StringUtils.format("鎵ц澶氬弬鏂规硶锛� 瀛楃涓茬被鍨媨}锛屽竷灏旂被鍨媨}锛岄暱鏁村瀷{}锛屾诞鐐瑰瀷{}锛屾暣褰}", s, b, l, d, i));
@@ -25,4 +51,106 @@
{
System.out.println("鎵ц鏃犲弬鏂规硶");
}
+
+ public void ryOrderStatus() {
+ try {
+ List<AOrderStatus> orderStatusList = orderStatusService.selectAOrderStatusList();
+ if (orderStatusList.size() < 0) {
+ System.out.println("娌℃湁鏁版嵁");
+ return;
+ }
+ for (AOrderStatus orderStatus : orderStatusList) {
+ int count = tbOrdersService.checkServiceOrdIDExists(orderStatus.getServiceOrdID());
+ if (count > 0) {
+ // orderStatusService.updateAOrderStatusFlag(orderStatus.getId());
+ System.out.println("鏈嶅姟璁㈠崟ID瀛樺湪锛�" + orderStatus.getServiceOrdID());
+
+ TbOrders tbOrders = tbOrdersService.selectTbOrdersByServiceOrdID(orderStatus.getServiceOrdID());
+
+
+
+ //鑾峰彇杞︾墝鍙�
+ String carLicense = "";
+ StringBuilder driverNames = new StringBuilder();
+ StringBuilder driverMobiles = new StringBuilder();
+ try{
+ DispatchOrd dispatchOrd = dispatchOrdService.selectDispatchOrdByServiceOrdIDDt(orderStatus.getServiceOrdID());
+ if(dispatchOrd!=null){
+ carLicense = dispatchOrdService.selectCarLicenseByCarId(Integer.valueOf(dispatchOrd.getDispatchOrdCarID()));
+
+ String dispatchOAEntourage = dispatchOrd.getDispatchOrd_OAEntourage();
+ String dispatchOAName = dispatchOrd.getDispatchOrd_OAName();
+
+ if (dispatchOAEntourage != null && dispatchOAName != null) {
+
+ String[] entourages = dispatchOAEntourage.split(",");
+ String[] names = dispatchOAName.split(",");
+
+ // 鏌ユ壘鎵�鏈夊徃鏈轰俊鎭�
+ for (int i = 0; i < Math.min(entourages.length, names.length); i++) {
+ if ("鍙告満".equals(entourages[i].trim())) {
+ String driverMobile = dispatchOrdService.selectDriverMobileByName(names[i].trim());
+ if (driverNames.length() > 0) {
+ driverNames.append(",");
+ }
+ driverNames.append(names[i].trim());
+ if (driverMobiles.length() > 0) {
+ driverMobiles.append(",");
+ }
+ driverMobiles.append(driverMobile);
+ }
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ log.error("鑾峰彇璋冨害鍗曞紓甯革細"+e.getMessage());
+ }
+
+
+
+ // 浣跨敤鑾峰彇鍒扮殑鎵�鏈夊徃鏈哄鍚�
+ String callbackUrl = "http://localhost:8080/system/apitest/orderCallback";
+ try {
+ // 鏋勫缓璇锋眰鍙傛暟
+ Map<String, String> map = new HashMap<>();
+ map.put("orderID", tbOrders.getOrderID().toString());
+ map.put("thirdOrderNo", orderStatus.getServiceOrdID());
+ map.put("orderStatus","1");
+ map.put("orderRemark", orderStatus.getMsg());
+ map.put("plateNo",carLicense);
+ map.put("driverMobile",driverMobiles.toString());
+ map.put("driverName", driverNames.toString());
+
+ // 鎵撳嵃璇锋眰鍙傛暟
+ log.info("鍙戦�佸洖璋冭姹傦紝URL: " + callbackUrl);
+ log.info("璇锋眰鍙傛暟: " + map);
+
+ // 鍙戦�佽姹傚苟鑾峰彇鍝嶅簲
+ String response = HttpUtil.post(callbackUrl, map);
+
+ // 鎵撳嵃鍝嶅簲缁撴灉
+ log.info("鍥炶皟鍝嶅簲缁撴灉: " + response);
+
+ // 鏇存柊鐘舵��
+ // orderStatusService.updateAOrderStatusFlag(orderStatus.getId());
+ } catch (Exception e) {
+ log.error("鍥炶皟璇锋眰澶辫触: " + e.getMessage());
+ // 鍙互鑰冭檻閲嶈瘯鏈哄埗鎴栬�呰褰曞け璐ユ棩蹇�
+ }
+
+
+
+ }
+ else {
+ log.info("鏈嶅姟璁㈠崟ID涓嶅瓨鍦細" + orderStatus.getServiceOrdID());
+ orderStatusService.updateAOrderStatusFlag(orderStatus.getId());
+ }
+ }
+ } catch (Exception e) {
+ log.error("鎵ц澶辫触: " + e.getMessage());
+ e.printStackTrace();
+ }
+ }
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/AOrderStatus.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/AOrderStatus.java
new file mode 100644
index 0000000..6a355c8
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/AOrderStatus.java
@@ -0,0 +1,14 @@
+package com.ruoyi.system.domain;
+
+import java.time.LocalDateTime;
+import lombok.Data;
+
+@Data
+public class AOrderStatus {
+
+ private Long id;
+ private String serviceOrdID;
+ private String msg;
+ private LocalDateTime updateTime;
+ private Integer flag;
+}
\ No newline at end of file
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/DictionaryCondition.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/DictionaryCondition.java
new file mode 100644
index 0000000..89b20eb
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/DictionaryCondition.java
@@ -0,0 +1,33 @@
+package com.ruoyi.system.domain;
+
+import com.ruoyi.common.core.domain.BaseEntity;
+import com.ruoyi.common.annotation.Excel;
+import lombok.Data;
+
+/**
+ * 瀛楀吀鏁版嵁瀵硅薄 dictionary
+ */
+@Data
+public class DictionaryCondition extends BaseEntity {
+ private static final long serialVersionUID = 1L;
+
+ /** ID */
+ @Excel(name = "ID")
+ private Integer vID;
+
+ /** 鏂囨湰鍊� */
+ @Excel(name = "鏂囨湰鍊�")
+ private String vtext;
+
+ /** 绫诲瀷 */
+ @Excel(name = "绫诲瀷")
+ private Integer vType;
+
+ /** 鎺掑簭 */
+ @Excel(name = "鎺掑簭")
+ private Double vOrder;
+
+ /** 鍒嗙被 */
+ @Excel(name = "鍒嗙被")
+ private String vOrder2;
+}
\ No newline at end of file
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/OrderStatusCallBackVo.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/OrderStatusCallBackVo.java
new file mode 100644
index 0000000..dc74813
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/OrderStatusCallBackVo.java
@@ -0,0 +1,56 @@
+package com.ruoyi.system.domain;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Data;
+
+@Data
+public class OrderStatusCallBackVo {
+ /**
+ * 璁㈠崟ID锛堝箍浜よ鍗旾D锛岀郴缁熷敮涓�锛�
+ */
+ @JsonProperty("OrderID")
+ private Long OrderID;
+
+ /**
+ * 绗笁鏂硅鍗曞彿锛堢涓夋柟骞冲彴鍞竴锛�
+ */
+ @JsonProperty("ThirdOrderNo")
+ private String ThirdOrderNo;
+
+ /**
+ * 璁㈠崟鐘舵�侊細
+ * -1锛氳鍗曞垱寤哄け璐�
+ * 0锛氳鍗曞垱寤烘垚鍔�
+ * 1锛氬徃鏈哄凡鎺ュ崟
+ * 2锛氬徃鏈哄凡鍑哄彂
+ * 3锛氬徃鏈烘姷杈�
+ * 4锛氬凡鎺ュ埌涔樺
+ * 5锛氳鍗曟湇鍔′腑
+ * 6锛氳绋嬬粨鏉�
+ * 7锛氳鍗曟敮浠樺畬鎴�
+ * 8锛氳鍗曞彇娑�
+ */
+ @JsonProperty("OrderStatus")
+ private Integer OrderStatus;
+
+ @JsonProperty("OrderRemark")
+ private String OrderRemark;
+
+ /**
+ * 鍙告満杞︾墝鍙�
+ */
+ @JsonProperty("PlateNo")
+ private String PlateNo;
+
+ /**
+ * 鍙告満鑱旂郴鐢佃瘽
+ */
+ @JsonProperty("DriverMobile")
+ private String DriverMobile;
+
+ /**
+ * 鍙告満濮撳悕
+ */
+ @JsonProperty("DriverName")
+ private String DriverName;
+}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AOrderStatusMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AOrderStatusMapper.java
new file mode 100644
index 0000000..3904438
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AOrderStatusMapper.java
@@ -0,0 +1,26 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.AOrderStatus;
+
+/**
+ * 璁㈠崟鐘舵�� 鏁版嵁灞�
+ */
+public interface AOrderStatusMapper {
+ /**
+ * 鏌ヨ璁㈠崟鐘舵�佸垪琛�
+ * 榛樿鏌ヨ flag = 0 鐨勮褰�
+ *
+ * @param aOrderStatus 璁㈠崟鐘舵�佷俊鎭�
+ * @return 璁㈠崟鐘舵�侀泦鍚�
+ */
+ public List<AOrderStatus> selectAOrderStatusList();
+
+ /**
+ * 淇敼璁㈠崟鐘舵�佹爣蹇椾负1
+ *
+ * @param id 璁㈠崟鐘舵�両D
+ * @return 缁撴灉
+ */
+ public int updateAOrderStatusFlag(Long id);
+}
\ No newline at end of file
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/DispatchOrdMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/DispatchOrdMapper.java
index 4dff173..a83219b 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/DispatchOrdMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/DispatchOrdMapper.java
@@ -1,6 +1,9 @@
package com.ruoyi.system.mapper;
+import com.ruoyi.system.domain.DictionaryCondition;
import com.ruoyi.system.domain.DispatchOrd;
+
+import java.util.List;
/**
* 璋冨害璁㈠崟Mapper鎺ュ彛
@@ -15,4 +18,37 @@
* @return 璋冨害璁㈠崟淇℃伅
*/
public DispatchOrd selectDispatchOrdByServiceOrdIDDt(String serviceOrdIDDt);
+
+ /**
+ * 鏍规嵁CarID鏌ヨ杞︾墝鍙�
+ *
+ * @param carId CarID
+ * @return 杞︾墝鍙�
+ */
+ public String selectCarLicenseByCarId(Integer carId);
+
+ /**
+ * 鏌ヨ瀛楀吀琛ㄤ腑鐨勬潯浠舵暟鎹�
+ *
+ * @return 鏉′欢鏁版嵁鍒楄〃
+ */
+ public List<DictionaryCondition> selectDictionaryConditions();
+
+ /**
+ * 鏍规嵁鏈嶅姟璁㈠崟ID鏌ヨ鏉′欢ID鍒楄〃
+ *
+ * @param serviceOrdCoId 鏈嶅姟璁㈠崟ID
+ * @return 鏉′欢ID鍒楄〃
+ */
+ public List<Integer> selectConditionIdsByServiceOrdCoId(Long serviceOrdCoId);
+
+
+
+ /**
+ * 鏍规嵁鍙告満濮撳悕鏌ヨ鍙告満鎵嬫満鍙�
+ *
+ * @param driverName 鍙告満濮撳悕
+ * @return 鍙告満鎵嬫満鍙�
+ */
+ public String selectDriverMobileByName(String driverName);
}
\ No newline at end of file
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TbOrdersMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TbOrdersMapper.java
index 696c435..41a0417 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TbOrdersMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TbOrdersMapper.java
@@ -58,4 +58,22 @@
* @return 缁撴灉
*/
public int deleteTbOrdersByOrderIDs(Long[] OrderIDs);
+
+ /**
+ * 妫�鏌erviceOrdID鏄惁瀛樺湪
+ *
+ * @param ServiceOrdID 鏈嶅姟璁㈠崟ID
+ * @return 缁撴灉
+ */
+ public int checkServiceOrdIDExists(String ServiceOrdID);
+
+ /**
+ * 鏌ヨServiceOrdID瀵瑰簲鐨勮鍗�
+ *
+ * @param ServiceOrdID 鏈嶅姟璁㈠崟ID
+ * @return 缁撴灉
+ */
+ public TbOrders selectTbOrdersByServiceOrdID(String ServiceOrdID);
+
+
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IAOrderStatusService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IAOrderStatusService.java
new file mode 100644
index 0000000..b25197c
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IAOrderStatusService.java
@@ -0,0 +1,25 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.domain.AOrderStatus;
+
+/**
+ * 璁㈠崟鐘舵�� 鏈嶅姟灞�
+ */
+public interface IAOrderStatusService {
+ /**
+ * 鏌ヨ璁㈠崟鐘舵�佸垪琛�
+ * 榛樿鏌ヨ flag = 0 鐨勮褰�
+ *
+ * @return 璁㈠崟鐘舵�侀泦鍚�
+ */
+ public List<AOrderStatus> selectAOrderStatusList();
+
+ /**
+ * 淇敼璁㈠崟鐘舵�佹爣蹇椾负1
+ *
+ * @param id 璁㈠崟鐘舵�両D
+ * @return 缁撴灉
+ */
+ public int updateAOrderStatusFlag(Long id);
+}
\ No newline at end of file
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IDispatchOrdService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IDispatchOrdService.java
index a6f54df..320adf0 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IDispatchOrdService.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IDispatchOrdService.java
@@ -1,6 +1,9 @@
package com.ruoyi.system.service;
+import com.ruoyi.system.domain.DictionaryCondition;
import com.ruoyi.system.domain.DispatchOrd;
+
+import java.util.List;
/**
* 璋冨害璁㈠崟Service鎺ュ彛
@@ -15,4 +18,36 @@
* @return 璋冨害璁㈠崟淇℃伅
*/
public DispatchOrd selectDispatchOrdByServiceOrdIDDt(String serviceOrdIDDt);
+
+ /**
+ * 鏍规嵁CarID鏌ヨ杞︾墝鍙�
+ *
+ * @param carId CarID
+ * @return 杞︾墝鍙�
+ */
+ public String selectCarLicenseByCarId(Integer carId);
+
+ /**
+ * 鏌ヨ瀛楀吀琛ㄤ腑鐨勬潯浠舵暟鎹�
+ *
+ * @return 鏉′欢鏁版嵁鍒楄〃
+ */
+ public List<DictionaryCondition> selectDictionaryConditions();
+
+
+ /**
+ * 鏍规嵁鏈嶅姟璁㈠崟ID鏌ヨ鏉′欢ID鍒楄〃
+ *
+ * @param serviceOrdCoId 鏈嶅姟璁㈠崟ID
+ * @return 鏉′欢ID鍒楄〃
+ */
+ public List<Integer> selectConditionIdsByServiceOrdCoId(Long serviceOrdCoId);
+
+ /**
+ * 鏍规嵁鍙告満濮撳悕鏌ヨ鍙告満鎵嬫満鍙�
+ *
+ * @param driverName 鍙告満濮撳悕
+ * @return 鍙告満鎵嬫満鍙�
+ */
+ public String selectDriverMobileByName(String driverName);
}
\ No newline at end of file
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ITbOrdersService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ITbOrdersService.java
index ad0337d..82eabfc 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ITbOrdersService.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ITbOrdersService.java
@@ -58,4 +58,22 @@
* @return 缁撴灉
*/
public int deleteTbOrdersByOrderID(Long OrderID);
+
+ /**
+ * 妫�鏌erviceOrdID鏄惁瀛樺湪
+ *
+ * @param ServiceOrdID 鏈嶅姟璁㈠崟ID
+ * @return 缁撴灉
+ */
+ public int checkServiceOrdIDExists(String ServiceOrdID);
+
+ /**
+ * 鏌ヨServiceOrdID瀵瑰簲鐨勮鍗�
+ *
+ * @param ServiceOrdID 鏈嶅姟璁㈠崟ID
+ * @return 缁撴灉
+ */
+ public TbOrders selectTbOrdersByServiceOrdID(String ServiceOrdID);
+
+
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AOrderStatusServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AOrderStatusServiceImpl.java
new file mode 100644
index 0000000..0d42244
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AOrderStatusServiceImpl.java
@@ -0,0 +1,43 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+
+import com.ruoyi.common.annotation.DataSource;
+import com.ruoyi.common.enums.DataSourceType;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.AOrderStatusMapper;
+import com.ruoyi.system.domain.AOrderStatus;
+import com.ruoyi.system.service.IAOrderStatusService;
+
+/**
+ * 璁㈠崟鐘舵�� 鏈嶅姟灞傚疄鐜�
+ */
+@DataSource(DataSourceType.SQLSERVER)
+@Service
+public class AOrderStatusServiceImpl implements IAOrderStatusService {
+ @Autowired
+ private AOrderStatusMapper aOrderStatusMapper;
+
+ /**
+ * 鏌ヨ璁㈠崟鐘舵�佸垪琛�
+ * 榛樿鏌ヨ flag = 0 鐨勮褰�
+ *
+ * @return 璁㈠崟鐘舵�侀泦鍚�
+ */
+ @Override
+ public List<AOrderStatus> selectAOrderStatusList() {
+ return aOrderStatusMapper.selectAOrderStatusList();
+ }
+
+ /**
+ * 淇敼璁㈠崟鐘舵�佹爣蹇椾负1
+ *
+ * @param id 璁㈠崟鐘舵�両D
+ * @return 缁撴灉
+ */
+ @Override
+ public int updateAOrderStatusFlag(Long id) {
+ return aOrderStatusMapper.updateAOrderStatusFlag(id);
+ }
+}
\ No newline at end of file
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/DispatchOrdServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/DispatchOrdServiceImpl.java
index f6529d4..ce6ba50 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/DispatchOrdServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/DispatchOrdServiceImpl.java
@@ -2,11 +2,14 @@
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
+import com.ruoyi.system.domain.DictionaryCondition;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchOrdMapper;
import com.ruoyi.system.domain.DispatchOrd;
import com.ruoyi.system.service.IDispatchOrdService;
+
+import java.util.List;
/**
* 璋冨害璁㈠崟Service涓氬姟灞傚鐞�
@@ -29,4 +32,48 @@
public DispatchOrd selectDispatchOrdByServiceOrdIDDt(String serviceOrdIDDt) {
return dispatchOrdMapper.selectDispatchOrdByServiceOrdIDDt(serviceOrdIDDt);
}
+
+ /**
+ * 鏍规嵁CarID鏌ヨ杞︾墝鍙�
+ *
+ * @param carId CarID
+ * @return 杞︾墝鍙�
+ */
+ @Override
+ public String selectCarLicenseByCarId(Integer carId) {
+ return dispatchOrdMapper.selectCarLicenseByCarId(carId);
+ }
+
+ /**
+ * 鏌ヨ瀛楀吀琛ㄤ腑鐨勬潯浠舵暟鎹�
+ *
+ * @return 鏉′欢鏁版嵁鍒楄〃
+ */
+ @Override
+ public List<DictionaryCondition> selectDictionaryConditions() {
+ return dispatchOrdMapper.selectDictionaryConditions();
+ }
+
+ /**
+ * 鏍规嵁鏈嶅姟璁㈠崟ID鏌ヨ鏉′欢ID鍒楄〃
+ *
+ * @param serviceOrdCoId 鏈嶅姟璁㈠崟ID
+ * @return 鏉′欢ID鍒楄〃
+ */
+ @Override
+ public List<Integer> selectConditionIdsByServiceOrdCoId(Long serviceOrdCoId) {
+ return dispatchOrdMapper.selectConditionIdsByServiceOrdCoId(serviceOrdCoId);
+ }
+
+
+ /**
+ * 鏍规嵁鍙告満濮撳悕鏌ヨ鍙告満鎵嬫満鍙�
+ *
+ * @param driverName 鍙告満濮撳悕
+ * @return 鍙告満鎵嬫満鍙�
+ */
+ @Override
+ public String selectDriverMobileByName(String driverName) {
+ return dispatchOrdMapper.selectDriverMobileByName(driverName);
+ }
}
\ No newline at end of file
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TbOrdersServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TbOrdersServiceImpl.java
index aa5f79f..a15f89f 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TbOrdersServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TbOrdersServiceImpl.java
@@ -90,4 +90,29 @@
{
return tbOrdersMapper.deleteTbOrdersByOrderID(OrderID);
}
+
+ /**
+ * 妫�鏌erviceOrdID鏄惁瀛樺湪
+ *
+ * @param ServiceOrdID 鏈嶅姟璁㈠崟ID
+ * @return 缁撴灉
+ */
+ @Override
+ public int checkServiceOrdIDExists(String ServiceOrdID)
+ {
+ return tbOrdersMapper.checkServiceOrdIDExists(ServiceOrdID);
+ }
+
+ /**
+ * 鏌ヨServiceOrdID瀵瑰簲鐨勮鍗�
+ *
+ * @param ServiceOrdID 鏈嶅姟璁㈠崟ID
+ * @return 缁撴灉
+ */
+ @Override
+ public TbOrders selectTbOrdersByServiceOrdID(String ServiceOrdID)
+ {
+ return tbOrdersMapper.selectTbOrdersByServiceOrdID(ServiceOrdID);
+ }
+
}
diff --git a/ruoyi-system/src/main/resources/mapper/system/AOrderStatusMapper.xml b/ruoyi-system/src/main/resources/mapper/system/AOrderStatusMapper.xml
new file mode 100644
index 0000000..2ecd643
--- /dev/null
+++ b/ruoyi-system/src/main/resources/mapper/system/AOrderStatusMapper.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.AOrderStatusMapper">
+
+ <resultMap type="com.ruoyi.system.domain.AOrderStatus" id="AOrderStatusResult">
+ <id property="id" column="id"/>
+ <result property="serviceOrdID" column="serviceOrdID"/>
+ <result property="msg" column="msg"/>
+ <result property="updateTime" column="updateTime"/>
+ <result property="flag" column="flag"/>
+ </resultMap>
+
+ <select id="selectAOrderStatusList" resultMap="AOrderStatusResult">
+ select id, serviceOrdID, msg, updateTime, flag
+ from A_OrderStatus where flag = 0
+ </select>
+
+ <update id="updateAOrderStatusFlag" parameterType="Long">
+ update A_OrderStatus
+ set flag = 1
+ where id = #{id}
+ </update>
+
+</mapper>
\ No newline at end of file
diff --git a/ruoyi-system/src/main/resources/mapper/system/DispatchOrdMapper.xml b/ruoyi-system/src/main/resources/mapper/system/DispatchOrdMapper.xml
index 66e906a..b9f198d 100644
--- a/ruoyi-system/src/main/resources/mapper/system/DispatchOrdMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/DispatchOrdMapper.xml
@@ -21,6 +21,7 @@
<result property="dispatchOrd_AP_Check" column="DispatchOrd_AP_Check"/>
<result property="dispatchOrd_OAName" column="DispatchOrd_OAName"/>
<result property="dispatchOrd_OAEntourage" column="DispatchOrd_OAEntourage"/>
+ <result property="dispatchOrdCarID" column="DispatchOrdCarID"/>
<!-- ... 鍏朵粬瀛楁鏄犲皠 ... -->
</resultMap>
@@ -34,4 +35,42 @@
where ServiceOrdIDDt = #{serviceOrdIDDt}
</select>
+ <!-- 鏍规嵁CarID鏌ヨ杞︾墝鍙� -->
+ <select id="selectCarLicenseByCarId" parameterType="Integer" resultType="String">
+ select CarLicense from CarData where CarID = #{carId}
+ </select>
+
+ <!-- 鏌ヨ瀛楀吀琛ㄤ腑鐨勬潯浠舵暟鎹� -->
+ <resultMap id="DictionaryConditionResult" type="DictionaryCondition">
+ <result property="vID" column="vID"/>
+ <result property="vtext" column="vtext"/>
+ <result property="vType" column="vType"/>
+ <result property="vOrder" column="vOrder"/>
+ <result property="vOrder2" column="vOrder2"/>
+ </resultMap>
+
+ <select id="selectDictionaryConditions" resultMap="DictionaryConditionResult">
+ select vID, vtext, vType, vOrder, vOrder2
+ from dictionary
+ where vType >= 1
+ and vtitle = 'Condition'
+ order by vOrder, ID
+ </select>
+
+ <!-- 鏍规嵁鏈嶅姟璁㈠崟ID鏌ヨ鏉′欢ID鍒楄〃 -->
+ <select id="selectConditionIdsByServiceOrdCoId" parameterType="Long" resultType="Integer">
+ select ConditionID
+ from ServiceOrd_Condition
+ where ServiceOrdCoID = #{serviceOrdCoId}
+ </select>
+
+
+ <!-- 鏍规嵁鍙告満濮撳悕鏌ヨ鍙告満鎵嬫満鍙� -->
+ <select id="selectDriverMobileByName" parameterType="String" resultType="String">
+ SELECT top 1 OA_mobile
+ FROM OA_User
+ WHERE OA_Position = '鍙告満'
+ AND OA_Name = #{driverName}
+ </select>
+
</mapper>
\ No newline at end of file
diff --git a/ruoyi-system/src/main/resources/mapper/system/TbOrdersMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TbOrdersMapper.xml
index d4f0640..8c236c7 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TbOrdersMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TbOrdersMapper.xml
@@ -235,4 +235,14 @@
#{OrderID}
</foreach>
</delete>
+
+ <select id="checkServiceOrdIDExists" parameterType="String" resultType="Integer">
+ select count(1) from tb_orders where ServiceOrdID = #{ServiceOrdID}
+ </select>
+
+ <select id="selectTbOrdersByServiceOrdID" parameterType="String" resultMap="TbOrdersResult">
+ <include refid="selectTbOrdersVo"/>
+ where ServiceOrdID = #{ServiceOrdID}
+ </select>
+
</mapper>
\ No newline at end of file
diff --git a/ruoyi-ui/src/views/system/order/detail.vue b/ruoyi-ui/src/views/system/order/detail.vue
index d09d496..b2aded4 100644
--- a/ruoyi-ui/src/views/system/order/detail.vue
+++ b/ruoyi-ui/src/views/system/order/detail.vue
@@ -64,7 +64,7 @@
<el-descriptions-item label="鏄惁鏈夋剰璇�">{{ medicalInfo.hasConsciousness }}</el-descriptions-item>
<el-descriptions-item label="鐥呬汉鎯呭喌">{{ medicalInfo.patientCondition }}</el-descriptions-item>
<el-descriptions-item label="浣跨敤鍛煎惛鏈�">{{ medicalInfo.useVentilator }}</el-descriptions-item>
- <el-descriptions-item label="璇婃柇鐥呮儏">{{ medicalInfo.diagnosis }}</el-descriptions-item>
+ <el-descriptions-item label="璇婃柇鐥呮儏">{{ medicalInfo.complaint }}</el-descriptions-item>
</el-descriptions>
</el-card>
</el-col>
@@ -79,7 +79,7 @@
<el-descriptions-item label="璋冨害鏃堕棿">{{ dispatchInfo.dispatchTime }}</el-descriptions-item>
<el-descriptions-item label="璋冨害鐘舵��">{{ dispatchInfo.dispatchStatus }}</el-descriptions-item>
<el-descriptions-item label="鍙告満">{{ dispatchInfo.driver }}</el-descriptions-item>
- <el-descriptions-item label="杞︾墝">{{ dispatchInfo.carNo }}</el-descriptions-item>
+ <el-descriptions-item label="杞︾墝">{{ dispatchInfo.carLicense }}</el-descriptions-item>
<el-descriptions-item label="鍖荤敓">{{ dispatchInfo.doctor }}</el-descriptions-item>
<!-- <el-descriptions-item label="鑱屼綅">{{ dispatchInfo.doctorPosition }}</el-descriptions-item> -->
<el-descriptions-item label="鎶ゅ+">{{ dispatchInfo.nurse }}</el-descriptions-item>
@@ -113,7 +113,7 @@
<el-card class="inner-card">
<div slot="header">
<b>杩愯鎯呭喌</b>
- <span style="float: right">绮102311</span>
+ <span style="float: right">{{dispatchInfo.carLicense}}</span>
</div>
<el-table
:data="operationInfo"
--
Gitblit v1.9.1