Browse Source

2025/7/9

master
Aoi_Tori 6 months ago
parent
commit
209e6567a0
  1. 4
      src/main/java/com/spring/modules/part/entity/BomHeaderEntity.java
  2. 2
      src/main/java/com/spring/modules/part/entity/RecipeHeaderEntity.java
  3. 4
      src/main/java/com/spring/modules/quote/service/impl/QuoteDetailBomTreeServiceImpl.java
  4. 20
      src/main/resources/mapper/part/BomManagementMapper.xml
  5. 22
      src/main/resources/mapper/part/RecipeManagementMapper.xml

4
src/main/java/com/spring/modules/part/entity/BomHeaderEntity.java

@ -97,8 +97,4 @@ public class BomHeaderEntity extends QueryPage implements Serializable {
* 是否为正式物料
*/
private String officialFlag;
/**
* 计划人
*/
private String productGroupId4;
}

2
src/main/java/com/spring/modules/part/entity/RecipeHeaderEntity.java

@ -97,6 +97,4 @@ public class RecipeHeaderEntity extends QueryPage implements Serializable {
* 是否为正式物料
*/
private String officialFlag;
private String productGroupId4;
}

4
src/main/java/com/spring/modules/quote/service/impl/QuoteDetailBomTreeServiceImpl.java

