|
@@ -22,19 +22,20 @@
|
|
|
<result column="LOADING_ID" jdbcType="DECIMAL" property="loadingId" />
|
|
|
<result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
|
|
|
<result column="LOADING_SEQUENCE" jdbcType="DECIMAL" property="loadingSequence" />
|
|
|
+ <result column="ISDEDUCT" jdbcType="DECIMAL" property="isdeduct" />
|
|
|
</resultMap>
|
|
|
<sql id="columns">
|
|
|
- RESULT_ID, RESULT_TOTAL_ID, RESULT_LOAD_START_TIME, RESULT_LOAD_END_TIME, RESULT_LOAD_DURATION,
|
|
|
- LOAD_STANDARD_TIME_ID, LOADER_ID, RESULT_ISCLEAR, DELETE_NAME, DELETE_TIME, INSERT_USERNAME,
|
|
|
- INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, STATUS, RESULT_MEASURED_TONNAGE,
|
|
|
- LOADING_ID, MATERIAL_ID, LOADING_SEQUENCE
|
|
|
+ RESULT_ID, RESULT_TOTAL_ID, RESULT_LOAD_START_TIME, RESULT_LOAD_END_TIME, RESULT_LOAD_DURATION,
|
|
|
+ LOAD_STANDARD_TIME_ID, LOADER_ID, RESULT_ISCLEAR, DELETE_NAME, DELETE_TIME, INSERT_USERNAME,
|
|
|
+ INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, STATUS, RESULT_MEASURED_TONNAGE,
|
|
|
+ LOADING_ID, MATERIAL_ID, LOADING_SEQUENCE, ISDEDUCT
|
|
|
</sql>
|
|
|
<sql id="columns_alias">
|
|
|
- t.RESULT_ID, t.RESULT_TOTAL_ID, t.RESULT_LOAD_START_TIME, t.RESULT_LOAD_END_TIME,
|
|
|
- t.RESULT_LOAD_DURATION, t.LOAD_STANDARD_TIME_ID, t.LOADER_ID, t.RESULT_ISCLEAR, t.DELETE_NAME,
|
|
|
- t.DELETE_TIME, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME,
|
|
|
- t.INSERT_UPDATE_REMARK, t.STATUS, t.RESULT_MEASURED_TONNAGE, t.LOADING_ID, t.MATERIAL_ID,
|
|
|
- t.LOADING_SEQUENCE
|
|
|
+ t.RESULT_ID, t.RESULT_TOTAL_ID, t.RESULT_LOAD_START_TIME, t.RESULT_LOAD_END_TIME,
|
|
|
+ t.RESULT_LOAD_DURATION, t.LOAD_STANDARD_TIME_ID, t.LOADER_ID, t.RESULT_ISCLEAR, t.DELETE_NAME,
|
|
|
+ t.DELETE_TIME, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME,
|
|
|
+ t.INSERT_UPDATE_REMARK, t.STATUS, t.RESULT_MEASURED_TONNAGE, t.LOADING_ID, t.MATERIAL_ID,
|
|
|
+ t.LOADING_SEQUENCE, t.ISDEDUCT
|
|
|
</sql>
|
|
|
<sql id="select">
|
|
|
SELECT <include refid="columns" /> FROM TMSTRUCK_LOAD_RESULT
|
|
@@ -104,6 +105,9 @@
|
|
|
<if test="loadingSequence != null">
|
|
|
and LOADING_SEQUENCE = #{loadingSequence}
|
|
|
</if>
|
|
|
+ <if test="isdeduct != null">
|
|
|
+ and ISDEDUCT = #{isdeduct}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="whereLike">
|
|
@@ -168,6 +172,9 @@
|
|
|
<if test="loadingSequence != null">
|
|
|
and LOADING_SEQUENCE = #{loadingSequence}
|
|
|
</if>
|
|
|
+ <if test="isdeduct != null">
|
|
|
+ and ISDEDUCT = #{isdeduct}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</sql>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
@@ -234,6 +241,9 @@
|
|
|
<if test="loadingSequence != null">
|
|
|
or LOADING_SEQUENCE = #{loadingSequence}
|
|
|
</if>
|
|
|
+ <if test="isdeduct != null">
|
|
|
+ or ISDEDUCT = #{isdeduct}
|
|
|
+ </if>
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckLoadResult">
|
|
|
insert into TMSTRUCK_LOAD_RESULT (RESULT_ID, RESULT_TOTAL_ID, RESULT_LOAD_START_TIME,
|
|
@@ -242,16 +252,16 @@
|
|
|
DELETE_NAME, DELETE_TIME, INSERT_USERNAME,
|
|
|
INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
|
|
|
INSERT_UPDATE_REMARK, STATUS, RESULT_MEASURED_TONNAGE,
|
|
|
- LOADING_ID, MATERIAL_ID, LOADING_SEQUENCE
|
|
|
- )
|
|
|
+ LOADING_ID, MATERIAL_ID, LOADING_SEQUENCE,
|
|
|
+ ISDEDUCT)
|
|
|
values (#{resultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL}, #{resultLoadStartTime,jdbcType=TIMESTAMP},
|
|
|
#{resultLoadEndTime,jdbcType=TIMESTAMP}, #{resultLoadDuration,jdbcType=DECIMAL},
|
|
|
#{loadStandardTimeId,jdbcType=DECIMAL}, #{loaderId,jdbcType=DECIMAL}, #{resultIsclear,jdbcType=VARCHAR},
|
|
|
#{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP}, #{insertUsername,jdbcType=VARCHAR},
|
|
|
#{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
|
|
|
#{insertUpdateRemark,jdbcType=VARCHAR}, #{status,jdbcType=DECIMAL}, #{resultMeasuredTonnage,jdbcType=DECIMAL},
|
|
|
- #{loadingId,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL}, #{loadingSequence,jdbcType=DECIMAL}
|
|
|
- )
|
|
|
+ #{loadingId,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL}, #{loadingSequence,jdbcType=DECIMAL},
|
|
|
+ #{isdeduct,jdbcType=DECIMAL})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckLoadResult">
|
|
|
insert into TMSTRUCK_LOAD_RESULT
|
|
@@ -316,6 +326,9 @@
|
|
|
<if test="loadingSequence != null">
|
|
|
LOADING_SEQUENCE,
|
|
|
</if>
|
|
|
+ <if test="isdeduct != null">
|
|
|
+ ISDEDUCT,
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="resultId != null">
|
|
@@ -378,6 +391,9 @@
|
|
|
<if test="loadingSequence != null">
|
|
|
#{loadingSequence,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="isdeduct != null">
|
|
|
+ #{isdeduct,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckLoadResult">
|
|
@@ -400,7 +416,8 @@
|
|
|
RESULT_MEASURED_TONNAGE = #{resultMeasuredTonnage,jdbcType=DECIMAL},
|
|
|
LOADING_ID = #{loadingId,jdbcType=DECIMAL},
|
|
|
MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
|
|
|
- LOADING_SEQUENCE = #{loadingSequence,jdbcType=DECIMAL}
|
|
|
+ LOADING_SEQUENCE = #{loadingSequence,jdbcType=DECIMAL},
|
|
|
+ ISDEDUCT = #{isdeduct,jdbcType=DECIMAL}
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckLoadResult">
|
|
@@ -463,6 +480,9 @@
|
|
|
<if test="loadingSequence != null">
|
|
|
LOADING_SEQUENCE = #{loadingSequence,jdbcType=DECIMAL},
|
|
|
</if>
|
|
|
+ <if test="isdeduct != null">
|
|
|
+ ISDEDUCT = #{isdeduct,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where RESULT_ID = #{resultId,jdbcType=DECIMAL}
|
|
|
</update>
|
|
@@ -488,8 +508,8 @@
|
|
|
INSERT_USERNAME, INSERT_TIME,
|
|
|
UPDATE_USERNAME, UPDATE_TIME,
|
|
|
INSERT_UPDATE_REMARK, STATUS, RESULT_MEASURED_TONNAGE,
|
|
|
- LOADING_ID, MATERIAL_ID, LOADING_SEQUENCE
|
|
|
- )
|
|
|
+ LOADING_ID, MATERIAL_ID, LOADING_SEQUENCE,
|
|
|
+ ISDEDUCT)
|
|
|
( <foreach collection="list" item="item" separator="union all">
|
|
|
select
|
|
|
#{item.resultId,jdbcType=DECIMAL},
|
|
@@ -500,8 +520,8 @@
|
|
|
#{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
|
|
|
#{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
|
|
|
#{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.status,jdbcType=DECIMAL}, #{item.resultMeasuredTonnage,jdbcType=DECIMAL},
|
|
|
- #{item.loadingId,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL}, #{item.loadingSequence,jdbcType=DECIMAL}
|
|
|
- from dual
|
|
|
+ #{item.loadingId,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL}, #{item.loadingSequence,jdbcType=DECIMAL},
|
|
|
+ #{item.isdeduct,jdbcType=DECIMAL} from dual
|
|
|
</foreach> )
|
|
|
</insert>
|
|
|
<update id="batchUpdate" parameterType="java.util.List">
|
|
@@ -587,6 +607,10 @@
|
|
|
<foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
when #{item.resultId,jdbcType=DECIMAL} then #{item.loadingSequence,jdbcType=DECIMAL}
|
|
|
</foreach>
|
|
|
+ ,ISDEDUCT=
|
|
|
+ <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
|
|
|
+ when #{item.resultId,jdbcType=DECIMAL} then #{item.isdeduct,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
where RESULT_ID in
|
|
|
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
#{item.resultId,jdbcType=DECIMAL}
|
|
@@ -1261,8 +1285,8 @@
|
|
|
|
|
|
<!-- 查询内转进口矿/国产矿装车实绩 -->
|
|
|
<select id="getImportedDomesticNzLoadResult" parameterType="java.util.Map" resultType="java.util.Map">
|
|
|
-
|
|
|
- SELECT *
|
|
|
+ SELECT
|
|
|
+ *
|
|
|
FROM (
|
|
|
SELECT APO.PURCHASE_ORDER_NO "purchaseOrderNo",
|
|
|
RM.MATERIAL_NAME "materialName",
|