| | |
| | | import com.aps.common.security.utils.DictUtils; |
| | | import com.aps.core.domain.ApsPlate.ApsPlatePlan; |
| | | import com.aps.core.domain.ApsPlate.ApsPlatePlanTemp; |
| | | import com.aps.core.domain.ApsPlate.ApsPlateRequireDate; |
| | | import com.aps.core.domain.export.ApsPlatePlanExport; |
| | | import com.aps.core.service.ApsPlate.ApsPlateRequireDateService; |
| | | import com.aps.core.service.ApsPlate.IApsPlatePlanService; |
| | | import com.aps.core.service.ApsPlate.IApsPlatePlanTempService; |
| | | import com.aps.system.api.domain.SysDictData; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import jakarta.annotation.Resource; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | * @author ruoyi |
| | | * @date 2025-04-08 |
| | | */ |
| | | @Tag(name = "钣金计划列表", description = "钣金计划列表") |
| | | @RestController |
| | | @RequestMapping("/apsPlatePlan") |
| | | public class ApsPlatePlanController extends BaseController { |
| | |
| | | private IApsPlatePlanService apsPlatePlanService; |
| | | @Autowired |
| | | private IApsPlatePlanTempService apsPlatePlanTempService; |
| | | @Resource |
| | | private ApsPlateRequireDateService apsPlateRequireDateService; |
| | | |
| | | /** |
| | | * 查询钣金计划管理列表 |
| | | */ |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导入Excel数据 |
| | | * @param file |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Operation(summary = "导入工单需求日期", description = "导入工单需求日期") |
| | | //@RequiresPermissions("apsPlatePlan:import") |
| | | @Log(title = "导入工单需求日期", businessType = BusinessType.IMPORT) |
| | | @PostMapping("/importRequireDate") |
| | | public AjaxResult importRequireDate(MultipartFile file) throws Exception { |
| | | ExcelUtil<ApsPlateRequireDate> util = new ExcelUtil<ApsPlateRequireDate>(ApsPlateRequireDate.class); |
| | | List<ApsPlateRequireDate> plateRequireDateList = util.importExcel(file.getInputStream()); |
| | | if (!plateRequireDateList.isEmpty()) { |
| | | try { |
| | | apsPlateRequireDateService.batchSave(plateRequireDateList); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } else { |
| | | return AjaxResult.error("模板内容为空"); |
| | | } |
| | | return AjaxResult.success("导入成功!"); |
| | | } |
| | | } |