作者 朱兆平

BuildBarCode命名规范+核销记录日志

... ... @@ -16,7 +16,7 @@ import java.util.Map;
@Component
public class buildBarCode {
public class BuildBarCode {
private static String CREATEBARCODE = "http://10.50.7.11:8088/publiclogistics/createVehicleBarCode";
private static String CANCLEBARCODE = "http://10.50.7.11:8088/publiclogistics/cancelVehicleBarCode";
... ... @@ -78,15 +78,15 @@ public class buildBarCode {
public static String CreateBarCode(String carCode,String carColor,String mainifist) {
String json = "{\"token\":\"samples\",\"data\":{\"vehicle_no\":\""+carCode+"\"," +
"\"vehicle_no_color\":\"黄\",\"vehicle_rela_id\":\""+mainifist+"\"}}";
String content = buildBarCode.sendData(CREATEBARCODE, json);
Map map = buildBarCode.jsonFormat(content);
String content = BuildBarCode.sendData(CREATEBARCODE, json);
Map map = BuildBarCode.jsonFormat(content);
return map.get("vehicle_bar_code").toString();
}
// 取消二维码
public static void cancleBarCode(String frameNo) {
String json = "{\"token\":\"samples\",\"data\":{\"vehicle_no\":\""+frameNo+"\",\"vehicle_no_color\":\"黄\"}}";
buildBarCode.sendData(CANCLEBARCODE, json);
BuildBarCode.sendData(CANCLEBARCODE, json);
}
}
... ...
... ... @@ -3,7 +3,7 @@ package com.sy.logic;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.sy.crossDomain.buildBarCode;
import com.sy.crossDomain.BuildBarCode;
import com.sy.model.*;
import com.sy.relation.VeManifestRelation;
import com.sy.service.*;
... ... @@ -394,7 +394,7 @@ public class LiftBar {
if(count==0){
//todo:测试注释掉,二维码释放
logger.info("[进出场申请]-二维码释放:"+vaName);
buildBarCode.cancleBarCode(vaName);
BuildBarCode.cancleBarCode(vaName);
}
/**
... ...
... ... @@ -3,7 +3,7 @@ package com.sy.logic;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.sy.crossDomain.buildBarCode;
import com.sy.crossDomain.BuildBarCode;
import com.sy.model.*;
import com.sy.relation.VeManifestRelation;
import com.sy.service.EnterCancelServer;
... ... @@ -257,21 +257,21 @@ public class LogicOperation {
if (list.getBusinesstype().indexOf("业务") > 0) {
logic.inOrUpEnterCancel(list);
if (count == 4) {
buildBarCode.cancleBarCode(vaName);
BuildBarCode.cancleBarCode(vaName);
logic.listService.updateByBarcode(info.getBarcode());
}else if(count==6){
buildBarCode.cancleBarCode(vaName);
BuildBarCode.cancleBarCode(vaName);
logic.listService.updateByBarcode(info.getBarcode());
}
} else if(list.getBusinesstype().equals("出口送货") && list.getEndport().equals("4620")){
if(list.getIsthree().equals("0")){
if(count==4){
buildBarCode.cancleBarCode(vaName);
BuildBarCode.cancleBarCode(vaName);
logic.listService.updateByBarcode(info.getBarcode());
}
}else{
if(count==2){
buildBarCode.cancleBarCode(vaName);
BuildBarCode.cancleBarCode(vaName);
logic.listService.updateByBarcode(info.getBarcode());
}
}
... ... @@ -279,7 +279,7 @@ public class LogicOperation {
}else{
if (count == 2 && !list.getEndport().equals("4620")) {
buildBarCode.cancleBarCode(vaName);
BuildBarCode.cancleBarCode(vaName);
logic.listService.updateByBarcode(info.getBarcode());
}
}
... ...
... ... @@ -3,7 +3,7 @@ package com.sy.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.sy.crossDomain.buildBarCode;
import com.sy.crossDomain.BuildBarCode;
import com.sy.mapper.LandListDao;
import com.sy.model.*;
import com.sy.service.*;
... ... @@ -182,24 +182,33 @@ public class GatherInfoHandle implements GatherInfoService {
/**
* 华东区内流转-进口分拨核销部分.
*/
if ("区内分拨".equals(landBusinessTypeList.getBusinesstype())) {
//入区后 核销
//todo:测试注释掉,二维码释放
if (!gatherInfoHandle.debug){
buildBarCode.cancleBarCode(vaName);
log.info("[流转申请]-二维码已释放:"+vaName);
}
int rc = gatherInfoHandle.landListDao.releaseBarcode(info.getBarcode());
if (rc>0) {
log.info("[进出场核销]-{}[区内分拨]-流转已核销:{}",vaName,info.getBarcode());
}else{
log.error("[进出场核销-ERROR]-{}[区内分拨]-流转未核销成功:{}",vaName,info.getBarcode());
}
//车辆流转申请缓存删除
releaseCache();
}
* 核销已转为从华东申报回执那里确定
*/
// if ("区内分拨".equals(landBusinessTypeList.getBusinesstype())) {
// //入区后 核销
// //todo:测试注释掉,二维码释放
// if (!gatherInfoHandle.debug){
// buildBarCode.cancleBarCode(vaName);
// log.info("[流转申请]-二维码已释放:"+vaName);
// }
//
// //分拨申请验放
//// boolean allocatCheck = checkNmmsAllocate(landBusinessTypeList.getMasterList());
//// if(!allocatCheck){
//// log.error("[分拨业务]-分拨申请舱单未通过校验:"+FENBO);
//// sendBw(info,false,FENBO,landBusinessTypeList,listinfos);
//// return;
//// }
//
// int rc = gatherInfoHandle.landListDao.releaseBarcode(info.getBarcode());
// if (rc>0) {
// log.info("[进出场核销]-{}[区内分拨]-流转已核销:{}",vaName,info.getBarcode());
// }else{
// log.error("[进出场核销-ERROR]-{}[区内分拨]-流转未核销成功:{}",vaName,info.getBarcode());
// }
// //车辆流转申请缓存删除
// releaseCache();
// }
return;
}else{
inStationInfo(); //入场信息获取
... ... @@ -581,6 +590,13 @@ public class GatherInfoHandle implements GatherInfoService {
}
/**
* 核销记录
*/
private void releaseRecord(){
commandlog(info,true,"流转核销",landBusinessTypeList,null);
}
/**
* 流转申请是否进行核销判定
*/
private void releaseFormCheck(){
... ... @@ -627,7 +643,7 @@ public class GatherInfoHandle implements GatherInfoService {
if(count==0){
//todo:测试注释掉,二维码释放
if (!gatherInfoHandle.debug){
buildBarCode.cancleBarCode(vaName);
BuildBarCode.cancleBarCode(vaName);
log.info("[流转申请]-二维码已释放:"+vaName);
}
... ... @@ -652,6 +668,8 @@ public class GatherInfoHandle implements GatherInfoService {
//车辆过卡信息缓存删除-X22金二判定时候生成的这个缓存
gatherInfoHandle.redisService.del(info.getSeqno());
log.info("[流转缓存]-{}缓存已核销",vaName);
//核销记录
releaseRecord();
}
/**
... ...