随行自动开灯

湖北-大华摄像头
LAPTOP-S9HJSOEB\昊天 1 year ago
parent 5414bc81f8
commit 4cde4aa90d

@ -328,6 +328,10 @@ public class PlcService {
*/ */
public void action(PlcCmdInfo plcCmdInfo, Integer times, String code) throws InterruptedException { public void action(PlcCmdInfo plcCmdInfo, Integer times, String code) throws InterruptedException {
Street street = streetService.getStreetByPlcId(plcCmdInfo.getPlcId()); Street street = streetService.getStreetByPlcId(plcCmdInfo.getPlcId());
List<LightSource> lightSources = lightSourceMapper.selectList(new QueryWrapper<LightSource>().eq("street_id",street.getId()));
lightSources.forEach(lightSource -> {
lightSourceService.controllerLightSource(lightSource,1);
});
if (street == null) { if (street == null) {
log.error("street not found ,plcId :{}", plcCmdInfo.getPlcId()); log.error("street not found ,plcId :{}", plcCmdInfo.getPlcId());
return; return;

Loading…
Cancel
Save