| | |
| | | package com.aps.core.controller.mainPlan; |
| | | |
| | | import java.util.List; |
| | | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | 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.ApsPlateStandardRequire; |
| | | import com.aps.core.enums.PLAN_TASK_STATUS; |
| | | import com.aps.core.service.ApsPlanTaskService; |
| | | import com.aps.core.service.IApsPlateStandardRequireBatchService; |
| | | import com.aps.core.service.IApsPlateStandardRequireService; |
| | | import com.aps.common.core.web.controller.BaseController; |
| | | import com.aps.common.core.web.domain.AjaxResult; |
| | | import com.aps.common.core.utils.poi.ExcelUtil; |
| | | import com.aps.common.core.web.page.TableDataInfo; |
| | | import jakarta.annotation.Resource; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 钣金工单标准需求Controller |
| | |
| | | { |
| | | @Autowired |
| | | private IApsPlateStandardRequireService apsPlateStandardRequireService; |
| | | @Resource |
| | | IApsPlateStandardRequireBatchService requireBatchService; |
| | | @Resource |
| | | ApsPlanTaskService planTaskService; |
| | | |
| | | /** |
| | | * 查询钣金工单标准需求列表 |
| | |
| | | { |
| | | return toAjax(apsPlateStandardRequireService.deleteApsPlateStandardRequireByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 钣金供应缺口报表 |
| | | */ |
| | | //@RequiresPermissions("Aps:ApsPlateStandardRequire:supplyGapList") |
| | | @GetMapping("/supplyGapList") |
| | | public TableDataInfo selectPlateSupplyGapList(ApsPlateStandardRequire apsPlateStandardRequire) |
| | | { |
| | | startPage(); |
| | | List<ApsPlateStandardRequire> list = apsPlateStandardRequireService.selectPlateSupplyGapList(apsPlateStandardRequire); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | @RequiresPermissions("Aps:ApsPlateStandardRequire:supplyGapListExport") |
| | | @Log(title = "钣金供应缺口报表导出", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/supplyGapListExport") |
| | | public void supplyGapListExport(HttpServletResponse response, ApsPlateStandardRequire apsPlateStandardRequire) |
| | | { |
| | | List<ApsPlateStandardRequire> list = apsPlateStandardRequireService.selectPlateSupplyGapList(apsPlateStandardRequire); |
| | | ExcelUtil<ApsPlateStandardRequire> util = new ExcelUtil<ApsPlateStandardRequire>(ApsPlateStandardRequire.class); |
| | | util.exportExcel(response, list, "钣金供应缺口报表数据"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 生成钣金计划 |
| | | * */ |
| | | @PostMapping("/generatorPlan") |
| | | public AjaxResult generatorPlan() |
| | | { |
| | | String batchNum= requireBatchService.getNewBatchNumber(); |
| | | planTaskService.savePlanTask(batchNum); |
| | | apsPlateStandardRequireService.generatorPlan(batchNum); |
| | | planTaskService.updateTaskStatus(batchNum, PLAN_TASK_STATUS.FINISHED); |
| | | return success(); |
| | | } |
| | | |
| | | } |