|
|
|
@ -1,11 +1,12 @@
|
|
|
|
|
package com.shxy.xymanager_service.impl;
|
|
|
|
|
|
|
|
|
|
import com.shxy.xymanager_common.entity.*;
|
|
|
|
|
import com.shxy.xymanager_common.exception.ApiException;
|
|
|
|
|
import com.shxy.xymanager_common.util.DateUtil;
|
|
|
|
|
import com.shxy.xymanager_common.util.DigestUtils;
|
|
|
|
|
import com.shxy.xymanager_dao.dao.MntnUploadsMapper;
|
|
|
|
|
import com.shxy.xymanager_service.service.MntnUploadService;
|
|
|
|
|
import com.shxy.xymanager_service.service.NewCacheService;
|
|
|
|
|
import com.shxy.xymanager_service.service.TerminalExtService;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
@ -15,7 +16,6 @@ import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.UUID;
|
|
|
|
@ -33,11 +33,20 @@ public class MntnUploadServiceImpl implements MntnUploadService {
|
|
|
|
|
MntnUploadsMapper mapper;
|
|
|
|
|
@Resource
|
|
|
|
|
NewCacheService cacheService;
|
|
|
|
|
@Resource
|
|
|
|
|
TerminalExtService terminalExtService;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<MntnUploads> listAll(Integer type) {
|
|
|
|
|
public List<MntnUploads> listAll(Integer type, String cmdid) {
|
|
|
|
|
MntnUploadsExample example = new MntnUploadsExample();
|
|
|
|
|
MntnUploadsExample.Criteria criteria = example.createCriteria();
|
|
|
|
|
if (StringUtils.hasLength(cmdid)) {
|
|
|
|
|
Terminals t = terminalExtService.getByCmdid(cmdid);
|
|
|
|
|
if (t == null) {
|
|
|
|
|
throw new ApiException("该装置不存在");
|
|
|
|
|
}
|
|
|
|
|
criteria.andTermIdEqualTo(t.getId());
|
|
|
|
|
}
|
|
|
|
|
if (type != null) {
|
|
|
|
|
criteria.andTypeEqualTo(type);
|
|
|
|
|
}
|
|
|
|
|