eBOM-反查
This commit is contained in:
parent
7ed3b87555
commit
4e4cd647ba
|
|
@ -632,6 +632,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
*
|
*
|
||||||
* @param paramDto
|
* @param paramDto
|
||||||
*/
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void generateVirtualPackage(VirtualPackageParamDto paramDto) {
|
public void generateVirtualPackage(VirtualPackageParamDto paramDto) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ public class ReverseReportService {
|
||||||
List<BomNewEbomParentVO> parentEntChild = bomDetail.stream().filter(u -> u.getParentRowId().equals(parentEnt.getBomRowId())).collect(Collectors.toList());
|
List<BomNewEbomParentVO> parentEntChild = bomDetail.stream().filter(u -> u.getParentRowId().equals(parentEnt.getBomRowId())).collect(Collectors.toList());
|
||||||
for (BomNewEbomParentVO child :parentEntChild) {
|
for (BomNewEbomParentVO child :parentEntChild) {
|
||||||
String key= joiner.join(eBomIndexPrefix, child.getMaterialNo(),child.getCurrentVersion());
|
String key= joiner.join(eBomIndexPrefix, child.getMaterialNo(),child.getCurrentVersion());
|
||||||
String value=joiner.join(eBomIndexPrefix , parentEnt.getMaterialNo(),parentEnt.getCurrentVersion());
|
String value=joiner.join("_", parentEnt.getMaterialNo(),parentEnt.getCurrentVersion());
|
||||||
redisService.addSet(key,value);
|
redisService.addSet(key,value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -116,7 +116,7 @@ public class ReverseReportService {
|
||||||
List<BomNewPbomParentVO> parentEntChild = bomDetail.stream().filter(u -> u.getParentRowId().equals(parentEnt.getBomRowId())).collect(Collectors.toList());
|
List<BomNewPbomParentVO> parentEntChild = bomDetail.stream().filter(u -> u.getParentRowId().equals(parentEnt.getBomRowId())).collect(Collectors.toList());
|
||||||
for (BomNewPbomParentVO child :parentEntChild) {
|
for (BomNewPbomParentVO child :parentEntChild) {
|
||||||
String key= joiner.join(pBomIndexPrefix, child.getMaterialNo(),child.getCurrentVersion());
|
String key= joiner.join(pBomIndexPrefix, child.getMaterialNo(),child.getCurrentVersion());
|
||||||
String value=joiner.join(pBomIndexPrefix , parentEnt.getMaterialNo(),parentEnt.getCurrentVersion());
|
String value=joiner.join("_" , parentEnt.getMaterialNo(),parentEnt.getCurrentVersion());
|
||||||
redisService.addSet(key,value);
|
redisService.addSet(key,value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,9 @@ public abstract class VirtualPackageBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<AddVirtrualMaterialDTO> addM = params.stream().filter(u -> StrUtil.isBlank(u.getMaterialNo())).collect(Collectors.toList());
|
List<AddVirtrualMaterialDTO> addM = params.stream().filter(u -> StrUtil.isBlank(u.getMaterialNo())).collect(Collectors.toList());
|
||||||
vMNos= SpringUtil.getBean(MaterialService.class).batchAddMaterial(addM);
|
if(CollUtil.isNotEmpty(addM)) {
|
||||||
|
vMNos = SpringUtil.getBean(MaterialService.class).batchAddMaterial(addM);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -106,6 +108,7 @@ public abstract class VirtualPackageBase {
|
||||||
ent.setMaterialName(oldMaterialList.get(0).getMaterialName());
|
ent.setMaterialName(oldMaterialList.get(0).getMaterialName());
|
||||||
ent.setMaterialDesc(oldMaterialList.get(0).getMaterialDesc());
|
ent.setMaterialDesc(oldMaterialList.get(0).getMaterialDesc());
|
||||||
ent.setMaterialCategoryCode(oldMaterialList.get(0).getMaterialCategoryCode());
|
ent.setMaterialCategoryCode(oldMaterialList.get(0).getMaterialCategoryCode());
|
||||||
|
vMNos.put(ent.getKey(),ent);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ent.setKey(key);
|
ent.setKey(key);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue