添加扣款渠道配置日志

This commit is contained in:
tangfutang 2020-12-10 18:34:58 +08:00
parent e8d2ca6411
commit 7e18aef1c3
6 changed files with 173 additions and 6 deletions

View File

@ -44,6 +44,7 @@
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] = {
{"true","All","Button","保存","保存所有修改","saveRecord()","","","","btn_icon_save"},
{"true","All","Button","删除","删除","deleteRecord()","","","","btn_icon_delete",""},
{"true","","Button","返回","返回列表页面","parent.AsDialog.ClosePage()","","","","btn_icon_return"}
};
sButtonPosition = "south";
@ -72,6 +73,17 @@
setItemValue(0,0,'bank_name',sReturn[1]);
},"选择银行名称");
}
function deleteRecord(){
var id = getItemValue(0,getRow(),'id');
if(typeof(id)=="undefined" || id.length==0 ){
alert("新增页面无法删除!!!");
return ;
}
if(confirm('确实要删除吗?')){
as_delete(0,'parent.AsDialog.ClosePage()');
}
}
</script>
<%/*~END~*/%>

View File

@ -38,7 +38,7 @@
{"true","All","Button","新增","新增","newRecord()","","","","btn_icon_add",""},
//{"true","","Button","详情","详情","view()","","","","btn_icon_detail",""},
{"true","All","Button","修改","修改","edit()","","","","btn_icon_edit",""},
{"true","All","Button","ɾ³ý","ɾ³ý","deleteRecord()","","","","btn_icon_delete",""},
{"false","All","Button","ɾ³ý","ɾ³ý","deleteRecord()","","","","btn_icon_delete",""},
};
%>
<%/*~END~*/%>

View File

@ -651,6 +651,24 @@
</managerProperties>
</manager>
</class>
<class name="BANK_COLLECT_TYPE_CONFIG_LOG" label="银行扣款方式配置日志表" keyAttributes="id">
<attributes>
<attribute name="id" label="标识" type="STRING" length="32"/>
<attribute name="config_id" label="配置id" type="STRING" length="32"/>
<attribute name="bank_code" label="银行代码" type="STRING" length="32"/>
<attribute name="bank_name" label="银行名称" type="STRING" length="32"/>
<attribute name="collect_type" label="扣款方式" type="STRING" length="32"/>
<attribute name="operation_type" label="操作类型" type="STRING" length="32"/>
<attribute name="inputuserid" label="登记人" type="STRING" length="32"/>
<attribute name="inputtime" label="登记时间" type="STRING" length="32"/>
</attributes>
<manager>
<managerProperties>
<property name="table" value="bank_collect_type_config_log" />
<property name="createKey" value="true" />
</managerProperties>
</manager>
</class>
<class name="BANK_COLLEC_TYPET_4_CONTRACT" label="单个合同银行扣款方式配置" keyAttributes="id">
<attributes>
<attribute name="id" label="标识" type="STRING" length="32"/>

View File

