| | |
| | | package com.ycl.service.caseHandler.impl; |
| | | |
| | | import cn.hutool.core.util.PageUtil; |
| | | import com.alibaba.druid.sql.PagerUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | |
| | | import com.ycl.service.caseHandler.*; |
| | | import com.ycl.service.resources.IImageResourcesService; |
| | | import com.ycl.vo.MyBacklogVO; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | * @since 2022-09-24 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class DisposeRecordServiceImpl extends ServiceImpl<DisposeRecordMapper, DisposeRecord> implements IDisposeRecordService { |
| | | |
| | | @Resource |
| | |
| | | public final static Short LAST_THREEMONTH = 2; |
| | | |
| | | @Override |
| | | public Page<MyBacklogVO> listMyTask(Page<MyBacklogVO> page, String num, Long userId, Short type, Short source, Short time) { |
| | | public Page<MyBacklogVO> listMyTask(String num, Long userId, Short type, Short source, Short time, Integer current, Integer pageSize) { |
| | | LocalDateTime alarmTimeStart = null; |
| | | LocalDateTime alarmTimeEnd = null; |
| | | if (Objects.equals(time, LAST_WEEK)) { |
| | |
| | | alarmTimeStart = LocalDateTime.now().minusMonths(3); |
| | | alarmTimeEnd = LocalDateTime.now(); |
| | | } |
| | | //TODO:出现过一次重复数据 |
| | | return disposeRecordMapper.selectMyBackList(page, userId, num, alarmTimeStart, alarmTimeEnd, source, type); |
| | | Integer pageIndex = PageUtil.getStart(current - 1, pageSize); |
| | | List<MyBacklogVO> list = disposeRecordMapper.selectMyBackList(userId, num, alarmTimeStart, alarmTimeEnd, source, type, pageIndex, pageSize); |
| | | Long total = disposeRecordMapper.selectMyBackListTotal(userId, num, alarmTimeStart, alarmTimeEnd, source, type); |
| | | |
| | | list.forEach(o -> { |
| | | if (o.getPictureList() != null && o.getPictureList().size() > 0) { |
| | | o.setPicture(o.getPictureList().get(0).getUrl()); |
| | | } |
| | | }); |
| | | Page<MyBacklogVO> page = new Page<>(); |
| | | page.setRecords(list); |
| | | page.setTotal(total); |
| | | return page; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean saveOrUpdateUpload(UploadDisposingResultParam uploadDisposingResultParam) { |
| | | log.info("参数------------------>{}",uploadDisposingResultParam); |
| | | if (uploadDisposingResultParam.getArrivalTime() != null) { |
| | | uploadDisposingResultParam.setArrivalTime(uploadDisposingResultParam.getArrivalTime().replace("/", "-")); |
| | | } |
| | | if (uploadDisposingResultParam.getInvestigationTime() != null) { |
| | | uploadDisposingResultParam.setInvestigationTime(uploadDisposingResultParam.getInvestigationTime().replace("/", "-")); |
| | | } |
| | | |
| | | AdminUserDetails user = (AdminUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); |
| | | List<ArrivalSituation> list = iArrivalSituationService.list(new LambdaQueryWrapper<ArrivalSituation>().eq(ArrivalSituation::getBaseCaseId, uploadDisposingResultParam.getCaseId())); |
| | | if (!list.isEmpty()) { |
| | |
| | | //当事人 |
| | | PartyInfo partyInfo = new PartyInfo(); |
| | | BeanUtils.copyProperties(uploadDisposingResultParam, partyInfo); |
| | | //TODO:前端回显只有当事人姓名需要在详情返回 |
| | | //TODO:后台上报当事人信息填不进去 |
| | | partyInfo.setId(uploadDisposingResultParam.getPartyInfoId()); |
| | | iPartyInfoService.updateById(partyInfo); |
| | | //调查取证 |