From 9b3355f60106129f1339e9a776e71d7203d0c1e4 Mon Sep 17 00:00:00 2001 From: linxiaoping <12345678> Date: Thu, 28 Jun 2018 09:42:55 +0800 Subject: [PATCH] refresh --- .../flow/CopyReturnInfoTempToFormal.java | 48 +++++++++++++------ 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/calc/com/tenwa/flow/CopyReturnInfoTempToFormal.java b/calc/com/tenwa/flow/CopyReturnInfoTempToFormal.java index e1f64daf0..7d5d577b6 100644 --- a/calc/com/tenwa/flow/CopyReturnInfoTempToFormal.java +++ b/calc/com/tenwa/flow/CopyReturnInfoTempToFormal.java @@ -22,33 +22,53 @@ public class CopyReturnInfoTempToFormal extends BaseBussiness{ @Override public Object run(Transaction Sqlca) throws Exception { this.initBussinessParam(Sqlca); - String orgid=this.saveOrgInfo(Sqlca); MapfromCondtion=new HashMap(); + fromCondtion.put("flowunid",this.getAttribute("FlowUnid").toString()); BizObject dst= DataOperatorUtil.getSingleJBO(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, fromCondtion, Sqlca); + String distributor_no=dst.getAttribute("distributor_no").getString(); + fromCondtion.clear(); + fromCondtion.put("distributor_no", distributor_no); + BizObject disinfo= DataOperatorUtil.getSingleJBO(DISTRIBUTOR_INFO.CLASS_NAME, fromCondtion, Sqlca); String disStatus = dst.getAttribute("distributor_status").toString(); - dst.setAttributeValue("orgid",orgid ); - BizObjectManager dit = JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO_TEMP.CLASS_NAME,Sqlca); + BizObjectManager ditinfo = JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME,Sqlca); + if("distributor_status06".equals(disStatus)){ + disinfo.setAttributeValue("distributor_status", "distributor_status10"); + } + ditinfo.saveObject(disinfo); + String sMessage="true"; + return sMessage; + + + /*this.initBussinessParam(Sqlca); + //String orgid=this.saveOrgInfo(Sqlca); + MapfromCondtion=new HashMap(); + fromCondtion.put("flowunid",this.getAttribute("FlowUnid").toString()); + + BizObject dst= DataOperatorUtil.getSingleJBO(DISTRIBUTOR_INFO.CLASS_NAME, fromCondtion, Sqlca); + String disStatus = dst.getAttribute("distributor_status").toString(); + //dst.setAttributeValue("orgid",orgid ); + BizObjectManager dit = JBOFactory.getBizObjectManager(DISTRIBUTOR_INFO.CLASS_NAME,Sqlca); if("distributor_status06".equals(disStatus)){ dst.setAttributeValue("distributor_status", "distributor_status10"); } dit.saveObject(dst); - MaptoCondtion=new HashMap(); - DistributorCompare dc=new DistributorCompare(); - fromCondtion.clear(); - fromCondtion.put("flowunid",this.getAttribute("FlowUnid").toString()); - toCondtion.clear(); - toCondtion.put("distributor_no", dst.getAttribute("distributor_no").getString()); - - DataOperatorUtil.copyJBOSet(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, fromCondtion, DISTRIBUTOR_INFO.CLASS_NAME, toCondtion, null, dc, Sqlca); +// MaptoCondtion=new HashMap(); +// DistributorCompare dc=new DistributorCompare(); +// fromCondtion.clear(); +// fromCondtion.put("flowunid",this.getAttribute("FlowUnid").toString()); +// toCondtion.clear(); +// toCondtion.put("distributor_no", dst.getAttribute("distributor_no").getString()); +// +// DataOperatorUtil.copyJBOSet(DISTRIBUTOR_INFO_TEMP.CLASS_NAME, fromCondtion, DISTRIBUTOR_INFO.CLASS_NAME, toCondtion, null, dc, Sqlca); String sMessage="true"; - return sMessage; + return sMessage;*/ } /** * 保存渠道信息 * @author 2018-06-10 */ - private String saveOrgInfo(Transaction Sqlca) throws Exception { +/* private String saveOrgInfo(Transaction Sqlca) throws Exception { ASOrgObject orgObject= new ASOrgObject("8006");//默认为安鹏向下的渠道信息 Map mapOrgInfo=orgObject.nextLevalOrgNo(Sqlca); BizObjectManager manager = JBOFactory.getFactory().getManager("jbo.sys.ORG_INFO"); @@ -74,5 +94,5 @@ public class CopyReturnInfoTempToFormal extends BaseBussiness{ manager.saveObject(bo); } return bo.getAttribute("ORGID").toString(); - } + }*/ }