Browse Source

处理数据库账期数据null导致的错误

chenw 7 years ago
parent
commit
01c656944b

+ 1 - 1
applications/commons/commons-server/src/main/resources/mapper/EndProductMapper.xml

@@ -8,7 +8,7 @@
     </parameterMap>
 
     <select id="selectPeriod" resultType="string">
-        select PD_DETNO from periodsdetail where companyid=#{companyId} and pd_status=0 order by PD_DETNO LIMIT 1;
+        select PD_DETNO from periodsdetail where companyid=#{companyId} and pd_detno is not null and pd_status=0 order by PD_DETNO LIMIT 1;
     </select>
     <select id="selectUnPeriod" resultType="string">
         select PD_DETNO from periodsdetail where companyid=#{companyId} and pd_status=99 order by PD_DETNO desc LIMIT 1;