| | |
| | | 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; |
| | |
| | | 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()); |
| | |
| | | } |
| | | } |
| | | |
| | | emergencyInfo.setTransferDistance(createVO.getDistance()); |
| | | emergencyInfo.setTransferDistance(createVO.getTransferDistance()); |
| | | emergencyInfo.setTransferPrice(createVO.getPrice()); |
| | | emergencyInfo.setDocumentTypeId(createVO.getDocumentTypeId()); |
| | | emergencyInfo.setTaskTypeId(createVO.getTaskTypeId()); |
| | |
| | | } |
| | | } |
| | | |
| | | if (updateVO.getDistance() != null) { |
| | | oldEmergency.setTransferDistance(updateVO.getDistance()); |
| | | if (updateVO.getTransferDistance() != null) { |
| | | oldEmergency.setTransferDistance(updateVO.getTransferDistance()); |
| | | } |
| | | if (updateVO.getPrice() != null) { |
| | | oldEmergency.setTransferPrice(updateVO.getPrice()); |
| | |
| | | oldEmergency.setLegacyServiceOrdClass(updateVO.getLegacyServiceOrdClass()); |
| | | } |
| | | |
| | | oldEmergency.setFromHq2Is(updateVO.getFromHQ2_is()); |
| | | oldEmergency.setServiceOrdVip(updateVO.getServiceOrdVIP()); |
| | | |
| | | sysTaskEmergencyMapper.updateSysTaskEmergency(oldEmergency); |
| | | } |
| | | |
| | |
| | | return; |
| | | } |
| | | |
| | | log.info("更新转运任务 taskId:{}", existingInfo.getTaskId()); |
| | | // log.info("更新转运任务 taskId:{}", existingInfo.getTaskId()); |
| | | |
| | | // 更新患者信息 |
| | | if (createVO.getPatient() != null) { |
| | |
| | | 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); |
| | |
| | | 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); |
| | |
| | | } |
| | | |
| | | // 更新费用信息 |
| | | if (createVO.getDistance() != null) { |
| | | existingInfo.setTransferDistance(createVO.getDistance()); |
| | | if (createVO.getTransferDistance() != null && BigDecimalUtil.izBigZero(createVO.getTransferDistance())) { |
| | | existingInfo.setTransferDistance(createVO.getTransferDistance()); |
| | | } |
| | | if (createVO.getPrice() != null) { |
| | | existingInfo.setTransferPrice(createVO.getPrice()); |
| | |
| | | if(createVO.getLegacyServiceOrdClass() != null){ |
| | | existingInfo.setLegacyServiceOrdClass(createVO.getLegacyServiceOrdClass()); |
| | | } |
| | | |
| | | |
| | | existingInfo.setServiceOrdVip(createVO.getServiceOrdVIP()); |
| | | existingInfo.setFromHq2Is(createVO.getFromHQ2_is()); |
| | | |
| | | // 执行更新 |
| | | sysTaskEmergencyMapper.updateSysTaskEmergency(existingInfo); |
| | | } |