| | |
| | | } |
| | | } |
| | | createTaskVo.setPatient(patientInfo); |
| | | //1000公里,提取数字 |
| | | //1000公里,提取数字(支持小数) |
| | | String ServiceOrdTraDistance=MapValueUtils.getStringValue(order, "ServiceOrdTraDistance"); |
| | | if(ServiceOrdTraDistance!=null){ |
| | | ServiceOrdTraDistance=ServiceOrdTraDistance.replaceAll("[^0-9]", ""); |
| | | createTaskVo.setDistance(new BigDecimal(ServiceOrdTraDistance)); |
| | | // 保留数字和小数点,移除其他字符 |
| | | ServiceOrdTraDistance=ServiceOrdTraDistance.replaceAll("[^0-9.]", ""); |
| | | // 处理多个小数点的情况,只保留第一个 |
| | | int firstDotIndex = ServiceOrdTraDistance.indexOf('.'); |
| | | if (firstDotIndex != -1) { |
| | | ServiceOrdTraDistance = ServiceOrdTraDistance.substring(0, firstDotIndex + 1) |
| | | + ServiceOrdTraDistance.substring(firstDotIndex + 1).replace(".", ""); |
| | | } |
| | | if (!ServiceOrdTraDistance.isEmpty() && !ServiceOrdTraDistance.equals(".")) { |
| | | createTaskVo.setTransferDistance(new BigDecimal(ServiceOrdTraDistance)); |
| | | } |
| | | } |
| | | |
| | | |