|
@@ -13,6 +13,7 @@ import com.aoyang.tms.service.CommonService;
|
|
|
import com.aoyang.tms.service.TruckDriverService;
|
|
import com.aoyang.tms.service.TruckDriverService;
|
|
|
import com.aoyang.tms.service.TruckEscortService;
|
|
import com.aoyang.tms.service.TruckEscortService;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
@@ -171,7 +172,17 @@ public class TruckEscortServiceImpl extends ServiceImpl<TruckEscortMapper, Truck
|
|
|
boolean saveTruckDriver = truckDriverService.save(truckDriver);
|
|
boolean saveTruckDriver = truckDriverService.save(truckDriver);
|
|
|
log.info("新增押运员,新增truckDriver,参数:{},结果:{}", JSON.toJSONString(truckDriver), saveTruckDriver);
|
|
log.info("新增押运员,新增truckDriver,参数:{},结果:{}", JSON.toJSONString(truckDriver), saveTruckDriver);
|
|
|
}
|
|
}
|
|
|
- return updateById(param);
|
|
|
|
|
|
|
+ if (param.getTruckId() == null) {
|
|
|
|
|
+ param.setTruckId(null);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ LambdaUpdateWrapper<TruckEscort> updateWrapper = new LambdaUpdateWrapper<>();
|
|
|
|
|
+ updateWrapper.eq(TruckEscort::getEscortId, param.getEscortId());
|
|
|
|
|
+ if (param.getTruckId() == null) {
|
|
|
|
|
+ updateWrapper.set(TruckEscort::getTruckId, null);
|
|
|
|
|
+ }
|
|
|
|
|
+ boolean flag = truckEscortMapper.update(param, updateWrapper) > 0 ? true : false;
|
|
|
|
|
+ return flag;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|