mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-13 21:32:07 +08:00
系统配置-封边条校验规则修改
This commit is contained in:
+20
-6
@@ -20,6 +20,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@@ -73,16 +74,29 @@ public class SealedgeServiceHandler extends AbstractSystemConfigServiceHandler {
|
||||
throw exception(SEALEDGE_CONFIG_NOT_EXISTS,(i+1));
|
||||
}
|
||||
|
||||
if(Integer.parseInt(widthMin) > Integer.parseInt(widthValue) ){
|
||||
throw exception(SEALEDGE_CONFIG_MIN_VALUE_DATA_ERROR,(i+1));
|
||||
BigDecimal widthMin2 = BigDecimal.valueOf(Double.parseDouble(widthMin));
|
||||
|
||||
BigDecimal widthMax2 = BigDecimal.valueOf(Double.parseDouble(widthMax));
|
||||
|
||||
BigDecimal widthValue2 = BigDecimal.valueOf(Double.parseDouble(widthValue));
|
||||
|
||||
|
||||
if(widthMin2.scale() > 3 || widthMax2.scale() > 3 || widthValue2.scale() > 3 ){
|
||||
throw exception(DECIMAL_PLACES_MAX_TWO,(i+1));
|
||||
}
|
||||
|
||||
if(Integer.parseInt(widthMax) < Integer.parseInt(widthValue) ){
|
||||
throw exception(SEALEDGE_CONFIG_MAX_VALUE_DATA_ERROR,(i+1));
|
||||
|
||||
if( widthMin2.compareTo(BigDecimal.ZERO) != 1 ){
|
||||
throw exception(SEALEDGE_CONFIG_MIN_VALUE_DATA_ERROR,(i+1),widthMin2.stripTrailingZeros().toPlainString());
|
||||
}
|
||||
|
||||
if( widthValue2.compareTo(widthMax2) == -1 ){
|
||||
throw exception(SEALEDGE_CONFIG_MAX_VALUE_DATA_ERROR,(i+1),widthValue2.stripTrailingZeros().toPlainString(),widthMax2.stripTrailingZeros().toPlainString());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
catch (ServiceException e){
|
||||
throw e;
|
||||
}catch (Exception e){
|
||||
@@ -120,12 +134,12 @@ public class SealedgeServiceHandler extends AbstractSystemConfigServiceHandler {
|
||||
|
||||
@Override
|
||||
public void updateConfigStatus(ConfigUpdateStatusReqVO reqVO) {
|
||||
|
||||
// TODO document why this method is empty
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateConfigSort(List<ConfigUpdateSortReqVO> reqVO) {
|
||||
|
||||
// TODO document why this method is empty
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user