| | |
| | | WHERE stock_type1 = 1 |
| | | AND type1 = 0 |
| | | <if test="startTime!=null and startTime!=''"> |
| | | and time1 >= #{stock.startTime} |
| | | and time1 >= #{startTime} |
| | | </if> |
| | | <if test="endTime!=null and endTime!=''"> |
| | | and time1 <= #{stock.endTime} |
| | | and time1 <= #{endTime} |
| | | </if> |
| | | GROUP BY stock_id1) cg ON cg.stock_id1 = a.id |
| | | LEFT JOIN (SELECT stock_id1, SUM(census) AS dbrknum |
| | |
| | | WHERE stock_type1 = 1 |
| | | AND type1 = 1 |
| | | <if test="startTime!=null and startTime!=''"> |
| | | and time1 >= #{stock.startTime} |
| | | and time1 >= #{startTime} |
| | | </if> |
| | | <if test="endTime!=null and endTime!=''"> |
| | | and time1 <= #{stock.endTime} |
| | | and time1 <= #{endTime} |
| | | </if> |
| | | GROUP BY stock_id1) dbr ON dbr.stock_id1 = a.id |
| | | LEFT JOIN (SELECT stock_id1, SUM(census) AS lycknum |
| | |
| | | WHERE stock_type1 = 0 |
| | | AND type1 = 0 |
| | | <if test="startTime!=null and startTime!=''"> |
| | | and time1 >= #{stock.startTime} |
| | | and time1 >= #{startTime} |
| | | </if> |
| | | <if test="endTime!=null and endTime!=''"> |
| | | and time1 <= #{stock.endTime} |
| | | and time1 <= #{endTime} |
| | | </if> |
| | | GROUP BY stock_id1) lyc ON lyc.stock_id1 = a.id |
| | | LEFT JOIN (SELECT stock_id1, SUM(census) AS dbcknum |
| | |
| | | WHERE stock_type1 = 0 |
| | | AND type1 = 1 |
| | | <if test="startTime!=null and startTime!=''"> |
| | | and time1 >= #{stock.startTime} |
| | | and time1 >= #{startTime} |
| | | </if> |
| | | <if test="endTime!=null and endTime!=''"> |
| | | and time1 <= #{stock.endTime} |
| | | and time1 <= #{endTime} |
| | | </if> |
| | | GROUP BY stock_id1) dbc ON dbc.stock_id1 = a.id |
| | | LEFT JOIN (SELECT stock_id1, SUM(census) AS bfcknum |
| | |
| | | WHERE stock_type1 = 0 |
| | | AND type1 = 2 |
| | | <if test="startTime!=null and startTime!=''"> |
| | | and time1 >= #{stock.startTime} |
| | | and time1 >= #{startTime} |
| | | </if> |
| | | <if test="endTime!=null and endTime!=''"> |
| | | and time1 <= #{stock.endTime} |
| | | and time1 <= #{endTime} |
| | | </if> |
| | | GROUP BY stock_id1) bfc ON bfc.stock_id1 = a.id |
| | | </select> |