WlptBaseModel.java
3.8 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
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;
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);
}
}
public static void init(){
}
public int masterAnalysisReception(){
return 0;
}
public int secondAnalysisReception(){
return 0;
}
}