jiangping
2024-12-12 fdd38a72d0b0b87724aa94f7f9b5b0885f34cff5
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/PlatformWaterGasServiceImpl.java
@@ -349,7 +349,7 @@
            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();
@@ -374,15 +374,14 @@
                }
                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());