|
|
@ -3,7 +3,6 @@ package com.digiwin.athena.app.ptc.service.receivables; |
|
|
|
import com.alibaba.nacos.common.utils.CollectionUtils; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.digiwin.app.service.DWEAIResult; |
|
|
|
import com.digiwin.athena.app.infra.common.enums.TabStatusEnums; |
|
|
|
import com.digiwin.athena.app.ptc.infra.entity.CollectionDetailEntity; |
|
|
|
import com.digiwin.athena.app.ptc.infra.entity.ReceivablesDetailEntity; |
|
|
|
import com.digiwin.athena.app.ptc.infra.repository.CollectionDetailRepository; |
|
|
@ -13,7 +12,6 @@ import com.digiwin.athena.app.ptc.infra.service.ReceivablesDetailService; |
|
|
|
import com.digiwin.athena.opt.common.eai.service.AbsEAIService; |
|
|
|
import com.digiwin.athena.opt.common.generator.SnowflakeWorker; |
|
|
|
import com.digiwin.athena.opt.common.security.SecurityUtil; |
|
|
|
import com.digiwin.athena.opt.common.util.DateUtils; |
|
|
|
import lombok.extern.log4j.Log4j2; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
@ -79,7 +77,7 @@ public class ReceivablesInitialCreateEAIService extends AbsEAIService { |
|
|
|
HashSet<Integer> set = new HashSet<>(); |
|
|
|
int count = 0; |
|
|
|
while (count < 6) { |
|
|
|
int num = random.nextInt(27); |
|
|
|
int num = random.nextInt(26); |
|
|
|
if (!set.contains(num)) { |
|
|
|
set.add(num); |
|
|
|
count++; |
|
|
@ -116,7 +114,7 @@ public class ReceivablesInitialCreateEAIService extends AbsEAIService { |
|
|
|
//取出已完成的数据 |
|
|
|
LambdaQueryWrapper<CollectionDetailEntity> lmq = new LambdaQueryWrapper<>(); |
|
|
|
lmq.eq(CollectionDetailEntity::getTenantSid,tenantSid); |
|
|
|
lmq.eq(CollectionDetailEntity::getStatus, TabStatusEnums.COMPLETED.getValue()); |
|
|
|
lmq.eq(CollectionDetailEntity::getStatus, "2"); |
|
|
|
List<CollectionDetailEntity> collectionDetailEntities = collectionDetailService.list(lmq); |
|
|
|
|
|
|
|
//删除应收数据 |
|
|
@ -128,6 +126,7 @@ public class ReceivablesInitialCreateEAIService extends AbsEAIService { |
|
|
|
|
|
|
|
//随机新增 |
|
|
|
for (ReceivablesDetailEntity receivablesDetailEntity : list) { |
|
|
|
|
|
|
|
int i = random.nextInt(16); |
|
|
|
ReceivablesDetailEntity sku = skuList.get(i); |
|
|
|
receivablesDetailEntity.setSkuCode(sku.getSkuCode()); |
|
|
|