|
|
|
@ -22,15 +22,18 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
|
import com.logpm.basicdata.entity.BasicdataDriverArteryEntity; |
|
|
|
|
import com.logpm.basicdata.mapper.BasicdataDriverArteryMapper; |
|
|
|
|
import com.logpm.basicdata.service.IBasicdataDriverArteryService; |
|
|
|
|
import com.logpm.basicdata.vo.BasicdataDriverArteryVO; |
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import org.springblade.core.mp.support.BladePage; |
|
|
|
|
import org.springblade.core.mp.support.Condition; |
|
|
|
|
import org.springblade.core.mp.support.Query; |
|
|
|
|
import org.springblade.core.tool.utils.StringUtil; |
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
import springfox.documentation.annotations.ApiIgnore; |
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -69,14 +72,21 @@ public class BasicdataDriverArteryClient implements IBasicdataDriverArteryClient
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public List<JSONObject> findDriverListByName(String driverName) { |
|
|
|
|
List<BasicdataDriverArteryEntity> ls = basicdataDriverArteryService.findDriverListByName(driverName); |
|
|
|
|
List<BasicdataDriverArteryVO> ls = basicdataDriverArteryService.findDriverListByName(driverName); |
|
|
|
|
List<JSONObject> list = new ArrayList<>(); |
|
|
|
|
for (BasicdataDriverArteryEntity driverArteryEntity:ls){ |
|
|
|
|
for (BasicdataDriverArteryVO driverArteryEntity:ls){ |
|
|
|
|
JSONObject jsonObject = new JSONObject(); |
|
|
|
|
jsonObject.put("driverId",driverArteryEntity.getId()); |
|
|
|
|
jsonObject.put("driverName",driverArteryEntity.getName()); |
|
|
|
|
jsonObject.put("driverPhone",driverArteryEntity.getPhone()); |
|
|
|
|
jsonObject.put("driverType",driverArteryEntity.getType()); |
|
|
|
|
String carNumbers = driverArteryEntity.getCarNumbers(); |
|
|
|
|
List<String> carNumberList = new ArrayList<>(); |
|
|
|
|
if(StringUtil.isNotBlank(carNumbers)){ |
|
|
|
|
String[] split = carNumbers.split(","); |
|
|
|
|
carNumberList.addAll(Arrays.asList(split)); |
|
|
|
|
} |
|
|
|
|
jsonObject.put("carNumberList",carNumberList); |
|
|
|
|
list.add(jsonObject); |
|
|
|
|
} |
|
|
|
|
return list; |
|
|
|
|