class WaterController {

	@PostMapping("/querywater")
	public ResBodyData queryWater(@RequestParam(value = "pageNumber", defaultValue = "1") int pageNumber,
			@RequestParam(value = "pageSize", defaultValue = "20") int pageSize,
			@RequestParam(value = "type", defaultValue = "list") String type,
			@RequestParam Map<String, Object> params, String waterType) {
		
		if ("list".equals(type)) {
			PageHelper.startPage(pageNumber, pageSize);
		}

		if (!Strings.isNullOrEmpty(waterType)) {// 流水类型可传多个参数，用逗号隔开
			List<String> waterTypeList = Arrays.asList(waterType.split(","));
			params.put("waterType", waterTypeList);
		}

		List<EcmMzfWater> waterList = agentService.getWaterList(params);
		int total = agentService.getWaterCount(params);

		Map<String, Object> map = Maps.newHashMap();
		map.put("waterList", waterList);
		map.put("total", total);

		return SettlementUtil.success(map);

	}

}