parent
							
								
									27ef92a548
								
							
						
					
					
						commit
						3b6454d5fb
					
				|  | @ -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+"'" ; | ||||||
|  |  | ||||||
|  | @ -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(); | ||||||
|     } |     } | ||||||
| } | } | ||||||
		Loading…
	
		Reference in New Issue