zengjia 打印显示数量

master
wanghao 2 days ago
parent 3e8a38698e
commit 1f943b57ca

@ -76,26 +76,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach> </foreach>
</delete> </delete>
<select id="iRecordInspectionTaskService" resultMap="RecordInspectionTaskResult"> <select id="iRecordInspectionTaskService" resultMap="RecordInspectionTaskResult">
select rit.objid, select rit.objid,
rit.inspection_id, rit.inspection_id,
area_id, area_id,
area_name, area_name,
plane_position, plane_position,
count(info.inspection_id) as sanQty, sanQty,
task_state, task_state,
rii.img_path rii.img_path
from record_inspection_task rit from record_inspection_task rit
left join record_inspection_img rii on rit.objid = rii.task_id left join record_inspection_img rii on rit.objid = rii.task_id
left join record_inspection_info as info on info.inspection_id=rit.inspection_id and left join (select count(inspection_id) as sanQty, location_code, inspection_id
info.location_code=plane_position from record_inspection_info
where inspection_id in
<foreach item="objid" collection="array" open="(" separator="," close=")">
#{objid}
</foreach>
group by location_code, inspection_id) as info
on info.inspection_id = rit.inspection_id and info.location_code = plane_position
where rit.inspection_id in 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>
group by info. location_code, rit.inspection_id;
</select> </select>
</mapper> </mapper>

@ -132,20 +132,22 @@
cardIds.forEach(v => { cardIds.forEach(v => {
let data = cardList.filter(i => i.objid === v) let data = cardList.filter(i => i.objid === v)
card += ` card += `
<div class="card" ${data.length >2 ? `style="width:calc(98% - 2px)"`:''}> <div class="card" ${data.length > 2 ? `style="width:calc(98% - 2px)"` : ''}>
<div class="left" ${data.length >2 ? `style="width:calc(25% - 2px)"`:''}> <div class="left" ${data.length > 2 ? `style="width:calc(25% - 2px)"` : ''}>
<div style="height: 100%;display: flex; flex-direction: column;justify-content: space-between;"> <div style="height: 100%;display: flex; flex-direction: column;justify-content: space-between;">
<div><span style="display: inline-block;width: 70px;text-align: right">机坪名称: </span><span style="display: inline-block;width:12px; "> </span>${data[0].areaName || ''}</div> <div><span style="display: inline-block;width: 70px;text-align: right">机坪名称: </span><span style="display: inline-block;width:12px; "> </span>${data[0].areaName || ''}</div>
<div><span style="display: inline-block;width: 70px;text-align: right">机位码: </span><span style="display: inline-block;width:12px; "> </span>${data[0].planePosition || ''}</div> <div><span style="display: inline-block;width: 70px;text-align: right">机位码: </span><span style="display: inline-block;width:12px; "> </span>${data[0].planePosition || ''}</div>
<div><span style="display: inline-block;width: 70px;text-align: right">扫码数量: </span><span style="display: inline-block;width:12px; "> </span>${data[0].sanQty || '0'}</div>
<div><span style="display: inline-block;width: 70px;text-align: right">巡检状态: </span><span style="display: inline-block;width:12px; "> </span>${data[0].taskState || ''}</div> <div><span style="display: inline-block;width: 70px;text-align: right">巡检状态: </span><span style="display: inline-block;width:12px; "> </span>${data[0].taskState || ''}</div>
</div> </div>
</div> </div>
<div class="right" ${data.length >2 ? `style="width:calc(75% - 2px)"`:''}> <div class="right" ${data.length > 2 ? `style="width:calc(75% - 2px)"` : ''}>
${ ${
data.map(vv => { data.map(vv => {
return ` return `
<div class="image1" style="width:calc(${100 / data.length}% - ${data.length}px)"> <div class="image1" style="width:calc(${100 / data.length}% - ${data.length}px)">
${vv.imgPath ? `<img src="${vv.imgPath }" alt="">` : ''} ${vv.imgPath ? `<img src="${vv.imgPath}" alt="">` : ''}
</div>` </div>`
}).join('') }).join('')
} }

Loading…
Cancel
Save