public String getKpiClearCount() throws Exception {
   List<Object[]> list = contractService.getKpiClearCount();
   List<Map<String, Object>> result = new ArrayList<Map<String, Object>>();
   for (Object[] obj : list) {
     Map<String, Object> map = new HashMap<String, Object>();
     map.put("kpiType", (String.valueOf((Character) obj[0])));
     map.put("count", obj[1]);
     result.add(map);
   }
   Map resMap = new HashMap();
   resMap.put("result", result);
   outputJson(resMap, getCallback());
   return Action.NONE;
 }
  public String contracts() throws Exception {

    Map<String, Object> filter = new HashMap<String, Object>();

    if (null != contract.getContractName() && !"".equals(contract.getContractName())) {
      filter.put("contractName", contract.getContractName());
    }

    Page page = contractService.findByContractName(filter, getCurrentPageNo(), getPageSize());

    Map resMap = new HashMap();
    resMap.put("result", page.getResult());
    resMap.put("page", page);
    outputJson(resMap, getCallback());
    return Action.NONE;
  }
  public String history() throws Exception {
    Map<String, Object> filter = new HashMap<String, Object>();

    if (null != contract.getSelfNo() && !"".equals(contract.getSelfNo())) {
      filter.put("selfNo", contract.getSelfNo());
    }
    if (null != contract.getContractNo() && !"".equals(contract.getContractNo())) {
      filter.put("contractNo", contract.getContractNo());
    }
    if (null != contractId && !"".equals(contractId)) {
      filter.put("contractId", contractId);
    }

    Map changeItemMap = contractChangeItemService.getChangeItemNum(filter);
    Map protocolMap = contractChangeProtocolService.getProtocolNumAndPrice(filter);
    HashMap param = new HashMap();
    param.put("id", contractId);
    List<Contract> list = contractService.findByFilter(param);
    String url = "/";
    if (list != null) {
      try {
        Resource resource = new ClassPathResource("/config.properties");
        Properties props = PropertiesLoaderUtils.loadProperties(resource);
        url = props.getProperty("apiUrl");

        url += "investCost/contract/showView.action?id=" + list.get(0).getId();
      } catch (IOException e) {
        e.printStackTrace();
      }
    }
    Map result = new HashMap();
    result.put("changeItemTotalNum", changeItemMap.get("changeItemTotalNum"));
    result.put("protocolTotalNum", protocolMap.get("protocolTotalNum"));
    result.put("protocolTotalPrice", protocolMap.get("protocolTotalPrice"));
    result.put("url", url);
    outputJson(result, getCallback());
    return Action.NONE;
  }