物料辅助属性项分配时同步子页签
This commit is contained in:
parent
914f324b2e
commit
e31edd11d7
|
@ -66,16 +66,26 @@ public class MaterialAsstFrame1ChangedListener implements IBusinessListener {
|
|||
this.dealMaterialStockAssts(event, true);
|
||||
this.dealMaterialPlanUpdateAssts(event, true);
|
||||
}
|
||||
// else if ("1002".equals(event.getEventType())) {
|
||||
// this.dealMaterialStockAssts1(event, false);
|
||||
// this.dealMaterialPlanUpdateAssts1(event, false);
|
||||
// }
|
||||
}else if("8b7d49ab-7a65-4885-bcf1-7df89b84df4b".equals(event.getSourceID())){
|
||||
//计划信息分配后
|
||||
if ("1009".equals(event.getEventType()) ) {
|
||||
this.dealMaterialStockAssts1(event, false);
|
||||
this.dealMaterialPlanUpdateAssts1(event, false);
|
||||
}
|
||||
}else if("13636fc1-0215-4102-a11e-af4be73a05ab".equals(event.getSourceID())){
|
||||
//库存信息分配后
|
||||
if ("1009".equals(event.getEventType()) ) {
|
||||
this.dealMaterialStockAssts1(event, false);
|
||||
}
|
||||
}else if("a3133495-8c94-47b4-83d4-0d32bd08ac82".equals(event.getSourceID())){
|
||||
//生产信息分配后
|
||||
if ("1009".equals(event.getEventType()) ) {
|
||||
this.dealMaterialProdUpdateAssts1(event, false);
|
||||
}
|
||||
}else if("d0ff92c6-1059-46b4-97fd-ed8b3d0a85d9".equals(event.getSourceID())){
|
||||
//成本信息分配后
|
||||
if ("1009".equals(event.getEventType()) ) {
|
||||
this.dealMaterialCostAssts1(event, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,6 +101,9 @@ public class MaterialAsstFrame1ChangedListener implements IBusinessListener {
|
|||
if (!isBatchUp) {
|
||||
BDPKLockUtil.lockString(new String[]{pk_material});
|
||||
}
|
||||
if(pk_marasstframe == null){
|
||||
continue;
|
||||
}
|
||||
//库存
|
||||
this.updateMaterialStockUpdateAssts(pk_marasstframe, pk_material);
|
||||
//成本
|
||||
|
@ -110,11 +123,48 @@ public class MaterialAsstFrame1ChangedListener implements IBusinessListener {
|
|||
if (!isBatchUp) {
|
||||
BDPKLockUtil.lockString(new String[]{pk_material});
|
||||
}
|
||||
if(pk_marasstframe == null){
|
||||
return;
|
||||
}
|
||||
|
||||
this.updateMaterialStockUpdateAssts(pk_marasstframe, pk_material);
|
||||
}
|
||||
|
||||
}
|
||||
private void dealMaterialProdUpdateAssts1(BDCommonEvent event, boolean isBatchUp) throws BusinessException {
|
||||
for(int i = 0; i < event.getNewObjs().length; ++i) {
|
||||
MaterialProdVO newVO = (MaterialProdVO)event.getNewObjs()[i];
|
||||
String pk_material = newVO.getPk_material();
|
||||
String pk_marasstframe = this.getmarasstframe(pk_material).get(0);
|
||||
if (!isBatchUp) {
|
||||
BDPKLockUtil.lockString(new String[]{pk_material});
|
||||
}
|
||||
if(pk_marasstframe == null){
|
||||
return;
|
||||
}
|
||||
this.updateMaterialProdAssts(pk_marasstframe, pk_material);
|
||||
}
|
||||
|
||||
}
|
||||
private void dealMaterialCostAssts1(BDCommonEvent event, boolean isBatchUp) throws BusinessException {
|
||||
for(int i = 0; i < event.getNewObjs().length; ++i) {
|
||||
MaterialCostVO newVO = (MaterialCostVO)event.getNewObjs()[i];
|
||||
String pk_material = newVO.getPk_material();
|
||||
String pk_marasstframe = this.getmarasstframe(pk_material).get(0);
|
||||
if (!isBatchUp) {
|
||||
BDPKLockUtil.lockString(new String[]{pk_material});
|
||||
}
|
||||
if(pk_marasstframe == null){
|
||||
return;
|
||||
}
|
||||
//生产信息
|
||||
this.updateMaterialCostUpdateAssts(pk_marasstframe, pk_material);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void updateMaterialStockUpdateAssts(String pk_marasstframe, String materialVID) throws BusinessException {
|
||||
|
@ -271,7 +321,9 @@ public class MaterialAsstFrame1ChangedListener implements IBusinessListener {
|
|||
if (!isBatchUp) {
|
||||
BDPKLockUtil.lockString(new String[]{pk_material});
|
||||
}
|
||||
|
||||
if(pk_marasstframe == null){
|
||||
continue;
|
||||
}
|
||||
this.updateMaterialPlanAssts(pk_marasstframe, pk_material);
|
||||
}
|
||||
}
|
||||
|
@ -285,7 +337,9 @@ public class MaterialAsstFrame1ChangedListener implements IBusinessListener {
|
|||
if (!isBatchUp) {
|
||||
BDPKLockUtil.lockString(new String[]{pk_material});
|
||||
}
|
||||
|
||||
if(pk_marasstframe == null){
|
||||
return;
|
||||
}
|
||||
this.updateMaterialPlanAssts(pk_marasstframe, pk_material);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue