Browse Source

7.14数据同步修改

huangqizheng/feature-20250714180618-数据同步
huangqizhen 1 month ago
parent
commit
9dbb61ad6a
  1. 6
      src/main/java/com/example/demo/Mysql/MysqlServiceImpl.java

6
src/main/java/com/example/demo/Mysql/MysqlServiceImpl.java

@ -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> 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> validFourTypes = new HashSet<>(Arrays.asList(55, 56, 57, 58, 59, 63, 64, 65));
LocalDateTime now = LocalDateTime.now();
Month currentMonth = now.getMonth();
@Autowired
@ -102,6 +103,9 @@ public class MysqlServiceImpl implements MysqlService {
Random random = new Random();
int randomNumber = random.nextInt(900) + 100;
// 判断gtype
if(validFourTypes.contains(gtype)){
continue;
}
if(validZeroTypes.contains(gtype)){
mysqlStmt.setInt(13, 0);
mysqlStmt.setString(1, "ERPCZ"+timestampPart+randomNumber);

Loading…
Cancel
Save