廖井涛
2024-05-28 591df47bf8cb5518f367a4f7c8c0b94e810ca5c2
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportController.java
@@ -6,17 +6,22 @@
import com.example.erp.entity.pp.DamageDetails;
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.entity.pp.Report;
import com.example.erp.entity.sd.Order;
import com.example.erp.entity.sd.OrderDetail;
import com.example.erp.entity.sd.OrderGlassDetail;
import com.example.erp.exception.ServiceException;
import com.example.erp.service.pp.ReportService;
import com.example.erp.service.pp.WorkOrderService;
import com.example.erp.tools.DownExcel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.sql.Date;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;
@@ -153,4 +158,11 @@
                                         @RequestBody Report report){
        return Result.seccess(reportService.rawMaterialRequisitionSv(selectTime1,selectTime2,report));
    }
    @ApiOperation("跨工序次破报表导出")
    @PostMapping("/exportCrossProcessBreaking")
    public void exportCrossProcessBreaking(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException {
        //参数:相应的数据,实体类信息,相应的方法(数据获取),生成的excel名字
        DownExcel.download(response, DamageDetails.class, reportService.exportCrossProcessBreakingSv(dates),"CrossProcessBreaking");
    }
}