|
@ -34,8 +34,9 @@ public class MysqlServiceImpl implements MysqlService { |
|
|
|
|
|
|
|
|
Set<Integer> validZeroTypes = new HashSet<>(Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 13, 14, 18, 19, 20, 21, 22, 23, 24, 26, 28, 29, 35, 36, 40, 45, 46, 47, 48, 49, 53, 54, 60)); |
|
|
Set<Integer> validZeroTypes = new HashSet<>(Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 13, 14, 18, 19, 20, 21, 22, 23, 24, 26, 28, 29, 35, 36, 40, 45, 46, 47, 48, 49, 53, 54, 60)); |
|
|
Set<Integer> validOneTypes = new HashSet<>(Arrays.asList(9, 15, 17, 25, 27, 37, 41, 42, 43, 50, 51, 62)); |
|
|
Set<Integer> validOneTypes = new HashSet<>(Arrays.asList(9, 15, 17, 25, 27, 37, 41, 42, 43, 50, 51, 62)); |
|
|
Set<Integer> validTwoTypes = new HashSet<>(Arrays.asList(52, 55, 56, 57, 58, 59, 61)); |
|
|
|
|
|
|
|
|
Set<Integer> validTwoTypes = new HashSet<>(Arrays.asList(52,61)); |
|
|
Set<Integer> validThreeTypes = new HashSet<>(Arrays.asList(10, 16, 30, 31, 32, 33, 34, 39, 44)); |
|
|
Set<Integer> validThreeTypes = new HashSet<>(Arrays.asList(10, 16, 30, 31, 32, 33, 34, 39, 44)); |
|
|
|
|
|
Set<Integer> validFourTypes = new HashSet<>(Arrays.asList(55, 56, 57, 58, 59, 63, 64, 65)); |
|
|
LocalDateTime now = LocalDateTime.now(); |
|
|
LocalDateTime now = LocalDateTime.now(); |
|
|
Month currentMonth = now.getMonth(); |
|
|
Month currentMonth = now.getMonth(); |
|
|
@Autowired |
|
|
@Autowired |
|
@ -102,6 +103,9 @@ public class MysqlServiceImpl implements MysqlService { |
|
|
Random random = new Random(); |
|
|
Random random = new Random(); |
|
|
int randomNumber = random.nextInt(900) + 100; |
|
|
int randomNumber = random.nextInt(900) + 100; |
|
|
// 判断gtype |
|
|
// 判断gtype |
|
|
|
|
|
if(validFourTypes.contains(gtype)){ |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
if(validZeroTypes.contains(gtype)){ |
|
|
if(validZeroTypes.contains(gtype)){ |
|
|
mysqlStmt.setInt(13, 0); |
|
|
mysqlStmt.setInt(13, 0); |
|
|
mysqlStmt.setString(1, "ERPCZ"+timestampPart+randomNumber); |
|
|
mysqlStmt.setString(1, "ERPCZ"+timestampPart+randomNumber); |
|
|