贴息占用和测算
This commit is contained in:
parent
2c63073382
commit
2c9267f003
@ -706,8 +706,10 @@ function changeSettleMethod2(){
|
||||
|
||||
function changeRateType(){
|
||||
var a={};
|
||||
a["fixed"]={"fixed":1,"add":1};
|
||||
a["base"]={"fixed":1,"add":1};
|
||||
//a["fixed"]={"fixed":1,"add":1};
|
||||
//a["base"]={"fixed":1,"add":1};
|
||||
a["fixed"]={"fixed":1,"calculation":1,"add":1};
|
||||
a["base"]={"fixed":1,"calculation":1,"add":1};
|
||||
a["proportion"]={"fixed":1,"calculation":1,"add":1};
|
||||
a["add"]={"fixed":1,"calculation":1,"add":1};
|
||||
|
||||
|
||||
@ -156,11 +156,7 @@ public class FundFundPlanExecutor {
|
||||
Map<String,String> cleanLeaseMoney = new HashMap<String,String>();
|
||||
cleanLeaseMoney.put("CostType01", "pay_type_out");
|
||||
cleanLeaseMoney.put("CostType02", "PaymentTime1");
|
||||
if(!"business_product".equals(tcb.getProductType())) {
|
||||
map.put("CLEAN_LEASE_MONEY", cleanLeaseMoney);
|
||||
} else {
|
||||
map.put("EQUIP_AMT", cleanLeaseMoney);
|
||||
}
|
||||
map.put("CLEAN_LEASE_MONEY", cleanLeaseMoney);
|
||||
String custid="";
|
||||
if("quoted_price".equals(tcb.getCalType())){
|
||||
custid=tcb.getDocId();
|
||||
@ -192,7 +188,15 @@ public class FundFundPlanExecutor {
|
||||
}
|
||||
|
||||
//ȡֵ
|
||||
BigDecimal temp =new BigDecimal(con.getAttribute(key).getDouble());
|
||||
BigDecimal temp = null;
|
||||
|
||||
if("business_product".equals(tcb.getProductType())
|
||||
&& "CLEAN_LEASE_MONEY".equals(key)) {
|
||||
temp = new BigDecimal(con.getAttribute("EQUIP_AMT").getDouble());
|
||||
} else {
|
||||
temp = new BigDecimal(con.getAttribute(key).getDouble());
|
||||
}
|
||||
|
||||
Item item = null;
|
||||
for(Item it : items) {
|
||||
if(key.equals(it.getRelativeCode())) {
|
||||
|
||||
@ -23,6 +23,9 @@ import jbo.sys.USER_TASK_INFO;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import com.amarsoft.amarscript.Any;
|
||||
import com.amarsoft.amarscript.ELContext;
|
||||
import com.amarsoft.amarscript.Expression;
|
||||
import com.amarsoft.app.lc.util.DateAssistant;
|
||||
import com.amarsoft.are.ARE;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
@ -492,6 +495,36 @@ public class FlowAction {
|
||||
"select O.flowno,O.phaseno,O.objecttype,O.objectno,O.userid,O.orgid from O where serialNo=:serialNo ")
|
||||
.setParameter("serialNo", taskNo).getSingleResult(false);
|
||||
|
||||
String objectNo = ft.getAttribute("objectno").getString();
|
||||
|
||||
BizObject boFBO = JBOFactory.getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME, tx)
|
||||
.createQuery("flow_unid = '" + objectNo + "'").getSingleResult(false);
|
||||
|
||||
String fixedFlowParam = boFBO.getAttribute("FixedFlowParam").getString();
|
||||
|
||||
JSONObject jsonFixedFlowParam = JSONDecoder.decode(fixedFlowParam.replaceAll("@", ","));
|
||||
Map<String, String> scriptMap = FileOperatorUtil.getJsonObjectToMap(jsonFixedFlowParam);
|
||||
|
||||
scriptMap.put("ObjectNo", objectNo);
|
||||
|
||||
BizObjectManager bm1 = JBOFactory.getFactory().getManager(FLOW_MODEL.CLASS_NAME);
|
||||
BizObjectQuery bq1 = bm1
|
||||
.createQuery(
|
||||
"SELECT o.BACKSCRIPT FROM O where O.flowno=:flowno and O.phaseno='" + ft.getAttribute("phaseno").getString() + "'")
|
||||
.setParameter("flowno", ft.getAttribute("flowno").getString());
|
||||
BizObject stepConfig = bq1.getSingleResult(false);
|
||||
String strScript = stepConfig.getAttribute("BACKSCRIPT").getString();
|
||||
if (null != strScript && strScript.length() > 5) {
|
||||
ELContext context = new ELContext();
|
||||
context.setJBOTransaction(tx);
|
||||
for (String key : scriptMap.keySet()) {
|
||||
context.defineVarible("#" + key, scriptMap.get(key));
|
||||
}
|
||||
context.defineBean("flowBussinessObject", boFBO);
|
||||
|
||||
Any returnData = Expression.getExpressionValue(strScript, context);
|
||||
}
|
||||
|
||||
//´¦ÀíÈÎÎñ³Ø
|
||||
BizObjectManager utdbom = JBOFactory.getBizObjectManager(USER_TASK_DATA.CLASS_NAME, tx);
|
||||
BizObjectManager utibom = JBOFactory.getBizObjectManager(USER_TASK_INFO.CLASS_NAME, tx);
|
||||
|
||||
@ -125,6 +125,45 @@ public class FlowBussionAction extends CommonAction {
|
||||
Any returnData = Expression.getExpressionValue(strScript, context);
|
||||
}
|
||||
}
|
||||
|
||||
public void executeFlowBackScript(JBOTransaction tx,
|
||||
BizObject flowBussinessObject) throws Exception {
|
||||
Item item = CodeManager.getItem("ApplyType", this.getApplyType());
|
||||
String flowno = item.getAttribute2();
|
||||
Map<String, String> scriptMap = new HashMap<String, String>();
|
||||
scriptMap.put("ObjectNo", flowBussinessObject.getAttribute("flow_unid")
|
||||
.getString());
|
||||
scriptMap.put("UserID", this.getAsUser().getUserID());
|
||||
scriptMap.put("UserName", this.getAsUser().getUserName());
|
||||
scriptMap.put("OrgID", this.getAsUser().getOrgID());
|
||||
scriptMap.put("OrgName", this.getAsUser().getOrgName());
|
||||
scriptMap.put("FlowUnid", flowBussinessObject.getAttribute("flow_unid").getString());
|
||||
scriptMap.put("FlowNo", flowno);
|
||||
scriptMap.put("FlowName", this.getFlowName());
|
||||
scriptMap.put("FlowKey", this.getFlowKey());
|
||||
scriptMap.put("custname",this.getCustname());
|
||||
Transaction Sqlca = null;
|
||||
BizObjectManager bm1 = null;
|
||||
BizObjectQuery bq1 = null;
|
||||
bm1 = JBOFactory.getFactory().getManager(FLOW_MODEL.CLASS_NAME);
|
||||
bq1 = bm1
|
||||
.createQuery(
|
||||
"SELECT o.PRESCRIPT FROM O where O.flowno=:flowno")
|
||||
.setParameter("flowno", flowno);
|
||||
BizObject stepConfig = bq1.getSingleResult(true);
|
||||
String strScript = stepConfig.getAttribute("PRESCRIPT").getString();
|
||||
if (null != strScript && strScript.length() > 5) {
|
||||
ELContext context = new ELContext();
|
||||
context.setJBOTransaction(tx);
|
||||
for (String key : scriptMap.keySet()) {
|
||||
context.defineVarible("#" + key, scriptMap.get(key));
|
||||
}
|
||||
context.defineBean("flowBussinessObject", flowBussinessObject);
|
||||
|
||||
Any returnData = Expression.getExpressionValue(strScript, context);
|
||||
}
|
||||
}
|
||||
|
||||
public void initFlowInfo() throws Exception{
|
||||
BizObjectManager code = JBOFactory.getBizObjectManager(CODE_LIBRARY.CLASS_NAME);
|
||||
BizObjectManager cataLog = JBOFactory.getBizObjectManager(FLOW_CATALOG.CLASS_NAME);
|
||||
|
||||
@ -17,7 +17,7 @@ import com.tenwa.flow.baseBussion.BaseBussiness;
|
||||
public class DeleteDiscountOccupy extends BaseBussiness {
|
||||
@Override
|
||||
public Object run(Transaction Sqlca) throws Exception {
|
||||
this.initBussinessParam(Sqlca);
|
||||
//this.initBussinessParam(Sqlca);
|
||||
String projectId=this.getAttribute("ProjectId").toString();
|
||||
BizObjectManager ldoManage = JBOFactory.getBizObjectManager(LB_DISCOUNT_OCCUPY.CLASS_NAME,Sqlca);
|
||||
BizObject ldo = ldoManage.createQuery("project_id=:projectid").setParameter("projectid", projectId).getSingleResult(true);
|
||||
|
||||
@ -27,6 +27,7 @@ public class InsertDiscountOccupy extends BaseBussiness {
|
||||
String curUserID=this.getAttribute("CurUserID").toString();
|
||||
String flowUnid=this.getAttribute("FlowUnid").toString();
|
||||
String productId=this.getAttribute("ProductId").toString();
|
||||
String projectId=this.getAttribute("ProjectId").toString();
|
||||
Map<String, String> discount = ProductParamUtil.getProductComponentAllParameters(productId, "PRD0315", "DISCOUNT");
|
||||
if(!discount.isEmpty() && !"".equals(discount.get("DISCOUNT_ALL")) && !"".equals(discount.get("CostType08"))) {
|
||||
synchronized (this) {
|
||||
@ -37,7 +38,7 @@ public class InsertDiscountOccupy extends BaseBussiness {
|
||||
if("0".equals(result)) {
|
||||
ASUser user = ASUser.getUser(curUserID, tran);
|
||||
tran.executeSQL(new SqlObject("insert into lb_discount_occupy(id, product_id, flowunid, project_id, discount, inputuserid, inputorgid, inputtime) "
|
||||
+ " values (replace(uuid(),'-',''), '" + productId + "', '" + flowUnid + "', '" + uuid.replaceAll("-", "") + "',"
|
||||
+ " values (replace(uuid(),'-',''), '" + productId + "', '" + flowUnid + "', '" + projectId + "',"
|
||||
+ " " + discountValue + ", '" + curUserID + "', '" + user.getOrgID() + "', replace(now(),'-','/'))"));
|
||||
} else {
|
||||
throw new BusinessException("²úÆ·¶î¶ÈÒÑÓÃÍê");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user