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 7216ea41..9cdd30aa 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 @@ -612,6 +612,7 @@ public class DcWarningServiceImpl implements IDcWarningService } @Override + @Transactional(rollbackFor = Exception.class) public AjaxResult commandAndDispatch(DcWarning dcWarning) { Map mapAll = new HashMap<>(); HashMap dcDispatch = dcWarningMapper.selectDcDispatch(dcWarning.getId());//查询是否存在调度记录 @@ -671,6 +672,7 @@ public class DcWarningServiceImpl implements IDcWarningService } //指挥调度,当调度信息为空的时候调用智能分配资源 @Override + @Transactional(rollbackFor = Exception.class) public AjaxResult intelligentSource(DcWarning dcWarning) { String stakeMark = dcWarning.getStakeMark(); ArrayList> hashMaps = new ArrayList<>(); @@ -747,7 +749,7 @@ public class DcWarningServiceImpl implements IDcWarningService employees = Long.parseLong(map.get("employeesId").toString());//人员 } Long vehicles=null; - if (map.get("vehiclesId").toString()!=null){ + if (map.get("vehiclesId")!=null){ vehicles = Long.parseLong(map.get("vehiclesId").toString());//车辆 } DcDispatch dcDispatch = new DcDispatch(); diff --git a/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml b/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml index c3986369..c4155e2a 100644 --- a/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcWarningMapper.xml @@ -319,7 +319,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where parent_id!=0