廖井涛
2025-12-02 fd2ec4214c6f8456b957c3545e7d67bcdbbb9985
north-glass-erp/src/main/java/com/example/erp/controller/AppController.java
@@ -1,20 +1,25 @@
package com.example.erp.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import com.example.erp.common.Result;
import com.example.erp.dto.pp.WorkInProgressDTO;
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.entity.sd.Order;
import com.example.erp.entity.sd.OrderDetail;
import com.example.erp.service.mm.FinishedGoodsInventoryService;
import com.example.erp.service.mm.MaterialInventoryService;
import com.example.erp.service.pp.ReportService;
import com.example.erp.service.pp.ReportingWorkService;
import com.example.erp.service.sd.DeliveryService;
import com.example.erp.service.sd.OrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("/app")
@@ -24,6 +29,9 @@
    private final OrderService orderService;
    private final DeliveryService deliveryService;
    private final MaterialInventoryService materialInventoryService;
    private final FinishedGoodsInventoryService finishedGoodsInventoryService;
    private final ReportService reportService;
    private final ReportingWorkService reportingWorkService;
    @ApiOperation("订单报表")
    @PostMapping("/getOrderList")
@@ -42,4 +50,50 @@
    public Result getOriginalGlassList() {
        return Result.success(materialInventoryService.appGetStockList());
    }
    @ApiOperation("成品库存报表")
    @PostMapping("/getFinishedGoodsInventoryList")
    public Result getFinishedGoodsInventoryList() {
        return Result.success(finishedGoodsInventoryService.appFinishedGoodsInventoryList());
    }
    @ApiOperation("半成品库存报表")
    @PostMapping("/getWorkInProgress/{selectProcesses}")
    public Result getworkInProgress(@PathVariable String selectProcesses,WorkInProgressDTO workInProgressDTO) {
        return Result.success(reportService.workInProgressSv(1, 999999999, "", "", selectProcesses,"","", workInProgressDTO));
    }
    @ApiOperation("可入库的成品查询接口")
    @PostMapping("/getSelectWarehousingList")
    public Result getSelectWarehousingList(@RequestBody String processId){
        return Result.success(finishedGoodsInventoryService.getSelectWarehousingApp(processId));
    }
    @ApiOperation("成品入库接口")
    @PostMapping("/addSelectWarehousing")
    public Result addSelectWarehousing( @RequestBody Map<String,Object> object){
        return Result.success(finishedGoodsInventoryService.addSelectWarehousing(object));
    }
    @ApiOperation("可发货的成品查询接口")
    @PostMapping("/getSelectDeliveryDetailList")
    public Result getSelectDeliveryDetailList(){
        return Result.success(finishedGoodsInventoryService.getSelectDeliveryDetailApp());
    }
    @ApiOperation("成品出库接口")
    @PostMapping("/addDeliveryDetail")
    public Result addDeliveryDetail( @RequestBody Map<String,Object>  object){
        return Result.success(finishedGoodsInventoryService.addDeliveryDetail(object));
    }
    @ApiOperation("app多个流程卡报工")
    @PostMapping("/addWorkInProgress")
    @SaCheckPermission("addReportingWork.add")
    public Result addWorkInProgress(@RequestBody Map<String,Object> object){
        return reportingWorkService.addWorkInProgress(object);
    }
}