|  |  |  | 
|---|
|  |  |  | public Integer create(PlatformWaterGas platformWaterGas) { | 
|---|
|  |  |  | if(platformWaterGas.getTimeInfo() ==null || platformWaterGas.getNum()==null | 
|---|
|  |  |  | ||(Constants.equalsInteger(platformWaterGas.getType(),Constants.TWO) && StringUtils.isBlank(platformWaterGas.getCarCode()))){ | 
|---|
|  |  |  | throw  new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,该年月数据已存在,请勿重新录入,可以尝试搜索后进行数据修改!"); | 
|---|
|  |  |  | throw  new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,参数错误!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if( platformWaterGasMapper.selectCount(new QueryWrapper<PlatformWaterGas>().lambda() | 
|---|
|  |  |  | .eq(PlatformWaterGas::getIsdeleted, Constants.ZERO) | 
|---|
|  |  |  | .apply("to_days(time_info) = to_days('"+ DateUtil.getPlusTime2(platformWaterGas.getTimeInfo()) +"')") | 
|---|
|  |  |  | .eq(PlatformWaterGas::getType,platformWaterGas.getType()) | 
|---|
|  |  |  | .eq(Constants.equalsInteger(platformWaterGas.getType(),Constants.TWO),PlatformWaterGas::getCarCode,platformWaterGas.getCarCode()))>0){ | 
|---|
|  |  |  | throw  new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,该年月数据已存在,请勿重新录入,可以尝试搜索后进行数据修改!"); | 
|---|
|  |  |  | } | 
|---|