解决循环问题

master
wj 2 years ago
parent 6c13eb05d4
commit a2cdc0bbfe

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

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

@ -12,6 +12,7 @@ import com.glxp.api.res.inout.IoOrderInvoiceResponse;
import com.glxp.api.service.inout.IoCheckInoutService; import com.glxp.api.service.inout.IoCheckInoutService;
import com.glxp.api.service.inout.IoOrderDetailBizService; import com.glxp.api.service.inout.IoOrderDetailBizService;
import com.glxp.api.service.inout.IoOrderDetailCodeService; import com.glxp.api.service.inout.IoOrderDetailCodeService;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -24,6 +25,7 @@ import java.util.List;
public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService { public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
@Resource @Resource
@Lazy
IoOrderDetailBizDao ioOrderDetailBizDao; IoOrderDetailBizDao ioOrderDetailBizDao;
@Override @Override
@ -118,6 +120,7 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
@Resource @Resource
IoOrderDetailCodeService orderDetailCodeService; IoOrderDetailCodeService orderDetailCodeService;
@Resource @Resource
@Lazy
IoCheckInoutService checkInoutService; IoCheckInoutService checkInoutService;
@Override @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.IoCheckInoutService;
import com.glxp.api.service.inout.IoOrderDetailBizService; import com.glxp.api.service.inout.IoOrderDetailBizService;
import com.glxp.api.service.inout.IoOrderDetailCodeService; import com.glxp.api.service.inout.IoOrderDetailCodeService;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -31,6 +32,7 @@ public class IoOrderDetailCodeServiceImpl implements IoOrderDetailCodeService {
@Resource @Resource
IoOrderDetailBizService orderDetailBizService; IoOrderDetailBizService orderDetailBizService;
@Resource @Resource
@Lazy
IoCheckInoutService checkInoutService; IoCheckInoutService checkInoutService;
@Resource @Resource
private BasicCorpDao basicCorpDao; private BasicCorpDao basicCorpDao;

@ -43,6 +43,7 @@ import com.glxp.api.util.DateUtil;
import com.glxp.api.util.udi.UdiCalCountUtil; import com.glxp.api.util.udi.UdiCalCountUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -85,6 +86,7 @@ public class IoOrderServiceImpl implements IoOrderService {
@Resource @Resource
IoCodeTempService codeTempService; IoCodeTempService codeTempService;
@Resource @Resource
@Lazy
IoOrderDetailCodeService ioOrderDetailCodeService; IoOrderDetailCodeService ioOrderDetailCodeService;
@Resource @Resource
IoOrderDetailResultService ioOrderDetailResultService; IoOrderDetailResultService ioOrderDetailResultService;

@ -19,6 +19,7 @@ import com.glxp.api.res.thrsys.ThrOrderResponse;
import com.glxp.api.service.sync.SyncDataSetService; import com.glxp.api.service.sync.SyncDataSetService;
import com.glxp.api.util.RedisUtil; import com.glxp.api.util.RedisUtil;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -41,6 +42,7 @@ public class ThrOrdersDlService {
@Resource @Resource
RedisUtil redisUtil; RedisUtil redisUtil;
@Resource @Resource
@Lazy
private ThrOrderImportLogService thrOrderImportLogService; private ThrOrderImportLogService thrOrderImportLogService;
@Resource @Resource
ThrOrderExportLogService thrOrderExportLogService; ThrOrderExportLogService thrOrderExportLogService;
@ -67,13 +69,13 @@ public class ThrOrdersDlService {
ThrOrderImportLogEntity thrOrderImportLogEntity = thrOrderImportLogService.selectByGenKey(genKey); ThrOrderImportLogEntity thrOrderImportLogEntity = thrOrderImportLogService.selectByGenKey(genKey);
//todo单据还没设计好 //todo单据还没设计好
// BasicThirdSysDetailEntity basicThirdSysDetailEntity = bussinessTypeService.findByActionKey(action, "orderQueryUrl"); // BasicThirdSysDetailEntity basicThirdSysDetailEntity = bussinessTypeService.findByActionKey(action, "orderQueryUrl");
// if (basicThirdSysDetailEntity == null || basicThirdSysDetailEntity.getValue() == null) { // if (basicThirdSysDetailEntity == null || basicThirdSysDetailEntity.getValue() == null) {
// WebSocketServer.sendInfo("业务单据查询接口未设置!", "sid"); // WebSocketServer.sendInfo("业务单据查询接口未设置!", "sid");
// return; // return;
// } // }
ThrSystemDetailEntity thrSystemDetailEntity=new ThrSystemDetailEntity(); ThrSystemDetailEntity thrSystemDetailEntity = new ThrSystemDetailEntity();
int page = 1; int page = 1;
int limit = 100; int limit = 100;
@ -213,7 +215,8 @@ public class ThrOrdersDlService {
// thrOrderExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS); // thrOrderExportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS);
thrOrderExportLogService.updateThrOrderExportLog(thrOrderExportLogEntity); thrOrderExportLogService.updateThrOrderExportLog(thrOrderExportLogEntity);
} }
//
//
// //
// @Async // @Async
// public void genJsonFile(String genKey, ThrOrderExportRequest thrOrderExportRequest) { // public void genJsonFile(String genKey, ThrOrderExportRequest thrOrderExportRequest) {
@ -543,7 +546,8 @@ public class ThrOrdersDlService {
} }
return -1; return -1;
} }
//
//
// public List<List<String>> exportThrOrders(FilterThrOrderRequest filterThrOrderRequest) { // public List<List<String>> exportThrOrders(FilterThrOrderRequest filterThrOrderRequest) {
// BussinessTypeFilterRequest bussinessTypeFilterRequest = new BussinessTypeFilterRequest(); // BussinessTypeFilterRequest bussinessTypeFilterRequest = new BussinessTypeFilterRequest();
// bussinessTypeFilterRequest.setEnabled(true); // bussinessTypeFilterRequest.setEnabled(true);

@ -13,6 +13,7 @@ import com.glxp.api.service.thrsys.ThrOrderImportDetailService;
import com.glxp.api.service.thrsys.ThrOrderImportLogService; import com.glxp.api.service.thrsys.ThrOrderImportLogService;
import com.glxp.api.service.thrsys.ThrOrderService; import com.glxp.api.service.thrsys.ThrOrderService;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -31,11 +32,10 @@ public class ThrOrderImportLogServiceImpl implements ThrOrderImportLogService {
@Resource @Resource
ThrOrderImportLogDao thrOrderImportLogDao; ThrOrderImportLogDao thrOrderImportLogDao;
@Resource
ThrOrderImportLogService thrOrderImportLogService;
@Resource @Resource
ThrOrderImportDetailService thrOrderImportDetailService; ThrOrderImportDetailService thrOrderImportDetailService;
@Resource @Resource
@Lazy
ThrOrderService thrOrderService; ThrOrderService thrOrderService;
@Resource @Resource
ThrOrderDetailService thrOrderDetailService; ThrOrderDetailService thrOrderDetailService;
@ -87,7 +87,7 @@ public class ThrOrderImportLogServiceImpl implements ThrOrderImportLogService {
@Async @Async
public void importThrOrder(String genKey) { public void importThrOrder(String genKey) {
ThrOrderImportLogEntity thrOrderImportLogEntity = thrOrderImportLogService.selectByGenKey(genKey); ThrOrderImportLogEntity thrOrderImportLogEntity = this.selectByGenKey(genKey);
if (thrOrderImportLogEntity.getStatus() == BasicProcessStatus.UDIINFO_IMPORT_UNPROCESS) { if (thrOrderImportLogEntity.getStatus() == BasicProcessStatus.UDIINFO_IMPORT_UNPROCESS) {
FilterThrCorpImportLogRequest filterUdiIpLogRequest = new FilterThrCorpImportLogRequest(); FilterThrCorpImportLogRequest filterUdiIpLogRequest = new FilterThrCorpImportLogRequest();
filterUdiIpLogRequest.setGenKey(genKey); filterUdiIpLogRequest.setGenKey(genKey);
@ -120,7 +120,7 @@ public class ThrOrderImportLogServiceImpl implements ThrOrderImportLogService {
} }
thrOrderImportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS); thrOrderImportLogEntity.setStatus(BasicProcessStatus.UDIINFO_IMPORT_SUCCESS);
thrOrderImportLogService.updateImportLog(thrOrderImportLogEntity); this.updateImportLog(thrOrderImportLogEntity);
} }
} }

Loading…
Cancel
Save