新增查询库存明细接口

This commit is contained in:
2025-10-17 12:01:58 +08:00
parent 1491d0a67b
commit 69d07fcdf4
6 changed files with 92 additions and 1 deletions

View File

@@ -232,4 +232,25 @@ public class RkInfoController extends BaseController
List<RkInfo> list = rkInfoService.selectDeliveryAll(query);
return AjaxResult.success(list);
}
/**
* 分页查询 rk_info 所有明细
* @param
* @return
*/
@PostMapping("/page")
public TableDataInfo page(@RequestBody(required = false) RkInfoQueryDTO dto) {
if (dto == null) {
dto = new RkInfoQueryDTO();
}
// 使用 PageHelper 分页
PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
List<RkInfo> list = rkInfoService.selectAllRkInfo(dto);
return getDataTable(list);
}
}

View File

@@ -501,7 +501,7 @@ public class RkInfo extends BaseEntity
.append("isChuku", getIsChuku())
.append("billNo", getBillNo())
.append("billNoCk", getBillNoCk())
.append("isDelivery", getBillNoCk())
.append("isDelivery", getIsDelivery())
.append("remark", getRemark())
.append("xj", getXj())
.append("xmNo", getXmNo())

View File

@@ -228,4 +228,10 @@ public interface RkInfoMapper
* @return
*/
List<RkInfo> selectDeliveryAll(RkInfo query);
/**
* 查询 rk_info 全量明细(仅未删除)
*/
List<RkInfo> selectAllRkInfo(RkInfo query);
}

View File

@@ -161,4 +161,10 @@ public interface IRkInfoService
* @return
*/
List<RkInfo> selectDeliveryAll(RkInfo query);
/**
* 分页查询 rk_info 所有明细(仅未删除)
*/
List<RkInfo> selectAllRkInfo(RkInfo query);
}

View File

@@ -993,4 +993,9 @@ public class RkInfoServiceImpl implements IRkInfoService
public List<RkInfo> selectDeliveryAll(RkInfo query) {
return rkInfoMapper.selectDeliveryAll(query);
}
@Override
public List<RkInfo> selectAllRkInfo(RkInfo query) {
return rkInfoMapper.selectAllRkInfo(query);
}
}

View File

@@ -945,5 +945,58 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ORDER BY ri.ly_time DESC, ri.id DESC
</select>
<!-- 分页查询 rk_info 全量明细(支持 keyword 模糊过滤) -->
<select id="selectAllRkInfo"
parameterType="com.zg.project.wisdom.domain.RkInfo"
resultMap="RkInfoResult">
<include refid="selectRkInfoVo"/>
<where>
(ri.is_delete = '0' OR ri.is_delete = 0 OR ri.is_delete IS NULL)
<!-- keyword 模糊 -->
<if test="keyword != null and keyword != ''">
AND (
ri.xm_no LIKE CONCAT('%', #{keyword}, '%')
OR ri.xm_ms LIKE CONCAT('%', #{keyword}, '%')
OR ri.wl_no LIKE CONCAT('%', #{keyword}, '%')
OR ri.wl_ms LIKE CONCAT('%', #{keyword}, '%')
OR ri.gys_no LIKE CONCAT('%', #{keyword}, '%')
OR ri.gys_mc LIKE CONCAT('%', #{keyword}, '%')
OR ri.sap_no LIKE CONCAT('%', #{keyword}, '%')
OR ri.bill_no LIKE CONCAT('%', #{keyword}, '%')
OR ri.bill_no_ck LIKE CONCAT('%', #{keyword}, '%')
OR ri.ck_type LIKE CONCAT('%', #{keyword}, '%')
OR ri.pcode LIKE CONCAT('%', #{keyword}, '%')
)
</if>
<!-- 入/出库状态 -->
<if test="isChuku != null and isChuku != ''">
AND ri.is_chuku = #{isChuku}
</if>
<!-- 仓库 -->
<if test="cangku != null and cangku != ''">
AND ri.cangku = #{cangku}
</if>
<!-- 入库时间范围 -->
<if test="startTime != null">
AND ri.rk_time <![CDATA[ >= ]]> #{startTime}
</if>
<if test="endTime != null">
AND ri.rk_time <![CDATA[ <= ]]> #{endTime}
</if>
<!-- 领用(出库)时间范围 -->
<if test="lyStartTime != null">
AND ri.ly_time <![CDATA[ >= ]]> #{lyStartTime}
</if>
<if test="lyEndTime != null">
AND ri.ly_time <![CDATA[ <= ]]> #{lyEndTime}
</if>
</where>
ORDER BY ri.create_time DESC, ri.id DESC
</select>
</mapper>