作者 朱兆平

关锁业务处理:快邮顺丰货站特殊关锁通知判定

@@ -27,9 +27,4 @@ public class GatherInfoServiceImpl implements GatherInfoService { @@ -27,9 +27,4 @@ public class GatherInfoServiceImpl implements GatherInfoService {
27 public void handel(GatherInfo info){ 27 public void handel(GatherInfo info){
28 28
29 } 29 }
30 -  
31 - @Override  
32 - public boolean haveLockNum(String barcode) {  
33 - return false;  
34 - }  
35 } 30 }
@@ -89,11 +89,14 @@ public class CustomsLockServiceImpl implements CustomsLockService { @@ -89,11 +89,14 @@ public class CustomsLockServiceImpl implements CustomsLockService {
89 LandBusinessTypeList landBusinessTypeList = landBusListService.getLandBusinessTypeListByGather(info); 89 LandBusinessTypeList landBusinessTypeList = landBusListService.getLandBusinessTypeListByGather(info);
90 if (landBusinessTypeList!=null){ 90 if (landBusinessTypeList!=null){
91 if ("调拨业务".equals(landBusinessTypeList.getBusinesstype()) || "分拨业务".equals(landBusinessTypeList.getBusinesstype())) { 91 if ("调拨业务".equals(landBusinessTypeList.getBusinesstype()) || "分拨业务".equals(landBusinessTypeList.getBusinesstype())) {
92 - //综保区场站及内三不通知  
93 - if ("4600329012".equals(landBusinessTypeList.getEndstation()) || "4612199001".equals(landBusinessTypeList.getEndstation())) {  
94 - log.info("[LOCK-CHECK]-综保区及内三场站不处理关锁业务,当前场站:{}",landBusinessTypeList.getEndstation()); 92 + //综保区场站及内三不通知,顺丰场站不通知
  93 + String sfAreaid = "4600541001";
  94 + if ("4600329012".equals(landBusinessTypeList.getEndstation())
  95 + || "4612199001".equals(landBusinessTypeList.getEndstation())
  96 + || sfAreaid.equals(landBusinessTypeList.getEndstation())
  97 + ) {
  98 + log.info("[LOCK-CHECK]-综保区及内三场站,顺丰场站,不处理关锁业务,当前场站:{}",landBusinessTypeList.getEndstation());
95 return false; 99 return false;
96 - //场站检查,todo:快邮场站特殊判定  
97 }else { 100 }else {
98 return true; 101 return true;
99 /** 102 /**
@@ -126,15 +129,38 @@ public class CustomsLockServiceImpl implements CustomsLockService { @@ -126,15 +129,38 @@ public class CustomsLockServiceImpl implements CustomsLockService {
126 int e = landBusListService.selectFirstLeave(info.getVename(), info.getBarcode(), "E"); 129 int e = landBusListService.selectFirstLeave(info.getVename(), info.getBarcode(), "E");
127 if (e==0){ 130 if (e==0){
128 //首次离场,通知关锁接口 上锁 131 //首次离场,通知关锁接口 上锁
129 - log.info("[UNLOCK-NOTICE]-上锁通知"); 132 + log.info("[UNLOCK-NOTICE]-非顺丰场站业务上锁通知");
  133 +
  134 + /**
  135 + * 涉及顺丰的场站业务涉及三个场站
  136 + * 顺丰的通道没有读解锁设备
  137 + * 需要在快邮卡口进行解读锁
  138 + */
  139 + //顺丰出通道,首次出不上锁
  140 + String sfExportChanel = "4600010001";
  141 + if (sfExportChanel.equals(info.getChnlno())) {
  142 + log.warn("[UNLOCK-NOTICE]-顺丰货站,不进行上锁通知,{}",info.getBarcode());
  143 + return false;
  144 + }
  145 +
130 return true; 146 return true;
  147 + }else {
  148 + /**
  149 + * 顺丰上锁通知判定,是在第二个离场通道进行施封
  150 + * 当前场站是快邮货站出
  151 + * 有一个离场信息,那么就上锁通知
  152 + */
  153 + //快邮出通道,上锁通知,二次出上锁
  154 + String sfExportChanel = "4604110112";
  155 + if (sfExportChanel.equals(info.getChnlno()) && e==1){
  156 + log.warn("[UNLOCK-NOTICE]-快邮货站,进行上锁通知,{}",info.getBarcode());
  157 + return true;
  158 + }
131 } 159 }
132 160
133 return false; 161 return false;
134 } 162 }
135 163
136 -  
137 -  
138 @Override 164 @Override
139 public boolean unLockCheck(GatherInfo info){ 165 public boolean unLockCheck(GatherInfo info){
140 166
@@ -163,6 +189,15 @@ public class CustomsLockServiceImpl implements CustomsLockService { @@ -163,6 +189,15 @@ public class CustomsLockServiceImpl implements CustomsLockService {
163 189
164 //判定是否还剩最后一个场站未入场 190 //判定是否还剩最后一个场站未入场
165 if (stationList.size() == 1){ 191 if (stationList.size() == 1){
  192 +
  193 + //顺丰进通道,解锁通知,末次进不解锁
  194 + String sfImportChanel = "4600011001";
  195 + if (sfImportChanel.equals(info.getChnlno())) {
  196 + log.warn("[UNLOCK-NOTICE]-顺丰货站,不进行解锁通知,{}",info.getBarcode());
  197 + return false;
  198 + }
  199 +
  200 +
166 //场站信息 与 当前GatherInfo信息又对的上 201 //场站信息 与 当前GatherInfo信息又对的上
167 if (stationList.get(0).equals(info.getAreaid())) { 202 if (stationList.get(0).equals(info.getAreaid())) {
168 //通知解锁 203 //通知解锁
@@ -171,6 +206,16 @@ public class CustomsLockServiceImpl implements CustomsLockService { @@ -171,6 +206,16 @@ public class CustomsLockServiceImpl implements CustomsLockService {
171 } 206 }
172 } 207 }
173 208
  209 + /**
  210 + * 顺丰快邮特殊判定
  211 + */
  212 + //快邮进通道,解锁通知,二次进锁
  213 + String kyImportChanel = "4604111111";
  214 + if (kyImportChanel.equals(info.getChnlno()) && stationList.size() == 2 ){
  215 + log.info("[UNLOCK-NOTICE]-快邮货站,解锁通知,{}",info.getBarcode());
  216 + return true;
  217 + }
  218 +
174 return false; 219 return false;
175 } 220 }
176 } 221 }