@ -138,9 +138,9 @@ public class QuoteDetailBomTreeServiceImpl extends ServiceImpl<QuoteDetailBomTre
private void handleTool(QuoteDetail detail, QuoteDetailRouting routing) {
// 1清空工具信息
quoteDetailToolService.lambdaUpdate()
/* quoteDetailToolService.lambdaUpdate()
.eq(QuoteDetailTool::getQuoteDetailId, detail.getId())
.remove();
.remove();*/
if (Objects.nonNull(routing)){
// 处理工具
// 2根据routing 生成工具信息

20
src/main/resources/mapper/part/BomManagementMapper.xml

@ -24,8 +24,7 @@
c.um_name as printUnitName,
a.official_flag,
b.ifs_part_no,
b.plm_part_no,
a.product_group_id4
b.plm_part_no
FROM plm_bom_header as a
left join part as b on a.site = b.site and a.part_no = b.part_no
left join um as c on b.um_id = c.um_id
@ -108,7 +107,8 @@
a.part_status,
d.part_status_desc,
a.plm_part_no,
a.ifs_part_no
a.ifs_part_no,
a.product_group_id4
FROM part as a
left join um as b on a.um_id = b.um_id
left join part_family as c on a.site = c.site and a.family_id = c.family_id
@ -132,6 +132,12 @@
<if test = "query.status != null and query.status != ''">
AND a.status = #{query.status}
</if>
<if test = "query.productGroupId4 != null and query.productGroupId4 != ''">
AND a.product_group_id4 = #{query.productGroupId4}
</if>
<if test = "query.partStatus != null and query.partStatus == 'active'">
AND a.part_status != 'D'
</if>
</where>
</select>
@ -189,9 +195,9 @@
<!-- 新增BOM主表内容 -->
<insert id="saveBomHeader" parameterType="BomHeaderEntity">
INSERT INTO plm_bom_header
(site, part_no, eng_chg_level, bom_type, note_text, eff_phase_in_date, eff_phase_out_date, eng_revision, type_flag, net_weight, official_flag, product_group_id4, create_date, create_by)
(site, part_no, eng_chg_level, bom_type, note_text, eff_phase_in_date, eff_phase_out_date, eng_revision, type_flag, net_weight, official_flag, create_date, create_by)
VALUES
(#{site}, #{partNo}, #{engChgLevel}, #{bomType}, #{noteText}, #{effPhaseInDate}, #{effPhaseOutDate}, #{engRevision}, #{typeFlag}, #{netWeight}, #{officialFlag}, #{productGroupId4}, getDate(), #{createBy})
(#{site}, #{partNo}, #{engChgLevel}, #{bomType}, #{noteText}, #{effPhaseInDate}, #{effPhaseOutDate}, #{engRevision}, #{typeFlag}, #{netWeight}, #{officialFlag}, getDate(), #{createBy})
</insert>
<!-- bom明细新增 -->
@ -365,7 +371,6 @@
type_flag = #{typeFlag},
net_weight = #{netWeight},
note_text = #{noteText},
product_group_id4 = #{productGroupId4},
update_date = getDate(),
update_by = #{updateBy}
where site = #{site} and part_no = #{partNo} and eng_chg_level = #{engChgLevel} and bom_type = #{bomType}
@ -409,8 +414,7 @@
type_flag,
net_weight,
note_text,
official_flag,
product_group_id4
official_flag
FROM plm_bom_header
where site = #{site} and part_no = #{partNo} and bom_type = #{bomType} and eng_chg_level = #{engChgLevel}
</select>

22
src/main/resources/mapper/part/RecipeManagementMapper.xml

@ -24,8 +24,7 @@
c.um_name as printUnitName,
a.official_flag,
b.ifs_part_no,
b.plm_part_no,
a.product_group_id4
b.plm_part_no
FROM plm_recipe_header as a
left join part as b on a.site = b.site and a.part_no = b.part_no
left join um as c on b.um_id = c.um_id
@ -110,7 +109,8 @@
a.part_status,
d.part_status_desc,
a.plm_part_no,
a.ifs_part_no
a.ifs_part_no,
a.product_group_id4
FROM part as a
left join um as b on a.um_id = b.um_id
left join part_family as c on a.site = c.site and a.family_id = c.family_id
@ -134,6 +134,12 @@
<if test = "query.status != null and query.status != ''">
AND a.status = #{query.status}
</if>
<if test = "query.productGroupId4 != null and query.productGroupId4 != ''">
AND a.product_group_id4 = #{query.productGroupId4}
</if>
<if test = "query.partStatus != null and query.partStatus == 'active'">
AND a.part_status != 'D'
</if>
</where>
</select>
@ -190,9 +196,9 @@
<!-- 新增Recipe主表内容 -->
<insert id="saveRecipeHeader" parameterType="RecipeHeaderEntity">
INSERT INTO plm_recipe_header
(site, part_no, eng_chg_level, bom_type, note_text, eff_phase_in_date, eff_phase_out_date, eng_revision, type_flag, net_weight, official_flag, create_date, create_by, product_group_id4)
(site, part_no, eng_chg_level, bom_type, note_text, eff_phase_in_date, eff_phase_out_date, eng_revision, type_flag, net_weight, official_flag, create_date, create_by)
VALUES
(#{site}, #{partNo}, #{engChgLevel}, #{bomType}, #{noteText}, #{effPhaseInDate}, #{effPhaseOutDate}, #{engRevision}, #{typeFlag}, #{netWeight}, #{officialFlag}, getDate(), #{createBy}, #{productGroupId4})
(#{site}, #{partNo}, #{engChgLevel}, #{bomType}, #{noteText}, #{effPhaseInDate}, #{effPhaseOutDate}, #{engRevision}, #{typeFlag}, #{netWeight}, #{officialFlag}, getDate(), #{createBy})
</insert>
<!-- recipe明细新增 -->
@ -416,8 +422,7 @@
net_weight = #{netWeight},
note_text = #{noteText},
update_date = getDate(),
update_by = #{updateBy},
product_group_id4 = #{productGroupId4}
update_by = #{updateBy}
where site = #{site} and part_no = #{partNo} and eng_chg_level = #{engChgLevel} and bom_type = #{bomType}
</update>
@ -461,8 +466,7 @@
type_flag,
net_weight,
note_text,
official_flag,
product_group_id4
official_flag
FROM plm_recipe_header
where site = #{site} and part_no = #{partNo} and bom_type = #{bomType} and eng_chg_level = #{engChgLevel}
</select>

Loading…
Cancel
Save