Ver código fonte

1.一键上下班功能代码完成 代码提交

jingyuanchao 1 ano atrás
pai
commit
f98862c6d9

+ 4 - 4
soc-modules/soc-modules-host/src/main/java/com/xunmei/host/work/service/impl/IotDayWorkOperationServiceImpl.java

@@ -81,12 +81,12 @@ public class IotDayWorkOperationServiceImpl extends ServiceImpl<IotDayWorkOperat
     @Override
     public IotDayWorkOperation findByHostDataIdAndIotCode(Long hostDataId, Long hostDataOperationId, String iotCode) {
         LambdaQueryWrapper<IotDayWorkOperation> wrapper = new LambdaQueryWrapper<>();
-        wrapper.eq(IotDayWorkOperation::getHostDataId, hostDataId);
-        if (hostDataOperationId == null) {
+        wrapper.eq(IotDayWorkOperation::getHostDataOperationId, hostDataOperationId);
+        if (hostDataId == null) {
             //单独操作的时候这个字段为null
-            wrapper.isNull(IotDayWorkOperation::getHostDataOperationId);
+            wrapper.isNull(IotDayWorkOperation::getHostDataId);
         } else {
-            wrapper.eq(IotDayWorkOperation::getHostDataOperationId, hostDataOperationId);
+            wrapper.eq(IotDayWorkOperation::getHostDataId, hostDataId);
         }
         wrapper.eq(IotDayWorkOperation::getIotCode, iotCode);
         wrapper.last(Constants.LIMIT1);

+ 1 - 6
soc-modules/soc-modules-host/src/main/resources/mapper/IotDeviceInfoMapper.xml

@@ -42,12 +42,7 @@
     </update>
 
     <select id="selectLoopList" resultType="com.xunmei.system.api.domain.iot.IotDeviceInfo">
-        select d.device_product    as productName,
-               d.device_name       AS object_name,
-               d.`device_code`     AS device_name,
-               d.id                AS zone_id,
-               s.state             AS object_status,
-               s.state_update_time as object_time
+        select *
         from iot_device_info d
                  inner JOIN iot_device_status s ON d.device_product = s.device_product and d.device_code = s.device_code
         where d.device_product = 'FSU_DoPowerCollection'