コード例 #1
0
 @RequestMapping("/ajax/loadItemListing.do")
 @ResponseBody
 public void loadItemListing(CommonParmVO commonParmVO, HttpServletRequest request)
     throws Exception {
   String content = request.getParameter("content");
   SessionVO sessionVO = SessionCacheSupport.getSessionVO();
   Map map = new HashMap();
   map.put("content", content);
   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());
   }
   Page page = new Page();
   page.setPageSize(10);
   page.setCurrentPage(1);
   List<ListingDataQuery> datas = iTradingListingData.selectListDateByExample(map, page);
   AjaxSupport.sendSuccessText("", datas);
 }
コード例 #2
0
 @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);
 }
コード例 #3
0
 @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);
 }