EnginChanelController.java
1.3 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
package com.sy.controller;
import com.sy.model.GatherInfo;
import com.sy.service.EnginCheckService;
import lombok.extern.slf4j.Slf4j;
import org.basis.enhance.groovy.entity.EngineExecutorResult;
import org.basis.enhance.groovy.entity.ExecuteParams;
import org.basis.enhance.groovy.entity.ScriptQuery;
import org.basis.enhance.groovy.executor.EngineExecutor;
import org.basis.enhance.groovy.helper.RefreshScriptHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
@RestController
@Slf4j
@RequestMapping("/chanel")
public class EnginChanelController {
@Autowired
EnginCheckService enginCheckService;
@PostMapping("/check")
public String x21Check(@RequestBody GatherInfo gatherInfo) {
ExecuteParams executeParams = enginCheckService.makeParaByGagherInfo(gatherInfo);
Boolean check = enginCheckService.enginCheckByGatherInfo(gatherInfo,executeParams);
if (check){
log.info("脚本验放测试通过");
//放行
enginCheckService.pass(gatherInfo,executeParams);
enginCheckService.formRelease(gatherInfo,executeParams);
}else {
log.error("脚本验放测试失败或等待关锁施解封");
}
return "ok";
}
}