<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xjrsoft.module.oa.mapper.OfficialDocumentPostMapper">
    <select id="getMaxPostNumber" resultType="java.lang.Integer">
        SELECT IFNULL(MAX(SUBSTR(post_number, 6, 3)), 0) + 1 FROM official_document_post WHERE YEAR(post_date) = YEAR(NOW())
    </select>

</mapper>