fix(Mapper/stock): 修复日期查询问题

+ 修复了入库记录无法根据日期查询的问题
    + 通过改进SQL解决
+ 修复了物资管理无法根据日期查询的问题
     + 通过改进SQL解决
This commit is contained in:
HashMap 2025-08-26 17:08:12 +08:00
parent 4f7cc0573d
commit a7fd5f303f
3 changed files with 4 additions and 1 deletions

View File

@ -47,6 +47,7 @@ public class WzStockInController extends BaseController
{
startPage();
List<WzStockIn> list = wzStockInService.selectWzStockInList(wzStockIn);
logger.debug(wzStockIn.toString());
return getDataTable(list);
}

View File

@ -26,7 +26,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectWzMaterialsManagementVo"/>
<where>
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
<if test="params.beginProductionDate != null and params.beginProductionDate != '' and params.endProductionDate != null and params.endProductionDate != ''"> and production_date between #{params.beginProductionDate} and #{params.endProductionDate}</if>
<if test="params.beginProductionDate != null and params.endProductionDate != null"> and production_date between #{params.beginProductionDate} and #{params.endProductionDate}</if>
<if test="productionDate != null"> and production_date = #{productionDate}</if>
</where>
</select>

View File

@ -41,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="businessType != null and businessType != ''"> and business_type = #{businessType}</if>
<if test="repositoryName != null and repositoryName != ''"> and repository_name like concat('%', #{repositoryName}, '%')</if>
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
<if test="docDate != null"> and doc_date = #{docDate}</if>
</where>
</select>