|
@@ -79,21 +79,7 @@ public class HtByteTask {
|
|
*/
|
|
*/
|
|
@Autowired
|
|
@Autowired
|
|
private HtTradeSettlementMapper htTradeSettlementMapper;
|
|
private HtTradeSettlementMapper htTradeSettlementMapper;
|
|
- /**
|
|
|
|
- * 边民购买记录(主表:ht_trade_settlement)
|
|
|
|
- */
|
|
|
|
- @Autowired
|
|
|
|
- private HtBordersListMapper htBordersListMapper;
|
|
|
|
- /**
|
|
|
|
- * 边民购买商品信息表(主表:ht_trade_settlement)
|
|
|
|
- */
|
|
|
|
- @Autowired
|
|
|
|
- private HtBorderBuyGoodsListMapper htBorderBuyGoodsListMapper;
|
|
|
|
- /**
|
|
|
|
- * 商铺卖货物信息表(主表:ht_trade_settlement)
|
|
|
|
- */
|
|
|
|
- @Autowired
|
|
|
|
- private HtSellGoodsListMapper htSellGoodsListMapper;
|
|
|
|
|
|
+
|
|
|
|
|
|
/**
|
|
/**
|
|
* 启动定时任务
|
|
* 启动定时任务
|
|
@@ -117,7 +103,7 @@ public class HtByteTask {
|
|
List<HtByte> byteList = htByteMapper.selectList(new LambdaQueryWrapper<HtByte>().eq(HtByte::getFinishStatus, FinishStatus.FINISH_STATUS_ZERO.getCode()));
|
|
List<HtByte> byteList = htByteMapper.selectList(new LambdaQueryWrapper<HtByte>().eq(HtByte::getFinishStatus, FinishStatus.FINISH_STATUS_ZERO.getCode()));
|
|
//判断是否有任务,没有则返回
|
|
//判断是否有任务,没有则返回
|
|
if (byteList.size() == 0) {
|
|
if (byteList.size() == 0) {
|
|
- System.out.println("\n --- 暂无待处理任务。" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "\n");
|
|
|
|
|
|
+ System.err.println("\n --- 暂无待处理任务。" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "\n");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
//执行任务处理流程
|
|
//执行任务处理流程
|
|
@@ -139,9 +125,9 @@ public class HtByteTask {
|
|
flag = FeignFactory.levelOneServerInterface.peopleDto(peopleDto);
|
|
flag = FeignFactory.levelOneServerInterface.peopleDto(peopleDto);
|
|
methodHtByteTask.updateHtByteInfo(flag, item, dataDto);
|
|
methodHtByteTask.updateHtByteInfo(flag, item, dataDto);
|
|
if (!flag) {
|
|
if (!flag) {
|
|
- System.out.println("\n边民信息处理失败。 messageId = " + item.getMessageId() + "\n");
|
|
|
|
|
|
+ System.err.println("\n边民信息处理失败。 messageId = " + item.getMessageId() + "\n");
|
|
}else {
|
|
}else {
|
|
- System.out.println("\n边民信息处理成功。 messageId = " + item.getMessageId() + "\n");
|
|
|
|
|
|
+ System.err.println("\n边民信息处理成功。 messageId = " + item.getMessageId() + "\n");
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case "002":
|
|
case "002":
|
|
@@ -151,9 +137,9 @@ public class HtByteTask {
|
|
flag = FeignFactory.levelOneServerInterface.shopDto(shopDto);
|
|
flag = FeignFactory.levelOneServerInterface.shopDto(shopDto);
|
|
methodHtByteTask.updateHtByteInfo(flag, item, dataDto);
|
|
methodHtByteTask.updateHtByteInfo(flag, item, dataDto);
|
|
if (!flag) {
|
|
if (!flag) {
|
|
- System.out.println("\n店铺信息处理失败。 messageId = " + item.getMessageId() + "\n");
|
|
|
|
|
|
+ System.err.println("\n店铺信息处理失败。 messageId = " + item.getMessageId() + "\n");
|
|
}else {
|
|
}else {
|
|
- System.out.println("\n店铺信息处理完成。 messageId = " + item.getMessageId() + "\n");
|
|
|
|
|
|
+ System.err.println("\n店铺信息处理完成。 messageId = " + item.getMessageId() + "\n");
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case "003":
|
|
case "003":
|
|
@@ -163,9 +149,9 @@ public class HtByteTask {
|
|
flag = FeignFactory.levelOneServerInterface.groupDto(groupDto);
|
|
flag = FeignFactory.levelOneServerInterface.groupDto(groupDto);
|
|
methodHtByteTask.updateHtByteInfo(flag, item, dataDto);
|
|
methodHtByteTask.updateHtByteInfo(flag, item, dataDto);
|
|
if (!flag) {
|
|
if (!flag) {
|
|
- System.out.println("\n互助组信息处理失败。 messageId = " + item.getMessageId() + "\n");
|
|
|
|
|
|
+ System.err.println("\n互助组信息处理失败。 messageId = " + item.getMessageId() + "\n");
|
|
}else {
|
|
}else {
|
|
- System.out.println("\n互助组信息处理完成。 messageId = " + item.getMessageId() + "\n");
|
|
|
|
|
|
+ System.err.println("\n互助组信息处理完成。 messageId = " + item.getMessageId() + "\n");
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case "004":
|
|
case "004":
|
|
@@ -175,9 +161,9 @@ public class HtByteTask {
|
|
flag = FeignFactory.levelOneServerInterface.cooperativeDto(cooperativeDto);
|
|
flag = FeignFactory.levelOneServerInterface.cooperativeDto(cooperativeDto);
|
|
methodHtByteTask.updateHtByteInfo(flag, item, dataDto);
|
|
methodHtByteTask.updateHtByteInfo(flag, item, dataDto);
|
|
if (!flag) {
|
|
if (!flag) {
|
|
- System.out.println("\n边民合作社信息处理失败。 messageId = " + item.getMessageId() + "\n");
|
|
|
|
|
|
+ System.err.println("\n边民合作社信息处理失败。 messageId = " + item.getMessageId() + "\n");
|
|
}else {
|
|
}else {
|
|
- System.out.println("\n边民合作社信息处理完成。 messageId = " + item.getMessageId() + "\n");
|
|
|
|
|
|
+ System.err.println("\n边民合作社信息处理完成。 messageId = " + item.getMessageId() + "\n");
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case "005":
|
|
case "005":
|
|
@@ -187,9 +173,9 @@ public class HtByteTask {
|
|
flag = FeignFactory.levelOneServerInterface.goodsDto(goodsDto);
|
|
flag = FeignFactory.levelOneServerInterface.goodsDto(goodsDto);
|
|
methodHtByteTask.updateHtByteInfo(flag, item, dataDto);
|
|
methodHtByteTask.updateHtByteInfo(flag, item, dataDto);
|
|
if (!flag) {
|
|
if (!flag) {
|
|
- System.out.println("\n海关监管商品信息处理失败。 messageId = " + item.getMessageId() + "\n");
|
|
|
|
|
|
+ System.err.println("\n海关监管商品信息处理失败。 messageId = " + item.getMessageId() + "\n");
|
|
}else {
|
|
}else {
|
|
- System.out.println("\n海关监管商品信息处理完成。 messageId = " + item.getMessageId() + "\n");
|
|
|
|
|
|
+ System.err.println("\n海关监管商品信息处理完成。 messageId = " + item.getMessageId() + "\n");
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case "006":
|
|
case "006":
|
|
@@ -218,12 +204,12 @@ public class HtByteTask {
|
|
tradeSettlementDto.setBorderBuyGoodsListDtoList(buyGoodsList);
|
|
tradeSettlementDto.setBorderBuyGoodsListDtoList(buyGoodsList);
|
|
boolean b = FeignFactory.levelOneServerInterface.tradeSettlementDto(tradeSettlementDto);
|
|
boolean b = FeignFactory.levelOneServerInterface.tradeSettlementDto(tradeSettlementDto);
|
|
if(!b)throw new ServiceException("添加错误;");
|
|
if(!b)throw new ServiceException("添加错误;");
|
|
- System.out.println("\n交易结算信息处理成功。 messageId = " + item.getMessageId() + "\n");
|
|
|
|
|
|
+ System.err.println("\n交易结算信息处理成功。 messageId = " + item.getMessageId() + "\n");
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
//保存航通监听记录
|
|
//保存航通监听记录
|
|
methodHtByteTask.updateHtByteInfo(false,item,dataDto);
|
|
methodHtByteTask.updateHtByteInfo(false,item,dataDto);
|
|
- System.out.println("\n交易结算信息处理失败。 messageId = " + item.getMessageId() + "\n");
|
|
|
|
|
|
+ System.err.println("\n交易结算信息处理失败。 messageId = " + item.getMessageId() + "\n");
|
|
break;
|
|
break;
|
|
case "007":
|
|
case "007":
|
|
//放行记录(过卡记录)
|
|
//放行记录(过卡记录)
|
|
@@ -234,9 +220,9 @@ public class HtByteTask {
|
|
int insert1 = htPassCardRecordMapper.insert(htPassCardRecord);
|
|
int insert1 = htPassCardRecordMapper.insert(htPassCardRecord);
|
|
methodHtByteTask.updateHtByteInfo(true,item,dataDto);
|
|
methodHtByteTask.updateHtByteInfo(true,item,dataDto);
|
|
if(insert1 == 1){
|
|
if(insert1 == 1){
|
|
- System.out.println("\n放行记录(过卡记录)信息处理成功。 messageId = " + item.getMessageId() + "\n");
|
|
|
|
|
|
+ System.err.println("\n放行记录(过卡记录)信息处理成功。 messageId = " + item.getMessageId() + "\n");
|
|
}else {
|
|
}else {
|
|
- System.out.println("\n放行记录(过卡记录)信息处理失败。 messageId = " + item.getMessageId() + "\n");
|
|
|
|
|
|
+ System.err.println("\n放行记录(过卡记录)信息处理失败。 messageId = " + item.getMessageId() + "\n");
|
|
}
|
|
}
|
|
|
|
|
|
//系统接收到航通过卡记录且卡口类型为'3卡':车辆已出一级市场, 修改相对应的一级市场订单状态
|
|
//系统接收到航通过卡记录且卡口类型为'3卡':车辆已出一级市场, 修改相对应的一级市场订单状态
|
|
@@ -253,9 +239,9 @@ public class HtByteTask {
|
|
int insert2 = htImportDeclarePeopleMapper.insert(htImportDeclarePeople);
|
|
int insert2 = htImportDeclarePeopleMapper.insert(htImportDeclarePeople);
|
|
methodHtByteTask.updateHtByteInfo(insert2 == 1,item,dataDto);
|
|
methodHtByteTask.updateHtByteInfo(insert2 == 1,item,dataDto);
|
|
if(insert2 == 1){
|
|
if(insert2 == 1){
|
|
- System.out.println("\n进口申报单边民确认信息处理成功。 messageId = " + item.getMessageId() + "\n");
|
|
|
|
|
|
+ System.err.println("\n进口申报单边民确认信息处理成功。 messageId = " + item.getMessageId() + "\n");
|
|
}else {
|
|
}else {
|
|
- System.out.println("\n进口申报单边民确认信息处理失败。 messageId = " + item.getMessageId() + "\n");
|
|
|
|
|
|
+ System.err.println("\n进口申报单边民确认信息处理失败。 messageId = " + item.getMessageId() + "\n");
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|