public void update(IBaseDTO dto) { // TODO Auto-generated method stub OperInquiryCard inquiryCard = (OperInquiryCard) dao.loadEntity(OperInquiryCard.class, dto.get("id").toString()); inquiryCard.setAlternatives(dto.get("alternatives").toString()); inquiryCard.setDictQuestionType(dto.get("questionType").toString()); inquiryCard.setQuestion(dto.get("question").toString()); }
public IBaseDTO getInquiryCardInfo(String id) { // TODO Auto-generated method stub OperInquiryCard po = (OperInquiryCard) dao.loadEntity(OperInquiryCard.class, id); IBaseDTO dto = new DynaBeanDTO(); dto.set("questionType", po.getDictQuestionType()); dto.set("question", po.getQuestion()); dto.set("alternatives", po.getAlternatives()); dto.set("id", po.getId()); dto.set("createTime", TimeUtil.getTheTimeStr(po.getCreateTime(), "yyyy-MM-dd")); return dto; }