|
|
|
@ -1,29 +1,39 @@ |
|
|
|
<?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.xujie.sys.modules.fanuc.dao.CostMapper"> |
|
|
|
<resultMap id="BaseResultMap" type="com.xujie.sys.modules.fanuc.entity.CostEntity"> |
|
|
|
<result column="site" jdbcType="VARCHAR" property="site" /> |
|
|
|
<result column="item_no" jdbcType="VARCHAR" property="itemNo" /> |
|
|
|
<result column="work_center_no" jdbcType="VARCHAR" property="workCenterNo" /> |
|
|
|
<result column="unit_cost" jdbcType="DOUBLE" property="unitCost" /> |
|
|
|
<result column="overhead_cost" jdbcType="DOUBLE" property="overheadCost" /> |
|
|
|
<result column="labor_cost" jdbcType="DOUBLE" property="laborCost" /> |
|
|
|
<result column="um_id" jdbcType="VARCHAR" property="umId" /> |
|
|
|
<result column="begin_date" jdbcType="DATE" property="beginDate" /> |
|
|
|
<result column="end_date" jdbcType="DATE" property="endDate" /> |
|
|
|
<result column="remark" jdbcType="VARCHAR" property="remark" /> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
|
|
<update id="updateByEntity"> |
|
|
|
<update id="updateByEntity" parameterType="com.xujie.sys.modules.fanuc.entity.CostEntity" > |
|
|
|
UPDATE Work_Center_Cost |
|
|
|
SET |
|
|
|
<if test="costEntity.itemNo != null and costEntity.itemNo != ''">item_no = #{itemNo},</if> |
|
|
|
<if test="costEntity.unitCost != null and costEntity.unitCost != ''">unit_cost = #{unitCost},</if> |
|
|
|
<if test="costEntity.overheadCost != null and costEntity.overheadCost != ''">overhead_cost = #{overheadCost}, |
|
|
|
</if> |
|
|
|
<if test="costEntity.laborCost != null and costEntity.laborCost != ''">labor_cost = #{laborCost},</if> |
|
|
|
<if test="costEntity.umId != null and costEntity.umId != ''">um_id = #{umId},</if> |
|
|
|
<if test="costEntity.beginDate != null ">begin_date = #{beginDate},</if> |
|
|
|
<if test="costEntity.endDate != null ">end_date = #{endDate},</if> |
|
|
|
<if test="costEntity.remark != null and costEntity.remark != ''">remark = #{remark}</if> |
|
|
|
<set> |
|
|
|
<if test="unitCost != null ">unit_cost = #{unitCost},</if> |
|
|
|
<if test="overheadCost != null ">overhead_cost = #{overheadCost},</if> |
|
|
|
<if test="laborCost != null ">labor_cost = #{laborCost},</if> |
|
|
|
<if test="umId != null and costEntity.umId != ''">um_id = #{umId},</if> |
|
|
|
<if test="beginDate != null ">begin_date = #{beginDate},</if> |
|
|
|
<if test="endDate != null ">end_date = #{endDate},</if> |
|
|
|
<if test="remark != null and remark != ''">remark = #{remark}</if> |
|
|
|
</set> |
|
|
|
WHERE site = #{site} |
|
|
|
And work_center_no=#{workCenterNo} |
|
|
|
And item_no=#{itemNo} |
|
|
|
|
|
|
|
</update> |
|
|
|
|
|
|
|
<delete id="deleteByEntity"> |
|
|
|
<delete id="deleteByEntity" parameterType="CostEntity"> |
|
|
|
Delete |
|
|
|
from labor_class_cost |
|
|
|
from Work_Center_Cost |
|
|
|
WHERE site = #{site} |
|
|
|
And work_center_no = #{workCenterNo} |
|
|
|
And item_no = #{itemNo} |
|
|
|
|