| | |
| | | ExcelImporter ie = null; |
| | | List<PlatformGasImport> dataList =null; |
| | | try { |
| | | ie = new ExcelImporter(file,0,0); |
| | | ie = new ExcelImporter(file,1,0); |
| | | dataList = ie.getDataList(PlatformGasImport.class,null); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | } |
| | | if( platformWaterGasMapper.selectCount(new QueryWrapper<PlatformWaterGas>().lambda() |
| | | .eq(PlatformWaterGas::getIsdeleted, Constants.ZERO) |
| | | .apply("to_days(time_info) = to_days('"+ DateUtil.getPlusTime2(model.getTimeInfo()) +"')") |
| | | .apply("to_days(time_info) = to_days('"+ model.getTimeInfo()+"-01" +"')") |
| | | .eq(PlatformWaterGas::getType,Constants.TWO) |
| | | .eq(PlatformWaterGas::getCarCode,model.getCarCode()))>0){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,该["+DateUtil.getPlusTime2(model.getTimeInfo())+"]数据已存在,请勿重新录入,可以尝试搜索后进行数据修改!"); |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,该["+model.getTimeInfo()+"]数据已存在,请勿重新录入,可以尝试搜索后进行数据修改!"); |
| | | } |
| | | |
| | | platformWaterGas.setTimeInfo(model.getTimeInfo()); |
| | | platformWaterGas.setTimeInfo(DateUtil.StringToDate(model.getTimeInfo()+"-01","yyyy-MM-dd")); |
| | | platformWaterGas.setCarCode(model.getCarCode()); |
| | | platformWaterGas.setContent(model.getContent()); |
| | | platformWaterGas.setIsdeleted(Constants.ZERO); |
| | | platformWaterGas.setType(Constants.TWO); |
| | | platformWaterGas.setCreator(loginUserInfo.getId()); |