|  |  | 
 |  |  | package com.dy.common.mw.protocol.p206V202404.parse; | 
 |  |  |  | 
 |  |  | import com.alibaba.fastjson2.JSON; | 
 |  |  | import com.alibaba.fastjson2.JSONObject; | 
 |  |  | import com.dy.common.mw.protocol.*; | 
 |  |  | import com.dy.common.mw.protocol.p206V202404.CodeV202404; | 
 |  |  | import com.dy.common.mw.protocol.p206V202404.ParseParamsForDownV202404; | 
 |  |  | 
 |  |  |     public byte[] doParse(ParseParamsForDownV202404 para) throws Exception { | 
 |  |  |         byte[] bytes = GlCreate.createStart2Cd(para.rtuAddr, para.commandCode); | 
 |  |  |         if(para.param != null){ | 
 |  |  |             String json = (String)para.param; | 
 |  |  |             JSONObject obj = (JSONObject)para.param; | 
 |  |  |             String json = obj.toJSONString(); | 
 |  |  |             ComCd23Vo cvo = JSON.parseObject(json, ComCd23Vo.class) ; | 
 |  |  |             if(cvo == null){ | 
 |  |  |                 throw new Exception("json转ComCd21Vo为null") ; | 
 |  |  |                 throw new Exception("json转ComCd23Vo为null") ; | 
 |  |  |             } | 
 |  |  |             if(cvo.channel == null){ | 
 |  |  |                 throw new Exception("IP通道号不能为空") ; |