package com.aps.core.controller.mainPlan; import com.aps.common.core.utils.poi.ExcelUtil; import com.aps.common.core.web.controller.BaseController; import com.aps.common.core.web.domain.AjaxResult; import com.aps.common.core.web.page.TableDataInfo; import com.aps.common.log.annotation.Log; import com.aps.common.log.enums.BusinessType; import com.aps.common.security.annotation.RequiresPermissions; import com.aps.core.domain.ApsPlateProcessShopStat; import com.aps.core.service.IApsPlateProcessShopStatService; import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; /** * 钣金车间统计Controller * * @author zhl * @date 2025-04-23 */ @RestController @RequestMapping("/ApsPlateProcessShopStat") public class ApsPlateProcessShopStatController extends BaseController { @Autowired private IApsPlateProcessShopStatService apsPlateProcessShopStatService; /** * 导出钣金车间统计列表 */ @RequiresPermissions("ApsPlateProcessShopStat:ApsPlateProcessShopStat:export") @Log(title = "钣金车间统计", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, ApsPlateProcessShopStat apsPlateProcessShopStat) { List list = apsPlateProcessShopStatService.selectApsPlateProcessShopStatList(apsPlateProcessShopStat); ExcelUtil util = new ExcelUtil(ApsPlateProcessShopStat.class); util.exportExcel(response, list, "钣金车间统计数据"); } /** * 修改钣金车间统计 */ @Log(title = "钣金车间统计", businessType = BusinessType.UPDATE) @PostMapping("/update") public AjaxResult update(@RequestBody ApsPlateProcessShopStat apsPlateProcessShopStat) { apsPlateProcessShopStatService.saveShopStat(); return toAjax(true); } /** * 查询钣金车间统计列表 */ @GetMapping("/list") public AjaxResult list(ApsPlateProcessShopStat apsPlateProcessShopStat) { return apsPlateProcessShopStatService.getShopPlanStat(); } }