|
|
@ -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(); |
|
|
|
} |
|
|
|
|
|
|
|
} |