Ver código fonte

增加企业商机数据导出功能

hejq 7 anos atrás
pai
commit
69c12477bd

+ 12 - 4
src/main/java/com/uas/platform/b2b/controller/PubInquiryListController.java

@@ -179,12 +179,20 @@ public class PubInquiryListController {
             modelAndView.addObject("data", enquiryService.fingByPageInfo(pageInfo, filter, uuList).getContent());
             modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/public/publicInquiry", "客户公共询价列表"));
             logger.log("公共询价单", "导出Excel列表", "导出我的客户询价列表");
-        } else if (state.equals("remind")){
-            modelAndView.addObject("state", "推荐报价列表");
+        } else if (state.equals("remind")) {
+            modelAndView.addObject("state", "个人商机询价列表");
             List<InquiryRemind> reminds = InquiryUtils.getRemind(pageInfo, filter, SystemSession.getUser().getUserUU(), SystemSession.getUser().getEnterprise().getUu()).getContent();
             modelAndView.addObject("data", !CollectionUtils.isEmpty(reminds) ? reminds : new ArrayList<InquiryRemind>());
-            modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/public/inquiryRemind", "推荐报价列表"));
-            logger.log("公共询价单", "导出Excel列表", "导出推荐报价列表");
+            modelAndView.addObject("title", "个人商机询价列表");
+            modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/public/inquiryRemind", "个人商机询价列表"));
+            logger.log("公共询价单", "导出Excel列表", "导出个人商机询价列表");
+        } else if (state.equals("enterprise")) { // 导出企业商机
+            modelAndView.addObject("state", "企业商机询价列表");
+            List<InquiryRemind> reminds = InquiryUtils.getEngerpriseRemind(pageInfo, filter, SystemSession.getUser().getUserUU(), SystemSession.getUser().getEnterprise().getUu()).getContent();
+            modelAndView.addObject("data", !CollectionUtils.isEmpty(reminds) ? reminds : new ArrayList<InquiryRemind>());
+            modelAndView.addObject("title", "企业商机询价列表");
+            modelAndView.setView(new JxlsExcelView("classpath:jxls-tpl/public/inquiryRemind", "企业商机询价列表"));
+            logger.log("公共询价单", "导出Excel列表", "导出企业商机询价列表");
         }
         return modelAndView;
     }

+ 24 - 2
src/main/java/com/uas/platform/b2b/ps/InquiryUtils.java

@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.TypeReference;
 import com.alibaba.fastjson.parser.Feature;
-import com.uas.sso.support.Page;
 import com.uas.platform.b2b.core.util.ContextUtils;
 import com.uas.platform.b2b.model.*;
 import com.uas.platform.b2b.support.SysConf;
@@ -13,6 +12,7 @@ import com.uas.platform.b2b.temporary.model.InquiryMessage;
 import com.uas.platform.core.model.PageInfo;
 import com.uas.platform.core.util.HttpUtil;
 import com.uas.platform.core.util.serializer.FlexJsonUtils;
+import com.uas.sso.support.Page;
 import org.apache.http.HttpStatus;
 import org.springframework.ui.ModelMap;
 
@@ -317,7 +317,7 @@ public class InquiryUtils {
     }
 
     /**
-     * 获取推荐列表信息
+     * 获取个人推荐列表信息
      *
      * @param pageInfo 分页参数
      * @param searchFilter 过滤条件
@@ -337,4 +337,26 @@ public class InquiryUtils {
         return (Page)JSONObject.parseObject(res.getResponseText(), new TypeReference<Page<InquiryRemind>>() {
         }, new Feature[0]);
     }
+
+    /**
+     * 获取企业推荐列表信息
+     *
+     * @param pageInfo 分页参数
+     * @param searchFilter 过滤条件
+     * @param userUU 用户UU
+     * @param enUU 企业UU
+     * @return
+     * @throws Exception
+     */
+    public static Page<InquiryRemind> getEngerpriseRemind(PageInfo pageInfo, SearchFilter searchFilter, Long userUU, Long enUU) throws Exception {
+        JSONObject formData = JSON.parseObject(JSON.toJSONString(pageInfo));
+        if (searchFilter != null) {
+            formData.putAll(JSON.parseObject(JSON.toJSONString(searchFilter)));
+        }
+        formData.put("useruu", userUU);
+        formData.put("enuu", enUU);
+        HttpUtil.Response res = HttpUtil.sendGetRequest(url + "/inquiry/sale/enremind", formData);
+        return (Page)JSONObject.parseObject(res.getResponseText(), new TypeReference<Page<InquiryRemind>>() {
+        }, new Feature[0]);
+    }
 }

BIN
src/main/resources/jxls-tpl/public/inquiryRemind.xls


+ 1 - 1
src/main/webapp/resources/tpl/index/baseInfo/inquiry_list.html

@@ -344,7 +344,7 @@
                                     </ul>
                                 </span>
                                 <span class="history">
-                                    <span><img src="static/img/all/bar.png" alt=""/>与我相关</span>
+                                    <span><img src="static/img/all/bar.png" alt=""/>商机类型</span>
                                     <ul>
                                         <li ng-click="setActive('remind')" title="" ng-class="{'active': condition.dateZone == '7'}">我的商机</li>
                                         <li ng-click="setActive('enterprise')" title="" ng-class="{'active': condition.dateZone == '1'}">公司商机</li>