回退 'Pull Request !76 : 修复首页查询日期范围bug,2月没有31号,会报错'

This commit is contained in:
季圣华
2021-06-08 17:45:37 +08:00
committed by Gitee
parent 86b640bfa8
commit 71d02f23b4

View File

@@ -213,7 +213,7 @@
and dh.type='${type}' and dh.sub_type='${subType}' and dh.type='${type}' and dh.sub_type='${subType}'
and di.material_id =${MId} and di.material_id =${MId}
and dh.oper_time >= '${MonthTime}-01 00:00:00' and dh.oper_time >= '${MonthTime}-01 00:00:00'
and dh.oper_time < DATE_ADD(STR_TO_DATE('${MonthTime}','%Y-%m'),INTERVAL 1 MONTH ) and dh.oper_time <= '${MonthTime}-31 23:59:59'
and ifnull(dh.delete_flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
and ifnull(di.delete_flag,'0') !='1' and ifnull(di.delete_flag,'0') !='1'
</select> </select>
@@ -224,7 +224,7 @@
and dh.type='${type}' and dh.sub_type='${subType}' and dh.type='${type}' and dh.sub_type='${subType}'
and di.material_id =${MId} and di.material_id =${MId}
and dh.oper_time &gt;= '${MonthTime}-01 00:00:00' and dh.oper_time &gt;= '${MonthTime}-01 00:00:00'
and dh.oper_time &lt; DATE_ADD(STR_TO_DATE('${MonthTime}','%Y-%m'),INTERVAL 1 MONTH ) and dh.oper_time &lt;= '${MonthTime}-31 23:59:59'
and ifnull(dh.delete_flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
and ifnull(di.delete_flag,'0') !='1' and ifnull(di.delete_flag,'0') !='1'
</select> </select>
@@ -234,7 +234,7 @@
where 1=1 where 1=1
and dh.type='${type}' and dh.sub_type='${subType}' and dh.type='${type}' and dh.sub_type='${subType}'
and dh.oper_time &gt;= '${MonthTime}-01 00:00:00' and dh.oper_time &gt;= '${MonthTime}-01 00:00:00'
and dh.oper_time &lt; DATE_ADD(STR_TO_DATE('${MonthTime}','%Y-%m'),INTERVAL 1 MONTH ) and dh.oper_time &lt;= '${MonthTime}-31 23:59:59'
and ifnull(dh.delete_flag,'0') !='1' and ifnull(dh.delete_flag,'0') !='1'
</select> </select>