|
|
@ -43,7 +43,7 @@ public class ProductionCreateEAIService extends AbsEAIService { |
|
|
|
} |
|
|
|
|
|
|
|
//随机赋值list |
|
|
|
List<ProductionDetailsEntity> list = Arrays.asList( |
|
|
|
private List<ProductionDetailsEntity> 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)) { |
|
|
|