| | |
| | | Map<String, Object> params = new HashMap<String, Object>(); |
| | | params.put("containerCode", containerCode); |
| | | params.put("editId", editId); |
| | | |
| | | int count = this.sysLaboratoryContainerDao.getSysLaboratoryContainerTotalCount(params); |
| | | int count = this.sysLaboratoryContainerDao.getSysLaboratoryContainerExist(params); |
| | | return count > 0; |
| | | } catch (DataAccessException e) { |
| | | logger.error(e.getMessage(), e); |
| | |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public boolean delBySlcIds(List<SysLaboratory> sysLaboratoryList) { |
| | | try { |
| | | if (sysLaboratoryList == null || sysLaboratoryList.size() == 0) { |
| | | return false; |
| | | } |
| | | |
| | | List<String> ids = new ArrayList<String>(); |
| | | for (SysLaboratory sysLaboratory : sysLaboratoryList) { |
| | | ids.add(sysLaboratory.getId()); |
| | | } |
| | | |
| | | int row = this.sysLaboratoryContainerDao.delSlcIds(ids); |
| | | return row != 0; |
| | | } catch (DataIntegrityViolationException ex) { |
| | | logger.warn(ex.getMessage(), ex); |
| | | throw new AlarmException(AlarmCode.DATA_CONFICT, MessageUtil.getMessage(AlarmCode.DATA_CONFICT.getCode())); |
| | | } catch (DataAccessException ex) { |
| | | logger.error(ex.getMessage(), ex); |
| | | throw new BusinessException(ExceptionEnumCode.DB_ERR, |
| | | MessageUtil.getMessageByCode(ExceptionEnumCode.DB_ERR.getCode()), ex); |
| | | } |
| | | } |
| | | |
| | | } |