|  |  | 
 |  |  |                      update_time, | 
 |  |  |                      memo | 
 |  |  |               FROM man_qly_ispt_item qii | 
 |  |  |                        LEFT JOIN man_qly_inspect_result qir ON qii.id = qir.ispt_item_id) t ${ew.customSqlSegment} | 
 |  |  |                        LEFT JOIN man_qly_inspect_result qir ON qii.id = qir.ispt_item_id) t | 
 |  |  |             ${ew.customSqlSegment} | 
 |  |  |     </select> | 
 |  |  |     <select id="selectIsptResult" resultType="com.vincent.rsf.server.manager.entity.QlyIsptItem"> | 
 |  |  |         SELECT * | 
 |  |  |         FROM (SELECT qii.id, | 
 |  |  |                      ispect_id, | 
 |  |  |                      asn_item_id, | 
 |  |  |                      matnr_code, | 
 |  |  |                      maktx, | 
 |  |  |                      qii.rcpt_id, | 
 |  |  |                      splr_name, | 
 |  |  |                      splr_batch, | 
 |  |  |                      rcpt_qty, | 
 |  |  |                      dly_qty, | 
 |  |  |                      track_code, | 
 |  |  |                      pic_path, | 
 |  |  |                      `status`, | 
 |  |  |                      deleted, | 
 |  |  |                      tenant_id, | 
 |  |  |                      create_by, | 
 |  |  |                      COALESCE((SELECT anfme FROM man_qly_inspect_result WHERE qii.id = ispt_item_id AND ispt_result = 1), 0)  AS safe_qty, | 
 |  |  |                      COALESCE((SELECT anfme FROM man_qly_inspect_result WHERE qii.id = ispt_item_id AND ispt_result = 2), 0) AS dis_qty, | 
 |  |  |                      create_time, | 
 |  |  |                      update_by, | 
 |  |  |                      update_time, | 
 |  |  |                      memo | 
 |  |  |               FROM man_qly_ispt_item qii) t | 
 |  |  |             ${ew.customSqlSegment} | 
 |  |  |  | 
 |  |  |     </select> | 
 |  |  | </mapper> |