mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
生产单excel导入问题修复:配件备注补充
This commit is contained in:
+24
-2
@@ -13,8 +13,30 @@ import lombok.Getter;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum OrderImportTmpDataTypeEnum {
|
public enum OrderImportTmpDataTypeEnum {
|
||||||
ORDER(0),
|
ORDER(0),
|
||||||
PLATE(1),
|
ROOM(1),
|
||||||
PART(2);
|
BODY(2),
|
||||||
|
GROUP(3),
|
||||||
|
GOODS(4),
|
||||||
|
PLATE(6),
|
||||||
|
PART(7),
|
||||||
|
PART_EDGING(8),
|
||||||
|
PART_HARDWARE(9),
|
||||||
|
PART_ASSEMBLY(10),
|
||||||
|
BLOCK_OUTLINE_POINT(11),
|
||||||
|
BLOCK_CUTTINGOUTLINE(12),
|
||||||
|
BLOCK_CUTTINGOUTLINE_POINT(13),
|
||||||
|
BLOCK_RAWOUTLINE_POINT(14),
|
||||||
|
BLOCK_HOLES(15),
|
||||||
|
BLOCK_HOLE(16),
|
||||||
|
BLOCK_GROOVES(17),
|
||||||
|
BLOCK_GROOVE(18),
|
||||||
|
BLOCK_GROOVE_OUTLINE_POINT(19),
|
||||||
|
BLOCK_GROOVE_POINTS_POINT(20),
|
||||||
|
BLOCK_GROOVE_ISLET(21),
|
||||||
|
BLOCK_GROOVE_ISLET_POINTS_POINT(22),
|
||||||
|
BLOCK_GROOVE_OFFSETLINE(23),
|
||||||
|
BLOCK_REMKAR(24),
|
||||||
|
PART_REMARK(25);
|
||||||
|
|
||||||
private int type;
|
private int type;
|
||||||
|
|
||||||
|
|||||||
+29
-2
@@ -990,12 +990,39 @@ public class DefaultExcelOrderImportFactory {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private OrderPartsDO createOrderParts(String goodsId, OrderImportTempDataGoodsGroupDO groupDO) {
|
private OrderPartsDO createOrderParts(String goodsId, OrderImportTempDataGoodsGroupDO groupDO) {
|
||||||
|
String remark = EMPTY_STRING;
|
||||||
|
// 查询配件下第一项,构建备注
|
||||||
|
OrderImportTempDataDO orderPartTempData = orderImportTempDataMapper.selectOne(new LambdaQueryWrapperX<OrderImportTempDataDO>()
|
||||||
|
.eq(OrderImportTempDataDO::getTaskId, taskId)
|
||||||
|
.eq(OrderImportTempDataDO::getType, PART_TYPE)
|
||||||
|
.eqIfPresent(OrderImportTempDataDO::getOuterGoodsId, goodsId)
|
||||||
|
.eqIfPresent(OrderImportTempDataDO::getGoodsName, groupDO.getGoodsName())
|
||||||
|
.eqIfPresent(OrderImportTempDataDO::getMaterial, groupDO.getMaterial())
|
||||||
|
.eqIfPresent(OrderImportTempDataDO::getColor, groupDO.getColor())
|
||||||
|
.eqIfPresent(OrderImportTempDataDO::getIsComposite, groupDO.getIsComposite())
|
||||||
|
.eqIfPresent(OrderImportTempDataDO::getCategory, groupDO.getCategory())
|
||||||
|
.eqIfPresent(OrderImportTempDataDO::getSubType, groupDO.getSubType())
|
||||||
|
.eqIfPresent(OrderImportTempDataDO::getFactory, groupDO.getFactory())
|
||||||
|
.eqIfPresent(OrderImportTempDataDO::getModel, groupDO.getModel())
|
||||||
|
.eqIfPresent(OrderImportTempDataDO::getSpec, groupDO.getSpec())
|
||||||
|
.eqIfPresent(OrderImportTempDataDO::getHeight, groupDO.getHeight())
|
||||||
|
.eqIfPresent(OrderImportTempDataDO::getWidth, groupDO.getWidth())
|
||||||
|
.eqIfPresent(OrderImportTempDataDO::getThickness, groupDO.getThickness())
|
||||||
|
.eqIfPresent(OrderImportTempDataDO::getUnit, groupDO.getUnit())
|
||||||
|
.eqIfPresent(OrderImportTempDataDO::getSort, groupDO.getSortn()));
|
||||||
|
if (ObjectUtil.isNotNull(orderPartTempData)) {
|
||||||
|
String detail = orderPartTempData.getDetail();
|
||||||
|
if (StringUtils.isNotEmpty(detail)) {
|
||||||
|
OrderPlateImportExcelVO combination = JSON.parseObject(JsonUtils.unzipString(detail), OrderPlateImportExcelVO.class);
|
||||||
|
remark = remarkExtract(combination.remarkJSON());
|
||||||
|
}
|
||||||
|
}
|
||||||
OrderPartsDO orderPartsDO = OrderPartsDO.builder()
|
OrderPartsDO orderPartsDO = OrderPartsDO.builder()
|
||||||
.id((Long) snowFlakeGenerator.nextId(null))
|
.id((Long) snowFlakeGenerator.nextId(null))
|
||||||
.orderId(orderId)
|
.orderId(orderId)
|
||||||
.color(groupDO.getColor())
|
.color(groupDO.getColor())
|
||||||
.category(groupDO.getCategory())
|
.category(groupDO.getCategory())
|
||||||
.type(StringUtils.isEmpty(groupDO.getSubType()) ? EMPTY_STRING: groupDO.getSubType())
|
.type(StringUtils.isEmpty(groupDO.getSubType()) ? EMPTY_STRING : groupDO.getSubType())
|
||||||
.goodsId(goodsId)
|
.goodsId(goodsId)
|
||||||
.length(Double.valueOf(StringUtils.isEmpty(groupDO.getHeight()) ? "0" : groupDO.getHeight()))
|
.length(Double.valueOf(StringUtils.isEmpty(groupDO.getHeight()) ? "0" : groupDO.getHeight()))
|
||||||
.width(Double.valueOf(StringUtils.isEmpty(groupDO.getWidth()) ? "0" : groupDO.getWidth()))
|
.width(Double.valueOf(StringUtils.isEmpty(groupDO.getWidth()) ? "0" : groupDO.getWidth()))
|
||||||
@@ -1009,7 +1036,7 @@ public class DefaultExcelOrderImportFactory {
|
|||||||
.factory(StringUtils.isNotEmpty(groupDO.getFactory()) ? groupDO.getFactory() : EMPTY_STRING)
|
.factory(StringUtils.isNotEmpty(groupDO.getFactory()) ? groupDO.getFactory() : EMPTY_STRING)
|
||||||
.unit(groupDO.getUnit()).price(0.0)
|
.unit(groupDO.getUnit()).price(0.0)
|
||||||
.subparts(EMPTY_STRING)
|
.subparts(EMPTY_STRING)
|
||||||
.remark(EMPTY_STRING)
|
.remark(remark)
|
||||||
.deleted(false).organId(organId)
|
.deleted(false).organId(organId)
|
||||||
.build();
|
.build();
|
||||||
orderPartsDO.setCreator(operatorName);
|
orderPartsDO.setCreator(operatorName);
|
||||||
|
|||||||
+2
-4
@@ -95,10 +95,8 @@
|
|||||||
width,
|
width,
|
||||||
thickness,
|
thickness,
|
||||||
unit,
|
unit,
|
||||||
brand
|
brand,
|
||||||
<if test="reqVO.doPaging">
|
min(sort) as sortn
|
||||||
,min(sort) as sortn
|
|
||||||
</if>
|
|
||||||
from order_import_temp_data
|
from order_import_temp_data
|
||||||
where task_id = #{reqVO.taskId} and type = #{reqVO.type} and outer_goods_id = #{reqVO.goodsId}
|
where task_id = #{reqVO.taskId} and type = #{reqVO.type} and outer_goods_id = #{reqVO.goodsId}
|
||||||
group by goods_name, material, color, is_composite, category, sub_type, factory, model, spec, height, width, thickness, unit, brand
|
group by goods_name, material, color, is_composite, category, sub_type, factory, model, spec, height, width, thickness, unit, brand
|
||||||
|
|||||||
Reference in New Issue
Block a user