From 98f0843320f39916443f7a07295d3966ce9776ad Mon Sep 17 00:00:00 2001 From: zhenggl Date: Wed, 13 Sep 2023 14:35:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/production/ProductionCreateEAIService.java | 9 ++++----- .../receivables/ReceivablesInitialCreateEAIService.java | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/production/ProductionCreateEAIService.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/production/ProductionCreateEAIService.java index 8dbd85c..583f103 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/production/ProductionCreateEAIService.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/production/ProductionCreateEAIService.java @@ -43,7 +43,7 @@ public class ProductionCreateEAIService extends AbsEAIService { } //随机赋值list - List list = Arrays.asList( + private List list = Arrays.asList( new ProductionDetailsEntity("001", "一号工厂", "一号工厂刘晓鹏"), new ProductionDetailsEntity("002", "二号工厂", "二号工厂饶文豪"), new ProductionDetailsEntity("003", "三号工厂", "三号工厂卢人辅")); @@ -65,10 +65,9 @@ public class ProductionCreateEAIService extends AbsEAIService { - + Random random = new Random(); //默认赋值 for (ProductionDetailsEntity productionDetailsEntity : productionDetailsEntities) { - Random random = new Random(); int randomNumber = random.nextInt(3); productionDetailsEntity.setFactoryNo(this.list.get(randomNumber).getFactoryNo()); productionDetailsEntity.setFactoryName(this.list.get(randomNumber).getFactoryName()); @@ -77,7 +76,7 @@ public class ProductionCreateEAIService extends AbsEAIService { productionDetailsEntity.setProduceBoss("23467345221"); productionDetailsEntity.setProductionStatus(TabStatusEnums.PENDING.getValue().toString()); productionDetailsEntity.setNature(String.valueOf(randomNumber)); - String batchNo = cteateBatchNo(); + String batchNo = createBatchNo(); productionDetailsEntity.setBatchNo("MMDD-"+batchNo); //预计产量赋值 if (CollectionUtils.isNotEmpty(list)) { @@ -98,7 +97,7 @@ public class ProductionCreateEAIService extends AbsEAIService { return buildOK(); } - private String cteateBatchNo(){ + private String createBatchNo(){ StringBuffer sb = new StringBuffer(); Long batchNo; if (redisUtil.getRedisTemplate().hasKey(ProductionUtil.KEY)) { diff --git a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/receivables/ReceivablesInitialCreateEAIService.java b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/receivables/ReceivablesInitialCreateEAIService.java index ab88599..6e30605 100644 --- a/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/receivables/ReceivablesInitialCreateEAIService.java +++ b/demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/receivables/ReceivablesInitialCreateEAIService.java @@ -38,7 +38,7 @@ public class ReceivablesInitialCreateEAIService extends AbsEAIService { //随机赋值list - List list = Arrays.asList( + private List list = Arrays.asList( new CollectionDetailEntity("鼎捷A半导体有限公司","dj001","张三","186****9498"), new CollectionDetailEntity("鼎捷B半导体有限公司","dj002","李四","158****4794"), new CollectionDetailEntity("鼎捷C半导体有限公司","dj003","王五","150****9529"),