经销商变更日志信息如表(distributor_account_log)
This commit is contained in:
parent
2f004ee9c2
commit
fd0b1aa7e8
@ -2919,5 +2919,26 @@
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
<class name="DISTRIBUTOR_ACCOUNT_LOG" label="" keyAttributes="ID">
|
||||
<attributes>
|
||||
<attribute name="ID" label="ID" type="STRING" length="100"/>
|
||||
<attribute name="DISTRIBUTOR_ID" label="经销商id" type="STRING" length="100"/>
|
||||
<attribute name="TIMESTAMP" label="时间戳" type="STRING" length="20"/>
|
||||
<attribute name="ACTION_TYPE" label="操作类型" type="STRING" length="6"/>
|
||||
<attribute name="ACC_NUMBER" label="银行账号" type="STRING" length="30"/>
|
||||
<attribute name="ACCOUNT" label="账户名称" type="STRING" length="20"/>
|
||||
<attribute name="IS_MAIN" label="是否主体账户" type="STRING" length="6"/>
|
||||
<attribute name="ACC_INFO" label="账户使用情况" type="STRING" length="20"/>
|
||||
<attribute name="OPEN_BANK" label="开户行" type="STRING" length="30"/>
|
||||
<attribute name="PROVINCE" label="省" type="STRING" length="30"/>
|
||||
<attribute name="DISTRICT" label="地区" type="STRING" length="100"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
<property name="table" value="distributor_account_log" />
|
||||
<property name="createKey" value="true" />
|
||||
</managerProperties>
|
||||
</manager>
|
||||
</class>
|
||||
</package>
|
||||
</jbo>
|
||||
|
||||
@ -0,0 +1,89 @@
|
||||
package com.tenwa.reckon.handler;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import oracle.net.aso.e;
|
||||
import jbo.app.tenwa.customer.DISTRIBUTOR_ACCOUNT_LOG;
|
||||
import jbo.app.tenwa.customer.DISTRIBUTOR_ACCOUNT_TEMP;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.BizObjectQuery;
|
||||
import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.awe.dw.handler.impl.CommonHandler;
|
||||
|
||||
public class DisributorAccountLogHandlerDelete extends CommonHandler{
|
||||
|
||||
//KKK经销商日志(新增/修改)通用方法
|
||||
public String distributorLogUtilAddAndUpdate(JBOTransaction tx , DistributorAccountLogEntity dale
|
||||
) throws JBOException{
|
||||
//KKK增加经销商增删改日志
|
||||
BizObjectManager bomPL = JBOFactory.getBizObjectManager(DISTRIBUTOR_ACCOUNT_LOG.CLASS_NAME, tx);
|
||||
BizObject boPL = bomPL.newObject();
|
||||
boPL.setAttributeValue("DISTRIBUTOR_ID", dale.getDistributorId());
|
||||
boPL.setAttributeValue("ACTION_TYPE", dale.getActionType());
|
||||
boPL.setAttributeValue("TIMESTAMP", dale.getTimestamp());
|
||||
boPL.setAttributeValue("ACC_NUMBER", dale.getAccNumber());
|
||||
boPL.setAttributeValue("ACCOUNT", dale.getAccount());
|
||||
boPL.setAttributeValue("IS_MAIN", dale.getIsMain());
|
||||
boPL.setAttributeValue("ACC_INFO", dale.getAccInfo());
|
||||
boPL.setAttributeValue("OPEN_BANK", dale.getOpenBank());
|
||||
boPL.setAttributeValue("PROVINCE", dale.getProvince());
|
||||
boPL.setAttributeValue("DISTRICT", dale.getDistrict());
|
||||
bomPL.saveObject(boPL);
|
||||
return "logOK";
|
||||
}
|
||||
|
||||
//KKK经销商日志(删除)方法
|
||||
public String distributorLogUtilDelete(JBOTransaction tx , DistributorAccountLogEntity dale,String id) throws JBOException {
|
||||
BizObjectManager bomPL = JBOFactory.getBizObjectManager(DISTRIBUTOR_ACCOUNT_TEMP.CLASS_NAME, tx);
|
||||
BizObject boPL = bomPL.newObject();
|
||||
|
||||
BizObjectQuery boq = bomPL.createQuery(
|
||||
"select distributor_id,acc_number,account,is_main,acc_info,open_bank,provinceInfo,district FROM O WHERE id=:ID");
|
||||
boq.setParameter("ID",id);
|
||||
boPL = boq.getSingleResult();
|
||||
dale.setDistributorId(boPL.getAttribute("DISTRIBUTOR_ID")+"");
|
||||
dale.setAccNumber(boPL.getAttribute("ACC_NUMBER")+"");
|
||||
dale.setAccount(boPL.getAttribute("ACCOUNT")+"");
|
||||
dale.setIsMain(boPL.getAttribute("IS_MAIN")+"");
|
||||
dale.setAccInfo(boPL.getAttribute("ACC_INFO")+"");
|
||||
dale.setOpenBank(boPL.getAttribute("OPEN_BANK")+"");
|
||||
dale.setProvince(boPL.getAttribute("PROVINCEINFO")+"");
|
||||
dale.setDistrict(boPL.getAttribute("DISTRICT")+"");
|
||||
distributorLogUtilAddAndUpdate(tx,dale);
|
||||
return "OK";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void beforeDelete(JBOTransaction tx, BizObject bo)
|
||||
throws Exception {//删除前
|
||||
DistributorAccountLogEntity daLogEntity = new DistributorAccountLogEntity();
|
||||
//DISTRIBUTOR_ACCOUNT_TEMP
|
||||
daLogEntity.setActionType("D");
|
||||
daLogEntity.setTimestamp(String.valueOf(new Date().getTime()));
|
||||
System.err.println("deletedelete!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!22");
|
||||
distributorLogUtilDelete(tx,daLogEntity, bo.getAttribute("id").getString());
|
||||
|
||||
/*System.err.println("ID:"+bo.getAttribute("ID").getString());
|
||||
System.err.println("DISTRIBUTOR_ID:"+bo.getAttribute("DISTRIBUTOR_ID").getString());
|
||||
System.err.println("时间戳:"+String.valueOf(new Date().getTime()));
|
||||
System.err.println("ACC_NUMBER:"+bo.getAttribute("ACC_NUMBER").getString());
|
||||
System.err.println("ACCOUNT:"+bo.getAttribute("ACCOUNT").getString());
|
||||
System.err.println("IS_MAIN:"+bo.getAttribute("IS_MAIN").getString());
|
||||
System.err.println("ACC_INFO:"+bo.getAttribute("ACC_INFO").getString());
|
||||
System.err.println("OPEN_BANK:"+bo.getAttribute("OPEN_BANK").getString());
|
||||
System.err.println("PROVINCE:"+bo.getAttribute("provinceInfo").getString());
|
||||
System.err.println("DISTRICT:"+bo.getAttribute("DISTRICT").getString());*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
119
calc/com/tenwa/reckon/handler/DistributorAccountLogEntity.java
Normal file
119
calc/com/tenwa/reckon/handler/DistributorAccountLogEntity.java
Normal file
@ -0,0 +1,119 @@
|
||||
package com.tenwa.reckon.handler;
|
||||
|
||||
/**
|
||||
* DistributorAccountLogEntity
|
||||
* this is table 'distributor_account_log' of entity
|
||||
* @author K
|
||||
*
|
||||
*/
|
||||
public class DistributorAccountLogEntity {
|
||||
|
||||
private String distributorId,actionType,timestamp,accNumber,account,isMain,accInfo,openBank,province,district;
|
||||
|
||||
public DistributorAccountLogEntity() {
|
||||
super();
|
||||
}
|
||||
|
||||
public DistributorAccountLogEntity(String distributorId,
|
||||
String actionType, String timestamp, String accNumber,
|
||||
String account, String isMain, String accInfo, String openBank,
|
||||
String province, String district) {
|
||||
super();
|
||||
this.distributorId = distributorId;
|
||||
this.actionType = actionType;
|
||||
this.timestamp = timestamp;
|
||||
this.accNumber = accNumber;
|
||||
this.account = account;
|
||||
this.isMain = isMain;
|
||||
this.accInfo = accInfo;
|
||||
this.openBank = openBank;
|
||||
this.province = province;
|
||||
this.district = district;
|
||||
}
|
||||
|
||||
|
||||
public String getActionType() {
|
||||
return actionType;
|
||||
}
|
||||
|
||||
|
||||
public void setActionType(String actionType) {
|
||||
this.actionType = actionType;
|
||||
}
|
||||
|
||||
public String getDistributorId() {
|
||||
return distributorId;
|
||||
}
|
||||
|
||||
public void setDistributorId(String distributorId) {
|
||||
this.distributorId = distributorId;
|
||||
}
|
||||
|
||||
public String getTimestamp() {
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
public void setTimestamp(String timestamp) {
|
||||
this.timestamp = timestamp;
|
||||
}
|
||||
|
||||
public String getAccNumber() {
|
||||
return accNumber;
|
||||
}
|
||||
|
||||
public void setAccNumber(String accNumber) {
|
||||
this.accNumber = accNumber;
|
||||
}
|
||||
|
||||
public String getAccount() {
|
||||
return account;
|
||||
}
|
||||
|
||||
public void setAccount(String account) {
|
||||
this.account = account;
|
||||
}
|
||||
|
||||
public String getIsMain() {
|
||||
return isMain;
|
||||
}
|
||||
|
||||
public void setIsMain(String isMain) {
|
||||
this.isMain = isMain;
|
||||
}
|
||||
|
||||
public String getAccInfo() {
|
||||
return accInfo;
|
||||
}
|
||||
|
||||
public void setAccInfo(String accInfo) {
|
||||
this.accInfo = accInfo;
|
||||
}
|
||||
|
||||
public String getOpenBank() {
|
||||
return openBank;
|
||||
}
|
||||
|
||||
public void setOpenBank(String openBank) {
|
||||
this.openBank = openBank;
|
||||
}
|
||||
|
||||
public String getProvince() {
|
||||
return province;
|
||||
}
|
||||
|
||||
public void setProvince(String province) {
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
public String getDistrict() {
|
||||
return district;
|
||||
}
|
||||
|
||||
public void setDistrict(String district) {
|
||||
this.district = district;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
110
calc/com/tenwa/reckon/handler/DistributorAccountLogHandler.java
Normal file
110
calc/com/tenwa/reckon/handler/DistributorAccountLogHandler.java
Normal file
@ -0,0 +1,110 @@
|
||||
package com.tenwa.reckon.handler;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import jbo.app.tenwa.customer.DISTRIBUTOR_ACCOUNT_LOG;
|
||||
import jbo.app.tenwa.customer.DISTRIBUTOR_ACCOUNT_TEMP;
|
||||
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.BizObjectQuery;
|
||||
import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.awe.dw.handler.BusinessProcessData;
|
||||
import com.amarsoft.awe.dw.handler.impl.CommonHandler;
|
||||
import com.amarsoft.biz.workflow.graph.model.BusinessProcess;
|
||||
|
||||
public class DistributorAccountLogHandler extends CommonHandler{
|
||||
|
||||
//KKK经销商日志(新增/修改)通用方法
|
||||
public String distributorLogUtilAddAndUpdate(JBOTransaction tx , DistributorAccountLogEntity dale
|
||||
) throws JBOException{
|
||||
//KKK增加经销商增删改日志
|
||||
BizObjectManager bomPL = JBOFactory.getBizObjectManager(DISTRIBUTOR_ACCOUNT_LOG.CLASS_NAME, tx);
|
||||
BizObject boPL = bomPL.newObject();
|
||||
boPL.setAttributeValue("DISTRIBUTOR_ID", dale.getDistributorId());
|
||||
boPL.setAttributeValue("ACTION_TYPE", dale.getActionType());
|
||||
boPL.setAttributeValue("TIMESTAMP", dale.getTimestamp());
|
||||
boPL.setAttributeValue("ACC_NUMBER", dale.getAccNumber());
|
||||
boPL.setAttributeValue("ACCOUNT", dale.getAccount());
|
||||
boPL.setAttributeValue("IS_MAIN", dale.getIsMain());
|
||||
boPL.setAttributeValue("ACC_INFO", dale.getAccInfo());
|
||||
boPL.setAttributeValue("OPEN_BANK", dale.getOpenBank());
|
||||
boPL.setAttributeValue("PROVINCE", dale.getProvince());
|
||||
boPL.setAttributeValue("DISTRICT", dale.getDistrict());
|
||||
bomPL.saveObject(boPL);
|
||||
return "logOK";
|
||||
}
|
||||
|
||||
/*@Override
|
||||
protected void beforeInsert(JBOTransaction tx, BizObject bo)
|
||||
throws Exception {//增加前
|
||||
|
||||
DistributorAccountLogEntity daLogEntity = new DistributorAccountLogEntity();
|
||||
daLogEntity.setDistributorId(bo.getAttribute("DISTRIBUTOR_ID").getString());
|
||||
daLogEntity.setActionType("A");
|
||||
daLogEntity.setTimestamp(String.valueOf(new Date().getTime()));
|
||||
daLogEntity.setAccNumber(bo.getAttribute("ACC_NUMBER").getString());
|
||||
daLogEntity.setAccount(bo.getAttribute("ACCOUNT").getString());
|
||||
daLogEntity.setIsMain(bo.getAttribute("IS_MAIN").getString());
|
||||
daLogEntity.setAccInfo(bo.getAttribute("ACC_INFO").getString());
|
||||
daLogEntity.setOpenBank(bo.getAttribute("OPEN_BANK").getString());
|
||||
daLogEntity.setProvince(bo.getAttribute("PROVINCEINFO").getString());
|
||||
daLogEntity.setDistrict(bo.getAttribute("DISTRICT").getString());
|
||||
distributorLogUtilAddAndUpdate(tx,daLogEntity);
|
||||
|
||||
}*/
|
||||
@Override
|
||||
protected void afterInsert(JBOTransaction tx, BizObject bo)
|
||||
throws Exception {//增加后
|
||||
DistributorAccountLogEntity daLogEntity = new DistributorAccountLogEntity();
|
||||
daLogEntity.setDistributorId(bo.getAttribute("DISTRIBUTOR_ID").getString());
|
||||
daLogEntity.setActionType("A");
|
||||
daLogEntity.setTimestamp(String.valueOf(new Date().getTime()));
|
||||
daLogEntity.setAccNumber(bo.getAttribute("ACC_NUMBER").getString());
|
||||
daLogEntity.setAccount(bo.getAttribute("ACCOUNT").getString());
|
||||
daLogEntity.setIsMain(bo.getAttribute("IS_MAIN").getString());
|
||||
daLogEntity.setAccInfo(bo.getAttribute("ACC_INFO").getString());
|
||||
daLogEntity.setOpenBank(bo.getAttribute("OPEN_BANK").getString());
|
||||
daLogEntity.setProvince(bo.getAttribute("provinceInfo").getString());
|
||||
daLogEntity.setDistrict(bo.getAttribute("DISTRICT").getString());
|
||||
distributorLogUtilAddAndUpdate(tx,daLogEntity);
|
||||
|
||||
}
|
||||
@Override
|
||||
protected void beforeUpdate(JBOTransaction tx, BizObject bo)
|
||||
throws Exception {//修改前
|
||||
DistributorAccountLogEntity daLogEntity = new DistributorAccountLogEntity();
|
||||
daLogEntity.setDistributorId(bo.getAttribute("DISTRIBUTOR_ID").getString());
|
||||
daLogEntity.setActionType("U");
|
||||
daLogEntity.setTimestamp(String.valueOf(new Date().getTime()));
|
||||
daLogEntity.setAccNumber(bo.getAttribute("ACC_NUMBER").getString());
|
||||
daLogEntity.setAccount(bo.getAttribute("ACCOUNT").getString());
|
||||
daLogEntity.setIsMain(bo.getAttribute("IS_MAIN").getString());
|
||||
daLogEntity.setAccInfo(bo.getAttribute("ACC_INFO").getString());
|
||||
daLogEntity.setOpenBank(bo.getAttribute("OPEN_BANK").getString());
|
||||
daLogEntity.setProvince(bo.getAttribute("provinceInfo").getString());
|
||||
daLogEntity.setDistrict(bo.getAttribute("DISTRICT").getString());
|
||||
distributorLogUtilAddAndUpdate(tx,daLogEntity);
|
||||
|
||||
}
|
||||
@Override
|
||||
protected void afterUpdate(JBOTransaction tx, BizObject bo)
|
||||
throws Exception {//修改后
|
||||
DistributorAccountLogEntity daLogEntity = new DistributorAccountLogEntity();
|
||||
daLogEntity.setDistributorId(bo.getAttribute("DISTRIBUTOR_ID").getString());
|
||||
daLogEntity.setActionType("U");
|
||||
daLogEntity.setTimestamp(String.valueOf(new Date().getTime()));
|
||||
daLogEntity.setAccNumber(bo.getAttribute("ACC_NUMBER").getString());
|
||||
daLogEntity.setAccount(bo.getAttribute("ACCOUNT").getString());
|
||||
daLogEntity.setIsMain(bo.getAttribute("IS_MAIN").getString());
|
||||
daLogEntity.setAccInfo(bo.getAttribute("ACC_INFO").getString());
|
||||
daLogEntity.setOpenBank(bo.getAttribute("OPEN_BANK").getString());
|
||||
daLogEntity.setProvince(bo.getAttribute("provinceInfo").getString());
|
||||
daLogEntity.setDistrict(bo.getAttribute("DISTRICT").getString());
|
||||
distributorLogUtilAddAndUpdate(tx,daLogEntity);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user