| | |
| | | String[] rotaPersonArray = rotaPerson.split(","); |
| | | for (int i = 0; i <= rotaPersonArray.length - 1; i++){ |
| | | ComSwRotaPersonVO comSwRotaPersonVO = new ComSwRotaPersonVO(); |
| | | Map<String,String> person = comSwPatrolRecordDAO.getPbServiceTeamById(rotaPersonArray[i]); |
| | | comSwRotaPersonVO.setId(Long.valueOf(rotaPersonArray[i])); |
| | | comSwRotaPersonVO.setName(person.get("name")); |
| | | comSwRotaPersonVO.setPhone(Long.valueOf(person.get("phone"))); |
| | | Map<String,String> userMap = this.comSwRotaDAO.getImageUrl(Long.valueOf(rotaPersonArray[i])); |
| | | if(userMap != null){ |
| | | comSwRotaPersonVO.setPhone(userMap.get("phone")); |
| | | comSwRotaPersonVO.setImageUrl(userMap.get("url")); |
| | | comSwRotaPersonVO.setName(userMap.get("name")); |
| | | } |
| | | rotaPersons.add(comSwRotaPersonVO); |
| | | } |
| | |
| | | String[] rotaPersonArray = rotaPerson.split(","); |
| | | for (int i = 0; i <= rotaPersonArray.length - 1; i++){ |
| | | ComSwRotaPersonVO comSwRotaPersonVO = new ComSwRotaPersonVO(); |
| | | Map<String,String> leader = comSwPatrolRecordDAO.getPbServiceTeamById(rotaPersonArray[i]); |
| | | comSwRotaPersonVO.setId(Long.valueOf(rotaPersonArray[i])); |
| | | comSwRotaPersonVO.setName(leader.get("name")); |
| | | comSwRotaPersonVO.setPhone(Long.valueOf(leader.get("phone"))); |
| | | Map<String,String> userMap = this.comSwRotaDAO.getImageUrl(Long.valueOf(rotaPersonArray[i])); |
| | | if(userMap != null){ |
| | | comSwRotaPersonVO.setPhone(userMap.get("phone")); |
| | | comSwRotaPersonVO.setImageUrl(userMap.get("url")); |
| | | comSwRotaPersonVO.setName(userMap.get("name")); |
| | | } |
| | | rotaLeaders.add(comSwRotaPersonVO); |
| | | } |