@RequestMapping("/ajax/priceTrackingRecordQueryList.do")
 @ResponseBody
 public void priceTrackingRecordQueryList(CommonParmVO commonParmVO, HttpServletRequest request)
     throws Exception {
   String autoPricingId = request.getParameter("autoPricingId");
   PageJsonBean jsonBean = commonParmVO.getJsonBean();
   Page page = jsonBean.toPage();
   Map map = new HashMap();
   if (!StringUtils.isNotBlank(autoPricingId)) {
     autoPricingId = null;
   }
   SessionVO sessionVO = SessionCacheSupport.getSessionVO();
   List<UsercontrollerUserExtend> orgUsers = systemUserManagerService.queryAllUsersByOrgID("yes");
   Boolean flag = false;
   for (UsercontrollerUserExtend orgUser : orgUsers) {
     if (orgUser.getUserId() == sessionVO.getId() && orgUser.getUserParentId() == null) {
       flag = true;
     }
   }
   if (flag) {
     map.put("orgUsers", orgUsers);
   } else {
     map.put("userId", sessionVO.getId());
   }
   map.put("autoPricingId", autoPricingId);
   List<PriceTrackingAutoPricingRecordQuery> priceTrackings =
       iTradingPriceTrackingAutoPricingRecord.selectPriceTrackingAutoPricingRecordList(map, page);
   jsonBean.setList(priceTrackings);
   jsonBean.setTotal((int) page.getTotalCount());
   AjaxSupport.sendSuccessText("", jsonBean);
 }
 @RequestMapping("/ajax/priceTrackingQueryList1.do")
 @ResponseBody
 public void priceTrackingQueryList1(CommonParmVO commonParmVO, HttpServletRequest request)
     throws Exception {
   String qeuryContent = request.getParameter("qeuryContent");
   PageJsonBean jsonBean = commonParmVO.getJsonBean();
   Page page = jsonBean.toPage();
   Map map = new HashMap();
   if (!StringUtils.isNotBlank(qeuryContent)) {
     qeuryContent = null;
   }
   SessionVO sessionVO = SessionCacheSupport.getSessionVO();
   List<UsercontrollerUserExtend> orgUsers = systemUserManagerService.queryAllUsersByOrgID("yes");
   Boolean flag = false;
   for (UsercontrollerUserExtend orgUser : orgUsers) {
     if (orgUser.getUserId() == sessionVO.getId() && orgUser.getUserParentId() == null) {
       flag = true;
     }
   }
   if (flag) {
     map.put("orgUsers", orgUsers);
   } else {
     map.put("userId", sessionVO.getId());
   }
   map.put("qeuryContent", qeuryContent);
   List<PriceTrackingAutoPricingQuery> priceTrackings =
       iTradingPriceTrackingAutoPricing.selectPriceTrackingAutoPricingList(map, page);
   for (PriceTrackingAutoPricingQuery query : priceTrackings) {
     List<TradingPriceTrackingPricingRule> rules =
         iTradingPriceTrackingPricingRule.selectTradingPriceTrackingPricingRuleByAutoPricingId(
             query.getId());
     Long priceId = 0L;
     String competitorsItemids = "";
     for (TradingPriceTrackingPricingRule rule : rules) {
       competitorsItemids += rule.getCompetitoritemid() + ",";
     }
     if (StringUtils.isNotBlank(competitorsItemids)) {
       query.setCompetitorsItemids(
           competitorsItemids.substring(0, competitorsItemids.length() - 1));
     }
     if (rules != null && rules.size() > 0) {
       query.setCompetitorsTotal(rules.size());
       query.setSign(rules.get(0).getSign());
       query.setIncreaseOrDecrease(rules.get(0).getIncreaseordecrease());
       query.setInputValue(rules.get(0).getInputvalue());
       query.setRuleType(rules.get(0).getRuletype());
     }
   }
   jsonBean.setList(priceTrackings);
   jsonBean.setTotal((int) page.getTotalCount());
   AjaxSupport.sendSuccessText("", jsonBean);
 }
 @RequestMapping("/ajax/priceTrackingApi.do")
 @ResponseBody
 public void loadOrdersList(CommonParmVO commonParmVO, HttpServletRequest request)
     throws Exception {
   PageJsonBean jsonBean = commonParmVO.getJsonBean();
   String qeuryContent = request.getParameter("qeuryContent");
   List<TradingPriceTracking> priceTrackings = new ArrayList<TradingPriceTracking>();
   try {
     priceTrackings = iTradingPriceTracking.getPriceTrackingItem(qeuryContent);
   } catch (Exception e) {
     logger.error("", e);
     priceTrackings = new ArrayList<TradingPriceTracking>();
   }
   jsonBean.setList(priceTrackings);
   jsonBean.setTotal(priceTrackings.size());
   AjaxSupport.sendSuccessText("", jsonBean);
 }