新增盘点模块相关接口

This commit is contained in:
2025-06-17 08:39:05 +08:00
parent 52ff615f29
commit f3752c7cbc
32 changed files with 853 additions and 2303 deletions

View File

@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zg.project.Inventory.Task.mapper.InventoryTaskMapper">
<resultMap type="InventoryTask" id="InventoryTaskResult">
<result property="id" column="id" />
<result property="taskName" column="task_name" />
<result property="warehouseId" column="warehouse_id" />
<result property="sceneId" column="scene_id" />
<result property="userId" column="user_id" />
<result property="requireTime" column="require_time" />
<result property="status" column="status" />
<result property="taskType" column="task_type" />
<result property="remark" column="remark" />
<result property="createdBy" column="created_by" />
<result property="createdAt" column="created_at" />
<result property="updatedBy" column="updated_by" />
<result property="updatedAt" column="updated_at" />
<result property="isDelete" column="is_delete" />
</resultMap>
<sql id="selectInventoryTaskVo">
select id, task_name, warehouse_id, scene_id, user_id, require_time, status, task_type, remark, created_by, created_at, updated_by, updated_at, is_delete from inventory_task
</sql>
<select id="selectInventoryTaskList" parameterType="InventoryTask" resultMap="InventoryTaskResult">
<include refid="selectInventoryTaskVo"/>
<where>
<if test="taskName != null and taskName != ''"> and task_name like concat('%', #{taskName}, '%')</if>
<if test="warehouseId != null "> and warehouse_id = #{warehouseId}</if>
<if test="sceneId != null "> and scene_id = #{sceneId}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="requireTime != null and requireTime != ''"> and require_time = #{requireTime}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="taskType != null and taskType != ''"> and task_type = #{taskType}</if>
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
<if test="createdAt != null and createdAt != ''"> and created_at = #{createdAt}</if>
<if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if>
<if test="updatedAt != null and updatedAt != ''"> and updated_at = #{updatedAt}</if>
<if test="isDelete != null and isDelete != ''"> and is_delete = #{isDelete}</if>
</where>
</select>
<select id="selectInventoryTaskById" parameterType="Long" resultMap="InventoryTaskResult">
<include refid="selectInventoryTaskVo"/>
where id = #{id}
</select>
<insert id="insertInventoryTask" parameterType="InventoryTask" useGeneratedKeys="true" keyProperty="id">
insert into inventory_task
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="taskName != null and taskName != ''">task_name,</if>
<if test="warehouseId != null">warehouse_id,</if>
<if test="sceneId != null">scene_id,</if>
<if test="userId != null">user_id,</if>
<if test="requireTime != null and requireTime != ''">require_time,</if>
<if test="status != null">status,</if>
<if test="taskType != null and taskType != ''">task_type,</if>
<if test="remark != null">remark,</if>
<if test="createdBy != null">created_by,</if>
<if test="createdAt != null">created_at,</if>
<if test="updatedBy != null">updated_by,</if>
<if test="updatedAt != null">updated_at,</if>
<if test="isDelete != null">is_delete,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskName != null and taskName != ''">#{taskName},</if>
<if test="warehouseId != null">#{warehouseId},</if>
<if test="sceneId != null">#{sceneId},</if>
<if test="userId != null">#{userId},</if>
<if test="requireTime != null and requireTime != ''">#{requireTime},</if>
<if test="status != null">#{status},</if>
<if test="taskType != null and taskType != ''">#{taskType},</if>
<if test="remark != null">#{remark},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedAt != null">#{updatedAt},</if>
<if test="isDelete != null">#{isDelete},</if>
</trim>
</insert>
<update id="updateInventoryTask" parameterType="InventoryTask">
update inventory_task
<trim prefix="SET" suffixOverrides=",">
<if test="taskName != null and taskName != ''">task_name = #{taskName},</if>
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
<if test="sceneId != null">scene_id = #{sceneId},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="requireTime != null and requireTime != ''">require_time = #{requireTime},</if>
<if test="status != null">status = #{status},</if>
<if test="taskType != null and taskType != ''">task_type = #{taskType},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdAt != null">created_at = #{createdAt},</if>
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
<if test="isDelete != null">is_delete = #{isDelete},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteInventoryTaskById" parameterType="Long">
delete from inventory_task where id = #{id}
</delete>
<delete id="deleteInventoryTaskByIds" parameterType="String">
delete from inventory_task where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -1,155 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zg.project.Inventory.Visualization.mapper.OdtlMapper">
<resultMap type="Odtl" id="OdtlResult">
<result property="Id" column="Id" />
<result property="rdid" column="rdid" />
<result property="sid" column="sid" />
<result property="amt" column="amt" />
<result property="pcde" column="pcde" />
<result property="ste" column="ste" />
<result property="rfid" column="rfid" />
<result property="wsid" column="wsid" />
<result property="vlid" column="vlid" />
<result property="flg" column="flg" />
<result property="prf" column="prf" />
</resultMap>
<sql id="selectOdtlVo">
select Id, rdid, sid, amt, pcde, ste, rfid, wsid, vlid, flg, prf from odtl
</sql>
<select id="selectOdtlList" parameterType="Odtl" resultMap="OdtlResult">
<include refid="selectOdtlVo"/>
<where>
<if test="rdid != null "> and rdid = #{rdid}</if>
<if test="sid != null "> and sid = #{sid}</if>
<if test="amt != null "> and amt = #{amt}</if>
<if test="pcde != null and pcde != ''"> and pcde = #{pcde}</if>
<if test="ste != null and ste != ''"> and ste = #{ste}</if>
<if test="rfid != null and rfid != ''"> and rfid = #{rfid}</if>
<if test="wsid != null "> and wsid = #{wsid}</if>
<if test="vlid != null and vlid != ''"> and vlid = #{vlid}</if>
<if test="flg != null "> and flg = #{flg}</if>
<if test="prf != null and prf != ''"> and prf = #{prf}</if>
</where>
</select>
<select id="selectOdtlById" parameterType="Long" resultMap="OdtlResult">
<include refid="selectOdtlVo"/>
where Id = #{Id}
</select>
<select id="queryAll" resultType="com.zg.project.Inventory.Visualization.domain.vo.OdtlVO">
SELECT
A.amt AS aamt,
A.pcde AS bcde,
A.sid,
B.mid,
B.erpid AS berpid,
B.des_pro AS bdes_pro,
B.prf AS bprf,
B.mrk,
B.ste,
B.prc,
NULLIF(TRIM(B.bth), '') AS bth,
B.gys AS bgys,
B.fycde_1,
B.fycde_2,
C.id AS rid,
C.erpid AS cerpid,
C.des_pro AS cdes_pro,
C.bnum,
C.tpe,
C.usr,
C.nme,
C.tme,
C.cde,
C.tnme,
DATE_FORMAT(C.ptme, '%Y-%m') AS ptme,
C.tpnme,
C.cgy,
C.wtpe,
C.wh,
C.tme AS ctme,
D.des_mat,
D.unt,
E.mid AS smid,
E.bnum AS sbnum,
E.pcde AS spcde,
E.gys AS egys,
E.mrk AS smrk
FROM odtl A
LEFT JOIN rdtl B ON A.rdid = B.id
LEFT JOIN rcp C ON B.rid = C.id
LEFT JOIN mtd D ON B.mid = D.mid
LEFT JOIN sod E ON A.sid = E.id
WHERE B.ste = 1
AND C.del = 0
ORDER BY C.ptme DESC
</select>
<insert id="insertOdtl" parameterType="Odtl" useGeneratedKeys="true" keyProperty="Id">
insert into odtl
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="rdid != null">rdid,</if>
<if test="sid != null">sid,</if>
<if test="amt != null">amt,</if>
<if test="pcde != null">pcde,</if>
<if test="ste != null">ste,</if>
<if test="rfid != null">rfid,</if>
<if test="wsid != null">wsid,</if>
<if test="vlid != null">vlid,</if>
<if test="flg != null">flg,</if>
<if test="prf != null">prf,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="rdid != null">#{rdid},</if>
<if test="sid != null">#{sid},</if>
<if test="amt != null">#{amt},</if>
<if test="pcde != null">#{pcde},</if>
<if test="ste != null">#{ste},</if>
<if test="rfid != null">#{rfid},</if>
<if test="wsid != null">#{wsid},</if>
<if test="vlid != null">#{vlid},</if>
<if test="flg != null">#{flg},</if>
<if test="prf != null">#{prf},</if>
</trim>
</insert>
<update id="updateOdtl" parameterType="Odtl">
update odtl
<trim prefix="SET" suffixOverrides=",">
<if test="rdid != null">rdid = #{rdid},</if>
<if test="sid != null">sid = #{sid},</if>
<if test="amt != null">amt = #{amt},</if>
<if test="pcde != null">pcde = #{pcde},</if>
<if test="ste != null">ste = #{ste},</if>
<if test="rfid != null">rfid = #{rfid},</if>
<if test="wsid != null">wsid = #{wsid},</if>
<if test="vlid != null">vlid = #{vlid},</if>
<if test="flg != null">flg = #{flg},</if>
<if test="prf != null">prf = #{prf},</if>
</trim>
where Id = #{Id}
</update>
<delete id="deleteOdtlById" parameterType="Long">
delete from odtl where Id = #{Id}
</delete>
<delete id="deleteOdtlByIds" parameterType="String">
delete from odtl where Id in
<foreach item="Id" collection="array" open="(" separator="," close=")">
#{Id}
</foreach>
</delete>
</mapper>

View File

@@ -1,279 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zg.project.Inventory.Visualization.mapper.PlnMapper">
<resultMap type="Pln" id="PlnResult">
<result property="id" column="id" />
<result property="gcdm" column="gcdm" />
<result property="gcms" column="gcms" />
<result property="zbpc" column="zbpc" />
<result property="zbpcmc" column="zbpcmc" />
<result property="sxrq" column="sxrq" />
<result property="qdrq" column="qdrq" />
<result property="htbh" column="htbh" />
<result property="gyjhbh" column="gyjhbh" />
<result property="gcbh" column="gcbh" />
<result property="xmms" column="xmms" />
<result property="gysbm" column="gysbm" />
<result property="gysmc" column="gysmc" />
<result property="cgddh" column="cgddh" />
<result property="hxmh" column="hxmh" />
<result property="htjhq" column="htjhq" />
<result property="qdjhq" column="qdjhq" />
<result property="sjjhq" column="sjjhq" />
<result property="wlh" column="wlh" />
<result property="wlms" column="wlms" />
<result property="jldw" column="jldw" />
<result property="htsl" column="htsl" />
<result property="jhjhsl" column="jhjhsl" />
<result property="jhjhpc" column="jhjhpc" />
<result property="jhjhje" column="jhjhje" />
<result property="sjjhsl" column="sjjhsl" />
<result property="gyjhzt" column="gyjhzt" />
<result property="cgpzlx" column="cgpzlx" />
<result property="jhjhrq" column="jhjhrq" />
<result property="jhdd" column="jhdd" />
<result property="jhlxr" column="jhlxr" />
<result property="lxfs" column="lxfs" />
<result property="ecp" column="ecp" />
<result property="xmdw" column="xmdw" />
<result property="odr" column="odr" />
<result property="rcde" column="rcde" />
<result property="cgpz" column="cgpz" />
<result property="yrk" column="yrk" />
<result property="yck" column="yck" />
<result property="ste" column="ste" />
<result property="tem" column="tem" />
<result property="intme" column="intme" />
<result property="updtme" column="updtme" />
<result property="rAmt" column="r_amt" />
<result property="cAmt" column="c_amt" />
<result property="crtim" column="crtim" />
</resultMap>
<sql id="selectPlnVo">
select id, gcdm, gcms, zbpc, zbpcmc, sxrq, qdrq, htbh, gyjhbh, gcbh, xmms, gysbm, gysmc, cgddh, hxmh, htjhq, qdjhq, sjjhq, wlh, wlms, jldw, htsl, jhjhsl, jhjhpc, jhjhje, sjjhsl, gyjhzt, cgpzlx, jhjhrq, jhdd, jhlxr, lxfs, ecp, xmdw, odr, rcde, cgpz, yrk, yck, ste, tem, intme, updtme, r_amt, c_amt, crtim from pln
</sql>
<select id="selectPlnList" parameterType="Pln" resultMap="PlnResult">
<include refid="selectPlnVo"/>
<where>
<if test="gcdm != null and gcdm != ''"> and gcdm = #{gcdm}</if>
<if test="gcms != null and gcms != ''"> and gcms = #{gcms}</if>
<if test="zbpc != null and zbpc != ''"> and zbpc = #{zbpc}</if>
<if test="zbpcmc != null and zbpcmc != ''"> and zbpcmc = #{zbpcmc}</if>
<if test="sxrq != null and sxrq != ''"> and sxrq = #{sxrq}</if>
<if test="qdrq != null and qdrq != ''"> and qdrq = #{qdrq}</if>
<if test="htbh != null and htbh != ''"> and htbh = #{htbh}</if>
<if test="gyjhbh != null and gyjhbh != ''"> and gyjhbh = #{gyjhbh}</if>
<if test="gcbh != null and gcbh != ''"> and gcbh = #{gcbh}</if>
<if test="xmms != null and xmms != ''"> and xmms = #{xmms}</if>
<if test="gysbm != null and gysbm != ''"> and gysbm = #{gysbm}</if>
<if test="gysmc != null and gysmc != ''"> and gysmc = #{gysmc}</if>
<if test="cgddh != null and cgddh != ''"> and cgddh = #{cgddh}</if>
<if test="hxmh != null and hxmh != ''"> and hxmh = #{hxmh}</if>
<if test="htjhq != null and htjhq != ''"> and htjhq = #{htjhq}</if>
<if test="qdjhq != null and qdjhq != ''"> and qdjhq = #{qdjhq}</if>
<if test="sjjhq != null and sjjhq != ''"> and sjjhq = #{sjjhq}</if>
<if test="wlh != null and wlh != ''"> and wlh = #{wlh}</if>
<if test="wlms != null and wlms != ''"> and wlms = #{wlms}</if>
<if test="jldw != null and jldw != ''"> and jldw = #{jldw}</if>
<if test="htsl != null and htsl != ''"> and htsl = #{htsl}</if>
<if test="jhjhsl != null and jhjhsl != ''"> and jhjhsl = #{jhjhsl}</if>
<if test="jhjhpc != null and jhjhpc != ''"> and jhjhpc = #{jhjhpc}</if>
<if test="jhjhje != null and jhjhje != ''"> and jhjhje = #{jhjhje}</if>
<if test="sjjhsl != null and sjjhsl != ''"> and sjjhsl = #{sjjhsl}</if>
<if test="gyjhzt != null and gyjhzt != ''"> and gyjhzt = #{gyjhzt}</if>
<if test="cgpzlx != null and cgpzlx != ''"> and cgpzlx = #{cgpzlx}</if>
<if test="jhjhrq != null and jhjhrq != ''"> and jhjhrq = #{jhjhrq}</if>
<if test="jhdd != null and jhdd != ''"> and jhdd = #{jhdd}</if>
<if test="jhlxr != null and jhlxr != ''"> and jhlxr = #{jhlxr}</if>
<if test="lxfs != null and lxfs != ''"> and lxfs = #{lxfs}</if>
<if test="ecp != null and ecp != ''"> and ecp = #{ecp}</if>
<if test="xmdw != null and xmdw != ''"> and xmdw = #{xmdw}</if>
<if test="odr != null "> and odr = #{odr}</if>
<if test="rcde != null and rcde != ''"> and rcde = #{rcde}</if>
<if test="cgpz != null and cgpz != ''"> and cgpz = #{cgpz}</if>
<if test="yrk != null "> and yrk = #{yrk}</if>
<if test="yck != null "> and yck = #{yck}</if>
<if test="ste != null "> and ste = #{ste}</if>
<if test="tem != null and tem != ''"> and tem = #{tem}</if>
<if test="intme != null and intme != ''"> and intme = #{intme}</if>
<if test="updtme != null and updtme != ''"> and updtme = #{updtme}</if>
<if test="rAmt != null "> and r_amt = #{rAmt}</if>
<if test="cAmt != null "> and c_amt = #{cAmt}</if>
<if test="crtim != null and crtim != ''"> and crtim = #{crtim}</if>
</where>
</select>
<select id="selectPlnById" parameterType="Long" resultMap="PlnResult">
<include refid="selectPlnVo"/>
where id = #{id}
</select>
<select id="getAll" resultType="com.zg.project.Inventory.Visualization.domain.Pln">
select * from pln
</select>
<insert id="insertPln" parameterType="Pln" useGeneratedKeys="true" keyProperty="id">
insert into pln
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="gcdm != null">gcdm,</if>
<if test="gcms != null">gcms,</if>
<if test="zbpc != null">zbpc,</if>
<if test="zbpcmc != null">zbpcmc,</if>
<if test="sxrq != null">sxrq,</if>
<if test="qdrq != null">qdrq,</if>
<if test="htbh != null">htbh,</if>
<if test="gyjhbh != null">gyjhbh,</if>
<if test="gcbh != null">gcbh,</if>
<if test="xmms != null">xmms,</if>
<if test="gysbm != null">gysbm,</if>
<if test="gysmc != null">gysmc,</if>
<if test="cgddh != null">cgddh,</if>
<if test="hxmh != null">hxmh,</if>
<if test="htjhq != null">htjhq,</if>
<if test="qdjhq != null">qdjhq,</if>
<if test="sjjhq != null">sjjhq,</if>
<if test="wlh != null">wlh,</if>
<if test="wlms != null">wlms,</if>
<if test="jldw != null">jldw,</if>
<if test="htsl != null">htsl,</if>
<if test="jhjhsl != null">jhjhsl,</if>
<if test="jhjhpc != null">jhjhpc,</if>
<if test="jhjhje != null">jhjhje,</if>
<if test="sjjhsl != null">sjjhsl,</if>
<if test="gyjhzt != null">gyjhzt,</if>
<if test="cgpzlx != null">cgpzlx,</if>
<if test="jhjhrq != null">jhjhrq,</if>
<if test="jhdd != null">jhdd,</if>
<if test="jhlxr != null">jhlxr,</if>
<if test="lxfs != null">lxfs,</if>
<if test="ecp != null">ecp,</if>
<if test="xmdw != null">xmdw,</if>
<if test="odr != null">odr,</if>
<if test="rcde != null">rcde,</if>
<if test="cgpz != null">cgpz,</if>
<if test="yrk != null">yrk,</if>
<if test="yck != null">yck,</if>
<if test="ste != null">ste,</if>
<if test="tem != null">tem,</if>
<if test="intme != null">intme,</if>
<if test="updtme != null">updtme,</if>
<if test="rAmt != null">r_amt,</if>
<if test="cAmt != null">c_amt,</if>
<if test="crtim != null">crtim,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="gcdm != null">#{gcdm},</if>
<if test="gcms != null">#{gcms},</if>
<if test="zbpc != null">#{zbpc},</if>
<if test="zbpcmc != null">#{zbpcmc},</if>
<if test="sxrq != null">#{sxrq},</if>
<if test="qdrq != null">#{qdrq},</if>
<if test="htbh != null">#{htbh},</if>
<if test="gyjhbh != null">#{gyjhbh},</if>
<if test="gcbh != null">#{gcbh},</if>
<if test="xmms != null">#{xmms},</if>
<if test="gysbm != null">#{gysbm},</if>
<if test="gysmc != null">#{gysmc},</if>
<if test="cgddh != null">#{cgddh},</if>
<if test="hxmh != null">#{hxmh},</if>
<if test="htjhq != null">#{htjhq},</if>
<if test="qdjhq != null">#{qdjhq},</if>
<if test="sjjhq != null">#{sjjhq},</if>
<if test="wlh != null">#{wlh},</if>
<if test="wlms != null">#{wlms},</if>
<if test="jldw != null">#{jldw},</if>
<if test="htsl != null">#{htsl},</if>
<if test="jhjhsl != null">#{jhjhsl},</if>
<if test="jhjhpc != null">#{jhjhpc},</if>
<if test="jhjhje != null">#{jhjhje},</if>
<if test="sjjhsl != null">#{sjjhsl},</if>
<if test="gyjhzt != null">#{gyjhzt},</if>
<if test="cgpzlx != null">#{cgpzlx},</if>
<if test="jhjhrq != null">#{jhjhrq},</if>
<if test="jhdd != null">#{jhdd},</if>
<if test="jhlxr != null">#{jhlxr},</if>
<if test="lxfs != null">#{lxfs},</if>
<if test="ecp != null">#{ecp},</if>
<if test="xmdw != null">#{xmdw},</if>
<if test="odr != null">#{odr},</if>
<if test="rcde != null">#{rcde},</if>
<if test="cgpz != null">#{cgpz},</if>
<if test="yrk != null">#{yrk},</if>
<if test="yck != null">#{yck},</if>
<if test="ste != null">#{ste},</if>
<if test="tem != null">#{tem},</if>
<if test="intme != null">#{intme},</if>
<if test="updtme != null">#{updtme},</if>
<if test="rAmt != null">#{rAmt},</if>
<if test="cAmt != null">#{cAmt},</if>
<if test="crtim != null">#{crtim},</if>
</trim>
</insert>
<update id="updatePln" parameterType="Pln">
update pln
<trim prefix="SET" suffixOverrides=",">
<if test="gcdm != null">gcdm = #{gcdm},</if>
<if test="gcms != null">gcms = #{gcms},</if>
<if test="zbpc != null">zbpc = #{zbpc},</if>
<if test="zbpcmc != null">zbpcmc = #{zbpcmc},</if>
<if test="sxrq != null">sxrq = #{sxrq},</if>
<if test="qdrq != null">qdrq = #{qdrq},</if>
<if test="htbh != null">htbh = #{htbh},</if>
<if test="gyjhbh != null">gyjhbh = #{gyjhbh},</if>
<if test="gcbh != null">gcbh = #{gcbh},</if>
<if test="xmms != null">xmms = #{xmms},</if>
<if test="gysbm != null">gysbm = #{gysbm},</if>
<if test="gysmc != null">gysmc = #{gysmc},</if>
<if test="cgddh != null">cgddh = #{cgddh},</if>
<if test="hxmh != null">hxmh = #{hxmh},</if>
<if test="htjhq != null">htjhq = #{htjhq},</if>
<if test="qdjhq != null">qdjhq = #{qdjhq},</if>
<if test="sjjhq != null">sjjhq = #{sjjhq},</if>
<if test="wlh != null">wlh = #{wlh},</if>
<if test="wlms != null">wlms = #{wlms},</if>
<if test="jldw != null">jldw = #{jldw},</if>
<if test="htsl != null">htsl = #{htsl},</if>
<if test="jhjhsl != null">jhjhsl = #{jhjhsl},</if>
<if test="jhjhpc != null">jhjhpc = #{jhjhpc},</if>
<if test="jhjhje != null">jhjhje = #{jhjhje},</if>
<if test="sjjhsl != null">sjjhsl = #{sjjhsl},</if>
<if test="gyjhzt != null">gyjhzt = #{gyjhzt},</if>
<if test="cgpzlx != null">cgpzlx = #{cgpzlx},</if>
<if test="jhjhrq != null">jhjhrq = #{jhjhrq},</if>
<if test="jhdd != null">jhdd = #{jhdd},</if>
<if test="jhlxr != null">jhlxr = #{jhlxr},</if>
<if test="lxfs != null">lxfs = #{lxfs},</if>
<if test="ecp != null">ecp = #{ecp},</if>
<if test="xmdw != null">xmdw = #{xmdw},</if>
<if test="odr != null">odr = #{odr},</if>
<if test="rcde != null">rcde = #{rcde},</if>
<if test="cgpz != null">cgpz = #{cgpz},</if>
<if test="yrk != null">yrk = #{yrk},</if>
<if test="yck != null">yck = #{yck},</if>
<if test="ste != null">ste = #{ste},</if>
<if test="tem != null">tem = #{tem},</if>
<if test="intme != null">intme = #{intme},</if>
<if test="updtme != null">updtme = #{updtme},</if>
<if test="rAmt != null">r_amt = #{rAmt},</if>
<if test="cAmt != null">c_amt = #{cAmt},</if>
<if test="crtim != null">crtim = #{crtim},</if>
</trim>
where id = #{id}
</update>
<delete id="deletePlnById" parameterType="Long">
delete from pln where id = #{id}
</delete>
<delete id="deletePlnByIds" parameterType="String">
delete from pln where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -1,37 +1,52 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zg.project.information.mapper.StockOutTypeMapper">
<resultMap type="StockOutType" id="StockOutTypeResult">
<result property="id" column="id" />
<result property="ckTypeName" column="ck_type_name" />
<result property="ckTypeCode" column="ck_type_code" />
<result property="createdBy" column="created_by" />
<result property="createdAt" column="created_at" />
<result property="updatedBy" column="updated_by" />
<result property="updatedAt" column="updated_at" />
<result property="isDelete" column="is_delete" />
<result property="id" column="id"/>
<result property="typeName" column="type_name"/>
<result property="typeCode" column="type_code"/>
<result property="createdBy" column="created_by"/>
<result property="createdAt" column="created_at"/>
<result property="updatedBy" column="updated_by"/>
<result property="updatedAt" column="updated_at"/>
<result property="isDelete" column="is_delete"/>
</resultMap>
<sql id="selectStockOutTypeVo">
select id, ck_type_name, ck_type_code, created_by, created_at, updated_by, updated_at, is_delete from stock_out_type
select id, type_name, type_code, created_by, created_at, updated_by, updated_at, is_delete
from stock_out_type
</sql>
<select id="selectStockOutTypeList" parameterType="StockOutType" resultMap="StockOutTypeResult">
<include refid="selectStockOutTypeVo"/>
<where>
<if test="ckTypeName != null and ckTypeName != ''"> and ck_type_name like concat('%', #{ckTypeName}, '%')</if>
<if test="ckTypeCode != null and ckTypeCode != ''"> and ck_type_code = #{ckTypeCode}</if>
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
<if test="createdAt != null "> and created_at = #{createdAt}</if>
<if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if>
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
<if test="isDelete != null and isDelete != ''"> and is_delete = #{isDelete}</if>
<where>
<if test="typeName != null and typeName != ''">
and type_name like concat('%', #{typeName}, '%')
</if>
<if test="typeCode != null and typeCode != ''">
and type_code = #{typeCode}
</if>
<if test="createdBy != null and createdBy != ''">
and created_by = #{createdBy}
</if>
<if test="createdAt != null">
and created_at = #{createdAt}
</if>
<if test="updatedBy != null and updatedBy != ''">
and updated_by = #{updatedBy}
</if>
<if test="updatedAt != null">
and updated_at = #{updatedAt}
</if>
<if test="isDelete != null and isDelete != ''">
and is_delete = #{isDelete}
</if>
</where>
</select>
<select id="selectStockOutTypeById" parameterType="Long" resultMap="StockOutTypeResult">
<include refid="selectStockOutTypeVo"/>
where id = #{id}
@@ -40,30 +55,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<insert id="insertStockOutType" parameterType="StockOutType" useGeneratedKeys="true" keyProperty="id">
insert into stock_out_type
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="ckTypeName != null and ckTypeName != ''">ck_type_name,</if>
<if test="ckTypeCode != null and ckTypeCode != ''">ck_type_code,</if>
<if test="typeName != null and typeName != ''">type_name,</if>
<if test="typeCode != null and typeCode != ''">type_code,</if>
<if test="createdBy != null">created_by,</if>
<if test="createdAt != null">created_at,</if>
<if test="updatedBy != null">updated_by,</if>
<if test="updatedAt != null">updated_at,</if>
<if test="isDelete != null">is_delete,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="ckTypeName != null and ckTypeName != ''">#{ckTypeName},</if>
<if test="ckTypeCode != null and ckTypeCode != ''">#{ckTypeCode},</if>
<if test="typeName != null and typeName != ''">#{typeName},</if>
<if test="typeCode != null and typeCode != ''">#{typeCode},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="createdAt != null">#{createdAt},</if>
<if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedAt != null">#{updatedAt},</if>
<if test="isDelete != null">#{isDelete},</if>
</trim>
</trim>
</insert>
<update id="updateStockOutType" parameterType="StockOutType">
update stock_out_type
<trim prefix="SET" suffixOverrides=",">
<if test="ckTypeName != null and ckTypeName != ''">ck_type_name = #{ckTypeName},</if>
<if test="ckTypeCode != null and ckTypeCode != ''">ck_type_code = #{ckTypeCode},</if>
<if test="typeName != null and typeName != ''">type_name = #{typeName},</if>
<if test="typeCode != null and typeCode != ''">type_code = #{typeCode},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdAt != null">created_at = #{createdAt},</if>
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
@@ -78,9 +93,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteStockOutTypeByIds" parameterType="String">
delete from stock_out_type where id in
delete from stock_out_type where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
</mapper>

View File

@@ -13,6 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="lihuoY" column="lihuo_y" />
<result property="isChuku" column="is_chuku" />
<result property="billNo" column="bill_no"/>
<result property="billNoCk" column="bill_no_ck"/>
<result property="rkTypeName" column="rk_type_name"/>
<result property="wlTypeName" column="wl_type_name"/>
<result property="cangkuName" column="cangku_name"/>
@@ -54,11 +55,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
SELECT
ri.id,
ri.bill_no,
ri.bill_no_ck,
ri.rk_type, st.type_name AS rk_type_name,
ri.wl_type, mt.type_name AS wl_type_name,
ri.cangku, wh.warehouse_name AS cangku_name,
ri.rk_time, ri.lihuo_y, ri.is_chuku, ri.remark,
ri.ck_lihuo_y, ri.ck_type, sot.ck_type_name,
ri.ck_lihuo_y, ri.ck_type, sot.type_name AS ck_type_name,
ri.team_code, ct.team_name,
ri.ck_remark,
ri.ly_time,
@@ -71,7 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN stock_in_type st ON ri.rk_type = st.type_code
LEFT JOIN material_type mt ON ri.wl_type = mt.type_code
LEFT JOIN warehouse_info wh ON ri.cangku = wh.warehouse_code
LEFT JOIN stock_out_type sot ON ri.ck_type = sot.ck_type_code
LEFT JOIN stock_out_type sot ON ri.ck_type = sot.type_code
LEFT JOIN construction_team ct ON ri.team_code = ct.team_code
</sql>
@@ -101,6 +103,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
DELETE FROM rk_info WHERE bill_no = #{billNo}
</delete>
<update id="cancelStockOut">
UPDATE rk_info
SET
is_chuku = '0',
bill_no_ck = NULL,
ck_lihuo_y = NULL,
ck_type = NULL,
team_code = NULL,
ly_time = NULL,
ck_remark = NULL,
update_time = NOW()
WHERE bill_no_ck = #{billNoCk}
</update>
<select id="selectRkInfoList" parameterType="RkInfo" resultMap="RkInfoResult">
<include refid="selectRkInfoVo"/>
<where>
@@ -108,7 +124,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="isChuku != null and isChuku != ''">
and is_chuku = #{isChuku}
</if>
<if test="keyword != null and keyword != ''">
and (
xm_no like concat('%', #{keyword}, '%')
@@ -119,19 +134,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
or gys_mc like concat('%', #{keyword}, '%')
or sap_no like concat('%', #{keyword}, '%')
or bill_no like concat('%', #{keyword}, '%')
or ck_type like concat('%', #{keyword}, '%')
or pcode like concat('%', #{keyword}, '%')
)
</if>
<if test="rkType != null and rkType != ''"> and rk_type = #{rkType}</if>
<if test="wlType != null and wlType != ''"> and wl_type = #{wlType}</if>
<if test="cangku != null and cangku != ''"> and cangku = #{cangku}</if>
<if test="rkTime != null "> and rk_time = #{rkTime}</if>
<if test="lihuoY != null and lihuoY != ''"> and lihuo_y = #{lihuoY}</if>
<if test="xj != null and xj != ''"> and xj = #{xj}</if>
<if test="billNo != null and billNo != ''">
and bill_no = #{billNo}
</if>
<if test="billNo != null and billNo != ''"> and bill_no = #{billNo}</if>
<if test="xmNo != null and xmNo != ''"> and xm_no = #{xmNo}</if>
<if test="xmMs != null and xmMs != ''"> and xm_ms = #{xmMs}</if>
<if test="wlNo != null and wlNo != ''"> and wl_no = #{wlNo}</if>
@@ -150,6 +163,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="lyTime != null"> and ri.ly_time = #{lyTime}</if>
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
<if test="entityId != null and entityId != ''"> and entity_id = #{entityId}</if>
<if test="ckType != null and ckType != ''"> and ck_type = #{ckType}</if>
<if test="isDelete != null and isDelete != ''">
and ri.is_delete = #{isDelete}
</if>
@@ -157,6 +171,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and ri.is_delete = 0
</if>
</where>
order by rk_time desc
</select>
<select id="selectRkInfoById" parameterType="Long" resultMap="RkInfoResult">
@@ -198,6 +215,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ORDER BY rk_time DESC
LIMIT #{limit}
</select>
<select id="selectSapNoByCkBillNo" resultType="java.lang.String">
SELECT DISTINCT sap_no FROM rk_info
WHERE bill_no = #{billNo} AND sap_no IS NOT NULL
</select>
<update id="updateRkInfo" parameterType="RkInfo">
update rk_info
@@ -230,7 +251,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="entityId != null">entity_id = #{entityId},</if>
<if test="ckLihuoY != null">ck_lihuo_y = #{ckLihuoY},</if>
<if test="ckType != null">ck_type = #{ckType},</if>
<if test="ckTypeName != null">ck_type_name = #{ckTypeName},</if>
<if test="sgdCode != null">sgd_code = #{sgdCode},</if>
<if test="sgdName != null">sgd_name = #{sgdName},</if>
<if test="lyTime != null">ly_time = #{lyTime},</if>
@@ -261,16 +281,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateById" parameterType="RkInfo">
UPDATE rk_info
SET is_chuku = #{isChuku},
ck_remark = #{ckRemark},
ck_type = #{ckType},
ck_time = #{ckTime},
ck_lihuo_y = #{ckLihuoY},
team_code = #{teamCode},
update_by = #{updateBy},
update_time = #{updateTime}
<set>
<if test="isChuku != null">is_chuku = #{isChuku},</if>
<if test="ckRemark != null">ck_remark = #{ckRemark},</if>
<if test="ckType != null">ck_type = #{ckType},</if>
<if test="lyTime != null">ly_time = #{lyTime},</if>
<if test="ckLihuoY != null">ck_lihuo_y = #{ckLihuoY},</if>
<if test="teamCode != null">team_code = #{teamCode},</if>
<if test="billNoCk != null">bill_no_ck = #{billNoCk},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime}</if>
</set>
WHERE id = #{id}
</update>
</mapper>