经销商保证金退回脚本bug处理,及收取列表改详情显示

This commit is contained in:
jianghongdong 2018-08-03 19:29:49 +08:00
parent 630d01a5ee
commit 019475e559
2 changed files with 6 additions and 10 deletions

View File

@ -8,7 +8,7 @@
String sFlowUnid = CurPage.getParameter("FlowUnid"); String sFlowUnid = CurPage.getParameter("FlowUnid");
String sPrevUrl = CurPage.getParameter("id"); String sPrevUrl = CurPage.getParameter("id");
String rightType = CurPage.getParameter("rightType"); String rightType = CurPage.getParameter("RightType");
String rightTypeS = CurPage.getParameter("distributor_id"); String rightTypeS = CurPage.getParameter("distributor_id");
String DistributorNo = CurPage.getParameter("DistributorNo"); String DistributorNo = CurPage.getParameter("DistributorNo");
@ -36,7 +36,7 @@
String acc = Sqlca.getString("select acc_number from DISTRIBUTOR_ACCOUNT where distributor_id="+"'"+DistributorNo+"'"+" limit 0,1"); String acc = Sqlca.getString("select acc_number from DISTRIBUTOR_ACCOUNT where distributor_id="+"'"+DistributorNo+"'"+" limit 0,1");
String acco = Sqlca.getString("select account from DISTRIBUTOR_ACCOUNT where distributor_id="+"'"+DistributorNo+"'"+" limit 0,1"); String acco = Sqlca.getString("select account from DISTRIBUTOR_ACCOUNT where distributor_id="+"'"+DistributorNo+"'"+" limit 0,1");
dwTemp.genHTMLObjectWindow(CurPage.getParameter("ID")); dwTemp.genHTMLObjectWindow(sFlowUnid);
dwTemp.getDataObject().setVisible("CAUTION_MONEY", true); dwTemp.getDataObject().setVisible("CAUTION_MONEY", true);
String sButtons[][] = { String sButtons[][] = {
{"ReadOnly".equals(rightType)?"false":"true","","Button","±£´æ","±£´æËùÓÐÐÞ¸Ä","save(0)","","","",""}, {"ReadOnly".equals(rightType)?"false":"true","","Button","±£´æ","±£´æËùÓÐÐÞ¸Ä","save(0)","","","",""},

View File

@ -21,26 +21,22 @@ public class CopyDReturnTempToFormal extends BaseBussiness {
@Override @Override
public Object run(Transaction Sqlca) throws Exception { public Object run(Transaction Sqlca) throws Exception {
this.initBussinessParam(Sqlca); this.initBussinessParam(Sqlca);
String DistributorNo = this.getAttribute("DistributorNo").toString();
String flowunid = this.getAttribute("ObjectNo").toString(); String flowunid = this.getAttribute("ObjectNo").toString();
String id = this.getAttribute("ProjectId").toString(); String id = this.getAttribute("ProjectId").toString();
Map<String,String> fromCondtion = new HashMap<String,String>(); Map<String,String> fromCondtion = new HashMap<String,String>();
fromCondtion.put("FLOWUNID", flowunid); fromCondtion.put("FLOWUNID", flowunid);
Map<String,String> otherProperty = new HashMap<String,String>();
otherProperty.put("ID", id);
BizObject dst= DataOperatorUtil.getSingleJBO(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, fromCondtion, Sqlca); BizObject dst= DataOperatorUtil.getSingleJBO(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, fromCondtion, Sqlca);
String disStatus = dst.getAttribute("id").toString();
BizObjectManager dit = JBOFactory.getBizObjectManager(D_DEPOSITRETURN_INFO_TEMP.CLASS_NAME,Sqlca); BizObjectManager dit = JBOFactory.getBizObjectManager(D_DEPOSITRETURN_INFO_TEMP.CLASS_NAME,Sqlca);
BizObject deit = dit.createQuery("select * from O where FLOWUNID=:flowUnid").setParameter("flowUnid", flowunid).getSingleResult(true); BizObject deit = dit.createQuery("select * from O where FLOWUNID=:flowUnid").setParameter("flowUnid", flowunid).getSingleResult(false);
deit.setAttributeValue("DISTRIBUTOR_ID", disStatus);
dit.saveObject(deit);
DataOperatorUtil.copySingleJBO(D_DEPOSITRETURN_INFO_TEMP.CLASS_NAME, fromCondtion, D_DEPOSITRETURN_INFO.CLASS_NAME, null, otherProperty, Sqlca); DataOperatorUtil.copySingleJBO(D_DEPOSITRETURN_INFO_TEMP.CLASS_NAME, fromCondtion, D_DEPOSITRETURN_INFO.CLASS_NAME, null, null, Sqlca);
//Ð޸ľ­ÏúÉÌ×Üî //Ð޸ľ­ÏúÉÌ×Üî
BigDecimal sums = new BigDecimal(dst.getAttribute(DISTRIBUTOR_INFO_TEMP.SUMS).getString()); BigDecimal sums = new BigDecimal(dst.getAttribute(DISTRIBUTOR_INFO_TEMP.SUMS).getString());
BigDecimal cautionMoney = new BigDecimal(deit.getAttribute(D_DEPOSITRETURN_INFO_TEMP.CAUTION_MONEY).getString()); BigDecimal cautionMoney = new BigDecimal(deit.getAttribute(D_DEPOSITRETURN_INFO_TEMP.CAUTION_MONEY).getString());
double num = sums.subtract(cautionMoney).doubleValue(); double num = sums.subtract(cautionMoney).doubleValue();
JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME,Sqlca).createQuery("update o set SUMS='"+num+"' where distributor_no='"+disStatus+"'").executeUpdate(); JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME,Sqlca).createQuery("update o set SUMS='"+num+"' where distributor_no='"+DistributorNo+"'").executeUpdate();
return "true"; return "true";
} }
} }