diff --git a/mhd_oms/src/main/java/com/mhd/oms/application/service/businessDocumentOrder/BusinessDocumentOrderApplicationService.java b/mhd_oms/src/main/java/com/mhd/oms/application/service/businessDocumentOrder/BusinessDocumentOrderApplicationService.java index 911e1cb00..360cd100f 100644 --- a/mhd_oms/src/main/java/com/mhd/oms/application/service/businessDocumentOrder/BusinessDocumentOrderApplicationService.java +++ b/mhd_oms/src/main/java/com/mhd/oms/application/service/businessDocumentOrder/BusinessDocumentOrderApplicationService.java @@ -39,6 +39,7 @@ import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.io.IOException; +import java.text.SimpleDateFormat; import java.util.*; /** @@ -217,7 +218,10 @@ public class BusinessDocumentOrderApplicationService { // 4. 构建推送数据 Map body = new HashMap<>(); body.put("erpBillNo", String.valueOf(order.getId())); - body.put("billDate", order.getDocumentDate()); + String billDate = order.getDocumentDate() != null + ? new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(order.getDocumentDate()) + : null; + body.put("billDate", billDate); // 商品类型取第一个cargo的productType(0料件,1半成品,2成品) Integer goodsType = (cargoList != null && !cargoList.isEmpty()) ? cargoList.get(0).getProductType() : null; body.put("goodsType", goodsType);