推送逻辑修改;

This commit is contained in:
王奎兴
2026-06-12 17:16:09 +08:00
parent 2d241848dc
commit 2441f4eb1c
3 changed files with 49 additions and 36 deletions
@@ -284,17 +284,21 @@ public class ReservationStockInOrderApplicationService {
*/
public Boolean auditState(ReservationStockInOrderDO stockInOrderDO){
Boolean b = stockInOrderDomainService.auditState(stockInOrderDO);
Integer needCustomsDeclaration = stockInOrderDO.getNeedCustomsDeclaration();
Integer auditStatus = stockInOrderDO.getIssueStatus();
try {
if (needCustomsDeclaration != null && needCustomsDeclaration == 1 && auditStatus != null && auditStatus == 2) {
Long inOrderId = stockInOrderDO.getInOrderId();
List<Long> idList = new ArrayList<>();
idList.add(inOrderId);
batchPush(idList);
List<Long> inOrderIds = stockInOrderDO.getInOrderIds();
if (inOrderIds != null && !inOrderIds.isEmpty()) {
ReservationStockInOrder stockInOrder = reservationStockInOrderMapper.selectById(inOrderIds.get(0));
Integer needCustomsDeclaration = stockInOrder.getNeedCustomsDeclaration();
Integer auditStatus = stockInOrder.getIssueStatus();
try {
if (needCustomsDeclaration != null && needCustomsDeclaration == 1 && auditStatus != null && auditStatus == 2) {
Long inOrderId = stockInOrder.getInOrderId();
List<Long> idList = new ArrayList<>();
idList.add(inOrderId);
batchPush(idList);
}
} catch (Exception e) {
throw new ServiceException("推送关务系统失败!");
}
} catch (Exception e) {
throw new ServiceException("推送关务系统失败!");
}
return b;
}
@@ -495,18 +495,23 @@ public class StockInOrderApplicationService {
*/
public Boolean auditState(StockInOrderDO stockInOrderDO){
Boolean b = stockInOrderDomainService.auditState(stockInOrderDO);
Integer needCustomsDeclaration = stockInOrderDO.getNeedCustomsDeclaration();
Integer auditStatus = stockInOrderDO.getAuditStatus();
try {
if (needCustomsDeclaration != null && needCustomsDeclaration == 1 && auditStatus != null && auditStatus == 3) {
Long inOrderId = stockInOrderDO.getInOrderId();
List<Long> idList = new ArrayList<>();
idList.add(inOrderId);
batchPush(idList);
List<Long> inOrderIds = stockInOrderDO.getInOrderIds();
if (inOrderIds != null && !inOrderIds.isEmpty()) {
StockInOrder stockInOrder = stockInOrderService.getById(inOrderIds.get(0));
Integer needCustomsDeclaration = stockInOrder.getNeedCustomsDeclaration();
Integer auditStatus = stockInOrder.getAuditStatus();
try {
if (needCustomsDeclaration != null && needCustomsDeclaration == 1 && auditStatus != null && auditStatus == 3) {
Long inOrderId = stockInOrder.getInOrderId();
List<Long> idList = new ArrayList<>();
idList.add(inOrderId);
batchPush(idList);
}
} catch (Exception e) {
throw new ServiceException("推送关务系统失败!");
}
} catch (Exception e) {
throw new ServiceException("推送关务系统失败!");
}
return b;
}
@@ -1001,24 +1001,28 @@ public class StockOutOrderApplicationService {
*/
public Boolean genPickingOrder(StockOutOrderDO stockOutOrderDO){
Boolean b = stockOutOrderDomainService.genPickingOrder(stockOutOrderDO);
String needDeclareFlag = stockOutOrderDO.getNeedDeclareFlag();
Long organizationId = stockOutOrderDO.getOrganizationId();
try {
if (needDeclareFlag != null && "1".equals(needDeclareFlag) && organizationId != null) {
if (organizationId == 2830) {
Long outOrderId = stockOutOrderDO.getOutOrderId();
List<Long> ids = new ArrayList<>();
ids.add(outOrderId);
batchPush(ids);
} else {
String outOrderId = stockOutOrderDO.getOutOrderNumber();
List<String> ids = new ArrayList<>();
ids.add(outOrderId);
omsServiceFeign.batchPushByNumber(ids);
List<Long> outOrderIds = stockOutOrderDO.getOutOrderIds();
if (outOrderIds != null && !outOrderIds.isEmpty()) {
StockOutOrder order = stockOutOrderService.getById(outOrderIds.get(0));
String needDeclareFlag = order.getNeedDeclareFlag();
Long organizationId = order.getOrganizationId();
try {
if (needDeclareFlag != null && "1".equals(needDeclareFlag) && organizationId != null) {
if (organizationId == 2830) {
Long outOrderId = order.getOutOrderId();
List<Long> ids = new ArrayList<>();
ids.add(outOrderId);
batchPush(ids);
} else {
String outOrderId = order.getOutOrderNumber();
List<String> ids = new ArrayList<>();
ids.add(outOrderId);
omsServiceFeign.batchPushByNumber(ids);
}
}
} catch (Exception e) {
throw new ServiceException("生成报关单失败");
}
} catch (Exception e) {
throw new ServiceException("生成报关单失败");
}
return b;
}