修改 打印数据

master
wanghao 2 weeks ago
parent 419f8294c8
commit bd83b3c730

@ -57,11 +57,10 @@ public class RecordInspectionController extends BaseController {
@GetMapping("/print") @GetMapping("/print")
public String print(String ids) { public String print(String ids) {
System.out.println(ids); System.out.println(ids);
List<RecordInspection> list = recordInspectionService.selectListByids(ids);
List<RecordInspectionTask> infolist=iRecordInspectionTaskService.selectTaskInfoByInspectionId(ids);
List<RecordInspectionTask> list=iRecordInspectionTaskService.selectTaskInfoByInspectionId(ids);
System.out.println("巡检记录"+list.toString());
// List<RecordInspectionImg> recordInspectionImgs = recordInspectionImgService.selectImgByInspectionId(ids);
// System.out.println("巡检图片"+recordInspectionImgs.size());
return prefix +""; return prefix +"";
} }

@ -109,6 +109,7 @@ public class RecordInspectionTask extends BaseEntity
.append("areaName", getAreaName()) .append("areaName", getAreaName())
.append("planePosition", getPlanePosition()) .append("planePosition", getPlanePosition())
.append("taskState", getTaskState()) .append("taskState", getTaskState())
.append("imgPath", getImgPath())
.toString(); .toString();
} }
} }

@ -61,4 +61,6 @@ public interface RecordInspectionMapper
public int deleteRecordInspectionByInspectionIds(String[] inspectionIds); public int deleteRecordInspectionByInspectionIds(String[] inspectionIds);
int countInsertRecordNumber(); int countInsertRecordNumber();
List<RecordInspection> selectListByids(String[] strArray);
} }

@ -60,4 +60,5 @@ public interface IRecordInspectionService
public int deleteRecordInspectionByInspectionId(Long inspectionId); public int deleteRecordInspectionByInspectionId(Long inspectionId);
List<RecordInspection> selectListByids(String ids);
} }

@ -93,5 +93,10 @@ public class RecordInspectionServiceImpl implements IRecordInspectionService {
return recordInspectionMapper.deleteRecordInspectionByInspectionId(inspectionId); return recordInspectionMapper.deleteRecordInspectionByInspectionId(inspectionId);
} }
@Override
public List<RecordInspection> selectListByids(String ids) {
return recordInspectionMapper.selectListByids(Convert.toStrArray(ids));
}
} }

@ -82,5 +82,20 @@
<select id="countInsertRecordNumber" resultType="integer"> <select id="countInsertRecordNumber" resultType="integer">
select count(inspection_id) from record_inspection where date(inspection_time)= date(now()) select count(inspection_id) from record_inspection where date(inspection_time)= date(now())
</select> </select>
<select id="selectListByids" resultMap="RecordInspectionResult">
select ri.inspection_id,
inspection_time,
inspection_user,
count(rii.inspection_id) as total_number,
count(if(inspection_state = '正常', true, null)) as normal_number,
count(if(inspection_state = '异常', true, null)) as abnormal_number,
count(if(inspection_state = '跳过', true, null)) as skip_number
from record_inspection ri
left join record_inspection_info rii on ri.inspection_id = rii.inspection_id
where ri.inspection_id in
<foreach item="inspectionId" collection="array" open="(" separator="," close=")">
#{inspectionId}
</foreach>
group by ri.inspection_id
</select>
</mapper> </mapper>
Loading…
Cancel
Save