| | |
| | | return R.ok(page); |
| | | } |
| | | |
| | | @RequestMapping("/viewInOutList/count") |
| | | public R getAllCount() { |
| | | ViewInOutBean bean = new ViewInOutBean(); |
| | | bean.setPageSize(99999); |
| | | bean.setPageNumber(1); |
| | | List<ViewInOutBean> list = new ArrayList<>(); |
| | | Map<String, Double> map = new HashMap<>(); |
| | | Double in = 0.0; |
| | | Double out = 0.0; |
| | | list = reportQueryMapper.queryViewInOutListDay(bean); |
| | | for (ViewInOutBean bean1 : list) { |
| | | in += bean1.getSto_qty().doubleValue(); |
| | | out += bean1.getRet_qty().doubleValue(); |
| | | } |
| | | map.put("in", in); |
| | | map.put("out", out); |
| | | return R.ok(map); |
| | | } |
| | | |
| | | /** |
| | | * 获取库存总数 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/viewInOutList/date/count") |
| | | public R getCount(@RequestBody Map<String, String> param){ |
| | | ViewInOutBean bean = new ViewInOutBean(); |
| | | bean.setPageSize(99999); |
| | | bean.setPageNumber(1); |
| | | if (!Cools.isEmpty(param.get("modi_time"))) { |
| | | String[] dates = param.get("modi_time").toString().split(RANGE_TIME_LINK); |
| | | bean.setBegin_date(dates[0]); |
| | | bean.setEnd_date(dates[1]); |
| | | } |
| | | Map<String, Double> map = new HashMap<>(); |
| | | Double in = 0.0; |
| | | Double out = 0.0; |
| | | List<ViewInOutBean> list = new ArrayList<>(); |
| | | if (param.get("type") == null || param.get("type").equals(1)) { |
| | | list = reportQueryMapper.queryViewInOutListDay(bean); |
| | | }else if ( param.get("type").equals("2")) { |
| | | list = reportQueryMapper.queryViewInOutListMonth(bean); |
| | | } else if (param.get("type").equals("3")) { |
| | | list = reportQueryMapper.queryViewInOutListYear(bean); |
| | | }else { |
| | | list = reportQueryMapper.queryViewInOutListDay(bean); |
| | | |
| | | } |
| | | for (ViewInOutBean bean1 : list) { |
| | | in += bean1.getSto_qty().doubleValue(); |
| | | out += bean1.getRet_qty().doubleValue(); |
| | | } |
| | | map.put("in", in); |
| | | map.put("out", out); |
| | | return R.ok(map); |
| | | } |
| | | |
| | | //excel导出 |
| | | @RequestMapping("/viewInOutExport.action") |
| | | @ManagerAuth(memo = "站点日入出库次数统计导出") |