收款单付款人类型切换报错bug
This commit is contained in:
		
							parent
							
								
									bf5ecf5324
								
							
						
					
					
						commit
						64d7eb4feb
					
				|  | @ -161,9 +161,17 @@ public class RecBillFromPlugin extends AbstractFormPlugin implements Plugin { | ||||||
|             String type = (String) this.getModel().getValue(RecFieldsInfo.PAYER_TYPE); |             String type = (String) this.getModel().getValue(RecFieldsInfo.PAYER_TYPE); | ||||||
|             if ("bd_customer".equals(type) || "bd_supplier".equals(type)) { |             if ("bd_customer".equals(type) || "bd_supplier".equals(type)) { | ||||||
|                 //付款人是客商 |                 //付款人是客商 | ||||||
|                 Object value = this.getModel().getValue("payer"); |                 Object pkValue = this.getModel().getValue("payer"); | ||||||
|                 if (null != value) { |                 Long longValue; | ||||||
|                     DynamicObject dynamicObject = BusinessDataServiceHelper.loadSingle(value, type); |                 if (pkValue instanceof Integer) { | ||||||
|  |                     longValue = ((Integer) pkValue).longValue(); | ||||||
|  |                 } else if (pkValue instanceof Long) { | ||||||
|  |                     longValue = (Long) pkValue; | ||||||
|  |                 } else { | ||||||
|  |                     longValue = null; // 或者其他默认值 | ||||||
|  |                 } | ||||||
|  |                 if (longValue!=null && longValue!=0L) { | ||||||
|  |                     DynamicObject dynamicObject = BusinessDataServiceHelper.loadSingle(pkValue, type); | ||||||
|                     if (null != dynamicObject) { |                     if (null != dynamicObject) { | ||||||
|                         String name = dynamicObject.getString("group.name"); |                         String name = dynamicObject.getString("group.name"); | ||||||
|                         if (null != name && name.contains("一次性")) { |                         if (null != name && name.contains("一次性")) { | ||||||
|  | @ -186,9 +194,9 @@ public class RecBillFromPlugin extends AbstractFormPlugin implements Plugin { | ||||||
|                         this.getModel().setValue("shjh_needpushbill", false, i);//不需要下推清账单 |                         this.getModel().setValue("shjh_needpushbill", false, i);//不需要下推清账单 | ||||||
|                         this.getModel().setValue("shjh_closingstatus", "A", i);//无需金蝶清账 |                         this.getModel().setValue("shjh_closingstatus", "A", i);//无需金蝶清账 | ||||||
|                     } |                     } | ||||||
|                     if (null != value && "bd_customer".equals(type)) { |                     if ("bd_customer".equals(type)) { | ||||||
|                         DynamicObject currentorg = (DynamicObject) this.getModel().getValue("org");//单据所属当前公司 |                         DynamicObject currentorg = (DynamicObject) this.getModel().getValue("org");//单据所属当前公司 | ||||||
|                         QFilter mapnumber = new QFilter("shjh_customer.id", QCP.equals, value); |                         QFilter mapnumber = new QFilter("shjh_customer.id", QCP.equals, pkValue); | ||||||
|                         mapnumber.and("enable", QCP.equals, "1");//是否可用 |                         mapnumber.and("enable", QCP.equals, "1");//是否可用 | ||||||
|                         mapnumber.and("shjh_org.id", QCP.equals, currentorg.getLong("id"));//公司 |                         mapnumber.and("shjh_org.id", QCP.equals, currentorg.getLong("id"));//公司 | ||||||
|                         DynamicObject mappingObj = BusinessDataServiceHelper.loadSingle("shjh_jgqzcust", mapnumber.toArray()); |                         DynamicObject mappingObj = BusinessDataServiceHelper.loadSingle("shjh_jgqzcust", mapnumber.toArray()); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue