| | |
| | | @Select("select count(*) from document_materials where title=#{title} and page_number<#{pageNumber} and stage=#{stage} and record_id=#{recordId}") |
| | | Long getMaxPageOrder(@Param("title")String title,@Param("pageNumber") Long pageNumber,@Param("stage") String stage, @Param("recordId") Long recordId); |
| | | |
| | | //计算文件的序号 |
| | | @Select("select count(distinct(title))-1 from document_materials where page_number<=#{pageNumber} and record_id=#{recordId}") |
| | | //计算文件的序号,title有可能重复 |
| | | @Select("select count(distinct(concat_ws(',', title, stage)))-1 from document_materials where page_number<=#{pageNumber} and record_id=#{recordId}") |
| | | Long getFileNumber(@Param("pageNumber") Long pageNumber, @Param("recordId") Long recordId); |
| | | |
| | | |
| | |
| | | |
| | | @Select("select if(count(*) < max(page_number), false, true) as res from document_materials where record_id=#{recordId}") |
| | | boolean isPageNumberLegal(@Param("recordId") int recordId); |
| | | |
| | | |
| | | //拿到除其它材料之外的全部数据的个数 |
| | | @Select("select count(*) FROM document_materials where file_style!='其他材料' and record_id=#{recordId}") |
| | | int getCount(@Param("recordId") int recordId); |
| | | } |