...
|
...
|
@@ -7,6 +7,7 @@ import com.sy.model.GatherInfo |
|
|
import com.sy.model.LAND_BUSINEESTYPE_LIST_INFO
|
|
|
import com.sy.model.LandBusinessTypeList
|
|
|
import com.sy.response.ResultJson
|
|
|
import com.sy.service.EnginCheckService
|
|
|
import com.sy.service.impl.GatherInfoHandle;
|
|
|
import feign.Feign
|
|
|
import feign.Headers
|
...
|
...
|
@@ -33,10 +34,10 @@ class BillDomTransportCheck extends Script implements ChannelCheckScript { |
|
|
@Override
|
|
|
Boolean check(ExecuteParams executeParams) {
|
|
|
try {
|
|
|
Boolean checkFlag = false;
|
|
|
Boolean checkFlag = true;
|
|
|
String cookieUserName = "admin"
|
|
|
String cookieUserId = "1903e605-a2e1-404d-a1a6-a749752fb030"
|
|
|
String ServiceAdr = "http://192.168.1.63:10001"
|
|
|
String ServiceAdr = "http://10.50.3.61:10001"
|
|
|
|
|
|
GatherInfo gatherInfo = (GatherInfo) executeParams.get("GatherInfo");
|
|
|
LandBusinessTypeList landBusinessTypeList = (LandBusinessTypeList) executeParams.get("ChanelFormInfo");
|
...
|
...
|
@@ -83,30 +84,42 @@ class BillDomTransportCheck extends Script implements ChannelCheckScript { |
|
|
logger.info("[TRANS-API-RESPONSE]-单证:{},状态:{}",oBill,status)
|
|
|
|
|
|
if (status>0){
|
|
|
sb.append("转运单证[").append(bill.getAwba()).append("]核验通过")
|
|
|
logger.info("[TRANS-CHECK-SUCCESS]-单证:{},状态:{},转运业务验放通过",oBill,status)
|
|
|
// return true
|
|
|
checkFlag = true
|
|
|
}else{
|
|
|
logger.info("[TRANS-CHECK-FAILD]-转运单证{}核验失败",bill.getAwba())
|
|
|
logger.info("[TRANS-CHECK-FAILD]-转运单证{}核验失败,未审核通过",bill.getAwba())
|
|
|
sb.append("转运单证[").append(bill.getAwba()).append("]核验失败,未审核通过")
|
|
|
gatherInfoHandle.sendBw(gatherInfo,false,sb.toString(),landBusinessTypeList,listinfos);
|
|
|
return checkFlag;
|
|
|
return checkFlag = false;
|
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
logger.info("[TRANS-CHECK-FAILD]-转运单证{}核验失败,未找到申请数据",bill.getAwba())
|
|
|
sb.append("转运单证[").append(bill.getAwba()).append("]核验失败,未找到申请数据")
|
|
|
gatherInfoHandle.sendBw(gatherInfo,false,sb.toString(),landBusinessTypeList,listinfos);
|
|
|
return checkFlag = false;
|
|
|
}
|
|
|
}else {
|
|
|
logger.info("[TRANS-CHECK-FAILD]-转运单证{}核验失败,API未查询到转运申请数据",bill.getAwba())
|
|
|
sb.append("转运单证[").append(bill.getAwba()).append("]核验失败,API未查询到转运申请数据")
|
|
|
gatherInfoHandle.sendBw(gatherInfo,false,sb.toString(),landBusinessTypeList,listinfos);
|
|
|
return checkFlag = false;
|
|
|
}
|
|
|
}else{
|
|
|
logger.info("[TRANS-CHECK-FAILD]-转运单证{}核验失败",bill.getAwba())
|
|
|
logger.info("[TRANS-CHECK-FAILD]-转运单证{}核验失败,API-FAILD",bill.getAwba())
|
|
|
sb.append("转运单证[").append(bill.getAwba()).append("]核验失败,API-FAILD")
|
|
|
gatherInfoHandle.sendBw(gatherInfo,false,sb.toString(),landBusinessTypeList,listinfos);
|
|
|
return checkFlag;
|
|
|
return checkFlag = false;
|
|
|
}
|
|
|
})
|
|
|
//这里返回验放成功,验放失败从上面返回
|
|
|
return checkFlag;
|
|
|
}else{
|
|
|
return checkFlag;
|
|
|
gatherInfoHandle.sendBw(gatherInfo,false,"缺少申请单证信息",landBusinessTypeList,listinfos);
|
|
|
return checkFlag = false;
|
|
|
}
|
|
|
if (checkFlag){
|
|
|
commandLog(gatherInfo,true,"转运业务单证核放成功",executeParams)
|
|
|
}
|
|
|
return checkFlag;
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
...
|
...
|
@@ -120,7 +133,6 @@ class BillDomTransportCheck extends Script implements ChannelCheckScript { |
|
|
return false;
|
|
|
}
|
|
|
|
|
|
|
|
|
// 获取spring容器
|
|
|
ApplicationContext getContext() {
|
|
|
// 获取spring IOC容器
|
...
|
...
|
@@ -128,6 +140,14 @@ class BillDomTransportCheck extends Script implements ChannelCheckScript { |
|
|
return context;
|
|
|
}
|
|
|
|
|
|
void commandLog(GatherInfo gatherInfo,boolean check,String reason,ExecuteParams executeParams){
|
|
|
// 调用方法
|
|
|
ApplicationContext context = getContext();
|
|
|
// 获取容器中的bean
|
|
|
EnginCheckService enginCheckService = context.getBean(EnginCheckService.class);
|
|
|
enginCheckService.commandlog(gatherInfo,check,reason,executeParams)
|
|
|
}
|
|
|
|
|
|
private <T> T createFeignClient(Class<T> clientClass, String url,String username, String userid) {
|
|
|
return Feign.builder()
|
|
|
.options(new Request.Options(5000, 5000))
|
...
|
...
|
|