|
|
|
@ -37,6 +37,8 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
@ -76,14 +78,19 @@ public class AftersalesAbnormalPackageServiceImpl extends BaseServiceImpl<Afters
|
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public List<AftersalesAbnormalPackageVO> getAbnormalPackage(Map<String, Object> aftersalesAbnormalPackage, IPage<Object> page) { |
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); |
|
|
|
|
|
|
|
|
|
List<Long> warehouseIds = new ArrayList<>(); |
|
|
|
|
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse(); |
|
|
|
|
AftersalesAbnormalPackageEntity aftersalesAbnormalPackageEntity = JSONObject.parseObject(JSONObject.toJSONString(aftersalesAbnormalPackage), AftersalesAbnormalPackageEntity.class); |
|
|
|
|
if(ObjectUtils.isNotNull(myCurrentWarehouse)){ |
|
|
|
|
aftersalesAbnormalPackageEntity.setWarehouseId(myCurrentWarehouse.getId()); |
|
|
|
|
warehouseIds.add(myCurrentWarehouse.getId()); |
|
|
|
|
}else{ |
|
|
|
|
// 获取全部仓库
|
|
|
|
|
for (BasicdataWarehouseEntity basicdataWarehouseEntity : warehouseClient.getMyWarehouseList()) { |
|
|
|
|
warehouseIds.add(basicdataWarehouseEntity.getId()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
List<AftersalesAbnormalPackageVO> abnormalPackage = baseMapper.getAbnormalPackage(aftersalesAbnormalPackageEntity); |
|
|
|
|
List<AftersalesAbnormalPackageVO> abnormalPackage = baseMapper.getAbnormalPackage(aftersalesAbnormalPackageEntity,warehouseIds); |
|
|
|
|
abnormalPackage.forEach(i ->{ |
|
|
|
|
if (ObjectUtils.isNotNull(i.getPackageCode())){ |
|
|
|
|
i.setTrunklines( baseMapper.getTrunklines(i.getPackageCode())); |
|
|
|
|