@RemoteMethod
 public ListRange findAll(
     TemplateShareGroupDetailDto filter, SortField[] sortFields, int start, int limit) {
   ListRange lr = new ListRange();
   String hql =
       "FROM TemplateShareGroupDetail WHERE templateShare.templateFile.id = ? AND "
           + BusinessConstant.FIND_NOT_INCLUDE_DELETE_HQL
           + " ORDER BY create_date DESC";
   int count = 0;
   List<TemplateShareGroupDetail> list =
       templateShareGroupDetailDaoImpl.findAll(hql, start, limit, filter.getTemplateFileId());
   List<TemplateShareGroupDetailDto> dtoList = new ArrayList<TemplateShareGroupDetailDto>();
   for (TemplateShareGroupDetail templateShareGroupDetail : list) {
     TemplateShareGroupDetailDto templateShareGroupDetailDto =
         dozerAssembly.bean2Dto(templateShareGroupDetail, TemplateShareGroupDetailDto.class);
     templateShareGroupDetailDto.setCreate_date(
         DateUtils.DateToDateTimeString(templateShareGroupDetail.getCreate_date()));
     if (templateShareGroupDetail.getAccount() != null
         && templateShareGroupDetail.getAccount().getPerson() != null)
       templateShareGroupDetailDto.setPersonName(
           templateShareGroupDetail.getAccount().getPerson().getName());
     dtoList.add(templateShareGroupDetailDto);
   }
   count = templateShareGroupDetailDaoImpl.getCount(hql, filter.getTemplateFileId());
   lr.setData(dtoList);
   lr.setTotalSize(count);
   return lr;
 }
Exemplo n.º 2
0
 /** 根据ID查询 */
 @RemoteMethod
 public BpmConfigDto findById(String id) {
   BpmConfig bpmConfig = bpmConfigDaoImpl.findById(id);
   BpmConfigDto templateConfigDto = dozerAssembly.bean2Dto(bpmConfig, BpmConfigDto.class);
   templateConfigDto.setBpmTemplateDto(esbService.getBpmTemplateDto(bpmConfig.getFlow_code()));
   // templateConfigDto.setFlow_code(DictionaryUtils.getItemNameByGroupCode("flow",
   // templateConfigDto.getFlow_code()));
   if (bpmConfig.getFormEntity() != null && bpmConfig.getFormEntity().getFormTree() != null) {
     FormTree formTree = bpmConfig.getFormEntity().getFormTree();
     TreeDto treeDto = new TreeDto();
     treeDto.setId(formTree.getId());
     treeDto.setText(formTreeService.getParentText(formTree.getId()) + "/" + formTree.getText());
     treeDto.setPath(
         formTreeService.getParentPath(formTree.getId()) + "/" + formTree.getId() + "/");
     templateConfigDto.setTreeDto(treeDto);
   }
   return templateConfigDto;
 }