1.其他出库单调整

2.通用插件调整
This commit is contained in:
龚豆豆 2025-10-23 18:09:29 +08:00
parent 27ef92a548
commit 3b6454d5fb
2 changed files with 21 additions and 1 deletions

View File

@ -131,7 +131,7 @@ public class OtherOutApplyBillPlugin extends AbstractBillPlugIn implements Befor
DynamicObject tqq9_lot = (DynamicObject)model.getValue("tqq9_lot", rowIndex);//批号 DynamicObject tqq9_lot = (DynamicObject)model.getValue("tqq9_lot", rowIndex);//批号
if(material!=null){ if(material!=null){
DynamicObject masterid = material.getDynamicObject("masterid");//物料 DynamicObject masterid = material.getDynamicObject("masterid");//物料
if(masterid!=null){ if(masterid!=null&&tqq9_lot!=null){
String id = masterid.getString("id"); String id = masterid.getString("id");
String tqq9_phno = tqq9_lot.getString("number");//批号 String tqq9_phno = tqq9_lot.getString("number");//批号
String sql = "/*dialect*/ select sum(fbaseqty) useqty from t_im_inv_realbalance where fmaterialid ='"+id+"' and flotnum ='"+tqq9_phno+"'" ; String sql = "/*dialect*/ select sum(fbaseqty) useqty from t_im_inv_realbalance where fmaterialid ='"+id+"' and flotnum ='"+tqq9_phno+"'" ;

View File

@ -68,6 +68,26 @@ public class BaseDataPlugin extends AbstractFormPlugin implements Plugin {
} }
} }
} }
if (StringUtils.equals("tqq9_zczh", key)) {
StringBuilder stringBuilder=new StringBuilder();
ChangeData[] changeSet = e.getChangeSet();
ChangeData changeData = changeSet[0];
int rowIndex = changeData.getRowIndex();
DynamicObject newValue = (DynamicObject)changeData.getNewValue();
if(newValue!=null){
DynamicObject tqq9_registration = BusinessDataServiceHelper.loadSingle("tqq9_registration", new QFilter[]{new QFilter("id", QCP.equals, newValue.getLong("id"))});
DynamicObjectCollection tqq9_entry = tqq9_registration.getDynamicObjectCollection("tqq9_entry");
for (DynamicObject entry : tqq9_entry) {
String supno = entry.getString("tqq9_e_supno");
stringBuilder.append("#").append(supno);
}
if(StringUtils.isNotBlank(stringBuilder.toString())){
String substring = stringBuilder.substring(1);
this.getModel().setValue("tqq9_licenseno",substring,rowIndex);
}
}
}
this.getView().updateView(); this.getView().updateView();
} }
} }