|
|
@ -24,62 +24,68 @@
|
|
|
|
<result property="updatedTime" column="updated_time"/>
|
|
|
|
<result property="updatedTime" column="updated_time"/>
|
|
|
|
<result property="planBeginTime" column="plan_begin_time"/>
|
|
|
|
<result property="planBeginTime" column="plan_begin_time"/>
|
|
|
|
<result property="planEndTime" column="plan_end_time"/>
|
|
|
|
<result property="planEndTime" column="plan_end_time"/>
|
|
|
|
|
|
|
|
<result property="stationName" column="station_name"/>
|
|
|
|
|
|
|
|
<result property="teamName" column="team_name"/>
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectProdPlanInfoVo">
|
|
|
|
<sql id="selectProdPlanInfoVo">
|
|
|
|
select obj_id,
|
|
|
|
select ppi.obj_id,
|
|
|
|
plan_code,
|
|
|
|
ppi.plan_code,
|
|
|
|
order_code,
|
|
|
|
ppi.order_code,
|
|
|
|
material_code,
|
|
|
|
ppi.material_code,
|
|
|
|
material_name,
|
|
|
|
ppi.material_name,
|
|
|
|
station_code,
|
|
|
|
ppi.station_code,
|
|
|
|
device_code,
|
|
|
|
bpl.product_line_name station_name,
|
|
|
|
team_code,
|
|
|
|
ppi.device_code,
|
|
|
|
plan_amount,
|
|
|
|
ppi.team_code,
|
|
|
|
complete_amount,
|
|
|
|
btm.team_name,
|
|
|
|
begin_time,
|
|
|
|
ppi.plan_amount,
|
|
|
|
end_time,
|
|
|
|
ppi.complete_amount,
|
|
|
|
comp_flag,
|
|
|
|
ppi.begin_time,
|
|
|
|
created_by,
|
|
|
|
ppi.end_time,
|
|
|
|
created_time,
|
|
|
|
ppi.comp_flag,
|
|
|
|
updated_by,
|
|
|
|
ppi.created_by,
|
|
|
|
updated_time,
|
|
|
|
ppi.created_time,
|
|
|
|
plan_begin_time,
|
|
|
|
ppi.updated_by,
|
|
|
|
plan_end_time
|
|
|
|
ppi.updated_time,
|
|
|
|
from prod_plan_info
|
|
|
|
ppi.plan_begin_time,
|
|
|
|
|
|
|
|
ppi.plan_end_time
|
|
|
|
|
|
|
|
from prod_plan_info ppi
|
|
|
|
|
|
|
|
left join base_product_line bpl on bpl.product_line_code = ppi.station_code
|
|
|
|
|
|
|
|
left join base_team_members btm on btm.team_code = ppi.team_code
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectProdPlanInfoList" parameterType="ProdPlanInfo" resultMap="ProdPlanInfoResult">
|
|
|
|
<select id="selectProdPlanInfoList" parameterType="ProdPlanInfo" resultMap="ProdPlanInfoResult">
|
|
|
|
<include refid="selectProdPlanInfoVo"/>
|
|
|
|
<include refid="selectProdPlanInfoVo"/>
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="planCode != null and planCode != ''">and plan_code = #{planCode}</if>
|
|
|
|
<if test="planCode != null and planCode != ''">and ppi.plan_code = #{planCode}</if>
|
|
|
|
<if test="orderCode != null and orderCode != ''">and order_code = #{orderCode}</if>
|
|
|
|
<if test="orderCode != null and orderCode != ''">and ppi.order_code = #{orderCode}</if>
|
|
|
|
<if test="materialCode != null and materialCode != ''">and material_code = #{materialCode}</if>
|
|
|
|
<if test="materialCode != null and materialCode != ''">and ppi.material_code = #{materialCode}</if>
|
|
|
|
<if test="materialName != null and materialName != ''">and material_name like concat('%', #{materialName},
|
|
|
|
<if test="materialName != null and materialName != ''">and ppi.material_name like concat('%', #{materialName},
|
|
|
|
'%')
|
|
|
|
'%')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="stationCode != null and stationCode != ''">and station_code = #{stationCode}</if>
|
|
|
|
<if test="stationCode != null and stationCode != ''">and ppi.station_code = #{stationCode}</if>
|
|
|
|
<if test="deviceCode != null and deviceCode != ''">and device_code = #{deviceCode}</if>
|
|
|
|
<if test="deviceCode != null and deviceCode != ''">and ppi.device_code = #{deviceCode}</if>
|
|
|
|
<if test="teamCode != null and teamCode != ''">and team_code = #{teamCode}</if>
|
|
|
|
<if test="teamCode != null and teamCode != ''">and ppi.team_code = #{teamCode}</if>
|
|
|
|
<if test="planAmount != null ">and plan_amount = #{planAmount}</if>
|
|
|
|
<if test="planAmount != null ">and ppi.plan_amount = #{planAmount}</if>
|
|
|
|
<if test="completeAmount != null ">and complete_amount = #{completeAmount}</if>
|
|
|
|
<if test="completeAmount != null ">and ppi.complete_amount = #{completeAmount}</if>
|
|
|
|
<if test="params.beginBeginTime != null and params.beginBeginTime != '' and params.endBeginTime != null and params.endBeginTime != ''">
|
|
|
|
<if test="params.beginBeginTime != null and params.beginBeginTime != '' and params.endBeginTime != null and params.endBeginTime != ''">
|
|
|
|
and begin_time between #{params.beginBeginTime} and #{params.endBeginTime}
|
|
|
|
and ppi.begin_time between #{params.beginBeginTime} and #{params.endBeginTime}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="endTime != null ">and end_time = #{endTime}</if>
|
|
|
|
<if test="endTime != null ">and ppi.end_time = #{endTime}</if>
|
|
|
|
<if test="compFlag != null and compFlag != ''">and comp_flag = #{compFlag}</if>
|
|
|
|
<if test="compFlag != null and compFlag != ''">and ppi.comp_flag = #{compFlag}</if>
|
|
|
|
<if test="createdBy != null and createdBy != ''">and created_by = #{createdBy}</if>
|
|
|
|
<if test="createdBy != null and createdBy != ''">and ppi.created_by = #{createdBy}</if>
|
|
|
|
<if test="createdTime != null ">and created_time = #{createdTime}</if>
|
|
|
|
<if test="createdTime != null ">and ppi.created_time = #{createdTime}</if>
|
|
|
|
<if test="updatedBy != null and updatedBy != ''">and updated_by = #{updatedBy}</if>
|
|
|
|
<if test="updatedBy != null and updatedBy != ''">and ppi.updated_by = #{updatedBy}</if>
|
|
|
|
<if test="updatedTime != null ">and updated_time = #{updatedTime}</if>
|
|
|
|
<if test="updatedTime != null ">and ppi.updated_time = #{updatedTime}</if>
|
|
|
|
<if test="planBeginTime != null ">and plan_begin_time = #{planBeginTime}</if>
|
|
|
|
<if test="planBeginTime != null ">and ppi.plan_begin_time = #{planBeginTime}</if>
|
|
|
|
<if test="planEndTime != null ">and plan_end_time = #{planEndTime}</if>
|
|
|
|
<if test="planEndTime != null ">and ppi.plan_end_time = #{planEndTime}</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectProdPlanInfoByObjId" parameterType="Long" resultMap="ProdPlanInfoResult">
|
|
|
|
<select id="selectProdPlanInfoByObjId" parameterType="Long" resultMap="ProdPlanInfoResult">
|
|
|
|
<include refid="selectProdPlanInfoVo"/>
|
|
|
|
<include refid="selectProdPlanInfoVo"/>
|
|
|
|
where obj_id = #{objId}
|
|
|
|
where ppi.obj_id = #{objId}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertProdPlanInfo" parameterType="ProdPlanInfo" useGeneratedKeys="true" keyProperty="objId">
|
|
|
|
<insert id="insertProdPlanInfo" parameterType="ProdPlanInfo" useGeneratedKeys="true" keyProperty="objId">
|
|
|
|