提交 f4807ed6 authored 作者: zjm's avatar zjm

fix(单位模块): 存放位置添加序列号字段 以及查询接口根据排序字段进行排序

存放位置添加序列号字段 以及查询接口根据排序字段进行排序
上级 e882ac99
......@@ -23,5 +23,5 @@ public class UnitStoreLocationVo {
private Integer unitId;
@ApiModelProperty(value = "类型名称", name = "typeName", example = "12321L")
private String typeName;
private String typeName="";
}
......@@ -23,8 +23,6 @@ import javax.persistence.Entity;
@Data
@Entity
@ApiModel(value = "单位对象", description = "单位详细信息")
@Where(clause = "id_del = 0")
@SQLDelete(sql = "update user set id_del = 1 where id = ?")
public class UnitStoreLocation extends BaseEntity {
private Integer unitId;
......@@ -36,5 +34,7 @@ public class UnitStoreLocation extends BaseEntity {
@Column(name = "des",columnDefinition = "TEXT")
private String des;
private Integer showOrder;
}
......@@ -55,4 +55,9 @@ public interface UserPublicService {
*/
List<Integer> findAllUnitIdByAreaId(Integer areaId);
/*新的区域查询接口*/
List<Units> accordingExhibitionIdAllUnits(Integer exhibitionId);
}
......@@ -7,6 +7,7 @@ import com.tykj.dev.device.user.subject.service.UnitStoreLocationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
......@@ -35,6 +36,7 @@ public class UnitStoreLocationServiceImpl implements UnitStoreLocationService {
return unitStoreLocationDao.findAllByUnitIdAndTypeName(unitId,"存放位置")
.stream()
.sorted(Comparator.comparing(UnitStoreLocation::getShowOrder))
.collect(Collectors.toMap(UnitStoreLocation::getId,UnitStoreLocation::getStoreName));
}
......@@ -50,7 +52,8 @@ public class UnitStoreLocationServiceImpl implements UnitStoreLocationService {
@Override
public List<UnitStoreLocation> findAll() {
return unitStoreLocationDao.findAll();
return unitStoreLocationDao.findAll().stream().sorted(Comparator.comparing(UnitStoreLocation::getShowOrder))
.collect(Collectors.toList());
}
@Override
......
......@@ -46,6 +46,9 @@ public class UserPublicServiceImpl implements UserPublicService {
@Autowired
UnitsCache unitsCache;
// @Autowired
// AreaExhibitionServiceImpl
@Autowired
UnitsService unitsService;
......@@ -130,6 +133,16 @@ public class UserPublicServiceImpl implements UserPublicService {
}
@Override
public List<Units> accordingExhibitionIdAllUnits(Integer exhibitionId) {
return null;
}
@Override
public String findUnitsNameByUserId(Integer userId) {
User resultEntity = userCache.findById(userId);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论