mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-13 05:12:07 +08:00
1、创建订单消失修复;2、板件筛选失效修复;
This commit is contained in:
+5
@@ -33,6 +33,11 @@ public class OrderDO extends BaseDO {
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long organId;
|
||||
|
||||
/**
|
||||
* 顶级单号
|
||||
*/
|
||||
private Long rootId;
|
||||
|
||||
/**
|
||||
* 父单号
|
||||
*/
|
||||
|
||||
+19
-1
@@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
|
||||
@@ -221,9 +222,26 @@ public class OrderServiceImpl implements OrderService {
|
||||
order.setOrderType(getOrderType(parentId, createReqVO.getOrderType()));
|
||||
// 默认都是空单
|
||||
order.setStatus(OrderStatusEnum.EMPTY.getStatus());
|
||||
// 是否主单
|
||||
boolean isTop = ObjectUtil.equals(OrderTypeEnum.MAIN_ORDER.getStatus(), order.getOrderType());
|
||||
if (!isTop) {
|
||||
// 子单用父id
|
||||
order.setRootId(parentId);
|
||||
}
|
||||
|
||||
orderMapper.insert(order);
|
||||
Long insertId = order.getId();
|
||||
|
||||
if (isTop) {
|
||||
// 主单用自己
|
||||
order.setRootId(insertId);
|
||||
orderMapper.update(new LambdaUpdateWrapper<OrderDO>()
|
||||
.set(OrderDO::getRootId, insertId)
|
||||
.eq(OrderDO::getId, insertId)
|
||||
);
|
||||
}
|
||||
// 返回
|
||||
return order.getId();
|
||||
return insertId;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+2
-1
@@ -25,7 +25,7 @@
|
||||
<result property="plateId" column="plateId"/>
|
||||
<result property="orderId" column="orderId"/>
|
||||
<result property="id" column="goodsId"/>
|
||||
<result property="goodsId" column="goodsId"/>
|
||||
<result property="goodsId" column="plateGoodsId"/>
|
||||
<result property="plateNo" column="plateNo"/>
|
||||
<result property="customPlateNo" column="customPlateNo"/>
|
||||
<result property="name" column="name"/>
|
||||
@@ -529,6 +529,7 @@
|
||||
og.name AS processGroupName,
|
||||
oc.name AS componentName,
|
||||
|
||||
ogs.goods_id as plateGoodsId,
|
||||
ogs.goods_name as goodsName,
|
||||
ogs.color as color,
|
||||
ogs.material as material,
|
||||
|
||||
Reference in New Issue
Block a user