@ -0,0 +1,77 @@
package com.amarsoft.app.awe.config.customer;
import jbo.loan.BANK_COLLECT_TYPE_CONFIG;
import jbo.loan.BANK_COLLECT_TYPE_CONFIG_LOG;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.are.lang.DataElement;
import com.amarsoft.awe.dw.handler.impl.CommonHandler;
import com.tenwa.reckon.util.DateUtil;
public class CustomerAccountConfigHandler extends CommonHandler {
@Override
protected boolean validityCheck(BizObject bo, boolean isInsert) {
try {
String bankCode=bo.getAttribute("bank_code").getString();
BizObject cq=JBOFactory.createBizObjectQuery(BANK_COLLECT_TYPE_CONFIG.CLASS_NAME,"bank_code=:bank_code").setParameter("bank_code", bankCode).getSingleResult(false);
if(cq!=null){
String id = bo.getAttribute("id") ==null?"":bo.getAttribute("id").getString();
if(id.length()==0 || !cq.getAttribute("id").getString().equals(id)){
this.errors="该银行已存在扣款渠道,请检查!";
return false;
}
}
return true;
} catch (JBOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return false;
}
}
@Override
protected void afterInsert(JBOTransaction tx, BizObject bo)
throws Exception {
// TODO Auto-generated method stub
this.saveConfigLog("insert", bo, tx);
super.afterInsert(tx, bo);
}
@Override
protected void afterUpdate(JBOTransaction tx, BizObject bo)
throws Exception {
// TODO Auto-generated method stub
this.saveConfigLog("update", bo, tx);
super.afterUpdate(tx, bo);
}
@Override
protected void afterDelete(JBOTransaction tx, BizObject bo)
throws Exception {
// TODO Auto-generated method stub
this.saveConfigLog("delete", bo, tx);
super.afterDelete(tx, bo);
}
public void saveConfigLog(String operationType,BizObject bo,JBOTransaction tx) throws Exception{
BizObjectManager bctclManage = JBOFactory.getBizObjectManager(BANK_COLLECT_TYPE_CONFIG_LOG.CLASS_NAME,tx);
BizObject bctcl = bctclManage.newObject();
if(!"insert".equals(operationType)){
bctcl.setAttributeValue("config_id", bo.getAttribute("id").getString());
}
bctcl.setAttributeValue("bank_code", bo.getAttribute("bank_code").getString());
bctcl.setAttributeValue("bank_name", bo.getAttribute("bank_name").getString());
bctcl.setAttributeValue("collect_type", bo.getAttribute("collect_type").getString());
bctcl.setAttributeValue("operation_type",operationType);
bctcl.setAttributeValue("inputuserid", bo.getAttribute("updateuserid").getString());
bctcl.setAttributeValue("inputtime", DateUtil.getSystemTimeByFormat("yyyy/MM/dd HH:mm:ss"));
bctclManage.saveObject(bctcl);
}
}

View File

@ -0,0 +1,48 @@
package jbo.loan;
import java.lang.String;
/**
* 银行扣款方式配置日志表 - JBO命名常量类<br><br>
* Note: This file is generated by ADE tools, <em>dont</em> modify it.<br>
*/
public interface BANK_COLLECT_TYPE_CONFIG_LOG{
/**
* 银行扣款方式配置日志表<br><br>
* 代表本类映射的BizObjectClass
*/
public static final String CLASS_NAME = "jbo.loan.BANK_COLLECT_TYPE_CONFIG_LOG";
/**
* 标识 STRING(32)<br>
*/
public static final String id = "id";
/**
* 配置id STRING(32)<br>
*/
public static final String config_id = "config_id";
/**
* 银行代码 STRING(32)<br>
*/
public static final String bank_code = "bank_code";
/**
* 银行名称 STRING(32)<br>
*/
public static final String bank_name = "bank_name";
/**
* 扣款方式 STRING(32)<br>
*/
public static final String collect_type = "collect_type";
/**
* 操作类型 STRING(32)<br>
*/
public static final String operation_type = "operation_type";
/**
* 登记人 STRING(32)<br>
*/
public static final String inputuserid = "inputuserid";
/**
* 登记时间 STRING(32)<br>
*/
public static final String inputtime = "inputtime";
}

View File

