diff --git a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataDriverArteryEntity.java b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataDriverArteryEntity.java index 597e85090..3aa2fc6a5 100644 --- a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataDriverArteryEntity.java +++ b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/entity/BasicdataDriverArteryEntity.java @@ -62,7 +62,7 @@ public class BasicdataDriverArteryEntity extends TenantEntity { /** * 职务类型;1-干线,2-配送 */ - @ApiModelProperty(value = "职务类型;1-干线,2-配送,3-全部") + @ApiModelProperty(value = "职务类型;1-干线,2-配送") private String jobType; /** * 准驾车型;1-A1,2-A2,3-A3,4-B1,5-B2,6-C1,7-C2 diff --git a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataDriverArteryVO.java b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataDriverArteryVO.java index 72de2c0ae..894f8754f 100644 --- a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataDriverArteryVO.java +++ b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataDriverArteryVO.java @@ -50,6 +50,12 @@ public class BasicdataDriverArteryVO extends BasicdataDriverArteryEntity { @ApiModelProperty(value = "司机关联车辆列表") private List vehicleVOList; + /** + * 司机类型 + */ + private List jobTypeString; + + private List warehouses = new ArrayList<>(); diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataDriverArteryController.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataDriverArteryController.java index 34a572b6d..67e8fbbd2 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataDriverArteryController.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataDriverArteryController.java @@ -34,6 +34,7 @@ import com.logpm.basicdata.vo.BasicdataDriverWarehouseVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; +import jodd.util.ArraysUtil; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.core.boot.ctrl.BladeController; @@ -54,10 +55,7 @@ import springfox.documentation.annotations.ApiIgnore; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; +import java.util.*; /** * 司机信息表 控制器 @@ -95,6 +93,11 @@ public class BasicdataDriverArteryController extends BladeController { List warehouseIds = basicdataDriverWarehouseService.findByDriverId(driverId); BasicdataDriverArteryVO basicdataDriverArteryVO = new BasicdataDriverArteryVO(); BeanUtil.copy(detail,basicdataDriverArteryVO); + + // 拆分 司机类型 + String[] split = basicdataDriverArteryVO.getJobType().split(","); + List list = Arrays.asList(split); + basicdataDriverArteryVO.setJobTypeString(list); basicdataDriverArteryVO.setWarehouses(warehouseIds); basicdataDriverArteryVO.setBindVehicles(String.join(",",vehicleIds)); return R.data(basicdataDriverArteryVO); diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataDriverArteryDTO.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataDriverArteryDTO.java index 27c8f85c0..b5ab2870f 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataDriverArteryDTO.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/dto/BasicdataDriverArteryDTO.java @@ -41,4 +41,6 @@ public class BasicdataDriverArteryDTO extends BasicdataDriverArteryEntity { private String bindVehicles; private List warehouseIds = new ArrayList<>(); + + } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.java index dd5cbf1ab..e4112f933 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.java @@ -69,7 +69,7 @@ public interface BasicdataDriverArteryMapper extends BaseMapper selectListByWarehouseId(@Param("warehouseId") Long warehouseId); + List selectListByWarehouseId(@Param("warehouseId") Long warehouseId,@Param("jobType")String jobType); BasicdataDriverArteryEntity findEntityByPhone(@Param("phone") String phone); } diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.xml b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.xml index b15895d84..fee6fa8be 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.xml +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataDriverArteryMapper.xml @@ -168,13 +168,12 @@ left join logpm_basicdata_vehicle lbv on lbv.id = lbdm.brand_id where lbda.`name` like concat('%',#{driverName},'%') - and lbda.job_type = #{jobType} + and locate(#{jobType},lbda.job_type)>0 group by lbda.id, lbda.name, lbda.phone, lbda.type - limit 10 diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataDriverArteryServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataDriverArteryServiceImpl.java index 73c263bd4..07bad0f82 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataDriverArteryServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataDriverArteryServiceImpl.java @@ -140,7 +140,7 @@ public class BasicdataDriverArteryServiceImpl extends BaseServiceImpl basicdataDriverArteryVOS = new ArrayList<>(); - List list = baseMapper.selectListByWarehouseId(warehouseId); + List list = baseMapper.selectListByWarehouseId(warehouseId,"2"); log.info("################getDriverList list:{}", list); if(list.isEmpty()){