Browse Source

feat(service): 暂存单设置发货时间为当前时间。

dist.1.3.0
zhaoqiaobo 12 months ago
parent
commit
9673b31a3a
  1. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/AdvanceOrderListener.java

7
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mq/AdvanceOrderListener.java

@ -1,6 +1,7 @@
package com.logpm.trunkline.mq;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONArray;
@ -86,7 +87,7 @@ public class AdvanceOrderListener {
}
if (ObjectUtil.isNotNull(advanceEntity)) {
String orderCode = advanceEntity.getOrderCode();
if(orderCode.contains("遗")){
if (orderCode.contains("遗")) {
advanceEntity.setLegacyStatus("1");
}
advanceService.save(advanceEntity);
@ -102,6 +103,10 @@ public class AdvanceOrderListener {
continue;
}
advanceDetailEntity.setAdvanceId(advanceEntity.getId());
// 设置发货时间为当前时间
if (StrUtil.isEmpty(advanceDetailEntity.getSendDateStr())) {
advanceDetailEntity.setSendDateStr(DateUtil.today());
}
advanceDetailEntityList.add(advanceDetailEntity);
JSONArray items = detail.getJSONArray("items");
if (CollUtil.isNotEmpty(items)) {

Loading…
Cancel
Save