|
|
@@ -2,9 +2,12 @@ package com.uas.ps.inquiry.controller;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.uas.ps.core.logging.BufferedLoggerManager;
|
|
|
+import com.uas.ps.httplog.annotation.HttpLog;
|
|
|
import com.uas.ps.inquiry.domain.IPage;
|
|
|
import com.uas.ps.inquiry.entity.*;
|
|
|
-import com.uas.ps.inquiry.model.*;
|
|
|
+import com.uas.ps.inquiry.model.PublicInquiryItemInfo;
|
|
|
+import com.uas.ps.inquiry.model.PurcInquiry;
|
|
|
+import com.uas.ps.inquiry.model.PurcInquiryItemInfo;
|
|
|
import com.uas.ps.inquiry.page.PageInfo;
|
|
|
import com.uas.ps.inquiry.page.SearchFilter;
|
|
|
import com.uas.ps.inquiry.service.AttachService;
|
|
|
@@ -16,7 +19,10 @@ import org.springframework.data.domain.Page;
|
|
|
import org.springframework.data.domain.Sort;
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
import java.net.URLDecoder;
|
|
|
@@ -48,6 +54,7 @@ public class PublicInquiryController {
|
|
|
* @return
|
|
|
* @throws UnsupportedEncodingException
|
|
|
*/
|
|
|
+ @HttpLog
|
|
|
@RequestMapping(method = RequestMethod.POST)
|
|
|
public void saveInquiries(@RequestParam("data") String data, Long enuu, String address) throws NotFoundException, UnsupportedEncodingException {
|
|
|
String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
|
@@ -64,6 +71,7 @@ public class PublicInquiryController {
|
|
|
* @param enuu 询价企业UU
|
|
|
* @throws UnsupportedEncodingException
|
|
|
*/
|
|
|
+ @HttpLog
|
|
|
@RequestMapping(value = "/check", method = RequestMethod.POST)
|
|
|
public void updateInquiryStatus(@RequestParam("data") String data, @RequestParam("enuu") Long enuu) throws UnsupportedEncodingException {
|
|
|
String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
|
@@ -79,6 +87,7 @@ public class PublicInquiryController {
|
|
|
* @date 2018-01-14 15:20
|
|
|
* @param enuu 询价企业UU
|
|
|
*/
|
|
|
+ @HttpLog
|
|
|
@RequestMapping(value = "/quotation", method = RequestMethod.GET)
|
|
|
public List<InquiryDetail> getReply(Long enuu) {
|
|
|
List<InquiryDetail> details = publicInquiryService.findNotUploadReply(enuu);
|
|
|
@@ -93,6 +102,7 @@ public class PublicInquiryController {
|
|
|
* @return
|
|
|
* @throws UnsupportedEncodingException
|
|
|
*/
|
|
|
+ @HttpLog
|
|
|
@RequestMapping(value = "/reply/back", method = RequestMethod.POST)
|
|
|
public void onReplySuccess(@RequestParam("data") String data, Long enuu) throws UnsupportedEncodingException {
|
|
|
String[] idArray = URLDecoder.decode(data, "UTF-8").split(",");
|
|
|
@@ -106,6 +116,7 @@ public class PublicInquiryController {
|
|
|
* @param data 封装的data信息
|
|
|
* @throws UnsupportedEncodingException
|
|
|
*/
|
|
|
+ @HttpLog
|
|
|
@RequestMapping(value = "/checking", method = RequestMethod.POST)
|
|
|
public void checkInquiry(@RequestParam("data") String data, Long enuu) throws UnsupportedEncodingException {
|
|
|
String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
|
@@ -120,6 +131,7 @@ public class PublicInquiryController {
|
|
|
* @return 封装的data信息
|
|
|
* @throws UnsupportedEncodingException
|
|
|
*/
|
|
|
+ @HttpLog
|
|
|
@RequestMapping(value = "/reply/decide", method = RequestMethod.POST)
|
|
|
public void onReplyDecide(@RequestParam("data") String data, Long enuu) throws UnsupportedEncodingException {
|
|
|
String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
|
@@ -135,6 +147,7 @@ public class PublicInquiryController {
|
|
|
* @return
|
|
|
* @throws UnsupportedEncodingException
|
|
|
*/
|
|
|
+ @HttpLog
|
|
|
@RequestMapping(value = "/invalid", method = RequestMethod.POST)
|
|
|
public void onReplyInvalid(@RequestParam("data") String data, Long enuu) throws UnsupportedEncodingException {
|
|
|
String jsonStr = URLDecoder.decode(data, "UTF-8");
|
|
|
@@ -153,6 +166,7 @@ public class PublicInquiryController {
|
|
|
* @param useruu 报价个人UU
|
|
|
* @return
|
|
|
*/
|
|
|
+ @HttpLog
|
|
|
@RequestMapping(value = "/turntoInquiry", method = RequestMethod.POST)
|
|
|
private ModelMap transtoInquiry(Long id, Long enuu, Long useruu) {
|
|
|
return publicInquiryService.transtoInquiry(id, enuu, useruu);
|
|
|
@@ -167,6 +181,7 @@ public class PublicInquiryController {
|
|
|
* @param searchFilter 过滤条件
|
|
|
* @return
|
|
|
*/
|
|
|
+ @HttpLog
|
|
|
@RequestMapping(method = RequestMethod.GET)
|
|
|
public IPage<PurcInquiryItemInfo> getInquiry(PageInfo pageInfo, SearchFilter searchFilter) {
|
|
|
Sort sort = new Sort(Sort.Direction.DESC, "date");
|
|
|
@@ -185,6 +200,7 @@ public class PublicInquiryController {
|
|
|
* @param searchFilter 过滤条件
|
|
|
* @return
|
|
|
*/
|
|
|
+ @HttpLog
|
|
|
@RequestMapping(value = "/inquiryList", method = RequestMethod.GET)
|
|
|
public IPage<PurcInquiryItemInfo> getInquiryList(PageInfo pageInfo, SearchFilter searchFilter) {
|
|
|
Sort sort = new Sort(Sort.Direction.DESC, "date");
|
|
|
@@ -215,6 +231,7 @@ public class PublicInquiryController {
|
|
|
* @param endDate 截止日期
|
|
|
* @return
|
|
|
*/
|
|
|
+ @HttpLog
|
|
|
@RequestMapping(value = "/mobile", method = RequestMethod.GET)
|
|
|
public ModelMap publincInquiry(Integer page, Integer size, Long en_uu, String _state,
|
|
|
String keyword, String user_tel, Long fromDate, Long endDate) {
|
|
|
@@ -273,6 +290,7 @@ public class PublicInquiryController {
|
|
|
* @param filter 过滤条件
|
|
|
* @return
|
|
|
*/
|
|
|
+ @HttpLog
|
|
|
@RequestMapping(value = "/quotation/list", method = RequestMethod.GET)
|
|
|
public Page<PublicInquiryItemInfo> getQuotation(PageInfo pageInfo, String filter, String _state) {
|
|
|
Sort sort = new Sort(Sort.Direction.DESC, "date");
|
|
|
@@ -302,6 +320,7 @@ public class PublicInquiryController {
|
|
|
* @param _state
|
|
|
* @return
|
|
|
*/
|
|
|
+ @HttpLog
|
|
|
@RequestMapping(value = "/quotationList", method = RequestMethod.GET)
|
|
|
public Page<PublicInquiryItemInfo> getQuotationList(PageInfo pageInfo, String filter, String _state) {
|
|
|
Sort sort = new Sort(Sort.Direction.DESC, "date");
|
|
|
@@ -323,6 +342,7 @@ public class PublicInquiryController {
|
|
|
* @param size 大小
|
|
|
* @return
|
|
|
*/
|
|
|
+ @HttpLog
|
|
|
@RequestMapping(value = "/messageList", method = RequestMethod.GET)
|
|
|
public List<InquiryMessage> getList(Long enuu, Integer size) {
|
|
|
logger.log("公共询价", "获取最新的公共询价", "大小: " + size, Constant.UU, enuu, InquirySource.PLAIN.name());
|
|
|
@@ -335,6 +355,7 @@ public class PublicInquiryController {
|
|
|
* @param id 附件id
|
|
|
* @return
|
|
|
*/
|
|
|
+ @HttpLog
|
|
|
@RequestMapping(value = "/attachUrl", method = RequestMethod.GET)
|
|
|
public com.uas.ps.inquiry.model.Attach getAttach(Long id) {
|
|
|
return attachService.findById(id);
|
|
|
@@ -346,6 +367,7 @@ public class PublicInquiryController {
|
|
|
* @param id 主表id
|
|
|
* @return
|
|
|
*/
|
|
|
+ @HttpLog
|
|
|
@RequestMapping(value = "/findInquiryById", method = RequestMethod.GET)
|
|
|
public PurcInquiry findById(Long id, Long enuu) {
|
|
|
logger.log("公共询价", "获取询价信息", "id: " + id, Constant.UU, enuu, InquirySource.PLAIN.name());
|