| | |
| | | import com.flightfeather.uav.biz.sourcetrace.model.PollutedClue |
| | | import com.flightfeather.uav.biz.sourcetrace.model.PollutedSummary |
| | | import com.flightfeather.uav.common.utils.GsonUtils |
| | | import com.flightfeather.uav.domain.entity.Mission |
| | | import com.flightfeather.uav.domain.entity.SourceTraceMsg |
| | | import com.flightfeather.uav.domain.mapper.SourceTraceMsgMapper |
| | | import com.flightfeather.uav.socket.sender.MsgType |
| | |
| | | fun insert(msgType: MsgType, obj: PollutedClue): Int { |
| | | val stm = SourceTraceMsg().apply { |
| | | deviceCode = obj.deviceCode |
| | | factorName = obj.pollutedData?.factorName |
| | | factorName = obj.pollutedData?.toFactorNames() |
| | | exceptionType = obj.pollutedData?.exceptionType |
| | | startTime = obj.pollutedData?.startTime |
| | | endTime = obj.pollutedData?.endTime |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | fun delete(mission: Mission): Int { |
| | | return sourceTraceMsgMapper.deleteByExample(Example(SourceTraceMsg::class.java).apply { |
| | | createCriteria().andEqualTo("deviceCode", mission.deviceCode) |
| | | .andGreaterThanOrEqualTo("startTime", mission.startTime) |
| | | .andLessThanOrEqualTo("endTime", mission.endTime) |
| | | }) |
| | | } |
| | | } |