Commit 1f11eca7 authored by zhengyi's avatar zhengyi

Merge branch 'test' into release

parents 878bf442 7a1bc4bb
......@@ -56,28 +56,27 @@
<if test="params.destWarehouseId != null and params.destWarehouseId != 0">
and ewl.dest_warehouse_id = #{params.destWarehouseId}
</if>
<!--目的地-->
<if test="params.destCityIds != null and params.destCityIds.size()>0 ">
and ew_dest.`shi` in
<foreach item='destCity' index='index' collection='params.destCityIds' open='(' separator=',' close=')'>
#{destCity}
</foreach>
</if>
<!--目的国-->
<if test="params.destCountryIds != null and params.destCountryIds.size()>0 ">
and ew_dest.`guojia` in
<foreach item='destCountry' index='index' collection='params.destCountryIds' open='(' separator=',' close=')'>
#{destCountry}
</foreach>
</if>
<!--目的仓-->
<if test="params.destWarehouseIds != null and params.destWarehouseIds.size()>0 ">
and ewl.dest_warehouse_id in
<foreach item='destWarehouse' index='index' collection='params.destWarehouseIds' open='(' separator=',' close=')'>
#{destWarehouse}
</foreach>
</if>
<!--目的地-->
<if test="params.destCityIds != null and params.destCityIds.size()>0 ">
and ew_dest.`shi` in
<foreach item='destCity' index='index' collection='params.destCityIds' open='(' separator=',' close=')'>
#{destCity}
</foreach>
</if>
<!--目的国-->
<if test="params.destCountryIds != null and params.destCountryIds.size()>0 ">
and ew_dest.`guojia` in
<foreach item='destCountry' index='index' collection='params.destCountryIds' open='(' separator=',' close=')'>
#{destCountry}
</foreach>
</if>
<!--目的仓-->
<if test="params.destWarehouseIds != null and params.destWarehouseIds.size()>0 ">
and ewl.dest_warehouse_id in
<foreach item='destWarehouse' index='index' collection='params.destWarehouseIds' open='(' separator=',' close=')'>
#{destWarehouse}
</foreach>
</if>
<if test="params.lineId != null and params.lineId != 0">
and ewl.id = #{params.lineId}
......
......@@ -217,15 +217,17 @@ public class WarehouseController {
channelInfoEvent.setChannelId(requestVO.getChannelId());
applicationContext.publishEvent(channelInfoEvent);
if (Objects.nonNull(channelInfoEvent.getCountryId()) && channelInfoEvent.getCountryId() > 0L){
if (Objects.nonNull(requestVO.getDestCountryIds()) && requestVO.getDestCountryIds().size() > 0 ) {
List<Long> destCountryIds = requestVO.getDestCountryIds();
for(Long countryid:destCountryIds) {
if(!Objects.equals(countryid,channelInfoEvent.getCountryId())) {
return error(400,"目的国与渠道不匹配");
if (Objects.nonNull(requestVO.getDestCountryId()) && requestVO.getDestCountryId() > 0L && !Objects.equals(requestVO.getDestCountryId(),channelInfoEvent.getCountryId())) {
return error(400,"目的国与渠道不匹配");
}else {
if (Objects.nonNull(requestVO.getDestCountryIds()) && requestVO.getDestCountryIds().size() > 0) {
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);
......
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