??????????
????????Щ??????????2??????????????????????????????????????????
??????????????????????????????????
????????Bug????
??????????????????????????
public class UsedOnce {
public static enum ruleDetailsEnum {
SOURCEREGIN("?????")?? TARGETREGIN("???????")?? SOURCECITY("?????")?? TARGETCITY("??????")?? SOURCESITE("?????")??
TARGETSITE("??????")?? DEVICETYPE("?豸????");
private final String strValue;
private ruleDetailsEnum(String strValue){
this.strValue = strValue;
}
public String getStrValue() {
return strValue;
}
public static String getStrValueByName(String name) {
for (ruleDetailsEnum orderDeviceType : ruleDetailsEnum.values()) {
if (name.equals(orderDeviceType.name())) {
return orderDeviceType.getStrValue();
}
}
return null;
}
}
public static void main(String[] args) {
UsedOnce.ruleDetailsEnum e = UsedOnce.ruleDetailsEnum.valueOf("DEVICETYPE");
switch (e.ordinal()) {
case 0:
System.out.println("?????");
break;
case 6:
System.out.println("?豸????");
break;
default:
System.out.println("??????");
}
}
}
// ?????????豸????
???????????????????????
????JVM???л??浱????????????????
private Map<String?? String> getAssignRates() {
Date start = DateUtil.removeDays(new Date()?? 1);
String startTm = DateUtil.toString(start?? DateUtil.DATE_FORMAT);
String endTm = DateUtil.toString(DateUtil.removeDays(start?? 90)?? DateUtil.DATE_FORMAT);
List<LogisticsAtomic> list = new ArrayList<LogisticsAtomic>();
/* ??????JVM????;?????????;????????????? */
String now = DateUtil.toString(new Date()?? DateUtil.DATE_FORMAT);
Map<String?? List<LogisticsAtomic>> oneDayData = WorkOrderCst.ONEDAYDATA;if (oneDayData.keySet().contains(now)) {
list = oneDayData.get(now);
} else {
list = logisticsWorkOrderBo.getLogisticsList90DaysBefore(startTm?? endTm);
oneDayData.clear();
oneDayData.put(now?? list);
}
Map<String?? String> map = new HashMap<String?? String>();
for (LogisticsAtomic bean : list) {
if (null != bean.getSpId()) {
map.put(bean.getSpId().toString()?? bean.getAssetCounts().toString());
}
}
return map;
}
//??null???????JSONUtils.toJSONString(map);
//????null???????JSON.toJSONString(map);
????????????JVM???е?map????????????С?????????У????new???Map???????????JVM?????????????????JVM?У?????JVM????????????????仰??????????? JVM ?е????????? JVM ????? JVM ????????????java????????????????????jvm???棬??????????????????????????????????????????????????????redis?????????????*BoImpl???У?????????????????У??????????????????????????????????????????????????Map??
????public class WorkOrderCst {
????// ?????????
????public static Map<String?? List<LogisticsAtomic>> ONEDAYDATA = new ConcurrentHashMap<String?? List<LogisticsAtomic>>();
????// ???????????
????public static final String SiteSplit = "#@#";
????}