| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * WMS平台对接Service实现 |
| | |
| | | job.setArriveDate(new Date()); |
| | | job.setSingType(Constants.TWO); |
| | | job.setSignDate(new Date()); |
| | | List<PlatformJob> signList = platformJobMapper.selectList(new QueryWrapper<PlatformJob>().lambda().apply(" DATE(SIGN_DATE) = DATE(NOW()) and sign_date is not null ")); |
| | | if(CollectionUtils.isEmpty(signList)){ |
| | | job.setSignNum(Constants.ONE); |
| | | } else{ |
| | | int maxNumber = Collections.max(signList.stream().map(i->i.getSignNum()).collect(Collectors.toList())); |
| | | job.setSignNum(maxNumber + Constants.ONE); |
| | | } |
| | | } |
| | | } |
| | | PlatformGroup group = platformGroupMapper.selectOne(new QueryWrapper<PlatformGroup>().lambda() |