|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public List<InoutRecord> listInoutRecord(Phone35InoutCommonParam param) { | 
|---|
|  |  |  | String hql = " from " + InoutRecord.class.getName() + " where companyId =:companyId" | 
|---|
|  |  |  | + " and recordStatus <>:recordStatus1 and recordStatus <>:recordStatus2"; | 
|---|
|  |  |  | + " and recordStatus <>:recordStatus1 "; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Map<String, Object> args = new HashMap<String, Object>(); | 
|---|
|  |  |  | args.put("companyId", param.getCompanyId()); | 
|---|
|  |  |  | args.put("recordStatus1", InoutConstant.RECORD_STATUS_DEL); | 
|---|
|  |  |  | args.put("recordStatus2", InoutConstant.RECORD_STATUS_ERROR); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (StringUtils.isNotEmpty(param.getDeptId())) { | 
|---|
|  |  |  | hql += " and deptId =:deptId"; | 
|---|
|  |  |  | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public InoutRecord getInoutRecord(String companyId, String deptId, String id, String intelCard) { | 
|---|
|  |  |  | String hql = " from " + InoutRecord.class.getName() + " where" + " recordStatus <>:recordStatus1 and recordStatus <>:recordStatus2"; | 
|---|
|  |  |  | String hql = " from " + InoutRecord.class.getName() + " where" + " recordStatus <>:recordStatus1 "; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Map<String, Object> args = new HashMap<String, Object>(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | args.put("recordStatus1", InoutConstant.RECORD_STATUS_DEL); | 
|---|
|  |  |  | args.put("recordStatus2", InoutConstant.RECORD_STATUS_ERROR); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (StringUtils.isNotEmpty(companyId)) { | 
|---|
|  |  |  | hql += " and companyId =:companyId"; | 
|---|
|  |  |  | 
|---|
|  |  |  | hql += " and intelCard =:intelCard"; | 
|---|
|  |  |  | args.put("intelCard", intelCard); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | hql += " order by registerTime"; | 
|---|
|  |  |  | hql += " order by registerTime desc"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | List<InoutRecord> list = this.query(hql, args); | 
|---|
|  |  |  | if (null == list || list.isEmpty()) { | 
|---|