| | |
| | | package com.aps.job.controller; |
| | | |
| | | import com.aps.common.core.constant.Constants; |
| | | import com.aps.common.core.constant.SecurityConstants; |
| | | import com.aps.common.core.exception.job.TaskException; |
| | | import com.aps.common.core.utils.StringUtils; |
| | | import com.aps.common.core.utils.poi.ExcelUtil; |
| | |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.quartz.SchedulerException; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | private IApsMaterialStorageManagementJobService apsMaterialStorageManagementJobService; |
| | | |
| | | @Autowired |
| | | private IApsStandardProcessRouteHeaderJobService apsStandardProcessRouteHeaderJobService; |
| | | |
| | | @Autowired |
| | | private RemoteCoreService remoteCoreService; |
| | | |
| | | @Autowired |
| | | public RedisTemplate redisTemplate; |
| | | |
| | | @Autowired |
| | | private IApsMaterialManagementJobService apsMaterialManagementJobService; |
| | | |
| | | /** |
| | | * 查询定时任务列表 |
| | | */ |
| | |
| | | return apsBomHeaderJobService.syncBomDataJob(1, 1000, "", ""); |
| | | } |
| | | |
| | | @PostMapping("/refreshProcessRouteData") |
| | | public Boolean refreshProcessRouteData() throws SchedulerException, TaskException |
| | | { |
| | | return apsStandardProcessRouteHeaderJobService.syncProcessRouteDataJob(1, 1000, "", ""); |
| | | } |
| | | |
| | | @PutMapping("/test") |
| | | public void test(@RequestBody SysJob job) throws Exception |
| | | { |
| | | System.out.println("start"); |
| | | //同步物料数据 |
| | | apsMaterialManagementJobService.syncApsMaterialData(1, 1000, "FORTUNA", ""); |
| | | //同步工艺路线数据 |
| | | // apsStandardProcessRouteHeaderJobService.syncProcessRouteData(1, 1000, "", ""); |
| | | //获取Redis缓存中的BOM数据 |
| | | // JSONArray jsonArray = (JSONArray)redisTemplate.opsForValue().get("BOM:BOM_FORTUNA_A6501-001080"); |
| | | //将BOM数据存进Redis中 |
| | | remoteCoreService.setBomDataToRedis(SecurityConstants.INNER); |
| | | // remoteCoreService.setBomDataToRedis(SecurityConstants.INNER); |
| | | //同步物料库存数据 |
| | | // apsMaterialStorageManagementJobService.syncApsMaterialStorageData(1, 1000, "", ""); |
| | | //同步BOM数据 |