经销商账户修改前修改后的区分 UB UA

This commit is contained in:
admin 2018-08-24 23:38:36 +08:00
parent 16e3240027
commit 0c7be275ad

View File

@ -13,6 +13,10 @@ import com.amarsoft.awe.dw.handler.impl.CommonHandler;
public class DistributorAccountLogHandler extends CommonHandler{
DistributorAccountLogEntity A = new DistributorAccountLogEntity();
DistributorAccountLogEntity UAfter = new DistributorAccountLogEntity();
DistributorAccountLogEntity UBfore = new DistributorAccountLogEntity();
//KKK经销商日志(新增/修改)通用方法
public String distributorLogUtilAddAndUpdate(JBOTransaction tx , DistributorAccountLogEntity dale
) throws JBOException{
@ -36,7 +40,6 @@ public class DistributorAccountLogHandler extends CommonHandler{
/*@Override
protected void beforeInsert(JBOTransaction tx, BizObject bo)
throws Exception {//增加前
DistributorAccountLogEntity daLogEntity = new DistributorAccountLogEntity();
daLogEntity.setDistributorId(bo.getAttribute("DISTRIBUTOR_ID").getString());
daLogEntity.setActionType("A");
@ -49,7 +52,6 @@ public class DistributorAccountLogHandler extends CommonHandler{
daLogEntity.setProvince(bo.getAttribute("PROVINCEINFO").getString());
daLogEntity.setDistrict(bo.getAttribute("DISTRICT").getString());
distributorLogUtilAddAndUpdate(tx,daLogEntity);
}*/
@Override
protected void afterInsert(JBOTransaction tx, BizObject bo)
@ -66,41 +68,37 @@ public class DistributorAccountLogHandler extends CommonHandler{
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(StringFunction.getTodayNow());
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);
UBfore.setDistributorId(bo.getAttribute("DISTRIBUTOR_ID").getString());
UBfore.setActionType("UB");
UBfore.setTimestamp(StringFunction.getTodayNow());
UBfore.setAccNumber(bo.getAttribute("ACC_NUMBER").getString());
UBfore.setAccount(bo.getAttribute("ACCOUNT").getString());
UBfore.setIsMain(bo.getAttribute("IS_MAIN").getString());
UBfore.setAccInfo(bo.getAttribute("ACC_INFO").getString());
UBfore.setOpenBank(bo.getAttribute("OPEN_BANK").getString());
UBfore.setProvince(bo.getAttribute("provinceInfo").getString());
UBfore.setDistrict(bo.getAttribute("DISTRICT").getString());
distributorLogUtilAddAndUpdate(tx,UBfore);
}
@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(StringFunction.getTodayNow());
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);
UAfter.setDistributorId(bo.getAttribute("DISTRIBUTOR_ID").getString());
UAfter.setActionType("UA");
UAfter.setTimestamp(StringFunction.getTodayNow());
UAfter.setAccNumber(bo.getAttribute("ACC_NUMBER").getString());
UAfter.setAccount(bo.getAttribute("ACCOUNT").getString());
UAfter.setIsMain(bo.getAttribute("IS_MAIN").getString());
UAfter.setAccInfo(bo.getAttribute("ACC_INFO").getString());
UAfter.setOpenBank(bo.getAttribute("OPEN_BANK").getString());
UAfter.setProvince(bo.getAttribute("provinceInfo").getString());
UAfter.setDistrict(bo.getAttribute("DISTRICT").getString());
distributorLogUtilAddAndUpdate(tx,UAfter);
}
}