#
vincentlu
1 天以前 24de9067a69b6f2d7aaeb2bacd925d995b9120c2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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;
    }
 
}