Compare commits

...

2 Commits

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

@ -35,8 +35,17 @@ public class RecordInspectionTask extends BaseEntity
/** 完成状态 */
@Excel(name = "完成状态")
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;
}
@ -100,6 +109,7 @@ public class RecordInspectionTask extends BaseEntity
.append("areaName", getAreaName())
.append("planePosition", getPlanePosition())
.append("taskState", getTaskState())
.append("imgPath", getImgPath())
.toString();
}
}

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

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

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

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

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

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

@ -82,5 +82,20 @@
<select id="countInsertRecordNumber" resultType="integer">
select count(inspection_id) from record_inspection where date(inspection_time)= date(now())
</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>

@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="areaName" column="area_name" />
<result property="planePosition" column="plane_position" />
<result property="taskState" column="task_state" />
<result property="imgPath" column="img_path" />
</resultMap>
<sql id="selectRecordInspectionTaskVo">
@ -73,8 +74,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<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=")">
#{objid}
</foreach>

Loading…
Cancel
Save