|
|
@@ -1,6 +1,7 @@
|
|
|
package com.uas.platform.b2b.erp.controller;
|
|
|
|
|
|
import com.alibaba.dubbo.common.utils.CollectionUtils;
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.uas.platform.b2b.erp.model.SaleTenderErp;
|
|
|
import com.uas.platform.b2b.erp.service.TenderService;
|
|
|
@@ -21,10 +22,7 @@ import com.uas.search.b2b.util.SearchConstants;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
import java.net.URLDecoder;
|
|
|
@@ -166,12 +164,29 @@ public class TenderController {
|
|
|
|
|
|
/**
|
|
|
* 获取供应商联系人
|
|
|
+ * @param enuu 招标企业uu
|
|
|
* @param venduu 供应商UU
|
|
|
*
|
|
|
*/
|
|
|
@RequestMapping(value = "/contacts", method = RequestMethod.GET)
|
|
|
- private List<VendorContact> getContacts(Long venduu) {
|
|
|
- return vendorService.getContacts(venduu);
|
|
|
+ public List<VendorContact> getVendorContacts(Long enuu, Long venduu) {
|
|
|
+ return tenderService.getVendContacts(enuu, venduu);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 保存供应商联系人
|
|
|
+ *
|
|
|
+ * @param contact
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/addcontact", method = RequestMethod.POST)
|
|
|
+ public ModelMap savecontact(String contact) throws UnsupportedEncodingException {
|
|
|
+ contact = URLDecoder.decode(contact, "UTF-8");
|
|
|
+ VendorContact vendor = JSON.parseObject(contact, VendorContact.class);
|
|
|
+ vendorService.saveContact(vendor);
|
|
|
+ ModelMap map = new ModelMap();
|
|
|
+ map.put("success", true);
|
|
|
+ return map;
|
|
|
}
|
|
|
|
|
|
/**
|