|
|
|
@ -20,15 +20,18 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import com.logpm.basicdata.dto.BasicdataVehicleDTO; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataCarrierEntity; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataDrivermiddleEntity; |
|
|
|
|
import com.logpm.basicdata.entity.BasicdataVehicleEntity; |
|
|
|
|
import com.logpm.basicdata.excel.BasicdataVehicleExcel; |
|
|
|
|
import com.logpm.basicdata.mapper.BasicdataDrivermiddleMapper; |
|
|
|
|
import com.logpm.basicdata.mapper.BasicdataVehicleMapper; |
|
|
|
|
import com.logpm.basicdata.service.IBasicdataCarrierService; |
|
|
|
|
import com.logpm.basicdata.service.IBasicdataVehicleService; |
|
|
|
|
import com.logpm.basicdata.vo.BasicdataVehicleVO; |
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
@ -48,6 +51,8 @@ public class BasicdataVehicleServiceImpl extends BaseServiceImpl<BasicdataVehicl
|
|
|
|
|
private final BasicdataDrivermiddleMapper basicdataDrivermiddleMapper; |
|
|
|
|
|
|
|
|
|
private final BasicdataDrivermiddleServiceImpl basicdataDrivermiddleService; |
|
|
|
|
|
|
|
|
|
private final IBasicdataCarrierService basicdataCarrierService; |
|
|
|
|
@Override |
|
|
|
|
public IPage<BasicdataVehicleVO> selectBasicdataVehiclePage(IPage<BasicdataVehicleVO> page, BasicdataVehicleDTO basicdataVehicle) { |
|
|
|
|
return page.setRecords(baseMapper.selectBasicdataVehiclePage(page, basicdataVehicle)); |
|
|
|
@ -93,9 +98,22 @@ public class BasicdataVehicleServiceImpl extends BaseServiceImpl<BasicdataVehicl
|
|
|
|
|
basicdataDrivermiddleEntity.setDriverId(Long.valueOf(e)); |
|
|
|
|
basicdataDrivermiddleEntities.add(basicdataDrivermiddleEntity); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
basicdataDrivermiddleService.saveBatch(basicdataDrivermiddleEntities); |
|
|
|
|
// }
|
|
|
|
|
return delete; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean saveVehicle(BasicdataVehicleDTO basicdataVehicle) { |
|
|
|
|
if (Func.isNotEmpty(basicdataVehicle.getCarrierId())){ |
|
|
|
|
BasicdataCarrierEntity carrierEntity = basicdataCarrierService.getById(basicdataVehicle.getCarrierId()); |
|
|
|
|
if (Func.isNotEmpty(carrierEntity)){ |
|
|
|
|
basicdataVehicle.setCarrierName(carrierEntity.getCarrierName()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
return this.save(basicdataVehicle); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|