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