流程中推送关务;

This commit is contained in:
王奎兴
2026-06-12 16:09:19 +08:00
parent c0d3372e0c
commit 36cd52a701
4 changed files with 52 additions and 9 deletions
@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import java.util.concurrent.CompletableFuture;
@FeignClient(contextId = "OmsService", value = ServiceNameConstants.OMS_SERVICE,url = "http://10.33.0.99:8017", fallbackFactory = RemoteOmsFeignFallbackFactory.class, configuration = FeignAutoConfiguration.class)
@@ -57,4 +58,8 @@ public interface OmsServiceFeign {
@ApiOperation("修改gwlog")
@PostMapping("/gwLogApi/updateGwLog")
AjaxResult updateGwLog(@RequestBody GwLogDTO gwLogDTO);
@ApiOperation("批量推送")
@PostMapping("/reservationStockOutOrderApi/batchPush")
public AjaxResult batchPush(@RequestBody List<Long> idList);
}
@@ -283,13 +283,20 @@ public class ReservationStockInOrderApplicationService {
* @return Boolean
*/
public Boolean auditState(ReservationStockInOrderDO stockInOrderDO){
Integer issueStatus = stockInOrderDO.getIssueStatus();
// if (issueStatus == 2) {
// List<Long> idList = new ArrayList();
// idList.add(stockInOrderDO.getInOrderId());
// batchPush(idList);
// }
return stockInOrderDomainService.auditState(stockInOrderDO);
Boolean b = stockInOrderDomainService.auditState(stockInOrderDO);
Integer needCustomsDeclaration = stockInOrderDO.getNeedCustomsDeclaration();
Integer auditStatus = stockInOrderDO.getAuditStatus();
try {
if (needCustomsDeclaration != null && needCustomsDeclaration == 1 && auditStatus != null && auditStatus == 2) {
Long inOrderId = stockInOrderDO.getInOrderId();
List<Long> idList = new ArrayList<>();
idList.add(inOrderId);
batchPush(idList);
}
} catch (Exception e) {
throw new ServiceException("推送关务系统失败!");
}
return b;
}
/**
@@ -494,7 +494,20 @@ public class StockInOrderApplicationService {
* @return Boolean
*/
public Boolean auditState(StockInOrderDO stockInOrderDO){
return stockInOrderDomainService.auditState(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);
}
} catch (Exception e) {
throw new ServiceException("推送关务系统失败!");
}
return b;
}
@@ -1000,7 +1000,25 @@ public class StockOutOrderApplicationService {
* @return Boolean
*/
public Boolean genPickingOrder(StockOutOrderDO stockOutOrderDO){
return stockOutOrderDomainService.genPickingOrder(stockOutOrderDO);
Boolean b = stockOutOrderDomainService.genPickingOrder(stockOutOrderDO);
String needDeclareFlag = stockOutOrderDO.getNeedDeclareFlag();
Long organizationId = stockOutOrderDO.getOrganizationId();
try {
if (needDeclareFlag != null && "1".equals(needDeclareFlag) && organizationId != null && organizationId == 2830) {
Long outOrderId = stockOutOrderDO.getOutOrderId();
List<Long> ids = new ArrayList<>();
ids.add(outOrderId);
batchPush(ids);
} else {
Long outOrderId = stockOutOrderDO.getOutOrderId();
List<Long> ids = new ArrayList<>();
ids.add(outOrderId);
omsServiceFeign.batchPush(ids);
}
} catch (Exception e) {
throw new ServiceException("生成报关单失败");
}
return b;
}
/**