LogicOperation.java
1.6 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
package com.sy.logic;
import com.sy.model.GatherInfo;
import com.sy.model.LandBusinessTypeList;
import com.sy.service.LandBusListService;
import com.sy.socket.CommandClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.math.BigDecimal;
import java.util.List;
@Component
public class LogicOperation {
@Autowired
private LandBusListService listService;
private static LogicOperation logic;
@PostConstruct
public void init(){
logic = this;
logic.listService = this.listService;
}
public boolean operation(GatherInfo info){
boolean sign = false;
BigDecimal grosssWt = info.getGrosswt();
String ietype = info.getIetype();
List<LandBusinessTypeList>lists = null;
if("E".equals(ietype)){
ietype = "出场站";
lists = listService.selectByFrameNoAndType(info.getIcvename(),ietype);
for (LandBusinessTypeList list:lists) {
//查询是否做了出场申请
if(list.getContrastflag()==""|list.getContrastflag()==null){
//判断车重
//判断载货重量是否符合所设定的范围
//发送放行指令
String flag = "";
CommandClient.Client(info,flag);
sign = true;
}
}
}else {
ietype = "进场站";
lists = listService.selectByFrameNoAndType(info.getIcvename(),ietype);
}
return sign;
}
}