...
|
...
|
@@ -25,8 +25,7 @@ public class VehicleInfoServiceImpl implements VehicleInfoService { |
|
|
/**
|
|
|
* 调度车辆方法
|
|
|
*
|
|
|
* @param vehicleType:车辆类型
|
|
|
* @param vehicleStatus:车辆状态
|
|
|
* @param vehicleInfo:车辆实体
|
|
|
* @return List<VehicleInfo>
|
|
|
*/
|
|
|
@Override
|
...
|
...
|
@@ -62,14 +61,26 @@ public class VehicleInfoServiceImpl implements VehicleInfoService { |
|
|
|
|
|
@Override
|
|
|
public int deleteByPrimaryKey(String id) {
|
|
|
/**
|
|
|
* 设置一个判断数值,记录删除的个数
|
|
|
* 判断该个数与前端传递来的个数是否一致
|
|
|
*/
|
|
|
int index = 0;
|
|
|
//如果id,传过来多个,以','分割,即批量删除
|
|
|
if (id.contains(",")) {
|
|
|
try {
|
|
|
String[] split = id.split(",");
|
|
|
for (int i = 0; i < split.length; i++) {
|
|
|
vehicleInfoMapper.deleteByPrimaryKey(split[i]);
|
|
|
int num = vehicleInfoMapper.deleteByPrimaryKey(split[i]);
|
|
|
if (num > 0) {
|
|
|
index = index + num;
|
|
|
}
|
|
|
}
|
|
|
if (index == split.length) {
|
|
|
return 1;
|
|
|
} else {
|
|
|
return 0;
|
|
|
}
|
|
|
return 1;
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return 0;
|
...
|
...
|
|