张磊磊
2023-12-04 f7cb52a5b77ab202d67116f6156b472c8517203b
hd/pipe/materialsManage/src/main/resources/mapping/TMaterialReleaseMapper.xml
@@ -163,7 +163,7 @@
     from  t_raw_material
    where  Piece=#{byId}
  </select>
  <insert id="mixingInsert" parameterType="com.thhy.materials.modules.biz.concret.entity.TMixing">
  <insert id="mixingInsert" >
    insert into t_mixing
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="mixingId != null">
@@ -327,7 +327,7 @@
      </if>
    </trim>
  </insert>
  <insert id="mixingConsumeInTwo" parameterType="com.thhy.materials.modules.biz.concret.entity.TMixingConsume">
  <insert id="mixingConsumeInTwo" >
    insert into t_mixing_consume
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="mixingConsumeId != null">
@@ -440,9 +440,11 @@
  </select>
  <select id="mixingConsumePull" resultType="com.thhy.materials.modules.biz.concret.entity.TMixingSignboard">
    select
     mixing_signboard_id as mixingSignboardId,
     signboard_name as signboardName
     from t_mixing_signboard
     tms.mixing_signboard_id as mixingSignboardId,
     tms.signboard_name as signboardName,
     sp.pro_name as proName
     from t_mixing_signboard tms left join sys_project sp
     on tms.pro_id=sp.pro_id
  </select>
  <select id="siloPull" resultType="com.thhy.materials.modules.biz.concret.entity.TSilo">
    select silo_id as siloId,
@@ -468,7 +470,8 @@
        tm.silo_id as siloId,
        tm.percentage as percentage,
        tm.inspect_date as inspectDate,
        ts.silo_name as siloName
        ts.silo_name as siloName,
        ts.types as types
FROM
   t_silo ts
   LEFT JOIN t_mixing tm ON ts.silo_id=tm.silo_id
@@ -483,5 +486,49 @@
      and tm.in_date between #{strTime} and #{endTime}
    </if>
  </select>
  <update id="mixingUpdate" >
    update t_mixing
    <set>
      <if test="material != null">
        material = #{material,jdbcType=VARCHAR},
      </if>
      <if test="spec != null">
        spec = #{spec,jdbcType=VARCHAR},
      </if>
      <if test="producer != null">
        producer = #{producer,jdbcType=VARCHAR},
      </if>
      <if test="stove != null">
        stove = #{stove,jdbcType=VARCHAR},
      </if>
      <if test="inNum != null">
        in_num = #{inNum,jdbcType=VARCHAR},
      </if>
      <if test="inDate != null">
        in_date = #{inDate,jdbcType=VARCHAR},
      </if>
      <if test="inspectState != null">
        inspect_state = #{inspectState,jdbcType=INTEGER},
      </if>
      <if test="reportNumber != null">
        report_number = #{reportNumber,jdbcType=VARCHAR},
      </if>
      <if test="stata != null">
        stata = #{stata},
      </if>
      <if test="siloId != null">
        silo_id = #{siloId},
      </if>
      <if test="percentage != null">
        percentage = #{percentage},
      </if>
      <if test="inspectDate != null">
        inspect_date = #{inspectDate},
      </if>
    </set>
    where mixing_id = #{mixingId,jdbcType=VARCHAR}
  </update>
  <delete id="mixingDel" parameterType="java.lang.String">
    delete from  t_mixing where  mixing_id=#{mixingId}
  </delete>
</mapper>