text:修改故障展示(改为双表)
parent
89a39a07fa
commit
da110e67bd
|
@ -42,6 +42,8 @@ public class SysCarFaultController extends BaseController
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出车辆故障管理列表
|
* 导出车辆故障管理列表
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -31,8 +31,10 @@ public class SysCarFaultLog extends BaseEntity {
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 故障码编码 */
|
/** 故障码编码 */
|
||||||
@Excel(name = "故障码编码")
|
|
||||||
private Integer sysCarFaultId;
|
private Integer sysCarFaultId;
|
||||||
|
@Excel(name = "故障码编码")
|
||||||
|
private String faultCode;
|
||||||
|
|
||||||
/**记录时间*/
|
/**记录时间*/
|
||||||
@Excel(name = "记录时间")
|
@Excel(name = "记录时间")
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.muyu.breakdown.mapper;
|
package com.muyu.breakdown.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.muyu.breakdown.domain.SysCarFault;
|
||||||
import com.muyu.breakdown.domain.SysCarFaultLog;
|
import com.muyu.breakdown.domain.SysCarFaultLog;
|
||||||
import com.muyu.breakdown.domain.SysCarFaultMessage;
|
import com.muyu.breakdown.domain.SysCarFaultMessage;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
@ -22,4 +23,9 @@ public interface SysCarFaultLogMapper extends BaseMapper<SysCarFaultLog> {
|
||||||
public List<SysCarFaultLog> listIsReadAlready( );
|
public List<SysCarFaultLog> listIsReadAlready( );
|
||||||
@Select("select * from sys_car_fault_log where is_read=2")
|
@Select("select * from sys_car_fault_log where is_read=2")
|
||||||
public List<SysCarFaultLog>listISReadNotYet( );
|
public List<SysCarFaultLog>listISReadNotYet( );
|
||||||
|
|
||||||
|
|
||||||
|
@Select("SELECT fault.fault_code,log.update_time,log.create_time,log.vin,log.status FROM sys_car_fault_log log \n" +
|
||||||
|
"LEFT JOIN sys_car_fault fault on log.sys_car_fault_id=fault.id ")
|
||||||
|
public List<SysCarFaultLog>list(SysCarFaultLog SysCarFaultLog);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,4 +27,7 @@ public interface SysCarFaultMapper extends BaseMapper<SysCarFault>{
|
||||||
*/
|
*/
|
||||||
public List<SysCarFault> selectSysCarFaultIds(String[] ids);
|
public List<SysCarFault> selectSysCarFaultIds(String[] ids);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.muyu.breakdown.mapper;
|
package com.muyu.breakdown.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.muyu.breakdown.domain.SysCarFault;
|
||||||
import com.muyu.breakdown.domain.SysCarFaultMessage;
|
import com.muyu.breakdown.domain.SysCarFaultMessage;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
@ -23,4 +24,6 @@ public interface SysCarFaultMessageMapper extends BaseMapper<SysCarFaultMessage>
|
||||||
@Select("select * from sys_car_fault_message where status=2")
|
@Select("select * from sys_car_fault_message where status=2")
|
||||||
public List<SysCarFaultMessage>listStatusTwo( );
|
public List<SysCarFaultMessage>listStatusTwo( );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ public interface SysCarFaultService extends IService<SysCarFault> {
|
||||||
*/
|
*/
|
||||||
public List<SysCarFault> selectSysCarFaultList(SysCarFault sysCarFault);
|
public List<SysCarFault> selectSysCarFaultList(SysCarFault sysCarFault);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断 车辆故障管理 faultCode(故障码)是否唯一
|
* 判断 车辆故障管理 faultCode(故障码)是否唯一
|
||||||
* @param faultCode 车辆故障管理
|
* @param faultCode 车辆故障管理
|
||||||
|
|
|
@ -67,6 +67,8 @@ public class SysCarFaultServiceImpl
|
||||||
return this.list(queryWrapper);
|
return this.list(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 唯一 判断
|
* 唯一 判断
|
||||||
* @param faultCode 车辆故障管理
|
* @param faultCode 车辆故障管理
|
||||||
|
|
|
@ -26,6 +26,8 @@ import java.util.List;
|
||||||
public class sysCarFaultLogServiceImpl extends ServiceImpl<SysCarFaultLogMapper, SysCarFaultLog> implements SysCarFaultLogService {
|
public class sysCarFaultLogServiceImpl extends ServiceImpl<SysCarFaultLogMapper, SysCarFaultLog> implements SysCarFaultLogService {
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysCarFaultLogMapper sysCarFaultLogMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SysCarFaultLog> selectSysCarFaultLogList(SysCarFaultLog sysCarFaultLog) {
|
public List<SysCarFaultLog> selectSysCarFaultLogList(SysCarFaultLog sysCarFaultLog) {
|
||||||
|
@ -36,7 +38,7 @@ public class sysCarFaultLogServiceImpl extends ServiceImpl<SysCarFaultLogMapper,
|
||||||
if (sysCarFaultLog.getStatus()!=null){
|
if (sysCarFaultLog.getStatus()!=null){
|
||||||
wrapper.eq(SysCarFaultLog::getStatus,sysCarFaultLog.getStatus());
|
wrapper.eq(SysCarFaultLog::getStatus,sysCarFaultLog.getStatus());
|
||||||
}
|
}
|
||||||
return this.list(wrapper);
|
return sysCarFaultLogMapper.list(sysCarFaultLog);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue