分润补漏增加计数功能
This commit is contained in:
parent
5e136deb74
commit
f42c8472c8
@ -58,11 +58,8 @@ include
|
||||
var distributorId = getItemValue(0,0,'distributor_id');
|
||||
var productId = getItemValue(0,0,'product_id');
|
||||
var message = AsControl.RunJavaMethodTrans("com.tenwa.reckon.executor.CreateTransactionExecutor","getSplitByProductId","productId="+productId+",distributorId="+distributorId);
|
||||
if(message=="success"){
|
||||
alert("操作成功");
|
||||
}else{
|
||||
alert(message);
|
||||
}
|
||||
alert(message);
|
||||
|
||||
}
|
||||
</script>
|
||||
<%@ include file="/Frame/resources/include/include_end.jspf"%>
|
||||
|
||||
@ -397,6 +397,7 @@ public class CreateTransactionExecutor implements Transaction {
|
||||
|
||||
List<BizObject> boLCIs = bmLCI.createQuery("product_id=:productId and distributor_id=:distributorId").setParameter("productId",productId).setParameter("distributorId",distributorId).getResultList(false);
|
||||
if(boLCIs.size()>0){
|
||||
int i=0;
|
||||
for(BizObject boLCI : boLCIs){
|
||||
String contractId = boLCI.getAttribute("ID").toString();
|
||||
BizObject boLRP = bmLRP.createQuery("contract_id=:contractId and corpus_sp is null").setParameter("contractId",contractId).getSingleResult(false);
|
||||
@ -404,13 +405,17 @@ public class CreateTransactionExecutor implements Transaction {
|
||||
setPlannumber(boLRP.getAttribute("PAYMENT_NUMBER").toString());
|
||||
insertRentPlan_SP(splitRatio,Sqlca,splitType);
|
||||
}else{
|
||||
return "当前产品和经销商下的起租合同均已经有分润";
|
||||
i++;
|
||||
}
|
||||
}
|
||||
if(i==0){
|
||||
return "当前产品和经销商下的起租合同均已经有分润";
|
||||
}else{
|
||||
return "共有"+i+"条合同执行成功";
|
||||
}
|
||||
}else{
|
||||
return "未找到对应的起租合同";
|
||||
}
|
||||
return "success";
|
||||
}catch (Exception e){
|
||||
return "操作失败";
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user