Merge remote-tracking branch 'origin/master'

This commit is contained in:
2026-02-13 10:32:12 +08:00
22 changed files with 546 additions and 50 deletions

View File

@@ -77,6 +77,7 @@ spring:
# 数据库索引
database: 0
# 密码
# password: shzg
password:
# 连接超时时间
timeout: 10s

View File

@@ -273,4 +273,17 @@
ORDER BY MAX(r.create_time) DESC
</select>
<select id="selectUnscanFromMatchScan"
resultType="com.zg.project.inventory.domain.vo.RkInfoMatchVO">
SELECT
pcode AS rkPcode,
0 AS realQty,
status
FROM inventory_match_scan
WHERE task_id = #{taskId}
AND status = '1'
</select>
</mapper>

View File

@@ -101,53 +101,73 @@
ri.exec_status = 1
AND ri.is_chuku = 0
AND ri.is_delete = 0
<if test="operationType != null and operationType != ''">
AND ri.operation_type LIKE CONCAT('%', #{operationType}, '%')
</if>
<if test="sapNo != null and sapNo != ''">
AND ri.sap_no LIKE CONCAT('%', #{sapNo}, '%')
</if>
<if test="xmNo != null and xmNo != ''">
AND ri.xm_no LIKE CONCAT('%', #{xmNo}, '%')
</if>
<if test="xmMs != null and xmMs != ''">
AND ri.xm_ms LIKE CONCAT('%', #{xmMs}, '%')
</if>
<if test="wlNo != null and wlNo != ''">
AND ri.wl_no LIKE CONCAT('%', #{wlNo}, '%')
</if>
<if test="wlMs != null and wlMs != ''">
AND ri.wl_ms LIKE CONCAT('%', #{wlMs}, '%')
</if>
<if test="gysMc != null and gysMc != ''">
AND ri.gys_mc LIKE CONCAT('%', #{gysMc}, '%')
</if>
<if test="pcode != null and pcode != ''">
AND ri.pcode LIKE CONCAT('%', #{pcode}, '%')
</if>
<if test="bizType != null and bizType != ''">
AND ri.biz_type LIKE CONCAT('%', #{bizType}, '%')
</if>
<if test="wlType != null and wlType != ''">
AND ri.wl_type LIKE CONCAT('%', #{wlType}, '%')
</if>
<if test="cangku != null and cangku != ''">
AND ri.cangku LIKE CONCAT('%', #{cangku}, '%')
</if>
<if test="billNo != null and billNo != ''">
AND ri.bill_no LIKE CONCAT('%', #{billNo}, '%')
</if>
<!-- ★★★ 新增:按备注模糊搜索 ★★★ -->
<if test="remark != null and remark != ''">
AND ri.remark LIKE CONCAT('%', #{remark}, '%')
</if>
<if test="isDelete != null and isDelete != ''">
AND ri.is_delete = #{isDelete}
</if>
<!-- 出入库时间范围 -->
<if test="startDate != null">
AND ri.operation_time &gt;= #{startDate}
</if>
<if test="endDate != null">
AND ri.operation_time &lt;= #{endDate}
</if>
</where>
ORDER BY ri.operation_time DESC
</select>
@@ -571,4 +591,32 @@
ri.sap_no ASC
</select>
<select id="getByWarehouseAndScene" resultMap="RkInfoResult">
SELECT
ri.*
FROM rk_info ri
JOIN pcde_detail pd
ON pd.pcode = ri.pcode
WHERE ri.exec_status = 1
AND ri.is_delete = '0'
AND ri.is_chuku = '0'
AND ri.cangku = #{warehouseCode}
AND pd.scene = #{sceneId}
</select>
<select id="listRkInfoByPcodes"
resultMap="RkInfoResult"
parameterType="java.util.ArrayList">
SELECT *
FROM rk_info
WHERE is_delete = 0
AND is_chuku = 0
AND pcode IN
<foreach collection="list" item="p" open="(" separator="," close=")">
#{p}
</foreach>
</select>
</mapper>

View File

@@ -282,7 +282,7 @@
<include refid="selectRkRecordVo"/>
WHERE rr.bill_no = #{billNo}
AND (rr.is_delete = '0' OR rr.is_delete = 0 OR rr.is_delete IS NULL)
ORDER BY rr.exec_status = '0' DESC, rr.operation_time DESC
ORDER BY rr.exec_status = '0' DESC, rr.create_time ASC
</select>
<select id="selectRkRecordByIds" resultMap="RkRecordResult">
@@ -892,4 +892,43 @@
AND is_delivery != #{isDelivery}
</select>
<!-- 查询bill最小配送状态 -->
<select id="selectMinDeliveryStatusByBillNo"
resultType="int">
SELECT MIN(is_delivery)
FROM rk_record
WHERE bill_no = #{billNo}
AND is_delete = '0'
AND is_delivery >= 2
</select>
<update id="updateRecordByBillNo" parameterType="com.zg.project.wisdom.domain.RkRecord">
UPDATE rk_record
<set>
<if test="operationType != null">
operation_type = #{operationType},
</if>
<if test="teamCode != null">
team_code = #{teamCode},
</if>
<if test="operator != null">
operator = #{operator},
</if>
<if test="isDelivery != null">
is_delivery = #{isDelivery},
</if>
update_time = NOW()
</set>
WHERE bill_no = #{billNo}
AND is_delete = '0'
</update>
</mapper>