| | |
| | | from stock_uninventory su |
| | | left join product_model pm on su.product_model_id = pm.id |
| | | left join product p on pm.product_id = p.id |
| | | left join manufacturer m on su.manufacturer_id = m.id |
| | | </sql> |
| | | |
| | | <sql id="WastePageColumns"> |
| | |
| | | pm.model, |
| | | pm.unit, |
| | | p.product_name, |
| | | m.name as manufacturer_name, |
| | | su.source |
| | | </sql> |
| | | |
| | |
| | | pm.model, |
| | | pm.unit, |
| | | p.product_name, |
| | | m.name as manufacturer_name, |
| | | su.source |
| | | <include refid="BaseWasteFromClause" /> |
| | | <where> |
| | |
| | | su.*, |
| | | pm.model, |
| | | pm.unit, |
| | | p.product_name, |
| | | m.name as manufacturer_name |
| | | p.product_name |
| | | <include refid="BaseWasteFromClause" /> |
| | | <where> |
| | | <if test="ew.type != null and ew.type != ''"> |
| | |
| | | pm.model, |
| | | pm.unit, |
| | | p.product_name, |
| | | m.name as manufacturer_name, |
| | | su.source, |
| | | su.type, |
| | | GROUP_CONCAT(DISTINCT su.batch_no ORDER BY su.batch_no SEPARATOR ',') as batch_no, |
| | |
| | | and p.id in (select id from product_tree) |
| | | </if> |
| | | </where> |
| | | group by su.product_model_id, su.type, pm.model, pm.unit, p.id, p.product_name, m.name, su.source |
| | | group by su.product_model_id |
| | | order by max(su.update_time) desc, su.product_model_id desc |
| | | </select> |
| | | |
| | |
| | | su.id, |
| | | p.product_name, |
| | | pm.model, |
| | | m.name as manufacturer_name, |
| | | su.source, |
| | | pm.unit, |
| | | su.batch_no, |
| | |
| | | from stock_uninventory su |
| | | left join product_model pm on su.product_model_id = pm.id |
| | | left join product p on pm.product_id = p.id |
| | | left join manufacturer m on su.manufacturer_id = m.id |
| | | <where> |
| | | and su.type = 'waste' |
| | | <if test="ew.productModelId != null and ew.productModelId > 0"> |