|
@@ -286,16 +286,16 @@ public class BaseCameraManagementController extends BaseController {
|
|
|
baseCameraManagement.setInstallMile(install.multiply(new BigDecimal("1000")).intValue());
|
|
|
}
|
|
|
}
|
|
|
- if (!StringUtils.isEmptySunhh(baseCameraManagement.getInstallMileBD())) {
|
|
|
- if (!baseCameraManagement.getInstallMileBD().toString().matches(PATTERN)) {
|
|
|
+ if (!StringUtils.isEmptySunhh(baseCameraManagement.getEndMileBD())) {
|
|
|
+ if (!baseCameraManagement.getEndMileBD().toString().matches(PATTERN)) {
|
|
|
return error("监控范围结束里程位置填写格式不正确");
|
|
|
} else {
|
|
|
- BigDecimal end = baseCameraManagement.getInstallMileBD().setScale(3, RoundingMode.HALF_UP);
|
|
|
+ BigDecimal end = baseCameraManagement.getEndMileBD().setScale(3, RoundingMode.HALF_UP);
|
|
|
// double end = Double.parseDouble(baseCameraManagement.getEndMile().toString());
|
|
|
baseCameraManagement.setEndMile(end.multiply(new BigDecimal("1000")).intValue());
|
|
|
}
|
|
|
}
|
|
|
- if (!StringUtils.isEmptySunhh(baseCameraManagement.getBeginMile()) && !StringUtils.isEmptySunhh(baseCameraManagement.getEndMile())) {
|
|
|
+ if (!StringUtils.isEmptySunhh(baseCameraManagement.getBeginMile()) || !StringUtils.isEmptySunhh(baseCameraManagement.getEndMile())) {
|
|
|
if (baseCameraManagement.getBeginMile() > baseCameraManagement.getEndMile()) {
|
|
|
return error("监控范围开始里程位置不能大于监控范围结束里程位置");
|
|
|
}
|