| | |
| | | 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.bhzn.cmd.CommandBuild; |
| | | import com.fzzy.protocol.bhzn.server.BhznGrainV2ServerEngine; |
| | | import com.fzzy.protocol.bhzn.server.BhznGrainV2ServerUtils; |
| | | import com.ld.io.api.InvokeResult; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 风正致远控制柜协议 |
| | | * 邦海智能粮情协议-网口设备 |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | |
| | | GatewayDevice device = reqData.getDevice(); |
| | | |
| | | //获取连接中的设备信息 |
| | | ApiCommonDevice apiCommonDevice = Constant.getCommonDeviceCache(device.getDeviceSn()); |
| | | ApiCommonDevice apiCommonDevice = Constant.getCommonDeviceCache(device.getIp()); |
| | | |
| | | if (null == apiCommonDevice) { |
| | | resp.setCode(500); |
| | |
| | | |
| | | try { |
| | | //Step 请求信息放入内存 |
| | | BhznGrainV2ServerUtils.addSyncReq2Map(device.getDepotIdSys(), reqData); |
| | | ProtocolUtils.addSyncReq2Map(device.getDepotIdSys(), reqData); |
| | | |
| | | // 生成粮情信息 |
| | | String hexStr = CommandBuild.getInstance().getMsgCheck(device.getDeviceSn(), device.getDepotIdSys()); |
| | |
| | | } |
| | | return resp; |
| | | } |
| | | |
| | | @Override |
| | | public BaseResp syncGrainTh(BaseReqData reqData) { |
| | | return new BaseResp(); |
| | | } |
| | | |
| | | @Override |
| | | public BaseResp syncConf(BaseReqData reqData) { |
| | | return new BaseResp(); |
| | | } |
| | | |
| | | @Override |
| | | public BaseResp writeConf(BaseReqData reqData) { |
| | | return new BaseResp(); |
| | | } |
| | | |
| | | @Override |
| | | public BaseResp initCable(BaseReqData reqData) { |
| | | return new BaseResp(); |
| | | } |
| | | |
| | | @Override |
| | | public BaseResp disconnect(BaseReqData reqData) { |
| | | return new BaseResp(); |
| | | } |
| | | |
| | | @Override |
| | | public BaseResp transparent(BaseReqData reqData) { |
| | | return new BaseResp(); |
| | | } |
| | | } |