From 8002faa7b7102b7b5f13b9844dce527a5eb27327 Mon Sep 17 00:00:00 2001
From: zhang <zc857179121@qq.com>
Date: 星期四, 22 五月 2025 16:53:44 +0800
Subject: [PATCH] 接口编写
---
src/main/java/com/zy/nc/task/PlanOrderTask.java | 54 +++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 49 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/zy/nc/task/PlanOrderTask.java b/src/main/java/com/zy/nc/task/PlanOrderTask.java
index 7c29060..5e63857 100644
--- a/src/main/java/com/zy/nc/task/PlanOrderTask.java
+++ b/src/main/java/com/zy/nc/task/PlanOrderTask.java
@@ -5,11 +5,13 @@
import com.zy.nc.entity.*;
import com.zy.nc.service.*;
import com.zy.nc.task.handler.PlanOrderHandler;
+import com.zy.system.service.impl.ConfigServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
+import java.util.Arrays;
import java.util.List;
@Slf4j
@@ -34,6 +36,8 @@
@Autowired
private NccCkPddWmsService nccCkPddWmsService;
+ @Autowired
+ private ConfigServiceImpl configService;
/**
* 鍙戣揣
@@ -45,6 +49,9 @@
List<String> Ids = nccSaleXsfhmxWmsService.selectXsfh();
for (String id : Ids) {
List<NccSaleXsfhmxWms> wmsFlag = nccSaleXsfhmxWmsService.selectList(new EntityWrapper<NccSaleXsfhmxWms>().eq("vbillcode", id).ne("wms_flag", 1).eq("fstatusflag", 2));
+ if (wmsFlag == null || wmsFlag.isEmpty()) {
+ return;
+ }
ReturnT<String> returnT = planOrderHandler.start1(wmsFlag);
if (!returnT.isSuccess()) {
for (NccSaleXsfhmxWms wms : wmsFlag) {
@@ -63,11 +70,17 @@
* @return
*/
@Scheduled(cron = "0/3 * * * * ? ")
- public void execute2() {
- List<String> strings = nccScZkmxbWmsService.selectZk();
+ public void execute2_1() {
+ //Config wmsFlag1 = configService.selectConfigByCode("wms_flag");
+ List<Integer> ids = Arrays.asList(6101, 6102, 6106, 6110);
+ //String s = "涓�鏈熸垚鍝佸簱-鍐呰锤(绔嬩綋搴�)銆佷竴鏈熸垚鍝佸簱-绂忚幈鍥介檯澶栬锤(绔嬩綋搴�)銆佷竴鏈熸垚鍝佸簱-澶栬喘(绔嬩綋搴�)銆佷竴鏈熸垚鍝佸簱-绂忚揪/宸ュ巶澶栬锤(绔嬩綋搴�)銆佷竴鏈熻緟鏂欏簱-鍖呮潗(绔嬩綋搴�)";
+ List<String> strings = nccScZkmxbWmsService.selectZkIn(ids);
for (String string : strings) {
List<NccScZkmxbWms> wmsFlag = nccScZkmxbWmsService.selectList(new EntityWrapper<NccScZkmxbWms>().eq("vbillcode", string).ne("wms_flag", 1));
- ReturnT<String> returnT = planOrderHandler.start2(wmsFlag);
+ if (wmsFlag == null || wmsFlag.isEmpty()) {
+ return;
+ }
+ ReturnT<String> returnT = planOrderHandler.start2In(wmsFlag);
if (!returnT.isSuccess()) {
for (NccScZkmxbWms wms : wmsFlag) {
wms.setWmsMemo(returnT.getMsg());
@@ -76,7 +89,31 @@
log.error(returnT.getMsg());
}
}
+ }
+ /**
+ * 杞簱
+ *
+ * @return
+ */
+ @Scheduled(cron = "0/3 * * * * ? ")
+ public void execute2_2() {
+ List<Integer> ids = Arrays.asList(6101, 6102, 6106, 6110);
+ List<String> strings = nccScZkmxbWmsService.selectZkOut(ids);
+ for (String string : strings) {
+ List<NccScZkmxbWms> wmsFlag = nccScZkmxbWmsService.selectList(new EntityWrapper<NccScZkmxbWms>().eq("vbillcode", string).ne("wms_flag", 1));
+ if (wmsFlag == null || wmsFlag.isEmpty()) {
+ return;
+ }
+ ReturnT<String> returnT = planOrderHandler.start2Out(wmsFlag);
+ if (!returnT.isSuccess()) {
+ for (NccScZkmxbWms wms : wmsFlag) {
+ wms.setWmsMemo(returnT.getMsg());
+ nccScZkmxbWmsService.updateById(wms);
+ }
+ log.error(returnT.getMsg());
+ }
+ }
}
/**
@@ -89,6 +126,9 @@
List<String> strings = nccCgCgdhdWmsService.selectCg();
for (String string : strings) {
List<NccCgCgdhdWms> wmsFlag = nccCgCgdhdWmsService.selectList(new EntityWrapper<NccCgCgdhdWms>().eq("vbillcode", string).ne("wms_flag", 1));
+ if (wmsFlag == null || wmsFlag.isEmpty()) {
+ return;
+ }
ReturnT<String> returnT = planOrderHandler.start3(wmsFlag);
if (!returnT.isSuccess()) {
for (NccCgCgdhdWms wms : wmsFlag) {
@@ -108,9 +148,13 @@
*/
@Scheduled(cron = "0/3 * * * * ? ")
public void execute5() {
- List<String> strings = nccSaleDbddWmsService.selectDbdd();
+ List<Integer> ids = Arrays.asList(6101, 6102, 6106, 6110);
+ List<String> strings = nccSaleDbddWmsService.selectDbdd(ids);
for (String string : strings) {
List<NccSaleDbddWms> wmsFlag = nccSaleDbddWmsService.selectList(new EntityWrapper<NccSaleDbddWms>().eq("vbillcode", string).ne("wms_flag", 1));
+ if (wmsFlag == null || wmsFlag.isEmpty()) {
+ return;
+ }
ReturnT<String> returnT = planOrderHandler.start5(wmsFlag);
if (!returnT.isSuccess()) {
for (NccSaleDbddWms wms : wmsFlag) {
@@ -133,7 +177,7 @@
public void execute4() {
List<String> strings = nccCkPddWmsService.selectPdd();
for (String string : strings) {
- List<NccCkPddWms> wmsFlag = nccCkPddWmsService.selectList(new EntityWrapper<NccCkPddWms>().eq("vbillcode", string).ne("wms_flag", 1).eq("hdr",0).eq("bdr",0));
+ List<NccCkPddWms> wmsFlag = nccCkPddWmsService.selectList(new EntityWrapper<NccCkPddWms>().eq("vbillcode", string).ne("wms_flag", 1).eq("hdr", 0).eq("bdr", 0));
ReturnT<String> returnT = planOrderHandler.start4(wmsFlag);
if (!returnT.isSuccess()) {
for (NccCkPddWms wms : wmsFlag) {
--
Gitblit v1.9.1