提交 76e5796d authored 作者: zhoushaopan's avatar zhoushaopan

fix(装备申请): 解决了传入不同型号显示的申请数量不一致

解决了传入不同型号显示的申请数量不一致
上级 b64e426e
......@@ -667,8 +667,9 @@ public class DeviceApplyController {
Map<String,Object> map = new HashMap<>();
List<String> models = packingLibraryService.findByIds(packingIds).stream().
map(PackingLibrary::getModel).distinct().collect(Collectors.toList());
List<DeviceLibrary> deviceLibraries = deviceLibraryService.findAllByPackingIdsIn(packingIds,
selectTryOutDeviceVo.getPageable());
List<DeviceLibrary> deviceLibraries = deviceLibraryService.findAllByPackingIdsIn(packingIds);
deviceLibraries = deviceLibraries.stream()
.filter(deviceLibrary -> deviceLibrary.getTryOutDevice() == 1).collect(Collectors.toList());
deviceLibraries.forEach(DeviceLibrary::setConfigName);
Map<String, List<DeviceLibrary>> modelMap = deviceLibraries.stream()
.collect(groupingBy(DeviceLibrary::getModel));
......
......@@ -222,6 +222,7 @@ public interface DeviceLibraryService {
* 通过列装id查询所有装备
*/
List<DeviceLibrary> findAllByPackingIdsIn(List<Integer> packingIds,Pageable pageable);
List<DeviceLibrary> findAllByPackingIdsIn(List<Integer> packingIds);
/**
* 根据partParentId查询附件
......
......@@ -661,10 +661,20 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
}
@Override
public List<DeviceLibrary> findAllByPackingIdsIn(List<Integer> packingIds,Pageable pageable) {
public List<DeviceLibrary> findAllByPackingIdsIn(List<Integer> packingIds, Pageable pageable) {
return deviceLibraryDao.findAllByPackingIdIn(packingIds,pageable);
}
@Override
public List<DeviceLibrary> findAllByPackingIdsIn(List<Integer> packingIds) {
return deviceLibraryDao.findAllByPackingIdIn(packingIds);
}
// @Override
// public List<DeviceLibrary> findAllByPackingIdsIn(List<Integer> packingIds,Pageable pageable) {
// return deviceLibraryDao.findAllByPackingIdIn(packingIds,pageable);
// }
@Override
public List<DeviceLibrary> findAllByPartParentId(Integer id) {
return deviceLibraryDao.findAllByPartParentId(id);
......
......@@ -4,16 +4,22 @@ package com.tykj.dev.device.packing.subject.vo;
import com.tykj.dev.misc.base.CustomPage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("查询可进行绑定的列装")
public class SelectPackingVo extends CustomPage {
@ApiModelProperty(value = "列装id")
private List<Integer> packingIds;
@ApiModelProperty(value = "是不是附件",notes = "0:不是,1:是")
private Integer isPart;
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论