| | |
| | | public void pageQueryIn(Page<InoutNoticeIn> page, Map<String, Object> param) throws Exception { |
| | | |
| | | String hql = " from " + InoutNoticeIn.class.getName() |
| | | + " where companyId =:companyId"; |
| | | + " where companyId =:companyId and deptId =:deptId"; |
| | | |
| | | Map<String, Object> args = new HashMap<String, Object>(); |
| | | args.put("companyId", ContextUtil.getCompanyId()); |
| | | args.put("deptId", ContextUtil.subDeptId(null)); |
| | | |
| | | Object year = param.get("year"); |
| | | if (year == null) { |
| | | param.put("year", DateFormatUtils.format(new Date(), "yyyy")); |
| | | } |
| | | |
| | | String str = (String) param.get("deptId"); |
| | | if (StringUtils.isNotEmpty(str)) { |
| | | hql += " and deptId =:deptId"; |
| | | args.put("deptId", str); |
| | | } |
| | | |
| | | str = (String) param.get("id"); |
| | | String str = (String) param.get("id"); |
| | | if (StringUtils.isNotEmpty(str)) { |
| | | hql += " and id=:id"; |
| | | args.put("id", str); |
| | |
| | | public void pageQueryOut(Page<InoutNoticeOut> page, Map<String, Object> param) throws Exception { |
| | | |
| | | String hql = " from " + InoutNoticeOut.class.getName() |
| | | + " where companyId =:companyId"; |
| | | + " where companyId =:companyId and deptId =:deptId"; |
| | | |
| | | Map<String, Object> args = new HashMap<String, Object>(); |
| | | args.put("companyId", ContextUtil.getCompanyId()); |
| | | args.put("deptId", ContextUtil.subDeptId(null)); |
| | | |
| | | Object year = param.get("year"); |
| | | if (year == null) { |
| | | param.put("year", DateFormatUtils.format(new Date(), "yyyy")); |
| | | } |
| | | |
| | | String str = (String) param.get("deptId"); |
| | | if (StringUtils.isNotEmpty(str)) { |
| | | hql += " and deptId =:deptId"; |
| | | args.put("deptId", str); |
| | | } |
| | | |
| | | str = (String) param.get("id"); |
| | | String str = (String) param.get("id"); |
| | | if (StringUtils.isNotEmpty(str)) { |
| | | hql += " and id =:id"; |
| | | args.put("id", str); |
| | |
| | | } |
| | | |
| | | str = (String) parameter.get("key"); |
| | | if (StringUtils.isNoneEmpty(str)) { |
| | | if (StringUtils.isNotEmpty(str)) { |
| | | hql += " and (name like:name or customerName like:customerName) "; |
| | | args.put("name", "%" + str + "%"); |
| | | args.put("customerName", "%" + str + "%"); |