| | |
| | | import com.fzzy.igds.service.*; |
| | | import com.fzzy.igds.utils.ContextUtil; |
| | | import com.fzzy.igds.utils.DateUtil; |
| | | import com.fzzy.work.data.OrderStatus; |
| | | import com.fzzy.work.data.WorkStatus; |
| | | import com.fzzy.work.service.WorkOrderService; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | |
| | | 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); |
| | | } |
| | | |
| | | /** |
| | | * 根据库区编码获取库区下所有仓库列表 |
| | |
| | | } catch (Exception e) { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据仓库类型获取库区下仓库列表 |
| | | * @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; |
| | | } |
| | | |
| | | /** |
| | |
| | | MainData mainData = new MainData(); |
| | | |
| | | //待办工单数 |
| | | Integer orderNum = workOrderService.getNumByUser(OrderStatus.STATUS_30.getCode(), user.getLoginName()); |
| | | Integer orderNum = workOrderService.getTodoNumByUser(user); |
| | | mainData.setOrderNum(orderNum); |
| | | |
| | | //统计出入库信息 |