修改 打印数据

master
wanghao 2 weeks ago
parent 10d3cea5f6
commit 419f8294c8

@ -4,6 +4,7 @@ import java.util.List;
import com.ruoyi.manage.domain.RecordInspectionImg; import com.ruoyi.manage.domain.RecordInspectionImg;
import com.ruoyi.manage.domain.RecordInspectionInfo; import com.ruoyi.manage.domain.RecordInspectionInfo;
import com.ruoyi.manage.domain.RecordInspectionTask;
import com.ruoyi.manage.service.IRecordInspectionImgService; import com.ruoyi.manage.service.IRecordInspectionImgService;
import com.ruoyi.manage.service.IRecordInspectionInfoService; import com.ruoyi.manage.service.IRecordInspectionInfoService;
import com.ruoyi.manage.service.IRecordInspectionTaskService; import com.ruoyi.manage.service.IRecordInspectionTaskService;
@ -37,8 +38,8 @@ public class RecordInspectionController extends BaseController {
private String prefix = "manage/record_inspection"; private String prefix = "manage/record_inspection";
@Autowired @Autowired
private IRecordInspectionTaskService iRecordInspectionTaskService; private IRecordInspectionTaskService iRecordInspectionTaskService;
@Autowired // @Autowired
private IRecordInspectionImgService recordInspectionImgService; // private IRecordInspectionImgService recordInspectionImgService;
@Autowired @Autowired
private IRecordInspectionService recordInspectionService; private IRecordInspectionService recordInspectionService;
@ -57,10 +58,10 @@ public class RecordInspectionController extends BaseController {
public String print(String ids) { public String print(String ids) {
System.out.println(ids); System.out.println(ids);
List<RecordInspectionInfo> list=iRecordInspectionTaskService.selectTaskInfoByInspectionId(ids); List<RecordInspectionTask> list=iRecordInspectionTaskService.selectTaskInfoByInspectionId(ids);
System.out.println("巡检记录"+list.size()); System.out.println("巡检记录"+list.toString());
List<RecordInspectionImg> recordInspectionImgs = recordInspectionImgService.selectImgByInspectionId(ids); // List<RecordInspectionImg> recordInspectionImgs = recordInspectionImgService.selectImgByInspectionId(ids);
System.out.println("巡检图片"+recordInspectionImgs.size()); // System.out.println("巡检图片"+recordInspectionImgs.size());
return prefix +""; return prefix +"";
} }

@ -35,8 +35,17 @@ public class RecordInspectionTask extends BaseEntity
/** 完成状态 */ /** 完成状态 */
@Excel(name = "完成状态") @Excel(name = "完成状态")
private String taskState; private String taskState;
private String imgPath;
public void setObjid(Long objid) public String getImgPath() {
return imgPath;
}
public void setImgPath(String imgPath) {
this.imgPath = imgPath;
}
public void setObjid(Long objid)
{ {
this.objid = objid; this.objid = objid;
} }

@ -62,5 +62,5 @@ public interface RecordInspectionTaskMapper
*/ */
public int deleteRecordInspectionTaskByObjids(String[] objids); public int deleteRecordInspectionTaskByObjids(String[] objids);
List<RecordInspectionInfo> iRecordInspectionTaskService(String[] strArray); List<RecordInspectionTask> iRecordInspectionTaskService(String[] strArray);
} }

@ -61,5 +61,5 @@ public interface IRecordInspectionTaskService
*/ */
public int deleteRecordInspectionTaskByObjid(Long objid); public int deleteRecordInspectionTaskByObjid(Long objid);
List<RecordInspectionInfo> selectTaskInfoByInspectionId(String ids); List<RecordInspectionTask> selectTaskInfoByInspectionId(String ids);
} }

@ -95,7 +95,7 @@ public class RecordInspectionTaskServiceImpl implements IRecordInspectionTaskSer
} }
@Override @Override
public List<RecordInspectionInfo> selectTaskInfoByInspectionId(String ids) { public List<RecordInspectionTask> selectTaskInfoByInspectionId(String ids) {
return recordInspectionTaskMapper.iRecordInspectionTaskService(Convert.toStrArray(ids)); return recordInspectionTaskMapper.iRecordInspectionTaskService(Convert.toStrArray(ids));
} }
} }

@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="areaName" column="area_name" /> <result property="areaName" column="area_name" />
<result property="planePosition" column="plane_position" /> <result property="planePosition" column="plane_position" />
<result property="taskState" column="task_state" /> <result property="taskState" column="task_state" />
<result property="imgPath" column="img_path" />
</resultMap> </resultMap>
<sql id="selectRecordInspectionTaskVo"> <sql id="selectRecordInspectionTaskVo">
@ -73,8 +74,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach> </foreach>
</delete> </delete>
<select id="iRecordInspectionTaskService" resultMap="RecordInspectionTaskResult"> <select id="iRecordInspectionTaskService" resultMap="RecordInspectionTaskResult">
<include refid="selectRecordInspectionTaskVo"/>
where inspection_id in select rit.objid, rit.inspection_id, area_id, area_name, plane_position, task_state,
rii.img_path
from record_inspection_task rit
left join bg_wheel_chocks.record_inspection_img rii on rit.objid = rii.task_id
where rit.inspection_id in
<foreach item="objid" collection="array" open="(" separator="," close=")"> <foreach item="objid" collection="array" open="(" separator="," close=")">
#{objid} #{objid}
</foreach> </foreach>

Loading…
Cancel
Save