Merge remote-tracking branch 'origin/master'

liweidong
李涛 1 week ago
commit 06299182da
  1. 1
      blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/dashboard/pojo/entity/DsPartEntity.java
  2. 2
      blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/dashboard/pojo/entity/DsProcessProjectEntity.java
  3. 2
      blade-service/blade-desk/src/main/java/org/springblade/desk/dashboard/mapper/DsPartRelationMapper.java
  4. 2
      blade-service/blade-desk/src/main/java/org/springblade/desk/dashboard/mapper/PartRelationMapper.xml
  5. 4
      blade-service/blade-desk/src/main/java/org/springblade/desk/dashboard/service/IDsPartRelationService.java
  6. 2
      blade-service/blade-desk/src/main/java/org/springblade/desk/dashboard/service/impl/DsPartRelationServiceImpl.java
  7. 2
      blade-service/blade-desk/src/main/java/org/springblade/desk/dashboard/service/impl/DsTaskingServiceImpl.java
  8. 19
      blade-service/blade-desk/src/main/java/org/springblade/desk/order/service/impl/YieldOrderServiceImpl.java
  9. 10
      blade-service/blade-desk/src/main/java/org/springblade/desk/produce/service/impl/WorkOrderServiceImpl.java
  10. 2
      blade-service/blade-wms/src/main/java/org/springblade/wms/service/impl/StGlassCakeOutServiceImpl.java

@ -251,6 +251,7 @@ public class DsPartEntity extends BaseEntity {
/** /**
* 定额 * 定额
*/ */
@Deprecated
@Schema(description = "定额") @Schema(description = "定额")
private Double quota; private Double quota;

@ -8,7 +8,7 @@
* 1. This software is for development use only under a valid license * 1. This software is for development use only under a valid license
* from BladeX. * from BladeX.
* <p> * <p>
* 2. Redistribution of this software's source code to any third party * 2. Redistribution of this software's source code to any third y
* without a commercial license is strictly prohibited. * without a commercial license is strictly prohibited.
* <p> * <p>
* 3. Licensees may copyright their own code but cannot use segments * 3. Licensees may copyright their own code but cannot use segments

@ -71,5 +71,5 @@ public interface DsPartRelationMapper extends BaseMapper<DsPartRelationEntity> {
@Param("zPartVersion") String zPartVersion, @Param("zPartVersion") String zPartVersion,
@Param("zPartIdList")List<Long> zPartIdList); @Param("zPartIdList")List<Long> zPartIdList);
PartRelationEntity selectByPartCodeAndSubCode(@Param("partCode") String parentPartCode,@Param("subCode") String subCode); DsPartRelationEntity selectByPartCodeAndSubCode(@Param("partCode") String parentPartCode,@Param("subCode") String subCode);
} }

@ -80,7 +80,7 @@
</if> </if>
</select> </select>
<select id="selectByPartCodeAndSubCode" <select id="selectByPartCodeAndSubCode"
resultType="org.springblade.scheduling.pojo.entity.PartRelationEntity"> resultType="org.springblade.desk.dashboard.pojo.entity.DsPartRelationEntity">
select * from DS_PART_RELATION where is_deleted = 0 select * from DS_PART_RELATION where is_deleted = 0
and PART_CODE = #{partCode} and PART_CODE = #{partCode}
and CHILD_PART_CODE = #{subCode} and CHILD_PART_CODE = #{subCode}

@ -81,9 +81,9 @@ public interface IDsPartRelationService extends BaseService<DsPartRelationEntity
/** /**
* 根据部件和子件查询 * 根据部件和子件查询
* @param parentPartCode * @param partCode
* @param subCode * @param subCode
* @return * @return
*/ */
PartRelationEntity selectByPartCodeAndSubCode(String parentPartCode, String subCode); DsPartRelationEntity selectByPartCodeAndSubCode(String partCode, String subCode);
} }

@ -80,7 +80,7 @@ public class DsPartRelationServiceImpl extends BaseServiceImpl<DsPartRelationMap
} }
@Override @Override
public PartRelationEntity selectByPartCodeAndSubCode(String parentPartCode, String subCode) { public DsPartRelationEntity selectByPartCodeAndSubCode(String parentPartCode, String subCode) {
return partRelationMapper.selectByPartCodeAndSubCode(parentPartCode,subCode); return partRelationMapper.selectByPartCodeAndSubCode(parentPartCode,subCode);
} }

