|
|
@ -45,6 +45,7 @@ import com.elink.esua.epdc.dto.UserDTO; |
|
|
|
import com.elink.esua.epdc.dto.VolunteerInfoDTO; |
|
|
|
import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.epdc.form.EpdcUserPointsFormDTO; |
|
|
|
import com.elink.esua.epdc.dto.form.EpdcClockListV2FormDTO; |
|
|
|
import com.elink.esua.epdc.dto.result.BehaviorResultDto; |
|
|
|
import com.elink.esua.epdc.modules.activity.dao.ActInfoDao; |
|
|
|
import com.elink.esua.epdc.modules.activity.dao.ActUserLogDao; |
|
|
@ -522,6 +523,46 @@ public class ActUserRelationServiceImpl extends BaseServiceImpl<ActUserRelationD |
|
|
|
return baseDao.getActUserRelationPageFromPC(params); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result<AppClockListDTO> selectListV2ActUserRelation(EpdcClockListV2FormDTO formDTO) { |
|
|
|
int pageIndex = (formDTO.getPageIndex() - NumConstant.ONE) * formDTO.getPageSize(); |
|
|
|
formDTO.setPageIndex(pageIndex); |
|
|
|
List<ActClockListDTO> list = baseDao.selectListV2ActUserRelation(formDTO); |
|
|
|
if (null == list || list.size() == 0) { |
|
|
|
return new Result<AppClockListDTO>(); |
|
|
|
} |
|
|
|
List<Object> resultList = new ArrayList<Object>(); |
|
|
|
String[] idArr = new String[list.size()]; |
|
|
|
for (int k = 0; k < list.size(); k++) { |
|
|
|
Map<String, Object> map = new HashMap<String, Object>(); |
|
|
|
map.put("nickname", list.get(k).getNickname()); |
|
|
|
map.put("faceImg", list.get(k).getFaceImg()); |
|
|
|
map.put("partyFlag", list.get(k).getPartyFlag()); |
|
|
|
map.put("clockDesc", list.get(k).getClockDesc()); |
|
|
|
map.put("createdTime", list.get(k).getClockTime()); |
|
|
|
map.put("clockId", list.get(k).getId() == null ? "" : list.get(k).getId()); |
|
|
|
//查询打卡对应图片
|
|
|
|
idArr[k] = list.get(k).getId(); |
|
|
|
resultList.add(map); |
|
|
|
} |
|
|
|
List<ActClockPicDTO> listLogImg = baseDao.selectListClockImg(idArr); |
|
|
|
for (Object objMap : resultList) { |
|
|
|
Map<String, Object> mm = (Map<String, Object>) objMap; |
|
|
|
List<String> imgList = new ArrayList<String>(); |
|
|
|
for (int i = listLogImg.size() - 1; i >= 0; i--) { |
|
|
|
if (mm.get("clockId").equals(listLogImg.get(i).getClockId())) { |
|
|
|
imgList.add(listLogImg.get(i).getClockPic()); |
|
|
|
listLogImg.remove(i); |
|
|
|
} |
|
|
|
} |
|
|
|
mm.put("images", imgList); |
|
|
|
mm.remove("clockId"); |
|
|
|
} |
|
|
|
AppClockListDTO appClockListDTO = new AppClockListDTO(); |
|
|
|
appClockListDTO.setClockNum(resultList.size()); |
|
|
|
appClockListDTO.setClocks(resultList); |
|
|
|
return new Result<AppClockListDTO>().ok(appClockListDTO); } |
|
|
|
|
|
|
|
//自动审核 定时任务 消息通知
|
|
|
|
private void sendNotice(ActUserRelationDTO actUserRelationDTO, String actUserDefaultState, ActInfoDTO actInfoDTO) { |
|
|
|
EpdcInformationFormDTO informationFormDTO = new EpdcInformationFormDTO(); |
|
|
|