Browse Source

批量安装BUG

lin 4 năm trước cách đây
mục cha
commit
9ba7a5fcb6

+ 5 - 5
smart-city-platform/src/main/java/com/bz/smart_city/service/impl/StatMeterReadRateByBuildingServiceImpl.java

@@ -329,7 +329,7 @@ public class StatMeterReadRateByBuildingServiceImpl implements StatMeterReadRate
         //2、根据数据项查询客户
         //List<Customer> customerList = customerService.getCustomerListByItem(loginUser.getSiteId(), buildingIds, customerId);
 
-
+        List<Integer> customerIds = customerId != null?newArrayList(customerId):null;
 
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
         //Integer startDate = Integer.valueOf(LocalDate.now().plusDays(-1).format(formatter));
@@ -341,16 +341,16 @@ public class StatMeterReadRateByBuildingServiceImpl implements StatMeterReadRate
 
         if (period == 2) { // 昨天,查询天表
             PageHelper.startPage(pageNum, pageSize);
-            customerRateDtoList = statMeterReadRateByBuildingMapper.getRateListByCustomerV2("sc_stat_meter_read_rate_by_building",loginUser.getSiteId(), startDate, buildingIds,channelId,newArrayList(customerId));
+            customerRateDtoList = statMeterReadRateByBuildingMapper.getRateListByCustomerV2("sc_stat_meter_read_rate_by_building",loginUser.getSiteId(), startDate, buildingIds,channelId,customerIds);
         } else if (period == 7) { // 近7天,查询7天表
             PageHelper.startPage(pageNum, pageSize);
-            customerRateDtoList = statMeterReadRateByBuildingMapper.getRateListByCustomerV2("sc_stat_meter_read_rate_by_building_7day",loginUser.getSiteId(), startDate, buildingIds,channelId,newArrayList(customerId));
+            customerRateDtoList = statMeterReadRateByBuildingMapper.getRateListByCustomerV2("sc_stat_meter_read_rate_by_building_7day",loginUser.getSiteId(), startDate, buildingIds,channelId,customerIds);
         } else if (period == 15) {// 近15天,查询15天表
             PageHelper.startPage(pageNum, pageSize);
-            customerRateDtoList = statMeterReadRateByBuildingMapper.getRateListByCustomerV2("sc_stat_meter_read_rate_by_building_15day",loginUser.getSiteId(), startDate, buildingIds,channelId,newArrayList(customerId));
+            customerRateDtoList = statMeterReadRateByBuildingMapper.getRateListByCustomerV2("sc_stat_meter_read_rate_by_building_15day",loginUser.getSiteId(), startDate, buildingIds,channelId,customerIds);
         }else if (period == 99) {// 上个月,查询15天表
             PageHelper.startPage(pageNum, pageSize);
-            customerRateDtoList = statMeterReadRateByBuildingMapper.getRateListByCustomerV2("sc_stat_meter_read_rate_by_building_month",loginUser.getSiteId(), startDate, buildingIds,channelId,newArrayList(customerId));
+            customerRateDtoList = statMeterReadRateByBuildingMapper.getRateListByCustomerV2("sc_stat_meter_read_rate_by_building_month",loginUser.getSiteId(), startDate, buildingIds,channelId,customerIds);
         }
         if (customerRateDtoList != null && customerRateDtoList.size()>0) {
             for (CustomerRateDto customerRateDto : customerRateDtoList) {

+ 2 - 0
smart-city-platform/src/main/java/com/bz/smart_city/service/impl/assistant/InstallManagerServiceImpl.java

@@ -471,6 +471,7 @@ public class InstallManagerServiceImpl implements InstallManagerService, Initial
 	}
 	
 	@Override
+	@Transactional
 	public boolean deletelInstallInfo(InstallListDTO dto ){
 		log.info("begin InstallManagerService deletelInstallInfo ,request dto = {}",JSON.toJSONString(dto));
 		boolean isSuccess = false ;
@@ -599,6 +600,7 @@ public class InstallManagerServiceImpl implements InstallManagerService, Initial
 
 
 	@Override
+	@Transactional
 	public boolean updateInstallInfo(InstallListDTO dto) {
 		log.info("begin InstallManagerService updateInstallInfo ,request dto = {}",JSON.toJSONString(dto));
 		boolean isSuccess = false ;

+ 1 - 1
smart-city-platform/src/main/java/com/bz/smart_city/service/importfile/AsyncTaskImportService.java

@@ -325,7 +325,7 @@ public class AsyncTaskImportService {
 
                     //循环为空的行上移
                     if(failTime > 0){
-                        for (int rowNum = 9+number-1; rowNum > 9 ; rowNum--) {
+                        for (int rowNum = 9+number-1; rowNum >= 9 ; rowNum--) {
                             Row row = hssfSheet.getRow(rowNum);
                             if (row == null) {
                                 hssfSheet.shiftRows(rowNum+1, 5000, -1);