From 7e18aef1c3632a4ea3630bc696ff8308b8fc1933 Mon Sep 17 00:00:00 2001 From: tangfutang Date: Thu, 10 Dec 2020 18:34:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=A3=E6=AC=BE=E6=B8=A0?= =?UTF-8?q?=E9=81=93=E9=85=8D=E7=BD=AE=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OwnConfig/BankType/BankTypeConfigInfo.jsp | 12 +++ .../OwnConfig/BankType/BankTypeConfigList.jsp | 2 +- WebContent/WEB-INF/etc/jbo/jbo_loan.xml | 18 +++++ .../CustomerAccountConfigHandler.java | 77 +++++++++++++++++++ .../loan/BANK_COLLECT_TYPE_CONFIG_LOG.java | 48 ++++++++++++ src_sql/鎶曚骇SQL/v20201022/tft_20201022.sql | 22 ++++-- 6 files changed, 173 insertions(+), 6 deletions(-) create mode 100644 src/com/amarsoft/app/awe/config/customer/CustomerAccountConfigHandler.java create mode 100644 src_jbo/jbo/loan/BANK_COLLECT_TYPE_CONFIG_LOG.java diff --git a/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfigInfo.jsp b/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfigInfo.jsp index eb09bddac..bf8d447d6 100644 --- a/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfigInfo.jsp +++ b/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfigInfo.jsp @@ -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()'); + } + } <%/*~END~*/%> diff --git a/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfigList.jsp b/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfigList.jsp index 94c49f607..22876f09b 100644 --- a/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfigList.jsp +++ b/WebContent/Tenwa/Core/SystemConfig/OwnConfig/BankType/BankTypeConfigList.jsp @@ -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~*/%> diff --git a/WebContent/WEB-INF/etc/jbo/jbo_loan.xml b/WebContent/WEB-INF/etc/jbo/jbo_loan.xml index 37709a161..ec058172f 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_loan.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_loan.xml @@ -651,6 +651,24 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/com/amarsoft/app/awe/config/customer/CustomerAccountConfigHandler.java b/src/com/amarsoft/app/awe/config/customer/CustomerAccountConfigHandler.java new file mode 100644 index 000000000..1ad27eb00 --- /dev/null +++ b/src/com/amarsoft/app/awe/config/customer/CustomerAccountConfigHandler.java @@ -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); + } +} diff --git a/src_jbo/jbo/loan/BANK_COLLECT_TYPE_CONFIG_LOG.java b/src_jbo/jbo/loan/BANK_COLLECT_TYPE_CONFIG_LOG.java new file mode 100644 index 000000000..d5cf297a9 --- /dev/null +++ b/src_jbo/jbo/loan/BANK_COLLECT_TYPE_CONFIG_LOG.java @@ -0,0 +1,48 @@ +package jbo.loan; + +import java.lang.String; + +/** +* 银行扣款方式配置日志表 - JBO命名常量类

+* Note: This file is generated by ADE tools, dont modify it.
+ +*/ +public interface BANK_COLLECT_TYPE_CONFIG_LOG{ + /** + * 银行扣款方式配置日志表

+ * 代表本类映射的BizObjectClass + */ + public static final String CLASS_NAME = "jbo.loan.BANK_COLLECT_TYPE_CONFIG_LOG"; + /** + * 标识 STRING(32)
+ */ + public static final String id = "id"; + /** + * 配置id STRING(32)
+ */ + public static final String config_id = "config_id"; + /** + * 银行代码 STRING(32)
+ */ + public static final String bank_code = "bank_code"; + /** + * 银行名称 STRING(32)
+ */ + public static final String bank_name = "bank_name"; + /** + * 扣款方式 STRING(32)
+ */ + public static final String collect_type = "collect_type"; + /** + * 操作类型 STRING(32)
+ */ + public static final String operation_type = "operation_type"; + /** + * 登记人 STRING(32)
+ */ + public static final String inputuserid = "inputuserid"; + /** + * 登记时间 STRING(32)
+ */ + public static final String inputtime = "inputtime"; +} \ No newline at end of file diff --git a/src_sql/鎶曚骇SQL/v20201022/tft_20201022.sql b/src_sql/鎶曚骇SQL/v20201022/tft_20201022.sql index 0884f9f05..eb1744e8b 100644 --- a/src_sql/鎶曚骇SQL/v20201022/tft_20201022.sql +++ b/src_sql/鎶曚骇SQL/v20201022/tft_20201022.sql @@ -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',''); \ No newline at end of file