项目评估流程排序问题
This commit is contained in:
+1
-2
@@ -55,8 +55,7 @@ public class SarPublicIdeaServiceImpl extends ServiceImpl<SarPublicIdeaDao, SarP
|
|||||||
} else {
|
} else {
|
||||||
list.like(StringUtils.isNotEmpty(category), "category", category)
|
list.like(StringUtils.isNotEmpty(category), "category", category)
|
||||||
.like(StringUtils.isNotEmpty(cname), "cname", cname)
|
.like(StringUtils.isNotEmpty(cname), "cname", cname)
|
||||||
.ge(start != null, "start_time", start)
|
.ge("end_time", new Date())
|
||||||
.le(end != null, "end_time", end)
|
|
||||||
.orderByAsc("end_time");
|
.orderByAsc("end_time");
|
||||||
}
|
}
|
||||||
Page<SarPublicIdea> page = new Page<>(p, size);
|
Page<SarPublicIdea> page = new Page<>(p, size);
|
||||||
|
|||||||
+30
-3
@@ -19,8 +19,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -193,7 +192,35 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
|
|||||||
}
|
}
|
||||||
|
|
||||||
public List<SarStandItemsDto> findAllItems(String type,String[] ids){
|
public List<SarStandItemsDto> findAllItems(String type,String[] ids){
|
||||||
return dao.selectAllItemsByIds(type,ids);
|
List<SarStandItemsDto> list=dao.selectAllItemsByIds(type,ids);
|
||||||
|
List<SarStandItemsDto> res=new ArrayList<>();
|
||||||
|
if (null == list || list.isEmpty()){
|
||||||
|
return list;
|
||||||
|
}else {
|
||||||
|
List<Integer> integerList=new ArrayList<>();
|
||||||
|
Map<Integer,List<SarStandItemsDto>> map=new HashMap<>();
|
||||||
|
list.forEach(sarStandItemsDto -> {
|
||||||
|
int a= sarStandItemsDto.getItemsNum().indexOf(".");
|
||||||
|
String mark=sarStandItemsDto.getItemsNum();
|
||||||
|
if (a>0){
|
||||||
|
mark=mark.substring(0,a);
|
||||||
|
}
|
||||||
|
if (null != map.get(Integer.valueOf(mark))){
|
||||||
|
map.get(Integer.valueOf(mark)).add(sarStandItemsDto);
|
||||||
|
}else {
|
||||||
|
integerList.add(Integer.valueOf(mark));
|
||||||
|
List<SarStandItemsDto> middle=new ArrayList<>();
|
||||||
|
middle.add(sarStandItemsDto);
|
||||||
|
map.put(Integer.valueOf(mark),middle);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Collections.sort(integerList);
|
||||||
|
integerList.forEach(integer -> {
|
||||||
|
res.addAll(map.get(integer));
|
||||||
|
});
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -742,6 +742,7 @@
|
|||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
order by ITEMS_NUM
|
||||||
</select>
|
</select>
|
||||||
<select id="selectStandTime" resultType="com.adc.da.slrs.sarStandItems.entity.StandsTimeDto">
|
<select id="selectStandTime" resultType="com.adc.da.slrs.sarStandItems.entity.StandsTimeDto">
|
||||||
select STAND_ID,XCXSSRQ,ZCCSSRQ
|
select STAND_ID,XCXSSRQ,ZCCSSRQ
|
||||||
|
|||||||
Reference in New Issue
Block a user