text:修改故障展示(改为双表)

master
袁子龙 2024-09-26 11:32:49 +08:00 committed by Liu Wu
parent 35f694f7b2
commit 79f2041468
8 changed files with 23 additions and 2 deletions

View File

@ -42,6 +42,8 @@ public class SysCarFaultController extends BaseController
return getDataTable(list);
}
/**
*
*/

View File

@ -31,8 +31,10 @@ public class SysCarFaultLog extends BaseEntity {
private Long id;
/** 故障码编码 */
@Excel(name = "故障码编码")
private Integer sysCarFaultId;
@Excel(name = "故障码编码")
private String faultCode;
/**记录时间*/
@Excel(name = "记录时间")

View File

@ -1,6 +1,7 @@
package com.muyu.breakdown.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.breakdown.domain.SysCarFault;
import com.muyu.breakdown.domain.SysCarFaultLog;
import com.muyu.breakdown.domain.SysCarFaultMessage;
import org.apache.ibatis.annotations.Mapper;
@ -22,4 +23,9 @@ public interface SysCarFaultLogMapper extends BaseMapper<SysCarFaultLog> {
public List<SysCarFaultLog> listIsReadAlready( );
@Select("select * from sys_car_fault_log where is_read=2")
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);
}

View File

@ -27,4 +27,7 @@ public interface SysCarFaultMapper extends BaseMapper<SysCarFault>{
*/
public List<SysCarFault> selectSysCarFaultIds(String[] ids);
}

View File

@ -1,6 +1,7 @@
package com.muyu.breakdown.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.muyu.breakdown.domain.SysCarFault;
import com.muyu.breakdown.domain.SysCarFaultMessage;
import org.apache.ibatis.annotations.Mapper;
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")
public List<SysCarFaultMessage>listStatusTwo( );
}

View File

@ -28,6 +28,7 @@ public interface SysCarFaultService extends IService<SysCarFault> {
*/
public List<SysCarFault> selectSysCarFaultList(SysCarFault sysCarFault);
/**
* faultCode()
* @param faultCode

View File

@ -67,6 +67,8 @@ public class SysCarFaultServiceImpl
return this.list(queryWrapper);
}
/**
*
* @param faultCode

View File

@ -26,6 +26,8 @@ import java.util.List;
public class sysCarFaultLogServiceImpl extends ServiceImpl<SysCarFaultLogMapper, SysCarFaultLog> implements SysCarFaultLogService {
@Autowired
private SysCarFaultLogMapper sysCarFaultLogMapper;
@Override
public List<SysCarFaultLog> selectSysCarFaultLogList(SysCarFaultLog sysCarFaultLog) {
@ -36,7 +38,7 @@ public class sysCarFaultLogServiceImpl extends ServiceImpl<SysCarFaultLogMapper,
if (sysCarFaultLog.getStatus()!=null){
wrapper.eq(SysCarFaultLog::getStatus,sysCarFaultLog.getStatus());
}
return this.list(wrapper);
return sysCarFaultLogMapper.list(sysCarFaultLog);
}
/**