Browse Source

批量安装BUG

lin 4 years ago
parent
commit
9d9d464fe5

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

@@ -231,7 +231,7 @@ public class AsyncTaskImportService {
                                 continue;
                             }
                             if (deviceTypeIdCell != null) {
-                                CellValue deviceTypeIdCellValue = evaluator.evaluate(customerIdCell);
+                                CellValue deviceTypeIdCellValue = evaluator.evaluate(deviceTypeIdCell);
                                 Integer deviceTypeId =   ((Double) deviceTypeIdCellValue.getNumberValue()).intValue();
                                 if(deviceTypeId==0){
                                     continue;
@@ -377,7 +377,7 @@ public class AsyncTaskImportService {
 
 
         //更新完成生成消息
-        /*Message message = new Message();
+        Message message = new Message();
         message.setSiteId(record.getUserId());
         message.setUserId(record.getUserId());
         message.setMessageType(record.getType());
@@ -389,7 +389,7 @@ public class AsyncTaskImportService {
 
         message.setObjId(record.getId());
         message.setRead(0);
-        messageService.insertSelective(message);*/
+        messageService.insertSelective(message);
 
         log.info("end executeAsyncInstallTask!");
     }

+ 1 - 1
smart-city-platform/src/main/resources/application.properties

@@ -1,2 +1,2 @@
 #开发环境:dev  测试环境:sit  线上环境:prd  演示环境:uat
-spring.profiles.active=dev
+spring.profiles.active=sit

+ 1 - 1
smart-city-platform/src/main/resources/mapper/BuildingMapper.xml

@@ -1023,7 +1023,7 @@
             <if test="days != null"> and swmed.days = #{days} </if>
             <if test="startDays != null"> and swmed.days >= #{startDays} </if>
             <if test="endDays != null"> and swmed.days <![CDATA[ <= ]]> #{endDays} </if>
-            <if test="valveStatus != null and valveStatus != 2"> and swmed.valve_status = #{valveStatus} </if>
+            <if test="valveStatus != null and valveStatus != 2"> and swmed.valve_status = #{valveStatus} and sdt.is_valve = 1 </if>
             <if test="valveStatus != null and valveStatus == 2"> and sdt.is_valve = 0 </if>
             <if test="registerStatus != null"> and sd.register_status = #{registerStatus} </if>
             <if test="programItems != null and programItems.size() != 0"> and

+ 1 - 1
smart-city-platform/src/main/resources/mapper/DeviceMapper.xml

@@ -393,7 +393,7 @@
         <if test="collectorNo != null and collectorNo != ''"> AND scol.collector_no LIKE concat('%',#{collectorNo},'%')</if>
         <if test="errorType != null and errorType != ''"> AND swmed.last_error_type LIKE concat('%',#{errorType},'%')</if>
         <if test="customerId != null"> and sd.customer_id = #{customerId}</if>
-        <if test="valveStatus != null and valveStatus != 2"> and swmed.valve_status = #{valveStatus}</if>
+        <if test="valveStatus != null and valveStatus != 2"> and swmed.valve_status = #{valveStatus} and sdt.is_valve = 1</if>
         <if test="valveStatus != null and valveStatus == 2"> and sdt.is_valve = 0</if>
         <if test="registerStatus != null"> and sd.register_status = #{registerStatus}</if>
         <if test="days != null">