循环依赖问题

master
wj 2 years ago
parent 516bd76459
commit 798cada0ef

@ -33,8 +33,6 @@ public class BasicCorpImportLogServiceImpl implements BasicCorpImportLogService
@Resource
BasicCorpImportLogDao basicCorpImportLogDao;
@Resource
BasicCorpImportLogService basicCorpImportLogService;
@Resource
SqlSessionFactory sqlSessionFactory;
@ -101,13 +99,13 @@ public class BasicCorpImportLogServiceImpl implements BasicCorpImportLogService
BasicCorpsImportLogEntity basicCorpsImportLogEntity=new BasicCorpsImportLogEntity();
basicCorpsImportLogEntity.setGenKey(genKey);
basicCorpsImportLogEntity.setRemark("导入数据成功,导入数量为:"+ corpList.size()+"条");
basicCorpImportLogService.updateImportLog(basicCorpsImportLogEntity);
this.updateImportLog(basicCorpsImportLogEntity);
} catch (Exception e) {
log.error("导入往来单位信息异常", e);
BasicCorpsImportLogEntity basicCorpsImportLogEntity=new BasicCorpsImportLogEntity();
basicCorpsImportLogEntity.setGenKey(genKey);
basicCorpsImportLogEntity.setRemark("导入数据失败");
basicCorpImportLogService.updateImportLog(basicCorpsImportLogEntity);
this.updateImportLog(basicCorpsImportLogEntity);
}
}

@ -35,6 +35,7 @@ import com.glxp.api.util.OrderNoTypeBean;
import com.glxp.api.util.udi.FilterUdiUtils;
import com.glxp.api.util.udi.UdiCalCountUtil;
import org.springframework.beans.BeanUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@ -66,6 +67,7 @@ public class IoAddInoutService {
@Resource
BasicCorpService basicCorpService;
@Resource
@Lazy
IoCheckInoutService ioCheckInoutService;
@Resource
SystemParamConfigService systemParamConfigService;

@ -23,6 +23,7 @@ import com.glxp.api.util.DateUtil;
import com.glxp.api.util.GennerOrderUtils;
import com.glxp.api.util.OrderNoTypeBean;
import org.springframework.beans.BeanUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@ -49,6 +50,7 @@ public class IoChangeInoutService {
@Resource
IoAddInoutService addInoutService;
@Resource
@Lazy
IoCheckInoutService ioCheckInoutService;
@Resource
InvWarehouseService invWarehouseService;

@ -28,9 +28,11 @@ import com.glxp.api.util.JasperUtils;
import com.glxp.api.util.OrderNoTypeBean;
import com.glxp.api.util.udi.FilterUdiUtils;
import com.glxp.api.util.udi.UdiCalCountUtil;
import lombok.RequiredArgsConstructor;
import net.sf.jasperreports.engine.JRException;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -44,6 +46,7 @@ import java.util.*;
*/
@Service
@Transactional(rollbackFor = Exception.class)
@RequiredArgsConstructor
public class IoCheckInoutService {
@Resource
@ -54,10 +57,12 @@ public class IoCheckInoutService {
IoCodeTempService codeTempService;
@Resource
IBasicBussinessTypeService basicBussinessTypeService;
@Resource
IoOrderDetailCodeService orderDetailCodeService;
@Resource
IoOrderDetailBizService orderDetailBizService;
@Lazy
private final IoOrderDetailCodeService orderDetailCodeService;
@Lazy
private final IoOrderDetailBizService orderDetailBizService;
@Resource
IoOrderDetailResultService orderDetailResultService;
@Resource

@ -12,6 +12,7 @@ import com.glxp.api.res.inout.IoOrderInvoiceResponse;
import com.glxp.api.service.inout.IoCheckInoutService;
import com.glxp.api.service.inout.IoOrderDetailBizService;
import com.glxp.api.service.inout.IoOrderDetailCodeService;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -116,8 +117,10 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
@Resource
@Lazy
IoOrderDetailCodeService orderDetailCodeService;
@Resource
@Lazy
IoCheckInoutService checkInoutService;
@Override

@ -14,6 +14,7 @@ import com.glxp.api.res.inout.IoOrderDetailCodeResponse;
import com.glxp.api.service.inout.IoCheckInoutService;
import com.glxp.api.service.inout.IoOrderDetailBizService;
import com.glxp.api.service.inout.IoOrderDetailCodeService;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -31,6 +32,7 @@ public class IoOrderDetailCodeServiceImpl implements IoOrderDetailCodeService {
@Resource
IoOrderDetailBizService orderDetailBizService;
@Resource
@Lazy
IoCheckInoutService checkInoutService;
@Resource
private BasicCorpDao basicCorpDao;

@ -31,8 +31,6 @@ public class ThrOrderImportLogServiceImpl implements ThrOrderImportLogService {
@Resource
ThrOrderImportLogDao thrOrderImportLogDao;
@Resource
ThrOrderImportLogService thrOrderImportLogService;
@Resource
ThrOrderImportDetailService thrOrderImportDetailService;
@Resource
@ -87,7 +85,7 @@ public class ThrOrderImportLogServiceImpl implements ThrOrderImportLogService {
@Async
public void importThrOrder(String genKey) {
ThrOrderImportLogEntity thrOrderImportLogEntity = thrOrderImportLogService.selectByGenKey(genKey);
ThrOrderImportLogEntity thrOrderImportLogEntity = this.selectByGenKey(genKey);
if (thrOrderImportLogEntity.getStatus() == BasicProcessStatus.UDIINFO_IMPORT_UNPROCESS) {
FilterThrCorpImportLogRequest filterUdiIpLogRequest = new FilterThrCorpImportLogRequest();
filterUdiIpLogRequest.setGenKey(genKey);
@ -120,7 +118,7 @@ public class ThrOrderImportLogServiceImpl implements ThrOrderImportLogService {
}
thrOrderImportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS);
thrOrderImportLogService.updateImportLog(thrOrderImportLogEntity);
this.updateImportLog(thrOrderImportLogEntity);
}
}

Loading…
Cancel
Save