| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.BasCrnp; |
| | | import com.zy.asrs.entity.LocCount; |
| | | import com.zy.asrs.entity.LocDetl; |
| | |
| | | |
| | | return result; |
| | | } |
| | | public Map<String, Object> getLocInfo() { |
| | | List<LocMast> LocMasts = locMastMapper.selectList(new EntityWrapper<>()); |
| | | Map<String, Object> result = new HashMap<>(); |
| | | |
| | | // 初始化计数器 |
| | | int emptyLocCount = 0; |
| | | int fullZpalletCount = 0; |
| | | int emptyZpalletCount = 0; |
| | | int pickOutCount = 0; |
| | | int pickInCount = 0; |
| | | int outboundCount = 0; |
| | | int inboundCount = 0; |
| | | int disableCount = 0; |
| | | int mergeCount = 0; |
| | | |
| | | // 统计每种状态的库位数量 |
| | | for (LocMast locMast : LocMasts) { |
| | | String locSts = locMast.getLocSts(); |
| | | if (locSts.equals("O")) { |
| | | emptyLocCount++; |
| | | } else if (locSts.equals("F")) { |
| | | fullZpalletCount++; |
| | | } else if (locSts.equals("D")) { |
| | | emptyZpalletCount++; |
| | | } else if (locSts.equals("P")) { |
| | | pickOutCount++; |
| | | } else if (locSts.equals("Q")) { |
| | | pickInCount++; |
| | | } else if (locSts.equals("R")) { |
| | | outboundCount++; |
| | | } else if (locSts.equals("S")) { |
| | | inboundCount++; |
| | | } else if (locSts.equals("X")) { |
| | | disableCount++; |
| | | } else if (locSts.equals("Y")) { |
| | | mergeCount++; |
| | | } |
| | | } |
| | | |
| | | // 将统计结果放入Map中 |
| | | result.put("EmptyLoc", emptyLocCount); |
| | | result.put("FullZpallet", fullZpalletCount); |
| | | result.put("EmptyZpallet", emptyZpalletCount); |
| | | result.put("PickOut", pickOutCount); |
| | | result.put("PickIn", pickInCount); |
| | | result.put("Outbound", outboundCount); |
| | | result.put("Inbound", inboundCount); |
| | | result.put("Disable", disableCount); |
| | | result.put("Merge", mergeCount); |
| | | |
| | | return result; |
| | | } |
| | | } |