|  |  |  | 
|---|
|  |  |  | .selectAs(Platform::getName,PlatformWarnEvent::getPlatformName) | 
|---|
|  |  |  | .selectAs(Platform::getHkId,PlatformWarnEvent::getPlatfromHkId) | 
|---|
|  |  |  | .leftJoin(Platform.class,Platform::getId,PlatformWarnEvent::getPlatformId) | 
|---|
|  |  |  | .orderByDesc(PlatformWarnEvent::getCreateDate) | 
|---|
|  |  |  | .last(" limit 20 ") | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | List<PlatformWarnEventListResponse> list = new ArrayList<PlatformWarnEventListResponse>(); | 
|---|
|  |  |  | 
|---|
|  |  |  | platformWarnEvent.setIsdeleted(Constants.ZERO); | 
|---|
|  |  |  | platformWarnEvent.setPlatformId(savePlatformWarnEventDTO.getPlatformId()); | 
|---|
|  |  |  | platformWarnEvent.setCarCode(savePlatformWarnEventDTO.getCarCode()); | 
|---|
|  |  |  | platformWarnEvent.setPlatformId(savePlatformWarnEventDTO.getPlatformJobId()); | 
|---|
|  |  |  | Constants.PlatformWarnEvent cPl = Constants.PlatformWarnEvent.STOP_TIMEOUT; | 
|---|
|  |  |  | if(Constants.equalsInteger(savePlatformWarnEventDTO.getEventType(),Constants.ZERO)){ | 
|---|
|  |  |  | if(Objects.isNull(savePlatformWarnEventDTO.getPlatformJobId())){ | 
|---|
|  |  |  | 
|---|
|  |  |  | platformWarnEvent.setEventContent(cPl.getInfo().replace("${carCode}",savePlatformWarnEventDTO.getCarCode())); | 
|---|
|  |  |  | platformWarnEventMapper.insert(platformWarnEvent); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|