|
|
|
|
@ -70,7 +70,6 @@
|
|
|
|
|
<select id="selectBaseBomByBomCode" parameterType="String" resultMap="BaseBomResult">
|
|
|
|
|
<include refid="selectBaseBomVo"/>
|
|
|
|
|
where bom_code = #{bomCode}
|
|
|
|
|
order by production_version desc
|
|
|
|
|
</select>
|
|
|
|
|
<select id="getMaxTime" resultType="java.util.Date">
|
|
|
|
|
select max(create_time) from sys_factory where create_by = 'job'
|
|
|
|
|
@ -147,60 +146,39 @@
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="insertBaseBomBatch">
|
|
|
|
|
insert into base_bom
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="item.bomBo != null">bom_bo,</if>
|
|
|
|
|
<if test="item.factoryCode != null">factory_code,</if>
|
|
|
|
|
<if test="item.productionVersion != null">production_version,</if>
|
|
|
|
|
<if test="item.bomCode != null">bom_code,</if>
|
|
|
|
|
<if test="item.optionalBom != null">optional_bom,</if>
|
|
|
|
|
<if test="item.optionalBomText != null">optional_bom_text,</if>
|
|
|
|
|
<if test="item.pvvd != null">pvvd,</if>
|
|
|
|
|
<if test="item.pved != null">pved,</if>
|
|
|
|
|
<if test="item.bomCalculateNumber != null">bom_calculate_number,</if>
|
|
|
|
|
<if test="item.bomCalculateUnit != null">bom_calculate_unit,</if>
|
|
|
|
|
<if test="item.bomBaseNumber != null">bom_base_number,</if>
|
|
|
|
|
<if test="item.bomBaseUnit != null">bom_base_unit,</if>
|
|
|
|
|
<if test="item.componentUnit != null">component_unit,</if>
|
|
|
|
|
<if test="item.componentProFlag != null">component_pro_flag,</if>
|
|
|
|
|
<if test="item.msi != null">msi,</if>
|
|
|
|
|
<if test="item.sanka != null">sanka,</if>
|
|
|
|
|
<if test="item.attr1 != null">attr1,</if>
|
|
|
|
|
<if test="item.attr2 != null">attr2,</if>
|
|
|
|
|
<if test="item.attr3 != null">attr3,</if>
|
|
|
|
|
<if test="item.createBy != null">create_by,</if>
|
|
|
|
|
<if test="item.createTime != null">create_time,</if>
|
|
|
|
|
<if test="item.updateBy != null">update_by,</if>
|
|
|
|
|
<if test="item.updateTime != null">update_time,</if>
|
|
|
|
|
<if test="item.remark != null">remark,</if>
|
|
|
|
|
<if test="item.currentVersion != null">current_version,</if>
|
|
|
|
|
</trim>
|
|
|
|
|
([factory_code], [production_version], [bom_code], [optional_bom], [pvvd], [pved],
|
|
|
|
|
[bom_calculate_number], [bom_calculate_unit], [bom_base_number], [bom_base_unit],
|
|
|
|
|
[component_pro_flag], [create_by], [create_time], [update_by],
|
|
|
|
|
[update_time])
|
|
|
|
|
VALUES
|
|
|
|
|
<foreach collection="list" index="index" item="item" separator=",">
|
|
|
|
|
<if test="item.bomBo != null">#{bomBo},</if>
|
|
|
|
|
<if test="item.factoryCode != null">#{factoryCode},</if>
|
|
|
|
|
<if test="item.productionVersion != null">#{productionVersion},</if>
|
|
|
|
|
<if test="item.bomCode != null">#{bomCode},</if>
|
|
|
|
|
<if test="item.optionalBom != null">#{optionalBom},</if>
|
|
|
|
|
<if test="item.optionalBomText != null">#{optionalBomText},</if>
|
|
|
|
|
<if test="item.pvvd != null">#{pvvd},</if>
|
|
|
|
|
<if test="item.pved != null">#{pved},</if>
|
|
|
|
|
<if test="item.bomCalculateNumber != null">#{bomCalculateNumber},</if>
|
|
|
|
|
<if test="item.bomCalculateUnit != null">#{bomCalculateUnit},</if>
|
|
|
|
|
<if test="item.bomBaseNumber != null">#{bomBaseNumber},</if>
|
|
|
|
|
<if test="item.bomBaseUnit != null">#{bomBaseUnit},</if>
|
|
|
|
|
<if test="item.componentUnit != null">#{componentUnit},</if>
|
|
|
|
|
<if test="item.componentProFlag != null">#{componentProFlag},</if>
|
|
|
|
|
<if test="item.msi != null">#{msi},</if>
|
|
|
|
|
<if test="item.sanka != null">#{sanka},</if>
|
|
|
|
|
<if test="item.attr1 != null">#{attr1},</if>
|
|
|
|
|
<if test="item.attr2 != null">#{attr2},</if>
|
|
|
|
|
<if test="item.attr3 != null">#{attr3},</if>
|
|
|
|
|
<if test="item.createBy != null">#{createBy},</if>
|
|
|
|
|
<if test="item.createTime != null">#{createTime},</if>
|
|
|
|
|
<if test="item.updateBy != null">#{updateBy},</if>
|
|
|
|
|
<if test="item.updateTime != null">#{updateTime},</if>
|
|
|
|
|
<if test="item.remark != null">#{remark},</if>
|
|
|
|
|
<if test="item.currentVersion != null">#{currentVersion},</if>
|
|
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="item.bomBo != null">#{item.bomBo},</if>
|
|
|
|
|
<if test="item.factoryCode != null">#{item.factoryCode},</if>
|
|
|
|
|
<if test="item.productionVersion != null">#{item.productionVersion},</if>
|
|
|
|
|
<if test="item.bomCode != null">#{item.bomCode},</if>
|
|
|
|
|
<if test="item.optionalBom != null">#{item.optionalBom},</if>
|
|
|
|
|
<if test="item.optionalBomText != null">#{item.optionalBomText},</if>
|
|
|
|
|
<if test="item.pvvd != null">#{item.pvvd},</if>
|
|
|
|
|
<if test="item.pved != null">#{item.pved},</if>
|
|
|
|
|
<if test="item.bomCalculateNumber != null">#{item.bomCalculateNumber},</if>
|
|
|
|
|
<if test="item.bomCalculateUnit != null">#{item.bomCalculateUnit},</if>
|
|
|
|
|
<if test="item.bomBaseNumber != null">#{item.bomBaseNumber},</if>
|
|
|
|
|
<if test="item.bomBaseUnit != null">#{item.bomBaseUnit},</if>
|
|
|
|
|
<if test="item.componentUnit != null">#{item.componentUnit},</if>
|
|
|
|
|
<if test="item.componentProFlag != null">#{item.componentProFlag},</if>
|
|
|
|
|
<if test="item.msi != null">#{item.msi},</if>
|
|
|
|
|
<if test="item.sanka != null">#{item.sanka},</if>
|
|
|
|
|
<if test="item.attr1 != null">#{item.attr1},</if>
|
|
|
|
|
<if test="item.attr2 != null">#{item.attr2},</if>
|
|
|
|
|
<if test="item.attr3 != null">#{item.attr3},</if>
|
|
|
|
|
<if test="item.createBy != null">#{item.createBy},</if>
|
|
|
|
|
<if test="item.createTime != null">#{item.createTime},</if>
|
|
|
|
|
<if test="item.updateBy != null">#{item.updateBy},</if>
|
|
|
|
|
<if test="item.updateTime != null">#{item.updateTime},</if>
|
|
|
|
|
<if test="item.remark != null">#{item.remark},</if>
|
|
|
|
|
<if test="item.currentVersion != null">#{item.currentVersion},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</foreach>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
@ -231,7 +209,7 @@
|
|
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
|
|
<if test="currentVersion != null">current_version = #{currentVersion},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where factory_code = #{factoryCode}
|
|
|
|
|
where bom_bo = #{bomBo}
|
|
|
|
|
</update>
|
|
|
|
|
<!--批量更新工厂建模表-->
|
|
|
|
|
<update id="updateFactoryBatchs">
|
|
|
|
|
|