From 6bab97b12d28d202f470bf7a5c483730e2cf8caa Mon Sep 17 00:00:00 2001 From: tangfutang Date: Fri, 11 Dec 2020 14:16:59 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A8=8E=E7=8E=87=E7=BB=B4=E6=8A=A4=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=A7=9F=E8=B5=81=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InvoiceManager/InvoiceTJ/TaxCodeInfo.jsp | 2 +- WebContent/WEB-INF/etc/jbo/jbo_calc.xml | 1 + .../classmethod/TaxCodeInfoHandler.java | 28 +++++++++++++++++ src_jbo/jbo/app/tenwa/calc/TAX_CODE_INFO.java | 4 +++ src_sql/procedure/PROC_calc_tax_tj.sql | 6 ++-- src_sql/鎶曚骇SQL/v20201022/tft_20201022.sql | 30 ++++++++++++++++++- 6 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 src/com/amarsoft/app/awe/config/classmethod/TaxCodeInfoHandler.java diff --git a/WebContent/Tenwa/Core/InvoiceManager/InvoiceTJ/TaxCodeInfo.jsp b/WebContent/Tenwa/Core/InvoiceManager/InvoiceTJ/TaxCodeInfo.jsp index a812dacaa..ef905d6f7 100644 --- a/WebContent/Tenwa/Core/InvoiceManager/InvoiceTJ/TaxCodeInfo.jsp +++ b/WebContent/Tenwa/Core/InvoiceManager/InvoiceTJ/TaxCodeInfo.jsp @@ -40,7 +40,7 @@ <%/*~BEGIN~可编辑区~[Editable=true;CodeAreaID=Info04;Describe=定义按钮;]~*/%> <% String sButtons[][] = { - {"true","All","Button","保存","保存","as_save(0)","","","","btn_icon_save"}, + {"true","All","Button","保存","保存","as_save(0,'parent.AsDialog.ClosePage()')","","","","btn_icon_save"}, {"true","","Button","返回","返回列表页面","parent.AsDialog.ClosePage()","","","","btn_icon_return"} }; sButtonPosition = "south"; diff --git a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml index 067b1e08f..e4fad4144 100644 --- a/WebContent/WEB-INF/etc/jbo/jbo_calc.xml +++ b/WebContent/WEB-INF/etc/jbo/jbo_calc.xml @@ -4250,6 +4250,7 @@ + diff --git a/src/com/amarsoft/app/awe/config/classmethod/TaxCodeInfoHandler.java b/src/com/amarsoft/app/awe/config/classmethod/TaxCodeInfoHandler.java new file mode 100644 index 000000000..4faacb36d --- /dev/null +++ b/src/com/amarsoft/app/awe/config/classmethod/TaxCodeInfoHandler.java @@ -0,0 +1,28 @@ +package com.amarsoft.app.awe.config.classmethod; + +import jbo.app.tenwa.calc.TAX_CODE_INFO; + +import com.amarsoft.are.ARE; +import com.amarsoft.are.jbo.BizObject; +import com.amarsoft.are.jbo.JBOException; +import com.amarsoft.are.jbo.JBOFactory; +import com.amarsoft.awe.dw.handler.impl.CommonHandler; + +public class TaxCodeInfoHandler extends CommonHandler { + + @Override + protected boolean validityCheck(BizObject bo, boolean isInsert) { + try { + BizObject tci=JBOFactory.createBizObjectQuery(TAX_CODE_INFO.CLASS_NAME," tax_type=:tax_type and lease_form=:lease_form").setParameter("tax_type", bo.getAttribute("tax_type").getString()).setParameter("lease_form", bo.getAttribute("lease_form").getString()).getSingleResult(false); + if(tci!=null && (isInsert || !bo.getAttribute("id").getString().equals(tci.getAttribute("id").getString()))){ + errors = "该名称在对应的类型形式已存在!!!"; + return false; + } + } catch (JBOException e) { + ARE.getLog().debug(e); + errors = e.getMessage(); + return false; + } + return true; + } +} diff --git a/src_jbo/jbo/app/tenwa/calc/TAX_CODE_INFO.java b/src_jbo/jbo/app/tenwa/calc/TAX_CODE_INFO.java index 316b24a06..4255569f7 100644 --- a/src_jbo/jbo/app/tenwa/calc/TAX_CODE_INFO.java +++ b/src_jbo/jbo/app/tenwa/calc/TAX_CODE_INFO.java @@ -33,4 +33,8 @@ public interface TAX_CODE_INFO{ * 简称 STRING(20)
*/ public static final String remark = "remark"; + /** + * 租赁类型01直租,02回租 STRING(20)
+ */ + public static final String lease_form = "lease_form"; } \ No newline at end of file diff --git a/src_sql/procedure/PROC_calc_tax_tj.sql b/src_sql/procedure/PROC_calc_tax_tj.sql index ef6a94af2..516cbbc4e 100644 --- a/src_sql/procedure/PROC_calc_tax_tj.sql +++ b/src_sql/procedure/PROC_calc_tax_tj.sql @@ -33,7 +33,7 @@ BEGIN `vib`.`invoice_money` AS `invoice_money`, `cl`.`itemname` AS `tax_type`, `vib`.`tax_no` AS `tax_no`, - `tci`.`code` AS `tax_code`, + case lci.leas_form when '02' then `tci`.`code` when '01' then `tci1`.`code` end AS `tax_code`, `ca`.`CERTID` AS `cert_id`, `ca`.`account` AS `account`, `ca`.`acc_number` AS `acc_number`, @@ -54,7 +54,9 @@ FROM (((((((`apzl`.`vi_li_invoice_tj_base` `vib` ON (((`cl`.`codeno` = 'tax_type') AND (`cl`.`itemno` = `vib`.`tax_no`)))) LEFT JOIN `apzl`.`tax_code_info` `tci` - ON ((`tci`.`tax_type` = `cl`.`itemno`))) + ON ((`tci`.`tax_type` = `cl`.`itemno` and tci.`lease_form`='02')) + LEFT JOIN `apzl`.`tax_code_info` `tci1` on `tci1`.`tax_type` = `cl`.`itemno` and tci1.`lease_form`='01' + ) WHERE ((`vib`.`tax_no` IN('rent','interest','penalty','feetype1','feetype4','feetype30')) ) ; diff --git a/src_sql/鎶曚骇SQL/v20201022/tft_20201022.sql b/src_sql/鎶曚骇SQL/v20201022/tft_20201022.sql index eb1744e8b..5ae936b00 100644 --- a/src_sql/鎶曚骇SQL/v20201022/tft_20201022.sql +++ b/src_sql/鎶曚骇SQL/v20201022/tft_20201022.sql @@ -201,4 +201,32 @@ CREATE TABLE bank_collect_type_config_log ( 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 +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',''); + +-- 税率编码维护添加主体字段 +Alter table tax_code_info add column lease_form varchar(5) NULL COMMENT '赁类型01直租,02回租' after remark; +-- 税率编码维护list页面添加租赁类型字段 +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('taxCodeList','0045','0045','1','O','lease_form','lease_form','String','','租赁类型','','1','FlatSelect','1','1','Code','leas_form','','20','1','0','0','1','0',0,'','','','SYS_Designer','2020/12/11 09:49:25','SYS_Designer','2020/12/11 10:50:03','0','','1','','','',''); +-- 税率编码维护info页面添加校验和字段 +delete from AWE_DO_CATALOG where dono='taxCodeInfo'; +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 ('taxCodeInfo','税率编码信息',null,'30',null,'1','1','default','jbo.app.tenwa.calc.TAX_CODE_INFO','O','id=:id','','','com.amarsoft.app.awe.config.classmethod.TaxCodeInfoHandler',null,'SYS_Designer','2020/07/30 16:05:18','SYS_Designer','2020/12/11 10:46:12','','0',''); +delete from awe_do_library where dono='taxCodeInfo'; +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('taxCodeInfo','0010','0010','1','O','id','id','String','','id','','1','Text','1','1','','','',null,'0','0','0','1','0',0,'','','','SYS_Designer','2020/07/30 16:05:18','SYS_Designer','2020/12/11 10:46:12','','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('taxCodeInfo','0020','0020','1','O','code','code','String','','编码','','1','Text','1','1','','','',null,'1','0','1','1','0',0,'','','','SYS_Designer','2020/07/30 16:05:18','SYS_Designer','2020/12/11 10:46:12','0','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('taxCodeInfo','0030','0030','1','O','full_code','full_code','String','','合并编码','','1','Text','1','1','','','',null,'1','0','1','1','0',0,'','','','SYS_Designer','2020/07/30 16:05:18','SYS_Designer','2020/12/11 10:46:12','0','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('taxCodeInfo','0040','0040','1','O','tax_type','tax_type','String','','名称','','1','Select','1','1','Code','tax_type','',null,'1','0','1','1','0',0,'','','','SYS_Designer','2020/07/30 16:05:18','SYS_Designer','2020/12/11 10:46:12','0','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('taxCodeInfo','0045','0045','1','O','lease_form','lease_form','String','','租赁类型','','1','Select','1','1','Code','leas_form','','20','1','0','1','1','0',0,'','','','SYS_Designer','2020/12/11 09:51:16','SYS_Designer','2020/12/11 10:51:43','0','','1','','','',''); +Insert Into awe_do_library (dono,colindex,sortno,isinuse,coltablename,colactualname,colname,coltype,coldefaultvalue,colheader,colunit,colcolumntype,coleditstyle,colcheckformat,colalign,coleditsourcetype,coleditsource,colhtmlstyle,collimit,colvisible,colreadonly,colrequired,colsortable,isfilter,colspan,isautocomplete,groupid,colfilterrefid,inputuser,inputtime,updateuser,updatetime,isaudit,colfilterattrs,isupdate,parentcolindex,tips,colinnerbtevent,colfilteroptions) Values ('taxCodeInfo','0050','0050','1','O','remark','remark','String','','简称','','1','Text','1','1','','','',null,'1','0','0','1','0',0,'','','','SYS_Designer','2020/07/30 16:05:18','SYS_Designer','2020/12/11 10:46:12','','','1','','','',''); + + + + + + + + + + + + +