|
|
@ -89,9 +89,9 @@ public class NettyServer { |
|
|
init(); |
|
|
init(); |
|
|
|
|
|
|
|
|
//new 一个主线程组 |
|
|
//new 一个主线程组 |
|
|
bossGroup = new NioEventLoopGroup(1); |
|
|
|
|
|
|
|
|
bossGroup = new NioEventLoopGroup(); |
|
|
//new 一个工作线程组 |
|
|
//new 一个工作线程组 |
|
|
workGroup = new NioEventLoopGroup(10); |
|
|
|
|
|
|
|
|
workGroup = new NioEventLoopGroup(); |
|
|
ServerBootstrap bootstrap = new ServerBootstrap() |
|
|
ServerBootstrap bootstrap = new ServerBootstrap() |
|
|
.group(bossGroup, workGroup) |
|
|
.group(bossGroup, workGroup) |
|
|
.channel(NioServerSocketChannel.class) |
|
|
.channel(NioServerSocketChannel.class) |
|
|
@ -339,10 +339,12 @@ public class NettyServer { |
|
|
break; |
|
|
break; |
|
|
case PushType.taskState:// insert into basedata_mont_taskstadata and patrol_task_status |
|
|
case PushType.taskState:// insert into basedata_mont_taskstadata and patrol_task_status |
|
|
json = downXml2Json.DownStreamJson2Xml(binaryModel.uuid, binaryModel.id, compactXml, TaskStateControl.class); |
|
|
json = downXml2Json.DownStreamJson2Xml(binaryModel.uuid, binaryModel.id, compactXml, TaskStateControl.class); |
|
|
|
|
|
//root@Linx:/home/atia/data/log/inspect-main# grep -rn "type:41, messageBody:" info.log |
|
|
logger.info(Color.YELLOW + "###### 客户端[{}]上报设备任务状态 ######" + Color.END, sendCode); |
|
|
logger.info(Color.YELLOW + "###### 客户端[{}]上报设备任务状态 ######" + Color.END, sendCode); |
|
|
break; |
|
|
break; |
|
|
case PushType.result:// insert into basedata_mont_taskresult and patrol_task_result_main |
|
|
case PushType.result:// insert into basedata_mont_taskresult and patrol_task_result_main |
|
|
json = downXml2Json.DownStreamJson2Xml(binaryModel.uuid, binaryModel.id, compactXml, TaskResultControl.class); |
|
|
json = downXml2Json.DownStreamJson2Xml(binaryModel.uuid, binaryModel.id, compactXml, TaskResultControl.class); |
|
|
|
|
|
//root@Linx:/home/atia/data/log/inspect-main# grep -rn "type:61, messageBody:" info.log |
|
|
logger.info(Color.YELLOW + "###### 客户端[{}]上报巡视结果 ######" + Color.END, sendCode); |
|
|
logger.info(Color.YELLOW + "###### 客户端[{}]上报巡视结果 ######" + Color.END, sendCode); |
|
|
break; |
|
|
break; |
|
|
default: |
|
|
default: |
|
|
@ -566,6 +568,8 @@ public class NettyServer { |
|
|
} |
|
|
} |
|
|
if (!StringUtils.isEmpty(xml)) { |
|
|
if (!StringUtils.isEmpty(xml)) { |
|
|
flushMsgToDevice("", receiveCode, true, xml); |
|
|
flushMsgToDevice("", receiveCode, true, xml); |
|
|
|
|
|
} else { |
|
|
|
|
|
logger.error(Color.RED + "###### xml is empty ######" + Color.END, type); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |