Parcourir la source

年份数据BUG处理

小么熊🐻 il y a 1 an
Parent
commit
71e7f59a18

+ 1 - 1
jsjp-service/src/main/resources/mapper/tms/TmsStudentInfoMapper.xml

@@ -293,7 +293,7 @@
         from tms_student_info@tms${city} t
         where 1=1
           and t.tso_school_id = #{schoolId}
-          and trunc(t.tso_applydate,'MONTH') = ADD_MONTHS(TRUNC(SYSDATE, 'MONTH'), #{month})
+          and  TO_CHAR(t.tso_applydate, 'yyyy') = TO_CHAR(ADD_MONTHS(sysdate, #{month}), 'YYYY')
         group by to_char(tso_applydate, 'yyyy')
         order by to_char(tso_applydate, 'yyyy')
     </select>