第三方接口连接修改

This commit is contained in:
lym
2024-08-30 16:20:33 +08:00
parent 2dee958b28
commit f4f6e1d641
5 changed files with 14 additions and 11 deletions
@@ -304,7 +304,7 @@ public class OrderController {
System.out.println("orderXmlVO = " + orderXmlVO);
}
// orderService.importExcelData(orderDO, list, index);
orderService.importExcelData(orderDO, list, index);
} catch (Exception e) {
@@ -63,6 +63,7 @@ import com.cf.imes.module.executor.dal.mysql.order.OrderMapper;
import java.io.*;
import java.net.URLEncoder;
import java.time.*;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.*;
import java.util.concurrent.ExecutionException;
@@ -153,6 +154,13 @@ public class OrderServiceImpl implements OrderService {
validateCustomOrderNoExists(updateReqVO.getCustomOrderNo(), updateReqVO.getId());
// 发货日期校验
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDate orderDate = LocalDate.from(updateReqVO.getOrderDate());
LocalDate deliveryDate = LocalDate.from(updateReqVO.getDeliveryDate());
if (deliveryDate.isBefore(orderDate)) {
// 将 deliveryDate 设置为 orderDate 后的第 30 天
deliveryDate = orderDate.plusMonths(1);
}
// 更新
OrderDO updateObj = BeanUtils.toBean(updateReqVO, OrderDO.class);
if (updateReqVO.getCustomOrderNo() == null || updateReqVO.getCustomOrderNo().equals("")) {
@@ -2,11 +2,12 @@ package com.cf.imes.module.executor.util.fileConversion.admin.api.webcad;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.FeignClientsConfiguration;
import org.springframework.web.bind.annotation.*;
@FeignClient(url = "https://chenfeng.tech:7779", name = "apiOrderService")
@FeignClient(url = "https://chenfeng.tech:7779", name = "apiOrderService", configuration = FeignClientsConfiguration.class )
public interface ApiDataProduction {
// 登陆token
@@ -741,8 +741,8 @@ public class ApiTypeRealize {
Map<Long, PlateDetail> plateDetails = new HashMap<>();
if (dataPlates.getJSONObject("value") != null){
// 获取 Orders 字段对应的数组
JSONArray ordersArray = dataPlates.getJSONArray("Orders");
// System.err.println(dataPlates);
JSONArray ordersArray = dataPlates.getJSONObject("value").getJSONArray("Orders");
System.err.println(dataPlates);
if (ordersArray != null && !ordersArray.isEmpty()) {
for (int i = 0; i < ordersArray.size(); i++) {
JSONObject order = ordersArray.getJSONObject(i);
@@ -685,7 +685,7 @@
<select id="selectPlateTypeByRoomId" resultType="java.lang.Long">
SELECT p.id
FROM order_plate p
LEFT JOIN order_item i ON p.id = i.plate_id
LEFT JOIN order_item i ON p.id = i.plate_id
WHERE i.organ_id = #{organId} AND i.order_id = #{orderId} AND p.deleted = #{deleted}
<if test="roomId != null and roomId.size() > 0">
AND i.room_id IN
@@ -696,12 +696,6 @@
<if test="bodyId != null">
AND i.body_id = #{bodyId}
</if>
GROUP BY
g.goods_id
HAVING
SUM(a.area) > 0
ORDER BY
orderArea DESC;
</select>