MessageRouterX82.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
package com.sy.service.router;
import com.sy.bwAssist.Message;
import com.sy.model.GatherInfo;
import com.sy.service.CommandLogService;
import com.sy.service.EnginCheckService;
import lombok.extern.slf4j.Slf4j;
import org.basis.enhance.groovy.entity.ExecuteParams;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Slf4j
@Service("X82")
public class MessageRouterX82 implements MessageRouterG2 {
@Autowired
private EnginCheckService enginCheckService;
@Autowired
private CommandLogService commandLogService;
@Override
public void route(GatherInfo gatherInfo,String reason) {
log.info("[G2-SUCCESS]-金二验放通过,下放最终抬杆指令.");
enginCheck(gatherInfo,reason);
}
@Override
public void faild(GatherInfo gatherInfo,String reason) {
commandLogService.commandlog(gatherInfo,false,"金二验放失败,原因:"+reason,null,null,0.0,0.0,0.0,0.0);
ExecuteParams executeParams = enginCheckService.makeParaByGagherInfo(gatherInfo);
enginCheckService.passFaild(gatherInfo,reason,executeParams);
log.info("[G2-FEEDBACK-CHECK-FAILD]-{}",reason);
}
public void enginCheck(GatherInfo gatherInfo,String reason){
commandLogService.commandlog(gatherInfo,true,"金二验放通过"+reason,null,null,0.0,0.0,0.0,0.0);
ExecuteParams executeParams = enginCheckService.makeParaByGagherInfo(gatherInfo);
enginCheckService.pass(gatherInfo,executeParams);
enginCheckService.formRelease(gatherInfo,executeParams);
log.info("引擎验放完结");
}
}