收票登记增加客户映射按钮逻辑
This commit is contained in:
		
							parent
							
								
									cd8d847b80
								
							
						
					
					
						commit
						c1e3493939
					
				|  | @ -33,6 +33,8 @@ public class RecPayerConvertPlugin extends AbstractConvertPlugIn implements Plug | |||
|         e.addSrcField("company"); | ||||
|         //交票人类型 | ||||
|         e.addSrcField("payeetype"); | ||||
|         //不遵循客户映射-默认关闭————即需要执行 | ||||
|         e.addSrcField("shjh_khys"); | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|  | @ -48,7 +50,8 @@ public class RecPayerConvertPlugin extends AbstractConvertPlugIn implements Plug | |||
|                 // 获取单据数据包 | ||||
|                 DynamicObject bill = billEntity.getDataEntity(); | ||||
|                 String payeetype = (String) this.getSourceData(billEntity, fldProperties, "payeetype"); | ||||
|                 if ("cdm_receivablebill".equals(bill.getString("sourcebilltype"))&&"bd_customer".equals(payeetype)){ | ||||
|                 Boolean shjh_khys = (Boolean) this.getSourceData(billEntity, fldProperties, "shjh_khys"); | ||||
|                 if ("cdm_receivablebill".equals(bill.getString("sourcebilltype"))&&"bd_customer".equals(payeetype)&&!shjh_khys){ | ||||
|                     this.carryCustomerRule(bill,billEntity,fldProperties); | ||||
|                 } | ||||
| 
 | ||||
|  | @ -74,20 +77,20 @@ public class RecPayerConvertPlugin extends AbstractConvertPlugIn implements Plug | |||
|             return; | ||||
|         } | ||||
|         DynamicObject company = BusinessDataServiceHelper.loadSingle(companyId, "bos_org"); | ||||
|         QFilter qFilter = new QFilter("shjh_dfhm", QCP.equals, accountName); | ||||
|         //新增收款入账中心-资金组织&&映射表组织过滤 | ||||
|         qFilter.and(new QFilter("shjh_org.id", QCP.equals, companyId)); | ||||
|         qFilter.and(new QFilter("enable", QCP.equals, "1")); | ||||
|         //1.对方户名与客户名称映射表 shjh_dfhmcust | ||||
|         DynamicObject shjhDfhmcust = BusinessDataServiceHelper.loadSingle("shjh_dfhmcust", qFilter.toArray()); | ||||
|         if (null != shjhDfhmcust) { | ||||
|             DynamicObject shjhCustomer = shjhDfhmcust.getDynamicObject("shjh_customer"); | ||||
|             if (null != shjhCustomer) { | ||||
|                 bill.set("payer", shjhCustomer.getPkValue()); //付款人id | ||||
|                 bill.set("payernumber", shjhCustomer.getString("number")); //付款人编码 | ||||
|                 bill.set("payername", shjhCustomer.getString("name")); //付款人名称 | ||||
|             } | ||||
|         } else { | ||||
| //        QFilter qFilter = new QFilter("shjh_dfhm", QCP.equals, accountName); | ||||
| //        //新增收款入账中心-资金组织&&映射表组织过滤 | ||||
| //        qFilter.and(new QFilter("shjh_org.id", QCP.equals, companyId)); | ||||
| //        qFilter.and(new QFilter("enable", QCP.equals, "1")); | ||||
| //        //1.对方户名与客户名称映射表 shjh_dfhmcust | ||||
| //        DynamicObject shjhDfhmcust = BusinessDataServiceHelper.loadSingle("shjh_dfhmcust", qFilter.toArray()); | ||||
| //        if (null != shjhDfhmcust) { | ||||
| //            DynamicObject shjhCustomer = shjhDfhmcust.getDynamicObject("shjh_customer"); | ||||
| //            if (null != shjhCustomer) { | ||||
| //                bill.set("payer", shjhCustomer.getPkValue()); //付款人id | ||||
| //                bill.set("payernumber", shjhCustomer.getString("number")); //付款人编码 | ||||
| //                bill.set("payername", shjhCustomer.getString("name")); //付款人名称 | ||||
| //            } | ||||
| //        } else { | ||||
|             //2.规则生单未配置客户——>取收款入账中心客户 | ||||
|             QFilter customerFilter = new QFilter("name", QCP.equals, accountName); | ||||
|             customerFilter.and(new QFilter("group.name", QCP.not_equals, "员工")); | ||||
|  | @ -144,7 +147,7 @@ public class RecPayerConvertPlugin extends AbstractConvertPlugIn implements Plug | |||
|                 } | ||||
|             } | ||||
| 
 | ||||
|         } | ||||
|   //      } | ||||
|         bill.set("shjh_xdgzkh", true);//设置收款单标记位 从规则携带客户等信息 为true | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue