mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
标签数据源数据查询接口参数,逻辑修改,查询配件数量SQL更改
This commit is contained in:
+2
@@ -29,6 +29,8 @@ public class ErrorCodeConstants {
|
||||
public static final ErrorCode PLATE_IS_PLAN = new ErrorCode(1_001_109_002, "删除对象中有已排单板件,请将该对象从排单中移除后再选择删除!");
|
||||
public static final ErrorCode ORDER_ERROR = new ErrorCode(1_001_109_003, "当前生产单柜体,房间已全部删除!");
|
||||
public static final ErrorCode ORDER_DATA_ERROR = new ErrorCode(1_001_109_004, "生产单/排单的数据已无法使用,请删除重新");
|
||||
public static final ErrorCode ORDER_PLAN_ID_NOT_NULL = new ErrorCode(1_001_109_005, "生产单或排单ID至少传入一个");
|
||||
public static final ErrorCode ORDER_PLAN_ID_IS_ONE = new ErrorCode(1_001_109_006, "生产单id与排单id与大板分类ID只能传一个");
|
||||
|
||||
// ========== 生产单 TODO 补充编号 ==========
|
||||
public static final ErrorCode MODULE_NOT_EXISTS = new ErrorCode(1_001_110_000, "模块不存在");
|
||||
|
||||
+20
-1
@@ -4,6 +4,9 @@ package com.cf.imes.module.executor.controller.admin.manage.pack.vo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 配件列表详情 Response VO")
|
||||
@Data
|
||||
public class OrderPartsRespVO {
|
||||
@@ -22,7 +25,7 @@ public class OrderPartsRespVO {
|
||||
private String spec;
|
||||
|
||||
@Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long num;
|
||||
private BigDecimal num;
|
||||
|
||||
@Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String unit;
|
||||
@@ -65,5 +68,21 @@ public class OrderPartsRespVO {
|
||||
private String subparts;
|
||||
|
||||
|
||||
@Schema(description = "数量-用于计算,不显示")
|
||||
private List<BigDecimal> count;
|
||||
|
||||
|
||||
@Schema(description = "房间-用于计算-不显示")
|
||||
private List<Long> roomId;
|
||||
|
||||
|
||||
@Schema(description = "柜体-用于计算-不显示")
|
||||
private List<Long> bodyId;
|
||||
|
||||
|
||||
@Schema(description = "加工组-用于计算-不显示")
|
||||
private List<Long> groupId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+22
-5
@@ -5,6 +5,7 @@ import com.cf.imes.module.executor.controller.admin.manage.pack.vo.GroupNameList
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 包裹详情 Response VO")
|
||||
@@ -21,13 +22,15 @@ public class PackageDetailsRespVO {
|
||||
@Schema(description = "柜体名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String cabinetName;
|
||||
|
||||
|
||||
@Schema(description = "板材ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long plateId;
|
||||
|
||||
@Schema(description = "板编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String plateNo;
|
||||
|
||||
@Schema(description = "自定义板编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String customPlateNo;
|
||||
|
||||
@Schema(description = "板名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String plateName;
|
||||
|
||||
@@ -64,16 +67,15 @@ public class PackageDetailsRespVO {
|
||||
@Schema(description = "加工组", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String processGroup;
|
||||
|
||||
|
||||
@Schema(description = "备注(板材和配件都要传递)", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String remark;
|
||||
|
||||
|
||||
@Schema(description = "加工组名称集合")
|
||||
private List<GroupNameList> processGroupNameList;
|
||||
|
||||
|
||||
|
||||
|
||||
@Schema(description = "配件名称-配件类型显示", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String name;
|
||||
|
||||
@@ -90,7 +92,7 @@ public class PackageDetailsRespVO {
|
||||
private String type;
|
||||
|
||||
@Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long num;
|
||||
private BigDecimal num;
|
||||
|
||||
@Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String unit;
|
||||
@@ -104,7 +106,6 @@ public class PackageDetailsRespVO {
|
||||
@Schema(description = "厂家", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String factory;
|
||||
|
||||
|
||||
@Schema(description = "配件颜色", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String partsColor;
|
||||
|
||||
@@ -124,4 +125,20 @@ public class PackageDetailsRespVO {
|
||||
private String subparts;
|
||||
|
||||
|
||||
|
||||
@Schema(description = "数量-用于计算-不显示")
|
||||
private List<BigDecimal> count;
|
||||
|
||||
|
||||
@Schema(description = "房间-用于计算-不显示")
|
||||
private List<Long> roomId;
|
||||
|
||||
|
||||
@Schema(description = "柜体-用于计算-不显示")
|
||||
private List<Long> bodyId;
|
||||
|
||||
|
||||
@Schema(description = "加工组-用于计算-不显示")
|
||||
private List<Long> groupId;
|
||||
|
||||
}
|
||||
|
||||
+8
-1
@@ -19,6 +19,10 @@ public class LabelOrderData {
|
||||
private String customOrderNo;
|
||||
|
||||
|
||||
@Schema(description = "订单状态")
|
||||
private Integer status;
|
||||
|
||||
|
||||
@Schema(description = "客户")
|
||||
private String customer;
|
||||
|
||||
@@ -47,7 +51,7 @@ public class LabelOrderData {
|
||||
private String splitter;
|
||||
|
||||
|
||||
@Schema(description = "生产单日期")
|
||||
@Schema(description = "订单日期")
|
||||
private LocalDateTime orderDate;
|
||||
|
||||
|
||||
@@ -55,5 +59,8 @@ public class LabelOrderData {
|
||||
private LocalDateTime deliveryDate;
|
||||
|
||||
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+24
-1
@@ -4,6 +4,9 @@ package com.cf.imes.module.executor.controller.admin.order.vo.order;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "标签对应的五金包裹数据源信息")
|
||||
@Data
|
||||
public class LabelOrderPartsData {
|
||||
@@ -38,12 +41,32 @@ public class LabelOrderPartsData {
|
||||
|
||||
|
||||
@Schema(description = "数量")
|
||||
private String count;
|
||||
private BigDecimal count;
|
||||
|
||||
|
||||
@Schema(description = "配件单位")
|
||||
private String partsUnit;
|
||||
|
||||
|
||||
@Schema(description = "配件类型")
|
||||
private String partsType;
|
||||
|
||||
|
||||
@Schema(description = "数量-用于计算-不显示")
|
||||
private List<BigDecimal> num;
|
||||
|
||||
|
||||
@Schema(description = "房间-用于计算-不显示")
|
||||
private List<Long> roomId;
|
||||
|
||||
|
||||
@Schema(description = "柜体-用于计算-不显示")
|
||||
private List<Long> bodyId;
|
||||
|
||||
|
||||
@Schema(description = "加工组-用于计算-不显示")
|
||||
private List<Long> groupId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+17
-1
@@ -44,7 +44,11 @@ public class LabelOrderPlateData {
|
||||
private String customPlateNo;
|
||||
|
||||
|
||||
@Schema(description = "板名称")
|
||||
@Schema(description = "板材名称-大板名称")
|
||||
private String goodsPlateName;
|
||||
|
||||
|
||||
@Schema(description = "板件名称-小板名称")
|
||||
private String plateName;
|
||||
|
||||
|
||||
@@ -56,6 +60,18 @@ public class LabelOrderPlateData {
|
||||
private String plateMaterial;
|
||||
|
||||
|
||||
@Schema(description = "大板长")
|
||||
private Double goodsPlateLength;
|
||||
|
||||
|
||||
@Schema(description = "大板宽")
|
||||
private Double goodsPlateWidth;
|
||||
|
||||
|
||||
@Schema(description = "大板厚")
|
||||
private Double goodsPlateThickness;
|
||||
|
||||
|
||||
@Schema(description = "板长")
|
||||
private Double plateLength;
|
||||
|
||||
|
||||
+13
-1
@@ -41,6 +41,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDateTime;
|
||||
@@ -264,7 +265,18 @@ public class PackServiceImpl implements PackService {
|
||||
@Override
|
||||
public List<OrderPartsRespVO> getPartsList(OrderPartsReqVO reqVO) {
|
||||
|
||||
return orderPartsMapper.selectPartsList(reqVO.getOrderId(), getUserOrganId());
|
||||
List<OrderPartsRespVO> orderPartsRespVOS = orderPartsMapper.selectPartsList(reqVO.getOrderId(), getUserOrganId());
|
||||
|
||||
orderPartsRespVOS.forEach(f->{
|
||||
f.setNum(f.getCount().stream().reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
|
||||
f.setCount(null);
|
||||
f.setBodyId(null);
|
||||
f.setRoomId(null);
|
||||
f.setGroupId(null);
|
||||
});
|
||||
|
||||
return orderPartsRespVOS;
|
||||
|
||||
}
|
||||
|
||||
|
||||
+11
@@ -15,6 +15,8 @@ import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import static com.cf.imes.framework.security.core.util.SecurityFrameworkUtils.getUserOrganId;
|
||||
|
||||
|
||||
@@ -43,6 +45,15 @@ public class ProductionStatusServiceImpl implements ProductionStatusService {
|
||||
return new PageResult<>();
|
||||
}
|
||||
|
||||
packageDetailsRespVOS.getRecords().forEach(f->{
|
||||
f.setNum(f.getCount().stream().reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
|
||||
f.setCount(null);
|
||||
f.setBodyId(null);
|
||||
f.setRoomId(null);
|
||||
f.setGroupId(null);
|
||||
});
|
||||
|
||||
return new PageResult<>(packageDetailsRespVOS.getRecords(), packageDetailsRespVOS.getTotal());
|
||||
|
||||
}
|
||||
|
||||
+3
-3
@@ -79,8 +79,7 @@ import static com.cf.imes.framework.common.exception.enums.GlobalErrorCodeConsta
|
||||
import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.cf.imes.framework.common.util.json.JsonUtils.*;
|
||||
import static com.cf.imes.framework.security.core.util.SecurityFrameworkUtils.getUserOrganId;
|
||||
import static com.cf.imes.module.executor.enums.ErrorCodeConstants.ORDER_NOT_EXISTS;
|
||||
import static com.cf.imes.module.executor.enums.ErrorCodeConstants.PLAN_NOT_EXISTS;
|
||||
import static com.cf.imes.module.executor.enums.ErrorCodeConstants.*;
|
||||
import static com.cf.imes.module.system.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
@@ -473,7 +472,7 @@ public class OptimizePlanServiceImpl implements OptimizePlanService {
|
||||
@Override
|
||||
public OrderSource getOrderSource(Long orderId, Long planId, Long machineId) {
|
||||
if (!Objects.isNull(orderId) && !Objects.isNull(planId)) {
|
||||
throw exception(154112, "生产单id与排单id与大板分类ID只能传一个");
|
||||
throw exception(ORDER_PLAN_ID_IS_ONE);
|
||||
}
|
||||
OrderSource orderSource;
|
||||
if (ObjectUtil.isNotNull(orderId)) {
|
||||
@@ -540,6 +539,7 @@ public class OptimizePlanServiceImpl implements OptimizePlanService {
|
||||
// 查询生产单对应的包裹信息
|
||||
List<PrintOrderPackReqVO> printOrderPackReqVOS = plateMapper.selectOrderPackList(orderId,getUserOrganId());
|
||||
|
||||
|
||||
if(CollUtil.isNotEmpty(printOrderPackReqVOS)) {
|
||||
// 统计每个订单的包装数量
|
||||
printOrderPackReqVOS
|
||||
|
||||
+55
-19
@@ -99,6 +99,7 @@ import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.e
|
||||
import static com.cf.imes.framework.security.core.util.SecurityFrameworkUtils.getUserOrganId;
|
||||
import static com.cf.imes.module.executor.enums.ErrorCodeConstants.*;
|
||||
import static com.cf.imes.module.infra.enums.ErrorCodeConstants.FILE_NOT_EXISTS;
|
||||
import static com.cf.imes.module.system.enums.ErrorCodeConstants.ORDER_PLAN_DATA_ERROR;
|
||||
|
||||
/**
|
||||
* 生产单表 order_{N} Service 实现类
|
||||
@@ -161,6 +162,14 @@ public class OrderServiceImpl implements OrderService {
|
||||
private CustomPlateNoGenerateService customPlateNoGenerateService;
|
||||
|
||||
|
||||
@Resource
|
||||
private PlanItemMapper planItemMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
private EsUtils esUtils;
|
||||
|
||||
|
||||
private static final String SUBMIT_STATE = "1"; // 空订单 原生产系统
|
||||
|
||||
public static final String ORDER_PLATE_MODEL = "imes_order_plate_model";
|
||||
@@ -1432,24 +1441,28 @@ public class OrderServiceImpl implements OrderService {
|
||||
}
|
||||
|
||||
|
||||
@Resource
|
||||
private PlanItemMapper planItemMapper;
|
||||
|
||||
|
||||
@Resource
|
||||
private EsUtils esUtils;
|
||||
|
||||
|
||||
@Override
|
||||
public OrderAllData getOrderAllData(Long orderId, Long planId) {
|
||||
|
||||
|
||||
if (Objects.isNull(orderId) && Objects.isNull(planId)) {
|
||||
throw exception(ORDER_PLAN_ID_NOT_NULL);
|
||||
}
|
||||
|
||||
if (!Objects.isNull(orderId) && !Objects.isNull(planId)) {
|
||||
throw exception(ORDER_PLAN_ID_IS_ONE);
|
||||
}
|
||||
|
||||
Long organId = getUserOrganId();
|
||||
|
||||
List<Long> orderIds = new ArrayList<>();
|
||||
|
||||
OrderAllData orderAllData = new OrderAllData();
|
||||
|
||||
List<OrderModelDO> orderModelDOS;
|
||||
|
||||
List<LabelOrderPlateData> labelOrderPlateData;
|
||||
|
||||
if(planId != null){
|
||||
@@ -1466,53 +1479,76 @@ public class OrderServiceImpl implements OrderService {
|
||||
// 板材信息
|
||||
labelOrderPlateData = planItemMapper.selectLabelOrderPlateDataByPlanId(planId,organId);
|
||||
|
||||
List<Long> plateIdList = labelOrderPlateData.stream().map(LabelOrderPlateData::getPlateId).distinct().toList();
|
||||
|
||||
// 小板造型信息
|
||||
orderModelDOS = esUtils.getEsDocument("orderId","plateId", orderIds,plateIdList, plateIdList.size(), OptimizePlanService.ORDER_PLATE_MODEL, OrderModelDO.class);
|
||||
|
||||
}else {
|
||||
|
||||
OrderDO orderDO = orderMapper.selectById(orderId);
|
||||
AssertUtils.notEmpty(orderDO,ORDER_NOT_EXISTS);
|
||||
|
||||
orderIds.add(orderId);
|
||||
|
||||
// 板材信息
|
||||
labelOrderPlateData = plateMapper.selectLabelOrderPlateDataByOrderId(orderId,organId);
|
||||
|
||||
Integer plateIdSize = labelOrderPlateData.stream().map(LabelOrderPlateData::getPlateId).distinct().toList().size();
|
||||
|
||||
orderModelDOS = esUtils.getEsDocument("orderId", orderIds, plateIdSize, OptimizePlanService.ORDER_PLATE_MODEL, OrderModelDO.class);
|
||||
}
|
||||
|
||||
|
||||
AssertUtils.notEmpty(orderIds,ORDER_PLAN_DATA_ERROR);
|
||||
|
||||
|
||||
// 生产单信息
|
||||
List<LabelOrderData> labelOrderData = orderMapper.selectLabelOrderData(orderIds, organId);
|
||||
|
||||
List<Long> packIds = labelOrderPlateData.stream().map(LabelOrderPlateData::getPackageNo).distinct().toList();
|
||||
|
||||
List<Long> plateIdList = labelOrderPlateData.stream().map(LabelOrderPlateData::getPlateId).distinct().toList();
|
||||
|
||||
|
||||
// 小板造型信息
|
||||
List<OrderModelDO> orderModelDOS = esUtils.getEsDocument("orderId","plateId", orderIds,plateIdList, plateIdList.size(), OptimizePlanService.ORDER_PLATE_MODEL, OrderModelDO.class);
|
||||
|
||||
// 配件信息
|
||||
List<LabelOrderPartsData> labelOrderPartsData = orderPartsMapper.selectLabelOrderPartsData(orderIds, organId);
|
||||
|
||||
// 包裹信息
|
||||
List<LabelOrderPackData> labelOrderPackData = orderPackageMapper.selectLabelOrderPackData(packIds, organId);
|
||||
labelOrderPartsData.forEach(f->{
|
||||
f.setCount(f.getNum().stream().reduce(BigDecimal.ZERO, BigDecimal::add));
|
||||
|
||||
labelOrderPackData.forEach(f-> f.setPackNum(f.getPackageId().size()));
|
||||
f.setNum(null);
|
||||
f.setBodyId(null);
|
||||
f.setRoomId(null);
|
||||
f.setGroupId(null);
|
||||
});
|
||||
|
||||
List<OrderPackageDO> packageDOS = orderPackageMapper.selectBatchIds(packIds);
|
||||
|
||||
if(CollUtil.isNotEmpty(packIds)) {
|
||||
// 包裹信息
|
||||
List<LabelOrderPackData> labelOrderPackData = orderPackageMapper.selectLabelOrderPackData(packIds, organId);
|
||||
|
||||
labelOrderPackData.forEach(f -> f.setPackNum(f.getPackageId().size()));
|
||||
|
||||
List<OrderPackageDO> packageDOS = orderPackageMapper.selectBatchIds(packIds);
|
||||
|
||||
labelOrderPlateData.forEach(f->f.setPackageSerialNo(packageDOS.stream().filter(o->o.getId().equals(f.getPackageNo())).findFirst().orElse(new OrderPackageDO()).getPackageNo()));
|
||||
|
||||
orderAllData.setPackDataList(labelOrderPackData);
|
||||
|
||||
}
|
||||
|
||||
labelOrderPlateData.forEach(f->{
|
||||
|
||||
f.setOrderDate(labelOrderData.stream().filter(o->o.getOrderNo().equals(f.getOrderId())).findFirst().orElse(new LabelOrderData()).getOrderDate());
|
||||
f.setDeliveryDate(labelOrderData.stream().filter(o->o.getOrderNo().equals(f.getOrderId())).findFirst().orElse(new LabelOrderData()).getDeliveryDate());
|
||||
f.setPackageSerialNo(packageDOS.stream().filter(o->o.getId().equals(f.getPackageNo())).findFirst().orElse(new OrderPackageDO()).getPackageNo());
|
||||
f.setCustomOrderNo(labelOrderData.stream().filter(o->o.getOrderNo().equals(f.getOrderId())).findFirst().orElse(new LabelOrderData()).getCustomOrderNo());
|
||||
|
||||
});
|
||||
|
||||
|
||||
orderAllData.setOrderList(labelOrderData);
|
||||
orderAllData.setPackDataList(labelOrderPackData);
|
||||
orderAllData.setPlateDataList(labelOrderPlateData);
|
||||
orderAllData.setPartsDataList(labelOrderPartsData);
|
||||
orderAllData.setPlateModels(orderModelDOS);
|
||||
|
||||
|
||||
return orderAllData;
|
||||
|
||||
}
|
||||
|
||||
+3
-1
@@ -612,6 +612,7 @@
|
||||
select distinct
|
||||
id as orderNo,
|
||||
custom_order_no as customOrderNo,
|
||||
status as status,
|
||||
dealer as dealer,
|
||||
dealer_phone_number as dealerPhoneNumber,
|
||||
customer as customer,
|
||||
@@ -620,7 +621,8 @@
|
||||
salesman as salesman,
|
||||
splitter as splitter,
|
||||
order_date as orderDate,
|
||||
delivery_date as deliveryDate
|
||||
delivery_date as deliveryDate,
|
||||
remark as remark
|
||||
|
||||
from orders
|
||||
|
||||
|
||||
+45
-11
@@ -273,7 +273,6 @@
|
||||
<result property="isComposite" column="isComposite"/>
|
||||
<result property="model" column="model"/>
|
||||
<result property="spec" column="spec"/>
|
||||
<result property="num" column="num"/>
|
||||
<result property="unit" column="unit"/>
|
||||
<result property="brand" column="brand"/>
|
||||
<result property="factory" column="factory"/>
|
||||
@@ -284,6 +283,11 @@
|
||||
<result property="partsThickness" column="partsThickness"/>
|
||||
<result property="category" column="category"/>
|
||||
<result property="subparts" column="subparts"/>
|
||||
|
||||
<collection property="count" ofType="java.math.BigDecimal" column="count"/>
|
||||
<collection property="roomId" ofType="java.lang.Long" column="roomId"/>
|
||||
<collection property="bodyId" ofType="java.lang.Long" column="bodyId"/>
|
||||
<collection property="groupId" ofType="java.lang.Long" column="groupId"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectParts"
|
||||
@@ -292,6 +296,7 @@
|
||||
|
||||
|
||||
select distinct
|
||||
oi.num as `count`,
|
||||
op.order_id as orderId,
|
||||
op.id as partsId,
|
||||
op.name as name,
|
||||
@@ -309,8 +314,7 @@
|
||||
op.length as partsLength,
|
||||
op.thickness as partsThickness,
|
||||
op.category as category,
|
||||
op.subparts as subparts,
|
||||
oi.num as num
|
||||
op.subparts as subparts
|
||||
|
||||
from order_parts op
|
||||
left join order_item oi on op.organ_id = oi.organ_id and op.order_id = oi.order_id and op.id = oi.parts_id
|
||||
@@ -329,11 +333,9 @@
|
||||
<result property="partsId" column="partsId"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="isComposite" column="isComposite"/>
|
||||
|
||||
<result property="name" column="name"/>
|
||||
<result property="model" column="model"/>
|
||||
<result property="spec" column="spec"/>
|
||||
<result property="num" column="num"/>
|
||||
<result property="unit" column="unit"/>
|
||||
<result property="brand" column="brand"/>
|
||||
<result property="factory" column="factory"/>
|
||||
@@ -344,6 +346,12 @@
|
||||
<result property="partsThickness" column="partsThickness"/>
|
||||
<result property="category" column="category"/>
|
||||
<result property="subparts" column="subparts"/>
|
||||
|
||||
<collection property="count" ofType="java.math.BigDecimal" column="count"/>
|
||||
<collection property="roomId" ofType="java.lang.Long" column="roomId"/>
|
||||
<collection property="bodyId" ofType="java.lang.Long" column="bodyId"/>
|
||||
<collection property="groupId" ofType="java.lang.Long" column="groupId"/>
|
||||
|
||||
</resultMap>
|
||||
<select id="selectPartsList"
|
||||
parameterType="java.lang.Long"
|
||||
@@ -351,11 +359,14 @@
|
||||
|
||||
|
||||
select distinct
|
||||
oi.num as `count`,
|
||||
oi.room_id as roomId,
|
||||
oi.body_id as bodyId,
|
||||
oi.group_id as groupId,
|
||||
op.id as partsId,
|
||||
op.name,
|
||||
op.model,
|
||||
op.spec,
|
||||
oi.num as num,
|
||||
op.unit,
|
||||
op.brand,
|
||||
op.factory,
|
||||
@@ -367,6 +378,7 @@
|
||||
op.category as category,
|
||||
op.subparts as subparts,
|
||||
op.type
|
||||
|
||||
from order_parts op
|
||||
left join order_item oi on op.organ_id = oi.organ_id and op.order_id = oi.order_id and op.id = oi.parts_id
|
||||
|
||||
@@ -375,12 +387,36 @@
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<resultMap id="LabelPartsMap" type="com.cf.imes.module.executor.controller.admin.order.vo.order.LabelOrderPartsData">
|
||||
|
||||
<result property="partsId" column="partsId"/>
|
||||
<result property="orderNo" column="orderNo"/>
|
||||
<result property="partsName" column="partsName"/>
|
||||
<result property="model" column="model"/>
|
||||
<result property="factory" column="factory"/>
|
||||
<result property="brand" column="brand"/>
|
||||
<result property="spec" column="spec"/>
|
||||
<result property="partsUnit" column="partsUnit"/>
|
||||
<result property="partsType" column="partsType"/>
|
||||
|
||||
<collection property="num" ofType="java.math.BigDecimal" column="num"/>
|
||||
<collection property="roomId" ofType="java.lang.Long" column="roomId"/>
|
||||
<collection property="bodyId" ofType="java.lang.Long" column="bodyId"/>
|
||||
<collection property="groupId" ofType="java.lang.Long" column="groupId"/>
|
||||
|
||||
</resultMap>
|
||||
|
||||
<select id="selectLabelOrderPartsData"
|
||||
resultType="com.cf.imes.module.executor.controller.admin.order.vo.order.LabelOrderPartsData">
|
||||
parameterType="java.lang.Long"
|
||||
resultMap="LabelPartsMap">
|
||||
|
||||
|
||||
select distinct
|
||||
|
||||
oi.num as num,
|
||||
oi.room_id as roomId,
|
||||
oi.body_id as bodyId,
|
||||
oi.group_id as groupId,
|
||||
op.id as partsId,
|
||||
op.order_id as orderNo,
|
||||
op.name as partsName,
|
||||
@@ -389,7 +425,7 @@
|
||||
op.brand as brand,
|
||||
op.spec as spec,
|
||||
op.unit as partsUnit,
|
||||
count(oi.num) as `count`
|
||||
op.type as partsType
|
||||
|
||||
from order_parts op
|
||||
join order_item oi on op.organ_id = oi.organ_id and op.order_id = oi.order_id and op.id = oi.parts_id
|
||||
@@ -401,8 +437,6 @@
|
||||
#{orderIds}
|
||||
</foreach>
|
||||
|
||||
group by op.id,op.order_id,op.name,op.model,op.factory,op.brand,op.spec,op.unit
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
+6
@@ -469,12 +469,18 @@
|
||||
ogs.material as plateMaterial,
|
||||
op.id as plateId,
|
||||
op.order_id as orderId,
|
||||
ogs.goods_name as goodsPlateName,
|
||||
op.name as plateName,
|
||||
op.plate_no as plateNo,
|
||||
op.custom_plate_no as customPlateNo,
|
||||
|
||||
op.width as plateWidth,
|
||||
op.height as plateLength,
|
||||
op.thickness as plateThickness,
|
||||
ogs.width as goodsPlateWidth,
|
||||
ogs.height as goodsPlateLength,
|
||||
ogs.thickness as goodsPlateThickness,
|
||||
|
||||
op.split_width as splitWidth,
|
||||
op.split_height as splitHeight,
|
||||
op.split_thickness as splitThickness,
|
||||
|
||||
+9
@@ -897,6 +897,7 @@
|
||||
ob.name as bodyName,
|
||||
op.id as plateId,
|
||||
op.plate_no as plateNo,
|
||||
op.custom_plate_no as customPlateNo,
|
||||
op.name as plateName,
|
||||
ogs.material as plateMaterial,
|
||||
ogs.color as plateColor,
|
||||
@@ -941,6 +942,7 @@
|
||||
ob.room_name as roomName,
|
||||
ob.name as bodyName,
|
||||
op.plate_no as plateNo,
|
||||
op.custom_plate_no as customPlateNo,
|
||||
op.id as plateId,
|
||||
op.name as plateName,
|
||||
ogs.material as plateMaterial,
|
||||
@@ -984,12 +986,18 @@
|
||||
ogs.material as plateMaterial,
|
||||
op.id as plateId,
|
||||
op.order_id as orderId,
|
||||
ogs.goods_name as goodsPlateName,
|
||||
op.name as plateName,
|
||||
op.plate_no as plateNo,
|
||||
op.custom_plate_no as customPlateNo,
|
||||
|
||||
op.width as plateWidth,
|
||||
op.height as plateLength,
|
||||
op.thickness as plateThickness,
|
||||
ogs.width as goodsPlateWidth,
|
||||
ogs.height as goodsPlateLength,
|
||||
ogs.thickness as goodsPlateThickness,
|
||||
|
||||
op.split_width as splitWidth,
|
||||
op.split_height as splitHeight,
|
||||
op.split_thickness as splitThickness,
|
||||
@@ -1017,6 +1025,7 @@
|
||||
<result property="cabinetName" column="bodyName"/>
|
||||
<result property="plateId" column="plateId"/>
|
||||
<result property="plateNo" column="plateNo"/>
|
||||
<result property="customPlateNo" column="customPlateNo"/>
|
||||
<result property="plateName" column="plateName"/>
|
||||
<result property="material" column="plateMaterial"/>
|
||||
<result property="color" column="palteColor"/>
|
||||
|
||||
+5
@@ -343,6 +343,7 @@ public class ErrorCodeConstants {
|
||||
public static final ErrorCode PART_PACK_DATA_ERROR = new ErrorCode(1_002_041_051, "当前包裹数据为空,无法进行操作,请删除包裹");
|
||||
public static final ErrorCode PLAN_IS_OPERATOR = new ErrorCode(1_002_041_052, "当前排单正在被用户:{} 操作,无法继续操作");
|
||||
public static final ErrorCode PLAN_IS_OPERATOR_NOT = new ErrorCode(1_002_041_053, "排单:{} ,正在被用户:{} 操作,无法继续操作");
|
||||
public static final ErrorCode ORDER_PLAN_DATA_ERROR = new ErrorCode(1_002_041_054, "生产单/排单数据有误,请查看对应的数据");
|
||||
|
||||
|
||||
|
||||
@@ -415,6 +416,10 @@ public class ErrorCodeConstants {
|
||||
public static final ErrorCode ORGAN_AMOUNT_NO_EXIST = new ErrorCode(1_002_043_001, "当前组织无资金管理");
|
||||
public static final ErrorCode INVOICE_NO_EXIST = new ErrorCode(1_002_043_002, "当前发票记录有误,请重新查看");
|
||||
public static final ErrorCode INVOICING_REJECT_REASON = new ErrorCode(1_002_043_003, "请填写拒绝开票原因");
|
||||
public static final ErrorCode INVOICE_FILE_IS_NULL = new ErrorCode(1_002_043_004, "发票附件不存在,请重新上传");
|
||||
public static final ErrorCode INVOICE_FILE_UPLOAD_FAILED = new ErrorCode(1_002_043_005, "发票附件上传失败,请重新上传");
|
||||
public static final ErrorCode INVOICE_FILE_IS_NULL_NOT_DOWNLOAD = new ErrorCode(1_002_043_006, "发票附件不存在,无法下载");
|
||||
public static final ErrorCode INVOICE_FILE_DATA_ERROR = new ErrorCode(1_002_043_007, "发票附件下载失败,请重新下载或稍等重试");
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-8
@@ -413,15 +413,8 @@ public class MachineServiceImpl implements MachineService {
|
||||
// 对机台的配置进行解压
|
||||
machineDO.setSetting(JsonUtils.unzipString(machineDO.getSetting()));
|
||||
|
||||
Long brandId = machineDO.getBrandId();
|
||||
return MachineConvert.convert(machineDO);
|
||||
|
||||
MachineBrandDO machineBrandDO = machineBrandMapper.selectById(brandId);
|
||||
|
||||
CuttingRespVO respVO = MachineConvert.convert(machineDO);
|
||||
|
||||
respVO.setBrand(machineBrandDO.getBrand());
|
||||
|
||||
return respVO;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user