Commit 1f11eca7 authored by zhengyi's avatar zhengyi

Merge branch 'test' into release

parents 878bf442 7a1bc4bb
...@@ -56,28 +56,27 @@ ...@@ -56,28 +56,27 @@
<if test="params.destWarehouseId != null and params.destWarehouseId != 0"> <if test="params.destWarehouseId != null and params.destWarehouseId != 0">
and ewl.dest_warehouse_id = #{params.destWarehouseId} and ewl.dest_warehouse_id = #{params.destWarehouseId}
</if> </if>
<!--目的地-->
<!--目的地--> <if test="params.destCityIds != null and params.destCityIds.size()>0 ">
<if test="params.destCityIds != null and params.destCityIds.size()>0 "> and ew_dest.`shi` in
and ew_dest.`shi` in <foreach item='destCity' index='index' collection='params.destCityIds' open='(' separator=',' close=')'>
<foreach item='destCity' index='index' collection='params.destCityIds' open='(' separator=',' close=')'> #{destCity}
#{destCity} </foreach>
</foreach> </if>
</if> <!--目的国-->
<!--目的国--> <if test="params.destCountryIds != null and params.destCountryIds.size()>0 ">
<if test="params.destCountryIds != null and params.destCountryIds.size()>0 "> and ew_dest.`guojia` in
and ew_dest.`guojia` in <foreach item='destCountry' index='index' collection='params.destCountryIds' open='(' separator=',' close=')'>
<foreach item='destCountry' index='index' collection='params.destCountryIds' open='(' separator=',' close=')'> #{destCountry}
#{destCountry} </foreach>
</foreach> </if>
</if> <!--目的仓-->
<!--目的仓--> <if test="params.destWarehouseIds != null and params.destWarehouseIds.size()>0 ">
<if test="params.destWarehouseIds != null and params.destWarehouseIds.size()>0 "> and ewl.dest_warehouse_id in
and ewl.dest_warehouse_id in <foreach item='destWarehouse' index='index' collection='params.destWarehouseIds' open='(' separator=',' close=')'>
<foreach item='destWarehouse' index='index' collection='params.destWarehouseIds' open='(' separator=',' close=')'> #{destWarehouse}
#{destWarehouse} </foreach>
</foreach> </if>
</if>
<if test="params.lineId != null and params.lineId != 0"> <if test="params.lineId != null and params.lineId != 0">
and ewl.id = #{params.lineId} and ewl.id = #{params.lineId}
......
...@@ -217,15 +217,17 @@ public class WarehouseController { ...@@ -217,15 +217,17 @@ public class WarehouseController {
channelInfoEvent.setChannelId(requestVO.getChannelId()); channelInfoEvent.setChannelId(requestVO.getChannelId());
applicationContext.publishEvent(channelInfoEvent); applicationContext.publishEvent(channelInfoEvent);
if (Objects.nonNull(channelInfoEvent.getCountryId()) && channelInfoEvent.getCountryId() > 0L){ if (Objects.nonNull(channelInfoEvent.getCountryId()) && channelInfoEvent.getCountryId() > 0L){
if (Objects.nonNull(requestVO.getDestCountryIds()) && requestVO.getDestCountryIds().size() > 0 ) { if (Objects.nonNull(requestVO.getDestCountryId()) && requestVO.getDestCountryId() > 0L && !Objects.equals(requestVO.getDestCountryId(),channelInfoEvent.getCountryId())) {
List<Long> destCountryIds = requestVO.getDestCountryIds(); return error(400,"目的国与渠道不匹配");
for(Long countryid:destCountryIds) { }else {
if(!Objects.equals(countryid,channelInfoEvent.getCountryId())) { if (Objects.nonNull(requestVO.getDestCountryIds()) && requestVO.getDestCountryIds().size() > 0) {
return error(400,"目的国与渠道不匹配"); List<Long> destCountryIds = requestVO.getDestCountryIds();
if (!destCountryIds.contains(channelInfoEvent.getCountryId())) {
return error(400, "目的国与渠道不匹配");
} }
} }
} }
//requestVO.setDestCountryId(channelInfoEvent.getCountryId()); requestVO.setDestCountryId(channelInfoEvent.getCountryId());
} }
} }
List<WarehouseLineDO> list = warehouseService.openedRouterList(requestVO); List<WarehouseLineDO> list = warehouseService.openedRouterList(requestVO);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment