设备弹窗巡检记录接口

This commit is contained in:
wyw 2024-08-13 21:20:46 +08:00
parent d8a171692a
commit 6422dedef7
2 changed files with 27 additions and 2 deletions

View File

@ -12,6 +12,9 @@ import com.fastbee.waterele.domain.MaWatereleRecord;
import com.fastbee.waterele.domain.dto.MaGuangaiRecordDto;
import com.fastbee.waterele.domain.dto.MaWatereleRecordDto;
import com.fastbee.xunjian.domain.XjInspectionRecords;
import com.fastbee.xunjian.domain.XjInspectionRoutes;
import com.fastbee.xunjian.mapper.XjInspectionRecordsMapper;
import com.fastbee.xunjian.mapper.XjInspectionRoutesMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -26,6 +29,10 @@ public class DeviceDetailServiceImpl implements IDeviceDetailService {
public IDeviceService iDeviceService;
@Autowired
private IThingsModelService thingsModelService;
@Autowired
private XjInspectionRoutesMapper xjInspectionRoutesMapper;
@Autowired
private XjInspectionRecordsMapper xjInspectionRecordsMapper;
public DeviceDetailServiceImpl(DeviceMapper deviceMapper) {
this.deviceMapper = deviceMapper;
}
@ -87,8 +94,20 @@ public class DeviceDetailServiceImpl implements IDeviceDetailService {
if (device == null) {
throw new RuntimeException("未查到该设备");
}
List<XjInspectionRecords> xjInspectionRecords = new ArrayList<>();
return Collections.emptyList();
XjInspectionRoutes xjInspectionRoutes = new XjInspectionRoutes();
xjInspectionRoutes.setEngineeringObjectId(deviceId);
xjInspectionRoutes.setEngineeringObjectType("1");
List<XjInspectionRoutes> xjInspectionRoutes1 = xjInspectionRoutesMapper.selectXjInspectionRoutesList(xjInspectionRoutes);
if(xjInspectionRoutes1.size() > 0){
List<XjInspectionRecords> xjInspectionRecordsList = new ArrayList<>();
XjInspectionRecords xjInspectionRecords = new XjInspectionRecords();
xjInspectionRecords.setInspectionRouteId(xjInspectionRoutes1.get(0).getId());
xjInspectionRecords.setChaxunBeginTime(queryLogVo.getStartTime());
xjInspectionRecords.setChaxunEndTime(queryLogVo.getEndTime());
xjInspectionRecordsList = xjInspectionRecordsMapper.selectXjInspectionRecordsList(xjInspectionRecords);
return xjInspectionRecordsList;
}
return new ArrayList<>();
}

View File

@ -63,6 +63,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
AND date_format(end_time ,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if>
<if test="chaxunBeginTime != null and chaxunBeginTime != ''"><!-- 开始时间检索 -->
AND date_format(end_time ,'%y%m%d%H%i%s') &gt;= date_format(#{chaxunBeginTime},'%y%m%d%H%i%s')
</if>
<if test="chaxunEndTime != null and chaxunEndTime != ''"><!-- 结束时间检索 -->
AND date_format(end_time ,'%y%m%d%H%i%s') &lt;= date_format(#{chaxunEndTime},'%y%m%d%H%i%s')
</if>
</where>
order by id desc
</select>