|
@@ -288,6 +288,38 @@ public class PreTrackScaleController extends BaseRESTfulController {
|
|
|
return rm;
|
|
return rm;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "设置要当次要使用的委托", notes = "根据PreTrackScale对象创建")
|
|
|
|
|
+ @ApiImplicitParam(name = "model", value = "详细实体PreTrackScale", required = true, dataType = "PreTrackScale")
|
|
|
|
|
+ @PostMapping(value = "/setPreIndex")
|
|
|
|
|
+ public RESTfulResult setPreIndex(@RequestBody PreTrackScale model) {
|
|
|
|
|
+ RESTfulResult rm = failed();
|
|
|
|
|
+ try {
|
|
|
|
|
+ if (model == null) {
|
|
|
|
|
+ return failed("参数为空");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (model.getPredictionNo() == null || "".equals(model.getPredictionNo())) {
|
|
|
|
|
+ return failed("数据预报编号为空");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (model.getCarNo() == null || "".equals(model.getCarNo())) {
|
|
|
|
|
+ return failed("数据预报编号为空");
|
|
|
|
|
+ }
|
|
|
|
|
+ int num = preTrackScaleService.setPreIndex(model);
|
|
|
|
|
+ if (num > 0) {
|
|
|
|
|
+ return success(num);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return failed("设置失败");
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (MarkerMetException e) {
|
|
|
|
|
+ e.printStackTrace();
|
|
|
|
|
+ rm.setMessage(e.getMessage());
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ e.printStackTrace();
|
|
|
|
|
+ rm.setMessage("操作异常,请确认!");
|
|
|
|
|
+ } finally {
|
|
|
|
|
+ }
|
|
|
|
|
+ return rm;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@ApiOperation(value = "停用数据", notes = "根据PreTrackScale对象停用")
|
|
@ApiOperation(value = "停用数据", notes = "根据PreTrackScale对象停用")
|
|
|
@ApiImplicitParam(name = "model", value = "详细实体PreTrackScale", required = true, dataType = "PreTrackScale")
|
|
@ApiImplicitParam(name = "model", value = "详细实体PreTrackScale", required = true, dataType = "PreTrackScale")
|
|
|
@PostMapping(value = "/abolish")
|
|
@PostMapping(value = "/abolish")
|