| | |
| | | import com.chinaztt.ztt.common.core.util.R; |
| | | import com.chinaztt.ztt.common.log.annotation.SysLog; |
| | | import com.chinaztt.ztt.common.security.annotation.Inner; |
| | | import com.chinaztt.ztt.common.security.util.SecurityUtils; |
| | | import com.xxl.job.core.handler.annotation.XxlJob; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | |
| | |
| | | partService.syncPart(); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "同步Ifs", notes = "同步Ifs") |
| | | @PostMapping("/syncNewIfs") |
| | | //@XxlJob("syncPart") |
| | | public R syncNewIfs(Date date) { |
| | | System.out.println(date); |
| | | String key = "syncPart_lock"+ SecurityUtils.getUser().getId(); |
| | | if (redisTemplate.hasKey(key)) { |
| | | throw new RuntimeException("有同步任务正在处理"); |
| | | } |
| | | return R.ok(partService.syncNewIfs(date)); |
| | | } |
| | | /** |
| | | * 分页查询已关联检测模板的零件 |
| | | * |
| | |
| | | /** |
| | | * 根据零件号和零件描述查询库存信息接口 |
| | | * |
| | | * @param part 零件 |
| | | * @param 零件 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "根据零件号和零件描述查询库存信息接口", notes = "根据零件号和零件描述查询库存信息接口") |