|
|
@ -7,12 +7,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<resultMap type="EquOutsourceWork" id="EquOutsourceWorkResult">
|
|
|
|
<resultMap type="EquOutsourceWork" id="EquOutsourceWorkResult">
|
|
|
|
<result property="workId" column="work_id" />
|
|
|
|
<result property="workId" column="work_id" />
|
|
|
|
<result property="workCode" column="work_code" />
|
|
|
|
<result property="workCode" column="work_code" />
|
|
|
|
|
|
|
|
<result property="orderCode" column="order_code" />
|
|
|
|
<result property="workPerson" column="work_person" />
|
|
|
|
<result property="workPerson" column="work_person" />
|
|
|
|
<result property="workOutsourcingUnit" column="work_outsourcing_unit" />
|
|
|
|
<result property="workOutsourcingUnit" column="work_outsourcing_unit" />
|
|
|
|
<result property="workConnection" column="work_connection" />
|
|
|
|
<result property="workConnection" column="work_connection" />
|
|
|
|
<result property="workReason" column="work_reason" />
|
|
|
|
<result property="workReason" column="work_reason" />
|
|
|
|
<result property="workType" column="work_type" />
|
|
|
|
<result property="workType" column="work_type" />
|
|
|
|
<result property="managementCode" column="management_code" />
|
|
|
|
<result property="equipmentCode" column="equipment_code" />
|
|
|
|
<result property="workCost" column="work_cost" />
|
|
|
|
<result property="workCost" column="work_cost" />
|
|
|
|
<result property="workCostTime" column="work_cost_time" />
|
|
|
|
<result property="workCostTime" column="work_cost_time" />
|
|
|
|
<result property="attr1" column="attr1" />
|
|
|
|
<result property="attr1" column="attr1" />
|
|
|
@ -27,25 +28,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectEquOutsourceWorkVo">
|
|
|
|
<sql id="selectEquOutsourceWorkVo">
|
|
|
|
select work_id, work_code, work_person, work_outsourcing_unit, work_connection, work_reason, work_type, management_code, work_cost, work_cost_time, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time, factory_code from equ_outsource_work
|
|
|
|
select work_id, work_code,order_code, work_person, work_outsourcing_unit, work_connection, work_reason, work_type, equipment_code, work_cost, work_cost_time, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time, factory_code from equ_outsource_work
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectEquOutsourceWorkList" parameterType="EquOutsourceWork" resultMap="EquOutsourceWorkResult">
|
|
|
|
<select id="selectEquOutsourceWorkList" parameterType="EquOutsourceWork" resultMap="EquOutsourceWorkResult">
|
|
|
|
<include refid="selectEquOutsourceWorkVo"/>
|
|
|
|
<include refid="selectEquOutsourceWorkVo"/>
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="workCode != null and workCode != ''"> and work_code = #{workCode}</if>
|
|
|
|
<if test="workCode != null and workCode != ''"> and work_code = #{workCode}</if>
|
|
|
|
|
|
|
|
<if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
|
|
|
|
<if test="workPerson != null and workPerson != ''"> and work_person = #{workPerson}</if>
|
|
|
|
<if test="workPerson != null and workPerson != ''"> and work_person = #{workPerson}</if>
|
|
|
|
<if test="workOutsourcingUnit != null and workOutsourcingUnit != ''"> and work_outsourcing_unit = #{workOutsourcingUnit}</if>
|
|
|
|
<if test="workOutsourcingUnit != null and workOutsourcingUnit != ''"> and work_outsourcing_unit = #{workOutsourcingUnit}</if>
|
|
|
|
<if test="workConnection != null and workConnection != ''"> and work_connection = #{workConnection}</if>
|
|
|
|
<if test="workConnection != null and workConnection != ''"> and work_connection = #{workConnection}</if>
|
|
|
|
<if test="workReason != null and workReason != ''"> and work_reason = #{workReason}</if>
|
|
|
|
<if test="workReason != null and workReason != ''"> and work_reason = #{workReason}</if>
|
|
|
|
<if test="workType != null and workType != ''"> and work_type = #{workType}</if>
|
|
|
|
<if test="workType != null and workType != ''"> and work_type = #{workType}</if>
|
|
|
|
<if test="managementCode != null and managementCode != ''"> and management_code = #{managementCode}</if>
|
|
|
|
<if test="equipmentCode != null and equipmentCode != ''"> and equipment_code = #{equipmentCode}</if>
|
|
|
|
<if test="workCost != null and workCost != ''"> and work_cost = #{workCost}</if>
|
|
|
|
<if test="workCost != null and workCost != ''"> and work_cost = #{workCost}</if>
|
|
|
|
<if test="workCostTime != null and workCostTime != ''"> and work_cost_time = #{workCostTime}</if>
|
|
|
|
<if test="workCostTime != null and workCostTime != ''"> and work_cost_time = #{workCostTime}</if>
|
|
|
|
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
|
|
|
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
|
|
|
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
|
|
|
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
|
|
|
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
|
|
|
|
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
|
|
|
|
|
|
|
|
<if test="createTime != null and createTime != ''"> and create_time = #{createTime}</if>
|
|
|
|
|
|
|
|
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
|
|
|
|
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
|
|
|
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
|
|
|
|
|
|
|
|
and del_flag = '0'
|
|
|
|
|
|
|
|
ORDER BY create_time DESC
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
@ -59,12 +65,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="workId != null">work_id,</if>
|
|
|
|
<if test="workId != null">work_id,</if>
|
|
|
|
<if test="workCode != null">work_code,</if>
|
|
|
|
<if test="workCode != null">work_code,</if>
|
|
|
|
|
|
|
|
<if test="orderCode != null">order_code,</if>
|
|
|
|
<if test="workPerson != null">work_person,</if>
|
|
|
|
<if test="workPerson != null">work_person,</if>
|
|
|
|
<if test="workOutsourcingUnit != null">work_outsourcing_unit,</if>
|
|
|
|
<if test="workOutsourcingUnit != null">work_outsourcing_unit,</if>
|
|
|
|
<if test="workConnection != null">work_connection,</if>
|
|
|
|
<if test="workConnection != null">work_connection,</if>
|
|
|
|
<if test="workReason != null">work_reason,</if>
|
|
|
|
<if test="workReason != null">work_reason,</if>
|
|
|
|
<if test="workType != null">work_type,</if>
|
|
|
|
<if test="workType != null">work_type,</if>
|
|
|
|
<if test="managementCode != null">management_code,</if>
|
|
|
|
<if test="equipmentCode != null">equipment_code,</if>
|
|
|
|
<if test="workCost != null">work_cost,</if>
|
|
|
|
<if test="workCost != null">work_cost,</if>
|
|
|
|
<if test="workCostTime != null">work_cost_time,</if>
|
|
|
|
<if test="workCostTime != null">work_cost_time,</if>
|
|
|
|
<if test="attr1 != null">attr1,</if>
|
|
|
|
<if test="attr1 != null">attr1,</if>
|
|
|
@ -80,12 +87,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="workId != null">#{workId},</if>
|
|
|
|
<if test="workId != null">#{workId},</if>
|
|
|
|
<if test="workCode != null">#{workCode},</if>
|
|
|
|
<if test="workCode != null">#{workCode},</if>
|
|
|
|
|
|
|
|
<if test="orderCode != null">#{orderCode},</if>
|
|
|
|
<if test="workPerson != null">#{workPerson},</if>
|
|
|
|
<if test="workPerson != null">#{workPerson},</if>
|
|
|
|
<if test="workOutsourcingUnit != null">#{workOutsourcingUnit},</if>
|
|
|
|
<if test="workOutsourcingUnit != null">#{workOutsourcingUnit},</if>
|
|
|
|
<if test="workConnection != null">#{workConnection},</if>
|
|
|
|
<if test="workConnection != null">#{workConnection},</if>
|
|
|
|
<if test="workReason != null">#{workReason},</if>
|
|
|
|
<if test="workReason != null">#{workReason},</if>
|
|
|
|
<if test="workType != null">#{workType},</if>
|
|
|
|
<if test="workType != null">#{workType},</if>
|
|
|
|
<if test="managementCode != null">#{managementCode},</if>
|
|
|
|
<if test="equipmentCode != null">#{equipmentCode},</if>
|
|
|
|
<if test="workCost != null">#{workCost},</if>
|
|
|
|
<if test="workCost != null">#{workCost},</if>
|
|
|
|
<if test="workCostTime != null">#{workCostTime},</if>
|
|
|
|
<if test="workCostTime != null">#{workCostTime},</if>
|
|
|
|
<if test="attr1 != null">#{attr1},</if>
|
|
|
|
<if test="attr1 != null">#{attr1},</if>
|
|
|
@ -104,12 +112,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
update equ_outsource_work
|
|
|
|
update equ_outsource_work
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
<if test="workCode != null">work_code = #{workCode},</if>
|
|
|
|
<if test="workCode != null">work_code = #{workCode},</if>
|
|
|
|
|
|
|
|
<if test="orderCode != null">order_code = #{orderCode},</if>
|
|
|
|
<if test="workPerson != null">work_person = #{workPerson},</if>
|
|
|
|
<if test="workPerson != null">work_person = #{workPerson},</if>
|
|
|
|
<if test="workOutsourcingUnit != null">work_outsourcing_unit = #{workOutsourcingUnit},</if>
|
|
|
|
<if test="workOutsourcingUnit != null">work_outsourcing_unit = #{workOutsourcingUnit},</if>
|
|
|
|
<if test="workConnection != null">work_connection = #{workConnection},</if>
|
|
|
|
<if test="workConnection != null">work_connection = #{workConnection},</if>
|
|
|
|
<if test="workReason != null">work_reason = #{workReason},</if>
|
|
|
|
<if test="workReason != null">work_reason = #{workReason},</if>
|
|
|
|
<if test="workType != null">work_type = #{workType},</if>
|
|
|
|
<if test="workType != null">work_type = #{workType},</if>
|
|
|
|
<if test="managementCode != null">management_code = #{managementCode},</if>
|
|
|
|
<if test="equipmentCode != null">equipment_code = #{equipmentCode},</if>
|
|
|
|
<if test="workCost != null">work_cost = #{workCost},</if>
|
|
|
|
<if test="workCost != null">work_cost = #{workCost},</if>
|
|
|
|
<if test="workCostTime != null">work_cost_time = #{workCostTime},</if>
|
|
|
|
<if test="workCostTime != null">work_cost_time = #{workCostTime},</if>
|
|
|
|
<if test="attr1 != null">attr1 = #{attr1},</if>
|
|
|
|
<if test="attr1 != null">attr1 = #{attr1},</if>
|
|
|
@ -123,6 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
|
|
|
|
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
where work_id = #{workId}
|
|
|
|
where work_id = #{workId}
|
|
|
|
|
|
|
|
and del_flag = '0'
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteEquOutsourceWorkByWorkId" parameterType="String">
|
|
|
|
<delete id="deleteEquOutsourceWorkByWorkId" parameterType="String">
|
|
|
@ -135,4 +145,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
#{workId}
|
|
|
|
#{workId}
|
|
|
|
</foreach>
|
|
|
|
</foreach>
|
|
|
|
</delete>
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectWorkCodeSerialNumber" resultType="java.lang.Integer">
|
|
|
|
|
|
|
|
SELECT COUNT(work_id)+1 AS serialNum
|
|
|
|
|
|
|
|
FROM equ_outsource_work
|
|
|
|
|
|
|
|
where del_flag = '0'
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|