移库记录去掉库位和仓库的对应关系校验

施工队新增时去掉编号,由代码生成
新增出入库记录查询接口
This commit is contained in:
2026-01-20 10:20:39 +08:00
parent f8600107ec
commit a82797c475
12 changed files with 320 additions and 51 deletions

View File

@@ -31,12 +31,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isDelete != null and isDelete != ''"> and is_delete = #{isDelete}</if>
</where>
</select>
<select id="selectConstructionTeamById" parameterType="Long" resultMap="ConstructionTeamResult">
<include refid="selectConstructionTeamVo"/>
where id = #{id}
</select>
<select id="selectByTeamCode" resultMap="ConstructionTeamResult">
SELECT *
FROM construction_team
WHERE team_code = #{teamCode}
AND is_delete = '0'
LIMIT 1
</select>
<select id="selectByTeamName" resultMap="ConstructionTeamResult">
SELECT *
FROM construction_team
WHERE team_name = #{teamName}
AND is_delete = '0'
LIMIT 1
</select>
<insert id="insertConstructionTeam" parameterType="ConstructionTeam" useGeneratedKeys="true" keyProperty="id">
insert into construction_team
<trim prefix="(" suffix=")" suffixOverrides=",">
@@ -59,6 +75,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</insert>
<select id="selectMaxTeamCode" resultType="java.lang.String">
SELECT MAX(team_code)
FROM construction_team
WHERE team_code LIKE 'CT%'
</select>
<update id="updateConstructionTeam" parameterType="ConstructionTeam">
update construction_team
<trim prefix="SET" suffixOverrides=",">

View File

@@ -1338,6 +1338,127 @@
</select>
<select id="selectRkInfoPageList"
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)
<if test="isChukuList != null and isChukuList.size() > 0">
AND ri.is_chuku IN
<foreach collection="isChukuList"
item="item"
open="("
separator=","
close=")">
#{item}
</foreach>
</if>
<if test="(isChukuList == null or isChukuList.size() == 0)
and isChuku != null">
AND ri.is_chuku = #{isChuku}
</if>
<if test="warehouseCode != null and warehouseCode != ''">
AND ri.cangku = #{warehouseCode}
</if>
<if test="parentWarehouseCode != null and parentWarehouseCode != ''">
AND wh.parent_warehouse_code = #{parentWarehouseCode}
</if>
<if test="rkType != null and rkType != ''">
AND ri.rk_type = #{rkType}
</if>
<if test="wlType != null and wlType != ''">
AND ri.wl_type = #{wlType}
</if>
<!-- 时间范围查询:入库时间 OR 出库时间 -->
<if test="statDate != null and endDate != null">
AND (
(
ri.rk_time <![CDATA[ >= ]]> #{statDate}
AND ri.rk_time <![CDATA[ < ]]> DATE_ADD(#{endDate}, INTERVAL 1 SECOND)
)
OR
(
ri.ly_time <![CDATA[ >= ]]> #{statDate}
AND ri.ly_time <![CDATA[ < ]]> DATE_ADD(#{endDate}, INTERVAL 1 SECOND)
)
)
</if>
<!-- &lt;!&ndash; 入库时间 &ndash;&gt;-->
<!-- <if test="startTime != null">-->
<!-- AND ri.rk_time <![CDATA[ >= ]]> #{startTime}-->
<!-- </if>-->
<!-- <if test="endTime != null">-->
<!-- AND ri.rk_time <![CDATA[ < ]]> DATE_ADD(#{endTime}, INTERVAL 1 SECOND)-->
<!-- </if>-->
<!-- &lt;!&ndash; 出库时间 &ndash;&gt;-->
<!-- <if test="lyStartTime != null">-->
<!-- AND ri.ly_time <![CDATA[ >= ]]> #{lyStartTime}-->
<!-- </if>-->
<!-- <if test="lyEndTime != null">-->
<!-- AND ri.ly_time <![CDATA[ < ]]> DATE_ADD(#{lyEndTime}, INTERVAL 1 SECOND)-->
<!-- </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="gysNo != null and gysNo != ''">
AND ri.gys_no LIKE CONCAT('%', #{gysNo}, '%')
</if>
<if test="gysMc != null and gysMc != ''">
AND ri.gys_mc LIKE CONCAT('%', #{gysMc}, '%')
</if>
<if test="sapNo != null and sapNo != ''">
AND ri.sap_no LIKE CONCAT('%', #{sapNo}, '%')
</if>
<if test="billNo != null and billNo != ''">
AND ri.bill_no LIKE CONCAT('%', #{billNo}, '%')
</if>
<if test="billNoCk != null and billNoCk != ''">
AND ri.bill_no_ck LIKE CONCAT('%', #{billNoCk}, '%')
</if>
<if test="ckType != null and ckType != ''">
AND ri.ck_type LIKE CONCAT('%', #{ckType}, '%')
</if>
<if test="pcode != null and pcode != ''">
AND ri.pcode LIKE CONCAT('%', #{pcode}, '%')
</if>
<if test="fycde1 != null and fycde1 != ''">
AND ri.fycde_1 LIKE CONCAT('%', #{fycde1}, '%')
</if>
<if test="fycde2 != null and fycde2 != ''">
AND ri.fycde_2 LIKE CONCAT('%', #{fycde2}, '%')
</if>
</where>
<!-- ✅ 核心排序规则 -->
ORDER BY
COALESCE(ri.ly_time, ri.rk_time) DESC,
ri.id DESC
</select>
<select id="selectDeliveryCkList"
parameterType="com.zg.project.wisdom.domain.RkInfo"