1.添加处理业务申请传阅后的数据

2.处理经销商保证金额度的收取与退回
This commit is contained in:
jianghongdong 2018-07-23 20:00:21 +08:00
parent 7abf362443
commit 527b5d1068
3 changed files with 47 additions and 19 deletions

View File

@ -22,8 +22,6 @@
clean_lease_money="0";
}
double money = Double.parseDouble(clean_lease_money);
System.out.print("========================="+money);
CurPage.getCurComp().setAttribute("RightType", null);
String sTempletNo = "VI_BUSINESS_APPROVAL";//--Ä£°åºÅ--
@ -31,9 +29,6 @@
doTemp.setHtmlEvent("firstchoice","onChange","changeFirstChoice");
doTemp.setHtmlEvent("secondchoice","onChange","changeSecondChoice");
doTemp.setHtmlEvent("thirdchoice","onChange","changeThirdChoice");
if(null!=ishistory&&ishistory.equals("true")){
doTemp.setDataQueryClass("com.tenwa.flow.flowHistory.FlowDataInfoHistory");//如果是历史则新显示历史数据
}
ASObjectWindowCalc dwTemp = new ASObjectWindowCalc(CurPage, doTemp,request);
dwTemp.Style = "2";//freeform
dwTemp.setAttr("inputWidth", "163");
@ -62,19 +57,35 @@
dwTemp.getDataObject().setRequired("secondopinion", true);
dwTemp.setGroupHidden("0040,0050");
}else if("0050".equals(phaseNo)){//ÐÅÉó
dwTemp.getDataObject().setVisible("firstchoice", true);
dwTemp.getDataObject().setVisible("firstopinion", true);
dwTemp.getDataObject().setReadOnly("firstchoice", true);
dwTemp.getDataObject().setReadOnly("firstopinion", true);
dwTemp.getDataObject().setVisible("secondchoice", true);
dwTemp.getDataObject().setVisible("secondopinion", true);
dwTemp.getDataObject().setReadOnly("secondchoice", true);
dwTemp.getDataObject().setReadOnly("secondopinion", true);
dwTemp.getDataObject().setVisible("thirdchoice", true);
dwTemp.getDataObject().setVisible("thirdopinion", true);
dwTemp.getDataObject().setRequired("thirdchoice", true);
dwTemp.getDataObject().setRequired("thirdopinion", true);
//dwTemp.setGroupHidden("0040,0050");
if(!"true".equals(ishistory)){
dwTemp.getDataObject().setVisible("firstchoice", true);
dwTemp.getDataObject().setVisible("firstopinion", true);
dwTemp.getDataObject().setReadOnly("firstchoice", true);
dwTemp.getDataObject().setReadOnly("firstopinion", true);
dwTemp.getDataObject().setVisible("secondchoice", true);
dwTemp.getDataObject().setVisible("secondopinion", true);
dwTemp.getDataObject().setReadOnly("secondchoice", true);
dwTemp.getDataObject().setReadOnly("secondopinion", true);
dwTemp.getDataObject().setVisible("thirdchoice", true);
dwTemp.getDataObject().setVisible("thirdopinion", true);
dwTemp.getDataObject().setRequired("thirdchoice", true);
dwTemp.getDataObject().setRequired("thirdopinion", true);
}else{
dwTemp.getDataObject().setVisible("firstchoice", true);
dwTemp.getDataObject().setVisible("firstopinion", true);
dwTemp.getDataObject().setReadOnly("firstchoice", true);
dwTemp.getDataObject().setReadOnly("firstopinion", true);
dwTemp.getDataObject().setVisible("secondchoice", false);
dwTemp.getDataObject().setVisible("secondopinion", false);
dwTemp.getDataObject().setVisible("thirdchoice", false);
dwTemp.getDataObject().setVisible("thirdopinion", false);
dwTemp.getDataObject().setVisible("INTEROPINION2", false);
dwTemp.getDataObject().setVisible("DISTRIOPINION2", false);
dwTemp.getDataObject().setVisible("INTEROPINION3", false);
dwTemp.getDataObject().setVisible("DISTRIOPINION3", false);
dwTemp.setGroupHidden("0030,0040,0050");
}
}else if("0020".equals(phaseNo)){//¾­ÏúÉÌ
dwTemp.getDataObject().setVisible("firstchoice", true);
dwTemp.getDataObject().setVisible("firstopinion", true);
@ -100,7 +111,6 @@
%><%@ include file="/Frame/resources/include/ui/include_info.jspf"%>
<script type="text/javascript">
$(function(){
debugger;
switch('<%=phaseNo%>'){
case '0030'://³õÉó
$("#A_div_1230").attr("style","display:none;");

View File

@ -1,13 +1,16 @@
package com.tenwa.flow;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import jbo.app.tenwa.customer.DISTRIBUTOR_ACCOUNT;
import jbo.app.tenwa.customer.DISTRIBUTOR_ACCOUNT_TEMP;
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO;
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO_TEMP;
import jbo.com.tenwa.entity.comm.flow.D_DEPOSITCHARGE_INFO;
import jbo.com.tenwa.entity.comm.flow.D_DEPOSITCHARGE_INFO_TEMP;
import jbo.com.tenwa.entity.comm.flow.D_DEPOSITRETURN_INFO_TEMP;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
@ -23,11 +26,19 @@ public class CopyDChargeTempToFormal extends BaseBussiness{
this.initBussinessParam(Sqlca);
String flowunid = this.getAttribute("ObjectNo").toString();
String id = this.getAttribute("ProjectId").toString();
String DistributorNo = this.getAttribute("DistributorNo").toString();
Map<String,String> fromCondtion = new HashMap<String,String>();
fromCondtion.put("FLOWUNID",flowunid);
Map<String,String> otherProperty = new HashMap<String,String>();
//otherProperty.put("ID",id);
DataOperatorUtil.copySingleJBO(D_DEPOSITCHARGE_INFO_TEMP.CLASS_NAME, fromCondtion, D_DEPOSITCHARGE_INFO.CLASS_NAME, null, otherProperty, Sqlca);
BizObject dibo = JBOFactory.createBizObjectQuery(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, "flowunid=:flowunid").setParameter("flowunid",flowunid).getSingleResult(false);
BizObject deit = JBOFactory.createBizObjectQuery(D_DEPOSITRETURN_INFO_TEMP.CLASS_NAME, "flowunid=:flowunid").setParameter("flowunid",flowunid).getSingleResult(false);
BigDecimal total = new BigDecimal(dibo.getAttribute(DISTRIBUTOR_INFO_TEMP.TOTAL).getString());
BigDecimal cautionMoney = new BigDecimal(deit.getAttribute(D_DEPOSITRETURN_INFO_TEMP.CAUTION_MONEY).getString());
double num = total.add(cautionMoney).doubleValue();
JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME,Sqlca).createQuery("update o set TOTAL='"+num+"' where distributor_no='"+DistributorNo+"'").executeUpdate();
return "true";
}

View File

@ -1,8 +1,10 @@
package com.tenwa.flow;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO;
import jbo.app.tenwa.customer.DISTRIBUTOR_INFO_TEMP;
import jbo.com.tenwa.entity.comm.flow.D_DEPOSITCHARGE_INFO_TEMP;
import jbo.com.tenwa.entity.comm.flow.D_DEPOSITRETURN_INFO;
@ -34,6 +36,11 @@ public class CopyDReturnTempToFormal extends BaseBussiness {
dit.saveObject(deit);
DataOperatorUtil.copySingleJBO(D_DEPOSITRETURN_INFO_TEMP.CLASS_NAME, fromCondtion, D_DEPOSITRETURN_INFO.CLASS_NAME, null, otherProperty, Sqlca);
//Ð޸ľ­ÏúÉÌ×Üî
BigDecimal total = new BigDecimal(dst.getAttribute(DISTRIBUTOR_INFO_TEMP.TOTAL).getString());
BigDecimal cautionMoney = new BigDecimal(deit.getAttribute(D_DEPOSITRETURN_INFO_TEMP.CAUTION_MONEY).getString());
double num = total.subtract(cautionMoney).doubleValue();
JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME,Sqlca).createQuery("update o set TOTAL='"+num+"' where distributor_no='"+disStatus+"'").executeUpdate();
return "true";
}
}