package net.vtstar.zhongtong.avi.monitoring.service;

import net.vtstar.zhongtong.avi.equipment.domain.PaintshopStation;
import net.vtstar.zhongtong.avi.global.constant.Constant;
import net.vtstar.zhongtong.avi.monitoring.domain.Skid;
import net.vtstar.zhongtong.avi.monitoring.domain.Vehicle;
import org.springframework.data.redis.core.HashOperations;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

@Service
public class PDAService {

    @Resource(name = "redisTemplate")
    protected HashOperations hashOperations;
    @Resource(name = "redisTemplate")
    protected ValueOperations valueOperations;

    public static void main(String[] args) {
        boolean a =true;
        boolean b =false;
        boolean c =false;
        boolean d =true;
            System.out.println(a & b);
            System.out.println(a & d);
        System.out.println(b&&c);
    }


    //钣金上车绑定
    public void bound(String vehicleNo, String busNo) {

        // TODO: 2019-11-02 判断车身工单号是否在计划中


        if (vehicleNo.equals("HZC1")){
            valueOperations.set(Constant.HANZHUANG_VEHICLE1_BUSNO_KEY + "rfid68", busNo);
        }
        if (vehicleNo.equals("HZC2")){
            valueOperations.set(Constant.HANZHUANG_VEHICLE1_BUSNO_KEY + "rfid69", busNo);
        }
    }
}
