md
This commit is contained in:
parent
1138a3e91d
commit
a02bc4db0e
@ -33,11 +33,12 @@ public class EmisTmsTransPlanDtl extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/* id */
|
||||
private Long id;
|
||||
/* 计划id */
|
||||
private Long planId;
|
||||
/* 节点名称 */
|
||||
private String stepName;
|
||||
/* 起始网点 */
|
||||
private String startSite;
|
||||
/* 目的网点 */
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
<resultMap type="EmisTmsTransPlanDtl" id="EmisTmsTransPlanDtlResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="planId" column="plan_id" />
|
||||
<result property="stepName" column="step_name" />
|
||||
<result property="startSite" column="start_site" />
|
||||
<result property="destSite" column="dest_site" />
|
||||
<result property="transType" column="trans_type" />
|
||||
@ -27,36 +28,39 @@
|
||||
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmisTmsTransPlanDtlVo">
|
||||
select id, plan_id, start_site, dest_site, trans_type, est_cost_day, order_num, status, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_tms_trans_plan_dtl
|
||||
</sql>
|
||||
|
||||
<select id="selectSiteNameByCode" parameterType="String" resultType="string">
|
||||
select a.site_name from emis_site a where a.site_code = #{code} limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectEmisTmsTransPlanDtlList" parameterType="EmisTmsTransPlanDtl" resultMap="EmisTmsTransPlanDtlResult">
|
||||
<select id="selectEmisTmsTransPlanDtlList_tmp" parameterType="EmisTmsTransPlanDtl" resultMap="EmisTmsTransPlanDtlResult">
|
||||
select 1 as id, 1 as plan_id, a.site_code as start_site , a.site_code as dest_site
|
||||
from emis_site a
|
||||
where a.del_flag='0' and site_type not in(1,2)
|
||||
<if test="startSite != null and startSite != ''"> and a.site_code!=#{startSite} </if>
|
||||
<if test="destSite != null and destSite != ''"> and a.site_code!=#{destSite} </if>
|
||||
<if test="params.searchValue != null and params.searchValue != ''"> and a.site_name like concat('%',#{params.searchValue},'%') </if>
|
||||
<if test="startSite != null and startSite != ''"> and a.site_code!=#{startSite} </if>
|
||||
<if test="destSite != null and destSite != ''"> and a.site_code!=#{destSite} </if>
|
||||
<if test="params.searchValue != null and params.searchValue != ''"> and a.site_name like concat('%',#{params.searchValue},'%') </if>
|
||||
|
||||
order by site_code asc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectEmisTmsTransPlanDtlList_old" parameterType="EmisTmsTransPlanDtl" resultMap="EmisTmsTransPlanDtlResult">
|
||||
<sql id="selectEmisTmsTransPlanDtlVo">
|
||||
select id, plan_id, step_name, start_site, dest_site, trans_type, est_cost_day, order_num, status, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_tms_trans_plan_dtl
|
||||
</sql>
|
||||
|
||||
<select id="selectEmisTmsTransPlanDtlList" parameterType="EmisTmsTransPlanDtl" resultMap="EmisTmsTransPlanDtlResult">
|
||||
<include refid="selectEmisTmsTransPlanDtlVo"/>
|
||||
<where>
|
||||
del_flag='0'
|
||||
<if test="id != null "> and id = #{id}</if>
|
||||
<if test="planId != null "> and plan_id = #{planId}</if>
|
||||
<if test="stepName != null and stepName != ''"> and step_name like concat('%', #{stepName}, '%')</if>
|
||||
<if test="startSite != null and startSite != ''"> and start_site like concat('%', #{startSite}, '%')</if>
|
||||
<if test="destSite != null and destSite != ''"> and dest_site like concat('%', #{destSite}, '%')</if>
|
||||
<if test="transType != null and transType != ''"> and trans_type like concat('%', #{transType}, '%')</if>
|
||||
<if test="estCostDay != null and estCostDay != ''"> and est_cost_day like concat('%', #{estCostDay}, '%')</if>
|
||||
<if test="estCostDay != null "> and est_cost_day like concat('%', #{estCostDay}, '%')</if>
|
||||
<if test="orderNum != null "> and order_num = #{orderNum}</if>
|
||||
<if test="status != null and status != ''"> and status like concat('%', #{status}, '%')</if>
|
||||
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
|
||||
@ -71,21 +75,45 @@
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="checkUnique" parameterType="EmisTmsTransPlanDtl" resultType="int">
|
||||
select count(1) from emis_tms_trans_plan_dtl
|
||||
where del_flag='0'
|
||||
and id = #{id}
|
||||
and plan_id = #{planId}
|
||||
and step_name = #{stepName}
|
||||
and start_site = #{startSite}
|
||||
and dest_site = #{destSite}
|
||||
and trans_type = #{transType}
|
||||
and est_cost_day = #{estCostDay}
|
||||
and order_num = #{orderNum}
|
||||
and status = #{status}
|
||||
and del_flag = #{delFlag}
|
||||
and create_by = #{createBy}
|
||||
and create_time = #{createTime}
|
||||
and update_by = #{updateBy}
|
||||
and update_time = #{updateTime}
|
||||
and remark = #{remark}
|
||||
and create_site = #{createSite}
|
||||
and update_site = #{updateSite}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectEmisTmsTransPlanDtlById" parameterType="Long" resultMap="EmisTmsTransPlanDtlResult">
|
||||
select id, plan_id, start_site, dest_site, trans_type, est_cost_day, order_num, status, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site
|
||||
select id, plan_id, step_name, start_site, dest_site, trans_type, est_cost_day, order_num, status, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site
|
||||
from emis_tms_trans_plan_dtl a
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertEmisTmsTransPlanDtl" parameterType="EmisTmsTransPlanDtl">
|
||||
<insert id="insertEmisTmsTransPlanDtl" parameterType="EmisTmsTransPlanDtl" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into emis_tms_trans_plan_dtl
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="planId != null">plan_id,</if>
|
||||
<if test="stepName != null and stepName != ''">step_name,</if>
|
||||
<if test="startSite != null and startSite != ''">start_site,</if>
|
||||
<if test="destSite != null and destSite != ''">dest_site,</if>
|
||||
<if test="transType != null and transType != ''">trans_type,</if>
|
||||
<if test="estCostDay != null and estCostDay != ''">est_cost_day,</if>
|
||||
<if test="estCostDay != null">est_cost_day,</if>
|
||||
<if test="orderNum != null">order_num,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
@ -100,10 +128,11 @@
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="planId != null">#{planId},</if>
|
||||
<if test="stepName != null and stepName != ''">#{stepName},</if>
|
||||
<if test="startSite != null and startSite != ''">#{startSite},</if>
|
||||
<if test="destSite != null and destSite != ''">#{destSite},</if>
|
||||
<if test="transType != null and transType != ''">#{transType},</if>
|
||||
<if test="estCostDay != null and estCostDay != ''">#{estCostDay},</if>
|
||||
<if test="estCostDay != null">#{estCostDay},</if>
|
||||
<if test="orderNum != null">#{orderNum},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
@ -121,10 +150,11 @@
|
||||
update emis_tms_trans_plan_dtl
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="planId != null">plan_id = #{planId},</if>
|
||||
<if test="stepName != null and stepName != ''">step_name = #{stepName},</if>
|
||||
<if test="startSite != null and startSite != ''">start_site = #{startSite},</if>
|
||||
<if test="destSite != null and destSite != ''">dest_site = #{destSite},</if>
|
||||
<if test="transType != null and transType != ''">trans_type = #{transType},</if>
|
||||
<if test="estCostDay != null and estCostDay != ''">est_cost_day = #{estCostDay},</if>
|
||||
<if test="estCostDay != null">est_cost_day = #{estCostDay},</if>
|
||||
<if test="orderNum != null">order_num = #{orderNum},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
@ -139,10 +169,6 @@
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmisTmsTransPlanDtlByPlanId" parameterType="Long">
|
||||
delete from emis_tms_trans_plan_dtl where plan_id = #{planId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisTmsTransPlanDtlById" parameterType="Long">
|
||||
delete from emis_tms_trans_plan_dtl where id = #{id}
|
||||
</delete>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user