Browse Source

Merge branch 'sprint/S3' into release/S3

master
郑贵龙 1 year ago
parent
commit
63d3bce8f8
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/receivables/ReceivablesInitialCreateEAIService.java

+ 5
- 4
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/ptc/service/receivables/ReceivablesInitialCreateEAIService.java View File

@ -82,11 +82,13 @@ public class ReceivablesInitialCreateEAIService extends AbsEAIService {
Random random = new Random();
List<Integer> 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();
}
}

Loading…
Cancel
Save