瀏覽代碼

获取客户应付发票

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@612 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
suntg 11 年之前
父節點
當前提交
6c8b754af9

+ 57 - 0
src/main/java/com/uas/platform/b2b/controller/SaleApBillController.java

@@ -0,0 +1,57 @@
+package com.uas.platform.b2b.controller;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import com.uas.platform.b2b.model.PurchaseApBill;
+import com.uas.platform.b2b.service.PurchaseApBillService;
+import com.uas.platform.b2b.support.SystemSession;
+import com.uas.platform.core.model.PageInfo;
+import com.uas.platform.core.model.PageParams;
+
+/**
+ * 卖家获取对应的客户应付票据
+ * 
+ * @author suntg
+ * 
+ */
+@Controller
+@RequestMapping("/sale/apBill")
+public class SaleApBillController {
+
+	@Autowired
+	private PurchaseApBillService purchaseApBillService;
+
+	/**
+	 * 作为卖家,客户的应付票据(全部)
+	 * 
+	 * @param json
+	 * @return
+	 */
+	@RequestMapping(method = RequestMethod.GET)
+	@ResponseBody
+	public Page<PurchaseApBill> getReceivedPurchaseApBills(PageParams params) {
+		PageInfo info = new PageInfo(params);
+		// 我作为卖家,把我的企业ID作为供应商ID传入
+		info.filter("vendUU", SystemSession.getUser().getEnterprise().getUu());
+		return purchaseApBillService.findAllByPageInfo(info);
+	}
+
+	/**
+	 * 作为卖家,根据变更单ID查找客户应付票据(含明细)
+	 * 
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "/{id}", method = RequestMethod.GET)
+	@ResponseBody
+	public PurchaseApBill getReceivedPurchaseApBillById(@PathVariable("id") Long id) {
+		return purchaseApBillService.findById(id);
+	}
+
+}

+ 2 - 2
src/main/java/com/uas/platform/b2b/controller/SaleBadInController.java

@@ -28,7 +28,7 @@ public class SaleBadInController {
 	private PurchaseBadInService purchaseBadInService;
 
 	/**
-	 * 作为卖家,客户的采购验收单(全部)
+	 * 作为卖家,客户的不良品入库(全部)
 	 * 
 	 * @param json
 	 * @return
@@ -43,7 +43,7 @@ public class SaleBadInController {
 	}
 
 	/**
-	 * 作为卖家,根据变更单ID查找客户采购验收(含明细)
+	 * 作为卖家,根据变更单ID查找客户不良品入库(含明细)
 	 * 
 	 * @param id
 	 * @return

+ 2 - 2
src/main/java/com/uas/platform/b2b/controller/SaleBadOutController.java

@@ -28,7 +28,7 @@ public class SaleBadOutController {
 	private PurchaseBadOutService purchaseBadOutService;
 
 	/**
-	 * 作为卖家,客户的采购验收单(全部)
+	 * 作为卖家,客户的不良品出库(全部)
 	 * 
 	 * @param json
 	 * @return
@@ -43,7 +43,7 @@ public class SaleBadOutController {
 	}
 
 	/**
-	 * 作为卖家,根据变更单ID查找客户采购验收(含明细)
+	 * 作为卖家,根据变更单ID查找客户不良品出库(含明细)
 	 * 
 	 * @param id
 	 * @return

+ 1 - 1
src/main/java/com/uas/platform/b2b/controller/SaleReturnController.java

@@ -43,7 +43,7 @@ public class SaleReturnController {
 	}
 
 	/**
-	 * 作为卖家,根据变更单ID查找客户采购验(含明细)
+	 * 作为卖家,根据变更单ID查找客户采购验退(含明细)
 	 * 
 	 * @param id
 	 * @return