Browse Source

2024-11-11

java8
fengyuan_yang 2 years ago
parent
commit
9f480c6b05
  1. 6
      src/main/java/com/xujie/sys/modules/part/service/impl/BomManagementServiceImpl.java
  2. 10
      src/main/java/com/xujie/sys/modules/part/service/impl/PartInformationServiceImpl.java
  3. 6
      src/main/java/com/xujie/sys/modules/part/service/impl/RoutingManagementServiceImpl.java
  4. 13
      src/main/resources/mapper/pms/QcMapper.xml

6
src/main/java/com/xujie/sys/modules/part/service/impl/BomManagementServiceImpl.java

@ -295,8 +295,8 @@ public class BomManagementServiceImpl extends ServiceImpl<BomManagementMapper, B
if (partInformationEntity == null) {
throw new RuntimeException("查不到该物料信息,请确认工厂和BU!");
}
if ("Purchased (raw)".equals(partInformationEntity.getPartType())) {
throw new RuntimeException("物料类型为:" + partInformationEntity.getPartType() + " !");
if ("Purchased (raw)".equals(partInformationEntity.getPartType2())) {
throw new RuntimeException("物料类型为:" + partInformationEntity.getPartType2() + " !");
}
// 校验查重
BomAllFieldEntity bomAllField = new BomAllFieldEntity();
@ -488,7 +488,7 @@ public class BomManagementServiceImpl extends ServiceImpl<BomManagementMapper, B
if (partInformationEntity == null) {
throw new RuntimeException("物料不存在!");
}
if (!"Manufactured".equals(partInformationEntity.getPartType()) && !"Manufactured Recipe".equals(partInformationEntity.getPartType()) && !"Purchased".equals(partInformationEntity.getPartType())) {
if (!"Manufactured".equals(partInformationEntity.getPartType2()) && !"Manufactured Recipe".equals(partInformationEntity.getPartType2()) && !"Purchased".equals(partInformationEntity.getPartType2())) {
throw new RuntimeException("该物料类型不支持创建BOM!");
}
//

10
src/main/java/com/xujie/sys/modules/part/service/impl/PartInformationServiceImpl.java

@ -149,15 +149,15 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe
partInformationMapper.insert(data);
// 创建该物料的bom默认版本
if (!"Purchased (raw)".equals(data.getPartType())) { // 该类型不创建BOM
if (!"Purchased (raw)".equals(data.getPartType2())) { // 该类型不创建BOM
// 校验查重
BomHeaderEntity bomHeader = new BomHeaderEntity();
bomHeader.setSite(data.getSite());
bomHeader.setBuNo(data.getBuNo());
bomHeader.setPartNo(data.getPartNo());
if (data.getPartType().contains("Manufactured")) {
if (data.getPartType2().contains("Manufactured")) {
bomHeader.setBomType("Manufacturing");
} else if ("Purchased".equals(data.getPartType())) {
} else if ("Purchased".equals(data.getPartType2())) {
bomHeader.setBomType("Purchase");
}
bomHeader.setEffPhaseInDate(data.getCreateDate());
@ -172,7 +172,7 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe
bomDetail.setStatus("Tentative");
bomManagementMapper.bomDetailSave(bomDetail);
// 新增 Routing
if (data.getPartType().contains("Manufactured")) {
if (data.getPartType2().contains("Manufactured")) {
RoutingHeaderEntity headerEntity = new RoutingHeaderEntity();
headerEntity.setSite(data.getSite());
headerEntity.setBuNo(data.getBuNo());
@ -670,7 +670,7 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe
PartInformationEntity toPart = new PartInformationEntity();
BeanUtils.copyProperties(fromPart, toPart);
// if ("Y".equals(inData.getCopyGeneral())) {
// toPart.setPartType(fromPart.getPartType()); // 零件类型
// toPart.setPartType2(fromPart.getPartType2()); // 零件类型
// toPart.setUmId(fromPart.getUmId()); // 库存计量单位
// toPart.setCodeNo(fromPart.getCodeNo()); // 属性模板
// toPart.setCreateBy(inData.getCreateBy()); // 备注

6
src/main/java/com/xujie/sys/modules/part/service/impl/RoutingManagementServiceImpl.java

@ -303,8 +303,8 @@ public class RoutingManagementServiceImpl extends ServiceImpl<RoutingManagementM
if (partInformationEntity == null) {
throw new RuntimeException("查不到该物料信息,请确认工厂和BU!");
}
if ("Purchased (raw)".equals(partInformationEntity.getPartType()) || "Purchased".equals(partInformationEntity.getPartType())) {
throw new RuntimeException("物料类型为:" + partInformationEntity.getPartType() + " !");
if ("Purchased (raw)".equals(partInformationEntity.getPartType2()) || "Purchased".equals(partInformationEntity.getPartType2())) {
throw new RuntimeException("物料类型为:" + partInformationEntity.getPartType2() + " !");
}
// 校验查重
RoutingAllFieldEntity routingAllField = new RoutingAllFieldEntity();
@ -468,7 +468,7 @@ public class RoutingManagementServiceImpl extends ServiceImpl<RoutingManagementM
throw new RuntimeException("物料不存在!");
}
if ("Purchased (raw)".equals(partInformationEntity.getPartType()) || "Purchased".equals(partInformationEntity.getPartType())) {
if ("Purchased (raw)".equals(partInformationEntity.getPartType2()) || "Purchased".equals(partInformationEntity.getPartType2())) {
throw new RuntimeException("该物料类型不支持创建Routing!");
}

13
src/main/resources/mapper/pms/QcMapper.xml

@ -3207,15 +3207,10 @@
c.operation_desc,
J.sku,
sum(roll_qty) as sjzs
FROM
soscheduledrouting AS a
inner JOIN so_routing AS c ON c.order_no = a.orderno
AND a.itemno = c.item_no
AND c.site = a.site
inner JOIN part AS J ON a.site = J.site
AND a.part_no = J.part_no
inner JOIN shoporder AS t ON t.orderno = a.orderno
AND a.site = t.site
FROM soscheduledrouting AS a
inner JOIN so_routing AS c ON c.order_no = a.orderno AND a.itemno = c.item_no AND c.site = a.site
inner JOIN part AS J ON a.site = J.site AND a.part_no = J.part_no
inner JOIN shoporder AS t ON t.orderno = a.orderno AND a.site = t.site
left join qc_ipqc_record as r on a.site = r.site and a.seqno = r.seq_no
WHERE
a.site = #{query.site}

Loading…
Cancel
Save