| | |
| | | import com.fzzy.gateway.data.BaseReqData; |
| | | import com.fzzy.gateway.data.BaseResp; |
| | | import com.fzzy.gateway.entity.GatewayDevice; |
| | | import com.fzzy.protocol.ProtocolUtils; |
| | | import com.fzzy.protocol.fzzy.builder.GrainCommandBuilder; |
| | | import com.fzzy.protocol.fzzy.cmd.BaseRemoteImpl; |
| | | import com.fzzy.protocol.fzzy.data.SendMessage; |
| | |
| | | GatewayDevice device = reqData.getDevice(); |
| | | |
| | | //获取连接中的设备信息 |
| | | ApiCommonDevice apiCommonDevice = Constant.getCommonDeviceCache(device.getDeviceSn()); |
| | | ApiCommonDevice apiCommonDevice = Constant.getCommonDeviceCache(device.getIp()); |
| | | |
| | | if (null == apiCommonDevice) { |
| | | resp.setCode(500); |
| | |
| | | try { |
| | | |
| | | //Step 请求信息放入内存 |
| | | ServerUtils.addSyncReq2Map(device.getDepotIdSys(), reqData); |
| | | ProtocolUtils.addSyncReq2Map(device.getDepotIdSys(), reqData); |
| | | |
| | | // Step1 生成粮情信息 |
| | | SendMessage message = GrainCommandBuilder.getInstance().buildMessage(device,apiCommonDevice); |