推送逻辑修改;
This commit is contained in:
+7
-3
@@ -284,11 +284,14 @@ public class ReservationStockInOrderApplicationService {
|
|||||||
*/
|
*/
|
||||||
public Boolean auditState(ReservationStockInOrderDO stockInOrderDO){
|
public Boolean auditState(ReservationStockInOrderDO stockInOrderDO){
|
||||||
Boolean b = stockInOrderDomainService.auditState(stockInOrderDO);
|
Boolean b = stockInOrderDomainService.auditState(stockInOrderDO);
|
||||||
Integer needCustomsDeclaration = stockInOrderDO.getNeedCustomsDeclaration();
|
List<Long> inOrderIds = stockInOrderDO.getInOrderIds();
|
||||||
Integer auditStatus = stockInOrderDO.getIssueStatus();
|
if (inOrderIds != null && !inOrderIds.isEmpty()) {
|
||||||
|
ReservationStockInOrder stockInOrder = reservationStockInOrderMapper.selectById(inOrderIds.get(0));
|
||||||
|
Integer needCustomsDeclaration = stockInOrder.getNeedCustomsDeclaration();
|
||||||
|
Integer auditStatus = stockInOrder.getIssueStatus();
|
||||||
try {
|
try {
|
||||||
if (needCustomsDeclaration != null && needCustomsDeclaration == 1 && auditStatus != null && auditStatus == 2) {
|
if (needCustomsDeclaration != null && needCustomsDeclaration == 1 && auditStatus != null && auditStatus == 2) {
|
||||||
Long inOrderId = stockInOrderDO.getInOrderId();
|
Long inOrderId = stockInOrder.getInOrderId();
|
||||||
List<Long> idList = new ArrayList<>();
|
List<Long> idList = new ArrayList<>();
|
||||||
idList.add(inOrderId);
|
idList.add(inOrderId);
|
||||||
batchPush(idList);
|
batchPush(idList);
|
||||||
@@ -296,6 +299,7 @@ public class ReservationStockInOrderApplicationService {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ServiceException("推送关务系统失败!");
|
throw new ServiceException("推送关务系统失败!");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+8
-3
@@ -495,11 +495,14 @@ public class StockInOrderApplicationService {
|
|||||||
*/
|
*/
|
||||||
public Boolean auditState(StockInOrderDO stockInOrderDO){
|
public Boolean auditState(StockInOrderDO stockInOrderDO){
|
||||||
Boolean b = stockInOrderDomainService.auditState(stockInOrderDO);
|
Boolean b = stockInOrderDomainService.auditState(stockInOrderDO);
|
||||||
Integer needCustomsDeclaration = stockInOrderDO.getNeedCustomsDeclaration();
|
List<Long> inOrderIds = stockInOrderDO.getInOrderIds();
|
||||||
Integer auditStatus = stockInOrderDO.getAuditStatus();
|
if (inOrderIds != null && !inOrderIds.isEmpty()) {
|
||||||
|
StockInOrder stockInOrder = stockInOrderService.getById(inOrderIds.get(0));
|
||||||
|
Integer needCustomsDeclaration = stockInOrder.getNeedCustomsDeclaration();
|
||||||
|
Integer auditStatus = stockInOrder.getAuditStatus();
|
||||||
try {
|
try {
|
||||||
if (needCustomsDeclaration != null && needCustomsDeclaration == 1 && auditStatus != null && auditStatus == 3) {
|
if (needCustomsDeclaration != null && needCustomsDeclaration == 1 && auditStatus != null && auditStatus == 3) {
|
||||||
Long inOrderId = stockInOrderDO.getInOrderId();
|
Long inOrderId = stockInOrder.getInOrderId();
|
||||||
List<Long> idList = new ArrayList<>();
|
List<Long> idList = new ArrayList<>();
|
||||||
idList.add(inOrderId);
|
idList.add(inOrderId);
|
||||||
batchPush(idList);
|
batchPush(idList);
|
||||||
@@ -507,6 +510,8 @@ public class StockInOrderApplicationService {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ServiceException("推送关务系统失败!");
|
throw new ServiceException("推送关务系统失败!");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+8
-4
@@ -1001,17 +1001,20 @@ public class StockOutOrderApplicationService {
|
|||||||
*/
|
*/
|
||||||
public Boolean genPickingOrder(StockOutOrderDO stockOutOrderDO){
|
public Boolean genPickingOrder(StockOutOrderDO stockOutOrderDO){
|
||||||
Boolean b = stockOutOrderDomainService.genPickingOrder(stockOutOrderDO);
|
Boolean b = stockOutOrderDomainService.genPickingOrder(stockOutOrderDO);
|
||||||
String needDeclareFlag = stockOutOrderDO.getNeedDeclareFlag();
|
List<Long> outOrderIds = stockOutOrderDO.getOutOrderIds();
|
||||||
Long organizationId = stockOutOrderDO.getOrganizationId();
|
if (outOrderIds != null && !outOrderIds.isEmpty()) {
|
||||||
|
StockOutOrder order = stockOutOrderService.getById(outOrderIds.get(0));
|
||||||
|
String needDeclareFlag = order.getNeedDeclareFlag();
|
||||||
|
Long organizationId = order.getOrganizationId();
|
||||||
try {
|
try {
|
||||||
if (needDeclareFlag != null && "1".equals(needDeclareFlag) && organizationId != null) {
|
if (needDeclareFlag != null && "1".equals(needDeclareFlag) && organizationId != null) {
|
||||||
if (organizationId == 2830) {
|
if (organizationId == 2830) {
|
||||||
Long outOrderId = stockOutOrderDO.getOutOrderId();
|
Long outOrderId = order.getOutOrderId();
|
||||||
List<Long> ids = new ArrayList<>();
|
List<Long> ids = new ArrayList<>();
|
||||||
ids.add(outOrderId);
|
ids.add(outOrderId);
|
||||||
batchPush(ids);
|
batchPush(ids);
|
||||||
} else {
|
} else {
|
||||||
String outOrderId = stockOutOrderDO.getOutOrderNumber();
|
String outOrderId = order.getOutOrderNumber();
|
||||||
List<String> ids = new ArrayList<>();
|
List<String> ids = new ArrayList<>();
|
||||||
ids.add(outOrderId);
|
ids.add(outOrderId);
|
||||||
omsServiceFeign.batchPushByNumber(ids);
|
omsServiceFeign.batchPushByNumber(ids);
|
||||||
@@ -1020,6 +1023,7 @@ public class StockOutOrderApplicationService {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ServiceException("生成报关单失败");
|
throw new ServiceException("生成报关单失败");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user