@Override public String doGetValue(BookingNote obj) { if (obj.getSaler() == null) { return ""; } return obj.getSaler().getName(); }
@Override public BookingNote selectBookingNoteByLading(BookingNote note) throws RuntimeException { if (!StringUtils.hasText(note.getHawb()) && !StringUtils.hasText(note.getMawb())) { throw new IllegalArgumentException("通过提单号查询托单时,主副提单号不能同时为空。"); } BookingNote param = new BookingNote(); param.setId(note.getId()); if (StringUtils.hasText(note.getMawb())) { param.setMawb(note.getMawb()); } if (StringUtils.hasText(note.getHawb())) { param.setHawb(note.getHawb()); } return this.session.selectOne("select-logistics-bookingnote-bylading", param); }
@Override public int deleteBookingNote(BookingNote note) throws RuntimeException { note.setState(BookingNoteState.DELETED); // 将托单的状态设置为 '已删除' return updateBookingNoteState(note); }