提交 51035bb2 authored 作者: 邓砥奕's avatar 邓砥奕

修改bug

上级 0f7d84d5
......@@ -13,11 +13,6 @@
<groupId>com.tykj.dev</groupId>
<artifactId>device-task</artifactId>
</dependency>
<dependency>
<groupId>com.tykj.dev</groupId>
<artifactId>device-storage</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<artifactId>device-library</artifactId>
......
......@@ -6,7 +6,6 @@ import com.tykj.dev.device.library.repository.DeviceLibraryDao;
import com.tykj.dev.device.library.service.DeviceLibraryService;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.library.subject.vo.DeviceLibrarySelectVo;
import com.tykj.dev.device.storage.subject.domin.StorageBill;
import com.tykj.dev.device.task.subject.vo.BussinessLogVo;
import com.tykj.dev.device.user.subject.service.UserPublicService;
import com.tykj.dev.device.user.util.UserUtils;
......@@ -61,18 +60,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
@Override
public Page<DeviceLibrary> getTagPage(DeviceLibrarySelectVo deviceLibrarySelectVo, Pageable pageable) {
Page<DeviceLibrary> page = deviceLibraryDao.findAll(getSelectSpecification7(deviceLibrarySelectVo),deviceLibrarySelectVo.getPageable());
// for (DeviceLibrary d:page.getContent()) {
// Integer storageBillId = d.getStorageBillId();
// Integer userAID = storageBillService.getOne(storageBillId).getReceiveUserAId();
// Integer userBID = storageBillService.getOne(storageBillId).getReceiveUserBId();
// String user = userPublicService.getOne(userAID).getName();
// String user2 = userPublicService.getOne(userBID).getName();
// d.setStorageProcessingUser(user);
// d.setStorageConfirmUser(user2);
// deviceLibraryDao.save(d);
// }
return page;
return deviceLibraryDao.findAll(getSelectSpecification4(deviceLibrarySelectVo),deviceLibrarySelectVo.getPageable());
}
@Override
......@@ -445,19 +433,6 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
return predicateBuilder.build();
}
private Specification<DeviceLibrary> getSelectSpecification7(DeviceLibrarySelectVo deviceLibrarySelectVo){
PredicateBuilder<DeviceLibrary> predicateBuilder = getPredicateBuilder(deviceLibrarySelectVo);
PredicateBuilder<StorageBill> p = Specifications.and();
if (deviceLibrarySelectVo.getUserAId()!=null){
p.eq("receiveUserAId",deviceLibrarySelectVo.getUserAId());
}
if (deviceLibrarySelectVo.getUserBId()!=null){
p.eq("receiveUserBId",deviceLibrarySelectVo.getUserBId());
}
predicateBuilder.predicate(p.build());
return predicateBuilder.build();
}
private Specification<DeviceLibrary> getAllotSelectSpecification(DeviceLibrarySelectVo deviceLibrarySelectVo){
PredicateBuilder<DeviceLibrary> predicateBuilder = getPredicateBuilder(deviceLibrarySelectVo);
String unit = userUtils.getCurrentUserUnitName();
......
package com.tykj.dev.device.library.subject.vo;
import com.tykj.dev.device.devicelibrary.subject.entity.domin.DeviceLibraryEntity;
import com.tykj.dev.device.devicelibrary.subject.entity.domin.DeviceLogEntity;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.library.subject.domin.DeviceLog;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.springframework.stereotype.Repository;
......@@ -16,9 +16,9 @@ import java.util.List;
@Repository
public class DeviceDetailVo {
private List<DeviceLibraryEntity> deviceList;
private List<DeviceLibrary> deviceList;
private List<DeviceLogEntity> deviceLogEntityList;
private List<DeviceLog> deviceLogEntityList;
private String imageName;
......
......@@ -52,7 +52,7 @@ public class StringSplitUtil {
public static String idListToString(List<Integer> list){
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("x");
if (list.size()>0) {
if (list!=null&&list.size()>0) {
list.forEach(integer -> {
stringBuffer.append(integer);
stringBuffer.append("x");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论