| | |
| | | import com.fzzy.api.data.ApiCommonDevice; |
| | | import com.fzzy.gateway.GatewayUtils; |
| | | import com.fzzy.gateway.entity.GatewayDevice; |
| | | import com.fzzy.gateway.service.GatewayDeviceService; |
| | | import com.fzzy.protocol.fzzy.builder.ObjectCommandBuilder; |
| | | import com.fzzy.protocol.fzzy.builder.SimpleCommandBuilder; |
| | | import com.fzzy.protocol.fzzy.cmd.BaseRemoteImpl; |
| | |
| | | import org.apache.commons.lang3.time.DateFormatUtils; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | public class AnalysisSystem extends BaseRemoteImpl { |
| | | |
| | | public static final String BEAN_ID = "fzzy.analysisSystem"; |
| | | |
| | | |
| | | @Resource |
| | | private GatewayDeviceService gatewayDeviceService; |
| | | |
| | | |
| | | public void analysis1001(ReMessage reMessage) { |
| | |
| | | device.setSn(reMessage.getSn()); |
| | | device.setId(reMessage.getIedId()); |
| | | device.setOnlineTime(new Date()); |
| | | device.setCode("SUCCESS"); |
| | | Constant.updateCache(device); |
| | | |
| | | //更新设备在线 |
| | | gatewayDeviceService.onlineByCommonDevice(device); |
| | | |
| | | |
| | | //返回当前系统时间 |
| | | Response1001 response = new Response1001(); |