收款定时任务优化
This commit is contained in:
		
							parent
							
								
									75fd1b206a
								
							
						
					
					
						commit
						f24dac1263
					
				|  | @ -5,12 +5,9 @@ import com.alibaba.fastjson.JSONObject; | |||
| import kd.bos.dataentity.entity.DynamicObject; | ||||
| import kd.bos.entity.ExtendedDataEntity; | ||||
| import kd.bos.entity.validate.AbstractValidator; | ||||
| import kd.bos.form.plugin.AbstractFormPlugin; | ||||
| import kd.bos.logging.Log; | ||||
| import kd.bos.logging.LogFactory; | ||||
| import kd.bos.servicehelper.BusinessDataServiceHelper; | ||||
| import kd.sdk.plugin.Plugin; | ||||
| import shjh.jhzj7.fi.fi.plugin.form.RecBillChangeListExtendPlugin; | ||||
| import shjh.jhzj7.fi.fi.plugin.form.info.RecFieldsInfo; | ||||
| import shjh.jhzj7.fi.fi.utils.SapUtils; | ||||
| 
 | ||||
|  | @ -30,16 +27,16 @@ public class ClosingStatusValidator extends AbstractValidator { | |||
|                     DynamicObject bill = dataEntity.getDataEntity(); | ||||
|                     ////付款方为一次性客户/供应商时,需校验国家、城市必录。 | ||||
|                     String type = bill.getString(RecFieldsInfo.PAYER_TYPE); | ||||
|                     if ("bd_customer".equals(type)||"bd_supplier".equals(type)){ | ||||
|                     if ("bd_customer".equals(type) || "bd_supplier".equals(type)){ | ||||
|                         long id = bill.getLong("payer"); | ||||
|                         if (0L!=id){ | ||||
|                             DynamicObject dynamicObject = BusinessDataServiceHelper.loadSingle(id, type); | ||||
|                             if (null!=dynamicObject){ | ||||
|                             if (null != dynamicObject){ | ||||
|                                 String name = dynamicObject.getString("group.name"); | ||||
|                                 if (null!=name && name.contains("一次性客户")){ | ||||
|                                     String country = bill.getString("shjh_country"); | ||||
|                                     String city = bill.getString("shjh_city"); | ||||
|                                     if (country.isEmpty()||city.isEmpty()){ | ||||
|                                     if (country.isEmpty() || city.isEmpty()){ | ||||
|                                         this.addErrorMessage(dataEntity, "付款方为一次性客户/供应商时,国家、城市必录。"); | ||||
|                                     } | ||||
|                                 } | ||||
|  | @ -54,7 +51,7 @@ public class ClosingStatusValidator extends AbstractValidator { | |||
|                         String companyCode = bill.getString("org.number"); | ||||
|                         String sapFiscalYear = bill.getString("shjh_sapfiscalyear"); | ||||
|                         String sapLineNumber = bill.getString("shjh_sapline"); | ||||
|                         if (!sapLineNumber.isEmpty()&&!sapFiscalYear.isEmpty()){ | ||||
|                         if (!sapLineNumber.isEmpty() && !sapFiscalYear.isEmpty()){ | ||||
|                             String response = SapUtils.querySapClearAccountsState(billNumber, companyCode, voucherNum, sapFiscalYear, sapLineNumber); | ||||
|                             if (response != null) { | ||||
|                                 try { | ||||
|  |  | |||
|  | @ -619,7 +619,6 @@ public class SapUtils { | |||
| 
 | ||||
|     /** | ||||
|      * 调用SAP收款凭证清账状态查询接口 | ||||
|      * | ||||
|      * @param billNumber       单据编号 | ||||
|      * @param companyCode      公司编码 | ||||
|      * @param sapVoucherNumber SAP凭证号 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue