wlzboy
2025-12-23 0a3eed02e78dfeeb7763a4b62992eefcd1f5a0ca
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysEmergencyTaskServiceImpl.java
@@ -1,5 +1,6 @@
package com.ruoyi.system.service.impl;
import com.ruoyi.common.utils.BigDecimalUtil;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.domain.SysTask;
@@ -44,6 +45,8 @@
                                  Long serviceOrderId, Long dispatchOrderId, String serviceOrdNo) {
        SysTaskEmergency emergencyInfo = new SysTaskEmergency();
        emergencyInfo.setTaskId(taskId);
        emergencyInfo.setServiceOrdVip(createVO.getServiceOrdVIP());
        emergencyInfo.setFromHq2Is(createVO.getFromHQ2_is());
        if (createVO.getPatient() != null) {
            emergencyInfo.setPatientContact(createVO.getPatient().getContact());
@@ -307,6 +310,9 @@
            oldEmergency.setLegacyServiceOrdClass(updateVO.getLegacyServiceOrdClass());
        }
        oldEmergency.setFromHq2Is(updateVO.getFromHQ2_is());
        oldEmergency.setServiceOrdVip(updateVO.getServiceOrdVIP());
        sysTaskEmergencyMapper.updateSysTaskEmergency(oldEmergency);
    }
@@ -321,7 +327,7 @@
            return;
        }
        
        log.info("更新转运任务 taskId:{}", existingInfo.getTaskId());
//        log.info("更新转运任务 taskId:{}", existingInfo.getTaskId());
        
        // 更新患者信息
        if (createVO.getPatient() != null) {
@@ -377,7 +383,7 @@
                        if (coords != null) {
                            existingInfo.setHospitalOutLongitude(BigDecimal.valueOf(coords.get("lng")));
                            existingInfo.setHospitalOutLatitude(BigDecimal.valueOf(coords.get("lat")));
                            log.info("转出医院GPS坐标自动获取成功: {}, {}", coords.get("lng"), coords.get("lat"));
//                            log.info("转出医院GPS坐标自动获取成功: {}, {}", coords.get("lng"), coords.get("lat"));
                        }
                    } catch (Exception e) {
                        log.error("自动获取转出医院GPS坐标失败", e);
@@ -418,7 +424,7 @@
                        if (coords != null) {
                            existingInfo.setHospitalInLongitude(BigDecimal.valueOf(coords.get("lng")));
                            existingInfo.setHospitalInLatitude(BigDecimal.valueOf(coords.get("lat")));
                            log.info("转入医院GPS坐标自动获取成功: {}, {}", coords.get("lng"), coords.get("lat"));
//                            log.info("转入医院GPS坐标自动获取成功: {}, {}", coords.get("lng"), coords.get("lat"));
                        }
                    } catch (Exception e) {
                        log.error("自动获取转入医院GPS坐标失败", e);
@@ -428,7 +434,7 @@
        }
        
        // 更新费用信息
        if (createVO.getDistance() != null) {
        if (createVO.getDistance() != null && BigDecimalUtil.izBigZero(createVO.getDistance())) {
            existingInfo.setTransferDistance(createVO.getDistance());
        }
        if (createVO.getPrice() != null) {
@@ -472,7 +478,10 @@
        if(createVO.getLegacyServiceOrdClass() != null){
            existingInfo.setLegacyServiceOrdClass(createVO.getLegacyServiceOrdClass());
        }
        existingInfo.setServiceOrdVip(createVO.getServiceOrdVIP());
        existingInfo.setFromHq2Is(createVO.getFromHQ2_is());
        // 执行更新
        sysTaskEmergencyMapper.updateSysTaskEmergency(existingInfo);
    }