|
@@ -10,7 +10,6 @@ import com.trade.service.trade.purchaseorder.dto.PurchaseOrderInvoiceSearchDto;
|
|
import com.trade.service.trade.purchaseorder.dto.PurchaseOrderLogisticsSearchDto;
|
|
import com.trade.service.trade.purchaseorder.dto.PurchaseOrderLogisticsSearchDto;
|
|
import com.trade.service.trade.purchaseorder.vo.*;
|
|
import com.trade.service.trade.purchaseorder.vo.*;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
-import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import com.trade.common.core.domain.ResponseResult;
|
|
import com.trade.common.core.domain.ResponseResult;
|
|
@@ -32,7 +31,7 @@ import java.util.List;
|
|
* @time 2024-09-12
|
|
* @time 2024-09-12
|
|
*/
|
|
*/
|
|
@Api(tags = "采购订单信息", value = "采购订单信息")
|
|
@Api(tags = "采购订单信息", value = "采购订单信息")
|
|
-@Controller
|
|
|
|
|
|
+@RestController
|
|
@RequestMapping("/purchaseOrder")
|
|
@RequestMapping("/purchaseOrder")
|
|
public class BPurchaseOrderController {
|
|
public class BPurchaseOrderController {
|
|
|
|
|
|
@@ -48,7 +47,6 @@ public class BPurchaseOrderController {
|
|
@ApiOperation(value = "获取采购订单", notes = "获取采购订单")
|
|
@ApiOperation(value = "获取采购订单", notes = "获取采购订单")
|
|
@PostMapping("/get/page")
|
|
@PostMapping("/get/page")
|
|
@PreAuthorize("@ss.hasPermi('trade:purchaseOrder:pages')")
|
|
@PreAuthorize("@ss.hasPermi('trade:purchaseOrder:pages')")
|
|
- @ResponseBody
|
|
|
|
public ResponseResult<GridPage<PurchaseOrderVo>> getPurchaseOrderPage(
|
|
public ResponseResult<GridPage<PurchaseOrderVo>> getPurchaseOrderPage(
|
|
@RequestBody PurchaseSearchDto purchaseSearch) {
|
|
@RequestBody PurchaseSearchDto purchaseSearch) {
|
|
return ResponseResult.success(purchaseOrderService.queryListByPage(purchaseSearch));
|
|
return ResponseResult.success(purchaseOrderService.queryListByPage(purchaseSearch));
|
|
@@ -63,7 +61,6 @@ public class BPurchaseOrderController {
|
|
@ApiOperation(value = "获取采购订单详情", notes = "获取采购订单详情")
|
|
@ApiOperation(value = "获取采购订单详情", notes = "获取采购订单详情")
|
|
@GetMapping("/get/{orderId}")
|
|
@GetMapping("/get/{orderId}")
|
|
@PreAuthorize("@ss.hasPermi('trade:purchaseOrder:details')")
|
|
@PreAuthorize("@ss.hasPermi('trade:purchaseOrder:details')")
|
|
- @ResponseBody
|
|
|
|
public ResponseResult<PurchaseOrderDetailsVo> getSalesContractDetails(@PathVariable Long orderId) {
|
|
public ResponseResult<PurchaseOrderDetailsVo> getSalesContractDetails(@PathVariable Long orderId) {
|
|
return ResponseResult.success(purchaseOrderService.getDetailsById(orderId));
|
|
return ResponseResult.success(purchaseOrderService.getDetailsById(orderId));
|
|
}
|
|
}
|
|
@@ -77,7 +74,6 @@ public class BPurchaseOrderController {
|
|
@ApiOperation(value = "获取采购订单物流信息", notes = "获取采购订单物流信息")
|
|
@ApiOperation(value = "获取采购订单物流信息", notes = "获取采购订单物流信息")
|
|
@PostMapping("/get/logisticsPage")
|
|
@PostMapping("/get/logisticsPage")
|
|
@PreAuthorize("@ss.hasPermi('trade:purchaseOrder:logisticsPage')")
|
|
@PreAuthorize("@ss.hasPermi('trade:purchaseOrder:logisticsPage')")
|
|
- @ResponseBody
|
|
|
|
public ResponseResult<GridPage<PurchaseOrderLogisticsPageVo>> getOrderLogisticsByPage(
|
|
public ResponseResult<GridPage<PurchaseOrderLogisticsPageVo>> getOrderLogisticsByPage(
|
|
@RequestBody PurchaseOrderLogisticsSearchDto orderLogisticsSearch) {
|
|
@RequestBody PurchaseOrderLogisticsSearchDto orderLogisticsSearch) {
|
|
return ResponseResult.success(purchaseOrderService.queryOrderLogisticsByPage(orderLogisticsSearch));
|
|
return ResponseResult.success(purchaseOrderService.queryOrderLogisticsByPage(orderLogisticsSearch));
|
|
@@ -92,7 +88,6 @@ public class BPurchaseOrderController {
|
|
@ApiOperation(value = "拉取采购订单发票", notes = "拉取采购订单发票")
|
|
@ApiOperation(value = "拉取采购订单发票", notes = "拉取采购订单发票")
|
|
@PostMapping("/pull/purchaseInvoice")
|
|
@PostMapping("/pull/purchaseInvoice")
|
|
@PreAuthorize("@ss.hasPermi('trade:purchaseOrder:pullInvoice')")
|
|
@PreAuthorize("@ss.hasPermi('trade:purchaseOrder:pullInvoice')")
|
|
- @ResponseBody
|
|
|
|
public ResponseResult<Boolean> pullPurchaseInvoice(@RequestBody List<Long> orderIds) {
|
|
public ResponseResult<Boolean> pullPurchaseInvoice(@RequestBody List<Long> orderIds) {
|
|
return ResponseResult.success(purchaseOrderService.pullPurchaseInvoice(orderIds));
|
|
return ResponseResult.success(purchaseOrderService.pullPurchaseInvoice(orderIds));
|
|
}
|
|
}
|
|
@@ -106,7 +101,6 @@ public class BPurchaseOrderController {
|
|
@ApiOperation(value = "获取采购订单发票", notes = "获取采购订单发票")
|
|
@ApiOperation(value = "获取采购订单发票", notes = "获取采购订单发票")
|
|
@PostMapping("/get/invoicePage")
|
|
@PostMapping("/get/invoicePage")
|
|
@PreAuthorize("@ss.hasPermi('trade:purchaseOrder:invoicePage')")
|
|
@PreAuthorize("@ss.hasPermi('trade:purchaseOrder:invoicePage')")
|
|
- @ResponseBody
|
|
|
|
public ResponseResult<GridPage<PurchaseOrderInvoiceVo>> getInvoicePage(
|
|
public ResponseResult<GridPage<PurchaseOrderInvoiceVo>> getInvoicePage(
|
|
@RequestBody PurchaseOrderInvoiceSearchDto invoiceSearchDto) {
|
|
@RequestBody PurchaseOrderInvoiceSearchDto invoiceSearchDto) {
|
|
return ResponseResult.success(purchaseOrderService.queryInvoiceListByPage(invoiceSearchDto));
|
|
return ResponseResult.success(purchaseOrderService.queryInvoiceListByPage(invoiceSearchDto));
|
|
@@ -121,7 +115,6 @@ public class BPurchaseOrderController {
|
|
@ApiOperation(value = "获取采购订单发票详情", notes = "获取采购订单发票详情")
|
|
@ApiOperation(value = "获取采购订单发票详情", notes = "获取采购订单发票详情")
|
|
@GetMapping("/get/invoiceDetail")
|
|
@GetMapping("/get/invoiceDetail")
|
|
@PreAuthorize("@ss.hasPermi('trade:purchaseOrder:invoiceDetail')")
|
|
@PreAuthorize("@ss.hasPermi('trade:purchaseOrder:invoiceDetail')")
|
|
- @ResponseBody
|
|
|
|
public ResponseResult<PurchaseOrderInvoiceDetailsVo> getInvoiceDetails(Long invoiceId) {
|
|
public ResponseResult<PurchaseOrderInvoiceDetailsVo> getInvoiceDetails(Long invoiceId) {
|
|
return ResponseResult.success(purchaseOrderService.getInvoiceDetails(invoiceId));
|
|
return ResponseResult.success(purchaseOrderService.getInvoiceDetails(invoiceId));
|
|
}
|
|
}
|
|
@@ -131,8 +124,8 @@ public class BPurchaseOrderController {
|
|
*/
|
|
*/
|
|
@GetMapping("/download/invoice")
|
|
@GetMapping("/download/invoice")
|
|
@PreAuthorize("@ss.hasRole('EXPORT_TAX_REFUNDER')")
|
|
@PreAuthorize("@ss.hasRole('EXPORT_TAX_REFUNDER')")
|
|
- public String getDownloadPurchaseInvoiceUrl(String xtUserId, String xtEid) {
|
|
|
|
|
|
+ public ResponseResult<String> getDownloadPurchaseInvoiceUrl(String xtUserId, String xtEid) {
|
|
String taxRebateUrl = purchaseOrderService.getDownloadPurchaseInvoiceUrl(xtUserId, xtEid);
|
|
String taxRebateUrl = purchaseOrderService.getDownloadPurchaseInvoiceUrl(xtUserId, xtEid);
|
|
- return "redirect:" + taxRebateUrl;
|
|
|
|
|
|
+ return ResponseResult.success(taxRebateUrl);
|
|
}
|
|
}
|
|
}
|
|
}
|