| | |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.mes.largenscreen.entity.PieChartVO; |
| | | import com.mes.temperingglass.entity.TemperingGlassInfo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | |
| | | "deleted = CASE WHEN #{state} < 8 THEN 0 ELSE deleted END " + |
| | | "WHERE glass_id = #{glassId}") |
| | | Integer updateTemperingGlassInfo(TemperingGlassInfo temperingGlassInfo); |
| | | |
| | | @Select("SELECT\n" + |
| | | "\tround( SUM ( CASE WHEN state <> - 1 AND state <> 8 THEN 1 ELSE 0 END ), 2 ) AS oneCompletedQuantity,\n" + |
| | | "\tround( SUM ( CASE WHEN state <> - 1 AND state <> 8 THEN CAST ( width AS FLOAT ) * height / 1000000 ELSE 0 END ), 2 ) AS oneCompletedArea,\n" + |
| | | "\tround( SUM ( CASE WHEN state = 8 THEN 1 ELSE 0 END ), 2 ) AS oneDamageQuantity,\n" + |
| | | "\tround( SUM ( CASE WHEN state = 8 THEN CAST ( width AS FLOAT ) * height / 1000000 ELSE 0 END ), 2 ) AS oneDamageArea,\n" + |
| | | "\tround( SUM ( CASE WHEN state = - 1 THEN 1 ELSE 0 END ), 2 ) AS oneUncompletedQuantity,\n" + |
| | | "\tround(SUM ( CASE WHEN state = - 1 THEN CAST ( width AS FLOAT ) * height / 1000000 ELSE 0 END ), 2 ) AS oneUncompletedArea \n" + |
| | | "FROM\n" + |
| | | "\ttempering_glass_info \n" + |
| | | "WHERE\n" + |
| | | "\tCONVERT ( DATE, create_time ) = CONVERT ( DATE, getdate( ) )") |
| | | List<PieChartVO> queryPieChart(); |
| | | } |