mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-14 21:52:07 +08:00
新增webcad生产单导入:1、cadtoken请求网关异常修复;2、cad拆单批量数据组织id缺省补充;
This commit is contained in:
@@ -214,7 +214,6 @@ public class AccessLogFilter implements GlobalFilter, Ordered {
|
|||||||
gatewayLog.getEndTime()).toMillis()));
|
gatewayLog.getEndTime()).toMillis()));
|
||||||
// 设置其它字段
|
// 设置其它字段
|
||||||
gatewayLog.setUserId(SecurityFrameworkUtils.getLoginUserId(exchange));
|
gatewayLog.setUserId(SecurityFrameworkUtils.getLoginUserId(exchange));
|
||||||
gatewayLog.setUserType(SecurityFrameworkUtils.getLoginUserType(exchange));
|
|
||||||
gatewayLog.setResponseHeaders(response.getHeaders());
|
gatewayLog.setResponseHeaders(response.getHeaders());
|
||||||
gatewayLog.setHttpStatus(response.getStatusCode());
|
gatewayLog.setHttpStatus(response.getStatusCode());
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.cf.imes.gateway.util;
|
package com.cf.imes.gateway.util;
|
||||||
|
|
||||||
import cn.hutool.core.map.MapUtil;
|
import cn.hutool.core.map.MapUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.cf.imes.framework.common.util.json.JsonUtils;
|
import com.cf.imes.framework.common.util.json.JsonUtils;
|
||||||
import com.cf.imes.gateway.filter.security.LoginUser;
|
import com.cf.imes.gateway.filter.security.LoginUser;
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
@@ -60,8 +61,10 @@ public class SecurityFrameworkUtils {
|
|||||||
* @param user 用户
|
* @param user 用户
|
||||||
*/
|
*/
|
||||||
public static void setLoginUser(ServerWebExchange exchange, LoginUser user) {
|
public static void setLoginUser(ServerWebExchange exchange, LoginUser user) {
|
||||||
exchange.getAttributes().put(LOGIN_USER_ID_ATTR, user.getId());
|
Long userId = user.getId();
|
||||||
exchange.getAttributes().put(LOGIN_USER_TYPE_ATTR, user.getUserType());
|
if (ObjectUtil.isNotNull(userId)) {
|
||||||
|
exchange.getAttributes().put(LOGIN_USER_ID_ATTR, userId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+7
@@ -256,6 +256,7 @@ public class WebCadOrderImportFactory {
|
|||||||
.brand(plateGoodDO.getBrand())
|
.brand(plateGoodDO.getBrand())
|
||||||
.price(0.00)
|
.price(0.00)
|
||||||
.deleted(false)
|
.deleted(false)
|
||||||
|
.organId(organId)
|
||||||
.build();
|
.build();
|
||||||
Long orderGoodsId = (Long) snowFlakeGenerator.nextId(null);
|
Long orderGoodsId = (Long) snowFlakeGenerator.nextId(null);
|
||||||
|
|
||||||
@@ -279,6 +280,7 @@ public class WebCadOrderImportFactory {
|
|||||||
.planId(0L)
|
.planId(0L)
|
||||||
.price(0.00)
|
.price(0.00)
|
||||||
.deleted(false)
|
.deleted(false)
|
||||||
|
.organId(organId)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
goodsDOS.add(goodsDO);
|
goodsDOS.add(goodsDO);
|
||||||
@@ -641,6 +643,7 @@ public class WebCadOrderImportFactory {
|
|||||||
.packageId(0L)
|
.packageId(0L)
|
||||||
.partsId(0L)
|
.partsId(0L)
|
||||||
.num(1.0)
|
.num(1.0)
|
||||||
|
.organId(organId)
|
||||||
.build();
|
.build();
|
||||||
orderItemDOS.add(orderItemDO);
|
orderItemDOS.add(orderItemDO);
|
||||||
}
|
}
|
||||||
@@ -658,6 +661,7 @@ public class WebCadOrderImportFactory {
|
|||||||
.packageId(0L)
|
.packageId(0L)
|
||||||
.partsId(0L)
|
.partsId(0L)
|
||||||
.num(1.0)
|
.num(1.0)
|
||||||
|
.organId(organId)
|
||||||
.build();
|
.build();
|
||||||
orderItemDOS.add(orderItemDO);
|
orderItemDOS.add(orderItemDO);
|
||||||
}
|
}
|
||||||
@@ -789,6 +793,7 @@ public class WebCadOrderImportFactory {
|
|||||||
.packageId(0L)
|
.packageId(0L)
|
||||||
.plateId(0L)
|
.plateId(0L)
|
||||||
.num(part.getNum())
|
.num(part.getNum())
|
||||||
|
.organId(organId)
|
||||||
.build();
|
.build();
|
||||||
orderItemDOS.add(orderItemDO);
|
orderItemDOS.add(orderItemDO);
|
||||||
}
|
}
|
||||||
@@ -804,6 +809,7 @@ public class WebCadOrderImportFactory {
|
|||||||
.packageId(0L)
|
.packageId(0L)
|
||||||
.plateId(0L)
|
.plateId(0L)
|
||||||
.num(partNum)
|
.num(partNum)
|
||||||
|
.organId(organId)
|
||||||
.build();
|
.build();
|
||||||
orderItemDOS.add(orderItemDO);
|
orderItemDOS.add(orderItemDO);
|
||||||
} else {
|
} else {
|
||||||
@@ -819,6 +825,7 @@ public class WebCadOrderImportFactory {
|
|||||||
.packageId(0L)
|
.packageId(0L)
|
||||||
.plateId(0L)
|
.plateId(0L)
|
||||||
.num(part.getNum())
|
.num(part.getNum())
|
||||||
|
.organId(organId)
|
||||||
.build();
|
.build();
|
||||||
orderItemDOS.add(orderItemDO);
|
orderItemDOS.add(orderItemDO);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user