|
@@ -8,13 +8,13 @@
|
|
|
</select>
|
|
|
<!-- 物料字典新增 -->
|
|
|
<insert id="addMaterial">
|
|
|
- insert into tld_material(code,name,tld_id,specification_and_model,unit_of_measurement,size,is_not_disable,is_recommend,min_num,max_num)
|
|
|
- values(#{code},#{name},#{tldId},#{specificationAndModel},#{unitOfMeasurement},'0','0','0',"0","0")
|
|
|
+ insert into tld_material(code,name,tld_id,specification_and_model,unit_of_measurement,size,is_not_disable,is_recommend,min_num,max_num,typ,company_number)
|
|
|
+ values(#{code},#{name},#{tldId},#{specificationAndModel},#{unitOfMeasurement},'0','0','0',"0","0",#{typeVal},#{companyNumber})
|
|
|
</insert>
|
|
|
<!-- 字典新增 -->
|
|
|
<insert id="addDictionary">
|
|
|
- insert into ${tableName}(code,name,tld_id)
|
|
|
- values(#{code},#{name},#{tldId})
|
|
|
+ insert into ${tableName}(code,name,tld_id,type)
|
|
|
+ values(#{code},#{name},#{tldId},#{typeVal})
|
|
|
</insert>
|
|
|
<!-- 查询字典内容 -->
|
|
|
<select id="getDictionary" resultType="com.tld.model.Dictionary">
|
|
@@ -50,8 +50,8 @@
|
|
|
</select>
|
|
|
<!-- 库账对存字典新增 -->
|
|
|
<insert id="addTreasuryAccount">
|
|
|
- insert into tld_treasury_account(material_id,code,name,num)
|
|
|
- values(#{materialId},#{code},#{name},#{num})
|
|
|
+ insert into tld_treasury_account(material_id,code,name,num,type)
|
|
|
+ values(#{materialId},#{code},#{name},#{num},#{typeVal})
|
|
|
</insert>
|
|
|
<!-- 查询仓库id -->
|
|
|
<select id="getWarehouse" resultType="String">
|
|
@@ -84,4 +84,95 @@
|
|
|
</if>
|
|
|
</trim>
|
|
|
</select>
|
|
|
+ <!-- 修改物料字典内容 -->
|
|
|
+ <update id="updateMaterial">
|
|
|
+ update tld_material
|
|
|
+ <set>
|
|
|
+ <trim suffixOverrides=",">
|
|
|
+ <if test="code != null and code != ''">
|
|
|
+ code = #{code},
|
|
|
+ </if>
|
|
|
+ <if test="name != null and name != ''">
|
|
|
+ name = #{name},
|
|
|
+ </if>
|
|
|
+ <if test="tldId != null and tldId != ''">
|
|
|
+ tld_id = #{tldId},
|
|
|
+ </if>
|
|
|
+ <if test="specificationAndModel != null and specificationAndModel != ''">
|
|
|
+ specification_and_model = #{specificationAndModel},
|
|
|
+ </if>
|
|
|
+ <if test="unitOfMeasurement != null and unitOfMeasurement != ''">
|
|
|
+ unit_of_measurement = #{unitOfMeasurement},
|
|
|
+ </if>
|
|
|
+ <if test="size != null and size != ''">
|
|
|
+ size = #{size},
|
|
|
+ </if>
|
|
|
+ <if test="wllbClass != null and wllbClass != ''">
|
|
|
+ wllb_class = #{wllbClass},
|
|
|
+ </if>
|
|
|
+ <if test="isNotDisable != null and isNotDisable != ''">
|
|
|
+ is_not_disable = #{isNotDisable},
|
|
|
+ </if>
|
|
|
+ <if test="isRecommend != null and isRecommend != ''">
|
|
|
+ is_recommend = #{isRecommend},
|
|
|
+ </if>
|
|
|
+ <if test="partType != null and partType != ''">
|
|
|
+ part_type = #{partType},
|
|
|
+ </if>
|
|
|
+ <if test="minNum != null and minNum != ''">
|
|
|
+ min_num = #{minNum},
|
|
|
+ </if>
|
|
|
+ <if test="maxNum != null and maxNum != ''">
|
|
|
+ max_num = #{maxNum},
|
|
|
+ </if>
|
|
|
+ <if test="companyNumber != null and companyNumber != ''">
|
|
|
+ company_number = #{companyNumber},
|
|
|
+ </if>
|
|
|
+ modify_user = #{modifyUser},modify_time=now(),
|
|
|
+ </trim>
|
|
|
+ </set>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+ <!-- 库存对账 -->
|
|
|
+ <update id="updateTreasuryAccount">
|
|
|
+ update tld_material
|
|
|
+ <set>
|
|
|
+ <if test="materialId != null and materialId != ''">
|
|
|
+ material_id = #{materialId},
|
|
|
+ </if>
|
|
|
+ <if test="code != null and code != ''">
|
|
|
+ code = #{code},
|
|
|
+ </if>
|
|
|
+ <if test="name != null and name != ''">
|
|
|
+ name = #{name},
|
|
|
+ </if>
|
|
|
+ <if test="tldId != null and tldId != ''">
|
|
|
+ tld_id = #{tldId},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+ <!-- 修改字典内容 -->
|
|
|
+ <update id="updateDictionary">
|
|
|
+ update ${tableName}
|
|
|
+ <set>
|
|
|
+ <if test="materialId != null and materialId != ''">
|
|
|
+ material_id = #{materialId},
|
|
|
+ </if>
|
|
|
+ <if test="code != null and code != ''">
|
|
|
+ code = #{code},
|
|
|
+ </if>
|
|
|
+ <if test="name != null and name != ''">
|
|
|
+ name = #{name},
|
|
|
+ </if>
|
|
|
+ <if test="tldId != null and tldId != ''">
|
|
|
+ tld_id = #{tldId},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+ <!-- 删除字典内容 -->
|
|
|
+ <delete id="deleteDictionary">
|
|
|
+ delete from ${tableName} where id = #{id}
|
|
|
+ </delete>
|
|
|
</mapper>
|