Commit b918e882 authored by tangwei's avatar tangwei

解决循环依耐

parent b65a3b4c
......@@ -8,6 +8,7 @@ import com.yeejoin.equipmanage.common.dto.AnalysisReportLogDto;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -45,6 +46,7 @@ public class AnalysisReportLogController extends AbstractBaseController {
// 工具栏中,显示第几个按钮,从左到右,可由逗号隔开显示多个
private String showButton = "6";
@Lazy
@Autowired
IAnalysisReportLogService iAnalysisReportLogService;
......
......@@ -100,6 +100,7 @@ public class CarController extends AbstractBaseController {
@Autowired
ICarLonAndLatDataService iCarLonAndLatDataService;
@Lazy
@Autowired
IEquipmentService iEquipmentService;
......
......@@ -14,6 +14,7 @@ import com.yeejoin.equipmanage.service.IEquipmentService;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -30,6 +31,7 @@ public class EquipmentDefUpload implements IEquipmentDefUpload {
@Autowired
private EquipmentMapper equipmentMapper;
@Lazy
@Autowired
private IEquipmentService equipmentService;
......
......@@ -19,6 +19,7 @@ import com.yeejoin.equipmanage.mapper.*;
import com.yeejoin.equipmanage.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
......@@ -59,13 +60,14 @@ public class EquipmentDetailServiceImpl extends ServiceImpl<EquipmentDetailMappe
@Autowired
private IEquipmentCategoryService iEquipmentCategoryService;
@Lazy
@Autowired
private IEquipmentService iEquipmentService;
@Autowired
private IUnitService iUnitService;
@Lazy
@Autowired
private IUploadFileService iUploadFileService;
@Autowired
......
......@@ -18,6 +18,7 @@ import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
......@@ -48,6 +49,7 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
private IEquipmentIndexService iEquipmentIndexService;
@Autowired
private IUnitService iUnitService;
@Lazy
@Autowired
private UploadFileMapper uploadFileMapper;
@Autowired
......@@ -56,6 +58,7 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
private PatrolFeign patrolFeign;
@Autowired
private RemoteSecurityService remoteSecurityService;
@Lazy
@Autowired
private IEquipmentDetailService iEquipmentDetailService;
......
......@@ -16,6 +16,7 @@ import java.util.stream.Collectors;
import org.apache.commons.beanutils.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
......@@ -76,8 +77,10 @@ public class RiskSourceSceneServiceImpl extends ServiceImpl<RiskSourceSceneMappe
private RemoteSecurityService securityService;
@Autowired
private IEquipmentCategoryService iEquipmentCategoryService;
@Lazy
@Autowired
private IEquipmentService iEquipmentService;
@Lazy
@Autowired
private IEquipmentDetailService iEquipmentDetailService;
@Autowired
......
......@@ -17,6 +17,7 @@ import com.yeejoin.equipmanage.service.IEquipmentService;
import com.yeejoin.equipmanage.service.IStockDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import java.util.*;
......@@ -29,10 +30,10 @@ import java.util.*;
*/
@Service
public class StockDetailServiceImpl extends ServiceImpl<StockDetailMapper, StockDetail> implements IStockDetailService {
@Lazy
@Autowired
private IEquipmentDetailService iEquipmentDetailService;
@Lazy
@Autowired
private IEquipmentService iEquipmentService;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment