...
|
...
|
@@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSON; |
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.sy.crossDomain.buildBarCode;
|
|
|
import com.sy.logic.LiftBar;
|
|
|
import com.sy.model.*;
|
|
|
import com.sy.service.*;
|
|
|
import com.sy.socket.CommandClient;
|
...
|
...
|
@@ -13,8 +12,10 @@ import org.apache.commons.lang.StringUtils; |
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.*;
|
...
|
...
|
@@ -22,10 +23,11 @@ import java.util.stream.Collectors; |
|
|
|
|
|
import static com.sy.service.impl.ResMessageServiceImpl.toStrArry;
|
|
|
|
|
|
@Service("GatherInfoHandle")
|
|
|
public class GatherInfoHandleImpl implements GatherInfoService {
|
|
|
@Component("GatherInfoHandle")
|
|
|
public class GatherInfoHandle implements GatherInfoService {
|
|
|
|
|
|
private static final Logger logger = LoggerFactory.getLogger(LiftBar.class);
|
|
|
private static final Logger logger = LoggerFactory.getLogger(GatherInfoHandle.class);
|
|
|
private static GatherInfoHandle gatherInfoHandle;
|
|
|
|
|
|
//逻辑判断后的返回信息定义
|
|
|
private static String PERMITTHOUGH = "直接放行";
|
...
|
...
|
@@ -42,44 +44,48 @@ public class GatherInfoHandleImpl implements GatherInfoService { |
|
|
private static String NOGrossWt = "过磅重量异常";
|
|
|
private static String BLACKLIST= "此车辆已被拉进黑名单,不允许出区";
|
|
|
|
|
|
@Autowired
|
|
|
FeignService feignService;
|
|
|
|
|
|
@Autowired
|
|
|
NmmsService nmmsService;
|
|
|
private NmmsService nmmsService;
|
|
|
|
|
|
/**
|
|
|
* 车辆信息备案表
|
|
|
*/
|
|
|
@Autowired
|
|
|
LandRoadVeService veService;
|
|
|
private LandRoadVeService veService;
|
|
|
|
|
|
@Autowired
|
|
|
RedisService redisService;
|
|
|
private RedisService redisService;
|
|
|
|
|
|
@Autowired
|
|
|
BusnesslistinfoService busnesslistinfoService;
|
|
|
|
|
|
@Value("${devdebug}")
|
|
|
private Boolean debug;
|
|
|
|
|
|
/**
|
|
|
* 进出场申请表
|
|
|
*/
|
|
|
@Autowired
|
|
|
LandBusListService listService;
|
|
|
private LandBusListService listService;
|
|
|
|
|
|
/**
|
|
|
* 重量校验算法
|
|
|
*/
|
|
|
@Autowired
|
|
|
WeightCheckHandleService weightCheckHandleService;
|
|
|
private WeightCheckHandleService weightCheckHandleService;
|
|
|
|
|
|
/**
|
|
|
* 查询运单放行表
|
|
|
*/
|
|
|
@Autowired
|
|
|
ResMessageService resMessageService;
|
|
|
private ResMessageService resMessageService;
|
|
|
|
|
|
/**
|
|
|
* 指令日志表
|
|
|
*/
|
|
|
@Autowired
|
|
|
CommandLogService commandLogService;
|
|
|
private CommandLogService commandLogService;
|
|
|
|
|
|
/**
|
|
|
* 车辆过卡信息
|
...
|
...
|
@@ -129,6 +135,10 @@ public class GatherInfoHandleImpl implements GatherInfoService { |
|
|
private double diffVal=0.0;
|
|
|
|
|
|
|
|
|
@PostConstruct
|
|
|
public void init() {
|
|
|
gatherInfoHandle = this;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public int save(GatherInfo info) {
|
...
|
...
|
@@ -137,12 +147,54 @@ public class GatherInfoHandleImpl implements GatherInfoService { |
|
|
|
|
|
@Override
|
|
|
public void handel(GatherInfo gatherInfo) {
|
|
|
this.info = gatherInfo;
|
|
|
//获取过磅重量
|
|
|
growssWt = info.getGrosswt().doubleValue();
|
|
|
try {
|
|
|
this.info = gatherInfo;
|
|
|
//获取过磅重量
|
|
|
growssWt = info.getGrosswt().doubleValue();
|
|
|
|
|
|
//取车牌号,判定卡口是否取到车牌号
|
|
|
vaName = info.getVename();
|
|
|
|
|
|
|
|
|
//车牌校验
|
|
|
if (veNameCheck(vaName)
|
|
|
&& veRecordCheck() //车辆备案
|
|
|
&& LandBusinessFormCheck() //流转申请校验
|
|
|
&& weightCheck(info) //过磅重量校验
|
|
|
){
|
|
|
|
|
|
// 场站白名单放行验证
|
|
|
if (areaWhiteListCheck()){
|
|
|
pass();
|
|
|
return;
|
|
|
}
|
|
|
//入区核放
|
|
|
if(chanelInCheck()){
|
|
|
pass();
|
|
|
}else{
|
|
|
inStationInfo(); //入场信息获取
|
|
|
setListinfos(); //流转申请表体获取
|
|
|
|
|
|
if (goodsWhiteListCheck()){ //货物类型白名单
|
|
|
pass();
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if(checkRelease()){ //出区核放
|
|
|
sendBw(info, true,PERMITTHOUGH,landBusinessTypeList,listinfos);
|
|
|
releaseFormCheck(); //流转申请单核销
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
logger.info("[X21-ERROR]:车辆过磅验放失败");
|
|
|
|
|
|
}catch (Exception e){
|
|
|
logger.error("放行判定异常",e);
|
|
|
CommandClient.Client(gatherInfo, "放行判定异常");
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//取车牌号,判定卡口是否取到车牌号
|
|
|
vaName = info.getVename();
|
|
|
}
|
|
|
|
|
|
|
...
|
...
|
@@ -166,7 +218,7 @@ public class GatherInfoHandleImpl implements GatherInfoService { |
|
|
//1. 若无车牌号,返回未识别错误
|
|
|
if (StringUtils.isEmpty(vaName)) {
|
|
|
logger.error(NO_CHEPAI+vaName);
|
|
|
sendBw(info,false,NO_CHEPAI + vaName,new LandBusinessTypeList(),listinfos);
|
|
|
sendBw(info,false,NO_CHEPAI + vaName,null,listinfos);
|
|
|
//CommandClient.Client(info, NO_CHEPAI + vaName);
|
|
|
return false;
|
|
|
}
|
...
|
...
|
@@ -178,11 +230,11 @@ public class GatherInfoHandleImpl implements GatherInfoService { |
|
|
*/
|
|
|
private boolean veRecordCheck(){
|
|
|
//2. 校验车辆是否备案
|
|
|
LandRoadVe ve = veService.selectByFrameNo(vaName);
|
|
|
LandRoadVe ve = gatherInfoHandle.veService.selectByFrameNo(vaName);
|
|
|
//若无备案信息或者黑名单,返回车辆未备案或者识别错误,
|
|
|
if (ve == null && !veBlackListCheck(ve)) {
|
|
|
logger.error(NORECORD+vaName);
|
|
|
sendBw(info,false,NORECORD + vaName,new LandBusinessTypeList(),listinfos);
|
|
|
sendBw(info,false,NORECORD + vaName,null,listinfos);
|
|
|
//CommandClient.Client(info, NORECORD + vaName);
|
|
|
return false;
|
|
|
}
|
...
|
...
|
@@ -198,7 +250,8 @@ public class GatherInfoHandleImpl implements GatherInfoService { |
|
|
*/
|
|
|
private boolean veBlackListCheck(LandRoadVe ve){
|
|
|
if("Y".equals(ve.getVeState())){
|
|
|
sendBw(info,false,BLACKLIST + vaName,new LandBusinessTypeList(),listinfos);
|
|
|
logger.info(BLACKLIST+vaName);
|
|
|
sendBw(info,false,BLACKLIST + vaName,null,listinfos);
|
|
|
return false;
|
|
|
}
|
|
|
return true;
|
...
|
...
|
@@ -211,12 +264,19 @@ public class GatherInfoHandleImpl implements GatherInfoService { |
|
|
*/
|
|
|
private boolean LandBusinessFormCheck(){
|
|
|
try {
|
|
|
logger.info("车辆-{}核碰缓存",info.getVename());
|
|
|
landBusinessTypeListList = new ArrayList<>();
|
|
|
//通过车牌号,二维码,场站,通道号,进出类型查询进出场站申请列表
|
|
|
String landBusinessJson = redisService.get(info.getVename());
|
|
|
if (info==null){
|
|
|
logger.error("info 实体为NULL");
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
String landBusinessJson = gatherInfoHandle.redisService.get(info.getVename());
|
|
|
List<LandBusinessTypeList> list = new ArrayList<>();
|
|
|
if (StringUtils.isNotEmpty(landBusinessJson)){
|
|
|
|
|
|
list = (List<LandBusinessTypeList>) JSON.parseObject(landBusinessJson,List.class);
|
|
|
list = JSONArray.parseArray(landBusinessJson,LandBusinessTypeList.class);
|
|
|
|
|
|
landBusinessTypeListList = list;
|
|
|
//4. 若查询结果为null,返回无相对应进出场申请
|
...
|
...
|
@@ -226,33 +286,53 @@ public class GatherInfoHandleImpl implements GatherInfoService { |
|
|
return false;
|
|
|
}
|
|
|
|
|
|
list.stream()
|
|
|
.filter( item->{
|
|
|
if (item.getAisle().equals(info.getChnlno()) && item.getBarcode().equals(info.getBarcode())){
|
|
|
landBusinessTypeList = item;
|
|
|
for (LandBusinessTypeList item : list) {
|
|
|
|
|
|
//离场装载货物重量
|
|
|
goodsWt = Double.parseDouble(landBusinessTypeList.getRemark());
|
|
|
if (item.getAisle().equals(info.getChnlno()) && item.getBarcode().equals(info.getBarcode())){
|
|
|
landBusinessTypeList = item;
|
|
|
//离场装载货物重量
|
|
|
goodsWt = Double.parseDouble(landBusinessTypeList.getRemark());
|
|
|
logger.info("车辆-{}的申请缓存信息核碰成功,通道:{}",info.getVename(),info.getChnlno());
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return true;
|
|
|
}else {
|
|
|
return false;
|
|
|
}
|
|
|
});
|
|
|
//核碰流转申请失败
|
|
|
logger.info("[CACHE]:车辆-{}的流转申请校验失败,无对应流转申请信息",info.getVename());
|
|
|
}else {
|
|
|
logger.error("未找到车辆-{}的申请缓存信息",info.getVename());
|
|
|
logger.info("未找到车辆-{}的申请缓存信息,或者流转已超期失效",info.getVename());
|
|
|
logger.error("[CACHE-ERROR]:未找到车辆-{}的申请缓存信息",info.getVename());
|
|
|
logger.info("[CACHE-ERROR]:未找到车辆-{}的申请缓存信息,或者流转已超期失效",info.getVename());
|
|
|
return false;
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
logger.error("[CACHE-PARSE-ERROR]:",e);
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 5. 车辆过磅重量校验
|
|
|
* @return true 通过 false 不通过
|
|
|
*/
|
|
|
private boolean weightCheck(GatherInfo info){
|
|
|
if(info.getGrosswt().compareTo(BigDecimal.ZERO) > 0){
|
|
|
logger.info("过磅重量校验通过,过磅重量大于0");
|
|
|
}else{
|
|
|
sendBw(info,false,NOGrossWt + growssWt,new LandBusinessTypeList(),listinfos);
|
|
|
return false;
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 流转申请-货物类型白名单,白名单的货物类型目前直接放行
|
|
|
* @return
|
|
|
* @return true 白名单货物直接放行 false 非白名单 需要验放
|
|
|
*/
|
|
|
private boolean goodsWhiteListCheck(){
|
|
|
if(!"普通货物".equals(landBusinessTypeList.getCocode())
|
...
|
...
|
@@ -265,30 +345,29 @@ public class GatherInfoHandleImpl implements GatherInfoService { |
|
|
//todo:换单货物校验逻辑待定
|
|
|
//todo:未来取消货物类型判定.
|
|
|
logger.info("车辆装载货物为:" + landBusinessTypeList.getCocode());
|
|
|
return true;
|
|
|
return true;
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 5. 车辆过磅重量校验
|
|
|
* @return true 通过 false 不通过
|
|
|
* todo:通道及金二路由判定,是金二通道的话,等金二X22
|
|
|
* 目前宽进严出策略,本地判定
|
|
|
*
|
|
|
*/
|
|
|
private boolean weightCheck(GatherInfo info){
|
|
|
if(info.getGrosswt().compareTo(BigDecimal.ZERO) > 0){
|
|
|
logger.info("过磅重量校验通过,过磅重量大于0");
|
|
|
}else{
|
|
|
sendBw(info,false,NOGrossWt + growssWt,new LandBusinessTypeList(),listinfos);
|
|
|
private boolean chanelInCheck(){
|
|
|
if ("I".equals(info.getIetype())){
|
|
|
return true;
|
|
|
}else {
|
|
|
return false;
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 离场时需要获取的车辆进场信息,入场重量,进出场差值
|
|
|
*/
|
|
|
private void inStationInfo(){
|
|
|
List<LandBusinessTypeList> stationInChanleInfo= listService.selectwt(info.getVename(),info.getBarcode(),info.getAreaid(),"I");
|
|
|
List<LandBusinessTypeList> stationInChanleInfo= gatherInfoHandle.listService.selectwt(info.getVename(),info.getBarcode(),info.getAreaid(),"I");
|
|
|
if (stationInChanleInfo.isEmpty()){
|
|
|
logger.info("未查询到车辆:{}的入场信息",info.getVename());
|
|
|
}else {
|
...
|
...
|
@@ -313,36 +392,26 @@ public class GatherInfoHandleImpl implements GatherInfoService { |
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* todo:通道及金二路由判定,是金二通道的话,等金二X22
|
|
|
* 目前宽进严出策略,本地判定
|
|
|
*
|
|
|
*/
|
|
|
private boolean chanelInCheck(){
|
|
|
if ("I".equals(info.getIetype())){
|
|
|
return true;
|
|
|
}else {
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 设置表体全局变量
|
|
|
*/
|
|
|
private void setListinfos(){
|
|
|
//查询运单列表
|
|
|
listinfos=busnesslistinfoService.selectmanilist(info.getBarcode());
|
|
|
listinfos=gatherInfoHandle.busnesslistinfoService.selectmanilist(info.getBarcode());
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* todo:与金二指令一起核碰
|
|
|
* 出区抬杆放行判定
|
|
|
* @return
|
|
|
* @return true 抬杆放行
|
|
|
*/
|
|
|
private boolean checkRelease(){
|
|
|
logger.info("[进出场申请]-业务类型为:"+landBusinessTypeList.getCocode()+landBusinessTypeList.getBusinesstype());
|
|
|
switch (landBusinessTypeList.getBusinesstype()){
|
|
|
case "空车业务":
|
|
|
if(weightCheckHandleService.checkEmpty(growssWt,selfWt)){
|
|
|
if(gatherInfoHandle.weightCheckHandleService.checkEmpty(growssWt,selfWt)){
|
|
|
return true;
|
|
|
}else{
|
|
|
logger.error("[空车业务]-出场重量未通过校验:"+GROWSSEXCETION);
|
...
|
...
|
@@ -351,7 +420,7 @@ public class GatherInfoHandleImpl implements GatherInfoService { |
|
|
}
|
|
|
case "出口转关":
|
|
|
case "出口送货":
|
|
|
if (weightCheckHandleService.checkExportDownLoading(growssWt, selfWt, goodsWt,inWt)){
|
|
|
if (gatherInfoHandle.weightCheckHandleService.checkExportDownLoading(growssWt, selfWt, goodsWt,inWt)){
|
|
|
return true;
|
|
|
}else{
|
|
|
logger.error("[出口送货]-出场重量未通过校验:"+GROWSSEXCETION);
|
...
|
...
|
@@ -360,7 +429,7 @@ public class GatherInfoHandleImpl implements GatherInfoService { |
|
|
}
|
|
|
case "进口转关":
|
|
|
case "进口提货":
|
|
|
if (weightCheckHandleService.checkImportDlv(growssWt, selfWt, goodsWt,inWt)){
|
|
|
if (gatherInfoHandle.weightCheckHandleService.checkImportDlv(growssWt, selfWt, goodsWt,inWt)){
|
|
|
if ("退库货物".equals(landBusinessTypeList.getCocode())){
|
|
|
/**
|
|
|
* 退库货物不校验运单放行.
|
...
|
...
|
@@ -368,7 +437,7 @@ public class GatherInfoHandleImpl implements GatherInfoService { |
|
|
logger.info("[退库业务]-重量核验通过.");
|
|
|
}else{
|
|
|
//检查运单放行
|
|
|
if (resMessageService.checkManifestRelease(info,listinfos)){
|
|
|
if (gatherInfoHandle.resMessageService.checkManifestRelease(info,listinfos)){
|
|
|
return true;
|
|
|
}else {
|
|
|
//有运单未放行
|
...
|
...
|
@@ -385,7 +454,7 @@ public class GatherInfoHandleImpl implements GatherInfoService { |
|
|
}
|
|
|
break;
|
|
|
case "分拨业务":
|
|
|
if (weightCheckHandleService.checkAllocateOrDispatch(growssWt, selfWt, goodsWt,inWt)){
|
|
|
if (gatherInfoHandle.weightCheckHandleService.checkAllocateOrDispatch(growssWt, selfWt, goodsWt,inWt)){
|
|
|
//todo:检查分拨申请
|
|
|
boolean allocatCheck = checkNmmsAllocate(landBusinessTypeList.getMasterList());
|
|
|
if(!allocatCheck){
|
...
|
...
|
@@ -401,9 +470,9 @@ public class GatherInfoHandleImpl implements GatherInfoService { |
|
|
return false;
|
|
|
}
|
|
|
case "调拨业务":
|
|
|
if (weightCheckHandleService.checkAllocateOrDispatch(growssWt, selfWt, goodsWt,inWt)){
|
|
|
if (gatherInfoHandle.weightCheckHandleService.checkAllocateOrDispatch(growssWt, selfWt, goodsWt,inWt)){
|
|
|
//检查运单放行
|
|
|
if (resMessageService.checkManifestRelease(info,listinfos)){
|
|
|
if (gatherInfoHandle.resMessageService.checkManifestRelease(info,listinfos)){
|
|
|
return true;
|
|
|
}else {
|
|
|
//有运单未放行
|
...
|
...
|
@@ -451,30 +520,39 @@ public class GatherInfoHandleImpl implements GatherInfoService { |
|
|
landBusinessTypeList.setId(UUID.randomUUID().toString());
|
|
|
landBusinessTypeList.setIsvalid("1");
|
|
|
//todo:这里SEQN也要入库
|
|
|
listService.saveList(landBusinessTypeList);
|
|
|
gatherInfoHandle.listService.saveList(landBusinessTypeList);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 流转申请是否核销判定
|
|
|
* 流转申请是否进行核销判定
|
|
|
*/
|
|
|
private void releaseFormCheck(){
|
|
|
List<LandBusinessTypeList> temp = landBusinessTypeListList;
|
|
|
//二维码已出区的记录
|
|
|
List<LandBusinessTypeList> havenCrossList = listService.selectByBarcodeWithE(info.getBarcode());
|
|
|
//申请核销判定
|
|
|
List<LandBusinessTypeList> havenCrossList = gatherInfoHandle.listService.selectByBarcodeWithE(info.getBarcode());
|
|
|
|
|
|
if (landBusinessTypeListList.isEmpty() && havenCrossList.isEmpty()){
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
//申请核销判定,已出区的记录与流转申请数据核碰.如果流转申请列表核碰完,还剩下的需要出区的场站则不核销.
|
|
|
for (LandBusinessTypeList businessTypeList : havenCrossList) {
|
|
|
List<LandBusinessTypeList> r = landBusinessTypeListList.stream().filter(item ->{
|
|
|
//判断还有没有没有出区的场站,还有没有出区的场站就不核销
|
|
|
if(item.getEndstation().equals(businessTypeList.getEndstation())) {
|
|
|
landBusinessTypeListList.remove(item);
|
|
|
return true;
|
|
|
}else {
|
|
|
return false;
|
|
|
}
|
|
|
})
|
|
|
.collect(Collectors.toList());
|
|
|
temp.removeAll(r);
|
|
|
}
|
|
|
|
|
|
if (landBusinessTypeListList.isEmpty()){
|
|
|
if (temp.isEmpty()){
|
|
|
|
|
|
//todo:流转申请状态核销
|
|
|
logger.info("[进出场申请]-流转申请已核销:"+vaName);
|
|
|
//二维码核销
|
|
|
releaseBarCode();
|
|
|
}
|
...
|
...
|
@@ -486,12 +564,15 @@ public class GatherInfoHandleImpl implements GatherInfoService { |
|
|
*/
|
|
|
private void releaseBarCode(){
|
|
|
//二维码判定
|
|
|
int count=listService.selectlaststation(info.getVename(),info.getBarcode());
|
|
|
int count=gatherInfoHandle.listService.selectlaststation(info.getVename(),info.getBarcode());
|
|
|
//二维码失效通知,已进入场站的与缓存比较.
|
|
|
if(count==0){
|
|
|
//todo:测试注释掉,二维码释放
|
|
|
logger.info("[进出场申请]-二维码释放:"+vaName);
|
|
|
buildBarCode.cancleBarCode(vaName);
|
|
|
if (!gatherInfoHandle.debug){
|
|
|
buildBarCode.cancleBarCode(vaName);
|
|
|
}
|
|
|
gatherInfoHandle.redisService.del(info.getVename());
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
@@ -501,20 +582,30 @@ public class GatherInfoHandleImpl implements GatherInfoService { |
|
|
|
|
|
/**
|
|
|
* 发送X22指令
|
|
|
* @param info
|
|
|
* @param check
|
|
|
* @param reason
|
|
|
* @param land
|
|
|
* @param list_infos
|
|
|
* @return
|
|
|
*/
|
|
|
public boolean sendBw(GatherInfo info, boolean check, String reason, LandBusinessTypeList land, List<LAND_BUSINEESTYPE_LIST_INFO> list_infos) {
|
|
|
* @param info 过卡信息
|
|
|
* @param check true 抬杆,false 不抬杆
|
|
|
* @param reason 原因
|
|
|
* @param land 流转申请表头信息
|
|
|
* @param list_infos 流转申请表体信息
|
|
|
* @return 调试模式 直接返回true,生产模式按业务走
|
|
|
*/
|
|
|
private boolean sendBw(GatherInfo info, boolean check, String reason, LandBusinessTypeList land, List<LAND_BUSINEESTYPE_LIST_INFO> list_infos) {
|
|
|
//调试模式 直接返回true
|
|
|
if (gatherInfoHandle.debug){
|
|
|
if (check) {
|
|
|
record();
|
|
|
}
|
|
|
commandlog(info,check,reason,land,list_infos);
|
|
|
return check;
|
|
|
}
|
|
|
|
|
|
logger.info(String.format("开始发送指令:车牌%s,场站%s,通道%s,重量%s",info.getVename(),info.getAreaid(),info.getChnlno(),info.getGrosswt()));
|
|
|
boolean flag = false;
|
|
|
if (check) {
|
|
|
CommandClient.Client(info, PERMITTHOUGH);
|
|
|
logger.info("=============>>>>>>>>放行报文发送成功<<<<<<<<<==============");
|
|
|
flag = true;
|
|
|
record();
|
|
|
} else {
|
|
|
CommandClient.Client(info, reason);
|
|
|
logger.info("=============>>>>>>>>重量异常报文发送成功<<<<<<<<<==============");
|
...
|
...
|
@@ -524,6 +615,13 @@ public class GatherInfoHandleImpl implements GatherInfoService { |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 直接放行
|
|
|
*/
|
|
|
private void pass(){
|
|
|
sendBw(info,true,PERMITTHOUGH,landBusinessTypeList,listinfos);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 放行日志记录
|
|
|
* @param info
|
|
|
* @param check
|
...
|
...
|
@@ -531,7 +629,7 @@ public class GatherInfoHandleImpl implements GatherInfoService { |
|
|
* @param land
|
|
|
* @param list_infos
|
|
|
*/
|
|
|
public void commandlog(GatherInfo info,boolean check,String reason,LandBusinessTypeList land,List<LAND_BUSINEESTYPE_LIST_INFO> list_infos){
|
|
|
private void commandlog(GatherInfo info,boolean check,String reason,LandBusinessTypeList land,List<LAND_BUSINEESTYPE_LIST_INFO> list_infos){
|
|
|
String flag="",type="";
|
|
|
commandLog command=new commandLog();
|
|
|
command.setId(UUID.randomUUID().toString());
|
...
|
...
|
@@ -562,10 +660,10 @@ public class GatherInfoHandleImpl implements GatherInfoService { |
|
|
command.setInGrossWeight(inWt);
|
|
|
command.setGoodsWeight(goodsWt);
|
|
|
command.setActualGoodsWeight(diffVal);
|
|
|
if(list_infos.size()>0){
|
|
|
if(list_infos !=null && list_infos.size()>0){
|
|
|
command.setMasterList(Arrays.toString(toStrArry(list_infos)));
|
|
|
}
|
|
|
commandLogService.insert(command);
|
|
|
gatherInfoHandle.commandLogService.insert(command);
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -576,7 +674,7 @@ public class GatherInfoHandleImpl implements GatherInfoService { |
|
|
private Map nmmsAllocate(@NotNull String waybill){
|
|
|
logger.info("新舱单查询分拨申请数据开始");
|
|
|
Feign_Allocate_Search feignAllocateSearch = new Feign_Allocate_Search(waybill,0,10);
|
|
|
Map map = nmmsService.getAllocate(feignAllocateSearch);
|
|
|
Map map = gatherInfoHandle.nmmsService.getAllocate(feignAllocateSearch);
|
|
|
logger.info(""+map);
|
|
|
return map;
|
|
|
}
|
...
|
...
|
|