@ -1960,7 +1960,7 @@ public class DsTaskingServiceImpl extends BaseServiceImpl<DsTaskingMapper, DsTas
for (DsPartSub subPartInfo : subPartList) { for (DsPartSub subPartInfo : subPartList) {
String subCode = subPartInfo.getSubCode(); String subCode = subPartInfo.getSubCode();
log.info("开始处理子件:{}", subCode); log.info("开始处理子件:{}", subCode);
PartRelationEntity partRelation = partRelationService.selectByPartCodeAndSubCode(parentPartCode,subCode); DsPartRelationEntity partRelation = partRelationService.selectByPartCodeAndSubCode(parentPartCode, subCode);
if(null != partRelation){ if(null != partRelation){
continue; continue;
} }

@ -52,6 +52,7 @@ import org.springblade.desk.order.service.IYieldOrderService;
import org.springblade.desk.produce.mapper.WorkOrderMapper; import org.springblade.desk.produce.mapper.WorkOrderMapper;
import org.springblade.desk.produce.pojo.entity.WorkOrder; import org.springblade.desk.produce.pojo.entity.WorkOrder;
import org.springblade.erpdata.feign.IErpYieldOrderClient; import org.springblade.erpdata.feign.IErpYieldOrderClient;
import org.springblade.scheduling.pojo.entity.PartRelationEntity;
import org.springblade.scheduling.pojo.entity.QualityGradeEntity; import org.springblade.scheduling.pojo.entity.QualityGradeEntity;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
@ -562,7 +563,9 @@ public class YieldOrderServiceImpl extends BaseServiceImpl<YieldOrderMapper, Yie
List<DsPartEntity> subPartList = dsPartService.getPartSubList(yieldOrder.getPartCode(), yieldOrder.getPartVersion()); List<DsPartEntity> subPartList = dsPartService.getPartSubList(yieldOrder.getPartCode(), yieldOrder.getPartVersion());
if (CollectionUtils.isNotEmpty(subPartList)) { if (CollectionUtils.isNotEmpty(subPartList)) {
for (DsPartEntity subPart : subPartList) { for (DsPartEntity subPart : subPartList) {
if (DsPartConstant.SIN_TER_TYPE_SMM == subPart.getSinTerType() && subPart.getQuota() != 0) { DsPartRelationEntity partRelation = partRelationService.selectByPartCodeAndSubCode(yieldOrder.getPartCode(), subPart.getPartCode());
if(null != partRelation){
if (DsPartConstant.SIN_TER_TYPE_SMM == subPart.getSinTerType() && partRelation.getQuota() != 0) {
MoldDemand moldDemand = moldDemandMapper.selectOne(Wrappers.<MoldDemand>lambdaQuery().eq(MoldDemand::getToolCode, subPart.getPartCode()).eq(MoldDemand::getMafStatus, MoldDemandEnum.MAF_STATUS_CREATE.getCode())); MoldDemand moldDemand = moldDemandMapper.selectOne(Wrappers.<MoldDemand>lambdaQuery().eq(MoldDemand::getToolCode, subPart.getPartCode()).eq(MoldDemand::getMafStatus, MoldDemandEnum.MAF_STATUS_CREATE.getCode()));
if (moldDemand == null) { if (moldDemand == null) {
moldDemand = new MoldDemand(); moldDemand = new MoldDemand();
@ -571,7 +574,7 @@ public class YieldOrderServiceImpl extends BaseServiceImpl<YieldOrderMapper, Yie
moldDemand.setPartName(yieldOrder.getPartName()); moldDemand.setPartName(yieldOrder.getPartName());
moldDemand.setToolCode(subPart.getPartCode()); moldDemand.setToolCode(subPart.getPartCode());
moldDemand.setToolName(subPart.getPartName()); moldDemand.setToolName(subPart.getPartName());
moldDemand.setDemandNum(subPart.getQuota() * yieldOrder.getYpQty()); moldDemand.setDemandNum(partRelation.getQuota() * yieldOrder.getYpQty());
moldDemand.setLinkOrderIds(yieldOrder.getId().toString()); moldDemand.setLinkOrderIds(yieldOrder.getId().toString());
// moldDemand.setStatus(MoldDemandEnum.STATUS_WAITING.getCode()); // moldDemand.setStatus(MoldDemandEnum.STATUS_WAITING.getCode());
moldDemand.setMafStatus(MoldDemandEnum.MAF_STATUS_CREATE.getCode()); moldDemand.setMafStatus(MoldDemandEnum.MAF_STATUS_CREATE.getCode());
@ -582,7 +585,7 @@ public class YieldOrderServiceImpl extends BaseServiceImpl<YieldOrderMapper, Yie
moldDemand.setIsDeleted(0); moldDemand.setIsDeleted(0);
moldDemandMapper.insert(moldDemand); moldDemandMapper.insert(moldDemand);
} else { } else {
moldDemand.setDemandNum(moldDemand.getDemandNum() + subPart.getQuota() * yieldOrder.getYpQty()); moldDemand.setDemandNum(moldDemand.getDemandNum() + partRelation.getQuota() * yieldOrder.getYpQty());
moldDemand.setLinkOrderIds(moldDemand.getLinkOrderIds().concat(",").concat(yieldOrder.getId().toString())); moldDemand.setLinkOrderIds(moldDemand.getLinkOrderIds().concat(",").concat(yieldOrder.getId().toString()));
moldDemandMapper.updateById(moldDemand); moldDemandMapper.updateById(moldDemand);
} }
@ -591,6 +594,7 @@ public class YieldOrderServiceImpl extends BaseServiceImpl<YieldOrderMapper, Yie
} }
} }
}
} }
} else if (YieldOrderEnum.YIELD_TYPE_3.getCode() == yieldOrder.getYieldType()) { } else if (YieldOrderEnum.YIELD_TYPE_3.getCode() == yieldOrder.getYieldType()) {
@ -629,6 +633,8 @@ public class YieldOrderServiceImpl extends BaseServiceImpl<YieldOrderMapper, Yie
if (CollectionUtils.isNotEmpty(subPartList)) { if (CollectionUtils.isNotEmpty(subPartList)) {
for (DsPartEntity subPart : subPartList) { for (DsPartEntity subPart : subPartList) {
MoldDemand moldDemand = moldDemandMapper.selectOne(Wrappers.<MoldDemand>lambdaQuery().eq(MoldDemand::getToolCode, subPart.getPartCode()).eq(MoldDemand::getMafStatus, MoldDemandEnum.MAF_STATUS_CREATE.getCode())); MoldDemand moldDemand = moldDemandMapper.selectOne(Wrappers.<MoldDemand>lambdaQuery().eq(MoldDemand::getToolCode, subPart.getPartCode()).eq(MoldDemand::getMafStatus, MoldDemandEnum.MAF_STATUS_CREATE.getCode()));
DsPartRelationEntity partRelation = partRelationService.selectByPartCodeAndSubCode(yieldOrder.getPartCode(), subPart.getPartCode());
if (moldDemand == null) { if (moldDemand == null) {
moldDemand = new MoldDemand(); moldDemand = new MoldDemand();
moldDemand.setMoCode(null); moldDemand.setMoCode(null);
@ -636,7 +642,7 @@ public class YieldOrderServiceImpl extends BaseServiceImpl<YieldOrderMapper, Yie
moldDemand.setPartName(yieldOrder.getPartName()); moldDemand.setPartName(yieldOrder.getPartName());
moldDemand.setToolCode(subPart.getPartCode()); moldDemand.setToolCode(subPart.getPartCode());
moldDemand.setToolName(subPart.getPartName()); moldDemand.setToolName(subPart.getPartName());
moldDemand.setDemandNum(subPart.getQuota() * yieldOrder.getYpQty()); moldDemand.setDemandNum(partRelation.getQuota() * yieldOrder.getYpQty());
moldDemand.setLinkOrderIds(yieldOrder.getId().toString()); moldDemand.setLinkOrderIds(yieldOrder.getId().toString());
moldDemand.setMafStatus(MoldDemandEnum.MAF_STATUS_CREATE.getCode()); moldDemand.setMafStatus(MoldDemandEnum.MAF_STATUS_CREATE.getCode());
moldDemand.setMafType(MoldDemandEnum.MAF_TYPE_RB.getCode()); moldDemand.setMafType(MoldDemandEnum.MAF_TYPE_RB.getCode());
@ -646,7 +652,7 @@ public class YieldOrderServiceImpl extends BaseServiceImpl<YieldOrderMapper, Yie
moldDemand.setIsDeleted(0); moldDemand.setIsDeleted(0);
moldDemandMapper.insert(moldDemand); moldDemandMapper.insert(moldDemand);
} else { } else {
moldDemand.setDemandNum(moldDemand.getDemandNum() + subPart.getQuota() * yieldOrder.getYpQty()); moldDemand.setDemandNum(moldDemand.getDemandNum() + partRelation.getQuota() * yieldOrder.getYpQty());
moldDemand.setLinkOrderIds(moldDemand.getLinkOrderIds().concat(",").concat(yieldOrder.getId().toString())); moldDemand.setLinkOrderIds(moldDemand.getLinkOrderIds().concat(",").concat(yieldOrder.getId().toString()));
moldDemandMapper.updateById(moldDemand); moldDemandMapper.updateById(moldDemand);
} }
@ -1335,6 +1341,7 @@ public class YieldOrderServiceImpl extends BaseServiceImpl<YieldOrderMapper, Yie
List<DsCraftEntity> dsCraftList; List<DsCraftEntity> dsCraftList;
List<Long> idList = new ArrayList<>(); List<Long> idList = new ArrayList<>();
for (DsPartEntity dsPartSub : subList) { for (DsPartEntity dsPartSub : subList) {
DsPartRelationEntity dsPartRelation = partRelationService.selectByPartCodeAndSubCode(yieldOrder.getPartCode(), dsPartSub.getPartCode());
//如果子件号为空或者是无,则跳过 //如果子件号为空或者是无,则跳过
if (StringUtils.isBlank(dsPartSub.getPartCode()) || dsPartSub.getPartCode().equals("无")) { if (StringUtils.isBlank(dsPartSub.getPartCode()) || dsPartSub.getPartCode().equals("无")) {
continue; continue;
@ -1400,7 +1407,7 @@ public class YieldOrderServiceImpl extends BaseServiceImpl<YieldOrderMapper, Yie
subYield.setCardNo(nextCardNo()); subYield.setCardNo(nextCardNo());
subYield.setBatchNo(nextBatchNo()); subYield.setBatchNo(nextBatchNo());
subYield.setSiteWork(Boolean.TRUE); subYield.setSiteWork(Boolean.TRUE);
subYield.setYpQty(yieldOrder.getYpQty() * dsPartSub.getQuota()); subYield.setYpQty(yieldOrder.getYpQty() * dsPartRelation.getQuota());
subYield.setPrimaryCraft(dsPart.getCraftWay()); subYield.setPrimaryCraft(dsPart.getCraftWay());
subYield.setRoamNo(roamNo); subYield.setRoamNo(roamNo);
subYield.setStatus(YieldOrderEnum.STATUS_NORMAL.getCode()); subYield.setStatus(YieldOrderEnum.STATUS_NORMAL.getCode());

@ -726,11 +726,11 @@ public class WorkOrderServiceImpl extends BaseServiceImpl<WorkOrderMapper, WorkO
sub.put("partType", (DictCache.getValue("processTemplateType", dsPartSub.getSinTerType())));//零件类型 sub.put("partType", (DictCache.getValue("processTemplateType", dsPartSub.getSinTerType())));//零件类型
sub.put("partName", (dsPartSub.getMaterial() != null) ? dsPartSub.getMaterial() : "/");//材料 sub.put("partName", (dsPartSub.getMaterial() != null) ? dsPartSub.getMaterial() : "/");//材料
sub.put("plate", (dsPartSub.getPlate() != null) ? dsPartSub.getPlate() : "/");//镀种 sub.put("plate", (dsPartSub.getPlate() != null) ? dsPartSub.getPlate() : "/");//镀种
if (dsPartSub.getArea() != null && dsPartSub.getQuota() != null) { // if (dsPartSub.getArea() != null && dsPartSub.getQuota() != null) {
sub.put("poArea", String.valueOf(dsPartSub.getArea() * dsPartSub.getQuota()));//面积 // sub.put("poArea", String.valueOf(dsPartSub.getArea() * dsPartSub.getQuota()));//面积
} else { // } else {
sub.put("poArea", "/"); // sub.put("poArea", "/");
} // }
if (prWorkOrderList != null && !prWorkOrderList.isEmpty()) { if (prWorkOrderList != null && !prWorkOrderList.isEmpty()) {
for (WorkOrder prWorkOrder : prWorkOrderList) { for (WorkOrder prWorkOrder : prWorkOrderList) {
if (yieldOrder.getPartCode().equals(dsPartSub.getPartCode())) { if (yieldOrder.getPartCode().equals(dsPartSub.getPartCode())) {

@ -163,7 +163,7 @@ public class StGlassCakeOutServiceImpl extends BaseServiceImpl<StGlassCakeOutMap
String materialNo = glassCake.getMaterial(); // 材料号 String materialNo = glassCake.getMaterial(); // 材料号
BigDecimal thickness = glassCake.getFormingThickness(); // 成型厚度 BigDecimal thickness = glassCake.getFormingThickness(); // 成型厚度
String goodsCode = glassCake.getPartCode(); String goodsCode = glassCake.getPartCode();
Double quota = glassCake.getQuota(); // Double quota = glassCake.getQuota();
// 空值校验:核心属性为空则无法匹配库存,直接跳过 // 空值校验:核心属性为空则无法匹配库存,直接跳过
if (goodsCode == null) { if (goodsCode == null) {

Loading…
Cancel
Save