增加条件判断
This commit is contained in:
parent
0b7ba3f729
commit
ecf5896b75
@ -43,6 +43,66 @@ public class XhpcPileRegularInspectServiceImpl extends BaseService implements IX
|
||||
if(tenantId==null || "".equals(tenantId)){
|
||||
return AjaxResult.error(500, "请重新登录");
|
||||
}
|
||||
|
||||
if(xhpcPileRegularInspect.getVersionNumberTime()==null || "".equals(xhpcPileRegularInspect.getVersionNumberTime())){
|
||||
return AjaxResult.error(500, "版本号检查时间必填");
|
||||
}
|
||||
if(xhpcPileRegularInspect.getTimingPriceTime()==null || "".equals(xhpcPileRegularInspect.getTimingPriceTime())){
|
||||
return AjaxResult.error(500, "校时校价时间必填");
|
||||
}
|
||||
if(xhpcPileRegularInspect.getRateTime()==null || "".equals(xhpcPileRegularInspect.getRateTime())){
|
||||
return AjaxResult.error(500, "费率时间必填");
|
||||
}
|
||||
if(xhpcPileRegularInspect.getCopyingAdministratorTime()==null || "".equals(xhpcPileRegularInspect.getCopyingAdministratorTime())){
|
||||
return AjaxResult.error(500, "定期抄发给管理员时间必填");
|
||||
}
|
||||
try{
|
||||
String[] split = xhpcPileRegularInspect.getVersionNumberTime().split(",");
|
||||
for (int i = 0; i <split.length ; i++) {
|
||||
int s = Integer.parseInt(split[i]);
|
||||
if(s<0 ||s>24){
|
||||
return AjaxResult.error(500, "版本号检查时间格式不对");
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
return AjaxResult.error(500, "版本号检查时间格式不对");
|
||||
}
|
||||
try{
|
||||
String[] split = xhpcPileRegularInspect.getTimingPriceTime().split(",");
|
||||
for (int i = 0; i <split.length ; i++) {
|
||||
int s = Integer.parseInt(split[i]);
|
||||
if(s<0 ||s>24){
|
||||
return AjaxResult.error(500, "校时校价时格式不对");
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
return AjaxResult.error(500, "校时校价时格式不对");
|
||||
}
|
||||
|
||||
try{
|
||||
String[] split = xhpcPileRegularInspect.getRateTime().split(",");
|
||||
for (int i = 0; i <split.length ; i++) {
|
||||
int s = Integer.parseInt(split[i]);
|
||||
if(s<0 ||s>24){
|
||||
return AjaxResult.error(500, "定期抄发给管理员时间格式不对");
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
return AjaxResult.error(500, "定期抄发给管理员时间格式不对");
|
||||
}
|
||||
|
||||
try{
|
||||
String[] split = xhpcPileRegularInspect.getCopyingAdministratorTime().split(",");
|
||||
for (int i = 0; i <split.length ; i++) {
|
||||
int s = Integer.parseInt(split[i]);
|
||||
if(s<0 ||s>24){
|
||||
return AjaxResult.error(500, "费率式不对");
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
return AjaxResult.error(500, "费率格式不对");
|
||||
}
|
||||
|
||||
if(xhpcPileRegularInspect.getPileRegularInspectId()==null){
|
||||
|
||||
Map<String, Object> map = xhpcPileRegularInspectMapper.getPileRegularInspectTenantId(tenantId);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user