|
|
@@ -6,6 +6,7 @@ import com.uas.ps.inquiry.entity.BatchInquiry;
|
|
|
import com.uas.ps.inquiry.entity.Inquiry;
|
|
|
import com.uas.ps.inquiry.entity.InquiryDecide;
|
|
|
import com.uas.ps.inquiry.entity.InquiryDetail;
|
|
|
+import com.uas.ps.inquiry.model.Attach;
|
|
|
import com.uas.ps.inquiry.model.FileUpload;
|
|
|
import com.uas.ps.inquiry.model.PublicInquiryItem;
|
|
|
import com.uas.ps.inquiry.model.PurcInquiry;
|
|
|
@@ -147,15 +148,15 @@ public class PublicInquiryController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 作为卖家,保存更新公共询价单
|
|
|
+ * 作为卖家,新增报价
|
|
|
*
|
|
|
* @param item 前台数据
|
|
|
* @return
|
|
|
*/
|
|
|
- @RequestMapping(value = "/item/save", method = RequestMethod.POST)
|
|
|
+ @RequestMapping(value = "/item/add", method = RequestMethod.POST)
|
|
|
public String saveInquiryItem(@RequestBody PublicInquiryItem item) throws Exception {
|
|
|
- item = publicInquiryService.save(item);
|
|
|
- if (null != item) {
|
|
|
+ item = publicInquiryService.add(item);
|
|
|
+ if (null != item.getId()) {
|
|
|
return JSONObject.toJSONString(item);
|
|
|
} else {
|
|
|
throw new Exception("保存失败");
|
|
|
@@ -185,12 +186,44 @@ public class PublicInquiryController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/save", method = RequestMethod.POST)
|
|
|
- public String saveInquiryItem(@RequestBody PurcInquiry inquiry) throws Exception {
|
|
|
+ public String saveInquiry(@RequestBody PurcInquiry inquiry) throws Exception {
|
|
|
inquiry = publicInquiryService.saveInquiry(inquiry);
|
|
|
- if (null != inquiry) {
|
|
|
+ if (null != inquiry.getId()) {
|
|
|
return JSONObject.toJSONString(inquiry);
|
|
|
} else {
|
|
|
throw new Exception("保存失败");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 保存询价信息(供应商、客户可能都会调用这条数据)
|
|
|
+ *
|
|
|
+ * @author hejq
|
|
|
+ * @date 2018-01-16 15:49
|
|
|
+ * @param inquiryItem 供应商报价信息
|
|
|
+ * @return
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/check", method = RequestMethod.POST)
|
|
|
+ public String saveItem(@RequestBody PublicInquiryItem inquiryItem) throws Exception {
|
|
|
+ inquiryItem = publicInquiryService.save(inquiryItem);
|
|
|
+ return JSONObject.toJSONString(inquiryItem);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 卖家报价时上传附件信息
|
|
|
+ *
|
|
|
+ * @param attach 附件信息
|
|
|
+ * @return
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/attach", method = RequestMethod.POST)
|
|
|
+ public String addAttachs(@RequestBody Attach attach) throws Exception {
|
|
|
+ attach = publicInquiryService.addAttachs(attach);
|
|
|
+ if (null != attach.getId()) {
|
|
|
+ return JSONObject.toJSONString(attach);
|
|
|
+ } else {
|
|
|
+ throw new Exception("保存失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|