|
|
|
@ -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;
|
|
|
|
|