| | |
| | | |
| | | /** |
| | | * 日志统计控制器层 |
| | | * |
| | | * @author admin |
| | | * @date 2018年11月23日 |
| | | */ |
| | |
| | | @RequestMapping("/report") |
| | | public class ReportQueryController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ReportQueryMapper reportQueryMapper; |
| | | @Autowired |
| | | private ReportQueryMapper reportQueryMapper; |
| | | |
| | | //------------------库位使用统计-------------------------------------- |
| | | @RequestMapping("/viewStockUseList.action") |
| | | public R queryViewStockUseListByPages(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam Map<String, Object> param){ |
| | | ViewStockUseBean bean = new ViewStockUseBean(); |
| | | bean.setPageSize(limit); |
| | | bean.setPageNumber(curr); |
| | | //------------------库位使用统计-------------------------------------- |
| | | @RequestMapping("/viewStockUseList.action") |
| | | public R queryViewStockUseListByPages(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam Map<String, Object> param) { |
| | | ViewStockUseBean bean = new ViewStockUseBean(); |
| | | bean.setPageSize(limit); |
| | | bean.setPageNumber(curr); |
| | | |
| | | Page<ViewStockUseBean> page = new Page<>(curr, limit); |
| | | IPage<ViewStockUseBean> list = reportQueryMapper.queryViewStockUseList(page, bean); |
| | | return R.ok(list); |
| | | } |
| | | Page<ViewStockUseBean> page = new Page<>(curr, limit); |
| | | IPage<ViewStockUseBean> list = reportQueryMapper.queryViewStockUseList(page, bean); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | // 导出 |
| | | @RequestMapping(value = "/viewStockUseExport.action") |
| | | @ManagerAuth(memo = "库位使用统计导出") |
| | | public R viewStockUseExport(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | List<ViewStockUseBean> list = reportQueryMapper.getViewStockUseAll(new ViewStockUseBean()); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | // 导出 |
| | | @RequestMapping(value = "/viewStockUseExport.action") |
| | | @ManagerAuth(memo = "库位使用统计导出") |
| | | public R viewStockUseExport(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | List<ViewStockUseBean> list = reportQueryMapper.getViewStockUseAll(new ViewStockUseBean()); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | //------------------库存滞留统计-------------------------------------- |
| | | @RequestMapping("/viewStayTimeList.action") |
| | | public Map<String,Object> queryViewStayTimeListByPages(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam Map<String, Object> param){ |
| | | ViewStayTimeBean bean = new ViewStayTimeBean(); |
| | | bean.setPageSize(limit); |
| | | bean.setPageNumber(curr); |
| | | String locNo = String.valueOf(param.get("locNo")); |
| | | if (!Cools.isEmpty(locNo) && !locNo.equals("null")) { |
| | | bean.setLocNo(locNo); |
| | | } |
| | | //------------------库存滞留统计-------------------------------------- |
| | | @RequestMapping("/viewStayTimeList.action") |
| | | public Map<String, Object> queryViewStayTimeListByPages(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam Map<String, Object> param) { |
| | | ViewStayTimeBean bean = new ViewStayTimeBean(); |
| | | bean.setPageSize(limit); |
| | | bean.setPageNumber(curr); |
| | | String locNo = String.valueOf(param.get("locNo")); |
| | | if (!Cools.isEmpty(locNo) && !locNo.equals("null")) { |
| | | bean.setLocNo(locNo); |
| | | } |
| | | if (!Cools.isEmpty(param.get("zpallet"))) { |
| | | bean.setZpallet(String.valueOf(param.get("zpallet"))); |
| | | } |
| | | Page<ViewStayTimeBean> page = new Page<>(curr, limit); |
| | | IPage<ViewStayTimeBean> list = reportQueryMapper.queryViewStayTimeList(page, bean); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | Page<ViewStayTimeBean> page = new Page<>(curr, limit); |
| | | IPage<ViewStayTimeBean> list = reportQueryMapper.queryViewStayTimeList(page, bean); |
| | | return R.ok(list); |
| | | } |
| | | // 导出 |
| | | @RequestMapping(value = "/viewStayTimeExport.action") |
| | | @ManagerAuth(memo = "库存滞留统计导出") |
| | | public R viewStayTimeExport(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map map = param.getObject("exportData", Map.class); |
| | | List<ViewStayTimeBean> list = reportQueryMapper.getViewStayTimeAll(map); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | // 导出 |
| | | @RequestMapping(value = "/viewStayTimeExport.action") |
| | | @ManagerAuth(memo = "库存滞留统计导出") |
| | | public R viewStayTimeExport(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map map = param.getObject("exportData", Map.class); |
| | | List<ViewStayTimeBean> list = reportQueryMapper.getViewStayTimeAll(map); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | //------------------站点日入出库次数统计-------------------------------------- |
| | | @RequestMapping("/viewInOutList.action") |
| | | public Map<String, Object> viewInOutList(@RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit, |
| | | @RequestParam Map<String, Object> param) { |
| | | ViewInOutBean bean = new ViewInOutBean(); |
| | | bean.setPageSize(limit); |
| | | bean.setPageNumber(curr); |
| | | Page<ViewInOutBean> page = new Page<>(curr, limit); |
| | | IPage<ViewInOutBean> list = reportQueryMapper.queryViewInOutList(page, bean); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | //------------------站点日入出库次数统计-------------------------------------- |
| | | @RequestMapping("/viewInOutList.action") |
| | | public Map<String,Object> viewInOutList(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam Map<String, Object> param){ |
| | | ViewInOutBean bean = new ViewInOutBean(); |
| | | bean.setPageSize(limit); |
| | | bean.setPageNumber(curr); |
| | | Page<ViewInOutBean> page = new Page<>(curr, limit); |
| | | IPage<ViewInOutBean> list = reportQueryMapper.queryViewInOutList(page, bean); |
| | | return R.ok(list); |
| | | } |
| | | //------------------日入库明细统计-------------------------------------- |
| | | @RequestMapping("/viewWorkInList.action") |
| | | public Map<String, Object> viewWorkInList(ViewWorkInBean bean) { |
| | | Page<ViewWorkInBean> page = new Page<>(bean.getPageNumber(), bean.getPageSize()); |
| | | IPage<ViewWorkInBean> list = reportQueryMapper.queryViewWorkInList(page, bean); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | //------------------日入库明细统计-------------------------------------- |
| | | @RequestMapping("/viewWorkInList.action") |
| | | public Map<String,Object> viewWorkInList(ViewWorkInBean bean){ |
| | | Page<ViewWorkInBean> page = new Page<>(bean.getPageNumber(), bean.getPageSize()); |
| | | IPage<ViewWorkInBean> list = reportQueryMapper.queryViewWorkInList(page, bean); |
| | | return R.ok(list); |
| | | } |
| | | //excel导出 |
| | | @RequestMapping("/viewWorkInExport.action") |
| | | @ManagerAuth(memo = "日入库明细统计导出") |
| | | public R viewWorkInExport(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | @SuppressWarnings("unchecked") |
| | | ViewWorkInBean bean = Cools.conver((Map<? extends String, ?>) param.get("exportData"), ViewWorkInBean.class); |
| | | bean.setQueryDate(bean.getQueryDate()); |
| | | Map map = JSON.parseObject(JSON.toJSONString(bean), Map.class); |
| | | List<ViewWorkInBean> list = reportQueryMapper.getViewWorkInAll(map); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | //excel导出 |
| | | @RequestMapping("/viewWorkInExport.action") |
| | | @ManagerAuth(memo = "日入库明细统计导出") |
| | | public R viewWorkInExport(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | @SuppressWarnings("unchecked") |
| | | ViewWorkInBean bean = Cools.conver((Map<? extends String, ?>) param.get("exportData"), ViewWorkInBean.class); |
| | | bean.setQueryDate(bean.getQueryDate()); |
| | | Map map = JSON.parseObject(JSON.toJSONString(bean), Map.class); |
| | | List<ViewWorkInBean> list = reportQueryMapper.getViewWorkInAll(map); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | //------------------日出库明细统计-------------------------------------- |
| | | @RequestMapping("/viewWorkOutList.action") |
| | | public R viewWorkOutList(ViewWorkInBean bean) { |
| | | Page<ViewWorkInBean> page = new Page<>(bean.getPageNumber(), bean.getPageSize()); |
| | | IPage<ViewWorkInBean> list = reportQueryMapper.queryViewWorkOutList(page, bean); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | //------------------日出库明细统计-------------------------------------- |
| | | @RequestMapping("/viewWorkOutList.action") |
| | | public R viewWorkOutList(ViewWorkInBean bean){ |
| | | Page<ViewWorkInBean> page = new Page<>(bean.getPageNumber(), bean.getPageSize()); |
| | | IPage<ViewWorkInBean> list = reportQueryMapper.queryViewWorkOutList(page, bean); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | //excel导出 |
| | | @RequestMapping("/viewWorkOutExport.action") |
| | | @ManagerAuth(memo = "日出库明细统计导出") |
| | | public R viewWorkOutExport(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | @SuppressWarnings("unchecked") |
| | | ViewWorkInBean bean = Cools.conver((Map<? extends String, ?>) param.get("exportData"), ViewWorkInBean.class); |
| | | bean.setQueryDate(bean.getQueryDate()); |
| | | Map map = JSON.parseObject(JSON.toJSONString(bean), Map.class); |
| | | List<ViewWorkInBean> list = reportQueryMapper.getViewWorkOutAll(map); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | //excel导出 |
| | | @RequestMapping("/viewWorkOutExport.action") |
| | | @ManagerAuth(memo = "日出库明细统计导出") |
| | | public R viewWorkOutExport(@RequestBody JSONObject param) { |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | @SuppressWarnings("unchecked") |
| | | ViewWorkInBean bean = Cools.conver((Map<? extends String, ?>) param.get("exportData"), ViewWorkInBean.class); |
| | | bean.setQueryDate(bean.getQueryDate()); |
| | | Map map = JSON.parseObject(JSON.toJSONString(bean), Map.class); |
| | | List<ViewWorkInBean> list = reportQueryMapper.getViewWorkOutAll(map); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | } |