作者 朱兆平

生产更新

@@ -2,6 +2,7 @@ package com.sy.IMF; @@ -2,6 +2,7 @@ package com.sy.IMF;
2 2
3 import com.caac.imf.api.IMFClient; 3 import com.caac.imf.api.IMFClient;
4 import com.sy.bwAnalysis.AnalysisRoute; 4 import com.sy.bwAnalysis.AnalysisRoute;
  5 +import com.sy.task.LocalFileTaskHandle;
5 import com.sy.utils.XMLThreadPoolFactory; 6 import com.sy.utils.XMLThreadPoolFactory;
6 import org.apache.commons.lang.StringUtils; 7 import org.apache.commons.lang.StringUtils;
7 import org.apache.log4j.Logger; 8 import org.apache.log4j.Logger;
@@ -28,15 +29,20 @@ public class KAKO_Reader extends Thread{ @@ -28,15 +29,20 @@ public class KAKO_Reader extends Thread{
28 Thread t =Thread.currentThread(); 29 Thread t =Thread.currentThread();
29 ThreadPoolExecutor threadPoolEs = XMLThreadPoolFactory.instance("kakou"); 30 ThreadPoolExecutor threadPoolEs = XMLThreadPoolFactory.instance("kakou");
30 AnalysisRoute analysisRoute= null; 31 AnalysisRoute analysisRoute= null;
  32 + LocalFileTaskHandle localFileTaskHandle = null;
31 while(true) { 33 while(true) {
32 if (IMF_Tesk.LOGIN_OK){ 34 if (IMF_Tesk.LOGIN_OK){
33 String message = this.client.getMSG(); 35 String message = this.client.getMSG();
34 // logger.info(t.toString()+"读取线程已获取到消息"); 36 // logger.info(t.toString()+"读取线程已获取到消息");
35 if (StringUtils.isNotEmpty(message)) { 37 if (StringUtils.isNotEmpty(message)) {
36 // logger.info(message); 38 // logger.info(message);
37 - analysisRoute = new AnalysisRoute();  
38 - analysisRoute.setMessage(message);  
39 - threadPoolEs.execute(analysisRoute); 39 +
  40 +// analysisRoute = new AnalysisRoute();
  41 +// analysisRoute.setMessage(message);
  42 +
  43 + localFileTaskHandle = new LocalFileTaskHandle();
  44 + localFileTaskHandle.setMessage(message);
  45 + threadPoolEs.execute(localFileTaskHandle);
40 logger.info("[THREADPOOL-INFO]-当前运行线程总数量: " + threadPoolEs.getActiveCount()); 46 logger.info("[THREADPOOL-INFO]-当前运行线程总数量: " + threadPoolEs.getActiveCount());
41 logger.info("[THREADPOOL-INFO]-当前线程数量: " + threadPoolEs.getTaskCount()); 47 logger.info("[THREADPOOL-INFO]-当前线程数量: " + threadPoolEs.getTaskCount());
42 logger.info("[THREADPOOL-INFO]-完成的线程总数量: " + threadPoolEs.getCompletedTaskCount()); 48 logger.info("[THREADPOOL-INFO]-完成的线程总数量: " + threadPoolEs.getCompletedTaskCount());
@@ -189,8 +189,10 @@ public class GatherInfoHandle implements GatherInfoService { @@ -189,8 +189,10 @@ public class GatherInfoHandle implements GatherInfoService {
189 189
190 if(checkRelease()){ //出区核放 190 if(checkRelease()){ //出区核放
191 sendBw(info, true,PERMITTHOUGH,landBusinessTypeList,listinfos); 191 sendBw(info, true,PERMITTHOUGH,landBusinessTypeList,listinfos);
  192 + log.info("[SUCCESS]:{}车辆验放成功出区",info.getVename());
192 releaseFormCheck(); //流转申请单核销 193 releaseFormCheck(); //流转申请单核销
193 } 194 }
  195 +
194 } 196 }
195 }else{ 197 }else{
196 log.info("[X21-ERROR]:{}车辆验放失败",info.getVename()); 198 log.info("[X21-ERROR]:{}车辆验放失败",info.getVename());
@@ -82,7 +82,7 @@ public class CommandClient { @@ -82,7 +82,7 @@ public class CommandClient {
82 try { 82 try {
83 //ip+端口 83 //ip+端口
84 socket = new Socket("10.50.7.10", 9003); 84 socket = new Socket("10.50.7.10", 9003);
85 - logger.info("socket通讯创建连接成功"); 85 + log.info("socket通讯创建连接成功");
86 op = socket.getOutputStream(); 86 op = socket.getOutputStream();
87 //xml字节流 87 //xml字节流
88 byte[]xBody =xmlBody.getBytes("GB2312"); 88 byte[]xBody =xmlBody.getBytes("GB2312");