|
@@ -37,17 +37,21 @@ public class WeighbridgeController {
|
|
|
public LicensePlateValidateResponse weighBridgePush(
|
|
public LicensePlateValidateResponse weighBridgePush(
|
|
|
@Parameter(description = "车牌号") @RequestParam("licensePlate") String licensePlate,
|
|
@Parameter(description = "车牌号") @RequestParam("licensePlate") String licensePlate,
|
|
|
@Parameter(description = "地磅编号") @RequestParam("weighbridgeCode") String weighbridgeCode,
|
|
@Parameter(description = "地磅编号") @RequestParam("weighbridgeCode") String weighbridgeCode,
|
|
|
- @Parameter(description = "称重重量(吨)") @RequestParam("grossWeight") BigDecimal grossWeight,
|
|
|
|
|
- @Parameter(description = "时间戳(秒或毫秒)") @RequestParam("timestamp") Long timestamp,
|
|
|
|
|
|
|
+ @Parameter(description = "称重重量(吨)") @RequestParam("grossWeight") String grossWeight,
|
|
|
|
|
+ @Parameter(description = "时间戳(秒或毫秒)") @RequestParam("timestamp") String timestamp,
|
|
|
@Parameter(description = "处理标签") @RequestParam(value = "tag", required = false) String tag,
|
|
@Parameter(description = "处理标签") @RequestParam(value = "tag", required = false) String tag,
|
|
|
@Parameter(description = "车辆照片") @RequestParam(value = "images[]", required = false) MultipartFile[] images
|
|
@Parameter(description = "车辆照片") @RequestParam(value = "images[]", required = false) MultipartFile[] images
|
|
|
) {
|
|
) {
|
|
|
// 构建请求对象
|
|
// 构建请求对象
|
|
|
WeighbridgePushRequest request = new WeighbridgePushRequest();
|
|
WeighbridgePushRequest request = new WeighbridgePushRequest();
|
|
|
- request.setLicensePlate(licensePlate);
|
|
|
|
|
- request.setWeighbridgeCode(weighbridgeCode);
|
|
|
|
|
- request.setGrossWeight(grossWeight);
|
|
|
|
|
- request.setTimestamp(timestamp);
|
|
|
|
|
|
|
+ String lience = StringUtils.isNotBlank(licensePlate) ? licensePlate.trim().replace("\\r", "").replace("\\n", ""):"";
|
|
|
|
|
+ request.setLicensePlate(lience);
|
|
|
|
|
+ String weighCode =StringUtils.isNotBlank(weighbridgeCode) ? weighbridgeCode.trim().replace("\\r", "").replace("\\n", ""):"";
|
|
|
|
|
+ request.setWeighbridgeCode(weighCode);
|
|
|
|
|
+ String rossWeight = StringUtils.isNotBlank(grossWeight) ?grossWeight.trim().replace("\\r", "").replace("\\n", ""):"";
|
|
|
|
|
+ request.setGrossWeight(new BigDecimal(rossWeight));
|
|
|
|
|
+ String time = StringUtils.isNotBlank(timestamp) ? timestamp.trim().replace("\\r", "").replace("\\n", ""):"";
|
|
|
|
|
+ request.setTimestamp(Long.valueOf(time));
|
|
|
request.setTag(tag);
|
|
request.setTag(tag);
|
|
|
request.setImages(images);
|
|
request.setImages(images);
|
|
|
|
|
|