| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | private String codeMake() { |
| | | // 固定字符串 GX + 年月日 + 01 |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); |
| | | String yrar = formatter.format(LocalDateTime.now()); |
| | | String code = "GX" + yrar; |
| | | List<String> parameterItem = baseMapper.getNos(code); |
| | | if (CollectionUtil.isEmpty(parameterItem)) { |
| | | code = code + "01"; |
| | | } |
| | | return code; |
| | | } |
| | | |
| | | } |