WlptBaseModel.java 4.2 KB
package com.tianbo.analysis.bean;

import com.netflix.discovery.converters.Auto;
import com.tianbo.analysis.dao.*;
import com.tianbo.analysis.service.CustomMessageService;
import com.tianbo.analysis.service.SendLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class WlptBaseModel {


    @Autowired
    public  ALLOCATEARRIVALMapper allocatearrivalMapper;

    @Autowired
    public  SendLogService sendLogService;

    @Autowired
    public  ARRIVEDMASTERMapper arrivedmasterMapper;

    @Autowired
    public  ARRIVEDSECONDARYMapper arrivedsecondaryMapper;

    @Autowired
    public  DEPARTURESLOADINGMapper departuresloadingMapper;

    @Autowired
    public  INPORTALLOCATEMapper inportallocateMapper;

    @Autowired
    public INTERNATIONALTRANSITMapper internationaltransitMapper;

    @Autowired
    public ORIGINMANIFESTMASTERMapper originmanifestmasterMapper;

    @Autowired
    public OriginmanifestsecondaryMapper originmanifestsecondaryMapper;

    @Autowired
    public PREPAREMASTERMapper preparemasterMapper;

    @Autowired
    public PREPARESECONDARYMapper preparesecondaryMapper;

    @Autowired
    public TALLYMASTERMapper tallymasterMapper;

    @Autowired
    public TALLYSECONDARYMapper tallysecondaryMapper;

    @Autowired
    public CUSTOMSMESSAGEMapper customsmessageMapper;

    @Autowired
    public CustomMessageService customMessageService;

    @Autowired
    public MANIFESTLOADMapper manifestloadMapper;

    @Autowired
    public MANIFESTLOSTCHANGEMapper manifestlostchangeMapper;


    public WlptBaseModel() {
        //处理多线程时 springboot 无法注入bean的问题
        if (allocatearrivalMapper==null){
            allocatearrivalMapper = SpringBeanUtitl.getBean(ALLOCATEARRIVALMapper.class);
        }
        if (sendLogService==null){
            sendLogService = SpringBeanUtitl.getBean(SendLogService.class);
        }
        if (arrivedmasterMapper==null){
            arrivedmasterMapper = SpringBeanUtitl.getBean(ARRIVEDMASTERMapper.class);
        }
        if (arrivedsecondaryMapper==null){
            arrivedsecondaryMapper= SpringBeanUtitl.getBean(ARRIVEDSECONDARYMapper.class);
        }
        if(departuresloadingMapper==null){
            departuresloadingMapper = SpringBeanUtitl.getBean(DEPARTURESLOADINGMapper.class);
        }
        if(inportallocateMapper==null){
            inportallocateMapper = SpringBeanUtitl.getBean(INPORTALLOCATEMapper.class);
        }
        if(internationaltransitMapper==null){
            internationaltransitMapper = SpringBeanUtitl.getBean(INTERNATIONALTRANSITMapper.class);
        }
        if(originmanifestmasterMapper==null){
            originmanifestmasterMapper = SpringBeanUtitl.getBean(ORIGINMANIFESTMASTERMapper.class);
        }
        if(originmanifestsecondaryMapper==null){
            originmanifestsecondaryMapper = SpringBeanUtitl.getBean(OriginmanifestsecondaryMapper.class);
        }
        if(preparemasterMapper==null){
            preparemasterMapper = SpringBeanUtitl.getBean(PREPAREMASTERMapper.class);
        }
        if(preparesecondaryMapper==null){
            preparesecondaryMapper = SpringBeanUtitl.getBean(PREPARESECONDARYMapper.class);
        }
        if(tallymasterMapper==null){
            tallymasterMapper = SpringBeanUtitl.getBean(TALLYMASTERMapper.class);
        }
        if(tallysecondaryMapper==null){
            tallysecondaryMapper = SpringBeanUtitl.getBean(TALLYSECONDARYMapper.class);
        }
        if(customsmessageMapper==null){
            customsmessageMapper = SpringBeanUtitl.getBean(CUSTOMSMESSAGEMapper.class);
        }
        if(customMessageService==null){
            customMessageService = SpringBeanUtitl.getBean(CustomMessageService.class);
        }
        if(manifestloadMapper==null){
            manifestloadMapper = SpringBeanUtitl.getBean(MANIFESTLOADMapper.class);
        }
        if(manifestlostchangeMapper==null){
            manifestlostchangeMapper = SpringBeanUtitl.getBean(MANIFESTLOSTCHANGEMapper.class);
        }

    }

    public static void init(){

    }

    public int masterAnalysisReception(){
        return 0;
    }

    public int secondAnalysisReception(){
        return 0;
    }
}