|
|
@@ -6,8 +6,13 @@ import com.steerinfo.framework.service.pagehelper.PageHelper;
|
|
|
import com.steerinfo.framework.service.pagehelper.PageList;
|
|
|
import com.steerinfo.framework.utils.collection.ListUtils;
|
|
|
import com.steerinfo.meterwork.except.MarkerMetException;
|
|
|
+import com.steerinfo.meterwork.meterworkcaractual.model.MeterWorkCarActual;
|
|
|
+import com.steerinfo.pretrack.pretrackscale.mapper.PreTrackScaleMapper;
|
|
|
import com.steerinfo.pretrack.pretrackscale.model.PreTrackScale;
|
|
|
import com.steerinfo.pretrack.pretrackscale.service.IPreTrackScaleService;
|
|
|
+import com.steerinfo.util.CommonPage;
|
|
|
+import com.steerinfo.util.FieldsCollector;
|
|
|
+import com.steerinfo.util.StringUtils;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
@@ -18,6 +23,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
* PreTrackScale RESTful接口:
|
|
|
@@ -41,6 +47,9 @@ public class PreTrackScaleController extends BaseRESTfulController {
|
|
|
@Autowired
|
|
|
IPreTrackScaleService preTrackScaleService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ PreTrackScaleMapper preTrackScaleMapper;
|
|
|
+
|
|
|
@ApiOperation(value = "获取列表", notes = "分页查询")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
|
|
|
@@ -156,14 +165,13 @@ public class PreTrackScaleController extends BaseRESTfulController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
@ApiOperation(value = "车号获取", notes = "根据车号获取预报信息")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "pageNum", value = "查询页数", dataType = "Integer"),
|
|
|
@ApiImplicitParam(name = "pageSize", value = "每页记录数", dataType = "Integer")
|
|
|
})
|
|
|
- @GetMapping(value = "/queryByFlag")
|
|
|
- public RESTfulResult selectlist(@RequestParam String carNo, Integer pageNum, Integer pageSize) {
|
|
|
+ @GetMapping(value = "/select")
|
|
|
+ public RESTfulResult select(@RequestParam String carNo, Integer pageNum, Integer pageSize) {
|
|
|
RESTfulResult rm = failed();
|
|
|
try {
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
@@ -180,6 +188,35 @@ public class PreTrackScaleController extends BaseRESTfulController {
|
|
|
return rm;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @ApiOperation(value = "车号获取", notes = "根据车号获取预报信息")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "pageNum", value = "查询页数", dataType = "Integer"),
|
|
|
+ @ApiImplicitParam(name = "pageSize", value = "每页记录数", dataType = "Integer")
|
|
|
+ })
|
|
|
+ @PostMapping(value = "/queryByFlag")
|
|
|
+ public RESTfulResult selectlist(@RequestBody PreTrackScale pre) {
|
|
|
+ RESTfulResult rm = failed();
|
|
|
+ Map<String, Object> map = FieldsCollector.beanToMap(pre);
|
|
|
+
|
|
|
+ try {
|
|
|
+ List<PreTrackScale> rows = preTrackScaleMapper.selectBy(map);
|
|
|
+ rm.setCode("200");
|
|
|
+ rm.setMessage("操作成功");
|
|
|
+ rm.setSucceed();
|
|
|
+ rm.setData(rows);
|
|
|
+ return rm;
|
|
|
+ } catch (MarkerMetException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ rm.setMessage(e.getMessage());
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ rm.setMessage("操作异常,请确认!");
|
|
|
+ } finally {
|
|
|
+ }
|
|
|
+ return rm;
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "视图获取当前以及历史数据", notes = "获取预报信息")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "pageNum", value = "查询页数", dataType = "Integer"),
|