???????????????????
???????????? ???????[ 2014/8/1 16:09:50 ] ??????????????? ???????
?????????????????????????????????????????????????????????????????????????????e???????????????????????????????????????????????д??????????????????£?????????????????????????????д??Ч????????????????????????????????????????????????????????????????κι????????????????????????м????????е????????????????????????????????????????????????????????????????????????
????????????
??????????????У?????????????????????????????????????????Ч??????????????????Java??д??????????????????????????????????????????????Щ????????????????????????????????????????????????????????????????????????????????????????????
??????????2?????????????????????????????ɡ????????????????鼮?????????????????????Martin Fowler??????????????д??????????Joshua Kerievsky???????????????????????????μ???????????Щ????????е????????????????????????Щ?????????Щ??????????
??????????????????????????鹹????????????????????????????????????????????????????????????HR???(ticket)????IT??????????????????????HR?????IT????????????????????????????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????????
?????????????????????????????????????????????????????????????????????????????????????????ο???????????????о?????????????????????????п??ó?????????δ???????????(???????????????)???????????????????????????????????????????????????????????????????λ??????????д????????????????????????л??????????????????????????????????п??????????????????????
????class ResourceBreakdownService {
????public Map search (Session context) throws SearchException{
????//omitted twenty or so lines of code to pull search criteria out of context
????and verify them?? such as the below:
????if(resourceIds==null || resourceIds.size ()==0){
????throw new SearchException(“Resource list is not provided”);
????}
????if(resourceId!=null || resourceIds.size()>0){
????resourceObjs=resourceDAO.getResourceByIds(resourceIds);
????}
????//get workload for all requests
????Map requestBreakDown=getResourceRequestsLoadBreakdown (resourceObjs??startDate??
????finishDate);
????return requestBreakDown;
????}
????}
??????????????????δ???????ζ????????????????????????search???????????????????????????????Apache Commons????е?CollectionUtils.isEmpty()???????????????????????????????÷????????Map???????????Щ???
?????????????ζ????????????????????λ????????????????2??????????????????????????????????????????
????// get workload for all tickets
????Map ticketBreakdown =getResourceRequestsLoadBreakdown(resourceObjs??startDate??
????finishDate??ticketSeverity);
????Map result=new HashMap();
????for(Iterator i = resourceObjs.iterator(); i.hasNext();) {
????Resource resource=(Resource)i.next();
????Map requestBreakdown2=(Map)requestBreakdown.get(resource);
????List ticketBreakdown2=(List)ticketBreakdown.get(resource);
????Map resourceWorkloadBreakdown=combineRequestAndTicket(requestBreakdown2??
????ticketBreakdown2);
????result.put(resource??resourceWorkloadBreakdown)
????}
????return result;
?????????????????????????????????????κδ????????????????????δ????л???ζ???????????Map??????????Map????????????????????????????????????????????????澿????????????????????д???Щ?????????Map?е???????????????????????????????????
?????????????У?{} ???????Map??=> ???????????[] ????????????
????{resource with id 30000=> [
????SummaryOfActualWorkloadForRequestType??
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11