mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
禅道bug#1649修复
This commit is contained in:
+1
-1
@@ -126,7 +126,7 @@ public class PackController {
|
||||
@PostMapping("/scan/correlation")
|
||||
@Operation(summary = "查询扫描类型相关的板件+配件id")
|
||||
@PreAuthorize("@ss.hasPermission('manage:pack:query')")
|
||||
public CommonResult<List<Long>> getComponentCorrelation(@Valid @RequestBody PackScanComponentCorrelationReqVO reqVO) {
|
||||
public CommonResult<List<String>> getComponentCorrelation(@Valid @RequestBody PackScanComponentCorrelationReqVO reqVO) {
|
||||
return success(packService.getComponentCorrelation(reqVO));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ public class PackScanComponentCorrelationReqVO {
|
||||
|
||||
@Schema(description = "扫描本体编号")
|
||||
@NotNull(message = "扫描本体编号不能为空")
|
||||
private Long id;
|
||||
private String id;
|
||||
|
||||
@InEnum(OrderItemTypeEnum.class)
|
||||
@Schema(description = "扫描本体类型")
|
||||
|
||||
+2
-2
@@ -282,7 +282,7 @@ public interface OrderItemMapper extends BaseMapperX<OrderItemDO> {
|
||||
* @param groupIds
|
||||
* @return
|
||||
*/
|
||||
List<Long> selectComponentCorrelationPlateIds(@Param("orderIds") List<Long> orderIds, @Param("componentIds") List<Long> componentIds, @Param("groupIds") List<Long> groupIds);
|
||||
List<String> selectComponentCorrelationPlateIds(@Param("orderIds") List<Long> orderIds, @Param("componentIds") List<Long> componentIds, @Param("groupIds") List<Long> groupIds);
|
||||
|
||||
/**
|
||||
* 查询部件关联的部件ID列表
|
||||
@@ -292,7 +292,7 @@ public interface OrderItemMapper extends BaseMapperX<OrderItemDO> {
|
||||
* @param groupIds
|
||||
* @return
|
||||
*/
|
||||
List<Long> selectComponentCorrelationPartsIds(@Param("orderIds") List<Long> orderIds, @Param("componentIds") List<Long> componentIds, @Param("groupIds") List<Long> groupIds);
|
||||
List<String> selectComponentCorrelationPartsIds(@Param("orderIds") List<Long> orderIds, @Param("componentIds") List<Long> componentIds, @Param("groupIds") List<Long> groupIds);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@ public interface PackService {
|
||||
* @param reqVO
|
||||
* @return
|
||||
*/
|
||||
List<Long> getComponentCorrelation(PackScanComponentCorrelationReqVO reqVO);
|
||||
List<String> getComponentCorrelation(PackScanComponentCorrelationReqVO reqVO);
|
||||
|
||||
/**
|
||||
* 获取订单列表下未打包的明细
|
||||
|
||||
+7
-6
@@ -1015,14 +1015,14 @@ public class PackServiceImpl implements PackService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Long> getComponentCorrelation(PackScanComponentCorrelationReqVO reqVO) {
|
||||
public List<String> getComponentCorrelation(PackScanComponentCorrelationReqVO reqVO) {
|
||||
// 进来是板用的是板编号,配件用的是配件id
|
||||
Long id = reqVO.getId();
|
||||
String id = reqVO.getId();
|
||||
Integer itemType = reqVO.getItemType();
|
||||
Integer type = reqVO.getType();
|
||||
List<Long> orderIds = reqVO.getOrderIds();
|
||||
// 没有归属部件返回自己本身
|
||||
List<Long> self = List.of(id);
|
||||
List<String> self = List.of(id);
|
||||
|
||||
List<OrderItemDO> itemDOS;
|
||||
if (com.cf.imes.module.executor.enums.OrderItemTypeEnum.PLATE_ITEM.getStatus().equals(itemType)) {
|
||||
@@ -1032,11 +1032,12 @@ public class PackServiceImpl implements PackService {
|
||||
// 查询关联部件id
|
||||
itemDOS = orderItemService.getPlateItemCompId(plate.getId());
|
||||
} else {
|
||||
Long partsId = Long.valueOf(id);
|
||||
// 配件
|
||||
OrderPartsDO part = orderPartsService.getPart(id);
|
||||
OrderPartsDO part = orderPartsService.getPart(partsId);
|
||||
AssertUtils.notEmpty(part, ORDER_PARTS_NOT_EXISTS);
|
||||
// 查询关联部件id
|
||||
itemDOS = orderItemService.getPartItemCompId(id);
|
||||
itemDOS = orderItemService.getPartItemCompId(partsId);
|
||||
}
|
||||
|
||||
if (ObjectUtil.isEmpty(itemDOS)) {
|
||||
@@ -1066,7 +1067,7 @@ public class PackServiceImpl implements PackService {
|
||||
}
|
||||
|
||||
// 是否勾选了加工组
|
||||
List<Long> componentIdsCorrelationItemIds = orderItemService.getComponentIdsCorrelationItemIds(orderIds, componentIdList, groupIds);
|
||||
List<String> componentIdsCorrelationItemIds = orderItemService.getComponentIdsCorrelationItemIds(orderIds, componentIdList, groupIds);
|
||||
if (CollUtil.isEmpty(componentIdsCorrelationItemIds)) {
|
||||
return self;
|
||||
}
|
||||
|
||||
+1
-1
@@ -34,5 +34,5 @@ public interface OrderItemService {
|
||||
* @param orderIds
|
||||
* @return
|
||||
*/
|
||||
List<Long> getComponentIdsCorrelationItemIds(List<Long> orderIds, List<Long> componentIds, List<Long> groupIds);
|
||||
List<String> getComponentIdsCorrelationItemIds(List<Long> orderIds, List<Long> componentIds, List<Long> groupIds);
|
||||
}
|
||||
+2
-2
@@ -44,8 +44,8 @@ public class OrderItemServiceImpl implements OrderItemService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Long> getComponentIdsCorrelationItemIds(List<Long> orderIds, List<Long> componentIds, List<Long> groupIds) {
|
||||
List<Long> resultList = new ArrayList<>();
|
||||
public List<String> getComponentIdsCorrelationItemIds(List<Long> orderIds, List<Long> componentIds, List<Long> groupIds) {
|
||||
List<String> resultList = new ArrayList<>();
|
||||
if (CollUtil.isEmpty(componentIds) && CollUtil.isEmpty(groupIds)) {
|
||||
return resultList;
|
||||
}
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ public interface PlateService {
|
||||
* @param orderIds
|
||||
* @return
|
||||
*/
|
||||
PlateDO getPlateByNo(Long plateNo, Long... orderIds);
|
||||
PlateDO getPlateByNo(String plateNo, Long... orderIds);
|
||||
|
||||
/**
|
||||
* 创建订单板件
|
||||
|
||||
+1
-1
@@ -164,7 +164,7 @@ public class PlateServiceImpl implements PlateService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlateDO getPlateByNo(Long plateNo, Long... orderIds) {
|
||||
public PlateDO getPlateByNo(String plateNo, Long... orderIds) {
|
||||
return plateMapper.selectOne(new LambdaQueryWrapperX<PlateDO>()
|
||||
.eq(PlateDO::getPlateNo, plateNo)
|
||||
.inIfPresent(PlateDO::getOrderId, orderIds)
|
||||
|
||||
+2
-2
@@ -730,7 +730,7 @@
|
||||
ORDER BY op.type, op.id
|
||||
</select>
|
||||
|
||||
<select id="selectComponentCorrelationPlateIds" resultType="java.lang.Long">
|
||||
<select id="selectComponentCorrelationPlateIds" resultType="java.lang.String">
|
||||
SELECT DISTINCT op.plate_no
|
||||
FROM order_item oi
|
||||
JOIN order_plate op
|
||||
@@ -765,7 +765,7 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectComponentCorrelationPartsIds" resultType="java.lang.Long">
|
||||
<select id="selectComponentCorrelationPartsIds" resultType="java.lang.String">
|
||||
SELECT oi.parts_id
|
||||
FROM order_item oi
|
||||
WHERE oi.parts_id != 0
|
||||
|
||||
Reference in New Issue
Block a user