Package com.sogou.qadev.service.cynthia.bean

Examples of com.sogou.qadev.service.cynthia.bean.Template


    String fieldIdStr = request.getParameter("fieldId");
    String startTime = request.getParameter("startTime");
    String endTime = request.getParameter("endTime");
    String[] statisticOption = request.getParameterValues("statisticOption[]");
   
     Template template = das.queryTemplate(DataAccessFactory.getInstance().createUUID(templateIdStr));
    
     Flow flow = das.queryFlow(template.getFlowId());
    
     Timestamp startTimestamp = null;
     if (startTime != null && !startTime.equals("null") && startTime.length() > 0) {
      startTimestamp = Date.valueOf(startTime).toTimestamp();
    }
    
     Timestamp endTimestamp = null;
     if (endTime != null && !endTime.equals("null") && endTime.length() > 0) {
       endTimestamp = Date.valueOf(endTime).toTimestamp();
    }
    
     String name = template.getName();
    
     if (fieldIdStr.equals("createUser")) {
      name += ":创建人";
    }else if (fieldIdStr.equals("assignUser")) {
      name += ":指派人";
    }else if (fieldIdStr.equals("statusId")) {
      name += ":状态";
    }else if (CommonUtil.isPosNum(fieldIdStr)) {
      //表单字段
      Field field = template.getField(DataAccessFactory.getInstance().createUUID(fieldIdStr));
      if (field == null) {
        return "";
      }
      name += ":"+field.getName();
    }
View Full Code Here


   
    String taskBugColName = FieldNameCache.getInstance().getFieldName(taskBugFieldStr, templateIdStr);
   
    String [] allBugArr = new DataAccessSessionMySQL().queryFieldByTemplate(DataAccessFactory.getInstance().createUUID(templateIdStr), taskBugColName);
   
    Template bugTemplate = null;
    if (allBugArr != null) {
      for (String bugIds : allBugArr) {
        if (bugTemplate == null) {
          String[] bugIdArr = bugIds.split(",");
          if (bugIdArr != null && bugIdArr.length > 0) {
            Data data = das.queryData(DataAccessFactory.getInstance().createUUID(bugIdArr[0]));
            if (data != null) {
              bugTemplate = das.queryTemplate(data.getTemplateId());
            }
          }
        }else {
          break;
        }
      }
    }
   
    if (bugTemplate == null) {
      return "";
    }
   
     Flow flow = das.queryFlow(bugTemplate.getFlowId());
     if (flow != null) {
       for (Stat stat : flow.getStats()) {
          allFieldSet.add(new StatisticField(stat.getId().getValue(), stat.getName()));
       }
    }
View Full Code Here

  @ResponseBody
  @RequestMapping("/getTemplateRole.do")
  public String getTemplateRole(@RequestParam("templateId") String templateIdStr) throws Exception {
    UUID templateId = DataAccessFactory.getInstance().createUUID(templateIdStr);
   
    Template template = das.queryTemplate(templateId);
    if (template == null) {
      return "";
    }
    Flow flow = das.queryFlow(template.getFlowId());
    if (flow == null) {
      return "";
    }
   
    Role[] allRoles = flow.getRoles();
View Full Code Here

    if (roleIdStr == null || roleIdStr.length() == 0 || templateIdStr == null || templateIdStr.length() == 0) {
      return "";
    }
    UUID roleId = DataAccessFactory.getInstance().createUUID(roleIdStr);
   
    Template template = das.queryTemplate(DataAccessFactory.getInstance().createUUID(templateIdStr));
   
    Flow flow = das.queryFlow(template.getFlowId());
   
    List<UserInfo> allQuitUserList = getAllQuitUser(template, flow, roleId);
   
    JSONArray json = JSONArray.fromObject(allQuitUserList);
    return json.toString();
View Full Code Here

    if (roleIdStr == null || roleIdStr.length() == 0 || templateIdStr == null || templateIdStr.length() == 0) {
      return "";
    }
    UUID roleId = DataAccessFactory.getInstance().createUUID(roleIdStr);
   
    Template template = das.queryTemplate(DataAccessFactory.getInstance().createUUID(templateIdStr));
   
    Flow flow = das.queryFlow(template.getFlowId());
   
    List<UserInfo> allQuitUserList = flow.queryAllUserInfo(roleId);
    JSONArray json = JSONArray.fromObject(allQuitUserList);
    return json.toString();
  }
