| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.List; |
| | |
| | | private EventInfoService eventInfoService; |
| | | @Resource |
| | | private SnapRecordService snapRecordService; |
| | | @Resource |
| | | private GatewaySerService gatewaySerService; |
| | | |
| | | /** |
| | | * 根据库区编码获取库区网关信息 |
| | | * @param deptId |
| | | * @return |
| | | */ |
| | | public GatewaySer getGatewaySerByDeptId(String deptId) { |
| | | if(StringUtils.isBlank(deptId)){ |
| | | deptId = ContextUtil.subDeptId(null); |
| | | } |
| | | |
| | | return gatewaySerService.getCacheSerByDeptId(deptId); |
| | | } |
| | | |
| | | /** |
| | | * 根据库区编码获取库区下所有仓库列表 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 根据仓库类型获取库区下仓库列表 |
| | | * @param deptId |
| | | * @param depotTypes 类型多个,用逗号隔开 |
| | | * @return |
| | | */ |
| | | public List<Depot> listAllDepot(String deptId, String depotTypes) { |
| | | |
| | | List<Depot> depots = this.listDepotByDeptId(deptId); |
| | | if(null == depots || depots.isEmpty()){ |
| | | return null; |
| | | } |
| | | |
| | | List<Depot> result = new ArrayList<>(); |
| | | for (Depot depot : depots) { |
| | | if (depotTypes.contains(depot.getDepotType())) { |
| | | result.add(depot); |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * @return |
| | | */ |
| | | public List<SysDictData> getInoutType() { |