diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java index 6f08a2bb..2b9438b9 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java @@ -719,8 +719,9 @@ public class DcWarningServiceImpl implements IDcWarningService dcWarningMapper.deleteDispatchResource(dispatchId);//删除全部属于该调度记录下的全部资源 ArrayList> employeesArray = (ArrayList>) map.get("employees");//取出人员 - String context = "路管人员"; + String context = ""; if (employeesArray!=null&&employeesArray.size()>0) { + context += "路管人员"; for (Map array : employeesArray) { dcDispatchResource.setDispatchType(1);//类型 dcDispatchResource.setResourceId(Long.valueOf(array.get("id").toString()));//资源id @@ -736,7 +737,10 @@ public class DcWarningServiceImpl implements IDcWarningService } ArrayList> vehicleArray = (ArrayList>) map.get("vehicle");////取出车辆 if (vehicleArray!=null&&vehicleArray.size()>0) { - context += ",救援车辆"; + if (context.length() > 0){ + context += ","; + } + context += "救援车辆"; for (Map array : vehicleArray) { dcDispatchResource.setDispatchType(2); dcDispatchResource.setResourceId(Long.valueOf(array.get("id").toString()));