fix:检查结果接口提交

pg_adapter
wangxy 8 months ago
parent f4579ac6ee
commit f3616858ce

@ -44,6 +44,11 @@ public class CheckReportManager {
return checkReportService.selectTdCheckReportList(tdCheckReport); return checkReportService.selectTdCheckReportList(tdCheckReport);
} }
public List<TdCheckReport> selectTdCheckResultList(TdCheckReport tdCheckReport) {
return checkReportService.selectTdCheckResultList(tdCheckReport);
}
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public boolean saveOrUpdate(TdCheckReportDTO checkReportDTO) { public boolean saveOrUpdate(TdCheckReportDTO checkReportDTO) {
TdCheckReport tdCheckReport = Convert.convert(TdCheckReport.class, checkReportDTO); TdCheckReport tdCheckReport = Convert.convert(TdCheckReport.class, checkReportDTO);

@ -7,11 +7,9 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.TdCheck;
import com.ruoyi.system.domain.check.TdCheckReport; import com.ruoyi.system.domain.check.TdCheckReport;
import com.ruoyi.system.domain.check.TdCheckType; import com.ruoyi.system.domain.check.TdCheckType;
import com.ruoyi.system.domain.check.dto.TdCheckReportDTO; import com.ruoyi.system.domain.check.dto.TdCheckReportDTO;
import com.ruoyi.system.service.ITdCheckService;
import com.ruoyi.system.service.check.TdCheckTypeService; import com.ruoyi.system.service.check.TdCheckTypeService;
import com.ruoyi.web.controller.manager.CheckReportManager; import com.ruoyi.web.controller.manager.CheckReportManager;
import com.ruoyi.web.controller.manager.SysAreaManager; import com.ruoyi.web.controller.manager.SysAreaManager;
@ -52,7 +50,7 @@ public class TdCheckResultController extends BaseController {
@ResponseBody @ResponseBody
public TableDataInfo list(TdCheckReport tdCheckReport) { public TableDataInfo list(TdCheckReport tdCheckReport) {
startPage(); startPage();
List<TdCheckReport> tdCheckReports = checkReportManager.selectTdCheckReportList(tdCheckReport); List<TdCheckReport> tdCheckReports = checkReportManager.selectTdCheckResultList(tdCheckReport);
return getDataTable(tdCheckReports); return getDataTable(tdCheckReports);
} }
@ -64,7 +62,7 @@ public class TdCheckResultController extends BaseController {
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(TdCheckReport tdCheckReport) { public AjaxResult export(TdCheckReport tdCheckReport) {
List<TdCheckReport> tdCheckReports = checkReportManager.selectTdCheckReportList(tdCheckReport); List<TdCheckReport> tdCheckReports = checkReportManager.selectTdCheckResultList(tdCheckReport);
tdCheckReports.forEach(tdCheck1 -> { tdCheckReports.forEach(tdCheck1 -> {
tdCheck1.setFramework(sysAreaManager.getAreaName(tdCheck1.getFramework())); tdCheck1.setFramework(sysAreaManager.getAreaName(tdCheck1.getFramework()));
tdCheck1.setArea(sysAreaManager.getAreaName(tdCheck1.getArea())); tdCheck1.setArea(sysAreaManager.getAreaName(tdCheck1.getArea()));

@ -18,6 +18,9 @@ public interface TdCheckReportMapper extends BaseMapper<TdCheckReport> {
public List<TdCheckReport> selectTdCheckReportList(TdCheckReport tdCheckReport); public List<TdCheckReport> selectTdCheckReportList(TdCheckReport tdCheckReport);
public List<TdCheckReport> selectTdCheckResultList(TdCheckReport tdCheckReport);
public CheckResultCountDTO selectResultCount(); public CheckResultCountDTO selectResultCount();
public CheckTypeCountDTO selectTypeCount(); public CheckTypeCountDTO selectTypeCount();

@ -18,6 +18,8 @@ public interface TdCheckReportService extends IService<TdCheckReport> {
public List<TdCheckReport> selectTdCheckReportList(TdCheckReport tdCheckReport); public List<TdCheckReport> selectTdCheckReportList(TdCheckReport tdCheckReport);
public List<TdCheckReport> selectTdCheckResultList(TdCheckReport tdCheckReport);
public CheckResultCountDTO selectResultCount(); public CheckResultCountDTO selectResultCount();

@ -29,6 +29,11 @@ public class TdCheckReportServiceImpl extends ServiceImpl<TdCheckReportMapper, T
return checkReportMapper.selectTdCheckReportList(tdCheckReport); return checkReportMapper.selectTdCheckReportList(tdCheckReport);
} }
@Override
public List<TdCheckReport> selectTdCheckResultList(TdCheckReport tdCheckReport) {
return checkReportMapper.selectTdCheckResultList(tdCheckReport);
}
@Override @Override
public CheckResultCountDTO selectResultCount() { public CheckResultCountDTO selectResultCount() {
return checkReportMapper.selectResultCount(); return checkReportMapper.selectResultCount();

@ -34,11 +34,32 @@
AND framework = #{framework} AND framework = #{framework}
</if> </if>
<if test="checkState!=null and checkState!=''"> <if test="checkState!=null and checkState!=''">
AND checkState = #{checkState} AND check_state = #{checkState}
</if> </if>
<if test="depart!=null and depart!=''"> <if test="depart!=null and depart!=''">
AND depart = #{depart} AND depart = #{depart}
</if> </if>
AND (check_type = '0' or check_type is null)
</trim>
ORDER BY create_time DESC
</select>
<select id="selectTdCheckResultList" resultType="com.ruoyi.system.domain.check.TdCheckReport">
select <include refid="Base_Column_List"/> from td_check_report
<trim prefix="where" prefixOverrides="and|or">
<if test="area!=null and area!=''">
AND area = #{area}
</if>
<if test="framework!=null and framework!=''">
AND framework = #{framework}
</if>
<if test="checkState!=null and checkState!=''">
AND check_state = #{checkState}
</if>
<if test="depart!=null and depart!=''">
AND depart = #{depart}
</if>
AND check_type in (0,1)
</trim> </trim>
ORDER BY create_time DESC ORDER BY create_time DESC
</select> </select>

Loading…
Cancel
Save