OfficialDocumentReceivedMapper.xml 837 B

12345678910111213141516171819
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.xjrsoft.module.oa.mapper.OfficialDocumentReceivedMapper">
  6. <select id="getMaxReceivedNumber" resultType="java.lang.Integer">
  7. SELECT IFNULL(MAX(SUBSTR(received_number, 6, 3)), 0) + 1
  8. FROM official_document_received
  9. WHERE YEAR(received_date) = YEAR(NOW())
  10. and received_type = 'rt_administrative'
  11. </select>
  12. <select id="getMaxMeetingNumber" resultType="java.lang.Integer">
  13. SELECT IFNULL(MAX(SUBSTR(received_number, 6, 3)), 0) + 1
  14. FROM official_document_received
  15. WHERE YEAR(received_date) = YEAR(NOW())
  16. and received_type = 'rt_meeting'
  17. </select>
  18. </mapper>