View Full Code Here

   */
  @ResponseBody
  @RequestMapping("/getUserNoCloseData.do")
  public String getUserNoCloseData(@RequestParam("templateId") String templateIdStr , @RequestParam("userName") String userName) throws Exception {
    UUID templateId = DataAccessFactory.getInstance().createUUID(templateIdStr);
    Template template = das.queryTemplate(templateId);
    if (template == null || userName == null || userName.equals("") ) {
      return "";
    }
    Flow flow = das.queryFlow(template.getFlowId());
    if (flow == null ) {
      return "";
    }
    List<Data> allDatas = getTemplateUserNoCloseData(template, flow, userName);
    JSONArray json = JSONArray.fromObject(allDatas);
View Full Code Here

      return "表单不能为空";
    }
    UUID templateId = DataAccessFactory.getInstance().createUUID(templateIdStr);
   
   
    Template template = das.queryTemplate(templateId);
    if (template == null) {
      return "无法找到该表单";
    }
    Flow flow = das.queryFlow(template.getFlowId());
    if (flow == null) {
      return "无法找到该流程";
    }
   
    List<String> allQuitUser = new ArrayList<String>();
View Full Code Here

    String templateIdStr = request.getParameter("templateId");
    if (templateIdStr == null || templateIdStr.equals("")) {
      return "";
    }
   
    Template template = das.queryTemplate(DataAccessFactory.getInstance().createUUID(templateIdStr));
    if (template == null) {
      return "";
    }
   
    Set<Pair<String, String>> allFields = new HashSet<Pair<String,String>>();
    for(Field field : template.getFields()){
      //多选引用类型字段
      if (field != null && field.getType() != null && field.getType().equals(Type.t_reference) && field.getDataType() != null
          && field.getDataType().equals(DataType.dt_multiple)) {
        allFields.add(new Pair<String, String>(field.getId().getValue(),field.getName()));
      }
View Full Code Here

      if (lastModifyTime.indexOf(".") > 0)
        lastModifyTime = lastModifyTime.split("\\.")[0];

      return lastModifyTime;
    } else if ("node_id".equals(fieldName) || "项目".equals(fieldName)) {
      Template template = das.queryTemplate(task.getTemplateId());
      if (template != null)
        return template.getName();

      return null;
    } else if ("action_id".equals(fieldName) || "执行动作".equals(fieldName)) {
      if (task.getActionId() == null)
        return "编辑";
      Template template = TemplateCache.getInstance().get(
          task.getTemplateId());

      Action action = das.queryAction(task.getActionId(),
          template.getFlowId());
      if (action != null)
        return action.getName();

      return null;
    } else if ("action_user".equals(fieldName) || "执行人".equals(fieldName))
View Full Code Here

      if(templateId!=null&&!templateId.equals("")&&!"null".equals(templateId))
        oldTemplateIdsList.add(DataAccessFactory.getInstance().createUUID(templateId));
      script.setTemplateIds(oldTemplateIdsList.toArray(new UUID[oldTemplateIdsList.size()]));
    }
   
    Template newTemplate = das.queryTemplate(DataAccessFactory.getInstance().createUUID(templateId));
    Flow     newFlow     = das.queryFlow(newTemplate.getFlowId());
    Stat[]   newFlowStats= newFlow.getStats();
    Action[] newFlowActions=newFlow.getActions();
    List<UUID> newFlowStatIds = new ArrayList<UUID>();
    List<UUID> newFlowActionIds = new ArrayList<UUID>();
    for(Stat stat : newFlowStats)
View Full Code Here

TOP

Related Classes of com.sogou.qadev.service.cynthia.bean.Template

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.