| | |
| | | import com.fzzy.igds.data.BaseResp; |
| | | import com.fzzy.igds.data.IgdsBaseParam; |
| | | import com.fzzy.igds.domain.EventInfo; |
| | | import com.fzzy.igds.domain.SnapRecord; |
| | | import com.fzzy.igds.mapper.EventInfoMapper; |
| | | import com.fzzy.igds.utils.ContextUtil; |
| | | import com.fzzy.igds.utils.DateUtil; |
| | |
| | | } |
| | | // 收储公司检索 |
| | | if (StringUtils.isNotBlank(param.getKey())) { |
| | | queryWrapper.apply("dept_id IN (SELECT dept_id FROM sys_dept WHERE parent_id = {0})", param.getKey()); |
| | | queryWrapper.likeRight("dept_id", param.getKey()); |
| | | } |
| | | //抓拍时间检索 |
| | | if (param.getStart() != null && param.getEnd() != null) { |
| | | queryWrapper.between("time", param.getStart(), param.getEnd()); |
| | | if (null != param.getStart()) { |
| | | queryWrapper.ge("time", param.getStart()); |
| | | } |
| | | if (null != param.getEnd()) { |
| | | queryWrapper.le("time", param.getEnd()); |
| | | } |
| | | //事件名称 |
| | | if (StringUtils.isNotBlank(param.getName())) { |
| | |
| | | } |
| | | |
| | | QueryWrapper<EventInfo> queryWrapper = new QueryWrapper<>(); |
| | | if (StringUtils.isNotBlank(param.getCompanyId())) { |
| | | queryWrapper.eq("company_id", param.getCompanyId()); |
| | | } |
| | | if (StringUtils.isNotBlank(param.getDeptId())) { |
| | | queryWrapper.likeRight("dept_id", param.getDeptId()); |
| | | } |
| | |
| | | return eventInfoMapper.selectList(queryWrapper); |
| | | } |
| | | |
| | | /** |
| | | * 持久化保存 |
| | | * @param info |
| | | */ |
| | | public void addData(EventInfo info) { |
| | | if(StringUtils.isBlank(info.getId())){ |
| | | info.setId(ContextUtil.generateId()); |
| | | } |
| | | if(StringUtils.isBlank(info.getCompanyId())){ |
| | | info.setCompanyId(ContextUtil.getCompanyId()); |
| | | } |
| | | |
| | | info.setUpdateBy(ContextUtil.getLoginUserName()); |
| | | info.setUpdateTime(new Date()); |
| | | info.setCreateBy(ContextUtil.getLoginUserName()); |
| | | info.setCreateTime(new Date()); |
| | | eventInfoMapper.insert(info); |
| | | } |
| | | |
| | | } |