| | |
| | | |
| | | public void listBookStore(Page<DepotBookStore> page, Map<String, Object> param) throws Exception { |
| | | StringBuffer hql = new StringBuffer(); |
| | | hql.append(" from " + DepotBookStore.class.getName() + " where companyId =:companyId and kqdm =:deptId "); |
| | | hql.append(" from " + DepotBookStore.class.getName() + " where companyId =:companyId and deptId =:deptId "); |
| | | Map<String, Object> args = new HashMap<>(); |
| | | args.put("companyId", ContextUtil.getCompanyId()); |
| | | args.put("deptId", ContextUtil.subDeptId(null)); |
| | |
| | | try { |
| | | if (null == data.getId()) { |
| | | data.setId(ContextUtil.getUUID()); |
| | | data.setKqdm(ContextUtil.subDeptId(null)); |
| | | data.setDeptId(ContextUtil.subDeptId(null)); |
| | | data.setCompanyId(ContextUtil.getCompanyId()); |
| | | data.setCzbz("i"); |
| | | session.save(data); |
| | | } else { |
| | | data.setCzbz("u"); |
| | | session.update(data); |
| | | } |
| | | } catch (Exception e) { |