package com.ld.igds.three.util;
|
|
import com.ld.igds.common.CoreCommonService;
|
import com.ld.igds.models.Depot;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Component;
|
|
import java.util.List;
|
|
/**
|
* @author chen
|
*/
|
@Component
|
public class ThreeUtil {
|
|
@Autowired
|
private CoreCommonService commonService;
|
|
/**
|
* 获取仓库类型
|
* @param companyId
|
* @param depotId
|
* @return
|
*/
|
public String getDepotType(String companyId, String depotId){
|
List<Depot> depotList = commonService.getCacheDepotList(companyId);
|
String depotType = "";
|
for (Depot depot : depotList) {
|
if(depot.getId().equals(depotId)){
|
depotType = depot.getDepotType();
|
break;
|
}
|
}
|
return depotType;
|
}
|
|
}
|