mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
绕过SSL验证
This commit is contained in:
+1
-1
@@ -208,7 +208,7 @@ public class OrderController {
|
|||||||
@Parameter(name = "orderNo", description = "订单号", required = false),
|
@Parameter(name = "orderNo", description = "订单号", required = false),
|
||||||
@Parameter(name = "customOrderNo", description = "自定义单号", required = false)
|
@Parameter(name = "customOrderNo", description = "自定义单号", required = false)
|
||||||
})
|
})
|
||||||
@PreAuthorize("@ss.hasPermission('production:manager-list:detail')")
|
@PreAuthorize("@ss.hasPermission('productManager:List')")
|
||||||
public CommonResult<List<ApiOrderRespVO>> getApiOrder(@RequestParam(value = "startTime", required = false) String startTime,
|
public CommonResult<List<ApiOrderRespVO>> getApiOrder(@RequestParam(value = "startTime", required = false) String startTime,
|
||||||
@RequestParam(value = "endTime", required = false) String endTime,
|
@RequestParam(value = "endTime", required = false) String endTime,
|
||||||
@RequestParam(value = "orderNo", required = false) String orderNo,
|
@RequestParam(value = "orderNo", required = false) String orderNo,
|
||||||
|
|||||||
+4
-4
@@ -107,10 +107,10 @@ public class OrderDO extends BaseDO {
|
|||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
// /**
|
/**
|
||||||
// * 是否删除
|
* 是否删除
|
||||||
// */
|
*/
|
||||||
// private Boolean deleted;
|
private Boolean deleted;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义板编号配置id
|
* 自定义板编号配置id
|
||||||
|
|||||||
+4
-4
@@ -78,8 +78,8 @@ public class OrderBodyDO extends BaseDO {
|
|||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
// /**
|
/**
|
||||||
// * 是否删除
|
* 是否删除
|
||||||
// */
|
*/
|
||||||
// private Boolean deleted;
|
private Boolean deleted;
|
||||||
}
|
}
|
||||||
+4
-4
@@ -79,9 +79,9 @@ public class OrderGroupDO extends BaseDO {
|
|||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
// /**
|
/**
|
||||||
// * 是否删除
|
* 是否删除
|
||||||
// */
|
*/
|
||||||
// private Boolean deleted;
|
private Boolean deleted;
|
||||||
|
|
||||||
}
|
}
|
||||||
+4
-4
@@ -102,9 +102,9 @@ public class OrderPartsDO extends BaseDO {
|
|||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
// /**
|
/**
|
||||||
// * 是否删除
|
* 是否删除
|
||||||
// */
|
*/
|
||||||
// private Boolean deleted;
|
private Boolean deleted;
|
||||||
|
|
||||||
}
|
}
|
||||||
+4
-4
@@ -185,10 +185,10 @@ public class PlateDO extends BaseDO {
|
|||||||
* 是否作废
|
* 是否作废
|
||||||
*/
|
*/
|
||||||
private Boolean isCancel;
|
private Boolean isCancel;
|
||||||
// /**
|
/**
|
||||||
// * 是否删除
|
* 是否删除
|
||||||
// */
|
*/
|
||||||
// private Boolean deleted;
|
private Boolean deleted;
|
||||||
|
|
||||||
private String customPlateNo;
|
private String customPlateNo;
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -57,9 +57,9 @@ public class OrderProcessDO extends BaseDO {
|
|||||||
* 下一工序 ID
|
* 下一工序 ID
|
||||||
*/
|
*/
|
||||||
private Long nextStepId;
|
private Long nextStepId;
|
||||||
// /**
|
/**
|
||||||
// * 是否删除
|
* 是否删除
|
||||||
// */
|
*/
|
||||||
// private Boolean deleted;
|
private Boolean deleted;
|
||||||
|
|
||||||
}
|
}
|
||||||
+4
-4
@@ -90,9 +90,9 @@ public class ProcessStepDO extends BaseDO {
|
|||||||
* 工序处理日期
|
* 工序处理日期
|
||||||
*/
|
*/
|
||||||
private LocalDateTime processDate;
|
private LocalDateTime processDate;
|
||||||
// /**
|
/**
|
||||||
// * 是否删除
|
* 是否删除
|
||||||
// */
|
*/
|
||||||
// private Boolean deleted;
|
private Boolean deleted;
|
||||||
|
|
||||||
}
|
}
|
||||||
+4
-4
@@ -71,9 +71,9 @@ public class RawGoodsDO extends BaseDO {
|
|||||||
* 规格
|
* 规格
|
||||||
*/
|
*/
|
||||||
private String spec;
|
private String spec;
|
||||||
// /**
|
/**
|
||||||
// * 是否删除
|
* 是否删除
|
||||||
// */
|
*/
|
||||||
// private Boolean deleted;
|
private Boolean deleted;
|
||||||
|
|
||||||
}
|
}
|
||||||
+19
@@ -51,6 +51,7 @@ public class ApiDataAchieve {
|
|||||||
String appId = app.getString("appId");
|
String appId = app.getString("appId");
|
||||||
String appSecret = app.getString("appSecret");
|
String appSecret = app.getString("appSecret");
|
||||||
|
|
||||||
|
SSLUtils.ignoreSsl();
|
||||||
JSONObject json = apiDataProduction.getApiTokenMessage(appId, appSecret);
|
JSONObject json = apiDataProduction.getApiTokenMessage(appId, appSecret);
|
||||||
if (!json.getString(ERR_MSG_KEY).equals("success")) {
|
if (!json.getString(ERR_MSG_KEY).equals("success")) {
|
||||||
log.error(APP_TOKEN_ERROR.getMsg());
|
log.error(APP_TOKEN_ERROR.getMsg());
|
||||||
@@ -62,6 +63,7 @@ public class ApiDataAchieve {
|
|||||||
|
|
||||||
// 获取板件生产数据信息
|
// 获取板件生产数据信息
|
||||||
public JSONObject getApiPlateProData(String token, String orderNo) {
|
public JSONObject getApiPlateProData(String token, String orderNo) {
|
||||||
|
SSLUtils.ignoreSsl();
|
||||||
JSONObject jsonPlatesData = new JSONObject();
|
JSONObject jsonPlatesData = new JSONObject();
|
||||||
jsonPlatesData.put(ORDER_NO_KEY, "N" + orderNo);//生产单号需要传入赋值
|
jsonPlatesData.put(ORDER_NO_KEY, "N" + orderNo);//生产单号需要传入赋值
|
||||||
jsonPlatesData.put("format", "json");
|
jsonPlatesData.put("format", "json");
|
||||||
@@ -73,6 +75,7 @@ public class ApiDataAchieve {
|
|||||||
// 获取配件信息 分页获取
|
// 获取配件信息 分页获取
|
||||||
public JSONObject getApiPartsMessage(String token, String orderNo, JSONObject jsonParts) {
|
public JSONObject getApiPartsMessage(String token, String orderNo, JSONObject jsonParts) {
|
||||||
|
|
||||||
|
SSLUtils.ignoreSsl();
|
||||||
JSONObject parts = apiDataProduction.getApiOrderPartsMessage(token, jsonParts);
|
JSONObject parts = apiDataProduction.getApiOrderPartsMessage(token, jsonParts);
|
||||||
if (!parts.getString(ERR_CODE_KEY).equals("0")) {
|
if (!parts.getString(ERR_CODE_KEY).equals("0")) {
|
||||||
log.error("N" + orderNo + "配件数据获取错误:" + parts.getString(ERR_MSG_KEY));
|
log.error("N" + orderNo + "配件数据获取错误:" + parts.getString(ERR_MSG_KEY));
|
||||||
@@ -87,6 +90,8 @@ public class ApiDataAchieve {
|
|||||||
|
|
||||||
// 柜体信息转换
|
// 柜体信息转换
|
||||||
public JSONObject getApiBodyMessage(String token, String orderNo) {
|
public JSONObject getApiBodyMessage(String token, String orderNo) {
|
||||||
|
|
||||||
|
SSLUtils.ignoreSsl();
|
||||||
JSONObject jsonBody = new JSONObject();
|
JSONObject jsonBody = new JSONObject();
|
||||||
jsonBody.put(CURR_PAGE_KEY, 1);
|
jsonBody.put(CURR_PAGE_KEY, 1);
|
||||||
jsonBody.put(PAGE_COUNT_KEY, PARTS_PAGE_MAX);
|
jsonBody.put(PAGE_COUNT_KEY, PARTS_PAGE_MAX);
|
||||||
@@ -109,6 +114,8 @@ public class ApiDataAchieve {
|
|||||||
// 商品信息转换
|
// 商品信息转换
|
||||||
public JSONObject getApiGoodsMessage(String token, String orderNo) {
|
public JSONObject getApiGoodsMessage(String token, String orderNo) {
|
||||||
|
|
||||||
|
|
||||||
|
SSLUtils.ignoreSsl();
|
||||||
JSONObject jsonGoods = new JSONObject();
|
JSONObject jsonGoods = new JSONObject();
|
||||||
jsonGoods.put(CURR_PAGE_KEY, 1);
|
jsonGoods.put(CURR_PAGE_KEY, 1);
|
||||||
jsonGoods.put(PAGE_COUNT_KEY, PARTS_PAGE_MAX);
|
jsonGoods.put(PAGE_COUNT_KEY, PARTS_PAGE_MAX);
|
||||||
@@ -131,6 +138,8 @@ public class ApiDataAchieve {
|
|||||||
|
|
||||||
// 板材明细信息转换
|
// 板材明细信息转换
|
||||||
public JSONObject getApiPlateDetailMessage(String token, String orderNo, JSONObject jsonPlates) {
|
public JSONObject getApiPlateDetailMessage(String token, String orderNo, JSONObject jsonPlates) {
|
||||||
|
|
||||||
|
SSLUtils.ignoreSsl();
|
||||||
JSONObject plates = apiDataProduction.getApiBlocksDataMessage(token, jsonPlates);
|
JSONObject plates = apiDataProduction.getApiBlocksDataMessage(token, jsonPlates);
|
||||||
if (!plates.getString(ERR_CODE_KEY).equals("0")) {
|
if (!plates.getString(ERR_CODE_KEY).equals("0")) {
|
||||||
log.error("N" + orderNo + "板材明细信息获取错误" + plates.getString(ERR_MSG_KEY));
|
log.error("N" + orderNo + "板材明细信息获取错误" + plates.getString(ERR_MSG_KEY));
|
||||||
@@ -145,6 +154,8 @@ public class ApiDataAchieve {
|
|||||||
|
|
||||||
// 加工组信息转换
|
// 加工组信息转换
|
||||||
public JSONObject getApiGroupMessage(String token, String orderNo) {
|
public JSONObject getApiGroupMessage(String token, String orderNo) {
|
||||||
|
|
||||||
|
SSLUtils.ignoreSsl();
|
||||||
JSONObject jsonModule = new JSONObject();
|
JSONObject jsonModule = new JSONObject();
|
||||||
jsonModule.put(ORDER_NO_KEY, "N" + orderNo);
|
jsonModule.put(ORDER_NO_KEY, "N" + orderNo);
|
||||||
return apiDataProduction.getApiModuleTypeDataMessage(token, jsonModule);
|
return apiDataProduction.getApiModuleTypeDataMessage(token, jsonModule);
|
||||||
@@ -152,6 +163,8 @@ public class ApiDataAchieve {
|
|||||||
|
|
||||||
// 板材数据信息转换
|
// 板材数据信息转换
|
||||||
public JSONObject getApiBlocksMessage(String token, String orderNo) {
|
public JSONObject getApiBlocksMessage(String token, String orderNo) {
|
||||||
|
|
||||||
|
SSLUtils.ignoreSsl();
|
||||||
JSONObject jsonBlocks = new JSONObject();
|
JSONObject jsonBlocks = new JSONObject();
|
||||||
jsonBlocks.put(CURR_PAGE_KEY, 1);
|
jsonBlocks.put(CURR_PAGE_KEY, 1);
|
||||||
jsonBlocks.put(PAGE_COUNT_KEY, PARTS_PAGE_MAX);
|
jsonBlocks.put(PAGE_COUNT_KEY, PARTS_PAGE_MAX);
|
||||||
@@ -173,6 +186,8 @@ public class ApiDataAchieve {
|
|||||||
// 商品列表信息转换
|
// 商品列表信息转换
|
||||||
@Async
|
@Async
|
||||||
public Future<JSONObject> getApiGoodsMessage(String token, Long[] id) {
|
public Future<JSONObject> getApiGoodsMessage(String token, Long[] id) {
|
||||||
|
|
||||||
|
SSLUtils.ignoreSsl();
|
||||||
JSONObject jsonGoods = new JSONObject();
|
JSONObject jsonGoods = new JSONObject();
|
||||||
jsonGoods.put(GOODS_ID, id);
|
jsonGoods.put(GOODS_ID, id);
|
||||||
JSONObject good = apiDataProduction.getApiGoods(token, jsonGoods);
|
JSONObject good = apiDataProduction.getApiGoods(token, jsonGoods);
|
||||||
@@ -186,6 +201,8 @@ public class ApiDataAchieve {
|
|||||||
|
|
||||||
// 订单获取
|
// 订单获取
|
||||||
public JSONObject getApiOrder(String token, String orderNo) {
|
public JSONObject getApiOrder(String token, String orderNo) {
|
||||||
|
|
||||||
|
SSLUtils.ignoreSsl();
|
||||||
JSONObject jsonOrders = new JSONObject();
|
JSONObject jsonOrders = new JSONObject();
|
||||||
orderNo = "N" +orderNo;
|
orderNo = "N" +orderNo;
|
||||||
JSONArray orderList = new JSONArray();
|
JSONArray orderList = new JSONArray();
|
||||||
@@ -224,6 +241,8 @@ public class ApiDataAchieve {
|
|||||||
}
|
}
|
||||||
// 订单列表
|
// 订单列表
|
||||||
public Future<JSONObject> getApiOrderList(String token,String shopId,String createDateMin, String createDateMax, String orderNo, String customOrderNo) {
|
public Future<JSONObject> getApiOrderList(String token,String shopId,String createDateMin, String createDateMax, String orderNo, String customOrderNo) {
|
||||||
|
|
||||||
|
SSLUtils.ignoreSsl();
|
||||||
JSONObject jsonOrders = new JSONObject();
|
JSONObject jsonOrders = new JSONObject();
|
||||||
if (createDateMin != null && createDateMax != null){
|
if (createDateMin != null && createDateMax != null){
|
||||||
getDate(createDateMin, createDateMax, jsonOrders);
|
getDate(createDateMin, createDateMax, jsonOrders);
|
||||||
|
|||||||
+1
-2
@@ -6,8 +6,7 @@ import org.springframework.cloud.openfeign.FeignClientsConfiguration;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
||||||
|
@FeignClient(url = "${api.order.apiOrderService.url}", name = "apiOrderService", configuration = FeignClientsConfiguration.class ) // FeignClientsConfiguration
|
||||||
@FeignClient(url = "https://chenfeng.tech:7779", name = "apiOrderService", configuration = FeignClientsConfiguration.class )
|
|
||||||
public interface ApiDataProduction {
|
public interface ApiDataProduction {
|
||||||
|
|
||||||
// 登陆token
|
// 登陆token
|
||||||
|
|||||||
+66
@@ -0,0 +1,66 @@
|
|||||||
|
package com.cf.imes.module.executor.util.fileConversion.admin.api.webcad;
|
||||||
|
|
||||||
|
import javax.net.ssl.*;
|
||||||
|
import java.security.cert.CertificateException;
|
||||||
|
import java.security.cert.X509Certificate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @projectName: cf_imes_server
|
||||||
|
* @author: 晨丰科技
|
||||||
|
* @date: 2025/3/11 14:51
|
||||||
|
*/
|
||||||
|
public class SSLUtils {
|
||||||
|
private static void trustAllHttpsCertificates() throws Exception {
|
||||||
|
TrustManager[] trustAllCerts = new TrustManager[1];
|
||||||
|
TrustManager tm = new miTM();
|
||||||
|
trustAllCerts[0] = tm;
|
||||||
|
SSLContext sc = SSLContext.getInstance("SSL");
|
||||||
|
sc.init(null, trustAllCerts, null);
|
||||||
|
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
|
||||||
|
}
|
||||||
|
|
||||||
|
static class miTM implements TrustManager, X509TrustManager {
|
||||||
|
public X509Certificate[] getAcceptedIssuers() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isServerTrusted(X509Certificate[] certs) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isClientTrusted(X509Certificate[] certs) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void checkServerTrusted(X509Certificate[] certs, String authType)
|
||||||
|
throws CertificateException {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void checkClientTrusted(X509Certificate[] certs, String authType)
|
||||||
|
throws CertificateException {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 忽略HTTPS请求的SSL证书,必须在openConnection之前调用
|
||||||
|
*
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public static void ignoreSsl() {
|
||||||
|
try {
|
||||||
|
HostnameVerifier hv = new HostnameVerifier() {
|
||||||
|
public boolean verify(String urlHostName, SSLSession session) {
|
||||||
|
System.out.println("Warning: URL Host: " + urlHostName + " vs. " + session.getPeerHost());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
trustAllHttpsCertificates();
|
||||||
|
HttpsURLConnection.setDefaultHostnameVerifier(hv);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
+26
-16
@@ -69,12 +69,12 @@ public class XmlTypeRealize {
|
|||||||
for (RoomXmlVO roomXmlVO : roomXmlVOS.getRoomXmlVOList()) {
|
for (RoomXmlVO roomXmlVO : roomXmlVOS.getRoomXmlVOList()) {
|
||||||
for (BoxXmlVO boxXmlVO : roomXmlVO.getBoxXmlVOList()) {
|
for (BoxXmlVO boxXmlVO : roomXmlVO.getBoxXmlVOList()) {
|
||||||
BasePosition basePosition = BasePosition.builder()
|
BasePosition basePosition = BasePosition.builder()
|
||||||
.basePointX(Double.valueOf(boxXmlVO.getBasePointX()))
|
.basePointX(Double.valueOf(boxXmlVO.getBasePointX() == null ? "0" : boxXmlVO.getBasePointX()))
|
||||||
.basePointY(Double.valueOf(boxXmlVO.getBasePointY()))
|
.basePointY(Double.valueOf(boxXmlVO.getBasePointY() == null ? "0" : boxXmlVO.getBasePointY()))
|
||||||
.basePointZ(Double.valueOf(boxXmlVO.getBasePointZ()))
|
.basePointZ(Double.valueOf(boxXmlVO.getBasePointZ() == null ? "0" : boxXmlVO.getBasePointZ()))
|
||||||
.axisXrotate(Double.valueOf(boxXmlVO.getAxisXrotate()))
|
.axisXrotate(Double.valueOf(boxXmlVO.getAxisXrotate() == null ? "0" : boxXmlVO.getAxisXrotate()))
|
||||||
.axisYrotate(Double.valueOf(boxXmlVO.getAxisYrotate()))
|
.axisYrotate(Double.valueOf(boxXmlVO.getAxisYrotate() == null ? "0" : boxXmlVO.getAxisYrotate()))
|
||||||
.axisZrotate(Double.valueOf(boxXmlVO.getAxisZrotate()))
|
.axisZrotate(Double.valueOf(boxXmlVO.getAxisZrotate() == null ? "0" : boxXmlVO.getAxisZrotate()))
|
||||||
.build();
|
.build();
|
||||||
basePositions.put(boxXmlVO.getCode(), basePosition);
|
basePositions.put(boxXmlVO.getCode(), basePosition);
|
||||||
}
|
}
|
||||||
@@ -116,6 +116,13 @@ public class XmlTypeRealize {
|
|||||||
Long roomId = (Long) snowFlakeGenerator.nextId(null);
|
Long roomId = (Long) snowFlakeGenerator.nextId(null);
|
||||||
|
|
||||||
setDefaultsForRoomXmlVO(roomXmlVO);
|
setDefaultsForRoomXmlVO(roomXmlVO);
|
||||||
|
if (roomXmlVO.getBoxXmlVOList() == null || roomXmlVO.getBoxXmlVOList().isEmpty()) {
|
||||||
|
BoxXmlVO boxXmlVO = new BoxXmlVO();
|
||||||
|
setDefaultsForBoxXmlVO(boxXmlVO);
|
||||||
|
List<BoxXmlVO> boxXmlVOList = new ArrayList<>();
|
||||||
|
boxXmlVOList.add(boxXmlVO);
|
||||||
|
roomXmlVO.setBoxXmlVOList(boxXmlVOList);
|
||||||
|
}
|
||||||
for (BoxXmlVO boxXmlVO : roomXmlVO.getBoxXmlVOList()) {
|
for (BoxXmlVO boxXmlVO : roomXmlVO.getBoxXmlVOList()) {
|
||||||
setDefaultsForBoxXmlVO(boxXmlVO);
|
setDefaultsForBoxXmlVO(boxXmlVO);
|
||||||
OrderBodyDO orderBodyDO = createOrderBodyDO(boxXmlVO, roomId, orderId, organId, roomXmlVO.getName());
|
OrderBodyDO orderBodyDO = createOrderBodyDO(boxXmlVO, roomId, orderId, organId, roomXmlVO.getName());
|
||||||
@@ -128,9 +135,7 @@ public class XmlTypeRealize {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setDefaultsForRoomXmlVO(RoomXmlVO roomXmlVO) {
|
private void setDefaultsForRoomXmlVO(RoomXmlVO roomXmlVO) {
|
||||||
if (roomXmlVO.getName() == null) {
|
|
||||||
roomXmlVO.setName(NOT_ASSIGNED);
|
|
||||||
}
|
|
||||||
if (roomXmlVO.getCode() == null) {
|
if (roomXmlVO.getCode() == null) {
|
||||||
if (roomXmlVO.getName() == null) {
|
if (roomXmlVO.getName() == null) {
|
||||||
roomXmlVO.setCode(NOT_ASSIGNED_CODE);
|
roomXmlVO.setCode(NOT_ASSIGNED_CODE);
|
||||||
@@ -138,12 +143,13 @@ public class XmlTypeRealize {
|
|||||||
roomXmlVO.setCode(NOT_ASSIGNED_CODE + roomXmlVO.getName());
|
roomXmlVO.setCode(NOT_ASSIGNED_CODE + roomXmlVO.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (roomXmlVO.getName() == null) {
|
||||||
|
roomXmlVO.setName(NOT_ASSIGNED);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setDefaultsForBoxXmlVO(BoxXmlVO boxXmlVO) {
|
private void setDefaultsForBoxXmlVO(BoxXmlVO boxXmlVO) {
|
||||||
if (boxXmlVO.getName() == null) {
|
|
||||||
boxXmlVO.setName(NOT_ASSIGNED);
|
|
||||||
}
|
|
||||||
if (boxXmlVO.getCode() == null) {
|
if (boxXmlVO.getCode() == null) {
|
||||||
if (boxXmlVO.getName() == null) {
|
if (boxXmlVO.getName() == null) {
|
||||||
boxXmlVO.setCode(NOT_ASSIGNED_CODE);
|
boxXmlVO.setCode(NOT_ASSIGNED_CODE);
|
||||||
@@ -151,6 +157,9 @@ public class XmlTypeRealize {
|
|||||||
boxXmlVO.setCode(NOT_ASSIGNED_CODE + boxXmlVO.getName());
|
boxXmlVO.setCode(NOT_ASSIGNED_CODE + boxXmlVO.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (boxXmlVO.getName() == null || boxXmlVO.getName().isEmpty()) {
|
||||||
|
boxXmlVO.setName(NOT_ASSIGNED);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private OrderBodyDO createOrderBodyDO(BoxXmlVO boxXmlVO, Long roomId, Long orderId, Long organId, String roomName) {
|
private OrderBodyDO createOrderBodyDO(BoxXmlVO boxXmlVO, Long roomId, Long orderId, Long organId, String roomName) {
|
||||||
@@ -161,9 +170,9 @@ public class XmlTypeRealize {
|
|||||||
.roomId(roomId)
|
.roomId(roomId)
|
||||||
.roomName(roomName) // 假设 BoxXmlVO 中有 roomName 字段
|
.roomName(roomName) // 假设 BoxXmlVO 中有 roomName 字段
|
||||||
.name(boxXmlVO.getName())
|
.name(boxXmlVO.getName())
|
||||||
.width(Double.parseDouble(boxXmlVO.getWidth()))
|
.width(Double.parseDouble(boxXmlVO.getWidth() == null ? "0" : boxXmlVO.getWidth()))
|
||||||
.height(Double.parseDouble(boxXmlVO.getHeight()))
|
.height(Double.parseDouble(boxXmlVO.getHeight() == null ? "0" : boxXmlVO.getHeight()))
|
||||||
.depth(Double.parseDouble(boxXmlVO.getLength()))
|
.depth(Double.parseDouble(boxXmlVO.getLength() == null ? "0" : boxXmlVO.getLength()))
|
||||||
.plateNum(0)
|
.plateNum(0)
|
||||||
.unregularNum(0)
|
.unregularNum(0)
|
||||||
.build();
|
.build();
|
||||||
@@ -450,8 +459,9 @@ public class XmlTypeRealize {
|
|||||||
|
|
||||||
String boxNo = positionVO.getBoxCode();
|
String boxNo = positionVO.getBoxCode();
|
||||||
OrderBodyDO bodyDO = bodyMap.get(boxNo);
|
OrderBodyDO bodyDO = bodyMap.get(boxNo);
|
||||||
|
plateNum = plateNum + unregularNum;
|
||||||
if (bodyDO != null) {
|
if (bodyDO != null) {
|
||||||
bodyDO.setPlateNum((int) (bodyDO.getPlateNum() + plateNum + unregularNum))
|
bodyDO.setPlateNum((int) (bodyDO.getPlateNum() + plateNum))
|
||||||
.setUnregularNum((int) (bodyDO.getUnregularNum() + unregularNum));
|
.setUnregularNum((int) (bodyDO.getUnregularNum() + unregularNum));
|
||||||
} else {
|
} else {
|
||||||
Long roomId = (Long) identifierGenerator.nextId(null);
|
Long roomId = (Long) identifierGenerator.nextId(null);
|
||||||
|
|||||||
+9
@@ -174,3 +174,12 @@ justauth:
|
|||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
configuration:
|
configuration:
|
||||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #开启sql日志
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #开启sql日志
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--- #################### 生产接口url配置 ####################
|
||||||
|
api:
|
||||||
|
order:
|
||||||
|
apiOrderService:
|
||||||
|
url: https://www.leye.site/ # 生产环境
|
||||||
|
|
||||||
|
|||||||
+8
@@ -154,3 +154,11 @@ chenfeng:
|
|||||||
mybatis-plus:
|
mybatis-plus:
|
||||||
configuration:
|
configuration:
|
||||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #开启sql日志
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #开启sql日志
|
||||||
|
|
||||||
|
|
||||||
|
--- #################### 生产接口url配置 ####################
|
||||||
|
api:
|
||||||
|
order:
|
||||||
|
apiOrderService:
|
||||||
|
url: https://chenfeng.tech:7779/ # 开发环境 https://www.leye.site/ 生产环境
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user