故障申报时间排序
This commit is contained in:
parent
ae650c5ddc
commit
dcfedad087
|
@ -59,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<include refid="selectFaultVo"/>
|
||||
<where>
|
||||
<include refid="searchCondition"/>
|
||||
order by bf.create_time desc
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@ import java.util.List;
|
|||
import com.github.pagehelper.PageHelper;
|
||||
import com.ruoyi.bst.area.domain.AreaQuery;
|
||||
import com.ruoyi.bst.area.domain.AreaVO;
|
||||
import com.ruoyi.bst.device.domain.DeviceVO;
|
||||
import com.ruoyi.bst.device.service.DeviceService;
|
||||
import com.ruoyi.bst.fault.domain.enums.FaultHandleStatus;
|
||||
import com.ruoyi.bst.fault.domain.enums.FaultStatus;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
|
@ -30,6 +32,8 @@ public class FaultServiceImpl implements FaultService
|
|||
{
|
||||
@Autowired
|
||||
private FaultMapper faultMapper;
|
||||
@Autowired
|
||||
private DeviceService deviceService;
|
||||
|
||||
@Override
|
||||
public FaultVO selectFaultById(Long id, boolean scope) {
|
||||
|
@ -77,7 +81,9 @@ public class FaultServiceImpl implements FaultService
|
|||
{
|
||||
fault.setCreateTime(DateUtils.getNowDate());
|
||||
fault.setUserId(SecurityUtils.getLoginUser().getUserId());
|
||||
return faultMapper.insertFault(fault);
|
||||
DeviceVO vo = deviceService.selectDeviceBySn(fault.getVehicleNum());
|
||||
ServiceUtil.assertion(vo==null,"当前设备不存在");
|
||||
return faultMapper.insertFault(fault);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user