From 52c60b3d54619a1360263dce63a6d12994493ee9 Mon Sep 17 00:00:00 2001 From: zhenggl Date: Thu, 14 Sep 2023 09:31:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=BA=94=E6=94=B6=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E7=94=9F=E6=88=90=E8=A7=84=E5=88=99=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../receivables/ReceivablesInitialCreateEAIService.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 fb633b9..c746f61 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 @@ -82,11 +82,13 @@ public class ReceivablesInitialCreateEAIService extends AbsEAIService { Random random = new Random(); + List integerList = Arrays.asList(0,-1,-7); //随机新增 for (ReceivablesDetailEntity receivablesDetailEntity : list) { int randomNumber = random.nextInt(100)+1; int nextInt = random.nextInt(30)+1; - int dayInt = random.nextInt(10)+1; + int dateInt = random.nextInt(3); + //int dayInt = random.nextInt(10)+1; receivablesDetailEntity.setReceivableNo("RE-"+DateUtils.currentTimeString()); receivablesDetailEntity.setReceivableNo("SEQ-"+DateUtils.currentTimeString()); receivablesDetailEntity.setStatus("1"); @@ -95,7 +97,7 @@ public class ReceivablesInitialCreateEAIService extends AbsEAIService { receivablesDetailEntity.setPriceTax(new BigDecimal(String.valueOf(randomNumber))); receivablesDetailEntity.setQuantity(new BigDecimal(String.valueOf(nextInt))); receivablesDetailEntity.setAmountTax(receivablesDetailEntity.getPriceTax().multiply(receivablesDetailEntity.getQuantity())); - receivablesDetailEntity.setReceivableDate(org.apache.commons.lang.time.DateUtils.addDays(new Date(),dayInt)); + receivablesDetailEntity.setReceivableDate(org.apache.commons.lang.time.DateUtils.addDays(new Date(),integerList.get(dateInt))); receivablesDetailEntity.setSalesmanAssistant("qcsupplierqcuser001"); receivablesDetailEntity.setSalesmanBoss("Sp0001"); receivablesDetailEntity.setSalesman("qcuser001"); @@ -106,8 +108,7 @@ public class ReceivablesInitialCreateEAIService extends AbsEAIService { receivablesDetailService.saveBatch(list); - - return buildOK(); } + }