@ -181,12 +181,24 @@ Insert Into Code_Library (codeno,itemno,itemname,bankno,sortno,isinuse,itemdescr
delete from AWE_DO_CATALOG where dono='VILCRentPlanList';
Insert Into AWE_DO_CATALOG (dono,doname,dodescribe,dotype,doclass,isinuse,colcount,modeid,jboclass,jbofrom,jbowhere,jbogroup,jboorder,businessprocess,exportflag,inputuser,inputtime,updateuser,updatetime,remark,isvalidate,parent) Values ('VILCRentPlanList','租金计划视图表',null,'30120',null,'1','1','default','jbo.loan.VI_RENT_COLLECT_4_EBANK','O left join jbo.com.tenwa.lease.comm.LB_EQUIPMENT_CAR lec on O.contract_id=lec.contract_id and lec.car_attribute=''head'' left join jbo.com.tenwa.lease.comm.LB_CAR_LICENSE_PLATE_INFO lcl on lec.contract_id=lcl.contract_id and lec.frame_number=lcl.frame_number','O.businesstype=:businessType and O.subjectid=:subjectId and v.DATE_FORMAT(O.plan_date,''%Y%m'') <= v.DATE_FORMAT(v.SYSDATE(),''%Y%m'') and rent_over>0','','','com.tenwa.flow.rent.rentincome.VILCRentPlanListHandler',null,'SYS_Designer','2017/06/04 20:29:52','SYS_Designer','2020/11/18 10:15:22','','1','');
-- ¿Û¿îÇþµÀÊÕÈ¡·Ñ·ÑÂÊά»¤Ìí¼ÓͨÁª¿Û¿î
Insert Into Code_Library (codeno,itemno,itemname,bankno,sortno,isinuse,itemdescribe,itemattribute,relativecode,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,inputuser,inputorg,inputtime,updateuser,updatetime,remark,helptext) Values ('charge_channel','tl','ͨÁª¿Û¿î','','0040','1','','','','','','','','','','','','SYS_Designer',null,'2020/11/30 16:10:37','SYS_Designer','2020/11/30 16:10:37','','');
Insert Into Code_Library (codeno,itemno,itemname,bankno,sortno,isinuse,itemdescribe,itemattribute,relativecode,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,inputuser,inputorg,inputtime,updateuser,updatetime,remark,helptext) Values ('charge_way','AutoBuckle_tl','ͨÁª¿¨¿Û','','0060','1','','','','tl','','','','','','','','SYS_Designer',null,'2020/11/30 16:17:14','SYS_Designer','2020/11/30 16:17:14','','');
-- 需要在贝贝的代码后面执行
-- 银行名称中添加是否启用字段
Alter table bank_code add column is_use varchar(1) NULL COMMENT '是否使用' after bank_name;
delete from SELECT_CATALOG where selname='selectBankType';
Insert Into SELECT_CATALOG (selname,seltype,seldescribe,seltablename,selprimarykey,selbrowsemode,selargs,selhidefield,selcode,selfieldname,selfielddisp,selreturnvalue,selfilterfield,isinuse,mutilorsingle,attribute1,attribute2,attribute3,attribute4,attribute5,inputuser,inputorg,inputtime,updateuser,updatetime,remark) Values ('selectBankType','Sql','查询银行名称','bank_code','bank_code','Grid','','','SELECT bank_code,bank_name from bank_code where is_use=''Y''','银行编号,银行名称','','bank_code@bank_name','bank_name','1','Single','','','','','','SYS_Designer','','2020/10/21 18:46:44','SYS_Designer','2020/12/10 09:45:21','');
update bank_code set is_use='N';
update bank_code set is_use='Y' where bank_name in ('工商银行','中国银行','建设银行','农业银行','招商银行','交通银行','邮政银行','兴业银行','平安银行','民生银行','中信银行','光大银行','广发银行','浦发银行','华夏银行','北京银行','上海银行','渤海银行','恒丰银行');
-- 添加银行扣款渠道配置操作日志
CREATE TABLE bank_collect_type_config_log (
id varchar(32) DEFAULT NULL COMMENT 'id',
config_id varchar(32) DEFAULT NULL COMMENT '配置表',
bank_code varchar(10) DEFAULT NULL COMMENT '银行编码',
bank_name varchar(20) DEFAULT NULL COMMENT '银行名称',
collect_type varchar(10) DEFAULT NULL COMMENT '扣款渠道',
operation_type varchar(10) DEFAULT NULL COMMENT '操作类型',
inputuserid varchar(20) DEFAULT NULL COMMENT '登记人',
inputtime varchar(20) DEFAULT NULL COMMENT '登记时间'
) ENGINE=InnoDB DEFAULT CHARSET=gbk;
delee from AWE_DO_CATALOG where dono='BankCollectTypeConfigInfo';
Insert Into AWE_DO_CATALOG (dono,doname,dodescribe,dotype,doclass,isinuse,colcount,modeid,jboclass,jbofrom,jbowhere,jbogroup,jboorder,businessprocess,exportflag,inputuser,inputtime,updateuser,updatetime,remark,isvalidate,parent) Values ('BankCollectTypeConfigInfo','银行扣款方式配置',null,'30020',null,'1','1','default','jbo.loan.BANK_COLLECT_TYPE_CONFIG','O','id=:id','','','com.amarsoft.app.awe.config.customer.CustomerAccountConfigHandler',null,'SYS_Designer','2020/10/22 11:42:42','SYS_Designer','2020/12/10 14:36:40','','0','');