/*     */ package com.picc.grab.controller.grab;
/*     */ 
/*     */ import com.baomidou.mybatisplus.plugins.Page;
/*     */ import com.picc.grab.aop.ResultFtlPage;
/*     */ import com.picc.grab.common.shiro.ShiroExt;
/*     */ import com.picc.grab.domain.Piccgrabaccount;
/*     */ import com.picc.grab.entity.common.vo.PageVO;
/*     */ import com.picc.grab.entity.common.vo.ResultVO;
/*     */ import com.picc.grab.entity.grab.dto.CrmListDTO;
/*     */ import com.picc.grab.entity.grab.vo.FgsFindAllVO;
/*     */ import com.picc.grab.service.IPiccgrabaccountService;
/*     */ import java.util.ArrayList;
/*     */ import java.util.List;
/*     */ import javax.servlet.http.HttpServletRequest;
/*     */ import org.apache.commons.collections.CollectionUtils;
/*     */ import org.apache.commons.lang3.StringUtils;
/*     */ import org.slf4j.Logger;
/*     */ import org.slf4j.LoggerFactory;
/*     */ import org.springframework.beans.factory.annotation.Autowired;
/*     */ import org.springframework.transaction.annotation.Transactional;
/*     */ import org.springframework.ui.ModelMap;
/*     */ import org.springframework.web.bind.annotation.RequestBody;
/*     */ import org.springframework.web.bind.annotation.RequestMapping;
/*     */ import org.springframework.web.bind.annotation.ResponseBody;
/*     */ import org.springframework.web.bind.annotation.RestController;
/*     */ import org.springframework.web.servlet.ModelAndView;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ @RestController
/*     */ @RequestMapping({"/grab"})
/*     */ @Transactional
/*     */ public class GrabController
/*     */ {
/*     */   @Autowired
/*     */   private ShiroExt shiroExt;
/*     */   @Autowired
/*     */   private IPiccgrabaccountService iPiccgrabaccountService;
/*  42 */   private Logger logger = LoggerFactory.getLogger(GrabController.class);
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   @RequestMapping
/*     */   @ResultFtlPage
/*     */   public ModelAndView index(ModelMap model) {
/*  52 */     return new ModelAndView("main/grab/list");
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   @RequestMapping({"/list"})
/*     */   @ResponseBody
/*     */   public PageVO<List<Piccgrabaccount>> list(@RequestBody CrmListDTO dto, HttpServletRequest request) {
/*  66 */     PageVO<List<Piccgrabaccount>> vo = new PageVO();
/*  67 */     Page<Piccgrabaccount> pageMOdel = this.iPiccgrabaccountService.pagePiccGrabList(dto);
/*  68 */     vo = vo.result(pageMOdel);
/*  69 */     return vo;
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   @RequestMapping({"/addPage", "/editPage", "/czPage", "/bjszPage", "/tqPage", "/yjtqPage", "/yjDetailsPage"})
/*     */   @ResultFtlPage
/*     */   public ModelAndView allPage(ModelMap model, HttpServletRequest request) {
/*  82 */     String uri = request.getRequestURI();
/*  83 */     String ftlname = "";
/*  84 */     if (StringUtils.contains(uri, "addPage")) ftlname = "add"; 
/*  85 */     if (StringUtils.contains(uri, "editPage")) ftlname = "edit"; 
/*  86 */     if (StringUtils.contains(uri, "czPage")) ftlname = "cz"; 
/*  87 */     if (StringUtils.contains(uri, "bjszPage")) ftlname = "bjsz"; 
/*  88 */     if (StringUtils.contains(uri, "tqPage")) ftlname = "tq"; 
/*  89 */     if (StringUtils.contains(uri, "yjtqPage")) ftlname = "yjtq"; 
/*  90 */     if (StringUtils.contains(uri, "yjDetailsPage")) ftlname = "yjDetails"; 
/*  91 */     return new ModelAndView("main/grab/" + ftlname);
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   @RequestMapping({"/findFgsAll"})
/*     */   @ResponseBody
/*     */   public ResultVO<List<FgsFindAllVO>> findFgsAll(HttpServletRequest request) {
/* 103 */     ResultVO<List<FgsFindAllVO>> vo = ResultVO.success();
/* 104 */     List<FgsFindAllVO> fgsFindAllVOS = null;
/* 105 */     if (CollectionUtils.isNotEmpty(fgsFindAllVOS)) {
/* 106 */       vo.setData(fgsFindAllVOS);
/*     */     } else {
/* 108 */       vo.setData(new ArrayList());
/*     */     } 
/* 110 */     return vo;
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   @RequestMapping({"/findFgsAllByUserFgsIds"})
/*     */   @ResponseBody
/*     */   public ResultVO<List<FgsFindAllVO>> findFgsAllByUserFgsIds(HttpServletRequest request) {
/* 122 */     String fgsIds = this.shiroExt.getUser().getFgsId();
/* 123 */     ResultVO<List<FgsFindAllVO>> vo = ResultVO.success();
/* 124 */     List<FgsFindAllVO> fgsFindAllVOS = null;
/* 125 */     if (CollectionUtils.isNotEmpty(fgsFindAllVOS)) {
/* 126 */       vo.setData(fgsFindAllVOS);
/*     */     } else {
/* 128 */       vo.setData(new ArrayList());
/*     */     } 
/* 130 */     return vo;
/*     */   }
/*     */ }


/* Location:              C:\Users\Administrator\Desktop\ROOT\WEB-INF\classes\!\com\picc\grab\controller\grab\GrabController.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */