审核和反审核推送bip的小优化
This commit is contained in:
		
							parent
							
								
									5b43e9e912
								
							
						
					
					
						commit
						8af813c869
					
				| 
						 | 
				
			
			@ -100,6 +100,10 @@ public class YongyouBIPOperation extends AbstractOperationServicePlugIn implemen
 | 
			
		|||
                if(!DobeDWUtils.isEmpty(prinfo.getString("qeug_yyhc"))){
 | 
			
		||||
                    continue;
 | 
			
		||||
                }
 | 
			
		||||
                //如果bip单据编号为空,则说明审核通过后未推送bip,此时不用推送bip红冲数据
 | 
			
		||||
                if(DobeDWUtils.isEmpty(prinfo.getString("qeug_yynum"))){
 | 
			
		||||
                    continue;
 | 
			
		||||
                }
 | 
			
		||||
                //supplementflag 事后补单 可能不需要推送BIP,需要排除
 | 
			
		||||
                if("recon_payreqbill".equals(prinfo.getDataEntityType().getName()) && !prinfo.getBoolean("nocontractflag")){
 | 
			
		||||
                    //判断实体名称为合同付款申请单,此时无合同付款 nocontractflag 不需要推送
 | 
			
		||||
| 
						 | 
				
			
			@ -134,6 +138,9 @@ public class YongyouBIPOperation extends AbstractOperationServicePlugIn implemen
 | 
			
		|||
            boolean isBipSuccess = false;
 | 
			
		||||
            for (int i = 0; i < dos.length; i++) {
 | 
			
		||||
                prinfo = dos[i];
 | 
			
		||||
                if("audit".equals(eok)){
 | 
			
		||||
                    prinfo = BusinessDataServiceHelper.loadSingle(dos[i].getPkValue(),dos[i].getDataEntityType().getName());
 | 
			
		||||
                }
 | 
			
		||||
                //如果bip单据号为空则需要调用bip接口,否则不需要(操作之后系统会把对象的所有属性加载出来)
 | 
			
		||||
                if(!DobeDWUtils.isEmpty(prinfo.getString("qeug_yynum"))){
 | 
			
		||||
                    this.operationResult.setSuccess(false);
 | 
			
		||||
| 
						 | 
				
			
			@ -146,6 +153,7 @@ public class YongyouBIPOperation extends AbstractOperationServicePlugIn implemen
 | 
			
		|||
                    //判断实体名称为合同付款申请单,此时无合同付款 nocontractflag 不需要推送 是否事后补单 supplementflag
 | 
			
		||||
                    isBipSuccess = handleForBIP(eok,prinfo,false);
 | 
			
		||||
                }else if("recon_connotextbill".equals(prinfo.getDataEntityType().getName())){
 | 
			
		||||
                    //如果此时在费用登记单的列表界面点击审核按钮的话,二开的grdf字段会识别不到
 | 
			
		||||
                    //无文本合同 是否事后补单 supplementflag
 | 
			
		||||
                    isBipSuccess = handleForBIP(eok,prinfo,true);
 | 
			
		||||
                }
 | 
			
		||||
| 
						 | 
				
			
			@ -292,6 +300,11 @@ public class YongyouBIPOperation extends AbstractOperationServicePlugIn implemen
 | 
			
		|||
                items.put("local_tax_de",payrequestinfo.getBigDecimal("tax").toString());//税额
 | 
			
		||||
            }
 | 
			
		||||
            items.put("notax_de",payrequestinfo.getBigDecimal("notaxamt").toString());//贷方无税金额,除税金额
 | 
			
		||||
            if("unaudit".equals(eventName)){
 | 
			
		||||
                //如果此时是反审核,则需要将金额置为负数
 | 
			
		||||
                items.put("local_tax_de","-"+items.getString("local_tax_de"));
 | 
			
		||||
                items.put("notax_de","-"+items.getString("notax_de"));
 | 
			
		||||
            }
 | 
			
		||||
        }else{
 | 
			
		||||
            //付款申请单的处理方式
 | 
			
		||||
            BigDecimal invoicetax = payrequestinfo.getBigDecimal("invoicetax");//发票的税额
 | 
			
		||||
| 
						 | 
				
			
			@ -309,7 +322,7 @@ public class YongyouBIPOperation extends AbstractOperationServicePlugIn implemen
 | 
			
		|||
                items.put("notax_de",bcsqje.subtract(invoicetax).toString());//贷方无税金额,除税金额
 | 
			
		||||
                if("unaudit".equals(eventName)){
 | 
			
		||||
                    //如果此时是反审核,则需要将金额置为负数
 | 
			
		||||
                    items.put("taxrate","-"+items.getString("taxrate"));
 | 
			
		||||
                    items.put("local_tax_de","-"+items.getString("local_tax_de"));
 | 
			
		||||
                    items.put("notax_de","-"+items.getString("notax_de"));
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue