| New file |
| | |
| | | package com.zy.acs.manager.manager.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.zy.acs.framework.common.R; |
| | | import com.zy.acs.manager.core.service.ThreadPoolRegulator; |
| | | import com.zy.acs.manager.manager.mapper.IntegrationRecordMapper; |
| | | import com.zy.acs.manager.manager.entity.IntegrationRecord; |
| | | import com.zy.acs.manager.manager.service.IntegrationRecordService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.concurrent.CompletableFuture; |
| | | |
| | | @Slf4j |
| | | @Service("integrationRecordService") |
| | | public class IntegrationRecordServiceImpl extends ServiceImpl<IntegrationRecordMapper, IntegrationRecord> implements IntegrationRecordService { |
| | | |
| | | @Autowired |
| | | private ThreadPoolRegulator threadPoolRegulator; |
| | | |
| | | @Override |
| | | public Boolean syncRecord(IntegrationRecord record) { |
| | | CompletableFuture<?> completableFuture = CompletableFuture.supplyAsync(() -> { |
| | | |
| | | if (!this.save(record)) { |
| | | log.error("failed to save record {}", JSON.toJSONString(record)); |
| | | } |
| | | // mapDataDispatcher.modifyDynamicMatrix(null, null, param.getAgvNo(), true); |
| | | // avoidWaveCalculator.calcDynamicNodeByVehicle(agv, null); |
| | | return R.ok(); |
| | | }, threadPoolRegulator.getInstance()); |
| | | |
| | | return true; |
| | | } |
| | | |
| | | } |