private Map<String, List<CreditContractSignSerial>> listGroup2MapTwo(List<CreditContractSignSerial> list) {
Map<String, List<CreditContractSignSerial>> userSignSerialMap = Maps.newConcurrentMap();
if (CollectionUtils.isNotEmpty(list)) {
// 分組
for (CreditContractSignSerial vo : list) {
String transDate = new SimpleDateFormat("yyyyMMdd").format(vo.getCreateTime());
List<CreditContractSignSerial> tempList = userSignSerialMap.get(transDate);
/*如果取不到數據,那么直接new一個空的ArrayList**/
if (tempList == null) {
tempList = Lists.newArrayList();
tempList.add(vo);
userSignSerialMap.put(transDate, tempList);
}
else {
/*某個vo之前已經存放過了,則直接追加數據到原來的List里**/
tempList.add(vo);
}
}
}
return userSignSerialMap;
}